:root {
  --base: #0b1324;
  --panel: #0f1a2e;
  --panel-2: #111b30;
  --edge: rgba(148, 170, 210, 0.16);
  --edge-2: rgba(148, 170, 210, 0.28);
  --text: #e6ecf6;
  --dim: #a7b4ca;
  --up: #2fd17a;
  --down: #ff6b6f;
  --amber: #f5b544;
  --amber-2: #ffc966;
  --light: #eef2f8;
  --light-2: #e3e9f3;
  --ink: #0d1628;
  --ink-dim: #46536a;
  --line-dark: rgba(13, 22, 40, 0.14);
  --sans: Manrope, "Avenir Next", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 400 1.05rem/1.55 var(--sans);
  background: var(--base);
  color: var(--text);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { display: block; }
p { margin: 0; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.up { color: var(--up); }
.down { color: var(--down); }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
::selection { background: var(--amber); color: var(--ink); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 40;
  background: var(--amber); color: var(--ink);
  padding: 0.6rem 0.9rem; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 0.7rem; }

.wrap { width: min(1160px, calc(100% - 2.5rem)); margin-inline: auto; }

.kicker {
  margin: 0 0 0.8rem;
  font: 600 0.76rem/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}
.kicker::before { content: "› "; }
.kicker-red { color: var(--down); }

.lead { max-width: 40rem; font-size: 1.12rem; color: var(--dim); }
.ink-lead { margin-top: 1.25rem; max-width: 40rem; }

/* header */
.mast {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 1.25rem;
  background: rgba(11, 19, 36, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--edge);
}

.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--text); text-decoration: none;
  font: 600 1.35rem/1 var(--sans); letter-spacing: -0.03em;
}
.brand-cast { color: var(--amber); }

.nav-links, .foot-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.15rem; }
.nav-links a, .foot-links a { color: var(--dim); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover, .foot-links a:hover { color: #fff; }

.mast-tools { display: flex; align-items: center; gap: 0.6rem; }

.langs { display: inline-flex; border: 1px solid var(--edge-2); border-radius: 8px; padding: 2px; }
.langs button {
  min-width: 44px; min-height: 36px; border: 0; border-radius: 6px;
  background: transparent; color: var(--dim);
  font: 600 0.78rem/1 var(--mono); letter-spacing: 0.06em; cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--text); color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.7rem 1.2rem;
  border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; font: 600 1rem/1 var(--sans); cursor: pointer;
}
.btn-small { min-height: 40px; padding: 0.45rem 0.9rem; font-size: 0.92rem; }
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: var(--amber-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--edge-2); }
.btn-ghost:hover { border-color: var(--text); }

/* ticker tape */
.tape {
  overflow: hidden;
  background: var(--panel);
  border-bottom: 1px solid var(--edge);
  font: 500 0.86rem/1 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tape-track { display: flex; width: max-content; animation: tape 48s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
.tape-set { display: flex; }
.tk { display: inline-flex; gap: 0.55rem; padding: 0.7rem 1.4rem; border-right: 1px solid var(--edge); }
.tk b { font-weight: 600; color: var(--text); }
.tk i { font-style: normal; color: var(--dim); }
.tk i.up { color: var(--up); }
.tk i.down { color: var(--down); }

@keyframes tape { to { transform: translateX(-50%); } }

/* hero */
.hero {
  padding: 4rem 0 5rem;
  background:
    linear-gradient(var(--edge) 1px, transparent 1px) 0 0 / 100% 64px,
    linear-gradient(90deg, var(--edge) 1px, transparent 1px) 0 0 / 64px 100%,
    radial-gradient(800px 420px at 85% 10%, rgba(47, 209, 122, 0.12), transparent 60%),
    var(--base);
  background-blend-mode: normal;
}
.hero { position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 19, 36, 0.2), var(--base) 95%);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.95fr);
  gap: 3.5rem;
  align-items: center;
}

.hero h1 { margin: 0 0 1.1rem; font-size: clamp(3rem, 6.4vw, 5.6rem); }
.hero .line { display: block; }
.hero .accent { color: var(--up); }

.actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }

.facts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.facts li {
  border: 1px solid var(--edge-2); border-radius: 8px;
  padding: 0.38rem 0.75rem; color: var(--dim); font-size: 0.9rem;
  background: rgba(15, 26, 46, 0.7);
}
.facts li::before { content: "✓ "; color: var(--up); }

