/* Liminal: deep black, editorial type, a living background (aurora, a slow kaleidoscope, pulses, waves).
   Calm by design: every motion is slow, and Still mode (or the system's reduce-motion setting) stops it all. */
:root {
  --bg: #07070a; --ink: #e9f2ef; --soft: #b7c6c1; --mute: #9eb0aa; --line: #1e2422; --line2: #2e3835; --panel: rgba(7, 7, 10, 0.74);
  --mint: #3fd9a8; --ice: #9af2ff; --violet: #c7a3ff; --rose: #ffb3d9; --sand: #ffe7a3; --accent: var(--mint);
  --sans: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif; --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); } a:hover { color: #fff; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }

/* ---------------------------------------------------------------- the living background */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora { position: absolute; left: 0; right: 0; top: -140px; height: 460px; opacity: 0.8; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(60px); mix-blend-mode: screen; animation: aur 24s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { left: 2%; top: 110px; width: 60%; height: 150px; background: linear-gradient(90deg, rgba(63,217,168,0), rgba(63,217,168,.45), rgba(124,203,234,.32), rgba(63,217,168,0)); }
.aurora i:nth-child(2) { left: 34%; top: 170px; width: 56%; height: 120px; animation-duration: 31s; animation-delay: -9s; background: linear-gradient(90deg, rgba(160,140,255,0), rgba(160,140,255,.38), rgba(124,203,234,.28), rgba(160,140,255,0)); }
.aurora i:nth-child(3) { left: 58%; top: 80px; width: 40%; height: 110px; animation-duration: 37s; animation-delay: -17s; background: linear-gradient(90deg, rgba(255,180,120,0), rgba(255,180,120,.25), rgba(63,217,168,.22), rgba(255,180,120,0)); }
@keyframes aur { 0% { transform: translateX(-80px) skewX(-16deg); } 50% { transform: translateX(60px) skewX(10deg) scaleY(1.3); } 100% { transform: translateX(120px) skewX(-6deg) scaleY(.85); } }
.pulses { position: absolute; inset: 0; width: 100%; height: 100%; }
.pulses .p { stroke-dasharray: 4 460; animation: travel 7s linear infinite; }
.pulses .p.b { animation-duration: 9s; animation-delay: -3s; }
@keyframes travel { from { stroke-dashoffset: 464; } to { stroke-dashoffset: 0; } }
.kaleido { position: absolute; left: 50%; top: 52%; width: min(820px, 120vw); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: 0.42; }
.kaleido .k1 { animation: spin 90s linear infinite; transform-origin: 400px 400px; }
.kaleido .k2 { animation: spin 130s linear infinite reverse; transform-origin: 400px 400px; }
.kaleido .k3 { animation: spin 60s linear infinite; transform-origin: 400px 400px; }
.kaleido .hue { animation: hue 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes hue { to { filter: hue-rotate(360deg); } }
.waves { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; overflow: hidden; }
.waves svg { position: absolute; width: 2400px; height: 80px; animation: wave 18s linear infinite; }
.waves svg + svg { left: -200px; bottom: 12px; animation-duration: 27s; animation-direction: reverse; }
.waves svg:first-child { left: 0; bottom: 34px; }
@keyframes wave { to { transform: translateX(-400px); } }
.grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.07; mix-blend-mode: overlay; }
.still .sky *, .still .anim, .still .anim * { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .sky *, .anim, .anim * { animation: none !important; } }

/* ---------------------------------------------------------------- frame */
.wrap { position: relative; z-index: 1; max-width: 1340px; margin: 0 auto; padding: 28px 40px 48px; min-height: 100vh; display: flex; flex-direction: column; gap: 18px; }
header.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand b { font-size: 24px; font-weight: 500; letter-spacing: -0.04em; }
nav.main { display: flex; flex-wrap: wrap; gap: 28px; }
nav.main a { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--mute); padding-bottom: 3px; }
nav.main a[aria-current="page"] { color: #fff; border-bottom: 1px solid #fff; }
.tools { display: flex; align-items: center; gap: 14px; }
.link { background: none; border: none; padding: 10px 4px; min-height: 44px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.link[aria-pressed="true"] { color: var(--ice); }

/* ---------------------------------------------------------------- the stage: one question at a time */
main { flex: 1; display: flex; flex-direction: column; gap: 18px; }
.stage { position: relative; min-height: 540px; display: flex; align-items: center; justify-content: center; }
.center { position: relative; z-index: 2; width: min(680px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.kicker { display: flex; align-items: center; gap: 14px; }
.kicker .num { color: var(--ink); }
.kicker .rule { width: 40px; height: 1px; background: var(--line2); }
h1.q { margin: 0; font-size: clamp(38px, 5.4vw, 66px); line-height: 1.0; font-weight: 200; letter-spacing: -0.045em; text-wrap: balance; text-shadow: 0 0 40px rgba(63,217,168,0.25); }
.why { margin: 0; max-width: 560px; font-size: 18px; font-weight: 300; color: var(--soft); }
.why-toggle { background: none; border: none; color: var(--mute); font-size: 15px; text-decoration: underline; text-underline-offset: 4px; min-height: 40px; }

/* stars: up to six answers placed around the question, joined to it as you pick them */
.stars { position: absolute; inset: 0; z-index: 1; }
.stars svg.links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.stars .link-line { stroke-dasharray: 6 8; animation: flow 3s linear infinite; fill: none; stroke-width: 1.3; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.star { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px; border: none; background: none; color: var(--soft); min-width: 44px; min-height: 44px; }
.star .dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid rgba(233,242,239,0.7); transition: all .3s ease; }
.star .lbl { font-size: 18px; font-weight: 300; }
.star[aria-pressed="true"] { color: var(--ink); }
.star[aria-pressed="true"] .lbl { font-weight: 500; }
.star[aria-pressed="true"] .dot { width: 18px; height: 18px; border: none; background: #fff; box-shadow: 0 0 0 6px rgba(233,242,239,0.08), 0 0 28px 6px var(--glow, rgba(63,217,168,0.55)); animation: twinkle 3.6s ease-in-out infinite; }
@keyframes twinkle { 50% { box-shadow: 0 0 0 6px rgba(233,242,239,0.06), 0 0 36px 10px var(--glow, rgba(63,217,168,0.6)); } }
.star.nosay { color: var(--mute); }
.star.nosay .dot { display: none; }
.star.nosay .lbl { font-size: 15px; text-decoration: underline; text-underline-offset: 4px; }

/* rows: Spectra's numbered list, for picking one or several */
.rows { width: min(640px, 100%); border-top: 1px solid var(--line); text-align: left; }
.row { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 68px; padding: 8px 12px; border: none; border-bottom: 1px solid var(--line); background: none; text-align: left; position: relative; transition: background .25s ease; }
.row:hover { background: rgba(255,255,255,0.03); }
.row .n { font-family: var(--mono); font-size: 12.5px; color: var(--mute); }
.row .t { font-size: 21px; font-weight: 300; letter-spacing: -0.015em; }
.row .h { display: block; font-size: 14px; color: var(--mute); }
.row .tick { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line2); display: grid; place-items: center; }
.row[aria-pressed="true"] .tick, .row[aria-checked="true"] .tick { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 14px rgba(63,217,168,0.5); }
.row[aria-pressed="true"]::before, .row[aria-checked="true"]::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; background: linear-gradient(180deg, var(--ice), var(--violet), var(--rose)); }
.rows.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }

/* scale: one row per thing, four answers each */
.scale { width: min(760px, 100%); text-align: left; border-top: 1px solid var(--line); }
.scale-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.scale-row .t { font-size: 18px; font-weight: 400; }
.scale-row .h { display: block; font-size: 13px; color: var(--mute); }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.seg button { border: none; background: none; border-radius: 999px; padding: 0 12px; min-height: 36px; font-size: 13.5px; color: var(--soft); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 600; }
.seg button[aria-pressed="true"].no { background: #3a2e33; color: #ffd0dc; }

/* mixer: Glowmind's faders */
.mixer { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; width: min(560px, 100%); padding: 22px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); backdrop-filter: blur(18px); }
.fader { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fader output { font-family: var(--mono); font-size: 18px; color: var(--ink); }
.fader input { writing-mode: vertical-lr; direction: rtl; height: 200px; width: 32px; accent-color: var(--accent); }
.fader label { font-size: 14px; color: var(--soft); }

/* text */
.answer-text { width: min(620px, 100%); background: transparent; border: none; border-bottom: 1px solid var(--line2); color: var(--ink); font: inherit; font-size: 24px; font-weight: 300; padding: 12px 4px; text-align: center; }
.answer-text:focus { outline: none; border-bottom-color: var(--ice); }
.answer-text::placeholder { color: #66746f; }

/* ---------------------------------------------------------------- the console along the bottom */
.console { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); border: 1px solid var(--line); border-radius: 4px; background: var(--panel); backdrop-filter: blur(18px); }
.console > section { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; border-right: 1px solid var(--line); min-width: 0; }
.console > section:last-child { border-right: none; }
.console h2 { margin: 0; }
.console .head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.live { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: #7ff0c8; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); animation: led 2.4s ease-in-out infinite; }
@keyframes led { 50% { opacity: .4; } }
.minimix { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; }
.mm { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); background: none; border: none; padding: 0; }
.mm .track { position: relative; width: 10px; height: 110px; border-radius: 5px; background: #121816; }
.mm .fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 5px; transition: height .6s ease; }
.mm .cap { position: absolute; left: -9px; width: 28px; height: 14px; border-radius: 4px; background: #f2fffa; transition: bottom .6s ease; }
.pattern { display: flex; align-items: center; gap: 18px; }
.pattern svg { flex: none; width: 96px; height: 96px; }
.pattern b { display: block; font-size: 22px; font-weight: 400; letter-spacing: -0.02em; }
.pattern span { font-size: 15px; color: var(--soft); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { min-height: 52px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; font-weight: 500; }
.btn.go { flex: 1; border: none; background: linear-gradient(135deg, #f2fffa, var(--ice) 50%, var(--violet)); color: var(--bg); font-size: 16px; font-weight: 600; box-shadow: 0 0 36px rgba(154,242,255,0.35); }
.btn.go:disabled { opacity: .5; cursor: default; }
.feed { display: flex; flex-direction: column; }
.feed article { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.feed article:last-child { border-bottom: none; }
.feed .t { font-size: 17px; }
.feed .s { display: block; font-size: 13px; color: var(--mute); }
.feed .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.eq { height: 22px; display: flex; align-items: flex-end; gap: 3px; }
.eq i { display: block; width: 3px; border-radius: 2px; background: currentColor; animation: eq 1.2s ease-in-out infinite; transform-origin: bottom; }
.eq i:nth-child(2) { animation-delay: -.4s; } .eq i:nth-child(3) { animation-delay: -.8s; } .eq i:nth-child(4) { animation-delay: -.2s; }
@keyframes eq { 50% { transform: scaleY(.3); } }
.empty { color: var(--mute); font-size: 15px; }

/* ---------------------------------------------------------------- results */
.results { display: flex; flex-direction: column; gap: 28px; padding-top: 18px; }
.res-head { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.res-head svg { width: 220px; height: 220px; flex: none; }
.res-head h1 { margin: 0 0 10px; font-size: clamp(36px, 4.6vw, 58px); font-weight: 200; letter-spacing: -0.045em; line-height: 1.02; }
.res-head p { margin: 0; max-width: 620px; font-size: 18px; font-weight: 300; color: var(--soft); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card { padding: 22px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; background: rgba(7,7,10,0.55); }
.cover { position: relative; height: 230px; margin: -22px -24px 8px; overflow: hidden; background: radial-gradient(120% 90% at 50% 0%, #15151f, #09090d); border-bottom: 1px solid var(--line); isolation: isolate; }
.cover .art { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .6s ease; }
.cover .art svg { width: 210px; height: 210px; opacity: .8; }
.cover img { position: absolute; opacity: 0; transition: opacity .6s ease; }
.cover.loaded img { opacity: 1; }
.cover.loaded .art { opacity: 0; }
.cover .bg { inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(30px) saturate(1.35) brightness(.5); z-index: 0; }
.cover .fg { left: 50%; top: 50%; transform: translate(-50%, -50%); height: 86%; max-width: 90%; object-fit: contain; border-radius: 6px; box-shadow: 0 18px 44px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06); z-index: 1; }
.cover.square .fg { aspect-ratio: 1; }
.cover.wide .fg { inset: 0; left: 0; top: 0; transform: none; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; box-shadow: none; }
.cover.wide::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(7,7,10,.7)); z-index: 2; pointer-events: none; }
.thumb { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.thumb.loaded img { opacity: 1; }
.thumb.loaded .eq { visibility: hidden; }
.card .t { font-size: 22px; font-weight: 400; letter-spacing: -0.02em; }
.card .why { font-size: 15.5px; text-align: left; }
.card .meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line2); color: var(--soft); }
.chip.note { border-color: #4a3540; color: #ffc9d9; }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.find { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); text-decoration: none; font-size: 14px; color: var(--ice); }
.find:hover { border-color: var(--ice); }
.card .nope { background: none; border: none; color: var(--mute); text-decoration: underline; text-underline-offset: 4px; min-height: 40px; padding: 0; font-size: 14px; }
.podcast { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; padding: 22px 24px; border: 1px solid var(--line); background: var(--panel); border-radius: 4px; }
.podcast dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.podcast dd { margin: 4px 0 0; font-size: 17px; }
.privacy { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--line); color: var(--mute); font-size: 14px; }
.privacy .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 9; padding: 12px 18px; border-radius: 999px; background: #121816; border: 1px solid var(--line2); font-size: 15px; }
.confirm { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.loading { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 80px 0; text-align: center; }
.loading p { font-size: 20px; font-weight: 300; color: var(--soft); }

/* ---------------------------------------------------------------- phones */
@media (max-width: 860px) {
  .wrap { padding: 18px 16px 32px; }
  nav.main { order: 3; width: 100%; gap: 20px; }
  .stage { min-height: 0; padding: 24px 0; }
  .stars { position: static; display: flex; flex-direction: column; width: 100%; border-top: 1px solid var(--line); }
  .stars svg.links { display: none; }
  .star { position: static; transform: none; flex-direction: row; justify-content: flex-start; gap: 14px; width: 100%; padding: 14px 8px; border-bottom: 1px solid var(--line); }
  .stage.has-stars { flex-direction: column; gap: 24px; }
  .stage.has-stars .center { order: -1; }
  .rows.grid2 { grid-template-columns: minmax(0, 1fr); }
  .scale-row { grid-template-columns: minmax(0, 1fr); }
  .seg { overflow-x: auto; }
  .mixer { gap: 8px; padding: 16px 10px; }
  .fader input { height: 160px; }
  .res-head svg { width: 140px; height: 140px; }
}
