/* Mishari.AI · The Journey. One ink (light on dark), one lane (lower left; the bottom band on phones), one accent (gold).
   Tokens and type scale: director.md v3 §4.2–4.5. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-var.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #050507;
  --ink: #F5F5F7;
  --line: #CBCBD0;
  --readout: #E8E8ED;
  --src: #AEAEB2;
  --hair: rgba(245, 245, 247, .24);
  --signal: #FFC861;
  --halo: #FFE7B0;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --type: "Courier Prime", "Courier New", Courier, monospace;
  --m: clamp(24px, 4.4vw, 80px);                 /* side margin */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease-enter: cubic-bezier(.16, 1, .3, 1);
  --ease-exit: cubic-bezier(.7, 0, .84, 0);
  --horizon: 33%;
}
@media (max-width: 599px) { :root { --horizon: 30% } }

* { box-sizing: border-box }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100% }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.5;
  font-optical-sizing: auto; font-feature-settings: "ss01" 0;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, p { margin: 0 }
h1, h2 { font-weight: 640; text-wrap: balance }
button { font: inherit; color: inherit }
a { color: inherit }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--signal); color: #1D1D1F; padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none }
.skip:focus { top: calc(12px + var(--safe-t)) }
.spark { display: inline-block; width: .3em; height: .3em; border-radius: 50%; margin: 0 .08em; vertical-align: .02em; background: var(--signal); box-shadow: 0 0 .35em var(--signal), 0 0 1em rgba(255, 200, 97, .5) }

/* ---------- canvases and overlays ---------- */
#gl, #fx { position: fixed; inset: 0; width: 100vw; height: 100lvh; display: block }
#gl { z-index: 0; background: var(--bg) }
#fx { z-index: 1; pointer-events: none }
#labels { position: fixed; inset: 0; z-index: 2; pointer-events: none }
#dip { position: fixed; inset: 0; z-index: 30; background: #000; opacity: 0; pointer-events: none; transition: opacity .17s linear }
#dip.on { opacity: 1 }
html:not(.gl) #gl, html:not(.gl) #fx, html:not(.gl) #labels { display: none }

/* ---------- loader: a blinking gold cursor ---------- */
#loader { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; justify-items: center; gap: 22px; background: var(--bg); transition: opacity .9s var(--ease-enter), visibility 0s .9s }
#loader .cursor { width: 10px; height: 10px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 12px var(--signal), 0 0 34px rgba(255, 200, 97, .55); animation: blink 1.06s steps(1) infinite }
#loader .bar { width: 160px; height: 1px; background: var(--hair); opacity: 0; transition: opacity .4s }
#loader .bar i { display: block; height: 100%; width: 0; background: var(--signal); transition: width .3s }
#loader .msg { font-size: 13px; color: var(--src); opacity: 0; transition: opacity .4s }
#loader.slow .bar, #loader.slow .msg { opacity: 1 }
html.ready #loader, html.static #loader, html.no-js #loader { opacity: 0; visibility: hidden }
@keyframes blink { 50% { opacity: 0 } }

/* ---------- top chrome ---------- */
.top {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(28px + var(--safe-t)) var(--m) 0;
  pointer-events: none;
}
.top > * { pointer-events: auto }
.wordmark { font-size: 17px; font-weight: 600; letter-spacing: -.02em; text-decoration: none; color: var(--ink); white-space: nowrap }
.wordmark .spark { width: .32em; height: .32em }
.top-actions { display: flex; gap: 8px }
.pill {
  appearance: none; border: 0; cursor: pointer; min-height: 36px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  background: rgba(20, 20, 26, .42); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  transition: background-color .2s;
}
.pill:hover { background: rgba(40, 40, 48, .55) }
html:not(.gl) #motion-btn { display: none }
@media (max-width: 599px) {
  .top { padding-top: calc(16px + var(--safe-t)) }
  .wordmark { font-size: 15px }
  #motion-btn { display: none }
}

