/* Onyx Learn v2: the city, the depth stage, the lesson player. Night, rain, steel-blue; emerald is the only accent,
   red belongs to the Grid. */
:root {
  color-scheme: dark;
  --bg: #04060a; --ink: #f3f6f9; --soft: rgba(233, 240, 248, 0.74); --mute: #8793a1;
  --glass: rgba(12, 16, 22, 0.66); --edge: rgba(190, 214, 240, 0.14); --line: rgba(190, 214, 240, 0.09);
  --em: #00c46a; --em-hi: #13e88c; --red: #ff4d4d; --steel: #7fa6cf; --on-em: #03130b;
  --font: "Google Sans Flex", "Roboto Flex", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--em-hi); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--em-hi); } .dn { color: var(--red); }
.gut { padding-inline: max(18px, env(safe-area-inset-left, 0px)) max(18px, env(safe-area-inset-right, 0px)); }

/* ---------- the depth stage ---------- */
.stg { position: relative; overflow: hidden; perspective: 1000px; background: #04060a; isolation: isolate; }
.stg-rig { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; transition: transform 1.5s var(--ease); will-change: transform; }
.stg-cam { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; pointer-events: none; }
.stg-l { position: absolute; inset: 0; width: 100%; height: 100%; transform-style: preserve-3d; pointer-events: none; }
.stg-sky, .stg-proc { object-fit: cover; }
.stg-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.9s ease; user-select: none; }
.stg-img.in { opacity: 1; }
.stg-light { transition: opacity 1.6s ease; }
.stg-pose { position: absolute; width: auto; transform: translateX(-50%); opacity: 0; transition: opacity 0.28s ease; user-select: none; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55)); }
.stg-pose.ready.on { opacity: 1; }
.stg-surface { position: absolute; pointer-events: none; display: grid; place-items: center; }
.stg-surface { container-type: size; overflow: hidden; transform: translateZ(2px); }
.ticker { width: 100%; height: 100%; display: flex; align-items: center; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker > div { display: flex; gap: 9cqw; white-space: nowrap; padding-left: 4cqw; font-size: 34cqh; letter-spacing: 0.08em; font-weight: 500; color: rgba(190, 214, 240, 0.72); font-variant-numeric: tabular-nums; animation: ticker 38s linear infinite; text-shadow: 0 0 1.2cqw rgba(127, 166, 207, 0.55); }
.ticker b { color: #eaf2fb; font-weight: 600; } .ticker i { font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker > div { animation: none; } }
.flap { width: 100%; height: 100%; display: grid; align-content: space-evenly; padding: 4cqh 5cqw; }
.flap p { display: flex; justify-content: space-between; gap: 4cqw; font-size: min(11.5cqh, 7.4cqw); line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; color: rgba(214, 228, 244, 0.86); text-shadow: 0 0 1cqw rgba(127, 166, 207, 0.5); opacity: 0; animation: flapin 0.5s ease forwards; }
.flap b { color: var(--em-hi); font-weight: 600; text-shadow: 0 0 1.4cqw rgba(19, 232, 140, 0.7); }
@keyframes flapin { from { opacity: 0; transform: translateY(-30%); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .flap p { opacity: 1; animation: none; } }
.stg-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.stg-shade { position: absolute; inset: 0; pointer-events: none; z-index: 3; background: radial-gradient(120% 80% at 50% 30%, rgba(4, 6, 10, 0) 40%, rgba(4, 6, 10, 0.55) 100%); }
.stg::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; }
.stg-good::after { background: radial-gradient(60% 40% at 50% 40%, rgba(19, 232, 140, 0.28), transparent 70%); animation: stgflash 0.9s ease-out; }
.stg-bad::after { background: radial-gradient(60% 40% at 50% 40%, rgba(255, 77, 77, 0.24), transparent 70%); animation: stgflash 0.7s ease-out; }
@keyframes stgflash { 0% { opacity: 1; } 100% { opacity: 0; } }

.stg-mark { position: absolute; width: 0; height: 0; pointer-events: auto; }
.beacon { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.beacon i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(233, 240, 248, 0.9); background: rgba(4, 6, 10, 0.6); box-shadow: 0 0 0 5px rgba(233, 240, 248, 0.12); }
.beacon span { position: absolute; top: 20px; white-space: nowrap; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(4, 6, 10, 0.72); border: 1px solid var(--edge); }
.beacon.done i { background: var(--em-hi); border-color: var(--em-hi); box-shadow: 0 0 18px rgba(19, 232, 140, 0.9); }
.beacon.next i { border-color: var(--em-hi); animation: nextpulse 2.2s ease-in-out infinite; }
.beacon.next span { border-color: rgba(19, 232, 140, 0.6); color: var(--em-hi); }
@media (max-width: 759px) { .beacon:not(.next) span { display: none; } }

/* ---------- shared pieces ---------- */
.brand { display: inline-flex; align-items: center; gap: 9px; letter-spacing: 0.24em; font-weight: 500; font-size: 15px; text-decoration: none; color: var(--ink); }
.brand img { width: 22px; height: 22px; filter: brightness(1.6); }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 13.5px; white-space: nowrap; }
.chip b { font-weight: 600; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); }
.dot.live { background: var(--em); box-shadow: 0 0 0 3px rgba(0, 196, 106, 0.18); }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 0 22px; border: 0; border-radius: 16px; background: linear-gradient(180deg, #1be08b, #00b25f); color: var(--on-em); font-weight: 650; font-size: 17px; text-decoration: none; box-shadow: 0 4px 0 #017a41, 0 14px 34px rgba(0, 196, 106, 0.22); transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.2s ease; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #017a41, 0 8px 20px rgba(0, 196, 106, 0.2); }
.btn:disabled { background: rgba(190, 214, 240, 0.1); color: var(--mute); box-shadow: 0 4px 0 rgba(190, 214, 240, 0.06); cursor: default; }
.btn.ghost { background: rgba(190, 214, 240, 0.07); color: var(--ink); border: 1px solid var(--edge); box-shadow: none; font-weight: 500; min-height: 50px; }
.btn.bad { background: linear-gradient(180deg, #ff6a6a, #e23c3c); color: #1a0505; box-shadow: 0 4px 0 #9c2222; }

/* ---------- the lesson player ---------- */
body.play { height: 100svh; overflow: hidden; }
.pl { position: relative; height: 100svh; }
.pl-stage { position: absolute; inset: 0; }
.pl-ui { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; padding-top: max(12px, env(safe-area-inset-top, 0px)); padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); pointer-events: none; }
.pl-ui > * { pointer-events: auto; }
.pl-top { display: flex; align-items: center; gap: 12px; }
.pl-x, .pl-snd { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--edge); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); text-decoration: none; font-size: 18px; line-height: 1; }
.pl-snd svg { width: 18px; height: 18px; }
.pl-bar { flex: 1; height: 10px; border-radius: 10px; background: rgba(190, 214, 240, 0.14); overflow: hidden; }
.pl-bar i { display: block; height: 100%; width: 0; border-radius: 10px; background: linear-gradient(90deg, #00b25f, var(--em-hi)); box-shadow: 0 0 14px rgba(19, 232, 140, 0.6); transition: width 0.6s var(--ease); }
.pl-gap { flex: 1; min-height: 12px; pointer-events: none; }
/* the contact's line: a film subtitle, never a name tag */
.pl-say { align-self: center; max-width: 34ch; margin: 0 auto 12px; text-align: center; font-size: clamp(17px, 4.6vw, 21px); line-height: 1.3; font-weight: 500; text-wrap: balance; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 0 3px rgba(0, 0, 0, 1), 0 0 26px rgba(0, 0, 0, 0.8); min-height: 1.3em; padding: 10px 18px; border-radius: 24px; background: radial-gradient(ellipse at center, rgba(4, 6, 10, 0.5), rgba(4, 6, 10, 0) 72%); }
.pl-say span { opacity: 0; animation: word 0.3s ease forwards; }
@keyframes word { to { opacity: 1; } }
.pl-panel { position: relative; border-radius: 26px 26px 0 0; margin-inline: -18px; padding: 20px 18px 6px; background: linear-gradient(180deg, rgba(8, 11, 16, 0.72), rgba(6, 8, 12, 0.94) 38%); border-top: 1px solid var(--edge); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); }
.pl-beat { display: flex; flex-direction: column; gap: 12px; animation: beat 0.45s var(--ease) both; }
@keyframes beat { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pl-foot { margin-top: 14px; display: grid; gap: 8px; }
.pl-kind { font-size: 13px; color: var(--steel); font-weight: 500; }
.pl-q { font-size: clamp(21px, 5.6vw, 27px); line-height: 1.12; letter-spacing: -0.015em; font-weight: 600; text-wrap: balance; }
.pl-p { color: var(--soft); font-size: 16px; text-wrap: pretty; }
.pl-p b, .pl-q b { color: var(--ink); font-weight: 650; }
.pl-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 11px 14px; border-radius: 14px; background: rgba(127, 166, 207, 0.08); border: 1px solid var(--line); font-size: 13.5px; color: var(--soft); font-variant-numeric: tabular-nums; }
.pl-stat b { color: var(--ink); font-size: 18px; font-weight: 600; }

.opts { display: grid; gap: 9px; }
.opt { text-align: left; min-height: 54px; padding: 13px 16px; border-radius: 16px; background: rgba(190, 214, 240, 0.06); border: 1.5px solid var(--edge); font-size: 16px; line-height: 1.25; transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease; }
.opt:active { transform: scale(0.985); }
.opt[aria-pressed="true"] { border-color: var(--steel); background: rgba(127, 166, 207, 0.16); }
.opt.right { border-color: var(--em); background: rgba(0, 196, 106, 0.16); }
.opt.wrong { border-color: var(--red); background: rgba(255, 77, 77, 0.12); }
.opt:disabled { cursor: default; }
.opt small { display: block; color: var(--mute); font-size: 13px; margin-top: 2px; }
.opts.two { grid-template-columns: 1fr 1fr; }
.opts.two .opt { text-align: center; font-weight: 600; min-height: 64px; }

/* true or false: a card you throw left or right */
.tf { position: relative; height: 150px; touch-action: pan-y; }
.tf-card { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px 22px; border-radius: 20px; background: linear-gradient(160deg, rgba(127, 166, 207, 0.16), rgba(127, 166, 207, 0.05)); border: 1px solid var(--edge); font-size: 19px; line-height: 1.25; font-weight: 550; text-align: center; text-wrap: balance; cursor: grab; user-select: none; will-change: transform; }
.tf-card.go { transition: transform 0.35s ease, opacity 0.35s ease; }
.tf-hint { display: flex; justify-content: space-between; font-size: 13px; color: var(--mute); }

/* put in order / match */
.ord { display: grid; gap: 8px; }
.ord .opt { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; }
.ord .opt i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 14px; font-weight: 600; background: rgba(190, 214, 240, 0.1); color: var(--mute); }
.ord .opt.placed i { background: var(--em); color: var(--on-em); }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.match .opt { min-height: 50px; font-size: 15px; padding: 10px 12px; }
.match .opt.paired { border-color: var(--em); background: rgba(0, 196, 106, 0.12); opacity: 0.55; }

