/* ===========================================================================
   Toto marketing site. One visual world, on purpose: the page is a day.
   Night (the 5 AM text) → dawn → the light console → night again (the recap).
   Tokens come from the product's own skin (apps/web/app/globals.css), pixel-
   sampled from the brand; the night ground is that green-black, deepened.
   =========================================================================== */
:root {
  color-scheme: light;
  --night: #0f1614;
  --night-2: #17201e;
  --night-fg: #eef4f1;
  --night-dim: #9fb0aa;
  --night-line: rgba(238, 244, 241, .12);

  --mint: #edf5f2;
  --mint-2: #e3ebe9;
  --card: #ffffff;
  --ink: #17201e;
  --ink-2: #2b3835;
  --dim: #5f6d69;
  --muted: #8b9793;

  --em: #19947a;
  --em-deep: #14705d;
  --warn: #a85f10;
  --late: #c2453a;

  --line: rgba(23, 32, 30, .10);
  --line-2: rgba(23, 32, 30, .18);

  --sans: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r: 14px;
  --rb: 12px;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 10px 30px rgba(23, 32, 30, .08);
  --shadow-lg: 0 24px 60px rgba(23, 32, 30, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--mint);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
b { font-weight: 600; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font-family: var(--sans); cursor: pointer; }
:focus-visible { outline: 2px solid var(--em); outline-offset: 3px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--ink); padding: .5rem .8rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---- type roles ---------------------------------------------------------- */
.eyebrow {
  font: 500 .78rem/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--em);
  display: flex; align-items: center; gap: .7rem;
  margin-bottom: 1.4rem;
}
.eyebrow .clock { letter-spacing: .04em; }
.eyebrow .sep { width: 22px; height: 1px; background: currentColor; opacity: .5; }
h1 { font-weight: 700; font-size: clamp(2.7rem, 6.2vw, 5.3rem); line-height: .98; letter-spacing: -.034em; }
h2 { font-weight: 700; font-size: clamp(2rem, 3.8vw, 3.2rem); line-height: 1.06; letter-spacing: -.028em; }
h3 { font-weight: 600; font-size: 1.25rem; line-height: 1.25; letter-spacing: -.015em; }
.lede { font-size: clamp(1.05rem, 1.35vw, 1.22rem); line-height: 1.6; max-width: 34em; }
.small { font-size: .92rem; color: var(--dim); }