/* ---------- readout: the year hangs off the right end of the horizon ---------- */
#readout {
  position: fixed; z-index: 10; right: var(--m); top: var(--horizon); text-shadow: 0 0 14px rgba(0, 0, 0, .65), 0 0 2px rgba(0, 0, 0, .5);
  display: grid; justify-items: end; gap: 2px; transform: translateY(-14px);
  font-variant-numeric: tabular-nums; pointer-events: none;
  transition: opacity .5s;
}
#readout::before { content: ""; position: absolute; right: calc(100% + 12px); top: 14px; width: 24px; height: 1px; background: var(--hair) }
#readout .yr { font-size: 28px; line-height: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--readout); white-space: nowrap }
#readout .nm { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--readout); opacity: .7; white-space: nowrap }
#readout .x10 { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--signal); min-height: 16px }
#readout .txt { display: inline-block; transition: opacity .25s, transform .35s var(--ease-enter) }
#readout .txt.swap { opacity: 0; transform: translateY(6px) }
html:not(.gl) #readout { display: none }
@media (max-width: 599px) {
  #readout .yr { font-size: 22px; line-height: 22px }
  #readout .nm { font-size: 12px }
  #readout::before { top: 11px; width: 16px }
}

/* ---------- progress: a hairline horizon along the bottom, the spark at its head ---------- */
#progress { position: fixed; z-index: 10; left: var(--m); right: var(--m); bottom: calc(24px + var(--safe-b)); height: 14px; pointer-events: none }
#progress .track { position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--hair) }
#progress .fill { position: absolute; left: 0; top: 7px; height: 1px; width: 0; background: rgba(255, 231, 176, .55) }
#progress .head { position: absolute; top: 4px; left: 0; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal), 0 0 20px rgba(255, 200, 97, .55) }
#progress .ticks { position: absolute; inset: 0 }
#progress .ticks i { position: absolute; top: 4px; width: 1px; height: 7px; background: var(--hair) }
html:not(.gl) #progress { display: none }

.hint { position: fixed; z-index: 9; left: 50%; bottom: calc(52px + var(--safe-b)); transform: translateX(-50%); font-size: 13px; color: var(--src); opacity: 0; transition: opacity .4s; pointer-events: none; text-align: center; max-width: 80vw }
.hint.on { opacity: 1 }