/* terminal card */
.term {
  min-width: 0;
  background: linear-gradient(180deg, var(--panel-2), #0d1729);
  border: 1px solid var(--edge-2);
  border-radius: 14px;
  padding: 0 1.25rem 1.2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  scroll-margin-top: 6rem;
}

.term-bar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.4rem 1rem;
  margin: 0 -1.25rem 1.1rem; padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--edge);
}
.live {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: 600 0.72rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim);
}
.dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--up); box-shadow: 0 0 10px var(--up); }
.term.is-playing .dot { animation: blink 1.1s steps(2, end) infinite; }
.card-meta { font: 500 0.8rem/1 var(--mono); color: var(--dim); }

.quote { font-variant-numeric: tabular-nums; }
.q-label { font: 500 0.78rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.q-num { margin: 0.4rem 0 0.25rem; font: 600 clamp(2.4rem, 4.6vw, 3.3rem)/1 var(--mono); letter-spacing: -0.04em; color: #fff; }
.q-chg { font: 600 1rem/1.3 var(--mono); }
.q-day { color: var(--dim); font-weight: 500; }

.chart { margin: 1rem 0 0.4rem; }
.chart svg { display: block; width: 100%; height: 150px; }
.chart .grid line { stroke: var(--edge); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .open { stroke: var(--dim); stroke-opacity: 0.45; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.chart .price {
  fill: none; stroke: var(--up); stroke-width: 2.2; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  /* clip, not dashoffset: dash lengths break under non-scaling-stroke */
  clip-path: inset(0 100% 0 0);
  animation: draw 2.2s 0.3s ease-out forwards;
}
.chart .area { opacity: 0; animation: fade 1s 1.6s ease-out forwards; }
.chart .last { fill: var(--up); opacity: 0; animation: fade 0.4s 2.4s forwards; }
.axis {
  display: flex; justify-content: space-between;
  margin-top: 0.35rem; font: 500 0.72rem/1 var(--mono); color: var(--dim);
}

@keyframes draw { to { clip-path: inset(0 0 0 0); } }
@keyframes fade { to { opacity: 1; } }

.player {
  display: flex; align-items: center; gap: 0.9rem;
  margin-top: 1.1rem; padding: 0.6rem;
  border: 1px solid var(--edge); border-radius: 12px;
  background: rgba(11, 19, 36, 0.6);
}

.play {
  flex: none;
  display: inline-flex; align-items: center; gap: 0.65rem;
  min-height: 48px; padding: 0.35rem 1rem 0.35rem 0.35rem;
  border: 0; border-radius: 10px;
  background: var(--amber); color: var(--ink);
  font: 600 0.98rem/1 var(--sans); cursor: pointer;
}
.play:hover { background: var(--amber-2); }
.mark { width: 38px; height: 38px; border-radius: 8px; background: var(--ink); display: grid; place-items: center; }
.mark::before {
  content: ""; border-style: solid; border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--amber); margin-left: 3px;
}
.term.is-playing .mark::before { width: 11px; height: 12px; margin: 0; border: 0; background: var(--amber); }

.wave { flex: 1; min-width: 0; display: flex; align-items: center; gap: 3px; height: 38px; }
.wave span {
  flex: 1; height: 100%; border-radius: 2px;
  background: var(--up); opacity: 0.85;
  transform: scaleY(0.25);
  animation: rise 1.05s ease-in-out infinite; animation-play-state: paused;
}
.wave span:nth-child(3n) { background: var(--down); animation-delay: -0.25s; animation-duration: 0.9s; }
.wave span:nth-child(4n) { animation-delay: -0.5s; animation-duration: 1.2s; }
.wave span:nth-child(5n) { animation-delay: -0.15s; }
.term.is-playing .wave span { animation-play-state: running; }

.ptime { flex: none; font: 500 0.78rem/1 var(--mono); color: var(--dim); font-variant-numeric: tabular-nums; padding-right: 0.3rem; }
.pbar {
  position: relative; height: 6px; margin-top: 0.6rem;
  border-radius: 3px; background: var(--edge); cursor: pointer; touch-action: manipulation;
}
.pbar::before { content: ""; position: absolute; inset: -10px 0; } /* bigger tap target */
.pbar > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--up); }
.pbar:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

@keyframes rise { 0%, 100% { transform: scaleY(0.22); } 50% { transform: scaleY(1); } }
@keyframes blink { 50% { opacity: 0.25; } }

.log-title { margin: 1.2rem 0 0.5rem; font: 600 0.76rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }

#lines {
  counter-reset: ln;
  font: 400 0.92rem/1.45 var(--mono);
  border-top: 1px solid var(--edge);
}
#lines p {
  counter-increment: ln;
  display: grid; grid-template-columns: 2.2rem minmax(0, 1fr);
  padding: 0.32rem 0;
  color: var(--dim);
  border-bottom: 1px dashed var(--edge);
  overflow-wrap: anywhere;
}
#lines p::before { content: counter(ln, decimal-leading-zero); color: rgba(167, 180, 202, 0.55); }
#lines p.is-now { color: #fff; background: rgba(47, 209, 122, 0.08); box-shadow: inset 2px 0 0 var(--up); }
#lines p.is-now::before { color: var(--up); padding-left: 0.4rem; }