/* ---- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 1.45rem; border-radius: var(--rb);
  font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-light { background: #fff; color: var(--ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.btn-light:hover { background: var(--mint); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #0c1211; }
.btn-ghost { font-weight: 600; text-decoration: none; padding: .4rem 0; border-bottom: 1px solid currentColor; line-height: 1; }
.btn-ghost:hover { color: var(--em); }
.quiet { text-decoration: none; font-weight: 500; opacity: .8; }
.quiet:hover { opacity: 1; }

/* ---- nav ----------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2.2rem;
  padding: .95rem var(--gutter);
  color: var(--night-fg);
  transition: background .35s var(--ease), color .35s var(--ease), box-shadow .35s;
}
.nav.solid {
  background: rgba(15, 22, 20, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--night-line);
}
.nav.light {
  background: rgba(237, 245, 242, .84);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.mark { font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; color: var(--em); text-decoration: none; }
.nav-links { display: flex; gap: 1.6rem; font-weight: 500; font-size: .95rem; }
.nav-links a { text-decoration: none; opacity: .82; }
.nav-links a:hover { opacity: 1; }
.nav-links .nav-signin { display: none; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.btn-nav { padding: .7rem 1.1rem; font-size: .92rem; background: var(--em); color: #fff; }
.btn-nav:hover { background: var(--em-deep); }
.nav.light .btn-nav { background: var(--ink); }
.nav.light .btn-nav:hover { background: #0c1211; }
.nav-menu { display: none; width: 40px; height: 40px; border: 0; background: transparent; color: inherit; border-radius: 10px; position: relative; }
.nav-menu span { position: absolute; left: 10px; right: 10px; height: 2px; background: currentColor; transition: transform .25s var(--ease), top .25s; }
.nav-menu span:first-child { top: 15px; } .nav-menu span:last-child { top: 23px; }
.nav.open .nav-menu span:first-child { top: 19px; transform: rotate(45deg); }
.nav.open .nav-menu span:last-child { top: 19px; transform: rotate(-45deg); }

@media (max-width: 760px) {
  .nav { gap: 1rem; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: .4rem var(--gutter) 1rem;
    background: var(--night-2); color: var(--night-fg);
    display: none;
  }
  .nav.light .nav-links { background: var(--mint); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: .8rem 0; border-top: 1px solid var(--night-line); font-size: 1.05rem; }
  .nav.light .nav-links a { border-color: var(--line); }
  .nav-links .nav-signin { display: block; }
  .nav-signin-d { display: none; }
  .nav-menu { display: block; }
  .btn-nav { padding: .65rem .9rem; font-size: .88rem; }
}

/* ---- hero (night) -------------------------------------------------------- */
.hero {
  background: var(--night);
  color: var(--night-fg);
  padding: clamp(7rem, 16vh, 10rem) 0 clamp(4rem, 8vh, 6rem);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(38rem 30rem at 74% 42%, rgba(25, 148, 122, .20), transparent 68%),
    radial-gradient(60rem 30rem at 10% 110%, rgba(25, 148, 122, .07), transparent 70%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero-copy h1 { max-width: 11ch; }
.hero .eyebrow { color: var(--em); }
.hero .lede { color: var(--night-fg); margin-top: 1.6rem; }
.hero .lede-sub { color: var(--night-dim); margin-top: .9rem; font-size: clamp(1rem, 1.15vw, 1.08rem); }
.hero-actions { display: flex; align-items: center; gap: 1.6rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero-note { margin-top: 3rem; font-size: .88rem; color: var(--night-dim); max-width: 36em; opacity: .85; }

/* the phone, drawn in HTML so the conversation can play */
.hero-phone { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.phone {
  width: min(350px, 100%);
  aspect-ratio: 390 / 800;
  border-radius: 46px;
  padding: 11px;
  background: #0b0f0e;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12), 0 50px 100px rgba(0, 0, 0, .6), 0 12px 30px rgba(0, 0, 0, .4);
  position: relative;
}
.screen {
  height: 100%; border-radius: 36px; overflow: hidden;
  background: var(--mint);
  color: var(--ink);
  display: flex; flex-direction: column;
  font-size: 14.5px; line-height: 1.42;
  padding: 1.05rem .8rem .9rem;
}
.ph-head { display: flex; align-items: baseline; justify-content: space-between; padding: .2rem .2rem .8rem; }
.ph-head b { font-weight: 700; font-size: 1.05rem; color: var(--em); }
.ph-head .mono { font-size: .66rem; color: var(--dim); }
.thread { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: .55rem; overflow: hidden; }
.b {
  max-width: 88%; padding: .62rem .8rem; border-radius: 16px;
  background: #fff; color: var(--ink); box-shadow: var(--shadow);
  animation: pop .5s var(--ease) both;
}
.b.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.b.wms { align-self: flex-start; border-bottom-left-radius: 6px; }
.b.typing { display: flex; gap: 5px; padding: .8rem .9rem; }
.b.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.1s infinite; }
.b.typing i:nth-child(2) { animation-delay: .18s; } .b.typing i:nth-child(3) { animation-delay: .36s; }
.plan-card { margin-top: .55rem; background: var(--mint); border-radius: 12px; padding: .6rem .7rem .55rem; }
.pc-label { font: 500 .62rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--em); margin-bottom: .35rem; }
.plan-card ul { margin: 0; padding: 0 0 0 .95rem; font-size: .8rem; line-height: 1.4; }
.plan-card li { margin: .15rem 0; }
.plan-card .more { list-style: none; margin-left: -.95rem; color: var(--dim); }
.replies { display: flex; flex-direction: column; gap: .45rem; padding-top: .7rem; }
.reply {
  width: 100%; padding: .78rem .9rem; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: 600 .95rem var(--sans);
  animation: pop .35s var(--ease) both;
  transition: transform .18s var(--ease), background .18s;
}
.reply.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.reply.tap { transform: scale(.965); background: var(--mint-2); }
.reply.primary.tap { background: #2b3835; }
.thread.fade { transition: opacity .45s; opacity: 0; }
.phone-cap { font-size: .82rem; color: var(--night-dim); text-align: center; max-width: 30em; }

@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 80%, 100% { opacity: .35; } 40% { opacity: 1; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 14ch; }
  .hero-phone { margin-top: 1rem; }
  .phone { width: min(320px, 100%); }
}

/* ---- dawn: the ground brightens as you scroll ---------------------------- */
.dawn {
  --p: 0%;
  --pt: 0%;
  background: color-mix(in oklab, var(--night), var(--mint) var(--p));
  color: color-mix(in oklab, var(--night-fg), var(--ink) var(--pt));
  padding: clamp(5rem, 13vh, 9rem) 0 clamp(4rem, 10vh, 7rem);
}
@supports not (background: color-mix(in oklab, red, blue 50%)) {
  .dawn { background: var(--mint); color: var(--ink); }
}
.dawn-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.dawn h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); }
.dawn-copy { display: grid; gap: 1.2rem; font-size: clamp(1.05rem, 1.35vw, 1.22rem); line-height: 1.6; max-width: 34em; padding-top: .6rem; opacity: .92; }
@media (max-width: 900px) { .dawn-grid { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ---- tour: steps scroll, the snap stays ---------------------------------- */
.tour { background: var(--mint); padding: clamp(3rem, 8vh, 6rem) 0 clamp(4rem, 10vh, 7rem); }
.tour-head { max-width: 30em; margin-bottom: clamp(2rem, 5vh, 4rem); }
.tour-grid { display: grid; grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; flex-direction: column; justify-content: center; min-height: 82vh; padding: 2rem 0; }
.step-text { transition: opacity .45s var(--ease); }
.step .time { font: 500 .8rem/1 var(--mono); letter-spacing: .1em; color: var(--em); }
.step h3 { font-size: clamp(1.55rem, 2.2vw, 2.05rem); font-weight: 700; letter-spacing: -.024em; line-height: 1.12; margin: .7rem 0 .9rem; }
.step p { color: var(--dim); max-width: 32em; font-size: 1.03rem; }
.step p b { color: var(--ink); }
.steps.js .step:not(.is-active) .step-text { opacity: .38; }
.step .snap { display: none; margin: 0; }

.pane { position: sticky; top: 5.2rem; height: calc(100vh - 6.6rem); min-height: 520px; }
.pane-clock { position: absolute; top: 0; right: 0; font-size: .85rem; font-weight: 500; color: var(--dim); letter-spacing: .06em; z-index: 5; }
.pane .snap {
  position: absolute; inset: 2.2rem 0 0 0; margin: 0;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(12px) scale(.985);
  transition: opacity .55s var(--ease), transform .65s var(--ease);
  pointer-events: none;
}
.pane .snap.is-active { opacity: 1; transform: none; z-index: 2; }

/* browser frame */
.snap-desk .frame {
  width: 100%; max-width: 920px;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--line-2);
}
.snap-desk .bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--mint-2); border-bottom: 1px solid var(--line); }
.snap-desk .bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(23, 32, 30, .16); }
.snap-desk .bar .url { margin-left: 8px; font: 500 .7rem var(--mono); color: var(--dim); letter-spacing: .04em; }
.img-wrap { position: relative; overflow: hidden; }
.img-wrap img { width: 100%; height: auto; }
.spot {
  position: absolute;
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%); height: calc(var(--h) * 1%);
  border-radius: 10px;
  box-shadow: 0 0 0 2px var(--em), 0 0 0 9999px rgba(23, 32, 30, .26);
  opacity: 0; transition: opacity .5s var(--ease);
}
.snap.is-active .spot, .step .snap .spot { opacity: 1; }
.pane .snap.is-active .spot { transition-delay: .45s; }

