/* ============================================================
   PHOTON — Solana trading terminal
   Design system: ink + amber, terminal-industrial, restraint.
   Type: Fraunces (display) / Space Grotesk (UI) / IBM Plex Mono (data)
   ============================================================ */

:root {
  --bg:          #0A0D11;
  --bg-elev:     #0F131A;
  --bg-elev2:    #151B24;
  --line:        #1D2430;
  --line-strong: #2A3342;
  --text:        #E8EAF0;
  --text-soft:   #A9B1BE;
  --muted:       #747E8D;
  --dim:         #4B5461;

  --amber:       #F0A63C;
  --amber-bright:#FFC36B;
  --amber-ink:   #201505;

  --up:          #2FB66B;
  --down:        #F0554E;

  --serif: "Fraunces", Georgia, serif;
  --ui:    "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --gutter: clamp(1.25rem, 4vw, 3rem);
  --maxw: 1200px;
  --radius: 3px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--amber); color: var(--amber-ink); }

:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- type utilities ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.label-amber { color: var(--amber); }

.mono { font-family: var(--mono); }

.lead { font-size: 17px; line-height: 1.7; color: var(--text-soft); max-width: 56ch; }

.muted { color: var(--muted); }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(4rem, 9vw, 7.5rem); border-top: 1px solid var(--line); }

.section-head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); max-width: 640px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.section-head p { color: var(--text-soft); font-size: 16px; }

/* ---------- ticker tape ---------- */
.ticker {
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.ticker__track {
  display: inline-flex;
  gap: 2.5rem;
  padding-inline: 1.25rem;
  animation: ticker 46s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-soft);
  padding-block: 0.7rem;
}
.ticker__item b { color: var(--text); font-weight: 500; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 13, 17, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand__mark { width: 26px; height: 26px; flex: none; }
.brand__word {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: var(--text);
}
.brand__word em { font-style: normal; color: var(--amber); }
.nav__links { display: flex; align-items: center; gap: 1.9rem; }
.nav__links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s ease;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); border-bottom-color: var(--amber); }
.nav__cta { display: flex; align-items: center; gap: 1rem; }
.nav__toggle { display: none; }

@media (max-width: 860px) {
  .nav__links {
    position: fixed;
    inset: 64px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); width: 100%; }
  .nav__toggle { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--radius); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: transparent;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.06s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--amber); color: var(--amber-bright); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); font-weight: 600; }
.btn--primary:hover { background: var(--amber-bright); color: var(--amber-ink); border-color: var(--amber-bright); }
.btn--sm { padding: 0.55rem 0.95rem; font-size: 11px; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4rem, 8vw, 6.5rem) clamp(3rem, 6vw, 5rem);
}
.hero__grid-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 70% 0%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 90% 70% at 70% 0%, #000 20%, transparent 75%);
}
.hero__glow {
  position: absolute;
  top: -220px; right: -140px;
  width: 640px; height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240,166,60,0.13), transparent 65%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  margin-bottom: 1.6rem;
}
.hero__eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px rgba(47,182,107,0.15); }
.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.3rem);
  font-weight: 380;
  letter-spacing: -0.02em;
}
.hero h1 em { font-style: italic; color: var(--amber); }
.hero__sub { margin-top: 1.4rem; font-size: 17px; color: var(--text-soft); max-width: 52ch; line-height: 1.7; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.1rem; }
.hero__status {
  margin-top: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.9rem;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.hero__status b { color: var(--text-soft); font-weight: 500; }
.hero__status .ok { color: var(--up); }

/* ---------- terminal mock ---------- */
.term {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-elev);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.8);
  position: relative;
}
.term__bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.term__dots { display: flex; gap: 5px; }
.term__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.term__dots i:nth-child(1) { background: #3A4352; }
.term__dots i:nth-child(2) { background: #2E3644; }
.term__dots i:nth-child(3) { background: var(--amber); }
.term__tabs { display: flex; gap: 1rem; margin-left: 0.6rem; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.term__tabs .on { color: var(--amber); }
.term__clock { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--dim); letter-spacing: 0.05em; }
.term__body { display: grid; grid-template-columns: 200px 1fr 170px; min-height: 330px; }
.term__pane { padding: 0.8rem 0.9rem; overflow: hidden; }
.term__pane--pairs { border-right: 1px solid var(--line); }
.term__pane--book { border-left: 1px solid var(--line); }
.term__pane-title { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 0.7rem; }

/* pair rows */
.pair { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.4rem; padding: 0.42rem 0.4rem; border-radius: 2px; cursor: default; }
.pair:hover, .pair.sel { background: var(--bg-elev2); }
.pair__sym { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text); }
.pair__vol { grid-column: 1; font-family: var(--mono); font-size: 10px; color: var(--dim); }
.pair__px { grid-column: 2; grid-row: 1; font-family: var(--mono); font-size: 12px; text-align: right; }
.pair__ch { grid-column: 2; grid-row: 2; font-family: var(--mono); font-size: 10px; text-align: right; }
.up { color: var(--up); }
.down { color: var(--down); }

/* chart pane */
.term__chart { position: relative; height: 100%; display: flex; flex-direction: column; }
.term__big-px { font-family: var(--mono); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; padding: 0.7rem 0.9rem 0; }
.term__big-px .ch { font-size: 12px; margin-left: 0.5rem; font-weight: 500; }
.term__chart-svg { flex: 1; padding: 0.3rem 0 0; }
.term__chart-svg svg { width: 100%; height: 100%; }
.term__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
}
.term__row > * { min-width: 0; }
.term__row button { padding: 0.75rem; font-weight: 600; letter-spacing: 0.12em; }
.btn-buy { color: var(--up); border-right: 1px solid var(--line); }
.btn-sell { color: var(--down); }
.btn-buy:hover { background: rgba(47,182,107,0.08); }
.btn-sell:hover { background: rgba(240,85,78,0.08); }

