/* quibble.fyi — tokens come from the mark (docs/brand.md, "Visual identity"). */
:root {
  --teal: #14b8a6;
  --teal-ink: #0f766e;
  --emerald: #10b981;
  --coral: #f43f5e;
  --paper: #fffdf9;
  --ink: #1f2a2e;
  --muted: #56666b;
  --line: #e6e0d6;
  --card: #ffffff;
  --tint: #eaf7f5;
  --shadow: 0 1px 0 rgba(31, 42, 46, 0.04), 0 12px 32px -18px rgba(15, 118, 110, 0.35);
  --coral-text: #e11d48;
  --band-ink: #0f2927;
  --band-ink-line: #2c5451;
  --radius-bubble: 22px;
  --measure: 38rem;
  --gutter: clamp(16px, 5vw, 56px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --teal-ink: #5eead4;
    --paper: #13201f;
    --ink: #edf4f2;
    --muted: #a3b5b2;
    --line: #2a3a39;
    --card: #1a2a29;
    --tint: #16302d;
    --shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.7);
    --coral-text: #fb7185;
    --band-ink: #0b3a35;
    --band-ink-line: #1f5a53;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --teal-ink: #5eead4;
  --paper: #13201f;
  --ink: #edf4f2;
  --muted: #a3b5b2;
  --line: #2a3a39;
  --card: #1a2a29;
  --tint: #16302d;
  --shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.7);
  --coral-text: #fb7185;
  --band-ink: #0b3a35;
  --band-ink-line: #1f5a53;
  color-scheme: dark;
}

/* Hero variant hide rules live inline in src/partials/variant.html, so they can never
   be older than the headlines on the page (#51). */


/* ---- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* an author display rule must never un-hide */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Recursive", ui-sans-serif, system-ui, sans-serif;
  font-variation-settings: "CASL" 0.25, "MONO" 0;
  font-size: 1.125rem;
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: var(--teal-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
code {
  font-family: "Recursive", ui-monospace, monospace;
  font-variation-settings: "MONO" 1, "CASL" 0;
  font-size: 0.88em;
  background: var(--tint);
  padding: 0.08em 0.35em;
  border-radius: 6px;
}
h1, h2, h3 { font-variation-settings: "CASL" 1, "MONO" 0; line-height: 1.12; margin: 0; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 780; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.fine { font-size: 0.92rem; color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 12px; z-index: 10; }

main > section { padding: clamp(56px, 9vw, 112px) var(--gutter) 0; max-width: 76rem; margin: 0 auto; }

/* ---- Header ------------------------------------------------------------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter); max-width: 76rem; margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-weight: 800; font-size: 1.3rem; font-variation-settings: "CASL" 1;
}
.brand .tld { color: var(--teal-ink); }
.site-nav { display: flex; gap: clamp(14px, 2.2vw, 26px); font-size: 0.98rem; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 0.3em 0; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.site-nav a:hover { color: var(--teal-ink); }
.site-nav a[aria-current="page"] { color: var(--teal-ink); border-bottom-color: var(--teal); }
.top-actions { display: flex; align-items: center; gap: 14px; }
.gh { color: var(--ink); display: inline-flex; padding: 4px; border-radius: 8px; }
.gh:hover { color: var(--teal-ink); }
.theme-switch { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1.5px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink); cursor: pointer; }
.theme-switch:hover { color: var(--teal-ink); border-color: var(--teal); }
/* The icon shows what a click switches to: a moon on light, a sun on dark. */
.theme-switch .i-sun { display: none; }
:root[data-theme="dark"] .theme-switch .i-sun { display: block; }
:root[data-theme="dark"] .theme-switch .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-switch .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-switch .i-moon { display: none; }
}
.button.button-small { padding: 0.32em 0.9em; font-size: 0.98rem; line-height: 1.4; box-shadow: none; } /* same size as the nav links */
.foot-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 1.4em; font-weight: 600; }
.foot-nav a { color: var(--ink); text-decoration: none; }
.foot-nav a:hover, .foot-nav a[aria-current="page"] { color: var(--teal-ink); }
.more { font-weight: 600; }

