:root {
  color-scheme: dark;
  --bg: #0e1013;
  --bg-2: #12151a;
  --panel: #171b21;
  --panel-2: #1d222a;
  --line: #262c36;
  --line-2: #364050;
  --text: #ece9e2;
  --muted: #a3acba;
  --faint: #7c8696;
  --ember: #ff7a1a;
  --ember-2: #ffb347;
  --ember-ink: #190c02;
  --ok: #4ad295;
  --warn: #f2c14e;
  --bad: #ff6b6b;
  --info: #6cb6ff;
  --series-1: #3987e5;
  --series-2: #d95926;
  --grid: #262c36;
  --radius: 14px;
  --radius-s: 9px;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: radial-gradient(1100px 520px at 82% -160px, rgba(255, 122, 26, 0.13), transparent 62%), radial-gradient(900px 480px at -10% 0, rgba(57, 135, 229, 0.07), transparent 60%);
  background-repeat: no-repeat;
}

main { flex: 1; }

a { color: var(--ember-2); text-decoration: none; }
a:hover { color: #ffd08a; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
h1 { font-size: clamp(34px, 5.2vw, 60px); letter-spacing: -0.035em; }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 18px; letter-spacing: -0.01em; }
h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--faint); font-weight: 600; }
p { margin: 0 0 14px; }

.mono { font-family: var(--mono); font-feature-settings: "zero" 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.hide { display: none !important; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ember); color: var(--ember-ink); padding: 8px 14px; z-index: 100; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 22px; }

.top { position: sticky; top: 0; z-index: 40; background: rgba(14, 16, 19, 0.86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: -0.02em; font-size: 19px; }
.brand:hover { color: var(--text); }
.brand-mark { width: 28px; height: 28px; color: var(--ember); }
.brand-foot { font-size: 18px; margin-bottom: 8px; }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--muted); padding: 8px 13px; border-radius: 9px; font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); background: var(--panel-2); }
.top-side { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; padding: 11px 10px; flex-direction: column; justify-content: space-between; }
.menu-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }

.notice { background: rgba(242, 193, 78, 0.12); border-bottom: 1px solid rgba(242, 193, 78, 0.3); color: #f8dc93; padding: 9px 0; font-size: 14px; text-align: center; }

.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); padding: 6px 11px; border-radius: 999px; font-size: 12.5px; line-height: 1; cursor: default; font-family: inherit; }
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--ember); }
.chip-key { color: var(--ember-2); font-weight: 700; letter-spacing: 0.08em; font-size: 11px; }
.chip-none { border-style: dashed; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 11px; padding: 10px 17px; font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease; white-space: nowrap; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #ff8b33, #f2680a); color: var(--ember-ink); box-shadow: 0 6px 22px rgba(255, 122, 26, 0.28); }
.btn-primary:hover { background: linear-gradient(180deg, #ff9a4d, #ff7417); color: var(--ember-ink); }
.btn-ghost { background: var(--panel); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--ember); color: var(--text); }
.btn-quiet { background: transparent; color: var(--muted); border-color: var(--line); padding: 7px 12px; font-size: 13px; }
.btn-quiet:hover { color: var(--text); border-color: var(--line-2); }
.btn-danger { background: transparent; color: var(--bad); border-color: rgba(255, 107, 107, 0.4); padding: 7px 12px; font-size: 13px; }
.btn-danger:hover { background: rgba(255, 107, 107, 0.1); color: var(--bad); }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 13px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-wallet { gap: 7px; font-weight: 500; }
.wallet-short { color: var(--muted); border-left: 1px solid var(--line-2); padding-left: 9px; margin-left: 2px; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--faint); }
.dot-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(74, 210, 149, 0.18); }

.section { padding: 64px 0; }
.section-tight { padding: 36px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 640px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ember-2); font-weight: 650; margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--ember); border-radius: 2px; }

.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 46px; align-items: center; }
.hero h1 span { color: var(--ember); }
.hero-lead { font-size: 18.5px; color: var(--muted); max-width: 560px; margin: 20px 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }

.state { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; color: var(--muted); }
.state-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.state-ok .state-dot { background: var(--ok); }
.state-ok { color: var(--text); }

