/* Asklepion site. Layout: case-record ledger on porcelain, with abaton-dark bands for the hero and the Votives.
   Cards are specimen labels: a notched header strip, perforated divider, faint guilloche watermark. */
:root {
  --bg: #E9F0EE; --panel: #F6FAF9; --panel-2: #EEF4F2;
  --ink: #0D2427; --muted: #4C6567; --line: #C3D3CF;
  --patina: #24705F; --brass: #8C6A1C; --assay: #5B4C9A;
  --abaton: #071517; --abaton-2: #0C2023; --abaton-ink: #E2ECEA; --abaton-muted: #8AA5A3; --abaton-line: #1C3639;
  --gold: #D3AE58; --verdigris: #5DBBA5;
  --mark-bg: var(--bg);
  --f-display: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08181A; --panel: #0D2124; --panel-2: #10272A; --ink: #E2ECEA; --muted: #8AA5A3; --line: #1E393C;
    --patina: #5DBBA5; --brass: #D3AE58; --assay: #A79AE8; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--verdigris); outline-offset: 3px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
.mono { font-family: var(--f-mono); }
.label { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { text-wrap: balance; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

/* ---------------------------------------------------------------- header */
header.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--abaton) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--abaton-line); color: var(--abaton-ink); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--abaton-ink); --mark-bg: var(--abaton); }
.brand svg { width: 30px; height: 30px; }
.brand span { font-family: var(--f-display); font-size: 1.28rem; letter-spacing: 0.08em; }
nav.main { display: flex; gap: 24px; font-size: 0.92rem; }
nav.main a { text-decoration: none; color: var(--abaton-muted); }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--abaton-ink); }
.pill { font-family: var(--f-mono); font-size: 0.72rem; border: 1px solid var(--abaton-line); padding: 5px 10px; border-radius: 999px; color: var(--abaton-muted); white-space: nowrap; }
.pill b { color: var(--gold); font-weight: 500; }
@media (max-width: 780px) { nav.main { display: none; } }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font: 500 0.95rem var(--f-body); padding: 12px 18px; border-radius: var(--radius); border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn.gold { background: linear-gradient(180deg, #E4C371, #B98E35); color: #1A1406; border-color: #C9A04A; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 18px -8px rgba(211,174,88,.6); }
.btn.gold:hover { background: linear-gradient(180deg, #EDCD7D, #C29A3E); }
.btn.line { background: transparent; color: var(--abaton-ink); border-color: var(--abaton-line); }
.btn.line:hover { border-color: var(--abaton-muted); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------------------------------------------------------------- dark bands */
.abaton { background: var(--abaton); color: var(--abaton-ink); position: relative; overflow: hidden; --mark-bg: var(--abaton); }
.abaton .label { color: var(--abaton-muted); }
.abaton::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(1200px 600px at 78% 40%, rgba(93,187,165,.16), transparent 60%),
  radial-gradient(700px 500px at 10% 110%, rgba(211,174,88,.08), transparent 60%); pointer-events: none; }
.abaton .wm { position: absolute; width: 900px; aspect-ratio: 1; right: -220px; top: 50%; translate: 0 -50%; opacity: .07; filter: invert(1); pointer-events: none; }

/* ---------------------------------------------------------------- hero */
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 72px 64px; }
.hero h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.7rem, 6vw, 4.6rem); line-height: 1.03; margin: 14px 0 20px; letter-spacing: -0.005em; }
.hero h1 em { font-style: normal; color: var(--verdigris); }
.hero h1 i { font-style: normal; background: linear-gradient(180deg, #F0D488, #B98E35); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-size: 1.2rem; color: var(--abaton-muted); max-width: 36ch; margin: 0 0 30px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--abaton-line); }
.hero .stats b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.6rem; color: var(--abaton-ink); }
.hero .stats span { font-size: 0.82rem; color: var(--abaton-muted); }
.coin-stage { position: relative; aspect-ratio: 18 / 11; max-width: 100%; }
.coin-stage img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; mask-image: radial-gradient(closest-side, #000 72%, transparent 100%); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; padding-block: 36px 44px; } .coin-stage { order: -1; } }

/* ---------------------------------------------------------------- sections */
section.band { padding-block: 72px; border-top: 1px solid var(--line); }
section.band h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.1; margin: 8px 0 12px; }
section.band .intro { color: var(--muted); max-width: 64ch; margin: 0 0 32px; }
.abaton section.band, section.band.abaton { border-top-color: var(--abaton-line); }
.abaton .intro, .abaton section.band .intro { color: var(--abaton-muted); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.steps > div { padding: 26px 24px; min-width: 0; position: relative; }
.steps > div + div { border-left: 1px solid var(--line); }
.steps h3 { font-family: var(--f-display); font-weight: 400; font-size: 1.55rem; margin: 6px 0 8px; }
.steps p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.steps .label { color: var(--patina); }
.steps > div:nth-child(n+2) .label { color: var(--brass); }
.steps > div::after { content: ""; position: absolute; right: -9px; top: 32px; width: 16px; height: 16px; background: var(--panel); border-top: 1px solid var(--line); border-right: 1px solid var(--line); rotate: 45deg; z-index: 1; }
.steps > div:last-child::after { display: none; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } .steps > div + div { border-left: 0; border-top: 1px solid var(--line); } .steps > div::after { display: none; } }

/* ---------------------------------------------------------------- specimen cards */
.reg-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 0.85rem var(--f-body); padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.note { font-size: 0.85rem; color: var(--muted); margin: 0 0 20px; display: flex; gap: 8px; align-items: center; }
.note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brass); flex: none; }
.register { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 780px) { .register { grid-template-columns: 1fr; } }