/* ---------- the words ---------- */
.rest { text-shadow: 0 0 24px rgba(0, 0, 0, .35) }
.kicker { font-size: 15px; line-height: 20px; font-weight: 600; letter-spacing: .01em; color: var(--readout); font-variant-numeric: tabular-nums }
.rest h1, .rest .display { font-size: clamp(52px, 28.8px + 5.78vw, 112px); line-height: .98; letter-spacing: -.045em; font-weight: 650 }
.rest h2 { font-size: clamp(40px, 27.6px + 3.08vw, 72px); line-height: 1.04; letter-spacing: -.034em; font-weight: 640 }
.rest .display span { display: block }
.line { font-size: clamp(19px, 16.3px + .67vw, 26px); line-height: 1.32; font-weight: 500; letter-spacing: -.012em; color: var(--line); max-width: 27em; text-wrap: pretty }
.line.big { font-size: clamp(26px, 18px + 1.6vw, 40px); line-height: 1.2; color: var(--ink); font-weight: 600; letter-spacing: -.024em }
.kicker + h1, .kicker + h2 { margin-top: 12px }
h1 + .line, h2 + .line { margin-top: 16px }
.kicker + .line { margin-top: 14px }
.wow { margin-top: 24px; display: grid; gap: 4px; color: var(--line) }
.wow b { font-size: clamp(44px, 32px + 3vw, 84px); line-height: 1; font-weight: 600; letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums }
.wow span { font-size: 17px; line-height: 1.4; font-weight: 500 }
.wow .plain { font-size: clamp(17px, 15.5px + .4vw, 21px); color: var(--ink); max-width: 26em }
.wow.chat { gap: 8px }
.wow.chat .you { font-size: 18px; color: var(--line) }
.wow.chat .eliza { font-family: var(--type); font-size: 16px; letter-spacing: .02em; color: #9BE8A5 }
.race { gap: 8px; max-width: 420px }
.race .row { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 12px; font-size: 15px; font-weight: 500; color: var(--line) }
.race .row i { display: block; height: 6px; border-radius: 3px; background: rgba(245, 245, 247, .35); width: calc(var(--w) * 100%) }
.race .row.hot { color: var(--ink) }
.race .row.hot i { background: var(--signal); box-shadow: 0 0 10px rgba(255, 200, 97, .6) }
.race .v { font-variant-numeric: tabular-nums; white-space: nowrap }
.src { margin-top: 18px; font-size: 13px; line-height: 18px; color: var(--src); max-width: 34em }
.cue { margin-top: 36px; font-size: 13px; font-weight: 500; color: var(--src); display: flex; align-items: center; gap: 10px }
.cue::before { content: ""; width: 1px; height: 28px; background: linear-gradient(var(--signal), transparent); animation: cue 1.6s var(--ease-enter) infinite }
@keyframes cue { 0% { transform: scaleY(0); transform-origin: top } 50% { transform: scaleY(1); transform-origin: top } 51% { transform-origin: bottom } 100% { transform: scaleY(0); transform-origin: bottom } }
.cue .m, .cue .s { display: none }
@media (hover: none) and (pointer: coarse) { .cue .d { display: none } .cue .m { display: inline } }
html.static .cue .d, html.static .cue .m { display: none }
html.static .cue .s { display: inline }
.q .qn { font-size: 13px; font-weight: 600; letter-spacing: .06em; color: var(--signal); font-variant-numeric: tabular-nums }
.q .question { margin-top: 14px; font-size: clamp(32px, 22.7px + 2.31vw, 56px); line-height: 1.12; font-weight: 600; letter-spacing: -.026em; text-wrap: balance; max-width: 18em }
.sig { font-size: 15px; font-weight: 500; color: var(--line) }
.contact-rest h2 { margin-top: 14px }
.contact { margin-top: 26px; position: relative }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: inherit }
.btn-email, .btn-copy { appearance: none; border: 0; cursor: pointer; min-height: 48px; padding: 0 24px; border-radius: 999px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; transition: transform .2s, box-shadow .2s, background-color .2s }
.btn-email { background: var(--signal); color: #1D1D1F; box-shadow: 0 0 0 1px rgba(255, 231, 176, .6), 0 0 30px rgba(255, 200, 97, .45) }
.btn-email:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 231, 176, .8), 0 0 44px rgba(255, 200, 97, .6) }
.btn-copy { background: rgba(245, 245, 247, .1); color: var(--ink); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3) }
.btn-copy.done { background: rgba(255, 200, 97, .2) }
.btn-copy.nudge { animation: nudge 2.4s ease }
@keyframes nudge { 0%, 100% { background: rgba(245, 245, 247, .1) } 15%, 70% { background: rgba(255, 200, 97, .3) } }
.contact-sub { margin-top: 14px; font-size: 14px; color: var(--src) }
.contact-status { position: absolute; left: 0; right: 0; margin-top: 8px; font-size: 14px; color: var(--src); opacity: 0; transition: opacity .3s }
.contact-status.show { opacity: 1 }
.contact-status.show:not(.tip) { color: var(--ink); font-family: var(--type); user-select: all }
.contact.saying .contact-sub { opacity: 0 }
.again { margin-top: 30px; font-size: 14px }
.again a { color: var(--line); text-underline-offset: 3px; text-decoration-color: var(--hair) }
.foot { margin-top: 10px; font-size: 12px; color: var(--src) }

