/* The showroom page only. Everything shared lives in shell.css. */
html[data-demo="home"] main { max-width: none; padding: 0 0 2.5rem; }
html[data-demo="home"] .sr-bar { position: fixed; left: 0; right: 0; top: 0; }      /* over the hero, and it follows the page */
html[data-demo="home"] main.prose-page, html[data-demo="home"] .prose { padding-top: calc(var(--bar-h) + 36px); }

/* hero: one headline, one sentence, one button */
.hero { padding: calc(var(--bar-h) + 56px) 0 24px; text-align: center; }
/* the honeycomb of datatonia.net: strongest behind the hero, fading into a faint layer under the rest of the page.
   Every layer sits on the page, so the glow below (body::after) shows through the hero. */
html[data-demo="home"] body { position: relative; background:
  radial-gradient(760px 420px at 50% -8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 66%) no-repeat,
  linear-gradient(to bottom, transparent 0, transparent var(--hex-full), color-mix(in srgb, var(--page) var(--hex-fade), transparent) var(--hex-low), color-mix(in srgb, var(--page) var(--hex-fade), transparent) 100%),
  var(--hex-img) 0 0 / 122px auto repeat,
  linear-gradient(to bottom, var(--surface2) 0, var(--surface2) 200px, var(--page) 640px, var(--page) 100%);
  --hex-img: url("hex-light.svg?v=2"); --hex-full: 300px; --hex-low: 720px; --hex-fade: 40%; }
/* light: exactly as faint as datatonia.net (lines at 6%, full to 220px, easing to 42% of that by 780px) */
:root[data-theme="light"][data-demo="home"] body { --hex-img: url("hex-soft.svg?v=2"); --hex-full: 220px; --hex-low: 780px; --hex-fade: 58%; }
/* where the cursor rests, the grid lights up (home.js sets --hexglow and --trail; nothing happens on touch screens) */
html[data-demo="home"] .hexglow { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; opacity: 0;
  width: 208px; height: 208px; contain: strict; will-change: transform, opacity;      /* a 208 px tile that moves, not a page-sized mask */
  background: url("hex-glow.svg") 0 0 / 122px auto repeat;
  -webkit-mask: radial-gradient(closest-side, rgba(0,0,0,.72) 0%, rgba(0,0,0,.44) 46%, transparent 100%) center / var(--d, 0px) var(--d, 0px) no-repeat;
  mask: radial-gradient(closest-side, rgba(0,0,0,.72) 0%, rgba(0,0,0,.44) 46%, transparent 100%) center / var(--d, 0px) var(--d, 0px) no-repeat; }
.hero h1 { font-size: clamp(2.2rem, 6.4vw, 3.9rem); line-height: 1.06; letter-spacing: -.028em; }
.hero h1 .hl { display: block; color: var(--accent-ink); font-style: italic; font-weight: 400; }
.hero-cta { margin: 1.8rem 0 1.3rem; }
.hero-cta .btn { min-height: 56px; padding: 0 30px; font-size: 1.06rem; border-radius: 14px; box-shadow: 0 14px 30px -14px var(--accent-ink); }
.hero-cta .btn svg { transition: transform var(--dur) var(--ease); }
.hero-cta .btn:hover svg { transform: translateX(4px); }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin: 0; padding: 0; font-size: .9rem; color: var(--ink2); }
.hero-facts li { display: inline-flex; align-items: center; gap: 7px; }
.hero-facts svg { width: 16px; height: 16px; fill: none; stroke: var(--good); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* the four demos: the picture, the name, one line, one button */
#demos { padding-top: 52px; }
.demos-h { font: 600 clamp(1.3rem, 3vw, 1.7rem)/1.2 var(--serif); letter-spacing: -.015em; text-align: center; margin: 0 0 .35rem; }
.demos-sub { text-align: center; color: var(--ink2); margin: 0 0 26px; }
.demo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1060px) { .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .demo-grid { grid-template-columns: minmax(0, 1fr); } .hero { padding: calc(var(--bar-h) + 28px) 0 16px; } #demos { padding-top: 30px; } }
.demo { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--grid); border-radius: var(--r-lg); overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.demo:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 2px 4px rgba(28, 26, 24, .05), 0 26px 48px -18px rgba(28, 26, 24, .32); }
.demo:focus-visible { outline-offset: 4px; border-radius: var(--r-lg); }
.demo:active { transform: translateY(-1px) scale(.995); }
.demo-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.demo h3 { font: 600 1.4rem/1.2 var(--serif); letter-spacing: -.015em; margin: 0 0 .4rem; }
.demo-body > p:not(.demo-kind) { color: var(--ink2); margin: 0 0 1.1rem; font-size: .98rem; }
.demo-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.demo-go { min-height: 44px; white-space: nowrap; flex: none; }
.demo-go svg { transition: transform var(--dur) var(--ease); }
.demo:hover .demo-go svg { transform: translateX(3px); }
.demo.soon .demo-go { background: var(--surface); border-color: var(--axis); color: var(--ink); }