.loop { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.loop svg { width: 100%; height: auto; display: block; }
.loop-caption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 6px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card-flat { background: transparent; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.card-pad-0 { padding: 0; overflow: hidden; }
.card-pad-0 .card-head { padding: 18px 22px 0; }

.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.tile-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); font-weight: 600; }
.tile-value { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; margin-top: 8px; line-height: 1.1; overflow-wrap: anywhere; }
.tile-value small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.tile-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.tile-empty { color: var(--faint); font-size: 20px; }

.step { position: relative; padding-top: 44px; }
.step-n { position: absolute; top: 20px; left: 22px; font-family: var(--mono); font-size: 12px; color: var(--ember-2); letter-spacing: 0.1em; }
.step p { color: var(--muted); font-size: 14.5px; }

.fix { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.fix:last-child { border-bottom: 0; }
.fix-n { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 122, 26, 0.12); color: var(--ember-2); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; }
.fix p { color: var(--muted); margin: 4px 0 0; font-size: 14.5px; }
.fix-state { padding-top: 4px; }

.calc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: center; }
.calc-out { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.calc-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.calc-row:last-child { border-bottom: 0; }
.calc-row strong { font-family: var(--mono); font-weight: 600; }
.formula { font-family: var(--mono); font-size: 13.5px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; color: var(--muted); overflow-x: auto; white-space: nowrap; }
.formula b { color: var(--text); font-weight: 600; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input[type=text], input[type=number], input[type=password], input[type=url], select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 11px 13px; font: inherit; font-size: 15px; outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.18); }
input[readonly] { color: var(--muted); }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-help { font-size: 12.5px; color: var(--faint); margin-top: 5px; }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); }
.check input { width: 17px; height: 17px; accent-color: var(--ember); }
:focus-visible { outline: 2px solid var(--ember-2); outline-offset: 2px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--faint); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.018); }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-size: 14.5px; }
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.tag-ok { color: var(--ok); border-color: rgba(74, 210, 149, 0.4); background: rgba(74, 210, 149, 0.08); }
.tag-warn { color: var(--warn); border-color: rgba(242, 193, 78, 0.4); background: rgba(242, 193, 78, 0.08); }
.tag-bad { color: var(--bad); border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.08); }
.tag-ember { color: var(--ember-2); border-color: rgba(255, 122, 26, 0.45); background: rgba(255, 122, 26, 0.1); }

