:root {
  --bg: #0b0d09;
  --bg-2: #10130c;
  --panel: #14180f;
  --panel-2: #1a1f13;
  --line: #282e1d;
  --line-2: #3a4229;
  --text: #ebead9;
  --muted: #a3a58e;
  --faint: #70735f;
  --brass: #e2b23a;
  --brass-2: #f3cc62;
  --olive: #93a846;
  --up: #7fd67a;
  --down: #f0624d;
  --steel: #7fb4c9;
  --orange: #f0884d;
  --violet: #c79bf0;
  --teal: #5fd3c4;
  --coral: #ff8f8f;
  --head: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 10px;
  --wrap: 1180px;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(1200px 520px at 78% -8%, rgba(226, 178, 58, 0.10), transparent 62%),
    radial-gradient(900px 480px at 0% 12%, rgba(147, 168, 70, 0.08), transparent 60%),
    url("../img/contours.svg");
  background-size: auto, auto, 720px 720px;
  background-attachment: fixed;
}

main { flex: 1; }

a { color: var(--brass); text-decoration: none; }
a:hover { color: var(--brass-2); }

h1, h2, h3, h4 { font-family: var(--head); line-height: 1.12; margin: 0; letter-spacing: 0.005em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.3rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.16rem; font-weight: 600; }
h4 { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
p { margin: 0 0 1em; }

code, .mono { font-family: var(--mono); font-size: 0.9em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.up { color: var(--up); }
.down { color: var(--down); }
.center { text-align: center; }
.hide { display: none !important; }

.skip { position: absolute; left: -999px; top: 0; background: var(--brass); color: #14110a; padding: 8px 14px; z-index: 99; }
.skip:focus { left: 12px; top: 12px; }

.top { position: sticky; top: 0; z-index: 40; background: rgba(11, 13, 9, 0.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 26px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand .mark { color: var(--brass); flex: none; }
.brand-word { font-family: var(--head); font-weight: 700; font-size: 1.14rem; letter-spacing: 0.09em; }
.brand-word b { color: var(--brass); font-weight: 700; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a { color: var(--muted); font-size: 0.93rem; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.on { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--brass); }
.top-side { display: flex; align-items: center; gap: 12px; }

.pulse { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 0.72rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; }
.pulse i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.pulse em { font-style: normal; }
.pulse.on { color: var(--up); }
.pulse.on i { background: var(--up); box-shadow: 0 0 0 0 rgba(127, 214, 122, 0.6); animation: beat 2.2s infinite; }
.pulse.off { color: var(--down); }
.pulse.off i { background: var(--down); }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(127, 214, 122, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(127, 214, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 214, 122, 0); } }

.burger { display: none; width: 38px; height: 38px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; cursor: pointer; padding: 0; }
.burger span { display: block; width: 16px; height: 2px; background: var(--text); margin: 4px auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--head); font-weight: 600; font-size: 0.96rem; letter-spacing: 0.03em; padding: 12px 20px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-main { background: var(--brass); color: #171307; }
.btn-main:hover { background: var(--brass-2); color: #171307; }
.btn-line { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-line:hover { border-color: var(--brass); color: var(--brass-2); }
.btn-ghost { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-2); color: var(--text); }
.btn-danger { background: transparent; color: var(--down); border-color: rgba(240, 98, 77, 0.45); }
.btn-danger:hover { background: rgba(240, 98, 77, 0.1); color: var(--down); }
.btn-sm { padding: 8px 13px; font-size: 0.84rem; }
.btn-xs { padding: 5px 10px; font-size: 0.76rem; border-radius: 6px; }

.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--brass); }

.section { padding: 84px 0; }
.section-tight { padding: 52px 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.06rem; margin-top: 14px; }
.band { background: linear-gradient(180deg, rgba(20, 24, 15, 0.72), rgba(16, 19, 12, 0.72)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.hero { padding: 76px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 46px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.25rem); }
.hero h1 span { color: var(--brass); }
.hero-lead { font-size: 1.16rem; color: var(--muted); max-width: 560px; margin: 22px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-notes { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 26px; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.hero-notes span::before { content: "+ "; color: var(--olive); }

.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card-tight { padding: 16px; }
.card.ticks::before, .card.ticks::after { content: ""; position: absolute; width: 12px; height: 12px; border: 2px solid var(--brass); opacity: 0.85; }
.card.ticks::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.card.ticks::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { display: flex; align-items: center; gap: 10px; }

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.stat { padding: 20px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-family: var(--head); font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
.stat span { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }

.feed { display: flex; flex-direction: column; }
.feed-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.feed-row:last-child { border-bottom: 0; }
.feed-row.fresh { animation: drop 0.5s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.feed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-family: var(--mono); font-size: 0.72rem; color: var(--faint); margin-bottom: 3px; }
.feed-meta a { color: var(--faint); }
.feed-meta a:hover { color: var(--brass); }
.feed-text { font-size: 0.93rem; color: var(--text); overflow-wrap: anywhere; }
.feed-empty { padding: 26px 6px; text-align: center; color: var(--muted); font-size: 0.94rem; }
.feed-scroll { max-height: 520px; overflow-y: auto; padding-right: 6px; }

.agent { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid currentColor; font-family: var(--head); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.04em; background: rgba(255, 255, 255, 0.02); flex: none; }
.agent-scout { color: var(--steel); }
.agent-sentry { color: var(--brass); }
.agent-gunner { color: var(--orange); }
.agent-medic { color: var(--up); }
.agent-sarge { color: var(--text); }
.agent-sapper { color: var(--violet); }
.agent-radio { color: var(--teal); }
.agent-flare { color: var(--coral); }

.coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.coin { display: grid; gap: 12px; color: var(--text); transition: border-color 0.15s ease, transform 0.15s ease; }
.coin:hover { color: var(--text); border-color: var(--brass); transform: translateY(-2px); }
.coin-top { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: center; }
.coin-logo { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--panel-2); border: 1px solid var(--line); }
.coin-logo.big { width: 84px; height: 84px; border-radius: 16px; }
.coin h3 { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-sub { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 4px; }
.coin p { margin: 0; color: var(--muted); font-size: 0.86rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.coin-nums { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.stats.tight .stat { padding: 16px 18px; min-width: 0; }
.stats.tight .stat b { font-size: 1.22rem; overflow-wrap: anywhere; }
.stats.tight .stat b small { display: block; font-family: var(--mono); font-size: 0.72rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
.stats.tight sub { font-size: 0.7em; }
.bar { height: 8px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--olive), var(--brass)); border-radius: 999px; min-width: 2px; }
.bar.done i { background: var(--up); }
.bar.tall { height: 12px; }
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.pair { position: relative; margin: 0; }
.pair input { position: absolute; opacity: 0; pointer-events: none; }
.pair span { display: block; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; font-family: var(--head); font-weight: 600; font-size: 0.92rem; color: var(--text); }
.pair small { display: block; font-family: var(--body); font-weight: 400; font-size: 0.72rem; color: var(--faint); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair input:checked + span { border-color: var(--brass); color: var(--brass-2); background: rgba(226, 178, 58, 0.09); }
.pair input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.drop { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--bg-2); cursor: pointer; margin: 0; }
.drop:hover { border-color: var(--brass); }
.drop input { display: none; }
.trade-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.amounts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.amounts button { background: var(--bg-2); border: 1px solid var(--line-2); color: var(--muted); border-radius: 6px; padding: 4px 9px; font-family: var(--mono); font-size: 0.74rem; cursor: pointer; }
.amounts button:hover { color: var(--text); border-color: var(--brass); }
.receipt { display: grid; gap: 6px; font-size: 0.86rem; color: var(--muted); border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; }
.receipt div { display: flex; justify-content: space-between; gap: 12px; }
.receipt b { color: var(--text); font-family: var(--mono); font-weight: 500; text-align: right; }
.chart-frame { width: 100%; height: 420px; border: 0; border-radius: 8px; background: var(--bg-2); }

.tag { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.tag-paper { color: var(--steel); border-color: rgba(127, 180, 201, 0.4); }
.tag-live { color: var(--orange); border-color: rgba(240, 136, 77, 0.45); }
.tag-ok { color: var(--up); border-color: rgba(127, 214, 122, 0.4); }
.tag-warn { color: var(--brass); border-color: rgba(226, 178, 58, 0.45); }
.tag-bad { color: var(--down); border-color: rgba(240, 98, 77, 0.45); }
.tag-lock { color: var(--violet); border-color: rgba(199, 155, 240, 0.4); }

.steps { counter-reset: step; }
.step { position: relative; padding-top: 14px; }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--mono); font-size: 0.8rem; color: var(--brass); letter-spacing: 0.14em; display: block; margin-bottom: 14px; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.96rem; margin: 0; }

.roster .card h3 { margin-bottom: 4px; }
.roster .role { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); }
.roster p { color: var(--muted); font-size: 0.94rem; margin: 12px 0 0; }
.roster .agent { width: 42px; height: 42px; font-size: 0.86rem; margin-bottom: 14px; }

.limits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.limit { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.limit b { font-family: var(--mono); color: var(--brass); font-size: 0.8rem; padding-top: 3px; }
.limit h3 { font-size: 1.02rem; margin-bottom: 5px; }
.limit p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.flow { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.flow-step { flex: 1 1 150px; padding: 20px 18px; border-right: 1px solid var(--line); position: relative; }
.flow-step:last-child { border-right: 0; }
.flow-step small { font-family: var(--mono); color: var(--brass); font-size: 0.72rem; letter-spacing: 0.14em; }
.flow-step h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.flow-step p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.flow-step:not(:last-child)::after { content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; background: var(--panel); border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); z-index: 2; }

.frame { font-family: var(--mono); font-size: 0.86rem; display: grid; gap: 0; justify-items: center; }
.frame-node { border: 1px solid var(--line-2); border-radius: 8px; padding: 11px 18px; background: var(--bg-2); text-align: center; min-width: 220px; }
.frame-node.key { border-color: var(--brass); color: var(--brass-2); }
.frame-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.frame-row .frame-node { min-width: 0; }
.frame-arrow { width: 1px; height: 26px; background: var(--line-2); position: relative; }
.frame-arrow::after { content: ""; position: absolute; left: -4px; bottom: 0; width: 8px; height: 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); transform: rotate(45deg); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { font-family: var(--mono); font-weight: 500; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); text-align: left; padding: 12px 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); white-space: nowrap; }
.tok { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; }
.tok img, .tok .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); object-fit: cover; flex: none; }
.tok small { display: block; font-weight: 400; color: var(--faint); font-family: var(--mono); font-size: 0.7rem; }

.ca { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.82rem; color: var(--brass-2); background: var(--bg-2); border: 1px dashed var(--line-2); border-radius: 8px; padding: 9px 12px; cursor: pointer; max-width: 100%; }
.ca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-big { font-size: 1.05rem; padding: 14px 18px; }

.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 46px 0 26px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 30px; }
.foot-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 14px; max-width: 300px; }
.foot-col { display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.foot-col h4 { margin-bottom: 4px; }
.foot-col a { color: var(--muted); font-size: 0.92rem; }
.foot-col a:hover { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.78rem; color: var(--faint); }

.toast-zone { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--brass); border-radius: 8px; padding: 12px 14px; font-size: 0.9rem; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); animation: drop 0.25s ease; }
.toast.bad { border-left-color: var(--down); }
.toast.good { border-left-color: var(--up); }

.sheet { position: fixed; inset: 0; background: rgba(5, 6, 4, 0.74); display: flex; align-items: center; justify-content: center; z-index: 70; padding: 18px; }
.sheet[hidden] { display: none; }
.sheet-card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 22px; max-height: calc(100vh - 36px); overflow-y: auto; }
.sheet-card.wide { max-width: 720px; }
.sheet-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.x { background: none; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.x:hover { color: var(--text); }
.wallet-list { display: grid; gap: 8px; margin-top: 14px; }
.wallet-item { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 13px 15px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); font-family: var(--head); font-weight: 600; font-size: 0.98rem; cursor: pointer; }
.wallet-item:hover { border-color: var(--brass); }
.wallet-item small { font-family: var(--mono); font-weight: 400; color: var(--faint); font-size: 0.72rem; }

label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; font-weight: 500; }
input[type="text"], input[type="number"], input[type="password"], textarea, select { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); border-radius: 8px; padding: 10px 12px; font-family: var(--body); font-size: 0.95rem; }
input[type="number"] { font-family: var(--mono); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.field { margin-bottom: 14px; }
.field small { display: block; color: var(--faint); font-size: 0.76rem; margin-top: 5px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 0.92rem; color: var(--text); margin-bottom: 10px; }
.check input { margin-top: 4px; accent-color: var(--brass); width: 16px; height: 16px; flex: none; }
.check small { display: block; color: var(--faint); font-size: 0.76rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.84rem; color: var(--muted); cursor: pointer; }
.chip input:checked + span { border-color: var(--brass); color: var(--brass-2); background: rgba(226, 178, 58, 0.09); }
.chip input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.seg button { background: transparent; color: var(--muted); border: 0; padding: 8px 14px; font-family: var(--head); font-weight: 600; font-size: 0.84rem; cursor: pointer; border-right: 1px solid var(--line-2); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brass); color: #171307; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 6px; margin: 0 0 16px; }
legend { font-family: var(--head); font-weight: 600; font-size: 0.92rem; padding: 0 8px; display: flex; align-items: center; gap: 8px; }

.page-head { padding: 42px 0 26px; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-head p { color: var(--muted); max-width: 720px; margin-top: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--muted); font-family: var(--head); font-weight: 600; font-size: 0.95rem; padding: 11px 14px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--brass); }
.tabs .count { font-family: var(--mono); font-size: 0.7rem; background: var(--brass); color: #171307; border-radius: 999px; padding: 1px 7px; margin-left: 6px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.strat { display: grid; gap: 14px; }
.strat-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; }
.strat-top h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.strat-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.strat-nums div { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.strat-nums span { display: block; font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.strat-nums b { font-family: var(--mono); font-size: 0.98rem; font-weight: 600; }
.orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.orders li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: 0.9rem; color: var(--muted); }
.orders .agent { width: 26px; height: 26px; font-size: 0.6rem; border-radius: 6px; }
.strat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.note { border: 1px solid rgba(226, 178, 58, 0.35); background: rgba(226, 178, 58, 0.07); color: var(--text); border-radius: 8px; padding: 11px 14px; font-size: 0.88rem; margin-bottom: 14px; }
.note.bad { border-color: rgba(240, 98, 77, 0.4); background: rgba(240, 98, 77, 0.07); }
.note ul { margin: 6px 0 0; padding-left: 18px; }

.approval { display: grid; gap: 12px; border-left: 3px solid var(--brass); }
.approval-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.approval p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.approval-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.timer { font-family: var(--mono); font-size: 0.78rem; color: var(--brass); }

.gate { max-width: 560px; margin: 30px auto 60px; text-align: center; padding: 40px 28px; }
.gate h2 { margin-bottom: 12px; }
.gate p { color: var(--muted); }

.proof-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); align-items: start; }
.proof-step:last-child { border-bottom: 0; }
.proof-step .mark { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
.proof-step.ok .mark { border-color: var(--up); color: var(--up); }
.proof-step.bad .mark { border-color: var(--down); color: var(--down); }
.proof-step.wait .mark { border-color: var(--brass); color: var(--brass); }
.proof-step b { display: block; font-size: 0.94rem; }
.proof-step span { color: var(--muted); font-size: 0.86rem; overflow-wrap: anywhere; }
.hash { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; word-break: break-all; }
pre.raw { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0; }

.prose { max-width: 800px; }
.prose h2 { margin: 46px 0 14px; scroll-margin-top: 90px; }
.prose h3 { margin: 26px 0 10px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 7px; }
.prose code { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--brass-2); }
.prose pre { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; overflow-x: auto; font-family: var(--mono); font-size: 0.82rem; color: var(--text); }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.docs-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 46px; align-items: start; }
.docs-nav { position: sticky; top: 90px; display: grid; gap: 4px; font-size: 0.9rem; }
.docs-nav a { color: var(--muted); padding: 6px 10px; border-left: 2px solid var(--line); }
.docs-nav a:hover { color: var(--text); border-left-color: var(--brass); }