/* order book */
.book-row { display: grid; grid-template-columns: 1fr auto; font-family: var(--mono); font-size: 11px; padding: 0.18rem 0; position: relative; }
.book-row .deep { position: absolute; inset: 0 auto 0 0; opacity: 0.06; }
.book-row.buy .deep { background: var(--up); }
.book-row.sell .deep { background: var(--down); }
.book-row .px, .book-row .sz { position: relative; }
.book-row .sz { color: var(--dim); }
.book-row.buy .px { color: var(--up); }
.book-row.sell .px { color: var(--down); }

/* ---------- metric strip ---------- */
.metrics { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metrics__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric {
  padding: 1.6rem 1.4rem;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.metric:first-child { border-left: none; }
.metric b { font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.metric span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.metric .n { color: var(--amber); }
@media (max-width: 860px) { .metrics__grid { grid-template-columns: 1fr 1fr; } .metric:nth-child(3) { border-left: none; } .metric:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* ---------- feature rows (asymmetric, list) ---------- */
.feat-list { border-top: 1px solid var(--line); }
.feat {
  display: grid;
  grid-template-columns: 180px 1fr 260px;
  gap: 2rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.feat__idx { font-family: var(--mono); font-size: 12px; color: var(--amber); letter-spacing: 0.14em; padding-top: 0.3rem; }
.feat__body h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.feat__body p { color: var(--text-soft); max-width: 52ch; }
.feat__side { font-family: var(--mono); font-size: 12.5px; color: var(--text-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: var(--bg-elev); }
.feat__side .k { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
.feat__side .v { display: block; margin-top: 0.35rem; }
.feat__side .v small { color: var(--dim); }
.feat__side .bar { height: 4px; background: var(--line-strong); margin-top: 0.8rem; position: relative; overflow: hidden; border-radius: 2px; }
.feat__side .bar i { position: absolute; inset: 0 auto 0 0; background: var(--amber); border-radius: 2px; }
.feat__side .bar.up i { background: var(--up); }
@media (max-width: 900px) { .feat { grid-template-columns: 1fr; gap: 0.8rem; } }

/* ---------- workflow timeline ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.step { padding: 1.7rem 1.5rem; border-left: 1px solid var(--line); position: relative; }
.step:first-child { border-left: none; }
.step__n { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: 0.14em; }
.step h3 { font-size: 1.05rem; margin: 0.9rem 0 0.5rem; font-family: var(--ui); font-weight: 600; }
.step p { font-size: 13.5px; color: var(--text-soft); }
.step::after { content: ""; position: absolute; top: 0; left: 0; height: 2px; width: 0; background: var(--amber); transition: width 0.35s ease; }
.step:hover::after { width: 100%; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .step:nth-child(3) { border-left: none; border-top: 1px solid var(--line); } .step:nth-child(4) { border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step { border-left: none; border-top: 1px solid var(--line); } .step:first-child { border-top: none; } }

/* ---------- security / contract ---------- */
.sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.sec-code {
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.sec-code__head { padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; display: flex; justify-content: space-between; }
.sec-code__body { padding: 1.1rem; display: grid; gap: 0.8rem; }
.sec-code__row { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.sec-code__row span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
.sec-code__row code { color: var(--text-soft); font-size: 12px; word-break: break-all; }
.sec-code__copy { font-size: 11px; color: var(--amber); }
.sec-checks { display: grid; gap: 1.2rem; margin-top: 1.6rem; }
.sec-check { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; }
.sec-check svg { margin-top: 2px; }
.sec-check h4 { font-family: var(--ui); font-size: 15px; font-weight: 600; }
.sec-check p { font-size: 13.5px; color: var(--text-soft); margin-top: 0.25rem; }
@media (max-width: 900px) { .sec-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 0;
  cursor: pointer;
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { font-family: var(--mono); color: var(--amber); font-size: 18px; transition: transform 0.2s ease; }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq details p { padding: 0 2rem 1.4rem 0; color: var(--text-soft); font-size: 14.5px; max-width: 64ch; }

/* ---------- CTA band ---------- */
.cta-band { border-top: 1px solid var(--line); }
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-block: clamp(3rem, 7vw, 5rem);
}
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); max-width: 20ch; }
.cta-band p { color: var(--text-soft); margin-top: 0.8rem; max-width: 46ch; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-elev); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: 3.5rem;
}
.footer__about p { font-size: 13.5px; color: var(--muted); margin-top: 1rem; max-width: 32ch; }
.footer__col h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem; }
.footer__col ul { list-style: none; display: grid; gap: 0.6rem; }
.footer__col a { font-size: 13.5px; color: var(--text-soft); transition: color 0.15s ease; }
.footer__col a:hover { color: var(--amber); }
.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.05em;
}
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- page hero (subpages) ---------- */
.page-hero { padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 380; margin-top: 1.1rem; }
.page-hero .lead { margin-top: 1rem; }
.crumbs { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); display: flex; gap: 0.6rem; align-items: center; }
.crumbs a:hover { color: var(--amber); }
.crumbs .sep { color: var(--line-strong); }

/* ---------- tables ---------- */
.table-wrap { border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: auto; }
.table-tools { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.table-search {
  display: flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 0.55rem 0.85rem; background: var(--bg-elev); min-width: 220px;
}
.table-search input { background: none; border: none; outline: none; color: var(--text); font-family: var(--mono); font-size: 12.5px; width: 100%; }
.table-search svg { color: var(--dim); flex: none; }
.tabs-chip { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.tabs-chip button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.45rem 0.8rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted);
}
.tabs-chip button.on { color: var(--amber); border-color: var(--amber); }

.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 0.75rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--bg-elev);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.data-table th:hover { color: var(--text); }
.data-table th.sorted { color: var(--amber); }
.data-table td { padding: 0.8rem 1.2rem; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.data-table tbody tr { transition: background 0.1s ease; cursor: default; }
.data-table tbody tr:hover { background: var(--bg-elev); }
.data-table td .sym { display: flex; align-items: center; gap: 0.6rem; }
.data-table td .sym b { font-weight: 600; }
.data-table td .sym small { color: var(--dim); font-size: 11px; }
.chip { font-family: var(--mono); font-size: 11px; padding: 0.28rem 0.55rem; border-radius: 999px; letter-spacing: 0.04em; }
.chip--up { color: var(--up); background: rgba(47,182,107,0.1); border: 1px solid rgba(47,182,107,0.3); }
.chip--down { color: var(--down); background: rgba(240,85,78,0.1); border: 1px solid rgba(240,85,78,0.3); }
.mini-bar { display: inline-block; width: 56px; height: 4px; border-radius: 2px; background: var(--line-strong); position: relative; overflow: hidden; vertical-align: middle; }
.mini-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; }
.vol-cell { display: flex; align-items: center; gap: 0.6rem; }

/* ---------- swap / trade page ---------- */
.trade-grid { display: grid; grid-template-columns: 1fr 380px; gap: 1.6rem; align-items: start; }
@media (max-width: 980px) { .trade-grid { grid-template-columns: 1fr; } }

.swap {
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg-elev);
  padding: 1.6rem; display: grid; gap: 0.9rem;
}
.swap__head { display: flex; justify-content: space-between; align-items: center; }
.swap__field { border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); padding: 1rem 1.1rem; display: grid; gap: 0.4rem; }
.swap__field label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.swap__row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.swap__input { background: none; border: none; outline: none; color: var(--text); font-family: var(--mono); font-size: 26px; font-weight: 500; width: 100%; }
.swap__input::placeholder { color: var(--dim); }
.token-btn {
  display: flex; align-items: center; gap: 0.6rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.5rem 0.85rem 0.5rem 0.55rem;
  font-family: var(--mono); font-size: 14px; font-weight: 600; background: var(--bg-elev2);
  transition: border-color 0.15s ease;
}
.token-btn:hover { border-color: var(--amber); }
.token-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #0A0D11; flex: none; }
.swap__mid { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.swap__mid .swap-btn { border: 1px solid var(--line-strong); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--amber); transition: transform 0.2s ease, border-color 0.15s ease; }
.swap__mid .swap-btn:hover { transform: rotate(180deg); border-color: var(--amber); }
.swap__rates { border-top: 1px solid var(--line); padding-top: 0.9rem; display: grid; gap: 0.45rem; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.swap__rates div { display: flex; justify-content: space-between; }
.swap__rates b { color: var(--text-soft); font-weight: 500; }
.quote-note { font-family: var(--mono); font-size: 11px; color: var(--dim); line-height: 1.6; }

.order-panel { border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg-elev); overflow: hidden; }
.order-panel__head { padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.order-panel__head .live { color: var(--up); font-size: 10px; }
.order-panel__row { display: grid; grid-template-columns: 1fr 1fr; font-family: var(--mono); font-size: 11.5px; padding: 0.4rem 1.1rem; position: relative; }
.order-panel__row .deep { position: absolute; inset: 0 auto 0 0; opacity: 0.05; }
.order-panel__row.buy .deep { background: var(--up); }
.order-panel__row.sell .deep { background: var(--down); }
.order-panel__row span { position: relative; }
.order-panel__row span:last-child { text-align: right; color: var(--dim); }
.order-panel__mid { padding: 0.7rem 1.1rem; border-block: 1px solid var(--line); background: var(--bg); display: flex; justify-content: space-between; align-items: baseline; }
.order-panel__mid .px { font-family: var(--mono); font-size: 20px; font-weight: 600; }
.order-panel__mid .ch { font-family: var(--mono); font-size: 11.5px; }
.order-panel__foot { padding: 1rem 1.1rem; display: grid; gap: 0.5rem; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.order-panel__foot div { display: flex; justify-content: space-between; }
.order-panel__foot b { color: var(--text-soft); font-weight: 500; }

/* ---------- learn / TOC ---------- */
.learn-grid { display: grid; grid-template-columns: 240px 1fr; gap: 3.5rem; align-items: start; }
@media (max-width: 900px) { .learn-grid { grid-template-columns: 1fr; } }
.toc { position: sticky; top: 96px; border-left: 1px solid var(--line); padding-left: 1.4rem; display: grid; gap: 0.55rem; }
.toc a { font-family: var(--mono); font-size: 12px; color: var(--muted); transition: color 0.15s ease; }
.toc a:hover { color: var(--amber); }
.article h2 { font-size: 1.8rem; margin: 2.8rem 0 0.9rem; scroll-margin-top: 96px; }
.article h3 { font-size: 1.25rem; margin: 1.8rem 0 0.6rem; font-family: var(--ui); font-weight: 600; scroll-margin-top: 96px; }
.article p { color: var(--text-soft); margin-bottom: 1rem; max-width: 70ch; }
.article ul, .article ol { color: var(--text-soft); margin: 0 0 1.2rem 1.3rem; max-width: 70ch; }
.article li { margin-bottom: 0.5rem; }
.article code {
  font-family: var(--mono); font-size: 12.5px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 2px; padding: 0.1em 0.4em; color: var(--amber-bright);
}
.article pre { background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 1.1rem 1.3rem; overflow: auto; margin-bottom: 1.4rem; }
.article pre code { background: none; border: none; padding: 0; color: var(--text-soft); }
.article table { width: 100%; border-collapse: collapse; margin-bottom: 1.4rem; font-family: var(--mono); font-size: 13px; }
.article th, .article td { text-align: left; padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--line); }
.article th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; }
.callout { border-left: 2px solid var(--amber); background: var(--bg-elev); padding: 1.1rem 1.3rem; margin: 1.4rem 0; font-size: 14px; color: var(--text-soft); }
.callout b { color: var(--text); }

/* ---------- 404 ---------- */
.nf { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 5rem; }
.nf code { font-family: var(--mono); color: var(--amber); font-size: 15px; }
.nf h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 1rem 0; font-weight: 380; }
.nf p { color: var(--text-soft); max-width: 44ch; margin: 0 auto 2rem; }

/* ---------- misc ---------- */
.beam { height: 2px; width: 44px; background: var(--amber); margin-bottom: 1.4rem; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--amber); color: var(--amber-ink); padding: 0.6rem 1rem; font-family: var(--mono); font-size: 12px; }
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive terminal ---------- */
@media (max-width: 720px) {
  .term__body { grid-template-columns: 1fr; }
  .term__pane--pairs { border-right: none; border-bottom: 1px solid var(--line); }
  .term__pane--book { border-left: none; border-top: 1px solid var(--line); }
  .term__chart { min-height: 220px; }
  .term__tabs { display: none; }
  .hero__inner { gap: 2.5rem; }
}