/* OLo — a lantern at home, at night.
   Palette: midnight ink, warm lantern light, mist for "thinking", teal for "fine". */
:root {
  --night: #0D1536;
  --night-2: #111B44;
  --dusk: #18245A;
  --line: rgba(169, 184, 255, 0.16);
  --line-strong: rgba(169, 184, 255, 0.32);
  --mist: #A9B8FF;
  --mist-dim: #8492D6;
  --paper: #F2EFFF;
  --lantern: #FFB648;
  --ember: #FF7A3D;
  --ok: #63E2C6;
  --ink: #0D1536;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --px: 50vw;
  --py: 30vh;
  --glow: 0;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.25rem + 0.9vw, 2rem);
  --step-3: clamp(1.9rem, 1.5rem + 1.9vw, 3.1rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* The lantern light that follows the pointer, everywhere on the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(520px circle at var(--px) var(--py), rgba(255, 182, 72, calc(0.07 + var(--glow) * 0.08)), transparent 70%);
  transition: background 0.2s linear;
}
/* Fine grain so the dark never looks flat */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .top, .foot { position: relative; z-index: 1; }

a { color: var(--lantern); text-underline-offset: 0.18em; }
a:hover { color: #FFD08A; }
:focus-visible { outline: 2px solid var(--lantern); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--lantern); color: var(--ink); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--lantern); color: var(--ink); padding: 0.6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 1rem; }

/* ---------- top bar ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.top.scrolled {
  background: rgba(13, 21, 54, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.mark {
  display: inline-flex; align-items: center; gap: 0.06em;
  font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em;
  color: var(--paper); text-decoration: none;
}
.mark-o {
  display: inline-block; width: 0.82em; height: 0.82em; border-radius: 50%;
  border: 0.17em solid var(--lantern);
  box-shadow: 0 0 12px rgba(255, 182, 72, 0.7), inset 0 0 8px rgba(255, 122, 61, 0.6);
}
.mark-o.small { width: 0.9em; height: 0.9em; border-width: 0.16em; vertical-align: -0.12em; margin-right: 0.25em; }
.top nav { display: flex; gap: clamp(0.8rem, 2.5vw, 2rem); align-items: center; }
.top nav a { color: var(--mist); text-decoration: none; font-size: var(--step--1); }
.top nav a:hover { color: var(--paper); }
.top nav .nav-vote {
  color: var(--ink); background: var(--lantern); padding: 0.45rem 1rem; border-radius: 999px; font-weight: 700;
}
.top nav .nav-vote:hover { color: var(--ink); background: #FFC874; }
@media (max-width: 560px) { .top nav a:not(.nav-vote) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 700 var(--step-0) / 1 var(--body);
  padding: 1rem 1.5rem; border-radius: 999px; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: transform 0.15s, background 0.2s, box-shadow 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-lantern {
  background: var(--lantern); color: var(--ink);
  box-shadow: 0 0 0 0 rgba(255, 182, 72, 0.5), 0 10px 40px -10px rgba(255, 140, 50, 0.7);
}
.btn-lantern:hover { background: #FFC874; color: var(--ink); box-shadow: 0 0 0 6px rgba(255, 182, 72, 0.16), 0 10px 50px -8px rgba(255, 140, 50, 0.9); }
.btn-lantern[disabled] { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--lantern); color: var(--paper); }
.btn-ghost svg { width: 1.15em; height: 1.15em; fill: currentColor; }
.btn-ghost[aria-pressed="true"] { border-color: var(--lantern); color: var(--lantern); box-shadow: 0 0 calc(10px + var(--glow) * 40px) rgba(255, 182, 72, 0.45); }
.btn-link {
  background: none; border: 0; padding: 0.5rem 0; color: var(--mist); cursor: pointer;
  font: inherit; font-size: var(--step--1); text-decoration: underline; text-underline-offset: 0.2em;
}
.btn-link:hover { color: var(--paper); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 7rem clamp(1.25rem, 5vw, 5rem) 4rem;
  max-width: 1440px; margin: 0 auto;
}
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
.word {
  margin: 0;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(6.5rem, 19vw, 16.5rem);
  line-height: 0.82; letter-spacing: -0.05em;
  color: var(--paper);
  display: flex; align-items: baseline;
  text-shadow: 0 0 60px rgba(255, 182, 72, calc(0.08 + var(--glow) * 0.25));
}
.word-o {
  position: relative; display: inline-block;
  width: 0.8em; height: 0.745em; margin-right: 0.035em;
}
.word-o .lantern { position: absolute; left: -80%; top: -80%; width: 260%; height: 260%; pointer-events: none; }
.lede {
  position: relative; z-index: 3;
  max-width: 34ch; margin: 1.6rem 0 0;
  font-size: var(--step-1); line-height: 1.5; color: #DCD9F5;
}
.hero-actions { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }
.listen-note { margin: 0.5rem 0 0 0.2rem; font-size: 0.82rem; color: var(--mist-dim); max-width: 46ch; min-height: 1.5em; }
.listen-note.err { color: var(--ember); }

/* thought stream */
.stream {
  position: relative; margin: 0; align-self: center;
  background: linear-gradient(180deg, rgba(24, 36, 90, 0.72), rgba(17, 27, 68, 0.6));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.2rem 1.3rem 1rem;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.stream-head { display: flex; align-items: center; gap: 0.6rem; color: var(--mist); font-size: var(--step--1); padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--lantern); box-shadow: 0 0 0 0 rgba(255, 182, 72, 0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 182, 72, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 182, 72, 0); } }