.spec { --k: var(--patina); position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; min-width: 0; isolation: isolate; transition: border-color .15s ease, translate .15s ease; }
.spec:hover { border-color: color-mix(in srgb, var(--k) 55%, var(--line)); translate: 0 -2px; }
.spec[data-k="campaign"], .spec[data-k="market"], .spec[data-k="share"] { --k: var(--brass); }
.spec[data-k="bounty"] { --k: var(--assay); }
.spec::before { content: ""; position: absolute; width: 260px; aspect-ratio: 1; right: -90px; bottom: -110px; background: url(/img/guilloche.svg) center / contain no-repeat; opacity: .07; z-index: -1; }
@media (prefers-color-scheme: dark) { .spec::before { filter: invert(1); opacity: .06; } }
.spec .tag { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: color-mix(in srgb, var(--k) 9%, var(--panel)); border-bottom: 1px dashed color-mix(in srgb, var(--k) 35%, var(--line)); position: relative; }
.spec .tag::before, .spec .tag::after { content: ""; position: absolute; bottom: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.spec .tag::before { left: -8px; } .spec .tag::after { right: -8px; }
.kind { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--k); font-weight: 500; }
.acc { font-family: var(--f-mono); font-size: 0.74rem; color: var(--muted); }
.spec .body { padding: 16px 16px 14px; display: grid; gap: 12px; }
.spec h3 { font-weight: 600; font-size: 1.04rem; line-height: 1.38; margin: 0; }
.meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.meta div { min-width: 0; }
.meta dt { font-family: var(--f-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 3px 0 0; font-family: var(--f-mono); font-size: 0.86rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bar { height: 6px; background: color-mix(in srgb, var(--k) 14%, var(--line)); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--k) 70%, #fff), var(--k)); }
.stamp { display: inline-block; font-family: var(--f-mono); font-size: 0.68rem; letter-spacing: .06em; padding: 2px 7px; border: 1px solid currentColor; border-radius: 2px; rotate: -2deg; }
.stamp.ok { color: var(--patina); } .stamp.agent { color: var(--assay); }

/* ---------------------------------------------------------------- votives */
.vgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vcard { margin: 0; background: var(--abaton-2); border: 1px solid var(--abaton-line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s ease, translate .2s ease; }
.vcard:hover { border-color: color-mix(in srgb, var(--gold) 50%, var(--abaton-line)); translate: 0 -3px; }
.vcard svg { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.vcard figcaption { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px 12px; border-top: 1px solid var(--abaton-line); }
.vcard figcaption b { font-family: var(--f-display); font-weight: 400; font-size: 1.1rem; }
.vcard figcaption span { font-family: var(--f-mono); font-size: 0.72rem; color: var(--abaton-muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 18px; border: 1px solid var(--abaton-line); border-radius: var(--radius); overflow: hidden; }
.facts > div { padding: 18px 20px; border-right: 1px solid var(--abaton-line); border-bottom: 1px solid var(--abaton-line); margin: 0 -1px -1px 0; min-width: 0; }
.facts b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.55rem; color: var(--gold); }
.facts span { color: var(--abaton-muted); font-size: 0.9rem; }

/* ---------------------------------------------------------------- token */
.token { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
.token .coin { width: min(380px, 100%); height: auto; aspect-ratio: 1; justify-self: center; filter: drop-shadow(0 30px 40px rgba(7,21,23,.35)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -8px; } }
@media (max-width: 860px) { .token { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- agents */
.agents { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 880px) { .agents { grid-template-columns: 1fr; } }
.term { background: var(--abaton); color: var(--abaton-ink); border: 1px solid var(--abaton-line); border-radius: 6px; overflow: hidden; }
.term .bar-top { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--abaton-line); align-items: center; }
.term .bar-top i { width: 9px; height: 9px; border-radius: 50%; background: var(--abaton-line); }
.term .bar-top span { margin-left: auto; font-family: var(--f-mono); font-size: 0.7rem; color: var(--abaton-muted); }
.term pre { margin: 0; padding: 16px 18px; font-family: var(--f-mono); font-size: 0.82rem; line-height: 1.75; overflow-x: auto; }
.term .c { color: var(--abaton-muted); } .term .g { color: var(--verdigris); } .term .y { color: var(--gold); }
table.classes { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.classes th, table.classes td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.classes th { font-family: var(--f-mono); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
table.classes td:first-child { font-family: var(--f-mono); white-space: nowrap; }
.tbl { overflow-x: auto; }

/* ---------------------------------------------------------------- fees */
.ledger { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.ledger .row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ledger .row:last-child { border-bottom: 0; }
.ledger b { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; color: var(--brass); font-variant-numeric: tabular-nums; }
.ledger .who { font-family: var(--f-mono); font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; white-space: nowrap; }
@media (max-width: 640px) { .ledger .row { grid-template-columns: 1fr; gap: 4px; } }
.split { display: grid; grid-template-columns: 7fr 3fr; height: 44px; border-radius: var(--radius); overflow: hidden; margin-top: 18px; font-family: var(--f-mono); font-size: 0.78rem; }
.split div { display: flex; align-items: center; padding: 0 14px; }
.split div:first-child { background: var(--ink); color: var(--bg); }
.split div:last-child { background: linear-gradient(90deg, #C9A04A, #E4C371); color: #1A1406; }
.fine { font-size: 0.85rem; color: var(--muted); max-width: 72ch; margin-top: 14px; }

footer { background: var(--abaton); color: var(--abaton-muted); border-top: 1px solid var(--abaton-line); padding-block: 30px 44px; font-size: 0.85rem; --mark-bg: var(--abaton); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }

/* ---------------------------------------------------------------- mint page */
.mint { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-block: 64px; position: relative; }
@media (max-width: 860px) { .mint { grid-template-columns: 1fr; padding-block: 36px; } }
.mint h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.05; margin: 12px 0 16px; }
.mint p { color: var(--abaton-muted); max-width: 44ch; }
.mintbox { background: color-mix(in srgb, var(--abaton-2) 92%, transparent); border: 1px solid var(--abaton-line); border-radius: 6px; padding: 22px; display: grid; gap: 16px; }
.supply { display: grid; gap: 8px; }
.supply .nums { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 0.85rem; color: var(--abaton-muted); }
.supply .nums b { color: var(--abaton-ink); font-weight: 500; }
.supply .track { height: 8px; background: var(--abaton-line); border-radius: 4px; overflow: hidden; }
.supply .track i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #B98E35, #E4C371); transition: width .6s ease; }
.state { font-family: var(--f-mono); font-size: 0.82rem; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--abaton-line); color: var(--abaton-muted); }
.state.ok { border-color: color-mix(in srgb, var(--verdigris) 50%, var(--abaton-line)); color: var(--verdigris); }
.state.err { border-color: #7A3B3B; color: #E9A3A3; }
.preview-votive { width: min(420px, 100%); justify-self: center; border-radius: 6px; overflow: hidden; border: 1px solid var(--abaton-line); box-shadow: 0 40px 80px -40px rgba(0,0,0,.8); }
.preview-votive svg { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

/* ================================================================ app pages */
body.app { background: var(--bg); }
.mobile-nav { display: none; }
@media (max-width: 780px) {
  .mobile-nav { display: flex; gap: 18px; overflow-x: auto; padding: 8px max(18px, env(safe-area-inset-left, 0px)) 10px; border-top: 1px solid var(--abaton-line); font-size: .88rem; scrollbar-width: none; }
  .mobile-nav a { color: var(--abaton-muted); text-decoration: none; white-space: nowrap; }
  .mobile-nav a[aria-current="page"] { color: var(--gold); }
}
.page-head { background: var(--abaton); color: var(--abaton-ink); position: relative; overflow: hidden; border-bottom: 1px solid var(--abaton-line); }
.page-head::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 300px at 85% 0%, rgba(93,187,165,.14), transparent 60%); }
.page-head .wrap { position: relative; padding-block: 40px 34px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; }
.page-head h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4vw, 2.8rem); margin: 8px 0 6px; line-height: 1.1; }
.page-head p { margin: 0; color: var(--abaton-muted); max-width: 60ch; }
.page-head .label { color: var(--abaton-muted); }
.page { padding-block: 34px 70px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px dashed var(--line); }
.panel-h h2, .panel-h h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.25rem; }
.panel-b { padding: 16px; display: grid; gap: 14px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: .92rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
input.field, select.field, textarea.field { width: 100%; font: 400 .95rem var(--f-body); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
input.field:focus, select.field:focus, textarea.field:focus { outline: 2px solid color-mix(in srgb, var(--patina) 50%, transparent); border-color: var(--patina); }
textarea.field { min-height: 84px; resize: vertical; }
label.f { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
label.f > span { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } }
.hint { font-size: .82rem; color: var(--muted); margin: 0; }
.btn.block { width: 100%; justify-content: center; }
.btn.small { padding: 6px 11px; font-size: .82rem; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }

/* explorer table */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 760px; }
table.list th { text-align: left; font-family: var(--f-mono); font-weight: 500; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
table.list td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { cursor: pointer; transition: background .12s; }
table.list tbody tr:hover { background: color-mix(in srgb, var(--brass) 6%, transparent); }
.tk { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tk .glyph { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--f-display); font-size: .95rem; color: #1A1406; background: radial-gradient(circle at 35% 30%, #F0D488, #B98E35 70%); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.tk b { display: block; font-weight: 600; }
.tk span { font-family: var(--f-mono); font-size: .75rem; color: var(--muted); }
.mono.r { text-align: right; }
.up { color: var(--patina); } .down { color: #B5524C; }
.badge { display: inline-block; font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; padding: 2px 6px; border-radius: 2px; border: 1px solid currentColor; margin-left: 6px; color: var(--patina); vertical-align: 2px; }

/* token page */
.tgrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 920px) { .tgrid { grid-template-columns: 1fr; } }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.stats4 > div { padding: 12px 14px; border-right: 1px solid var(--line); min-width: 0; }
.stats4 > div:last-child { border-right: 0; }
.stats4 dt { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stats4 dd { margin: 4px 0 0; font-family: var(--f-mono); font-size: .98rem; overflow-wrap: anywhere; }
@media (max-width: 640px) { .stats4 { grid-template-columns: 1fr 1fr; } .stats4 > div:nth-child(2) { border-right: 0; } .stats4 > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
#chart { height: 340px; }
.swap .tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.swap .tabs button { font: 600 .95rem var(--f-body); padding: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.swap .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brass); }
.amt { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.amt .top { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); font-family: var(--f-mono); }
.amt input { border: 0; background: transparent; font: 400 1.6rem var(--f-mono); color: var(--ink); width: 100%; padding: 0; outline: none; }
.amt .max { background: none; border: 0; color: var(--brass); font: 500 .78rem var(--f-mono); cursor: pointer; padding: 0; }
.kv { display: grid; gap: 6px; font-size: .86rem; }
.kv div { display: flex; justify-content: space-between; gap: 12px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-family: var(--f-mono); text-align: right; overflow-wrap: anywhere; }
.trades td, .trades th { font-size: .84rem; }
.split-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; }
.split-bar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--c); vertical-align: 0; }

/* toast */
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 0px)); translate: -50% 140%; z-index: 50; background: var(--abaton); color: var(--abaton-ink); border: 1px solid var(--abaton-line); padding: 11px 16px; border-radius: var(--radius); font-size: .9rem; max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 12px 30px -12px rgba(0,0,0,.6); transition: translate .25s ease; }
.toast.show { translate: -50% 0; }
.toast.ok { border-color: var(--verdigris); }
.toast.err { border-color: #9E4A45; }
@media (max-width: 520px) { header.top .pill { display: none; } .brand span { font-size: 1.1rem; } }
.tgrid > * { min-width: 0; }
#chart { width: 100%; overflow: hidden; }
@media (max-width: 920px) { .tgrid { grid-template-columns: minmax(0, 1fr); } .tgrid > div[style*="sticky"] { position: static !important; } }
.tgrid > div { grid-template-columns: minmax(0, 1fr); }
.panel, .panel-b { min-width: 0; }
/* app header: full nav only on wide screens, a swipeable row below the brand otherwise */
@media (max-width: 1100px) {
  header.top.app-h nav.main { display: none; }
  header.top.app-h .mobile-nav { display: flex; gap: 20px; overflow-x: auto; padding: 8px max(18px, env(safe-area-inset-left, 0px)) 10px; border-top: 1px solid var(--abaton-line); font-size: .9rem; scrollbar-width: none; }
  header.top.app-h .mobile-nav a { color: var(--abaton-muted); text-decoration: none; white-space: nowrap; }
  header.top.app-h .mobile-nav a[aria-current="page"] { color: var(--gold); }
}
.page-head p.mono { overflow-wrap: anywhere; }
@media (max-width: 920px) { .tgrid > div:last-child { order: -1; } }
