:root {
  --slate: #1c2230; --panel: #242b3a; --line: #39425a; --text: #e9ecf2; --muted: #97a1b4;
  --lamp: #e8a33d; --lamp-dim: #5a4a33; --good: #8fd19e; --bad: #f2a7a0; --vault: #6f7d99;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { background: var(--slate); color: var(--text); }
body { margin: 0; font: 15px/1.5 var(--sans); }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--lamp); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.pos { color: var(--good); } .neg { color: var(--text); } .bad { color: var(--bad); }

header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand b { font: 600 21px/1 var(--serif); }
.brand span { font-size: 13px; color: var(--muted); }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 14px; }
nav.main a { color: var(--muted); text-decoration: none; }
nav.main a[aria-current="page"] { color: var(--lamp); font-weight: 600; }
form.search { flex: 1 1 320px; display: flex; gap: 8px; min-width: 0; }
form.search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; color: var(--text); font: 14px var(--mono); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text); font: 600 14px var(--sans); text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--lamp); border-color: var(--lamp); color: var(--slate); font-weight: 700; }
.btn:hover { border-color: var(--lamp); }
.btn.primary:hover { color: var(--slate); filter: brightness(1.08); }
.wallet { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px 0 14px; border: 1px solid var(--lamp); border-radius: 6px; font-size: 14px; text-decoration: none; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--good); }

main { padding-top: 28px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 32px; }
h1 { margin: 0; font: 500 40px/1.1 var(--serif); }
h2 { margin: 0; font-size: 17px; font-weight: 650; }
h2.serif { font: 500 26px/1.2 var(--serif); }
.headrow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.panel.pad { padding: 22px 26px; display: flex; flex-direction: column; gap: 18px; }
.panel > .bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.tile { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.tile .v { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.tile .l, .tile .s { font-size: 13px; color: var(--muted); }
.row2 { display: flex; flex-wrap: wrap; gap: 24px; }
.row2 > * { flex: 1 1 520px; min-width: 0; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { padding: 10px 12px; font-weight: 500; color: var(--muted); text-align: left; white-space: nowrap; }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 20px; } th:last-child, td:last-child { padding-right: 20px; }
td a { text-decoration: none; } td a:hover { text-decoration: underline; }
.tag { display: inline-block; font-size: 12px; padding: 1px 9px; border-radius: 10px; border: 1px solid var(--line); white-space: nowrap; }
.tag.proto { border-color: var(--lamp-dim); color: var(--lamp); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 600 14px var(--sans); cursor: pointer; }
.pill[aria-pressed="true"] { background: var(--lamp); border-color: var(--lamp); color: var(--slate); }
.progress { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.progress > div { height: 100%; background: var(--lamp); }
.milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.milestones div { border-top: 2px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; }
.milestones div.done { border-color: var(--lamp); }
.milestones span { font-size: 13px; color: var(--muted); }
.share { display: inline-flex; align-items: center; gap: 8px; }
.share i { display: block; width: 64px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.share i b { display: block; height: 6px; background: var(--lamp); }
.stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line); }
.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.parts > div { display: flex; gap: 10px; }
.parts .sw { width: 10px; height: 10px; margin-top: 6px; border-radius: 2px; flex: none; }
.parts .v { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.big { font-size: 40px; font-weight: 650; font-variant-numeric: tabular-nums; }
dl.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 14px; }
dl.kv dt { color: var(--muted); } dl.kv dd { margin: 0; text-align: right; }
.notice { padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.inset { padding: 12px 14px; background: var(--slate); border-radius: 6px; font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.empty { padding: 28px 20px; color: var(--muted); }
pre.ev { margin: 0; font: 12px/1.45 var(--mono); white-space: pre-wrap; word-break: break-all; color: var(--muted); }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
footer .wrap { padding-top: 20px; padding-bottom: 20px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--muted); }

/* ---- trading page forms (swap) ---- */
.fields { display: flex; flex-direction: column; gap: 16px; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; color: var(--text); }
.fields input:not([type=file]) { height: 46px; padding: 0 14px; background: var(--slate); border: 1px solid var(--line); border-radius: 6px;
  color: var(--text); font: 16px var(--sans); font-weight: 400; width: 100%; box-sizing: border-box; }
.fields input.mono, .fields input[name=recipient] { font-family: var(--mono); font-size: 14px; }
.fields input:focus { border-color: var(--lamp); }
.fields .btn.primary { align-self: flex-start; margin-top: 4px; }
.btn.primary { background: var(--lamp); border-color: var(--lamp); color: #1c2230; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.08); color: #1c2230; }
.btn:disabled { opacity: .55; cursor: wait; }
[data-msg] { font-size: 15px; min-height: 1.5em; }
.ok { color: var(--good); } .err { color: var(--bad); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; }
dialog#dlg { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 26px 30px; width: min(560px, 92vw); }
dialog#dlg::backdrop { background: rgba(10, 13, 20, .7); }
ol.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
ol.steps li.now { color: var(--lamp); font-weight: 600; } ol.steps li.done { color: var(--good); }
