/* ============================================================================
   cripto.md - design system
   Aesthetic: "warm institutional" - deep navy ground, gold-gradient accents
   lifted straight from the logo mark, editorial serif over a quiet grotesque.
   ========================================================================== */

/* ---------- tokens ------------------------------------------------------- */
:root {
  /* brand gold, sampled from logo.png top→bottom */
  --gold-1: #de921a;
  --gold-2: #e8ba15;
  --gold-3: #efe20b;
  --gold-grad: linear-gradient(160deg, var(--gold-1) 0%, var(--gold-2) 48%, var(--gold-3) 100%);
  --gold-grad-flat: linear-gradient(90deg, var(--gold-1), var(--gold-3));

  --navy-900: #080e18;
  --navy-800: #0b121e;
  --navy-700: #0e1726;
  --navy-600: #131f33;
  --navy-500: #18263d;
  --navy-400: #22314a;

  --ok: #35b98a;
  --warn: #e8a33d;
  --bad: #e2635a;
  --info: #6aa6dd;

  /* light theme is the default definition; dark overrides below */
  --bg: #f6f1e7;
  --bg-2: #fffdf8;
  --panel: #ffffff;
  --panel-2: #fbf6ec;
  --panel-3: #f3ebdb;
  --ink: #0e1726;
  --ink-2: #45566f;
  --ink-3: #77869d;
  --line: #e6dbc6;
  --line-2: #d8caae;
  --gold-ink: #8f5c06;
  --gold-soft: rgba(222, 146, 26, 0.12);
  --shadow-sm: 0 1px 2px rgba(14, 23, 38, .06), 0 2px 6px rgba(14, 23, 38, .05);
  --shadow-md: 0 2px 4px rgba(14, 23, 38, .05), 0 12px 28px -10px rgba(14, 23, 38, .18);
  --shadow-lg: 0 4px 8px rgba(14, 23, 38, .06), 0 32px 64px -24px rgba(14, 23, 38, .28);
  --on-gold: #121c2e;
  --grain-opacity: .035;
  --glow-1: rgba(222, 146, 26, .16);
  --glow-2: rgba(239, 226, 11, .10);
  --scheme: light;

  /* type */
  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-ui: "Instrument Sans", "Helvetica Neue", Helvetica, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* metrics */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shell: 1240px;
  --ease: cubic-bezier(.22, .68, .32, 1);
}

:root[data-theme="dark"],
:root:not([data-theme="light"]) {
  --bg: var(--navy-800);
  --bg-2: var(--navy-700);
  --panel: #111c2e;
  --panel-2: #172336;
  --panel-3: #1a2740;
  --ink: #edf2f9;
  --ink-2: #a4b3c9;
  --ink-3: #6e7f99;
  --line: #1e2c44;
  --line-2: #2a3a56;
  --gold-ink: #f0c53d;
  --gold-soft: rgba(232, 186, 21, .10);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, .35), 0 16px 36px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 4px 10px rgba(0, 0, 0, .4), 0 40px 80px -30px rgba(0, 0, 0, .85);
  --on-gold: #121c2e;
  --grain-opacity: .05;
  --glow-1: rgba(222, 146, 26, .20);
  --glow-2: rgba(239, 226, 11, .10);
  --scheme: dark;
}

/* explicit media query so "system" viewers get dark without a data-theme stamp */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f1e7;
    --bg-2: #fffdf8;
    --panel: #ffffff;
    --panel-2: #fbf6ec;
    --panel-3: #f3ebdb;
    --ink: #0e1726;
    --ink-2: #45566f;
    --ink-3: #77869d;
    --line: #e6dbc6;
    --line-2: #d8caae;
    --gold-ink: #8f5c06;
    --gold-soft: rgba(222, 146, 26, .12);
    --shadow-sm: 0 1px 2px rgba(14, 23, 38, .06), 0 2px 6px rgba(14, 23, 38, .05);
    --shadow-md: 0 2px 4px rgba(14, 23, 38, .05), 0 12px 28px -10px rgba(14, 23, 38, .18);
    --shadow-lg: 0 4px 8px rgba(14, 23, 38, .06), 0 32px 64px -24px rgba(14, 23, 38, .28);
    --grain-opacity: .035;
    --scheme: light;
  }
}

/* ---------- reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
/* modal <dialog> is centred by the UA with `margin: auto`, which the reset
   above would otherwise wipe out and pin the dialog to the top-left corner
   (visible in Firefox). Put it back explicitly. */
dialog { margin: auto; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: var(--scheme); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "cv05" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold-2); color: #121c2e; }

/* ---------- atmosphere --------------------------------------------------- */
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: var(--grain-blend, overlay);
}
:root[data-theme="dark"] .grain, :root:not([data-theme="light"]) .grain { --grain-blend: screen; }

.aura {
  position: fixed; z-index: 0; pointer-events: none; border-radius: 50%;
  filter: blur(90px);
}
.aura--a { top: -220px; right: -140px; width: 620px; height: 620px; background: radial-gradient(circle, var(--glow-1), transparent 68%); }
.aura--b { top: 42vh; left: -260px; width: 520px; height: 520px; background: radial-gradient(circle, var(--glow-2), transparent 70%); }

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 24px; position: relative; z-index: 1; }
@media (max-width: 640px) { .shell { padding-inline: 18px; } }