/* each card shows the demo itself: a still taken from the live page (retaken with dev/card_stills.py) */
.art { aspect-ratio: 4 / 3; background: var(--surface2); border-bottom: 1px solid var(--grid); overflow: hidden; }
.art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 600ms var(--ease); }
.demo:hover .art img { transform: scale(1.035); }
.demo-kind { margin: 0 0 .3rem; font: 600 .7rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); }

/* Built with: the tools behind the four, drifting sideways; still for anyone who asks for less motion */
.tech { margin-top: 56px; }
.tech-h { margin: 0 0 16px; text-align: center; font: 600 .74rem var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.tech-track { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.tech-row { list-style: none; margin: 0; padding: 0; display: flex; flex: none; }
.tech-row li { display: inline-flex; align-items: center; gap: 10px; margin-right: 46px; white-space: nowrap; font: 600 1.02rem var(--sans); color: var(--ink); }
.tech-row img { width: 24px; height: 24px; }
@media (prefers-reduced-motion: no-preference) {
  .tech-row { animation: drift 46s linear infinite; }
  .tech-track:hover .tech-row { animation-play-state: paused; }
  @keyframes drift { to { transform: translateX(-100%); } }
}
@media (prefers-reduced-motion: reduce) {
  .tech-track { -webkit-mask-image: none; mask-image: none; justify-content: center; }
  .tech-row { flex-wrap: wrap; justify-content: center; row-gap: 12px; }
  .tech-row[aria-hidden="true"] { display: none; }
}

/* what the four share */
/* under each card: its latest measured result, which opens the tests behind it (home.js, /api/tests/<demo>) */
/* each cell spans two rows of the grid and shares them (subgrid), so the four cards end level and the four results line up */
.demo-cell { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 8px; min-width: 0; }
.demo-proof { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; width: 100%; min-height: 44px; padding: 8px 12px 8px 32px; position: relative; text-align: left; cursor: pointer;
  background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 28%, var(--grid)); border-radius: var(--r); font: 400 .82rem/1.35 var(--sans); color: var(--goodtext);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease); }
.demo-proof::before { content: ""; position: absolute; left: 12px; top: 14px; width: 11px; height: 6px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.demo-proof b { font-weight: 700; white-space: nowrap; }
.demo-proof-more { display: inline-flex; align-items: center; gap: 4px; flex: none; font: 600 .74rem var(--sans); color: var(--goodtext); white-space: nowrap; }
.demo-proof-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur) var(--ease); }
.demo-proof:hover { border-color: var(--good); }
.demo-proof:hover .demo-proof-more svg { transform: translateX(3px); }
.demo-proof:focus-visible { outline: 2px solid var(--good); outline-offset: 2px; }
.demo-proof[hidden] { display: none; }