.stream-body { list-style: none; margin: 0; padding: 1rem 0 0.4rem; min-height: 13rem; display: flex; flex-direction: column; gap: 0.85rem; }
.stream-body li { display: grid; grid-template-columns: 5.4rem 1fr; gap: 0.8rem; align-items: baseline; animation: rise 0.35s ease-out both; }
.stream-body .lane { font-size: 0.78rem; color: var(--mist-dim); }
.stream-body .say { min-height: 1.5em; }
.stream-body .heard .say { font-style: italic; color: var(--paper); }
.stream-body .noticed .say { color: var(--ember); }
.stream-body .thinking .say { font-family: var(--mono); font-stretch: 87.5%; font-size: 0.82rem; line-height: 1.6; color: var(--mist); }
.stream-body .doing .say { font-weight: 700; color: var(--lantern); }
.stream-body .caret::after { content: ""; display: inline-block; width: 0.5em; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: currentColor; animation: blink 0.9s steps(1) infinite; }
.stream-body.fading li { transition: opacity 0.5s; opacity: 0; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.stream figcaption { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--mist-dim); line-height: 1.5; }

/* page-load sequence (the one orchestrated moment) */
.js .word, .js .lede, .js .hero-actions, .js .stream, .js .o-hint, .js .listen-note { opacity: 0; }
.js.ready .word { animation: lightup 1.4s cubic-bezier(.2,.7,.2,1) both; }
.js.ready .lede { animation: rise 0.8s 0.55s ease-out both; }
.js.ready .hero-actions { animation: rise 0.8s 0.75s ease-out both; }
.js.ready .o-hint, .js.ready .listen-note { animation: rise 0.7s 0.4s ease-out both; }
.js.ready .stream { opacity: 1; animation: rise 0.9s 1s ease-out backwards; }
@keyframes lightup { 0% { opacity: 0; filter: blur(14px); letter-spacing: 0.02em; } 100% { opacity: 1; filter: none; letter-spacing: -0.05em; } }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 6.5rem; min-height: auto; }
  .stream-body { min-height: 14rem; }
}
@media (max-width: 560px) {
  .word { font-size: 31vw; }
  .stream-body li { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ---------- sections ---------- */
.section-h {
  font-family: var(--display); font-weight: 600; font-size: var(--step-3);
  line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 1.2rem; max-width: 20ch;
}
section { scroll-margin-top: 5rem; }

.does { max-width: 1240px; margin: 0 auto; padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 5vw, 4rem) 2rem; }
.chapter {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 6vw, 6rem);
  align-items: center; padding: clamp(2.5rem, 6vw, 5rem) 0;
  border-top: 1px solid var(--line);
}
.chapter:first-of-type { border-top: 0; }
.chapter:nth-of-type(even) .chapter-text { order: 2; }
.chapter h3 { font-family: var(--display); font-weight: 500; font-size: var(--step-2); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 1rem; }
.chapter p { margin: 0 0 1rem; max-width: 52ch; color: #D6D3F0; }
@media (max-width: 860px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter:nth-of-type(even) .chapter-text { order: 0; }
}

/* talk vignette */
.talk {
  position: relative; padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 1.2rem;
  background: radial-gradient(70% 80% at 50% 50%, rgba(255, 182, 72, 0.13), transparent 70%);
}
.bubble { max-width: 80%; padding: 0.85rem 1.1rem; border-radius: 20px; line-height: 1.45; }
.bubble.you { align-self: flex-end; background: var(--dusk); border: 1px solid var(--line); border-bottom-right-radius: 6px; }
.bubble.olo { align-self: flex-start; background: var(--lantern); color: var(--ink); font-weight: 700; border-bottom-left-radius: 6px; }
.voicebars { display: flex; align-items: center; justify-content: center; gap: 5px; height: 70px; }
.voicebars i {
  display: block; width: 5px; border-radius: 3px; background: linear-gradient(180deg, var(--lantern), var(--ember));
  height: calc(10% + var(--h, 0.3) * 90%); transition: height 0.12s ease-out;
  box-shadow: 0 0 10px rgba(255, 150, 60, 0.5);
}

/* memory vignette: a paper note in the dark */
.memory { display: flex; justify-content: center; }
.memo {
  position: relative; width: min(100%, 430px); background: var(--paper); color: var(--ink);
  border-radius: 6px 22px 22px 22px; padding: 1.4rem 1.5rem 1.2rem;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.7), 0 0 80px -20px rgba(255, 182, 72, 0.35);
  transform: rotate(-1.2deg);
}
.memo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.6rem; margin-bottom: 0.8rem; }
.memo-title { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.memo-when { font-size: 0.78rem; color: #4B5590; }
.memo-lines { list-style: none; margin: 0; padding: 0; }
.memo-lines li { padding: 0.45rem 0; border-bottom: 1px dashed rgba(13, 21, 54, 0.2); line-height: 1.4; }
.memo-change { display: grid; }
.memo-change > span { grid-area: 1 / 1; transition: opacity 0.35s, transform 0.35s; }
.memo-change .old { opacity: 0; transform: translateY(-6px); }
.memo-change .new { background: linear-gradient(transparent 55%, rgba(255, 182, 72, 0.55) 55%); }
.memo.undone .memo-change .old { opacity: 1; transform: none; }
.memo.undone .memo-change .new { opacity: 0; transform: translateY(6px); }
.memo-undo {
  margin-top: 1rem; font: 700 0.85rem/1 var(--body); background: var(--ink); color: var(--paper);
  border: 0; border-radius: 999px; padding: 0.65rem 1rem; cursor: pointer;
}
.memo-undo:hover { background: #24307A; }

/* day vignette */
.day { position: relative; padding-left: 2.4rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.35rem; }
.timeline li { position: relative; display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.8rem; align-items: baseline; }
.timeline li::before {
  content: ""; position: absolute; left: -2.4rem; top: 0.45em; width: 11px; height: 11px; margin-left: 2px;
  border-radius: 50%; background: var(--night); border: 2px solid var(--mist-dim);
}
.timeline time { font-family: var(--display); font-weight: 500; font-size: 0.95rem; color: var(--paper); }
.timeline span { color: #D6D3F0; }
.timeline li.past::before { border-color: var(--lantern); background: var(--lantern); }
.dayline {
  position: absolute; left: 8px; top: 0; height: 100%; width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, #FFD08A, var(--lantern) 35%, var(--mist-dim) 75%, #3A478F);
}
.now-dot {
  position: absolute; left: 50%; top: var(--now, 40%); width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: radial-gradient(circle, #FFF3DC 0 25%, var(--lantern) 45%, rgba(255, 122, 61, 0) 72%);
  box-shadow: 0 0 24px 6px rgba(255, 182, 72, 0.55);
  animation: breathe 3.2s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.25); } }
.now-label { margin: 1.4rem 0 0; font-size: var(--step--1); color: var(--mist-dim); }

/* watch vignette */
.watch { position: relative; }
.nerves { width: 100%; height: auto; overflow: visible; }
.nerves .links path { stroke: var(--line-strong); stroke-width: 1.5; fill: none; }
.nerves .links path.hurt { stroke: rgba(255, 122, 61, 0.7); stroke-dasharray: 4 5; }
.nerves .pulses circle { fill: var(--lantern); filter: drop-shadow(0 0 4px var(--lantern)); }
.nerves .node circle { fill: var(--night); stroke: var(--ok); stroke-width: 2.5; transition: stroke 0.4s, fill 0.4s; }
.nerves .node text, .nerves .core text { fill: var(--mist); font: 500 11px var(--body); text-anchor: middle; }
.nerves .node.hurt circle { stroke: var(--ember); fill: rgba(255, 122, 61, 0.25); animation: alarm 0.9s ease-in-out infinite; }
.nerves .node.healed circle { stroke: var(--lantern); fill: rgba(255, 182, 72, 0.3); }
.nerves .node.hurt text { fill: var(--ember); }
@keyframes alarm { 50% { fill: rgba(255, 122, 61, 0.6); } }
.nerves .core circle { fill: var(--lantern); filter: drop-shadow(0 0 14px rgba(255, 182, 72, 0.8)); }
.nerves .core text { fill: var(--ink); font: 800 12px var(--display); }
.chapter .watch-log {
  margin: 0.5rem auto 0; width: fit-content; max-width: 100%; text-align: center;
  font-family: var(--mono); font-stretch: 87.5%; font-size: 0.8rem; color: var(--ok);
  padding: 0.5rem 0.9rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(17, 27, 68, 0.6);
  transition: color 0.3s;
}
.watch-log.hurt { color: var(--ember); }
.watch-log.healed { color: var(--lantern); }

/* ---------- asks ---------- */
.asks {
  position: relative; margin: clamp(2rem, 6vw, 5rem) 0;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 5vw, 4rem);
  background:
    radial-gradient(60% 90% at 85% 50%, rgba(255, 182, 72, 0.12), transparent 70%),
    linear-gradient(180deg, var(--night-2), var(--dusk) 50%, var(--night-2));
  border-block: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: clamp(2rem, 6vw, 6rem);
  align-items: center; justify-content: center;
}
.asks-text { max-width: 600px; justify-self: end; }
.asks-text p { color: #D6D3F0; max-width: 52ch; }
.asks .aside { color: var(--mist); font-size: var(--step--1); }
.proposal {
  position: relative; background: var(--night); border: 1px solid var(--line-strong); border-radius: 24px; padding: 1.4rem;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.proposal-title { margin: 0 0 0.7rem; font-family: var(--display); font-weight: 600; font-size: 1rem; }
.proposal-steps { margin: 0 0 1.2rem; padding-left: 1.2rem; color: #D6D3F0; font-size: 0.95rem; }
.proposal-steps li { margin: 0.25rem 0; }
.pin-dots { display: flex; justify-content: center; gap: 0.8rem; margin-bottom: 1rem; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--mist-dim); transition: background 0.15s, border-color 0.15s, transform 0.15s; }
.pin-dots i.on { background: var(--lantern); border-color: var(--lantern); transform: scale(1.1); box-shadow: 0 0 10px rgba(255, 182, 72, 0.7); }
.pin-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
.pin-keys button {
  font: 600 1.2rem/1 var(--display); color: var(--paper);
  background: linear-gradient(180deg, #26357F, var(--dusk) 70%);
  border: 1px solid rgba(169, 184, 255, 0.22); border-radius: 14px; padding: 0.85rem 0; cursor: pointer;
  box-shadow: 0 5px 0 #0A1130, 0 9px 18px -6px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.08s, box-shadow 0.08s, border-color 0.15s, background 0.15s;
}
.pin-keys button:hover { border-color: var(--lantern); }
.pin-keys button:active, .pin-keys button.down {
  transform: translateY(4px); background: linear-gradient(180deg, #2E3E92, #22307A);
  box-shadow: 0 1px 0 #0A1130, 0 2px 6px -2px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 18px rgba(255, 182, 72, 0.35);
}
.pin-keys .pin-clear, .pin-keys .pin-no { font: 700 0.8rem/1 var(--body); color: var(--mist); }
.proposal-status { margin: 1rem 0 0; text-align: center; font-size: 0.9rem; color: var(--mist); min-height: 1.5em; }
.proposal.approved { border-color: var(--ok); box-shadow: 0 0 60px -10px rgba(99, 226, 198, 0.35); }
.proposal.approved .proposal-status { color: var(--ok); font-weight: 700; }
.proposal.declined .proposal-status { color: var(--ember); }
.proposal.working .proposal-status { color: var(--lantern); }
.proposal.shake { animation: shake 0.35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (max-width: 860px) {
  .asks { grid-template-columns: 1fr; }
  .asks-text { justify-self: start; }
}

/* ---------- more ---------- */
.more { max-width: 1240px; margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 5vw, 4rem); }
.more-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.4rem clamp(1.5rem, 4vw, 3.5rem); margin: 2rem 0 0; }
.more-list div { border-top: 2px solid var(--lantern); padding-top: 1rem; }
.more-list dt { font-family: var(--display); font-weight: 500; font-size: 1.05rem; margin-bottom: 0.5rem; }
.more-list dd { margin: 0; color: #C9C6E8; font-size: 0.98rem; }
@media (max-width: 900px) { .more-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .more-list { grid-template-columns: 1fr; } }

/* ---------- vote ---------- */
.vote {
  position: relative; max-width: 1040px; margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem);
}
.vote::before {
  content: ""; position: absolute; left: 50%; top: 0; width: min(900px, 100vw); height: 420px; transform: translateX(-50%);
  background: radial-gradient(50% 60% at 50% 0%, rgba(255, 182, 72, 0.16), transparent 70%); pointer-events: none; z-index: -1;
}
.vote-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 400px); gap: 2rem 3rem; align-items: center; margin-bottom: 2.5rem; }
.vote-intro p { color: #D6D3F0; max-width: 56ch; margin: 0 0 1rem; }
.vote-intro .sphere-hint { color: var(--mist-dim); font-size: var(--step--1); }
@media (max-width: 860px) { .vote-intro { grid-template-columns: 1fr; } .sphere { justify-self: center; width: min(100%, 360px); } }
.survey { display: flex; flex-direction: column; gap: 2.2rem; }
.q { border: 0; margin: 0; padding: 0; min-width: 0; }
.q legend, .q-label { display: block; font-family: var(--display); font-weight: 500; font-size: var(--step-1); line-height: 1.3; margin-bottom: 1rem; padding: 0; }
.q-count { margin: -0.4rem 0 1rem; font-size: var(--step--1); color: var(--mist); }
.opt { font-family: var(--body); font-weight: 400; font-size: 0.85rem; color: var(--mist-dim); margin-left: 0.4rem; }
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chips label, .pills label { position: relative; cursor: pointer; }
.chips input, .pills input, .consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span, .pills span {
  display: flex; align-items: center; gap: 0.7rem; height: 100%;
  padding: 0.85rem 1rem; border-radius: 16px; border: 1px solid var(--line-strong);
  background: rgba(17, 27, 68, 0.55); color: var(--paper); line-height: 1.35;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.2s;
}
.pills span { border-radius: 999px; padding: 0.7rem 1.1rem; }
.chips span::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--mist-dim);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.chips label:hover span, .pills label:hover span { border-color: var(--lantern); }
.chips input:checked + span { border-color: var(--lantern); background: rgba(255, 182, 72, 0.14); box-shadow: 0 0 30px -8px rgba(255, 182, 72, 0.5); }
.chips input:checked + span::before { background: var(--lantern); border-color: var(--lantern); box-shadow: 0 0 10px rgba(255, 182, 72, 0.9); }
.pills input:checked + span { background: var(--lantern); border-color: var(--lantern); color: var(--ink); font-weight: 700; }
.chips input:disabled + span { opacity: 0.4; cursor: not-allowed; }
.chips input:focus-visible + span, .pills input:focus-visible + span, .consent input:focus-visible + span::before { outline: 2px solid var(--lantern); outline-offset: 3px; }
@media (max-width: 680px) { .chips { grid-template-columns: 1fr; } }

textarea, input[type="email"], input[type="text"] {
  width: 100%; font: inherit; color: var(--paper); background: rgba(17, 27, 68, 0.7);
  border: 1px solid var(--line-strong); border-radius: 16px; padding: 0.9rem 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 6rem; }
textarea::placeholder, input::placeholder { color: #6D79B8; }
textarea:focus, input[type="email"]:focus { outline: none; border-color: var(--lantern); box-shadow: 0 0 0 4px rgba(255, 182, 72, 0.15); }
.q-email input[type="email"] { max-width: 28rem; }
.consent { display: flex; position: relative; margin-top: 0.9rem; cursor: pointer; max-width: 40rem; }
.consent span { display: flex; gap: 0.7rem; align-items: flex-start; color: #D6D3F0; font-size: 0.95rem; }
.consent span::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 0.1em; border-radius: 6px; border: 2px solid var(--mist-dim);
  transition: background 0.15s, border-color 0.15s;
}
.consent input:checked + span::before {
  background: var(--lantern) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%230D1536' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
  border-color: var(--lantern);
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; color: var(--ember); font-weight: 700; min-height: 0; }
.form-error:empty { display: none; }
.form-actions { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; }
.privacy { margin: 0; font-size: 0.82rem; color: var(--mist-dim); max-width: 70ch; line-height: 1.55; }
.privacy a { color: var(--mist); }

/* results */
.results { margin-top: 1rem; }
.results-head { font-family: var(--display); font-weight: 600; font-size: var(--step-2); margin: 0 0 1.4rem; outline: none; }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem; gap: 0.4rem 1rem; align-items: center; }
.bars .label { grid-column: 1 / -1; display: flex; gap: 0.6rem; align-items: baseline; color: #DCD9F5; font-size: 0.97rem; line-height: 1.35; }
.bars .mine .label { color: var(--paper); font-weight: 700; }
.bars .mine .label::after { content: "your pick"; font-size: 0.72rem; font-weight: 700; color: var(--ink); background: var(--lantern); border-radius: 999px; padding: 0.1rem 0.5rem; white-space: nowrap; }
.bars .track { height: 12px; border-radius: 999px; background: rgba(169, 184, 255, 0.12); overflow: hidden; }
.bars .fill {
  display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--mist-dim), var(--mist));
  transition: width 1.1s cubic-bezier(.2,.7,.2,1);
}
.bars .mine .fill { background: linear-gradient(90deg, var(--ember), var(--lantern)); box-shadow: 0 0 14px rgba(255, 182, 72, 0.6); }
.bars .num { font-family: var(--display); font-weight: 500; font-size: 0.9rem; text-align: right; color: var(--mist); }
.results-foot { margin: 1.6rem 0 0; color: var(--mist); }

/* ---------- footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem;
  padding: 2.5rem clamp(1.25rem, 5vw, 4rem); border-top: 1px solid var(--line);
  color: var(--mist-dim); font-size: var(--step--1);
}
.foot p { margin: 0; }
.foot a { color: var(--mist); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .word, .js .lede, .js .hero-actions, .js .stream, .js .o-hint, .js .listen-note { opacity: 1; }
  .tilt { transform: none !important; }
}

/* ---------- listening: the O is the button ---------- */
.o-mic {
  position: absolute; inset: -6%; border-radius: 50%; border: 0; padding: 0; margin: 0;
  background: transparent; cursor: pointer; z-index: 2;
}
.o-hint {
  position: relative; z-index: 3;
  display: inline-flex; align-items: center; gap: 0.65rem; margin-top: 1.6rem;
  font: 700 0.95rem/1 var(--body); color: var(--paper);
  background: rgba(24, 36, 90, 0.6); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.45rem 1rem 0.45rem 0.45rem; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
}
.o-hint:hover { border-color: var(--lantern); }
.o-hint-mic {
  position: relative; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--lantern); color: var(--ink);
}
.o-hint-mic svg { width: 1.05rem; height: 1.05rem; fill: currentColor; }
.o-hint-mic::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--lantern);
  opacity: 0; animation: ping 2.4s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(0.8); opacity: 0.8; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.o-hint[aria-pressed="true"] {
  border-color: var(--lantern); color: var(--lantern);
  box-shadow: 0 0 calc(12px + var(--glow) * 50px) rgba(255, 182, 72, 0.5);
}
.o-hint[aria-pressed="true"] .o-hint-mic { background: var(--ember); color: var(--paper); }
.o-hint[aria-pressed="true"] .o-hint-mic::after { border-color: var(--ember); animation-duration: 1.1s; }
.stream .meter { display: inline-flex; gap: 3px; align-items: center; height: 1.3em; margin-right: 0.6rem; vertical-align: middle; }
.stream .meter i { display: block; width: 4px; border-radius: 2px; height: calc(15% + var(--h, 0.1) * 85%); background: var(--lantern); transition: height 0.08s; }
.stream-body li.listening .say { color: var(--paper); font-style: normal; }