.player-note { margin-top: 0.85rem; color: var(--dim); font-size: 0.86rem; }

/* bands */
.band { padding: 5rem 0; }
.band h2 { margin: 0 0 0.9rem; font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.band-base { background: var(--base); }
.band-panel { background: var(--panel); border-block: 1px solid var(--edge); }
.band-light { background: var(--light); color: var(--ink); }
.band-light .kicker { color: #8a5a00; }
.band-light .lead, .band-light p { color: var(--ink-dim); }
section { scroll-margin-top: 6rem; }

.inside-grid {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 3rem; align-items: start;
}

.ledger {
  list-style: none; margin: 0; padding: 0; counter-reset: lg;
  border: 1px solid var(--edge-2); border-radius: 12px; overflow: hidden;
  background: var(--base);
}
.ledger li {
  counter-increment: lg;
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 1rem; align-items: center;
  padding: 0.95rem 1.1rem;
  border-top: 1px solid var(--edge);
}
.ledger li:first-child { border-top: 0; }
.ledger li:nth-child(even) { background: rgba(148, 170, 210, 0.04); }
.ledger li::before { content: counter(lg, decimal-leading-zero); font: 500 0.85rem/1 var(--mono); color: var(--amber); }
.ledger p { color: var(--text); font-size: 1rem; }
.chip {
  justify-self: end; text-align: right;
  font: 600 0.86rem/1.35 var(--mono); font-variant-numeric: tabular-nums;
  padding: 0.35rem 0.6rem; border-radius: 6px;
  background: rgba(148, 170, 210, 0.08); border: 1px solid var(--edge);
  color: var(--text);
}
.chip > span { display: block; white-space: nowrap; }
.chip.muted { color: var(--dim); }

.nos { list-style: none; margin: 1.8rem 0 0; padding: 0; max-width: 46rem; }
.nos li {
  display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; gap: 1rem; align-items: center;
  padding: 1rem 1.1rem; margin-bottom: 0.6rem;
  border: 1px solid rgba(255, 107, 111, 0.28); border-left: 3px solid var(--down);
  border-radius: 10px;
  background: rgba(255, 107, 111, 0.05);
}
.x { color: var(--down); font: 600 1.2rem/1 var(--mono); }
.no-text {
  font: 600 clamp(1.25rem, 2.6vw, 1.7rem)/1.15 var(--sans); letter-spacing: -0.02em;
  text-decoration: line-through; text-decoration-color: rgba(255, 107, 111, 0.7); text-decoration-thickness: 2px;
}
.rej {
  font: 600 0.72rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--down); padding: 0.35rem 0.5rem; border: 1px solid rgba(255, 107, 111, 0.45); border-radius: 5px;
}

.start-head { max-width: 44rem; }
.pipe {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem; margin-top: 2.6rem;
}
.pipe::before {
  content: ""; position: absolute; left: 1.4rem; right: 1.4rem; top: 1.4rem; height: 2px;
  background: linear-gradient(90deg, var(--up), #1aa35b 70%, rgba(47, 209, 122, 0.25));
}
.step { position: relative; }
.num {
  display: grid; place-items: center;
  width: 2.8rem; height: 2.8rem; border-radius: 50%;
  background: var(--ink); color: var(--up);
  font: 600 0.9rem/1 var(--mono);
  box-shadow: 0 0 0 4px var(--light);
}
.step h3 { margin: 1.1rem 0 0.45rem; font-size: 1.3rem; color: var(--ink); }
.step p { font-size: 0.97rem; }
.step .step-time { margin: 0 0 0.5rem; font: 500 0.85rem/1.3 var(--mono); color: #1aa35b; }

.safety-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem; margin-top: 2.2rem;
}
.safety-grid article {
  padding: 1.4rem 1.3rem; border-radius: 12px;
  background: var(--base); border: 1px solid var(--edge-2);
}
.ico {
  width: 40px; height: 40px; padding: 8px; margin-bottom: 0.9rem;
  border-radius: 10px; background: rgba(47, 209, 122, 0.1);
  fill: none; stroke: var(--up); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.safety-grid h3 { margin: 0 0 0.45rem; font-size: 1.35rem; }
.safety-grid p { color: var(--dim); }

.price-grid {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 3rem; align-items: center;
}
.price-quote {
  padding: 1.6rem 1.5rem; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--edge-2);
}
.price-row { display: flex; align-items: baseline; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.price-num { font: 600 clamp(4.5rem, 10vw, 7rem)/0.9 var(--mono); letter-spacing: -0.06em; color: #fff; }
.price-cents { font: 600 clamp(1.6rem, 3vw, 2.4rem)/1 var(--mono); color: var(--dim); }
.price-per { margin: 0.5rem 0 1.2rem; font: 500 0.95rem/1.3 var(--mono); color: var(--dim); }
.closed {
  display: flex; gap: 0.6rem; align-items: baseline;
  padding: 0.7rem 0.85rem; border-radius: 8px;
  background: rgba(245, 181, 68, 0.1); border: 1px solid rgba(245, 181, 68, 0.35);
  color: var(--amber-2); font-weight: 600; font-size: 0.95rem;
}
.closed .dot { flex: none; background: var(--amber); box-shadow: none; }

.price-list { margin: 1.3rem 0 0; padding: 0; list-style: none; }
.price-list li { padding: 0.75rem 0; border-top: 1px solid var(--edge); }
.price-list li::before { content: "+ "; color: var(--up); font-family: var(--mono); }
.price-list li:last-child { border-bottom: 1px solid var(--edge); }

.faq-wrap { max-width: 48rem; }
.faq details { border-top: 1px solid var(--line-dark); padding: 1rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line-dark); }
.faq summary {
  display: flex; justify-content: space-between; gap: 1rem; cursor: pointer;
  font: 600 1.2rem/1.3 var(--sans); letter-spacing: -0.015em; color: var(--ink);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: #1a7f4b; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0.7rem 0 0.2rem; max-width: 62ch; }

.foot {
  padding: 3rem 0 2.4rem;
  background: var(--base); color: var(--dim);
  border-top: 1px solid var(--edge);
}
.foot-top { display: flex; justify-content: space-between; gap: 1.5rem; align-items: start; margin-bottom: 1.6rem; }
.foot p { max-width: 75ch; font-size: 0.93rem; }
.foot-legal-links { margin-bottom: 1.1rem; }
.foot-advice { margin-bottom: 0.8rem; color: var(--text); }
.fine { margin-top: 1.1rem; font: 500 0.82rem/1 var(--mono); color: #8d9ab0; }

@media (max-width: 920px) {
  .mast {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand tools" "links links";
    padding: 0.65rem 1rem 0.5rem;
  }
  .brand { grid-area: brand; min-width: 0; }
  .mast-tools { grid-area: tools; }
  .mast-tools .btn-small { display: none; }
  .nav-links { grid-area: links; padding: 0.45rem 0 0.3rem; }

  .hero { padding: 2.4rem 0 3rem; }
  .hero-grid, .inside-grid, .price-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .hero h1 { font-size: clamp(2.8rem, 14vw, 4.4rem); }
  .band { padding: 3.4rem 0; }
  .pipe { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .pipe::before { left: 1.4rem; right: auto; top: 1.4rem; bottom: 1.4rem; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--up), rgba(47, 209, 122, 0.25)); }
  .step { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr); column-gap: 1rem; }
  .step h3 { margin-top: 0.6rem; }
  .step p { grid-column: 2; }
  .step .step-time { margin-top: -0.2rem; }
  .safety-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-top { flex-direction: column; }
}

@media (max-width: 560px) {
  .wrap { width: calc(100% - 2rem); }
  .term { padding: 0 1rem 1rem; }
  .term-bar { margin-inline: -1rem; padding-inline: 1rem; }
  .ledger li { grid-template-columns: 2rem minmax(0, 1fr); padding: 0.9rem; }
  .ledger .chip { grid-column: 2; justify-self: start; text-align: left; }
  .chip > span { display: inline; }
  .nos li { grid-template-columns: 1.6rem minmax(0, 1fr); }
  .rej { grid-column: 2; justify-self: start; }
  .player { flex-wrap: wrap; }
  .wave { flex-basis: 100%; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tape-track, .wave span, .term.is-playing .dot { animation: none; }
  .tape-set + .tape-set { display: none; }
  .tape { overflow-x: auto; }
  .chart .price { animation: none; clip-path: none; }
  .chart .area, .chart .last { animation: none; opacity: 1; }
}