.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-family: var(--head); font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brass); font-family: var(--mono); }
.faq details[open] summary::after { content: "-"; }
.faq details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

.cta { text-align: center; padding: 56px 24px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, rgba(226, 178, 58, 0.09), rgba(20, 24, 15, 0.9)); }
.cta p { color: var(--muted); max-width: 540px; margin: 14px auto 26px; }

.kv { display: grid; grid-template-columns: minmax(120px, auto) minmax(0, 1fr); gap: 8px 18px; font-size: 0.9rem; margin: 0; }
.kv dt { color: var(--faint); font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 2px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 22px; }
.admin-grid .card b { display: block; font-family: var(--head); font-size: 1.4rem; margin-top: 4px; }
.log-row { display: grid; grid-template-columns: 150px 60px 110px minmax(0, 1fr); gap: 10px; font-family: var(--mono); font-size: 0.76rem; padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.log-row .error { color: var(--down); }
.log-row .warn { color: var(--brass); }

@media (max-width: 980px) {
  .hero-grid, .docs-grid, .trade-grid { grid-template-columns: minmax(0, 1fr); }
  .docs-nav { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .flow-step { flex-basis: 45%; border-bottom: 1px solid var(--line); }
  .flow-step::after { display: none; }
}

@media (max-width: 760px) {
  .nav { position: absolute; left: 0; right: 0; top: 66px; background: var(--bg-2); border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px 16px 16px; display: none; }
  .nav.open { display: flex; }
  .burger { display: block; }
  .top-row { gap: 12px; }
  .top-side { margin-left: auto; }
  .pulse em { display: none; }
  .section { padding: 58px 0; }
  .hero { padding: 46px 0 40px; }
  .g2, .g3, .g4, .limits, .fields, .fields-3, .strat-nums, .trade-grid { grid-template-columns: minmax(0, 1fr); }
  .strat-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .flow-step { flex-basis: 100%; border-right: 0; }
  .log-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .brand-word { font-size: 1rem; }
}

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