pre, code { font-family: var(--mono); font-size: 13px; }
pre { background: #0a0c0f; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px; overflow-x: auto; margin: 0 0 14px; line-height: 1.6; color: #d7dbe2; }
code { background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
pre code { background: none; border: 0; padding: 0; }
.codebar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

.agents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.agent { text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; cursor: pointer; color: var(--text); font: inherit; transition: border-color 0.15s ease, background 0.15s ease; }
.agent:hover { border-color: var(--line-2); }
.agent.on { border-color: var(--ember); background: rgba(255, 122, 26, 0.08); }
.agent strong { display: block; font-size: 14.5px; }
.agent span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.agent em { display: inline-block; font-style: normal; font-size: 11px; color: var(--faint); margin-top: 7px; font-family: var(--mono); }

.result { min-height: 320px; }
.result-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.result-body { overflow-wrap: anywhere; font-size: 15px; line-height: 1.65; }
.result-body a { word-break: break-all; }
.result-body p { margin: 0 0 10px; }
.result-body h3 { font-size: 17px; margin: 18px 0 8px; }
.result-body h4 { font-size: 13px; margin: 16px 0 6px; color: var(--ember-2); }
.result-body h3:first-child, .result-body h4:first-child { margin-top: 0; }
.result-body ul, .result-body ol { margin: 0 0 12px; padding-left: 22px; }
.result-body li { margin-bottom: 5px; }
.result-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.result-body pre { font-size: 12px; white-space: pre; }
.trace { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 8px; }
.trace li { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.trace summary { cursor: pointer; color: var(--muted); }
.trace summary b { color: var(--text); font-weight: 600; }
.trace pre { margin: 10px 0 0; font-size: 12px; max-height: 220px; white-space: pre-wrap; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: var(--ember); animation: spin 0.8s linear infinite; display: inline-block; vertical-align: -3px; }
.btn-primary .spinner { border-color: rgba(25, 12, 2, 0.25); border-top-color: var(--ember-ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.working { display: flex; align-items: center; gap: 12px; color: var(--muted); padding: 30px 0; }

.runlist { list-style: none; margin: 0; padding: 0; }
.runlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.runlist li:hover { background: rgba(255, 255, 255, 0.02); }
.runlist .who { color: var(--ember-2); font-size: 12px; font-family: var(--mono); }
.runlist .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.kv { display: grid; grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr); gap: 0; font-size: 14px; }
.kv > div { padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.kv > div:nth-child(odd) { color: var(--muted); padding-right: 14px; }

.bar { height: 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; display: flex; gap: 2px; }
.bar i { display: block; height: 100%; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.viz-root { position: relative; }
.viz-root svg { width: 100%; height: auto; display: block; overflow: visible; }
.viz-root .axis text { fill: var(--faint); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.viz-root .gridline { stroke: var(--grid); stroke-width: 1; }
.viz-root .baseline { stroke: var(--line-2); stroke-width: 1; }
.viz-root .hit { fill: transparent; cursor: default; }
.viz-root .hit:hover, .viz-root .hit:focus { fill: rgba(255, 255, 255, 0.045); outline: none; }
.viz-tip { position: absolute; pointer-events: none; background: #0a0c0f; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; min-width: 150px; box-shadow: var(--shadow); z-index: 5; }
.viz-tip-title { color: var(--muted); margin-bottom: 6px; }
.viz-tip-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.viz-tip-row b { font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.viz-tip-key { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.viz-tip-key i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.viz-empty { padding: 44px 16px; text-align: center; color: var(--muted); font-size: 14.5px; border: 1px dashed var(--line-2); border-radius: var(--radius-s); }

.modal { position: fixed; inset: 0; background: rgba(5, 6, 8, 0.72); display: grid; place-items: center; z-index: 80; padding: 18px; backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.modal-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 26px; width: 100%; max-width: 460px; position: relative; box-shadow: var(--shadow); max-height: 90vh; overflow-y: auto; }
.modal-card h3 { font-size: 20px; margin-bottom: 6px; }
.modal-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; padding: 4px 8px; }
.wallet-list { display: grid; gap: 8px; margin-top: 16px; }
.wallet-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); cursor: pointer; font: inherit; font-weight: 600; text-align: left; }
.wallet-option:hover { border-color: var(--ember); }
.wallet-option img { width: 28px; height: 28px; border-radius: 7px; }

.toasts { position: fixed; right: 18px; bottom: 18px; display: grid; gap: 8px; z-index: 90; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: #0a0c0f; border: 1px solid var(--line-2); border-left: 3px solid var(--info); border-radius: 10px; padding: 12px 14px; font-size: 14px; box-shadow: var(--shadow); animation: rise 0.2s ease; }
.toast-ok { border-left-color: var(--ok); }
.toast-bad { border-left-color: var(--bad); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.banner { border: 1px solid rgba(242, 193, 78, 0.35); background: rgba(242, 193, 78, 0.07); color: #f6dfa2; border-radius: var(--radius-s); padding: 13px 16px; font-size: 14px; margin-bottom: 16px; }
.banner-ok { border-color: rgba(74, 210, 149, 0.35); background: rgba(74, 210, 149, 0.07); color: #b6efd5; }
.banner-bad { border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.08); color: #ffc2c2; }
.banner-info { border-color: var(--line-2); background: var(--panel); color: var(--muted); }

.page-head { padding: 44px 0 6px; }
.page-head h1 { font-size: clamp(30px, 4vw, 44px); }
.page-head p { color: var(--muted); max-width: 720px; margin-top: 12px; font-size: 17px; }

.foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 44px 0 26px; background: var(--bg-2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; }
.foot h4 { margin-bottom: 12px; }
.foot a, .foot span.muted { display: block; font-size: 14px; padding: 4px 0; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }

.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: start; }
.docs-nav { position: sticky; top: 90px; display: grid; gap: 2px; }
.docs-nav a { color: var(--muted); padding: 7px 12px; border-radius: 8px; font-size: 14px; }
.docs-nav a:hover { color: var(--text); background: var(--panel); }
.docs-body h2 { font-size: 24px; margin: 44px 0 14px; scroll-margin-top: 90px; }
.docs-body h2:first-child { margin-top: 0; }
.docs-body h3 { margin: 26px 0 10px; }
.docs-body p, .docs-body li { color: #cfd4dc; }
.docs-body ul { padding-left: 20px; margin: 0 0 14px; }
.docs-body li { margin-bottom: 6px; }
.method { font-family: var(--mono); font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: rgba(57, 135, 229, 0.16); color: #8fbdf5; margin-right: 8px; }
.method-post { background: rgba(74, 210, 149, 0.14); color: var(--ok); }

.admin { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: start; padding: 30px 0 10px; }
.admin-nav { position: sticky; top: 90px; display: grid; gap: 2px; }
.admin-nav a { color: var(--muted); padding: 9px 12px; border-radius: 9px; font-size: 14.5px; font-weight: 500; }
.admin-nav a:hover { color: var(--text); background: var(--panel); }
.admin-nav a.on { color: var(--text); background: var(--panel-2); box-shadow: inset 2px 0 0 var(--ember); }
.admin-main { display: grid; gap: 18px; min-width: 0; }
.admin-main .card { min-width: 0; }
.inline-form { display: inline; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.login { max-width: 400px; margin: 70px auto; }
details.fold { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; margin-top: 12px; background: var(--bg-2); }
details.fold summary { cursor: pointer; font-weight: 600; font-size: 14px; }
details.fold[open] summary { margin-bottom: 14px; }
.log { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; }
.log .lv-error { color: var(--bad); }
.log .lv-warn { color: var(--warn); }

.tabs { display: inline-flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; flex-wrap: wrap; }
.tabs a { color: var(--muted); padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 600; }
.tabs a:hover { color: var(--text); }
.tabs a.on { background: var(--panel-2); color: var(--text); }
.tabs-fill { display: flex; width: 100%; }
.tabs-fill a { flex: 1; text-align: center; }
.tokens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tokens-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.token-card { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--text); transition: border-color 0.15s ease, transform 0.1s ease; min-width: 0; }
.token-card:hover { border-color: var(--ember); color: var(--text); transform: translateY(-1px); }
.token-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--bg-2); border: 1px solid var(--line); flex: none; }
.token-logo-lg { width: 84px; height: 84px; border-radius: 20px; }
.token-main { min-width: 0; flex: 1; display: grid; gap: 7px; }
.token-title { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.token-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.token-numbers { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.token-head { display: flex; gap: 22px; align-items: center; }
.progress { height: 6px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #f2680a, #ffb347); border-radius: 999px; }
.pairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pair { display: block; cursor: pointer; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 9px 11px; margin: 0; color: var(--text); transition: border-color 0.15s ease, background 0.15s ease; }
.pair:hover { border-color: var(--line-2); }
.pair.on { border-color: var(--ember); background: rgba(255, 122, 26, 0.08); }
.pair input { position: absolute; opacity: 0; pointer-events: none; }
.pair strong { display: block; font-family: var(--mono); font-size: 13.5px; }
.pair span { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input[type=file] { width: 100%; background: var(--bg-2); border: 1px dashed var(--line-2); color: var(--muted); border-radius: 10px; padding: 12px; font: inherit; font-size: 14px; }
.chart-frame { display: block; width: 100%; height: 440px; border: 0; background: #0a0c0f; }

@media (max-width: 980px) {
  .hero-grid, .split, .split-even, .calc, .docs, .admin { grid-template-columns: minmax(0, 1fr); }
  .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .tokens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .docs-nav, .admin-nav { position: static; display: flex; flex-wrap: wrap; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-top: 44px; }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; flex-direction: column; margin: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; }
  .menu-toggle { display: flex; }
  .tokens-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .top-side .chip-ca { display: none; }
  .tokens-4 { grid-template-columns: minmax(0, 1fr); }
  .grid-2, .agents, .field-row, .form-grid, .tokens { grid-template-columns: minmax(0, 1fr); }
  .pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .token-head { align-items: flex-start; }
  .wallet-short { display: none; }
  .fix { grid-template-columns: 44px minmax(0, 1fr); }
  .fix-state { grid-column: 2; }
  .section { padding: 44px 0; }
  .wrap { padding: 0 16px; }
  .card.card-pad-0 { padding: 0; }
  .card { padding: 18px; }
}

@media (max-width: 480px) {
  .grid-4, .grid-5 { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .btn-lg { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