/* estimate, then see the live number */
.est { display: grid; gap: 10px; }
.est output { font-size: 40px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.est input[type="range"] { width: 100%; height: 36px; accent-color: var(--em); }
.est .real { font-size: 15px; color: var(--soft); }

/* the bar that answers you */
.pl-fb { position: relative; margin: 12px -18px -6px; padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; animation: fb 0.32s var(--ease) both; }
@keyframes fb { from { transform: translateY(100%); } to { transform: none; } }
.pl-fb.good { background: rgba(0, 196, 106, 0.16); border-top: 1px solid rgba(19, 232, 140, 0.5); }
.pl-fb.poor { background: rgba(255, 77, 77, 0.13); border-top: 1px solid rgba(255, 77, 77, 0.5); }
.pl-fb h3 { font-size: 18px; font-weight: 650; }
.pl-fb.good h3 { color: var(--em-hi); } .pl-fb.poor h3 { color: #ff8a8a; }
.pl-fb p { color: var(--soft); font-size: 15px; }

/* the end of a lesson */
.fin { display: grid; gap: 14px; text-align: center; justify-items: center; }
.fin h2 { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; }
.fin-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.fin-row div { padding: 12px 6px; border-radius: 16px; background: rgba(190, 214, 240, 0.06); border: 1px solid var(--line); display: grid; gap: 2px; }
.fin-row b { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.fin-row span { font-size: 12.5px; color: var(--mute); }
.fin-terms { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.fin-terms a { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--edge); font-size: 13.5px; text-decoration: none; color: var(--soft); }
.fin-docs { font-size: 14px; color: var(--soft); text-underline-offset: 4px; }

/* sims: shared instrument pieces */
.sim { display: grid; gap: 10px; }
.sim-board { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: end; padding: 12px 14px; border-radius: 16px; background: rgba(127, 166, 207, 0.08); border: 1px solid var(--line); }
.sim-board .k { font-size: 12.5px; color: var(--mute); }
.sim-board .v { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.sim-board .s { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.sim-cells { grid-column: 1 / -1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.sim-cells p { display: grid; gap: 1px; font-size: 12.5px; color: var(--mute); }
.sim-cells b { font-size: 18px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.sim-chart { width: 100%; height: 92px; display: block; border-radius: 12px; background: rgba(4, 6, 10, 0.5); border: 1px solid var(--line); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(190, 214, 240, 0.06); border: 1px solid var(--edge); }
.seg button { border: 0; background: none; border-radius: 10px; min-height: 40px; font-size: 14px; font-variant-numeric: tabular-nums; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 650; }
.sim-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.sim-grid span { display: grid; gap: 1px; text-align: center; padding: 6px 2px; border-radius: 10px; border: 1px solid var(--line); font-size: 11px; color: var(--mute); font-variant-numeric: tabular-nums; }
.sim-grid span b { font-size: 12.5px; color: var(--ink); }
.sim-grid span.out { border-color: rgba(255, 77, 77, 0.5); background: rgba(255, 77, 77, 0.1); } .sim-grid span.out b { color: var(--red); }
.sim-note { font-size: 12.5px; color: var(--mute); }
.trades { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.trades span { height: 28px; border-radius: 8px; border: 1px solid var(--line); font-size: 10.5px; display: grid; place-items: center; color: var(--mute); font-variant-numeric: tabular-nums; }
.trades span.w { background: rgba(0, 196, 106, 0.2); border-color: rgba(19, 232, 140, 0.6); color: var(--em-hi); }
.trades span.l { background: rgba(255, 77, 77, 0.14); border-color: rgba(255, 77, 77, 0.55); color: var(--red); }
/* a chat thread (pay like you text, who can read it) */
.thread { display: grid; gap: 7px; padding: 12px; border-radius: 18px; background: rgba(4, 6, 10, 0.55); border: 1px solid var(--line); min-height: 132px; align-content: end; }
.msg { max-width: 78%; padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.3; animation: beat 0.3s var(--ease) both; }
.msg.them { justify-self: start; background: rgba(190, 214, 240, 0.12); border-bottom-left-radius: 6px; }
.msg.me { justify-self: end; background: #1d6fe0; border-bottom-right-radius: 6px; }
.msg.pay { background: linear-gradient(160deg, #0d3b26, #072417); border: 1px solid rgba(19, 232, 140, 0.55); display: grid; gap: 1px; }
.msg.pay b { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.msg.pay small { color: var(--em-hi); font-size: 12px; }
.hops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hop { display: grid; gap: 6px; padding: 12px 8px; border-radius: 16px; background: rgba(190, 214, 240, 0.06); border: 1.5px solid var(--edge); text-align: center; font-size: 13.5px; min-height: 108px; align-content: start; }
.hop b { font-size: 14.5px; }
.hop code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--mute); word-break: break-all; line-height: 1.25; }
.hop.seen { border-color: var(--steel); } .hop.seen.clear code { color: var(--em-hi); font-family: var(--font); font-size: 14px; }

@media (min-width: 960px) {
  .pl { display: grid; grid-template-columns: 1fr auto minmax(420px, 520px) 1fr; align-items: center; column-gap: 64px; padding-inline: 48px; }
  .pl-amb { grid-column: 1 / -1; } .pl-stage { grid-column: 2; grid-row: 1; } .pl-ui { grid-column: 3; grid-row: 1; }
  .pl-amb { position: fixed; inset: -6%; z-index: 0; filter: blur(46px) saturate(1.25) brightness(0.3); width: 112%; height: 112%; object-fit: cover; }
  .pl-stage { position: relative; inset: auto; justify-self: end; height: min(calc(100svh - 56px), 900px); aspect-ratio: 9 / 16; border-radius: 34px; border: 1px solid var(--edge); box-shadow: 0 50px 120px rgba(0, 0, 0, 0.7), 0 0 0 10px rgba(190, 214, 240, 0.03); z-index: 1; }
  .pl-ui { position: relative; inset: auto; z-index: 2; height: min(calc(100svh - 56px), 900px); padding: 0; justify-content: center; gap: 18px; }
  .pl-gap { display: none; }
  .pl-top { position: absolute; top: 0; left: 0; right: 0; }
  .pl-say { align-self: flex-start; margin: 0; text-align: left; font-size: 24px; max-width: 26ch; min-height: 2.6em; padding: 0; background: none; }
  .pl-panel { margin: 0; border-radius: 26px; border: 1px solid var(--edge); padding: 26px 26px 22px; }
  .pl-fb { margin: 16px -26px -22px; border-radius: 0 0 26px 26px; padding: 16px 26px 20px; }
  .pl-q { font-size: 30px; }
}
@media (max-width: 959px) { .pl-amb { display: none; } }

/* ---------- the city (hub) ---------- */
.hub-hero { position: relative; height: min(100svh, 980px); min-height: 640px; }
.hub-hero .stg { position: absolute; inset: 0; }
#city .stg-rig { inset: -9% 0 9% 0; }
.hub-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 56%; background: linear-gradient(180deg, rgba(4, 6, 10, 0), rgba(4, 6, 10, 0.72) 45%, var(--bg) 92%); pointer-events: none; z-index: 5; }
.hub-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 22%; background: linear-gradient(180deg, rgba(4, 6, 10, 0.55), rgba(4, 6, 10, 0)); pointer-events: none; z-index: 5; }
.hub-top { position: absolute; z-index: 6; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding-top: max(14px, env(safe-area-inset-top, 0px)); }
.hub-hud { display: flex; gap: 8px; }
.hub-copy { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; display: grid; gap: 14px; padding-bottom: 30px; max-width: 1120px; margin: 0 auto; }
.hub-copy h1 { font-size: clamp(40px, 10.5vw, 84px); line-height: 0.96; letter-spacing: -0.035em; font-weight: 650; text-wrap: balance; }
.hub-copy p { font-size: clamp(17px, 2.3vw, 21px); color: var(--soft); max-width: 36ch; }
.hub-cta { display: grid; gap: 10px; max-width: 420px; }
.hub-cta .btn small { font-weight: 500; opacity: 0.75; font-size: 13px; }
.hub-art { position: absolute; z-index: 6; left: 50%; top: max(10px, env(safe-area-inset-top, 0px)); transform: translateX(-50%); width: clamp(84px, 11vw, 150px); }
.hub-art canvas { aspect-ratio: 1; }
.hub-art canvas { width: 100%; height: 100%; display: block; }
.hub-art p { text-align: center; font-size: 12.5px; color: var(--soft); margin-top: 2px; white-space: nowrap; text-shadow: 0 1px 8px #000; }
.wrap { max-width: 1120px; margin: 0 auto; }
.hub-sec { padding-block: 34px; }
.hub-h2 { font-size: clamp(26px, 5vw, 38px); letter-spacing: -0.02em; font-weight: 650; line-height: 1.05; }

.daily { display: grid; gap: 12px; padding: 20px; border-radius: 24px; background: linear-gradient(150deg, rgba(127, 166, 207, 0.14), rgba(127, 166, 207, 0.04)); border: 1px solid var(--edge); max-width: 620px; }
.daily h3 { font-size: 21px; font-weight: 600; line-height: 1.2; text-wrap: balance; }

.dist { display: grid; gap: 22px; padding-block: 44px; border-top: 1px solid var(--line); }
.dist-head { display: grid; gap: 6px; }
.dist-head p { color: var(--soft); max-width: 44ch; }
.dist-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.dio { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; max-height: 640px; width: 100%; border: 1px solid var(--edge); box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6); transform-style: preserve-3d; }
.dio .stg { position: absolute; inset: 0; }
.dio-off::before { content: ""; position: absolute; inset: 0; z-index: 6; background: rgba(4, 6, 10, 0.25); pointer-events: none; }
.route { position: relative; display: grid; gap: 10px; }
.route::before { content: ""; position: absolute; left: 23px; top: 26px; bottom: 26px; width: 2px; background: linear-gradient(180deg, var(--em), rgba(190, 214, 240, 0.18) var(--done, 0%)); }
.node { position: relative; display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; padding: 10px 14px 10px 0; text-decoration: none; border-radius: 18px; transition: background 0.2s ease; }
.node:hover { background: rgba(190, 214, 240, 0.05); }
.node i { position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 650; font-size: 15px; background: #0c1118; border: 2px solid rgba(190, 214, 240, 0.25); color: var(--mute); }
.node.done i { background: var(--em); border-color: var(--em-hi); color: var(--on-em); }
.node.next i { border-color: var(--em-hi); color: var(--em-hi); box-shadow: 0 0 0 6px rgba(19, 232, 140, 0.14), 0 0 26px rgba(19, 232, 140, 0.5); animation: nextpulse 2.2s ease-in-out infinite; }
@keyframes nextpulse { 50% { box-shadow: 0 0 0 10px rgba(19, 232, 140, 0.06), 0 0 34px rgba(19, 232, 140, 0.7); } }
.node b { display: block; font-size: 17px; font-weight: 600; line-height: 1.2; }
.node span { color: var(--mute); font-size: 13.5px; }
.node em { font-style: normal; font-size: 13px; color: var(--mute); white-space: nowrap; }
.node.next em { color: var(--em-hi); font-weight: 600; }
@media (min-width: 900px) {
  .dist { grid-template-columns: minmax(0, 420px) 1fr; column-gap: 64px; align-items: start; }
  .dist:nth-of-type(even) { grid-template-columns: 1fr minmax(0, 420px); }
  .dist:nth-of-type(even) .dio { order: 2; }
  .dist .dio { position: sticky; top: 24px; }
}
.foot { border-top: 1px solid var(--line); padding-block: 22px 44px; color: var(--mute); font-size: 13px; display: grid; gap: 6px; }
.foot a { color: var(--soft); }

/* the finale */
.act { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: #000; animation: actin 0.6s ease both; }
@keyframes actin { from { opacity: 0; } }
.act p { letter-spacing: 0.42em; font-size: clamp(15px, 3.6vw, 26px); font-weight: 500; text-indent: 0.42em; }

/* glossary */
.gloss { display: grid; max-width: 760px; }
.gloss div { padding: 16px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.gloss div:target { background: rgba(0, 196, 106, 0.08); border-radius: 12px; padding-inline: 12px; }
.gloss dt { font-size: 18px; font-weight: 600; }
.gloss dd { margin: 4px 0 0; color: var(--soft); }
.gloss dd a { color: var(--em-hi); text-decoration: none; font-size: 14px; }

/* walk and pick: the app's own screens inside a lesson */
.walk { display: grid; gap: 10px; justify-items: center; }
.walk-shot { position: relative; width: min(100%, 300px, 34svh); border-radius: 22px; overflow: hidden; border: 1px solid var(--edge); background: #eef1f4; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5); }
.walk-shot img { display: block; width: 100%; height: auto; }
.walk-hot { position: absolute; padding: 0; border: 2px solid var(--em-hi); border-radius: 14px; background: rgba(19, 232, 140, 0.1); animation: walkhot 1.6s ease-out infinite; cursor: pointer; }
.walk-hot.soft { border-color: transparent; background: transparent; animation: none; }
.walk-hot.soft:hover, .walk-hot.soft:focus-visible { border-color: var(--em-hi); background: rgba(19, 232, 140, 0.1); }
.walk-shot.miss .walk-hot { animation: walkmiss 0.5s ease 1, walkhot 1.6s ease-out 0.5s infinite; }
.walk-cap { margin: 0; text-align: center; font-size: 16.5px; line-height: 1.35; max-width: 34ch; text-wrap: balance; }
.walk-n { margin: 0; font-size: 12.5px; color: var(--mute); font-variant-numeric: tabular-nums; }
@keyframes walkhot { 0% { box-shadow: 0 0 0 0 rgba(19, 232, 140, 0.55); } 100% { box-shadow: 0 0 0 16px rgba(19, 232, 140, 0); } }
@keyframes walkmiss { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.12); } }

/* sort: a card dropped into one of two bins */
.srt { display: grid; gap: 8px; justify-items: center; }
.srt-card { position: relative; width: 100%; min-height: 96px; display: grid; place-items: center; padding: 18px 16px; border-radius: 18px; border: 1px solid var(--edge); background: rgba(190, 214, 240, 0.07); text-align: center; font-size: 18px; font-weight: 550; line-height: 1.3; text-wrap: balance; transition: border-color 0.2s, background 0.2s; }
.srt-card.good { border-color: var(--em); background: rgba(0, 196, 106, 0.14); }
.srt-card.poor { border-color: #ff8a8a; background: rgba(255, 77, 77, 0.12); }
.srt-bin { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--mute); }
/* flag: an inbox of messages to flag */
.inbox { display: grid; gap: 8px; }
.msg-row { display: grid; gap: 2px; text-align: left; padding: 11px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(190, 214, 240, 0.06); color: var(--ink); font: inherit; font-size: 15px; line-height: 1.3; cursor: pointer; }
.msg-row b { font-size: 13px; font-weight: 600; color: var(--mute); }
.msg-row[aria-pressed="true"] { border-color: #ff8a8a; background: rgba(255, 77, 77, 0.12); }
.msg-row[aria-pressed="true"] b::after { content: " · flagged"; color: #ff8a8a; }
.msg-row:disabled { cursor: default; }
.msg-row.bad { border-color: #ff8a8a; }
.msg-row.fine { border-color: var(--em); background: rgba(0, 196, 106, 0.08); }
.msg-row.bad b::after { content: " · after your money"; color: #ff8a8a; }
.msg-row.fine b::after { content: " · safe"; color: var(--em-hi); }
.msg-row.miss { box-shadow: 0 0 0 2px rgba(255, 210, 90, 0.8); }

@media (prefers-reduced-motion: reduce) {
  .walk-hot, .walk-shot.miss .walk-hot { animation: none; }
  .stg-rig, .stg-img, .stg-pose, .pl-beat, .pl-fb, .pl-bar i, .msg { transition: none !important; animation: none !important; }
  .pl-say span { opacity: 1; animation: none; }
  .node.next i { animation: none; }
}