/* ---------- WebGL mode: every rest sits in the reading lane, one at a time ---------- */
html.gl #story { position: relative; z-index: 3 }
html.gl .ch { position: relative }
html.gl .rest {
  position: fixed; z-index: 5; left: var(--m); bottom: calc(12svh + var(--safe-b)); width: min(560px, calc(100vw - 2 * var(--m)));
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .28s var(--ease-exit), transform .28s var(--ease-exit);
}
html.gl .rest.on { opacity: 1; transform: none; pointer-events: auto; transition: opacity .7s var(--ease-enter), transform .7s var(--ease-enter) }
html.gl .rest > * { transition: opacity .6s var(--ease-enter), transform .6s var(--ease-enter) }
html.gl .rest.on > :nth-child(2) { transition-delay: .09s }
html.gl .rest.on > :nth-child(3) { transition-delay: .18s }
html.gl .rest:not(.on) > * { opacity: 0; transform: translateY(10px) }
html.gl .rest.hero { width: min(680px, calc(100vw - 2 * var(--m))); bottom: calc(14svh + var(--safe-b)) }
html.gl .rest.center, html.gl .rest.q { left: 50%; width: min(980px, calc(100vw - 2 * var(--m))); transform: translate(-50%, 14px); text-align: center; display: grid; justify-items: center }
html.gl .rest.center.on, html.gl .rest.q.on { transform: translate(-50%, 0) }
html.gl .rest.q { bottom: auto; top: 44svh }
html.gl .rest.center .line { margin-inline: auto }
html.gl .rest.center .contact-actions { justify-content: center }
html.gl .rest.contact-rest { bottom: calc(10svh + var(--safe-b)) }
/* a wow replaces the line (copy §6): the second half of a rest shows it in the line's place (same grid cell) */
html.gl .rest { display: grid; grid-template-columns: minmax(0, 1fr) }
html.gl .rest > .kicker { grid-row: 1 }
html.gl .rest > h1, html.gl .rest > h2 { grid-row: 2 }
html.gl .rest > .line, html.gl .rest > .wow { grid-row: 3; grid-column: 1; align-self: start }
html.gl .rest > .src { grid-row: 4 }
html.gl .rest > .cue { grid-row: 5 }
html.gl .rest.on > .wow { opacity: 0; transform: translateY(10px); pointer-events: none }
html.gl .rest.on.alt > .wow { opacity: 1; transform: none; transition-delay: .12s }
html.gl .rest.on.alt > .line, html.gl .rest.on.alt > .src { opacity: 0; transform: translateY(-6px); transition-delay: 0s }
@media (max-width: 599px) {
  html.gl .rest { left: 24px; right: 24px; width: auto; bottom: calc(10svh + 40px + var(--safe-b)) }
  html.gl .rest.hero { bottom: calc(12svh + 40px + var(--safe-b)) }
  html.gl .rest.center, html.gl .rest.q { left: 24px; right: 24px; width: auto; transform: translateY(14px) }
  html.gl .rest.center.on, html.gl .rest.q.on { transform: none }
  html.gl .rest.q { top: 40svh }
  .kicker { font-size: 14px }
  .src { font-size: 12px; line-height: 16px }
}

/* ---------- labels pinned to things in the world ---------- */
.lbl { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); padding: 5px 9px; border-radius: 6px; font-size: 13px; line-height: 16px; font-weight: 500; color: var(--ink); background: rgba(3, 3, 10, .55); white-space: nowrap; opacity: 0; transition: opacity .4s }
.lbl.on { opacity: 1 }
.lbl.word { background: none; font-size: 15px; font-weight: 600; text-shadow: 0 0 12px rgba(0, 0, 10, .9); pointer-events: auto; cursor: default; padding: 8px 6px; transform: translate(-50%, -50%) }
.lbl.word.lit { color: var(--signal) }
@media (max-width: 599px) { .lbl.word { font-size: 13px; padding: 8px 2px } }

/* ---------- Chapters ---------- */
dialog#chapters { padding: 0; border: 0; background: transparent; color: var(--ink); max-width: none; max-height: none; margin: 0; inset: 0 0 0 auto; height: 100dvh; width: min(420px, 100vw) }
dialog#chapters::backdrop { background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px) }
#chapters .sheet { height: 100%; overflow: auto; padding: calc(24px + var(--safe-t)) 24px calc(24px + var(--safe-b)); background: rgba(14, 14, 18, .92); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); box-shadow: -1px 0 0 rgba(255, 255, 255, .12) }
#chapters header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px }
#chapters h2 { font-size: 20px; font-weight: 650; letter-spacing: -.02em }
#chapters .close { appearance: none; border: 0; background: rgba(255, 255, 255, .1); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1 }
#chapters ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px }
#chapters a { display: grid; grid-template-columns: 64px 1fr 8px; align-items: center; gap: 14px; padding: 8px; border-radius: 12px; text-decoration: none }
#chapters a:hover { background: rgba(255, 255, 255, .06) }
#chapters img { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; background: #111 }
#chapters .yr { display: block; font-size: 12px; font-weight: 600; color: var(--src); font-variant-numeric: tabular-nums }
#chapters .nm { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.015em }
#chapters a[aria-current]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal) }
@media (max-width: 599px) {
  dialog#chapters { inset: auto 0 0 0; width: 100vw; height: min(82dvh, 720px) }
  #chapters .sheet { border-radius: 24px 24px 0 0; box-shadow: 0 -1px 0 rgba(255, 255, 255, .12) }
}