/* phone frame (real captures) */
.bezel { border-radius: 40px; padding: 9px; background: #0b0f0e; box-shadow: var(--shadow-lg), 0 0 0 1.5px rgba(23, 32, 30, .25); }
.bezel img { width: 100%; height: auto; border-radius: 31px; }
.snap-phone .frame { width: min(300px, 62%); }
.snap-two .frame { width: min(600px, 100%); display: flex; gap: 1.4rem; justify-content: center; align-items: flex-start; }
.snap-two .bezel { width: min(270px, 46%); }
.snap-two .bezel:last-child { margin-top: 2.2rem; }

@media (max-width: 900px) {
  .tour-grid { grid-template-columns: 1fr; }
  .pane { display: none; }
  /* A 1440px console squeezed into 350px is a grey rectangle. On a phone the
     frame zooms to the region the step is about, using the spotlight's own
     coordinates (--zx/--zy/--zk are set by site.js from them). */
  .img-wrap.has-zoom { aspect-ratio: 1.6; }
  .img-wrap.has-zoom img { position: absolute; max-width: none; width: calc(var(--zk) * 100%); left: calc(var(--zx) * var(--zk) * -1%); top: calc(var(--zy) * var(--zk) * -1%); }
  .img-wrap.has-zoom .spot {
    left: calc((var(--x) - var(--zx)) * var(--zk) * 1%); top: calc((var(--y) - var(--zy)) * var(--zk) * 1%);
    width: calc(var(--w) * var(--zk) * 1%); height: calc(var(--h) * var(--zk) * 1%);
    box-shadow: 0 0 0 2px var(--em), 0 0 0 9999px rgba(23, 32, 30, .14);
  }
  .step { min-height: 0; padding: 2.6rem 0; border-top: 1px solid var(--line); }
  .step:first-child { border-top: 0; }
  .steps.js .step:not(.is-active) .step-text { opacity: 1; }
  .step .snap { display: grid; place-items: center; margin-top: 1.6rem; }
  .snap-phone .frame { width: min(260px, 80%); }
  .snap-two .frame { gap: .9rem; }
  .snap-two .bezel { width: 48%; }
}

/* ---- decide: the interactive card ---------------------------------------- */
.decide { background: var(--card); padding: clamp(4rem, 10vh, 7rem) 0; }
.decide-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.decide-copy > div { display: grid; gap: 1rem; margin-top: 1.4rem; max-width: 30em; color: var(--ink-2); }
.decide-copy p b { color: var(--ink); }
.decide-demo { max-width: 620px; width: 100%; margin-left: auto; }
.dcard {
  position: relative;
  background: var(--night-2); color: #fff;
  border-radius: 20px; padding: clamp(1.4rem, 2.6vw, 2.2rem);
  box-shadow: var(--shadow-lg);
  min-height: 300px;
  display: flex; flex-direction: column; justify-content: center;
}
.dcount { position: absolute; right: 1.5rem; top: 1.35rem; font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.dbody { transition: opacity .22s var(--ease), transform .22s var(--ease); }
.dbody.swap { opacity: 0; transform: translateY(6px); }
.dtitle { font-size: clamp(1.55rem, 2.6vw, 2.3rem); font-weight: 700; letter-spacing: -.026em; line-height: 1.12; margin: .6rem 0 .6rem; padding-right: 4rem; }
.dsub { color: rgba(255, 255, 255, .74); line-height: 1.5; font-size: .98rem; }
.dbtn {
  display: block; width: 100%; margin-top: 1.6rem;
  padding: 1.05rem 1rem; border-radius: 12px; border: 0;
  background: #fff; color: var(--ink);
  font-size: 1.06rem; font-weight: 600;
  transition: transform .15s var(--ease), background .2s;
}
.dbtn:hover { background: var(--mint); }
.dbtn:active { transform: scale(.985); }
.dskip { display: block; margin: .95rem auto 0; padding: .3rem .6rem; background: none; border: 0; color: rgba(255, 255, 255, .62); font-size: .95rem; font-weight: 500; }
.dskip:hover { color: #fff; }
.dbtn.done { background: var(--em); color: #fff; }
.dnote { margin-top: 1rem; font-size: .78rem; color: var(--dim); letter-spacing: .02em; min-height: 1.4em; }
.dcard.empty .dtitle { padding-right: 0; }
@media (max-width: 900px) { .decide-grid { grid-template-columns: 1fr; } .decide-demo { margin-left: 0; } }

/* ---- two numbers --------------------------------------------------------- */
.numbers { background: var(--mint); padding: clamp(4rem, 10vh, 7rem) 0; border-top: 1px solid var(--line); }
.big {
  font-size: clamp(2.5rem, 7.2vw, 6.4rem); font-weight: 700;
  letter-spacing: -.04em; line-height: 1.02;
  font-variant-numeric: tabular-nums;
}
.big.em { color: var(--em); }
.numbers-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); margin-top: clamp(2rem, 5vh, 3.5rem); align-items: start; }
.numbers-copy { color: var(--ink-2); max-width: 30em; font-size: 1.05rem; }
.gap-label { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: .8rem; }
.gap-bar { display: flex; height: 26px; border-radius: 7px; overflow: hidden; background: var(--mint-2); }
.gap-bar span { width: var(--w); transition: width 1.1s var(--ease); min-width: 3px; }
.gap-bar span + span { border-left: 2px solid var(--mint); }
.g-res { background: var(--ink); } .g-held { background: var(--warn); } .g-staged { background: var(--em); }
.gap-legend { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; font-size: .8rem; color: var(--dim); }
.gap-legend li { display: flex; align-items: center; gap: .5rem; }
.gap-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.gap-legend b { color: var(--ink); font-weight: 500; }
@media (max-width: 900px) { .numbers-grid { grid-template-columns: 1fr; } }

/* ---- floor --------------------------------------------------------------- */
.floor { background: var(--card); padding: clamp(4rem, 10vh, 7rem) 0; }
.floor-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.floor-phones { position: relative; height: 560px; }
.floor-phones .bezel { position: absolute; width: min(255px, 58%); }
.floor-phones .back { left: 0; top: 0; opacity: .55; filter: saturate(.8); }
.floor-phones .front { left: 32%; top: 70px; }
.floor-copy h2 { max-width: 12ch; }
.floor-list { margin: 2rem 0 0; display: grid; gap: 1.2rem; max-width: 32em; }
.floor-list div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.floor-list dt { font-weight: 600; letter-spacing: -.01em; }
.floor-list dd { margin: 0; color: var(--dim); font-size: .98rem; }
@media (max-width: 900px) {
  .floor-grid { grid-template-columns: 1fr; }
  .floor-phones { height: 480px; order: 2; }
  .floor-phones .bezel { width: min(230px, 55%); }
}
@media (max-width: 520px) { .floor-list div { grid-template-columns: 1fr; gap: .25rem; } }

/* ---- night sections ------------------------------------------------------ */
.night { background: var(--night); color: var(--night-fg); }
.night .lede { color: var(--night-dim); }
.night .eyebrow { color: var(--em); }

.ledger { padding: clamp(4rem, 10vh, 7rem) 0 clamp(3rem, 8vh, 5rem); }
.ledger-head { max-width: 40em; }
.ledger-head .lede { margin-top: 1.4rem; }
.ledger-wrap { margin-top: clamp(2rem, 5vh, 3.5rem); overflow-x: auto; border-top: 1px solid var(--night-line); border-bottom: 1px solid var(--night-line); }
.ledger-table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 760px; }
.ledger-table th { text-align: left; font-weight: 500; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--night-dim); padding: .9rem .9rem .7rem 0; border-bottom: 1px solid var(--night-line); }
.ledger-table td { padding: .78rem .9rem .78rem 0; border-bottom: 1px solid var(--night-line); white-space: nowrap; color: var(--night-fg); }
.ledger-table tr:last-child td { border-bottom: 0; }
.ledger-table td:first-child { color: var(--night-dim); }
.ledger-table td:nth-child(2) { color: var(--em); }
.ledger-table .q { text-align: right; padding-right: 2rem; }
.ledger-table.play tbody tr { animation: rowin .5s var(--ease) both; animation-delay: calc(var(--i) * 140ms); }
@keyframes rowin { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.facts { list-style: none; margin: clamp(2rem, 5vh, 3.5rem) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.facts li { padding-top: 1.1rem; border-top: 1px solid var(--night-line); color: var(--night-dim); font-size: .98rem; line-height: 1.55; }
.facts li .mono { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--em); margin-bottom: .6rem; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; gap: 1.2rem; } }

