/* /xrp: "XRP, seen from the inside". Dark, calm, one accent per idea. */
:root {
  --bg: #0a0f1f;
  --bg-2: #111832;
  --line: #24305a;
  --ink: #eef2ff;
  --ink-2: #a9b3d6;
  --cyan: #3be8ff;
  --violet: #9b8cff;
  --mint: #46f2b0;
  --gold: #ffcf5a;
  --coral: #ff6b7a;
  --radius: 18px;
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 70% -10%, #18214a 0%, transparent 60%), var(--bg);
  color: var(--ink);
  font: 500 17px/1.6 var(--font);
  overflow-x: hidden;
}
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

nav.site { display: flex; justify-content: space-between; align-items: center; max-width: 1160px; margin: 0 auto; padding: 18px 20px; }
nav.site .brand { color: var(--ink); font-weight: 700; text-decoration: none; font-size: 20px; }
nav.site .pill-link { color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; font-size: 15px; }
nav.site .pill-link:hover { color: var(--ink); border-color: var(--ink-2); }

main { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.hero { text-align: center; padding: 28px 0 30px; }
.kicker { color: var(--cyan); font: 700 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { font-size: clamp(36px, 7vw, 68px); font-weight: 700; }
.lede { color: var(--ink-2); max-width: 620px; margin: 0 auto; font-size: clamp(17px, 2.2vw, 20px); }

/* Player: the stage and its caption panel. */
.player { display: grid; grid-template-columns: minmax(0, 540px) minmax(0, 1fr); gap: 36px; align-items: center; margin: 10px 0 70px; }
.stage-wrap { position: relative; isolation: isolate; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: #070b18; box-shadow: 0 30px 80px -30px rgba(59, 232, 255, .25); }
.stage { display: block; width: 100%; height: auto; aspect-ratio: 1080 / 1350; }
.sound-chip { position: absolute; right: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 16px 10px 12px; background: var(--gold); color: #1a1205; font: 800 15px/1 var(--font); cursor: pointer; box-shadow: 0 8px 24px -8px rgba(0,0,0,.6); }
.sound-chip[hidden] { display: none; }
.sound-chip svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sound-chip:hover { background: #fff; }
.noscript-note { position: absolute; inset: auto 16px 16px; color: var(--ink-2); font-size: 15px; }
.panel { min-width: 0; }
.chapter-count { font: 700 14px/1 var(--mono); color: var(--ink-2); letter-spacing: .08em; margin-bottom: 14px; }
.chapter-count #chapter-num { color: var(--cyan); }
.chapter-title { font-size: clamp(26px, 3.4vw, 38px); min-height: 1.2em; }
.chapter-text { color: var(--ink); font-size: 21px; font-weight: 700; min-height: 4.8em; }
.controls { display: flex; gap: 12px; align-items: center; margin: 6px 0 18px; }
.controls[hidden], .ctl[hidden] { display: none; }
.ctl { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; transition: border-color .2s, transform .2s; }
.ctl:hover { border-color: var(--cyan); }
.ctl:active { transform: scale(.94); }
.ctl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ctl-main { width: 58px; height: 58px; background: var(--cyan); color: #04121a; border-color: var(--cyan); }
.ctl-main:hover { border-color: #fff; }
.ctl-main svg { width: 24px; height: 24px; }
.ctl-main .i-play { fill: currentColor; }
#btn-sound .i-on { display: none; }
#btn-sound[aria-pressed="true"] .i-on { display: block; }
#btn-sound[aria-pressed="true"] .i-off { display: none; }
#btn-sound[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.ctl-main .i-play, .ctl-main .i-replay { display: none; }
.ctl-main[data-state="paused"] .i-pause, .ctl-main[data-state="ended"] .i-pause { display: none; }
.ctl-main[data-state="paused"] .i-play { display: block; }
.ctl-main[data-state="ended"] .i-replay { display: block; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.dot { flex: 1 1 22px; min-width: 22px; height: 26px; border: 0; background: none; padding: 11px 0; cursor: pointer; }
.dot span { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.dot span i { display: block; height: 100%; width: 0; background: var(--cyan); }
.dot[aria-current="step"] span { background: #34427a; }
.aside { color: #6f7aa6; font-size: 14px; font-style: italic; margin: 0; }

/* Sections below the player. */
.block { margin: 0 0 80px; }
.block > h2 { font-size: clamp(26px, 3.6vw, 36px); text-align: center; margin-bottom: 30px; }
.idea-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.idea { background: linear-gradient(180deg, var(--bg-2), #0d1430); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.idea svg { width: 40px; height: 40px; fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.idea:nth-child(2) svg { stroke: var(--violet); }
.idea:nth-child(3) svg { stroke: var(--mint); }
.idea:nth-child(4) svg { stroke: var(--gold); }
.idea:nth-child(5) svg { stroke: var(--coral); }
.idea h3 { font-size: 20px; }
.idea p { color: var(--ink-2); margin: 0; font-size: 16px; }

.num-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; }
.num-grid div { text-align: center; padding: 22px 12px; border-top: 2px solid var(--line); }
.num-grid dt { font: 700 clamp(26px, 3.4vw, 36px)/1.1 var(--mono); color: var(--ink); margin-bottom: 8px; }
.num-grid div:nth-child(1) dt { color: var(--cyan); }
.num-grid div:nth-child(2) dt { color: var(--coral); }
.num-grid div:nth-child(3) dt { color: var(--violet); }
.num-grid div:nth-child(4) dt { color: var(--gold); }
.num-grid dd { margin: 0; color: var(--ink-2); font-size: 15px; }

.walk-note { text-align: center; color: #6f7aa6; font-size: 14px; margin-top: -18px; }
.walk-list { list-style: none; counter-reset: walk; padding: 0; margin: 0 auto; max-width: 760px; }
.walk-list li { counter-increment: walk; position: relative; padding: 0 0 26px 62px; }
.walk-list li::before { content: counter(walk); position: absolute; left: 0; top: -2px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font: 700 15px/1 var(--mono); color: var(--cyan); background: var(--bg-2); }
.walk-list li::after { content: ''; position: absolute; left: 20px; top: 44px; bottom: 4px; width: 1px; background: var(--line); }
.walk-list li:last-child::after { display: none; }
.walk-list h3 { font-size: 20px; margin-bottom: 6px; }
.walk-list p { color: var(--ink-2); margin: 0; }
.walk-list p.say { color: var(--ink); font-weight: 800; margin-bottom: 6px; }

.support-card { max-width: 680px; margin: 0 auto; padding: 34px; border-radius: 26px; border: 1px solid #2c3d78; background: radial-gradient(500px 240px at 90% 0%, rgba(59, 232, 255, .12), transparent 70%), var(--bg-2); }
.support-card h2 { font-size: clamp(26px, 3.6vw, 34px); }
.support-card > p { color: var(--ink-2); }
.field { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #0b1126; margin-bottom: 12px; }
.field-label { flex: 0 0 auto; font: 700 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); width: 92px; }
.field-value { flex: 1 1 auto; min-width: 0; font: 500 15px/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.copy { flex: 0 0 auto; border: 1px solid var(--cyan); background: transparent; color: var(--cyan); font: 700 14px/1 var(--font); padding: 9px 14px; border-radius: 999px; cursor: pointer; min-width: 72px; }
.copy:hover, .copy[data-done] { background: var(--cyan); color: #04121a; }
.support-note { color: var(--gold) !important; font-size: 15px; margin-top: 14px; }
.support-alt { font-size: 15px; margin: 0; }

.faq { max-width: 760px; margin-left: auto; margin-right: auto; }
.qa { border-top: 1px solid var(--line); padding: 20px 0 6px; }
.qa h3 { font-size: 19px; }
.qa p { color: var(--ink-2); }
.sources { max-width: 760px; margin-left: auto; margin-right: auto; color: var(--ink-2); font-size: 15px; }
.sources h2 { font-size: 22px !important; }

.site-foot { text-align: center; color: #6f7aa6; font-size: 14px; padding: 30px 20px 50px; border-top: 1px solid var(--line); }
.site-foot p { margin: 0 0 8px; }

/* Stage drawing styles (SVG). */
.stage text { font-family: var(--display); font-weight: 600; }
.stage .mono { font-family: var(--mono); }
.stage .dim { fill: var(--ink-2); }

@media (max-width: 900px) {
  .player { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .stage-wrap { max-width: 540px; margin: 0 auto; width: 100%; }
  .chapter-text { min-height: 0; }
  .idea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .num-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .idea-grid { grid-template-columns: minmax(0, 1fr); }
  .support-card { padding: 22px 16px; }
  .field { flex-wrap: wrap; }
  .field-label { width: 100%; }
  .walk-list li { padding-left: 54px; }
}

/* Capture mode (video export): only the film and its caption. */
.capture nav.site, .capture .hero, .capture .block, .capture .site-foot, .capture .controls, .capture .sound-chip, .capture .dots, .capture .aside, .capture .related-pages { display: none !important; }
.capture main { max-width: none; padding: 0; }
.capture .player { margin: 0; gap: 0; }
.capture .stage-wrap { border-radius: 0; border: 0; box-shadow: none; max-width: none; }
.capture .panel { padding: 40px 56px; }
.capture.capture-wide .player { grid-template-columns: 864px 1fr; height: 1080px; }
.capture.capture-wide .chapter-title { font-size: 56px; }
.capture.capture-wide .chapter-text { font-size: 30px; }
.capture.capture-tall .player { grid-template-columns: 1fr; }
.capture.capture-tall .chapter-title { font-size: 58px; }
.capture.capture-tall .chapter-text { font-size: 32px; }
.capture .chapter-count { font-size: 24px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
