/* BlurCaller — every screen. Scoped under .cl-app (the pages) and .cl-call
   (the call screen) so BlurPager's own stylesheet and this one do not fight. */

.cl-app, .cl-call {
  --cl-ink: #1c1b20;
  --cl-muted: #686572;
  --cl-line: #e4e1e8;
  --cl-bg: #f7f6f9;
  --cl-card: #ffffff;
  /* BlurPaper's teal, as BlurMailer uses it (docs/BRAND.md): filled surfaces
     in --cl-accent with --cl-accent-ink on them (7:1); teal TEXT in --cl-link,
     because white on #00c6cf is 2:1. */
  --cl-accent: #00c6cf;
  --cl-accent-ink: #00363a;
  --cl-link: #00818a;
  --cl-bad: #c5221f;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--cl-ink);
  box-sizing: border-box;
}
.cl-app *, .cl-call * { box-sizing: inherit; }
@media (prefers-color-scheme: dark) {
  .cl-app {
    --cl-ink: #ecebf0; --cl-muted: #a3a0ab; --cl-line: #33313a; --cl-bg: #151419; --cl-card: #1e1d23;
    --cl-link: #3fd9e0;
  }
}
.cl-app { background: var(--cl-bg); min-height: 100vh; }
.cl-app a { color: var(--cl-link); }
.cl-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--cl-line); background: var(--cl-card);
}
.cl-brand { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; line-height: 0; }
.cl-logo-mark { height: 30px; width: 30px; flex: none; }
.cl-logo-word { height: 30px; width: auto; aspect-ratio: 590 / 116; /* the word's viewBox, tools/make-icons.js */ }
@media (max-width: 340px) { .cl-logo-word { display: none; } }
.cl-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.cl-nav a { text-decoration: none; }
.cl-main { max-width: 960px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.cl-foot { text-align: center; color: var(--cl-muted); font-size: .85rem; padding: 2rem 1rem; }
.cl-muted { color: var(--cl-muted); }
.cl-error { color: var(--cl-bad); margin: 0; }
.cl-inline { display: inline; margin: 0; }

.cl-hero { padding: 2rem 0 1rem; max-width: 40rem; }
.cl-hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.2; margin: 0 0 .75rem; }
.cl-lead { font-size: 1.1rem; }
.cl-points { padding-left: 1.2rem; }
.cl-cta { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin: 1.25rem 0 0; }
.cl-card h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.cl-card .cl-points, .cl-steps { margin: 0; padding-left: 1.3rem; }
.cl-points li, .cl-steps li { margin: .2rem 0; }
.cl-faq details { border-top: 1px solid var(--cl-line); padding: .6rem 0; }
.cl-faq details:first-of-type { border-top: 0; }
.cl-faq summary { cursor: pointer; font-weight: 600; }
.cl-faq details p { margin: .5rem 0 0; }
.cl-nav a[lang] { font-size: .9rem; }

.cl-card {
  background: var(--cl-card); border: 1px solid var(--cl-line); border-radius: 12px;
  padding: 1.25rem; margin: 0 0 1rem;
}
.cl-card h1 { font-size: 1.25rem; margin: 0 0 .75rem; }
.cl-narrow { max-width: 28rem; margin-left: auto; margin-right: auto; }
.cl-form { display: grid; gap: .75rem; }
.cl-form label { display: grid; gap: .25rem; font-weight: 500; }
.cl-form input:not([type="checkbox"]) {
  font: inherit; padding: .55rem .7rem; border: 1px solid var(--cl-line); border-radius: 8px;
  background: var(--cl-bg); color: var(--cl-ink); width: 100%;
}
.cl-row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
@media (max-width: 520px) { .cl-row { grid-template-columns: minmax(0, 1fr); } }
.cl-button {
  font: inherit; font-weight: 600; border: 0; border-radius: 999px; padding: .55rem 1.1rem; cursor: pointer;
  background: var(--cl-accent); color: var(--cl-accent-ink) !important; text-decoration: none; display: inline-block;
}
.cl-button:disabled { opacity: .6; cursor: default; }
.cl-wide { width: 100%; text-align: center; padding: .75rem 1.1rem; }
.cl-other-way { margin-top: 1rem; border-top: 1px solid var(--cl-line); padding-top: .75rem; }
.cl-other-way summary { cursor: pointer; color: var(--cl-muted); }
.cl-other-way form { margin-top: .75rem; }
.cl-quiet {
  font: inherit; background: none; border: 1px solid var(--cl-line); border-radius: 999px; padding: .45rem .9rem;
  color: inherit; cursor: pointer;
}

.cl-room { border-top: 1px solid var(--cl-line); padding: .9rem 0; }
.cl-room:first-of-type { border-top: 0; }
.cl-room-closed { opacity: .7; }
.cl-room-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.cl-room-head h2 { font-size: 1.05rem; margin: 0; overflow-wrap: anywhere; }
.cl-pill { font-size: .8rem; border: 1px solid var(--cl-line); border-radius: 999px; padding: 0 .5rem; color: var(--cl-muted); }
.cl-room p { margin: .25rem 0 .6rem; font-size: .9rem; }
.cl-room-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

/* ---- the call screen: dark, whatever the system says, like every call app */