/* the tests popup */
.tests { width: min(760px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: 1px solid var(--grid); border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); overflow: hidden; }
.tests[open] { display: flex; flex-direction: column; }
.tests::backdrop { background: rgba(20, 18, 16, .55); }
.tests-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 16px; border-bottom: 1px solid var(--grid); background: var(--surface); }
.tests-kind { margin: 0 0 2px; font: 600 .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.tests-head h2 { margin: 0; font: 600 clamp(1.15rem, 3vw, 1.45rem)/1.25 var(--serif); letter-spacing: -.01em; }
.tests-date { margin: 4px 0 0; font: 500 .74rem var(--mono); color: var(--muted); }
.tests-close { flex: none; display: flex; align-items: center; justify-content: center; padding: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--grid); background: var(--surface); color: var(--ink); cursor: pointer; }
.tests-close svg { flex: none; min-width: 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tests-close:hover { border-color: var(--accent); color: var(--accent); }
.tests-body { overflow-y: auto; padding: 16px 22px 24px; overscroll-behavior: contain; }
.tests-how { margin: 0 0 18px; color: var(--ink2); font-size: .92rem; line-height: 1.5; }
.tests-sec + .tests-sec { margin-top: 22px; }
.tests-sec h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 4px; font: 650 .98rem/1.3 var(--sans); }
.tests-count { flex: none; font: 600 .76rem var(--mono); color: var(--goodtext); }
.tests-note { margin: 0 0 10px; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.tests-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--grid); border-radius: var(--r); overflow: hidden; }
.tests-row { border-top: 1px solid var(--grid); }
.tests-row:first-child { border-top: 0; }
.tests-row.is-miss { background: var(--warn-soft); }
.tests-row summary { display: grid; grid-template-columns: 64px minmax(0, 1fr) 18px; gap: 12px; align-items: start; padding: 10px 12px; cursor: pointer; list-style: none; }
.tests-row summary::-webkit-details-marker { display: none; }
.tests-row summary:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.tests-row summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tests-row summary svg { width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur) var(--ease); }
.tests-row details[open] > summary svg { transform: rotate(90deg); }
.tests-mark { font: 600 .74rem/1.6 var(--mono); color: var(--goodtext); white-space: nowrap; }
.tests-row.is-miss .tests-mark, .tests-row.is-miss .tests-runs { color: var(--warntext); }
.tests-main { min-width: 0; }
.tests-who { display: block; font: 600 .64rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 1px; }
.tests-said { display: block; font-size: .88rem; line-height: 1.4; color: var(--ink); }
.tests-said.is-alt { color: var(--ink2); font-size: .82rem; }
.tests-runs { display: block; margin-top: 3px; font: 600 .72rem var(--mono); color: var(--goodtext); }
.tests-more { padding: 2px 14px 16px 88px; }
.tests-more h4 { margin: 12px 0 6px; font: 600 .66rem var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tests-rule { margin: 0; padding-left: 18px; font-size: .84rem; line-height: 1.5; color: var(--ink); }
.tests-rule li + li { margin-top: 2px; }
.tests-script { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--surface2); border: 1px dashed var(--grid); font-size: .82rem; line-height: 1.5; color: var(--ink2); }
.run { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--grid); border-radius: 10px; background: var(--page); }
.run.is-bad { border-color: var(--warn); }
.run-head { margin: 0 0 6px; font: 500 .74rem var(--mono); color: var(--goodtext); }
.run.is-bad .run-head { color: var(--warntext); }
.run-why { margin: 0 0 8px; padding-left: 18px; font-size: .82rem; line-height: 1.45; color: var(--warntext); }
.run-line { margin-top: 6px; }
.run-line > p { margin: 0; font-size: .84rem; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.run-line.is-bot, .run-line.is-agent, .run-line.is-shown, .run-line.is-declined { padding-left: 10px; border-left: 2px solid var(--grid); }
.run-line.is-bot > p, .run-line.is-agent > p, .run-line.is-shown > p, .run-line.is-declined > p { color: var(--ink2); }
.run-did, .run-facts { list-style: none; margin: 4px 0 0; padding: 0; font: 500 .72rem/1.5 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.run-facts { margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--grid); }
html:has(.tests[open]) { overflow: hidden; }
@media (max-width: 560px) {
  .tests { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 0; }
  .tests-head { padding: 16px 16px 12px; }
  .tests-body { padding: 14px 16px 22px; }
  .tests-row summary { grid-template-columns: 52px minmax(0, 1fr) 18px; gap: 10px; padding: 10px; }
  .tests-more { padding: 0 10px 14px; }
}
.common { margin-top: 64px; }
.common h2 { font: 600 clamp(1.3rem, 3vw, 1.7rem)/1.2 var(--serif); letter-spacing: -.015em; text-align: center; margin: 0 0 26px; }
.common-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 26px 30px; }
.common-grid svg { width: 26px; height: 26px; fill: none; stroke: var(--accent-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; display: block; }
.common-grid b { display: block; font-weight: 650; margin-bottom: .25rem; }
.common-grid span { color: var(--ink2); font-size: .95rem; }
#access { margin-top: 56px; }

@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero-cta, .hero-facts { animation: rise 600ms var(--ease) both; }
  .hero-cta { animation-delay: 120ms; } .hero-facts { animation-delay: 180ms; }
  .demo-cell { animation: rise 640ms var(--ease) both; animation-delay: 200ms; }
  .demo-cell:nth-child(2) { animation-delay: 270ms; } .demo-cell:nth-child(3) { animation-delay: 340ms; } .demo-cell:nth-child(4) { animation-delay: 410ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}

/* text pages (privacy) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.05rem; margin: 2rem 0 .5rem; }
.prose li { margin: .45rem 0; color: var(--ink2); }
.prose li b { color: var(--ink); }

/* ================= phone layout ================= */
@media (max-width: 700px) {
  .hero { padding: calc(var(--bar-h) + 14px) 0 10px; }
  .hero h1 { font-size: 2.05rem; }
  .hero-cta { margin: 1.3rem 0 1rem; }
  .hero-cta .btn { min-height: 52px; width: 100%; max-width: 340px; justify-content: center; }
  .hero-facts { gap: 4px 16px; font-size: .84rem; }
  #demos { padding-top: 26px; }
  .demos-sub { margin-bottom: 16px; font-size: .95rem; }
  /* four choices on one screen: the still shrinks to a thumbnail beside the words */
  .demo-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  /* phone: picture, words and button side by side; the test result sits under the card */
  .demo { border-radius: var(--r); display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; }
  .demo-body { display: contents; }
  .demo .art { grid-column: 1; grid-row: 1 / span 3; width: 92px; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--grid); }
  .demo .art img { object-position: left top; }
  .demo-kind { grid-column: 2; grid-row: 1; margin: 0; padding: 12px 0 .1rem 14px; font-size: .62rem; align-self: end; }
  .demo h3 { grid-column: 2; grid-row: 2; font-size: 1.14rem; margin: 0; padding: 0 0 .15rem 14px; }
  .demo-body > p:not(.demo-kind) { grid-column: 2; grid-row: 3; margin: 0; padding: 0 0 12px 14px; font-size: .86rem; line-height: 1.38; align-self: start; }
  .demo-cell { row-gap: 6px; }
  .demo-proof { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; font-size: .78rem; padding: 7px 10px 7px 30px; }
  .demo-proof::before { top: 50%; margin-top: -5px; }
  .demo-proof-more { font-size: .7rem; }
  .demo-foot { grid-column: 3; grid-row: 1 / span 3; flex-direction: column; align-items: flex-end; justify-content: center; gap: 0; margin: 0; padding: 12px 12px 12px 10px; }
  .demo-go { min-height: 44px; padding: 0 14px; }
  .tech { margin-top: 34px; }
  .tech-row li { margin-right: 32px; font-size: .94rem; }
  .common { margin-top: 40px; }
  .common h2 { margin-bottom: 18px; }
  .common-grid { gap: 16px; }
  .common-grid li { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 12px; }
  .common-grid svg { grid-row: 1 / span 2; margin: 2px 0 0; }
  .common-grid b { margin-bottom: .1rem; }
  .common-grid span { font-size: .9rem; line-height: 1.45; }
  #access { margin-top: 32px; }
  }
/* black-only logos (LiveKit, ElevenLabs) turn white on the dark page, as their own brand sheets do */
:root[data-theme="dark"] .tech-row img.mono { filter: invert(1); }