/* ---------- type --------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 20, "WONK" 1, "opsz" 40;
}
h1 { font-size: clamp(2.05rem, 6.4vw, 4.4rem); }
h2 { font-size: clamp(1.55rem, 4.6vw, 2.9rem); }
h3 { font-size: 1.32rem; letter-spacing: -.015em; }
h4 { font-size: 1.05rem; font-family: var(--f-ui); font-weight: 600; letter-spacing: -.01em; }
p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-ink);
  display: inline-flex; align-items: center; gap: .6em;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--gold-grad-flat); opacity: .8;
}
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 56ch; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--ink-3); }
.gold-text {
  background: var(--gold-grad-flat); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.ital { font-style: italic; font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 40; }

/* ---------- buttons ------------------------------------------------------ */
.btn {
  --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .72em 1.25em; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  font-size: .92rem; font-weight: 600; letter-spacing: -.005em;
  cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--gold {
  --btn-bg: none; --btn-fg: var(--on-gold); --btn-bd: transparent;
  background-image: var(--gold-grad);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 8px 22px -10px rgba(222, 146, 26, .9);
}
.btn--gold:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 14px 30px -12px rgba(222, 146, 26, 1); }
.btn--ghost { --btn-bd: var(--line-2); }
.btn--ghost:hover { --btn-bd: var(--gold-2); color: var(--gold-ink); }
.btn--quiet { --btn-bd: transparent; color: var(--ink-2); padding-inline: .8em; }
.btn--quiet:hover { color: var(--ink); background: var(--gold-soft); }
.btn--lg { padding: .95em 1.6em; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--sm { padding: .5em .9em; font-size: .82rem; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- badges / chips ---------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .32em .7em; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .01em;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--panel-2);
}
.badge--gold { border-color: color-mix(in oklab, var(--gold-2) 45%, transparent); color: var(--gold-ink); background: var(--gold-soft); }
.badge--ok { border-color: color-mix(in oklab, var(--ok) 40%, transparent); color: var(--ok); background: color-mix(in oklab, var(--ok) 12%, transparent); }
.badge--warn { border-color: color-mix(in oklab, var(--warn) 42%, transparent); color: var(--warn); background: color-mix(in oklab, var(--warn) 12%, transparent); }
.badge--bad { border-color: color-mix(in oklab, var(--bad) 42%, transparent); color: var(--bad); background: color-mix(in oklab, var(--bad) 12%, transparent); }
.badge--info { border-color: color-mix(in oklab, var(--info) 42%, transparent); color: var(--info); background: color-mix(in oklab, var(--info) 12%, transparent); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot--pulse { box-shadow: 0 0 0 0 currentColor; animation: pulse 2.4s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, currentColor 60%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* placeholder marker - every stub that must be replaced by a real integration */
.stub {
  display: inline-flex; align-items: center; gap: .4em;
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .25em .55em; border-radius: var(--r-xs);
  color: var(--warn); border: 1px dashed color-mix(in oklab, var(--warn) 50%, transparent);
  background: color-mix(in oklab, var(--warn) 8%, transparent);
}

/* ---------- surfaces ----------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card--pad { padding: 22px; }

/* ---------- header ------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.masthead__in { display: flex; align-items: center; gap: 20px; height: 70px; }
.brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: var(--navy-700);
  border: 1px solid var(--navy-400);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--gold-2) 18%, transparent), 0 6px 18px -8px rgba(222, 146, 26, .55);
  overflow: hidden;
}
.brand__mark img { width: 30px; height: 30px; }
.brand__word {
  font-family: var(--f-display); font-weight: 600; font-size: 1.16rem;
  letter-spacing: -.01em; line-height: 1;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 20;
}
.brand__word b { font-weight: 600; }
.brand__word span { color: var(--gold-ink); }
.brand__sub {
  display: block; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 3px;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: .5em .8em; border-radius: 999px; font-size: .9rem; color: var(--ink-2);
  transition: color .2s, background-color .2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--gold-soft); }
.masthead__tools { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--ink-2); background: var(--panel-2);
  transition: color .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { color: var(--gold-ink); border-color: color-mix(in oklab, var(--gold-2) 50%, transparent); }
.icon-btn svg { width: 17px; height: 17px; }

.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: .35em; padding: .45em .7em; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.lang__btn:hover { color: var(--gold-ink); }
.lang__menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 168px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); display: none; z-index: 70;
}
.lang.is-open .lang__menu { display: block; animation: pop .18s var(--ease); }
.lang__menu button {
  display: flex; width: 100%; align-items: center; gap: .6em; padding: .5em .6em;
  border-radius: var(--r-xs); font-size: .88rem; color: var(--ink-2); text-align: left;
}
.lang__menu button:hover { background: var(--gold-soft); color: var(--ink); }
.lang__menu button[aria-selected="true"] { color: var(--gold-ink); font-weight: 600; }
.lang__menu button i { font-family: var(--f-mono); font-style: normal; font-size: .7rem; color: var(--ink-3); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

.nav__cta { display: none; }
.burger { display: none; }
@media (max-width: 940px) {
  .nav, .masthead__tools .btn--gold { display: none; }
  .burger { display: grid; }
  .masthead.is-open .nav {
    display: flex; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column;
    align-items: stretch; gap: 2px; padding: 12px 18px 18px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .masthead.is-open .nav a { padding: .8em 1em; }
}

/* ---------- hero --------------------------------------------------------- */
.hero { position: relative; padding: clamp(38px, 6vw, 76px) 0 clamp(40px, 5vw, 68px); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 486px); gap: clamp(28px, 5vw, 64px); align-items: start;
}
@media (max-width: 1000px) { .hero__grid { grid-template-columns: 1fr; } }

.hero h1 { margin: 18px 0 0; max-width: 15ch; }
.hero h1 em { font-style: italic; font-variation-settings: "SOFT" 80, "WONK" 1, "opsz" 60; }
.hero__lede { margin-top: 22px; font-size: 1.12rem; color: var(--ink-2); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.trust { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.trust__item { display: flex; align-items: center; gap: 9px; font-size: .86rem; color: var(--ink-2); }
.trust__item svg { width: 17px; height: 17px; color: var(--gold-ink); flex: none; }

/* decorative ring echoing the logo target */
.ring {
  position: absolute; width: 560px; height: 560px; right: -180px; top: -60px; z-index: 0;
  opacity: .1; pointer-events: none;
  animation: spin 90s linear infinite;
}
:root[data-theme="dark"] .ring, :root:not([data-theme="light"]) .ring { opacity: .16; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- swap widget -------------------------------------------------- */
.swap {
  position: relative; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 20px;
}
.swap::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, color-mix(in oklab, var(--gold-2) 55%, transparent), transparent 42%, transparent 62%, color-mix(in oklab, var(--gold-1) 28%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.swap__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 4px 14px; }
.swap__title { font-family: var(--f-display); font-size: 1.15rem; font-variation-settings: "SOFT" 20, "opsz" 24; }
.swap__live { display: inline-flex; align-items: center; gap: .45em; font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }

.leg {
  position: relative; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px 16px 15px;
  transition: border-color .2s, background-color .2s;
}
.leg:focus-within { border-color: color-mix(in oklab, var(--gold-2) 62%, transparent); background: var(--gold-soft); }
.leg__label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .78rem; color: var(--ink-3); letter-spacing: .01em; margin-bottom: 8px;
}
.leg__row { display: flex; align-items: center; gap: 12px; }
.leg__amount {
  flex: 1 1 auto; min-width: 0; width: 100%;
  border: 0; background: none; padding: 0;
  font-family: var(--f-mono); font-size: clamp(1.5rem, 3.6vw, 1.95rem); font-weight: 500;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink);
}
.leg__amount::placeholder { color: var(--ink-3); opacity: .55; }
.leg__amount:focus { outline: none; }
.leg__amount[readonly] { cursor: default; }
.leg__fiat { font-family: var(--f-mono); font-size: .76rem; color: var(--ink-3); margin-top: 6px; }

.asset-btn {
  display: flex; align-items: center; gap: 9px; flex: none;
  padding: 7px 11px 7px 8px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--panel);
  transition: border-color .2s, transform .18s var(--ease), box-shadow .2s;
}
.asset-btn:hover { border-color: color-mix(in oklab, var(--gold-2) 60%, transparent); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.asset-btn__sym { font-weight: 700; font-size: .95rem; letter-spacing: -.01em; }
.asset-btn__net { display: block; font-family: var(--f-mono); font-size: .6rem; color: var(--ink-3); letter-spacing: .04em; margin-top: -1px; }
.asset-btn svg.chev { width: 13px; height: 13px; color: var(--ink-3); }

.coin {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-family: var(--f-ui); font-weight: 700; font-size: .68rem; letter-spacing: -.02em;
  color: #fff; background: #444;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.coin--lg { width: 34px; height: 34px; font-size: .78rem; }
.coin--btc { background: linear-gradient(150deg, #f7a13a, #e2811b); }
.coin--eth { background: linear-gradient(150deg, #8a92d6, #5b64b4); }
.coin--usdt { background: linear-gradient(150deg, #3ec6a0, #17a37c); }
.coin--usdc { background: linear-gradient(150deg, #4aa3f0, #2775ca); }
.coin--ltc { background: linear-gradient(150deg, #a6b0bd, #7a8794); }
.coin--sol { background: linear-gradient(150deg, #b06ef0, #14e3b5); }
.coin--ton { background: linear-gradient(150deg, #52a8f0, #0f7fd6); }
.coin--xrp { background: linear-gradient(150deg, #4a5560, #23292f); }
.coin--mdl { background: linear-gradient(150deg, #2f6fd0, #c2352f); }
.coin--eur { background: linear-gradient(150deg, #2a5cb8, #16336b); }
.coin--usd { background: linear-gradient(150deg, #3f8f5f, #1f5c3a); }
.coin--ron { background: linear-gradient(150deg, #d8b13a, #b3402f); }
.coin--uah { background: linear-gradient(150deg, #4a86d8, #e2c53a); }
.coin--card { background: linear-gradient(150deg, #55627a, #2c3648); }
.coin--bank { background: linear-gradient(150deg, #6b7c96, #38455c); }
.coin--cash { background: linear-gradient(150deg, #4f8f6a, #2c5a42); }
.coin--mia { background: linear-gradient(150deg, #e2635a, #a32f2a); }

.swap__mid { position: relative; height: 14px; }
.swap__flip {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line-2); color: var(--ink-2);
  box-shadow: var(--shadow-sm); z-index: 3;
  transition: transform .45s var(--ease), color .2s, border-color .2s;
}
.swap__flip:hover { color: var(--gold-ink); border-color: color-mix(in oklab, var(--gold-2) 65%, transparent); }
.swap__flip.is-spun { transform: translate(-50%, -50%) rotate(180deg); }
.swap__flip svg { width: 16px; height: 16px; }

.rateline {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding: 11px 14px; border-radius: var(--r-md);
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: .82rem;
}
.rateline__rate { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.rateline__rate b { font-weight: 500; color: var(--ink); }
.rateline__lock { color: var(--ink-3); font-family: var(--f-mono); font-size: .74rem; }

.breakdown { margin-top: 12px; border-radius: var(--r-md); border: 1px solid var(--line); overflow: hidden; }
.breakdown__toggle {
  display: flex; width: 100%; align-items: center; justify-content: space-between;
  padding: 10px 14px; font-size: .84rem; color: var(--ink-2); background: transparent;
}
.breakdown__toggle:hover { background: var(--gold-soft); }
.breakdown__toggle svg { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.breakdown.is-open .breakdown__toggle svg { transform: rotate(180deg); }
.breakdown__body { display: none; padding: 2px 14px 13px; }
.breakdown.is-open .breakdown__body { display: block; }
.breakdown__row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .84rem; color: var(--ink-2); }
.breakdown__row b { font-family: var(--f-mono); font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.breakdown__row--total { border-top: 1px dashed var(--line-2); margin-top: 6px; padding-top: 9px; color: var(--ink); font-weight: 600; }

.swap__cta { margin-top: 16px; }
.swap__note { margin-top: 12px; font-size: .74rem; color: var(--ink-3); text-align: center; line-height: 1.5; }
.swap__err { margin-top: 12px; font-size: .82rem; color: var(--bad); display: none; align-items: center; gap: .5em; }
.swap__err.is-on { display: flex; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  padding: .32em .68em; border-radius: 999px; border: 1px solid var(--line);
  font-family: var(--f-mono); font-size: .72rem; color: var(--ink-2); background: var(--panel);
  transition: all .18s var(--ease);
}
.chip:hover { border-color: color-mix(in oklab, var(--gold-2) 60%, transparent); color: var(--gold-ink); }

/* ---------- asset picker dialog ----------------------------------------- */
.picker {
  border: 0; padding: 0; background: transparent; max-width: 460px; width: calc(100% - 32px);
  max-height: calc(100dvh - 40px);
  margin: auto;                      /* centres the modal in every browser */
  border-radius: var(--r-xl); color: var(--ink);
}
.picker::backdrop { background: rgba(6, 11, 20, .62); backdrop-filter: blur(3px); }
.picker[open] { animation: dlg .22s var(--ease); }
@keyframes dlg { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.picker__panel { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.picker__head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.picker__head h3 { font-size: 1.05rem; margin-right: auto; }
.picker__search { display: flex; align-items: center; gap: 9px; margin: 12px 18px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); }
.picker__search input { flex: 1; border: 0; background: none; font-size: .92rem; }
.picker__search input:focus { outline: none; }
.picker__search svg { width: 15px; height: 15px; color: var(--ink-3); }
.picker__tabs { display: flex; gap: 6px; padding: 0 18px 12px; flex-wrap: wrap; }
.picker__tab { padding: .35em .8em; border-radius: 999px; border: 1px solid var(--line); font-size: .8rem; color: var(--ink-2); }
.picker__tab[aria-selected="true"] { background: var(--gold-grad); color: var(--on-gold); border-color: transparent; font-weight: 600; }
.picker__list { max-height: min(52vh, 420px); overflow-y: auto; padding: 4px 10px 12px; }
.picker__group { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding: 12px 8px 6px; }
.picker__item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 8px; border-radius: var(--r-sm);
  text-align: left; transition: background-color .16s;
}
.picker__item:hover, .picker__item:focus-visible { background: var(--gold-soft); }
.picker__item[aria-selected="true"] { background: var(--gold-soft); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--gold-2) 45%, transparent); }
.picker__item strong { font-size: .92rem; font-weight: 600; display: block; }
.picker__item small { color: var(--ink-3); font-size: .76rem; }
.picker__item .picker__meta { margin-left: auto; text-align: right; font-family: var(--f-mono); font-size: .74rem; color: var(--ink-3); }
.picker__empty { padding: 30px 12px; text-align: center; color: var(--ink-3); font-size: .88rem; }

/* ---------- development notice ------------------------------------------ */
.notice {
  border: 0; padding: 0; background: transparent;
  max-width: 470px; width: calc(100% - 32px);
  max-height: calc(100dvh - 40px); overflow: auto;
  margin: auto;                      /* centres the modal in every browser */
  border-radius: var(--r-xl); color: var(--ink);
}
.notice::backdrop { background: rgba(6, 11, 20, .72); backdrop-filter: blur(4px); }
.notice[open] { animation: noticeIn .3s var(--ease); }
@keyframes noticeIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

.notice__panel {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: 30px 28px 24px; text-align: center;
}
.notice__panel::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--warn), var(--gold-3));
}
.notice__panel::after {
  content: ""; position: absolute; width: 320px; height: 320px; right: -140px; top: -190px;
  background: radial-gradient(circle, var(--glow-1), transparent 68%); filter: blur(30px); pointer-events: none;
}
.notice__alert {
  position: relative; width: 58px; height: 58px; border-radius: 50%;
  margin: 0 auto 16px; display: grid; place-items: center;
  color: var(--warn);
  background: color-mix(in oklab, var(--warn) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--warn) 38%, transparent);
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--warn) 7%, transparent);
}
.notice__alert svg { width: 28px; height: 28px; }
.notice__eyebrow {
  position: relative; display: block; margin-bottom: 9px;
  font-family: var(--f-mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase; color: var(--warn);
}

.notice__mark {
  width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 18px;
  display: grid; place-items: center; position: relative;
  background: var(--navy-700); border: 1px solid var(--navy-400);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--gold-2) 22%, transparent), 0 10px 26px -10px rgba(222, 146, 26, .6);
}
.notice__mark img { width: 40px; height: 40px; }
.notice h2 {
  position: relative; font-size: 1.55rem; margin-bottom: 12px;
  font-variation-settings: "SOFT" 20, "WONK" 1, "opsz" 36;
}
.notice p {
  position: relative; font-size: .94rem; color: var(--ink-2); line-height: 1.62;
  max-width: 42ch; margin: 0 auto;
}
.notice__act { position: relative; display: grid; gap: 8px; margin-top: 24px; }
@media (max-width: 420px) {
  .notice__panel { padding: 24px 20px 20px; }
  .notice h2 { font-size: 1.35rem; }
}

/* ---------- ticker ------------------------------------------------------- */
.ticker { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; position: relative; z-index: 1; }
.ticker__track { display: flex; gap: 0; width: max-content; animation: slide 46s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.ticker__item { display: flex; align-items: center; gap: 10px; padding: 13px 26px; border-right: 1px solid var(--line); white-space: nowrap; }
.ticker__sym { font-weight: 600; font-size: .84rem; }
.ticker__px { font-family: var(--f-mono); font-size: .84rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.ticker__chg { font-family: var(--f-mono); font-size: .76rem; }
.up { color: var(--ok); } .down { color: var(--bad); }

/* ---------- sections ----------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section__head { max-width: 62ch; margin-bottom: clamp(28px, 4vw, 48px); }
.section__head h2 { margin-top: 14px; }
.section__head p { margin-top: 16px; color: var(--ink-2); font-size: 1.04rem; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative; padding: 26px 22px 24px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--panel); overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.step:hover { transform: translateY(-3px); border-color: color-mix(in oklab, var(--gold-2) 45%, transparent); box-shadow: var(--shadow-md); }
.step::after {
  counter-increment: s; content: "0" counter(s);
  position: absolute; right: 14px; top: 4px;
  font-family: var(--f-display); font-size: 3.6rem; font-weight: 600;
  color: transparent; -webkit-text-stroke: 1px var(--line-2); opacity: .9;
}
.step h3 { margin: 14px 0 8px; font-size: 1.16rem; }
.step p { color: var(--ink-2); font-size: .94rem; }
.step__ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); border: 1px solid color-mix(in oklab, var(--gold-2) 30%, transparent); }
.step__ico svg { width: 19px; height: 19px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.feat { padding: 24px 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
.feat h3 { font-size: 1.06rem; font-family: var(--f-ui); font-weight: 600; margin: 13px 0 7px; letter-spacing: -.01em; }
.feat p { font-size: .92rem; color: var(--ink-2); }
.feat__ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--gold-ink); background: var(--gold-soft); }
.feat__ico svg { width: 17px; height: 17px; }

/* fee table */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
table.data { min-width: 560px; font-size: .9rem; }
table.data th, table.data td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
table.data thead th {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500; background: var(--panel-2); white-space: nowrap;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background-color .16s; }
table.data tbody tr:hover { background: var(--gold-soft); }
table.data td.num, table.data th.num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 4px; cursor: pointer; list-style: none;
  font-family: var(--f-display); font-size: 1.12rem; font-variation-settings: "SOFT" 20, "opsz" 24;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 11px; height: 11px; flex: none;
  border-right: 1.5px solid var(--gold-ink); border-bottom: 1.5px solid var(--gold-ink);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq details p { padding: 0 4px 22px; color: var(--ink-2); max-width: 78ch; font-size: .95rem; }

/* CTA band */
.band {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  background: var(--navy-700); color: #edf2f9;
  border: 1px solid var(--navy-400);
  padding: clamp(32px, 5vw, 58px);
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.band::before {
  content: ""; position: absolute; width: 460px; height: 460px; right: -120px; bottom: -240px;
  background: radial-gradient(circle, rgba(232, 186, 21, .28), transparent 66%); filter: blur(40px);
}
.band h2 { color: #fff; max-width: 18ch; position: relative; }
.band p { color: #a4b3c9; margin-top: 12px; max-width: 44ch; position: relative; }
.band__act { position: relative; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- footer ------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 30px; position: relative; z-index: 1; }
.foot__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; }
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } }
.foot h5 { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.foot ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.foot a { font-size: .9rem; color: var(--ink-2); }
.foot a:hover { color: var(--gold-ink); }
.foot__legal { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-3); }
.foot__disc { margin-top: 16px; font-size: .8rem; color: var(--ink-3); max-width: 70ch; line-height: 1.65; }

/* ---------- auth --------------------------------------------------------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__aside { display: none; } }
.auth__aside {
  position: relative; overflow: hidden; padding: 48px;
  background: var(--navy-700); color: #edf2f9;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth__aside::before {
  content: ""; position: absolute; width: 620px; height: 620px; left: -180px; bottom: -300px;
  background: radial-gradient(circle, rgba(222, 146, 26, .3), transparent 65%); filter: blur(50px);
}
.auth__aside .ring { opacity: .14; right: -220px; top: 20%; }
.auth__quote { position: relative; font-family: var(--f-display); font-size: 1.9rem; line-height: 1.24; max-width: 16ch; }
.auth__points { position: relative; display: grid; gap: 14px; margin-top: 30px; }
.auth__points li { display: flex; gap: 11px; align-items: flex-start; font-size: .92rem; color: #a4b3c9; }
.auth__points svg { width: 17px; height: 17px; color: var(--gold-2); flex: none; margin-top: 3px; }
.auth__main { display: grid; place-items: center; padding: 40px 24px; }
.auth__card { width: 100%; max-width: 420px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 26px; }
.tabs button { flex: 1; padding: .6em 1em; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--ink-3); }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-sm); }

.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-size: .82rem; color: var(--ink-2); font-weight: 500; }
.field .hint { font-size: .76rem; color: var(--ink-3); }
.input {
  width: 100%; padding: .78em .9em; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink);
  font-size: .95rem; transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: color-mix(in oklab, var(--gold-2) 70%, transparent); background: var(--panel); box-shadow: 0 0 0 3px var(--gold-soft); }
.input--mono { font-family: var(--f-mono); font-size: .88rem; letter-spacing: -.01em; }
textarea.input { resize: vertical; min-height: 84px; }
.inputwrap { position: relative; display: flex; align-items: center; }
.inputwrap .input { padding-right: 3rem; }
.inputwrap button { position: absolute; right: 10px; color: var(--ink-3); font-size: .78rem; }
.inputwrap button:hover { color: var(--gold-ink); }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--ink-2); }
.check input { margin-top: 4px; accent-color: var(--gold-1); }
.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--ink-3); font-size: .78rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.otp { display: flex; gap: 9px; justify-content: center; margin: 8px 0 4px; }
.otp input {
  width: 46px; height: 56px; text-align: center; font-family: var(--f-mono); font-size: 1.3rem;
  border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink);
}
.otp input:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 3px var(--gold-soft); }
.pwmeter { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 3px; }
.pwmeter i { display: block; height: 100%; width: 0; background: var(--gold-grad-flat); transition: width .3s var(--ease), background-color .3s; }

/* ---------- app shell (account + admin) ---------------------------------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
@media (max-width: 940px) { .app { grid-template-columns: 1fr; } }
.side {
  border-right: 1px solid var(--line); background: var(--bg-2);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
}
@media (max-width: 940px) { .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); } }
.side .brand { margin: 6px 8px 20px; }
.side__group { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); padding: 16px 10px 7px; }
.side a {
  display: flex; align-items: center; gap: 11px; padding: .62em .7em; border-radius: var(--r-sm);
  font-size: .9rem; color: var(--ink-2); transition: background-color .18s, color .18s;
}
.side a:hover { background: var(--gold-soft); color: var(--ink); }
.side a[aria-current="page"] { background: var(--gold-soft); color: var(--gold-ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--gold-2); }
.side a svg { width: 16px; height: 16px; flex: none; }
.side a .count { margin-left: auto; font-family: var(--f-mono); font-size: .7rem; color: var(--ink-3); }
.side__foot { margin-top: auto; padding: 14px 8px 4px; border-top: 1px solid var(--line); }

.main { padding: 26px 30px 60px; min-width: 0; }
@media (max-width: 640px) { .main { padding: 20px 18px 44px; } }
.topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.topbar h1 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-right: auto; }
.topbar__sub { font-size: .88rem; color: var(--ink-3); margin-top: 4px; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); position: relative; overflow: hidden; }
.tile__k { font-size: .76rem; color: var(--ink-3); display: flex; align-items: center; gap: .5em; }
.tile__v { font-family: var(--f-mono); font-size: 1.6rem; font-weight: 500; letter-spacing: -.03em; margin-top: 7px; font-variant-numeric: tabular-nums; }
.tile__d { font-size: .76rem; margin-top: 5px; color: var(--ink-3); }
.tile--gold { background: var(--navy-700); border-color: var(--navy-400); color: #edf2f9; }
.tile--gold .tile__k, .tile--gold .tile__d { color: #8fa0b8; }
.tile--gold .tile__v { color: var(--gold-2); }

.panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; margin-bottom: 20px; }
.panel__head { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel__head h3 { font-size: 1.02rem; font-family: var(--f-ui); font-weight: 600; margin-right: auto; letter-spacing: -.01em; }
.panel__body { padding: 18px; }
.panel__body--flush { padding: 0; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.select {
  padding: .45em 2em .45em .75em; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--panel-2); font-size: .84rem; color: var(--ink-2);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.search-sm { display: flex; align-items: center; gap: 8px; padding: .38em .7em; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); }
.search-sm input { border: 0; background: none; font-size: .84rem; width: 150px; }
.search-sm input:focus { outline: none; }
.search-sm svg { width: 14px; height: 14px; color: var(--ink-3); }

/* log stream */
.logs { font-family: var(--f-mono); font-size: .78rem; background: var(--navy-900); color: #c8d4e6; max-height: 460px; overflow-y: auto; }
:root[data-theme="light"] .logs { background: #10192a; }
.logline { display: grid; grid-template-columns: 84px 62px 118px minmax(0, 1fr); gap: 12px; padding: 7px 16px; border-bottom: 1px solid rgba(255, 255, 255, .05); align-items: baseline; }
.logline:hover { background: rgba(232, 186, 21, .07); }
.logline time { color: #64748b; }
.logline .lvl { font-weight: 600; letter-spacing: .05em; }
.logline .src { color: #7d8fa8; }
.logline .msg { color: #cbd5e1; word-break: break-word; }
.logline .msg b { color: #fff; font-weight: 500; }
.lvl--info { color: #6aa6dd; } .lvl--warn { color: #e8a33d; } .lvl--err { color: #e2635a; } .lvl--ok { color: #35b98a; } .lvl--audit { color: #c8a2e8; }
@media (max-width: 760px) { .logline { grid-template-columns: 68px 52px; grid-template-areas: "t l" "s s" "m m"; } .logline time { grid-area: t; } .logline .lvl { grid-area: l; } .logline .src { grid-area: s; } .logline .msg { grid-area: m; } }

/* status pill in tables */
.st { display: inline-flex; align-items: center; gap: .45em; font-size: .78rem; font-weight: 600; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st--done { color: var(--ok); } .st--pend { color: var(--warn); } .st--fail { color: var(--bad); } .st--new { color: var(--info); }

/* progress / meters */
.meter { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--gold-grad-flat); }

/* stepper */
.stepper { display: flex; gap: 0; margin-bottom: 30px; flex-wrap: wrap; }
.stepper__i { display: flex; align-items: center; gap: 10px; padding-right: 18px; color: var(--ink-3); font-size: .88rem; }
.stepper__i::after { content: ""; width: 34px; height: 1px; background: var(--line-2); margin-left: 18px; }
.stepper__i:last-child::after { display: none; }
.stepper__n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font-family: var(--f-mono); font-size: .76rem; flex: none; }
.stepper__i.is-on { color: var(--ink); font-weight: 600; }
.stepper__i.is-on .stepper__n { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); font-weight: 700; }
.stepper__i.is-done .stepper__n { border-color: var(--ok); color: var(--ok); }

/* timeline */
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 14px; padding-bottom: 20px; position: relative; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: 12px; top: 24px; bottom: 0; width: 1px; background: var(--line-2); }
.tl:last-child::before { display: none; }
.tl__d { width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--panel); z-index: 1; }
.tl__d svg { width: 12px; height: 12px; }
.tl.is-done .tl__d { border-color: var(--ok); color: var(--ok); }
.tl.is-now .tl__d { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); }
.tl__t { font-weight: 600; font-size: .92rem; }
.tl__s { font-size: .84rem; color: var(--ink-3); margin-top: 2px; }

/* copy row */
.copyrow { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--panel-2); }
.copyrow code { font-family: var(--f-mono); font-size: .84rem; word-break: break-all; overflow-wrap: anywhere; flex: 1; min-width: 0; color: var(--ink); }

/* toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; max-width: min(360px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: var(--shadow-md); font-size: .88rem;
  animation: toastIn .3s var(--ease);
}
.toast svg { width: 16px; height: 16px; color: var(--gold-ink); flex: none; margin-top: 2px; }
.toast.is-out { animation: toastOut .25s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; } }

/* mockup banner */
.mockbar {
  position: relative; z-index: 70;
  background: var(--navy-900); color: #d7e0ee;
  font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 7px 0;
}
.mockbar__in { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; text-align: center; }
.mockbar b { color: var(--gold-2); font-weight: 500; }
.mockbar a { color: #d7e0ee; text-decoration: underline; text-underline-offset: 3px; }

/* utilities */
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 34px; }
.tar { text-align: right; }
.nowrap { white-space: nowrap; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}


/* ==========================================================================
   MOBILE
   Phones first: the layout above is written for wide screens, everything
   below adapts it. Tested breakpoints: 940 (tablet), 720, 560, 400 (small).
   ========================================================================== */

/* safe areas on notched devices */
@supports (padding: max(0px)) {
  .shell { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  .foot { padding-bottom: max(30px, env(safe-area-inset-bottom)); }
}

/* ---- header ------------------------------------------------------------ */
@media (max-width: 940px) {
  .masthead__in { height: 62px; gap: 10px; }
  /* the account buttons move into the burger menu, so the bar stays uncluttered */
  .masthead__tools > .btn { display: none; }
  .masthead.is-open .nav { max-height: calc(100dvh - 62px); overflow-y: auto; }
  .masthead.is-open .nav__cta { display: grid; gap: 8px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
  .masthead.is-open .nav a { padding: .85em 1em; border-radius: var(--r-sm); }
  .masthead.is-open .nav { top: 62px; }
}

/* ---- hero and the widget ---------------------------------------------- */
@media (max-width: 720px) {
  .hero { padding-top: 26px; }
  .hero h1 { max-width: none; }
  .hero__lede { font-size: 1.02rem; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
  .trust { gap: 10px 18px; margin-top: 28px; padding-top: 20px; }
  .trust__item { font-size: .84rem; }
  .ring { width: 400px; height: 400px; right: -160px; top: -40px; }
  .swap { padding: 16px; border-radius: var(--r-lg); }
  .section { padding: 48px 0; }
  .section__head { margin-bottom: 26px; }
  .band { padding: 28px 22px; }
  .band__act { width: 100%; }
  .band__act .btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 400px) {
  .leg { padding: 12px 13px 13px; }
  .leg__amount { font-size: 1.42rem; }
  .asset-btn { padding: 6px 9px 6px 6px; gap: 7px; }
  .asset-btn .coin { width: 24px; height: 24px; font-size: .58rem; }
  .asset-btn__sym { font-size: .86rem; }
  .chips { gap: 5px; }
  .chip { font-size: .68rem; padding: .3em .55em; }
  .rateline { font-size: .78rem; padding: 9px 11px; }
}

/* ---- three column summaries stack ------------------------------------- */
@media (max-width: 560px) {
  .summary { display: grid; grid-template-columns: 1fr; gap: 14px; }
  .summary > .tar, .summary .tar { text-align: left; }
  .summary > svg { display: none; }
  .stepper { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin-bottom: 22px; }
  .stepper::-webkit-scrollbar { display: none; }
  .stepper__i { flex: none; font-size: .82rem; padding-right: 12px; }
  .stepper__i::after { width: 20px; margin-left: 12px; }
  .faq summary { font-size: 1rem; padding: 16px 2px; }
  .faq details p { font-size: .9rem; padding-bottom: 18px; }
  .foot { padding-top: 40px; }
  .foot__legal { flex-direction: column; gap: 8px; }
}

/* ---- app shell: the sidebar becomes a scrolling top bar ---------------- */
@media (max-width: 940px) {
  .side {
    flex-direction: row; align-items: center; gap: 4px;
    height: auto; padding: 9px 14px;
    overflow-x: auto; overflow-y: hidden;
    position: sticky; top: 0; z-index: 55;
    background: color-mix(in oklab, var(--bg-2) 94%, transparent);
    backdrop-filter: saturate(150%) blur(12px);
    scrollbar-width: none;
  }
  .side::-webkit-scrollbar { display: none; }
  .side .brand { margin: 0 8px 0 0; flex: none; }
  .side .brand__sub { display: none; }
  .side__group { display: none; }
  .side a { flex: none; white-space: nowrap; padding: .5em .75em; font-size: .86rem; }
  .side a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold-2); }
  .side__foot { margin: 0 0 0 auto; padding: 0 0 0 10px; border-top: 0; flex: none; display: flex; align-items: center; gap: 8px; }
  .side__foot > .row:first-child { display: none; }  /* the avatar block */
  .side__foot .row { margin: 0 !important; }
  .side__foot .lang__menu { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; }
  .main { padding: 20px 16px 40px; }
  .topbar { margin-bottom: 20px; }
}

/* ---- tables keep their own scroll, and say so ------------------------- */
@media (max-width: 720px) {
  .tablewrap { -webkit-overflow-scrolling: touch; }
  table.data th, table.data td { padding: 11px 14px; }
  .panel__head { padding: 13px 14px; }
  .panel__body { padding: 14px; }
  .filters { width: 100%; }
  .search-sm { flex: 1 1 auto; }
  .search-sm input { width: 100%; }
  .tiles { gap: 10px; }
  .tile { padding: 14px 15px; }
  .tile__v { font-size: 1.4rem; }
}

/* ---- forms: 16px stops iOS Safari zooming on focus -------------------- */
@media (max-width: 720px) {
  .input, .select, .search-sm input, .picker__search input { font-size: 16px; }
  .otp input { width: 44px; height: 52px; font-size: 1.15rem; }
  .otp { gap: 6px; }
  .auth__main { padding: 26px 18px 40px; }
  .field { margin-bottom: 13px; }
}

/* ---- comfortable touch targets ---------------------------------------- */
@media (hover: none) {
  .btn--sm { padding: .6em 1.05em; }
  .icon-btn { width: 40px; height: 40px; }
  .nav a { padding: .7em .9em; }
  .picker__item { padding: 12px 8px; }
  .lang__menu button { padding: .7em .6em; }
  .breakdown__toggle { padding: 13px 14px; }
}

/* ---- the notice popup on a phone -------------------------------------- */
@media (max-width: 520px) {
  .notice { width: calc(100% - 24px); }
  .notice__panel { padding: 26px 20px 20px; }
  .notice__alert { width: 52px; height: 52px; }
  .notice__alert svg { width: 25px; height: 25px; }
  .notice p { font-size: .9rem; }
  .mockbar { font-size: .64rem; letter-spacing: .06em; }
}

/* ---- landscape phones: don't waste the little height there is --------- */
@media (max-height: 500px) and (orientation: landscape) {
  .notice__panel { padding: 18px 20px 16px; }
  .notice__alert { width: 40px; height: 40px; margin-bottom: 10px; }
  .notice__alert svg { width: 20px; height: 20px; }
  .notice h2 { font-size: 1.2rem; }
  .hero { padding-top: 20px; }
}