/* ---- Home: use cases and the watch band ---------------------------------- */
.usecases h2 { margin-bottom: 1em; max-width: 32ch; }
.uc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 20px; }
.uc {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--line); border-radius: 22px 22px 22px 6px;
  padding: 1.3em 1.4em 1.4em; box-shadow: var(--shadow);
  transition: border-color .15s ease, transform .15s ease;
}
.uc:hover { border-color: var(--teal); transform: translateY(-2px); }
.uc h3 { font-size: 1.2rem; margin-bottom: 0.5em; color: var(--teal-ink); }
.uc p { color: var(--muted); font-size: 1rem; margin: 0; }
.uc-grid .uc:nth-child(2) { border-radius: 22px 22px 6px 22px; }
.watch-band { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px 56px; align-items: center; }
.watch-copy h2 { margin-bottom: 0.5em; }

/* ---- Buttons ------------------------------------------------------------ */
.button {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--teal-ink); color: #fff;
  font: inherit; font-weight: 700; font-variation-settings: "CASL" 0.6;
  padding: 0.8em 1.35em; border-radius: 999px; text-decoration: none;
  box-shadow: 0 2px 0 rgba(15, 118, 110, 0.35);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button { color: #062421; } }
:root[data-theme="dark"] .button { color: #062421; }
.button:hover { filter: brightness(1.06); }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.quiet-link { font-weight: 600; }

/* ---- Hero --------------------------------------------------------------- */
.hero {
  display: grid; gap: clamp(40px, 6vw, 72px); align-items: center;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
}
main > .hero { padding-top: clamp(32px, 6vw, 80px); }
.headline {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  font-weight: 860;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 0.45em;
  text-wrap: balance;
}
.headline .line { display: inline-block; }
.lede { font-size: clamp(1.15rem, 1.9vw, 1.35rem); max-width: var(--measure); }
.actions { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 1.6em; }


/* The one orchestrated moment: the complaint is said, then it becomes an issue. */
.hero-art { position: relative; display: grid; gap: 26px; justify-items: start; }
.said {
  position: relative; margin: 0 0 0 4%;
  max-width: 21rem;
  border: 3px solid var(--teal); border-radius: var(--radius-bubble);
  background: var(--card);
  padding: 0.8em 1.1em;
  font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 650;
  font-variation-settings: "CASL" 1;
}
.said .tail { /* drawn like the mark's tail */
  position: absolute; right: 40px; bottom: -28px; width: 34px; height: 30px; overflow: visible;
}
.said .tail path { fill: var(--card); stroke: var(--teal); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; transform: translateY(-2.5px); }
.issue {
  width: 100%; max-width: 30rem; justify-self: end;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 1.1em 1.25em; box-shadow: var(--shadow);
  font-family: "Recursive", ui-monospace, monospace;
  font-variation-settings: "MONO" 1, "CASL" 0; font-size: 0.86rem; line-height: 1.55;
}
.issue-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5em; font-variation-settings: "MONO" 0, "CASL" 0; }
.issue-title .num { color: var(--muted); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.8em; }
.chip {
  font-size: 0.78rem; font-weight: 700; padding: 0.1em 0.65em; border-radius: 999px;
  background: var(--tint); color: var(--teal-ink); font-variation-settings: "MONO" 0, "CASL" 0.5;
}
.chip-marker { background: var(--teal); color: #fff; }
.chip-dropped { background: none; color: var(--coral-text); text-decoration: line-through; border: 1.5px dashed var(--coral); }
.issue-body { list-style: none; margin: 0 0 0.7em; padding: 0; color: var(--muted); }
.issue-body li { overflow-wrap: anywhere; }
.issue-body li::before { content: "- "; }
.diag { margin: 0; color: var(--ink); font-weight: 600; }
.diag span { display: block; font-weight: 400; color: var(--coral-text); overflow-wrap: anywhere; margin-top: 0.25em; }

@media (prefers-reduced-motion: no-preference) {
  .said { animation: say 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.15s both; }
  .issue { animation: file 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.9s both; }
  @keyframes say { from { opacity: 0; transform: scale(0.85) translateY(8px); } }
  @keyframes file { from { opacity: 0; transform: translateY(18px); } }
}

/* ---- Agentic story (variant "story") ------------------------------------ */
.agentic-story {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 48px; align-items: baseline;
}
.agentic-story p { max-width: var(--measure); }

/* ---- Captures ----------------------------------------------------------- */
.captures h2 { margin-bottom: 1.2em; }
.capture-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 28px 32px;
}
.capture-grid > div { border-top: 3px solid var(--teal); padding-top: 0.9em; }
.capture-grid > div:nth-child(3) { border-top-color: var(--coral); } /* when something broke */
.capture-grid h3 { margin-bottom: 0.4em; }
.capture-grid p { color: var(--muted); font-size: 1rem; }

/* ---- FYI sections ------------------------------------------------------- */
.fyi { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px 56px; align-items: start; }
.fyi h2 { grid-column: 1; grid-row: 1; }
.fyi-body { grid-column: 2; grid-row: 1 / span 3; max-width: var(--measure); }
.fyi-tag {
  position: relative; display: inline-block; vertical-align: 0.12em;
  font-size: 0.55em; font-weight: 800; letter-spacing: 0.02em;
  color: #fff; background: var(--teal-ink);
  padding: 0.12em 0.55em 0.16em; margin-right: 0.3em;
  border-radius: 10px 10px 10px 2px;
  font-variation-settings: "CASL" 1;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fyi-tag { color: #062421; } }
:root[data-theme="dark"] .fyi-tag { color: #062421; }

.paths { grid-column: 1; grid-row: 2; margin: 0.8em 0 0; display: grid; gap: 22px; align-content: start; }
.path figcaption { font-size: 0.9rem; font-weight: 700; color: var(--muted); margin-bottom: 0.4em; }
.path ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; }
.path li {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px;
  padding: 0.3em 0.9em; font-size: 0.95rem; font-weight: 600;
}
.path li + li::before { content: ""; display: inline-block; width: 18px; height: 2px; background: var(--line); margin: 0 10px 0 -26px; vertical-align: middle; }
.path li + li { margin-left: 18px; }
.hop-them { border-color: var(--coral) !important; border-style: dashed !important; color: var(--coral-text); }
.hop-you { border-color: var(--teal) !important; background: var(--tint) !important; color: var(--teal-ink); }

/* ---- Bands and FYI art: break the rhythm ------------------------------- */
/* Full-bleed colour behind a width-constrained section, with no extra markup. */
.band-tint, .band-ink {
  box-shadow: 0 0 0 100vmax var(--band);
  clip-path: inset(0 -100vmax);
  background: var(--band);
  padding-bottom: clamp(56px, 9vw, 112px) !important;
  margin-top: clamp(56px, 9vw, 112px) !important;
}
.band-tint { --band: var(--tint); }
/* Two bands in a row meet edge to edge; no strip of page between them. */
:is(.band-tint, .band-ink) + :is(.band-tint, .band-ink) { margin-top: 0 !important; }
.band-ink { --band: var(--band-ink); color: #e8f3f1; }
.band-ink .fyi-tag { background: var(--teal); color: #062421; }
.band-ink a { color: #5eead4; } /* teal-ink is unreadable on the dark band */
.band-ink code { background: #163a37; color: #ccfbf1; }
.band-ink .path li { background: #163a37; border-color: var(--band-ink-line); color: #e8f3f1; }
.band-ink .path figcaption { color: #9fc1bc; }
.band-ink .hop-them { color: #fda4af; border-color: #fb7185 !important; }
.band-ink .hop-you { background: #115e56 !important; color: #ccfbf1; border-color: var(--teal) !important; }
.band-ink .path li { font-size: 1.05rem; padding: 0.45em 1.1em; }

.fyi-art { grid-column: 1; grid-row: 2; margin: 0.8em 0 0; }
.art-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-bottom: 0.35em; }
.chips-art .art-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 1.1em; }
.chips-art .art-label { flex-basis: 100%; margin: 0; }
.chips-art .chip { font-size: 0.95rem; padding: 0.2em 0.85em; }
.reported-art p { margin: 0 0 1em; }
.reported-art code { display: block; font-size: 0.8rem; padding: 0.6em 0.9em; border-radius: 10px; overflow-wrap: anywhere; background: var(--card); border: 1.5px solid var(--line); }
.reported-art p:last-child code { border-style: dashed; }
.fyi-mark { position: relative; }
.big-mark { grid-column: 1; width: clamp(120px, 18vw, 220px); height: auto; margin-top: 1.5em; transform: rotate(-6deg); }

/* ---- Also in the box --------------------------------------------------- */
.box h2 { margin-bottom: 1.2em; }
.box-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 26px 40px; }
.box-grid h3 { margin-bottom: 0.35em; }
.box-grid h3 code { font-size: 0.95em; }
.box-grid p { color: var(--muted); font-size: 1rem; margin: 0; }

/* ---- Demo --------------------------------------------------------------- */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 32px 56px; }
.demo-intro p { max-width: var(--measure); }
.demo-intro h2 { margin-bottom: 0.6em; }
.demo .try { font-weight: 600; }
.demo-stage { grid-column: 2; display: grid; gap: 20px; align-content: start; }
.stage-guide[hidden] { display: none; }
.stage-guide { font-size: 1rem; }
.status { font-weight: 700; }
.status.ok { color: var(--emerald); }
.status.bad { color: var(--coral); }
.counter strong { font-size: 1.4em; color: var(--emerald); font-variation-settings: "MONO" 1; }
.counter.leaked strong { color: var(--coral); }
.counter-why { font-size: 0.9rem; color: var(--muted); margin-top: -0.4em; }
.leaks { font-size: 0.85rem; color: var(--coral); overflow-wrap: anywhere; }
.filed { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 20px; align-content: start; }
.filed .empty {
  border: 2px dashed var(--line); border-radius: 14px; padding: 2em 1.5em; color: var(--muted); margin: 0;
}
.filed .issue { max-width: none; justify-self: stretch; }
.watch { margin: 0; }
.watch video { width: 100%; height: auto; display: block; border-radius: 14px; border: 1.5px solid var(--line); box-shadow: var(--shadow); background: var(--card); }
.watch figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.6em; }
.filed .tracker-name { font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 0.4em; font-variation-settings: "MONO" 0; }
.filed .rendered { font-family: "Recursive", ui-sans-serif, sans-serif; font-variation-settings: "MONO" 0, "CASL" 0; font-size: 0.95rem; }
.filed .rendered ul { padding-left: 1.2em; margin: 0.4em 0; }
.filed .rendered img { max-width: 100%; }
.filed pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font: inherit; }
.filed .view-toggle { font: inherit; font-size: 0.8rem; margin-top: 0.8em; background: none; border: 0; padding: 0; color: var(--teal-ink); text-decoration: underline; cursor: pointer; }
.dropped-note { font-size: 0.85rem; color: var(--coral-text); margin: 0 0 0.6em; font-variation-settings: "MONO" 0; }

/* ---- Proof, trackers, early access -------------------------------------- */
.trackers table { border-collapse: collapse; margin: 1.2em 0 1em; min-width: min(100%, 26rem); }
.trackers th, .trackers td { text-align: left; padding: 0.55em 1.6em 0.55em 0; border-bottom: 1.5px solid var(--line); }
.trackers th { font-size: 0.9rem; color: var(--muted); font-weight: 700; }
.trackers td:last-child { color: var(--emerald); font-weight: 700; }
.trackers td.untested { color: var(--muted); font-weight: 600; }
.early {
  margin-top: clamp(56px, 9vw, 112px) !important;
  background: var(--tint); border-radius: 28px 28px 28px 6px;
  padding: clamp(32px, 5vw, 56px) !important;
  max-width: calc(76rem - 2 * var(--gutter)) !important;
  margin-left: max(var(--gutter), calc((100% - 76rem) / 2 + var(--gutter))) !important;
  margin-right: max(var(--gutter), calc((100% - 76rem) / 2 + var(--gutter))) !important;
}
.early p { max-width: var(--measure); }
.early h2 { margin-bottom: 0.5em; }
.trackers .fine { max-width: 44rem; }

/* ---- Footer ------------------------------------------------------------- */
.foot { max-width: 76rem; margin: 0 auto; padding: 56px var(--gutter) 72px; }
.foot .fine { max-width: 44rem; }

/* ---- Review dialog ------------------------------------------------------ */
.review { width: min(960px, 94vw); height: min(80vh, 760px); padding: 0; border: 0; border-radius: 16px; background: var(--card); color: var(--ink); }
.review::backdrop { background: rgba(19, 32, 31, 0.55); }
.review-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1.5px solid var(--line); font-size: 0.95rem; font-weight: 700; }
.review-bar button { font: inherit; font-weight: 700; border: 0; background: var(--tint); color: var(--teal-ink); padding: 0.3em 0.9em; border-radius: 999px; cursor: pointer; }
.review iframe { width: 100%; height: calc(100% - 50px); border: 0; background: #fff; }

/* ---- Narrow screens ----------------------------------------------------- */
@media (max-width: 820px) {
  .hero, .fyi, .demo, .watch-band { grid-template-columns: minmax(0, 1fr); }
  .top { flex-wrap: wrap; }
  .site-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .demo-stage { grid-column: 1; }
  .fyi h2, .fyi-body, .paths, .fyi-art { grid-column: 1; grid-row: auto; }
  .big-mark { width: 110px; }
  .issue { justify-self: stretch; }
  .said { margin-left: 0; }
}


/* ---- Inner pages --------------------------------------------------------- */
.page-hero { padding-top: clamp(28px, 5vw, 64px) !important; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 860; letter-spacing: -0.02em; margin-bottom: 0.35em; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.4em; }
.jump a { text-decoration: none; font-size: 0.92rem; font-weight: 600; padding: 0.3em 0.85em; border-radius: 999px; background: var(--tint); color: var(--teal-ink); }
.jump a:hover { background: var(--teal); color: #fff; }
.note { border-left: 3px solid var(--coral); padding-left: 0.9em; font-size: 0.98rem; }
.band-ink .note { border-left-color: #fb7185; }
ul.plain { padding-left: 1.1em; }
ul.plain li { margin-bottom: 0.55em; }
table.spec { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin: 0.4em 0 1.2em; }
table.spec th, table.spec td { text-align: left; padding: 0.55em 0.8em 0.55em 0; border-bottom: 1.5px solid var(--line); vertical-align: top; }
table.spec th { font-size: 0.85rem; color: var(--muted); }
.pieces h2 { margin-bottom: 1.2em; }
section[id] { scroll-margin-top: 16px; }

/* ---- Demo page ------------------------------------------------------------
   Desktop: one screen, no page scroll. The header, a toolbar, and the stage filling
   the rest; the app sits in a drawn browser window and the side column scrolls
   inside itself. Phones stack and scroll. */
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.stage-bar h1 { font-size: 1.3rem; font-weight: 820; margin: 0 auto 0 0; }
.seg { display: inline-flex; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { font: inherit; font-size: 0.9rem; font-weight: 700; border: 0; background: none; color: var(--muted); padding: 0.4em 0.95em; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--teal-ink); color: #fff; }
.stage-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 23rem); gap: 18px; align-items: start; }

.browser { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; border: 1.5px solid var(--line); box-shadow: 0 30px 60px -30px rgba(15, 41, 39, 0.45), var(--shadow); background: #fff; }
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 9px 14px; background: #eef1f2; border-bottom: 1px solid #dde2e4; flex: none; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #d4d9dc; display: block; }
.dots i:first-child { background: #fb7185; } .dots i:nth-child(2) { background: #fbbf24; } .dots i:nth-child(3) { background: #34d399; }
.address { flex: 1; max-width: 32rem; margin: 0 auto; background: #fff; border-radius: 999px; padding: 0.22em 1em; font-size: 0.85rem; color: #56666b; text-align: center; font-variation-settings: "MONO" 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frames { position: relative; }
.frames iframe { display: block; width: 100%; height: 70vh; border: 0; background: #fff; }

.side { display: flex; flex-direction: column; gap: 12px; }
.side .panel { background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 0.85em 1em; }
.side .panel h2 { font-size: 1rem; margin-bottom: 0.4em; }
.side .panel p { font-size: 0.92rem; }
.side .panel > :last-child { margin-bottom: 0; }
.side .status { margin-bottom: 0.3em; }
.side .hint { color: var(--muted); font-size: 0.88rem !important; margin-bottom: 0.4em; }
.side-fine { font-size: 0.8rem !important; margin: 0; }
.checklist { margin: 0; padding-left: 0; list-style: none; counter-reset: step; font-size: 0.9rem; }
.checklist li { position: relative; padding: 0.25em 0 0.25em 2em; counter-increment: step; }
.checklist li::before { content: counter(step); position: absolute; left: 0; top: 0.22em; width: 1.45em; height: 1.45em; border-radius: 50%; display: grid; place-items: center; font-size: 0.78rem; font-weight: 800; background: var(--tint); color: var(--teal-ink); }
.checklist li.done { color: var(--muted); }
.checklist li.done::before { content: "✓"; background: var(--emerald); color: #fff; }
.side .filed { display: grid; gap: 12px; align-content: start; }
.side .filed .issue { font-size: 0.78rem; padding: 0.8em 0.9em; box-shadow: none; }
.side .filed .empty { padding: 1.2em 1em; }

@media (min-width: 961px) {
  body.page-demo { height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
  body.page-demo .top { width: 100%; padding-top: 10px; padding-bottom: 10px; flex: none; } /* same width as every page */
  body.page-demo main { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: clip; }
  body.page-demo main > .stage { flex: 1; min-height: 0; max-width: 76rem; width: 100%; margin: 0 auto; padding: 4px var(--gutter) 16px; display: flex; flex-direction: column; } /* the site's column; the browser window gives up the space */
  body.page-demo .stage-grid { flex: 1; min-height: 0; align-items: stretch; }
  body.page-demo .app-area, body.page-demo .browser { height: 100%; min-height: 0; }
  body.page-demo .frames { flex: 1; min-height: 0; }
  body.page-demo .frames iframe { height: 100%; }
  body.page-demo .side { height: 100%; min-height: 0; overflow-y: auto; } /* short screens scroll the column, never the page */
  body.page-demo .panel-tracker { flex: 1 0 auto; min-height: 15rem; display: flex; flex-direction: column; } /* the payoff: never squeezed away */
  body.page-demo .panel-tracker .filed { flex: 1; min-height: 0; }

}

@media (max-width: 960px) {
  .stage-grid { grid-template-columns: minmax(0, 1fr); }
  .stage-bar h1 { flex-basis: 100%; }
}

@media (max-width: 420px) {
  .brand { font-size: 1.1rem; gap: 7px; }
  .brand img { width: 28px; height: 28px; }
  .top-actions { gap: 8px; margin-left: auto; }
  .button.button-small { padding: 0.3em 0.75em; font-size: 0.9rem; }
}

/* ---- Which trackers and languages work (#44) ------------------------------ */
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 12px 48px; margin: 1em 0; }
.platform-grid h3 { font-size: 1rem; color: var(--muted); margin-bottom: 0.3em; }
table.platforms { width: 100%; border-collapse: collapse; }
table.platforms th { text-align: left; font-size: 0.85rem; color: var(--muted); padding: 0.4em 0; border-bottom: 1.5px solid var(--line); }
table.platforms td { padding: 0.6em 0.8em 0.6em 0; border-bottom: 1.5px solid var(--line); vertical-align: middle; }
table.platforms th:last-child { text-align: right; }
table.platforms td:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
.brand-link { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; }
a.brand-link:hover span { text-decoration: underline; text-underline-offset: 0.18em; }
.logo { width: 22px; height: 22px; flex: none; }
.logo-none { display: inline-grid; place-items: center; border-radius: 6px; background: var(--tint); color: var(--teal-ink); font-weight: 800; font-size: 0.8rem; }
.subs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0.5em 0 0 32px; }
.subs-first { margin-left: 0; margin-top: 0; }
.subs .brand-link { font-weight: 550; font-size: 0.92rem; }
.subs .logo { width: 18px; height: 18px; }
.subs-note { font-size: 0.85rem; color: var(--muted); margin: 0.35em 0 0 32px; }
.subs-first + .subs-note { margin-left: 0; }
.st { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0.15em 0.7em; border-radius: 999px; }
.st-ok { background: color-mix(in srgb, var(--emerald) 16%, transparent); color: var(--teal-ink); }
.st-todo { background: var(--tint); color: var(--muted); }
.st-road { border: 1.5px dashed var(--line); color: var(--muted); }
tr.is-roadmap .brand-link { color: var(--muted); }
tr.is-roadmap .logo:not(.logo-none) { opacity: 0.75; }

/* ---- Compare --------------------------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.table-scroll { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); }
.table-scroll:focus-visible { outline-offset: 2px; }
table.cmp { border-collapse: collapse; width: 100%; min-width: 52rem; font-size: 0.92rem; }
table.cmp th, table.cmp td { text-align: left; vertical-align: top; padding: 0.8em 1em; border-bottom: 1.5px solid var(--line); }
table.cmp thead th { font-size: 0.82rem; color: var(--muted); background: var(--tint); }
table.cmp tbody th { font-weight: 750; white-space: nowrap; }
table.cmp tr:last-child > * { border-bottom: 0; }
table.cmp tr.us { background: color-mix(in srgb, var(--teal) 10%, transparent); }
table.cmp tr.us th { color: var(--teal-ink); }
.src { display: inline-block; font-size: 0.78rem; font-weight: 600; margin-left: 0.2em; white-space: nowrap; }
.compare .fine { margin-top: 1em; max-width: 44rem; }
main > .compare { padding-top: 12px; }

/* ---- Header submenus (#46) --------------------------------------------------- */
.top { position: relative; z-index: 40; }
.nav-item { position: relative; display: inline-flex; }
.site-nav .nav-top { display: inline-flex; align-items: center; gap: 5px; }
.caret { transition: transform 0.15s ease; }
.nav-top[aria-expanded="true"] .caret { transform: rotate(180deg); }
.sub {
  position: absolute; top: calc(100% + 8px); left: -12px; z-index: 50; min-width: 16rem;
  display: grid; padding: 6px; background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow), 0 24px 44px -22px rgba(0, 0, 0, 0.35);
}
.sub[hidden] { display: none; }
.site-nav .sub a { padding: 0.55em 0.8em; border: 0; border-radius: 8px; white-space: nowrap; font-weight: 600; color: var(--ink); }
.site-nav .sub a:hover, .site-nav .sub a:focus-visible { background: var(--tint); color: var(--teal-ink); }
@media (prefers-reduced-motion: reduce) { .caret { transition: none; } }
@media (max-width: 820px) {
  /* The nav row scrolls sideways, which would clip a dropdown inside it; anchoring the
     menu to the header instead lets it drop below the row at full width. */
  .nav-item { position: static; }
  .sub { top: 100%; left: 12px; right: 12px; min-width: 0; }
  .site-nav .sub a { white-space: normal; }
}