/* ---------- 3D tilt with glare ---------- */
.tilt {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.45s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.tilt.moving { transition: transform 0.1s linear; }
.memo.tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(-1.2deg); }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.16), transparent 45%);
  opacity: 0; transition: opacity 0.3s;
}
.tilt.moving::after { opacity: 1; }
.memo.tilt::after { background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 182, 72, 0.25), transparent 50%); }

/* ---------- watch: 3D network ---------- */
.nerves { cursor: grab; touch-action: pan-y; }
.nerves.dragging { cursor: grabbing; }
.chapter .drag-hint { margin: 0.6rem 0 0; text-align: center; font-size: 0.78rem; color: var(--mist-dim); }
@media (hover: none) { .drag-hint { display: none; } }

/* ---------- vote: the idea globe ---------- */
.sphere { position: relative; width: 100%; aspect-ratio: 1; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.sphere.dragging { cursor: grabbing; }
.sphere canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sphere .tag {
  position: absolute; left: 50%; top: 50%; white-space: nowrap;
  font: 700 0.82rem/1 var(--body); color: var(--paper);
  background: rgba(24, 36, 90, 0.82); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.42rem 0.8rem; cursor: pointer; will-change: transform, opacity;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.sphere .tag:hover { border-color: var(--lantern); }
.sphere .tag.picked { background: var(--lantern); color: var(--ink); border-color: var(--lantern); box-shadow: 0 0 22px rgba(255, 182, 72, 0.7); }
.sphere .tag .pct { margin-left: 0.4rem; font-weight: 400; opacity: 0.8; }
.sphere .tag.nope { animation: shake 0.35s; }
@media (max-width: 560px) {
  .sphere .tag { font-size: 0.7rem; padding: 0.32rem 0.6rem; }
  .vote-intro { gap: 0.5rem; }
}

/* ---------- WebGL layer (scene.js adds .gl to <html> when it runs) ---------- */
.space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; display: none; }
.gl .space { display: block; }
.gl .dust, .gl .word-o .lantern { display: none; }
.gl .asks {
  background:
    radial-gradient(60% 90% at 85% 50%, rgba(255, 182, 72, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(10, 17, 48, 0.35), rgba(24, 36, 90, 0.55) 50%, rgba(10, 17, 48, 0.35));
}

/* the house */
.home3d { position: relative; max-width: 1240px; margin: 0 auto; padding: clamp(4rem, 9vw, 8rem) clamp(1.25rem, 5vw, 4rem); }
.home-copy { max-width: 30rem; }
.home-copy p { color: #D6D3F0; margin: 0 0 1rem; }
.home-hint { display: none; color: var(--mist-dim); font-size: var(--step--1); }
.home-still { display: block; width: 100%; max-width: 760px; height: auto; margin-top: 2rem; border-radius: 24px; border: 1px solid var(--line); }
.gl .home3d { min-height: 260vh; }
.gl .home-copy { position: sticky; top: 24vh; }
.gl .home-hint { display: block; }
.gl .home-still { display: none; }
@media (max-width: 760px) {
  .gl .home3d { min-height: 230vh; padding-top: 3rem; }
  .gl .home-copy { top: 4.8rem; padding: 1.2rem 1.2rem 0.3rem; background: rgba(13, 21, 54, 0.8); border: 1px solid var(--line); border-radius: 20px; }
}

/* labels that follow the devices in the house */
.tags3d { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.tag3d {
  position: absolute; left: 0; top: 0; translate: -50% -100%;
  display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap;
  font: 700 0.74rem/1 var(--body); letter-spacing: 0.01em; color: var(--paper);
  padding: 0.4rem 0.7rem; border-radius: 999px;
  background: rgba(13, 21, 54, 0.78); border: 1px solid var(--line-strong);
  opacity: 0; transition: opacity 0.35s;
}
.tag3d::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mist-dim); transition: background 0.3s, box-shadow 0.3s; }
.tag3d.on { opacity: 1; }
.tag3d.ok::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.tag3d.hurt { color: #FFD3BF; border-color: rgba(255, 122, 61, 0.6); }
.tag3d.hurt::before { background: var(--ember); box-shadow: 0 0 10px var(--ember); }
.tag3d.core { color: var(--ink); background: var(--lantern); border-color: transparent; }
.tag3d.core::before { background: var(--ink); }