/* ---------- static story (no WebGL2, ?static, or a failure): the same words over still frames ---------- */
html:not(.gl) #story { position: relative }
html:not(.gl) .ch { position: relative; isolation: isolate }
html:not(.gl) .ch::before { content: ""; position: sticky; top: 0; display: block; height: 100svh; margin-bottom: -100svh; z-index: -1; background: linear-gradient(180deg, rgba(5, 5, 7, .2), rgba(5, 5, 7, .55) 55%, rgba(5, 5, 7, .92)), var(--plate, none) center / cover no-repeat }
html:not(.gl) .rest { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--m) calc(14svh + var(--safe-b)); max-width: 760px }
html:not(.gl) .rest.center, html:not(.gl) .rest.q { max-width: none; align-items: center; text-align: center }
html:not(.gl) .rest .wow { margin-top: 20px }
html:not(.gl) .hero { padding-top: 30svh }
@media (prefers-reduced-motion: reduce) { .cue::before, #loader .cursor { animation: none } }

/* ---------- v3: the pod flies bottom-centre, so the words live in the top-left lane ---------- */
html.gl .rest { bottom: auto; top: calc(96px + var(--safe-t)) }
html.gl .rest.hero { bottom: auto; top: calc(14svh + var(--safe-t)) }
html.gl .rest.q { top: calc(20svh + var(--safe-t)) }
html.gl .rest.center { top: calc(14svh + var(--safe-t)) }
html.gl .rest.contact-rest { top: calc(12svh + var(--safe-t)); bottom: auto }
html.gl .rest .src { display: none }
@media (max-width: 599px) {
  html.gl .rest, html.gl .rest.hero { top: calc(72px + var(--safe-t)); bottom: auto }
  html.gl .rest.q, html.gl .rest.center, html.gl .rest.contact-rest { top: calc(80px + var(--safe-t)) }
  #readout { top: 52% }
}
html:not(.gl) .ch::before { background: linear-gradient(180deg, rgba(5, 5, 7, .2), rgba(5, 5, 7, .55) 55%, rgba(5, 5, 7, .92)), var(--plate, none) center / cover no-repeat }

/* ---------- v4: one push, one destination. No page scroll; the words live in 3D space ---------- */
html.gl, html.gl body { overflow: hidden; height: 100%; overscroll-behavior: none; touch-action: none }
html.gl #story { position: fixed; inset: 0; height: auto !important; z-index: 3; perspective: 900px; perspective-origin: 50% 46%; pointer-events: none; transform-style: preserve-3d }
html.gl .ch { position: static; transform-style: preserve-3d }
html.gl .rest, html.gl .rest.on { transition: none !important; will-change: transform, opacity }
html.gl .rest > *, html.gl .rest:not(.on) > * { transition: opacity .5s var(--ease-enter), transform .5s var(--ease-enter); opacity: 1; transform: none; transition-delay: 0s }
html.gl .rest:not(.on) { visibility: hidden }
html.gl .rest.on { pointer-events: auto; visibility: visible }
html.gl .rest.center, html.gl .rest.q { transform: none; left: 0; right: 0; margin-inline: auto }
html.gl .rest.center.on, html.gl .rest.q.on { transform: none }
html.gl .rest.on > .wow { opacity: 0; transform: translateY(10px) }
html.gl .rest.on.alt > .wow { opacity: 1; transform: none; transition-delay: .15s }
html.gl .rest.on.alt > .line { opacity: 0; transform: translateY(-6px) }
.cue .d::after { content: " · or press ↓" }
html.gl .rest { text-shadow: 0 2px 28px rgba(0, 0, 0, .65), 0 0 3px rgba(0, 0, 0, .45) }

/* ---------- v5: every stop is a liquid-glass card that names the milestone ---------- */
.mile { display: grid; gap: 4px; margin: 14px 0 6px }
.mile .term {
  font-size: clamp(48px, 30px + 4.4vw, 104px); line-height: .95; font-weight: 720; letter-spacing: -.045em;
  background: linear-gradient(180deg, #FFF4DC 0%, #FFC861 55%, #E8A33A 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 200, 97, .35)); padding-bottom: .04em;
}
.mile .sub { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #E8E8ED; opacity: .85 }
.mile.hero-mile { margin: 10px 0 0 }
.rest .mile + h2 { margin-top: 12px }
.rest:has(.mile) h2 { font-size: clamp(26px, 20px + 1.5vw, 42px); line-height: 1.08; letter-spacing: -.026em }
.rest:has(.mile) .line { font-size: clamp(16px, 15px + .35vw, 20px); margin-top: 10px }
.ig { display: block; width: min(260px, 100%); height: auto; margin-top: 18px; color: #FFC861; overflow: visible }
.ig .s { font: 600 13px/1 var(--sans); fill: #E8E8ED }
.ig .s.sm { font-size: 11px; fill: #CBCBD0 }
.ig .s.hi { fill: #FFC861 }
.ig .s.mono { font-family: var(--type); font-size: 11px; fill: #9BE8A5 }
.ig .t { font: 700 46px/1 var(--sans); fill: #FFC861 }
.ig .big { font: 760 54px/1 var(--sans); fill: #FFC861; letter-spacing: -.02em }
.ig .gold { color: #FFC861; stroke: #FFC861 }
.ig .dot, .ig .gold-f { fill: #FFC861; filter: drop-shadow(0 0 6px rgba(255, 200, 97, .8)) }
.ig .n { fill: #E8E8ED }
.ig .w { fill: #F5F5F7 } .ig .k { fill: #121212; stroke: #E8E8ED; stroke-width: 1 }
.ig .ring { fill: none; stroke: #E84A3A; stroke-width: 2 }
.ig .b1 { fill: rgba(255, 255, 255, .14) } .ig .b2 { fill: rgba(155, 232, 165, .16) }
.ig .grid rect { fill: rgba(255, 255, 255, .16); stroke: rgba(255, 255, 255, .35) }

/* the glass */
html.gl .rest {
  padding: clamp(20px, 2.2vw, 30px) clamp(22px, 2.4vw, 34px) clamp(22px, 2.4vw, 32px);
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04) 45%, rgba(10, 10, 16, .28));
  -webkit-backdrop-filter: blur(22px) saturate(170%) brightness(.78); backdrop-filter: blur(22px) saturate(170%) brightness(.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .14), 0 30px 80px -30px rgba(0, 0, 0, .7);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
  width: min(560px, calc(100vw - 2 * var(--m)));
  left: var(--m); top: calc(88px + var(--safe-t));
}
html.gl .rest.hero { width: min(660px, calc(100vw - 2 * var(--m))); top: calc(12svh + var(--safe-t)) }
html.gl .rest.center, html.gl .rest.q, html.gl .rest.contact-rest { width: min(860px, calc(100vw - 2 * var(--m))); left: 0; right: 0; margin-inline: auto; top: calc(12svh + var(--safe-t)) }
html.gl .rest.q { top: calc(18svh + var(--safe-t)) }
/* row order inside a card: kicker, milestone, headline, line (or its big number), picture */
html.gl .rest > .kicker { grid-row: 1 } html.gl .rest > .mile { grid-row: 2 } html.gl .rest > h1, html.gl .rest > h2 { grid-row: 3 }
html.gl .rest > .line, html.gl .rest > .wow { grid-row: 4 } html.gl .rest > .ig { grid-row: 5 } html.gl .rest > .cue { grid-row: 6 }
html.gl .rest.center > .ig, html.gl .rest.center .mile { justify-self: center }
@media (max-width: 599px) {
  html.gl .rest, html.gl .rest.hero, html.gl .rest.center, html.gl .rest.q, html.gl .rest.contact-rest { left: 16px; right: 16px; width: auto; margin: 0; top: calc(70px + var(--safe-t)); border-radius: 22px; padding: 18px 20px 20px }
  .mile .term { font-size: clamp(44px, 14vw, 64px) }
  .mile .sub { font-size: 11px; line-height: 15px }
  .rest:has(.mile) h2 { font-size: 24px }
  .ig { width: 220px; margin-top: 12px }
  #readout { top: 56% }
}
html.gl .rest.hero h1 { font-size: clamp(44px, 26px + 4.2vw, 92px) }
html.gl .rest.hero .ig { margin-top: 12px }
@media (max-width: 599px) { html.gl .rest.hero h1 { font-size: 46px } }

/* ---------- v6: one huge word, one short sentence; the year is a giant number you fly into ---------- */
html.gl #readout { display: none }
#bigyear { display: none }
html.gl #bigyear {
  display: block; position: absolute; left: 50%; top: 40%; z-index: 0; pointer-events: none; white-space: nowrap;
  font: 760 clamp(220px, 34vw, 560px)/1 var(--sans); letter-spacing: -.06em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, rgba(255, 244, 220, .95), rgba(255, 200, 97, .75) 60%, rgba(255, 170, 60, .35)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 40px rgba(255, 200, 97, .35)); will-change: transform, opacity; opacity: 0;
}
@media (max-width: 599px) { html.gl #bigyear { font-size: 46vw; top: 46% } }
.rest .big { margin: 0; font-size: clamp(54px, 32px + 4.8vw, 116px); line-height: .95; font-weight: 720; letter-spacing: -.045em;
  background: linear-gradient(180deg, #FFF4DC 0%, #FFC861 60%, #E8A33A 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .05em }
.rest h1.big { font-size: clamp(48px, 28px + 4.2vw, 96px); background: none; color: var(--ink) }
.rest .say { margin-top: 12px; font-size: clamp(20px, 16px + .9vw, 30px); line-height: 1.25; font-weight: 560; letter-spacing: -.018em; color: var(--ink); max-width: 20em; text-wrap: balance }
.rest .big + .say { margin-top: 10px }
.rest.center .say, .rest.center .big { margin-inline: auto }
.rest .chip { margin-top: 16px; display: inline-flex; align-self: start; justify-self: start; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: #1D1D1F; background: var(--signal) }
html.gl .rest > .big { grid-row: 1 } html.gl .rest > .say { grid-row: 2 } html.gl .rest > .chip, html.gl .rest > .cue { grid-row: 3 }
html.gl .rest { width: auto; max-width: min(620px, calc(100vw - 2 * var(--m))) }
@media (max-width: 599px) { .rest .big { font-size: 15vw } .rest .say { font-size: 20px } }
html.gl #bigyear { left: 72%; top: 38%; font-size: clamp(200px, 26vw, 440px) }
@media (max-width: 599px) { html.gl #bigyear { left: 50%; top: 52%; font-size: 40vw } }

/* ---------- v7: white year, a split-flap counter, lighter glass, a little more to read ---------- */
html.gl #bigyear { background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .62) 70%, rgba(255, 255, 255, .25)); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 34px rgba(255, 255, 255, .22)) }
html.gl .rest {
  background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02) 50%, rgba(10, 10, 16, .10));
  -webkit-backdrop-filter: blur(14px) saturate(150%) brightness(.9); backdrop-filter: blur(14px) saturate(150%) brightness(.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .12), 0 24px 60px -34px rgba(0, 0, 0, .55);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .55), 0 0 2px rgba(0, 0, 0, .35);
}
.rest .say { font-size: clamp(18px, 15px + .7vw, 24px); line-height: 1.38; max-width: 25em; font-weight: 520 }
@media (max-width: 599px) { .rest .say { font-size: 17px } .rest .big { font-size: 13vw } }

#flip { display: none }
html.gl #flip { display: flex; gap: 4px; position: fixed; z-index: 12; right: var(--m); bottom: calc(46px + var(--safe-b)); perspective: 300px; pointer-events: none }
#flip .cell { position: relative; width: 34px; height: 48px; font: 700 32px/48px var(--sans); color: #F5F5F7; font-variant-numeric: tabular-nums; text-align: center }
#flip .half, #flip .leaf { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; background: linear-gradient(180deg, #2a2a30, #1c1c21); border-radius: 6px 6px 0 0; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12) }
#flip .fd, #flip .back { top: 50%; border-radius: 0 0 6px 6px; background: linear-gradient(180deg, #19191d, #232328); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .5) }
#flip .fu, #flip .front { top: 0 }
#flip i { position: absolute; left: 0; right: 0; height: 48px; font-style: normal }
#flip .fd i, #flip .back i { top: -24px }
#flip .cell::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0, 0, 0, .7); z-index: 5 }
#flip .front { transform-origin: 50% 100%; z-index: 3; backface-visibility: hidden; visibility: hidden }
#flip .back { transform-origin: 50% 0; z-index: 3; backface-visibility: hidden; transform: rotateX(90deg); visibility: hidden }
#flip .cell.go .front { visibility: visible; animation: flapTop .13s ease-in forwards }
#flip .cell.go .back { visibility: visible; animation: flapBot .13s .13s ease-out forwards }
@keyframes flapTop { from { transform: rotateX(0) } to { transform: rotateX(-90deg) } }
@keyframes flapBot { from { transform: rotateX(90deg) } to { transform: rotateX(0) } }
@media (max-width: 599px) { html.gl #flip { bottom: calc(40px + var(--safe-b)); right: 16px } #flip .cell { width: 26px; height: 38px; font-size: 25px; line-height: 38px } #flip i { height: 38px } #flip .fd i, #flip .back i { top: -19px } }
html.gl #bigyear { display: none }
#flip.fast .cell.go .front { animation-duration: .055s }
#flip.fast .cell.go .back { animation-duration: .055s; animation-delay: .055s }
.rest .big { filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .55)) drop-shadow(0 0 2px rgba(0, 0, 0, .4)) }
.rest .big { background: linear-gradient(180deg, #FFFFFF 0%, #FFE7B0 45%, #FFC861 100%); -webkit-background-clip: text; background-clip: text }
html.gl .rest .big, .rest .big { text-shadow: none }

/* ---------- v9: shorter words, one connected card ---------- */
html.gl .rest {
  max-width: min(560px, calc(100vw - 2 * var(--m)));
  padding: clamp(22px, 2.4vw, 32px) clamp(24px, 2.6vw, 36px);
  background: linear-gradient(160deg, rgba(255, 255, 255, .12), rgba(20, 20, 28, .30) 60%, rgba(10, 10, 16, .38));
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
}
.rest .big + .say { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 200, 97, .45) }
.rest .say { font-size: clamp(20px, 15px + 1vw, 28px); line-height: 1.3; font-weight: 600; letter-spacing: -.02em; color: #FFFFFF; max-width: 20em }
.rest h1.big + .say { border-top: 0; padding-top: 0 }
.q .question { font-size: clamp(32px, 22px + 2.6vw, 60px); line-height: 1.1 }
@media (max-width: 599px) { .rest .say { font-size: 19px } }
.rest .big { font-size: clamp(48px, 28px + 3.6vw, 88px); overflow-wrap: anywhere } html.gl .rest { max-width: min(600px, calc(100vw - 2 * var(--m))) }

/* ---------- v10: the ending is a starfield ---------- */
#stars { position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: 1; pointer-events: none; opacity: 0; display: none }
html.gl #stars { display: block }
html.gl .rest.contact-rest { top: auto; bottom: calc(14svh + var(--safe-b)); background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none }
html.gl .rest.contact-rest .sig { opacity: .75 }
.rest h2.big.display, html.gl .rest.center .big { text-align: center }
html.gl .rest.contact-rest { top: 56svh !important; bottom: auto !important }
html.gl .rest.contact-rest { display: flex; flex-direction: column; align-items: center }
html.gl .rest.contact-rest > * { grid-row: auto }
html.ending #flip, html.ending #progress { opacity: 0; transition: opacity 1.2s }
html.gl #flip, html.gl #progress { transition: opacity .6s }

/* ---------- v11: the year under each card, plain white, with a soft dark halo so it reads over pale paper or sky ---------- */
html.gl .rest > .ry {
  position: absolute; top: 100%; right: clamp(20px, 2.6vw, 36px); margin-top: 14px; grid-row: auto;
  font-size: clamp(30px, 22px + 1.6vw, 44px); line-height: 1; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  color: #FFFFFF; text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 14px rgba(0, 0, 0, .55), 0 0 32px rgba(0, 0, 0, .4);
}
html.gl .rest.on > .ry { transition-delay: .22s }

/* ---------- v13: "Your turn" carries its two questions on one card ---------- */
.rest .qs { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: q }
.rest .qs li { counter-increment: q; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline;
  font-size: clamp(19px, 14px + 1vw, 26px); line-height: 1.28; font-weight: 600; letter-spacing: -.018em; color: #FFFFFF; text-wrap: balance }
.rest .qs li::before { content: counter(q); font-size: .72em; font-weight: 700; color: #FFC861; font-variant-numeric: tabular-nums }
html.gl .rest > .qs { grid-row: 4 }