.cl-call {
  --cl-ink: #e8eaed; --cl-muted: #9aa0a6; --cl-line: #3c4043; --cl-bg: #202124; --cl-card: #2d2e31;
  --cl-accent: #00c6cf; --cl-accent-ink: #00363a; --cl-link: #3fd9e0;
  background: var(--cl-bg); min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
.cl-call a { color: var(--cl-link); }
.cl-top { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; flex-wrap: wrap; }
.cl-title { font-size: 1rem; font-weight: 500; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cl-status { color: #fdd663; font-size: .9rem; }

.cl-lobby {
  flex: 1; display: grid; gap: 1.5rem; align-items: center; justify-content: center;
  grid-template-columns: minmax(0, 36rem) minmax(0, 20rem); padding: 1rem;
}
@media (max-width: 760px) { .cl-lobby { grid-template-columns: minmax(0, 1fr); align-content: start; } }
.cl-preview video {
  width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; object-fit: cover; transform: scaleX(-1);
}
.cl-switches { display: flex; gap: 1rem; flex-wrap: wrap; }
.cl-switches label { display: flex; gap: .4rem; align-items: center; font-weight: 400; }

.cl-stage { flex: 1; display: flex; gap: .75rem; padding: 0 .75rem; min-height: 0; position: relative; }
.cl-sound {
  position: absolute; z-index: 5; top: .75rem; left: 50%; transform: translateX(-50%); max-width: calc(100% - 2rem);
  padding: .8rem 1.4rem; border: 0; border-radius: 999px; background: var(--cl-accent); color: var(--cl-accent-ink);
  font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 2px 10px #0008;
}
.cl-notice {
  position: absolute; z-index: 6; bottom: .75rem; left: 50%; transform: translateX(-50%); width: min(34rem, calc(100% - 2rem));
  display: flex; gap: .75rem; align-items: flex-start; padding: .75rem 1rem; border-radius: 12px;
  background: #fef7e0; color: #3c2f00; box-shadow: 0 2px 10px #0008; font-size: .95rem;
}
.cl-notice p { margin: 0; flex: 1; }
.cl-notice-close { font: inherit; border: 0; background: none; color: inherit; cursor: pointer; padding: 0 .25rem; }
.cl-grid {
  flex: 1; display: grid; gap: .5rem; align-content: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.cl-grid[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.cl-grid[data-count="2"] { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
/* More than six: smaller tiles, so twelve fit a laptop's screen (docs/CALLS.md "A call that grows"). */
.cl-grid[data-count="many"] { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.cl-grid[data-count="many"] .cl-avatar { width: 3.2rem; height: 3.2rem; font-size: 1.4rem; }
.cl-tile { position: relative; margin: 0; background: #3c4043; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.cl-tile video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.cl-tile-self video { transform: scaleX(-1); }
.cl-tile.cl-sharing video { object-fit: contain; transform: none; }
.cl-avatar {
  position: absolute; inset: 0; margin: auto; width: 5rem; height: 5rem; border-radius: 50%;
  display: none; place-items: center; font-size: 2.2rem; background: #5f6368; color: #fff;
}
.cl-tile.cl-off video { visibility: hidden; }
.cl-tile.cl-off .cl-avatar { display: grid; }
.cl-tile figcaption {
  position: absolute; left: .5rem; bottom: .5rem; right: .5rem; display: flex; gap: .4rem; align-items: center;
  font-size: .85rem; text-shadow: 0 1px 2px #000;
}
.cl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cl-chat {
  width: min(22rem, 100%); display: flex; flex-direction: column; background: var(--cl-card);
  border-radius: 12px; overflow: hidden; color: var(--cl-ink);
}
.cl-lines { list-style: none; margin: 0; padding: .75rem; flex: 1; overflow-y: auto; display: grid; gap: .6rem; align-content: start; }
.cl-line p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.cl-line-head { display: flex; gap: .5rem; align-items: baseline; font-size: .85rem; }
.cl-line-head time { color: var(--cl-muted); }
.cl-system { color: var(--cl-muted); font-size: .85rem; }
.cl-say { display: flex; gap: .4rem; padding: .5rem; border-top: 1px solid var(--cl-line); }
.cl-say input {
  flex: 1; min-width: 0; font: inherit; padding: .45rem .7rem; border-radius: 999px; border: 1px solid var(--cl-line);
  background: var(--cl-bg); color: var(--cl-ink);
}
@media (max-width: 760px) {
  .cl-stage.cl-with-chat .cl-grid { display: none; }
  .cl-chat { width: 100%; }
}

.cl-controls {
  display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; padding: .75rem;
}
.cl-controls button {
  font: inherit; border: 0; border-radius: 999px; padding: .6rem 1rem; cursor: pointer;
  background: #3c4043; color: #e8eaed; display: inline-flex; gap: .35rem; align-items: center;
}
.cl-controls button[data-do="mic"][aria-pressed="false"],
.cl-controls button[data-do="cam"][aria-pressed="false"] { background: #ea4335; color: #fff; }
.cl-controls button[data-do="screen"][aria-pressed="true"],
.cl-controls button[data-do="chat"][aria-pressed="true"] { background: var(--cl-accent); color: var(--cl-accent-ink); }
.cl-controls .cl-leave { background: #ea4335; color: #fff; }
.cl-unread { background: #ea4335; color: #fff; border-radius: 999px; font-size: .75rem; padding: 0 .4rem; }
.cl-ended { margin-top: 3rem; color: var(--cl-ink); }
.cl-controls button[aria-busy="true"] { opacity: .6; cursor: progress; }