.recap { padding: clamp(3rem, 8vh, 5rem) 0 clamp(4rem, 10vh, 7rem); }
.recap-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.recap-copy .lede { margin-top: 1.4rem; }
.recap-thread { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; max-width: 460px; margin-left: auto; }
.recap-thread .b { max-width: 100%; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.recap-thread .mono-body { font-family: var(--mono); font-size: .84rem; line-height: 1.55; }
.recap-cap { font-size: .72rem; color: var(--night-dim); letter-spacing: .02em; }
.again { margin-top: clamp(4rem, 10vh, 7rem); font-size: clamp(1.8rem, 4.4vw, 3.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; color: var(--night-fg); }
@media (max-width: 900px) { .recap-grid { grid-template-columns: 1fr; } .recap-thread { margin-left: 0; } }

.cta { padding: clamp(3rem, 8vh, 6rem) 0 clamp(4rem, 10vh, 7rem); border-top: 1px solid var(--night-line); }
.cta-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem; align-items: center; }
.cta .lede { margin-top: 1rem; }
.cta-actions { display: flex; align-items: center; gap: 1.6rem; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 900px) { .cta-grid { grid-template-columns: 1fr; } .cta-actions { justify-content: flex-start; } }

/* ---- the wall: a mounted screen, glowing on a dark wall ------------------ */
.wall { padding: clamp(3rem, 8vh, 6rem) 0 clamp(5rem, 12vh, 8rem); border-top: 1px solid var(--night-line); overflow: hidden; }
.wall-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.wall-copy { display: grid; gap: 1rem; color: var(--night-dim); font-size: clamp(1.02rem, 1.25vw, 1.15rem); line-height: 1.6; max-width: 34em; }
.tv { position: relative; max-width: 1040px; margin: clamp(3rem, 7vh, 5rem) auto 0; }
.tv::before {
  content: ''; position: absolute; inset: -18% -14% -10%; pointer-events: none;
  background: radial-gradient(55% 60% at 50% 42%, rgba(25, 148, 122, .22), transparent 70%);
  filter: blur(12px);
}
.tv-live { position: absolute; right: .2rem; top: -1.9rem; margin: 0; font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--night-dim); display: flex; align-items: center; gap: .55rem; }
.tv-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--em); box-shadow: 0 0 10px var(--em); animation: blink 2.2s infinite; }
.tv-frame { position: relative; background: #0b0f0e; border-radius: 10px; padding: 9px; box-shadow: 0 40px 90px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .09), inset 0 0 0 1px rgba(255, 255, 255, .04); }
.tv-screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #000; }
.tv-screen img { width: 100%; height: 100%; object-fit: cover; transition: opacity 1.2s var(--ease) .25s, transform 1.6s var(--ease) .25s; }
.js-ready .tv:not(.in) .tv-screen img { opacity: 0; transform: scale(1.012); }
.tv-mount { width: 18%; height: 9px; margin: 0 auto; background: linear-gradient(#161e1b, #0b0f0e); border-radius: 0 0 6px 6px; box-shadow: 0 18px 30px rgba(0, 0, 0, .5); }
@media (max-width: 900px) {
  .wall-head { grid-template-columns: 1fr; gap: 1.4rem; align-items: start; }
  .tv-live { position: static; margin-bottom: .7rem; justify-content: flex-end; }
}

/* ---- footer -------------------------------------------------------------- */
.foot { background: var(--night); color: var(--night-dim); border-top: 1px solid var(--night-line); padding: 1.6rem 0 2rem; font-size: .9rem; }
.foot-grid { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.foot nav { display: flex; gap: 1.4rem; margin-left: auto; }
.foot a { text-decoration: none; opacity: .85; }
.foot a:hover { opacity: 1; color: var(--night-fg); }
.foot .mono { font-size: .78rem; }

/* ---- reveals (only once JS is running; the page is readable without) ------ */
.js-ready [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .7s var(--ease); }
.js-ready [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js-ready [data-reveal] { opacity: 1; transform: none; }
  .dawn { --p: 100% !important; --pt: 100% !important; }
}
