/* Токены — по DESIGN.md: нейтральный slate-монохром + цвет за сущностью */
:root {
  color-scheme: dark;
  --bg: #0a0b0e;
  --surface: #14151a;
  --surface-2: #1d1f27;
  --border: #2a2c36;
  --text: #f7f8fa;
  --muted: #99a0ad;
  --edge: rgba(255, 255, 255, .07);
  --usdt: #34d399;
  --fiat: #38bdf8;
  --alert: #ff6b6b;
  --amber: #fbbf24;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 160ms;
  --normal: 240ms;
  --font-sans: "Fira Sans", system-ui, sans-serif;
  --font-mono: "Fira Code", ui-monospace, monospace;
}
:root.light {
  color-scheme: light;
  --bg: #f2f2f2;
  --surface: #ffffff;
  --surface-2: #ebebeb;
  --border: #e0e0e0;
  --text: #121212;
  --muted: #5c5c5c;
  --edge: rgba(0, 0, 0, .04);
  --usdt: #059669;
  --fiat: #0284c7;
  --alert: #d64545;
  --amber: #b45309;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
* { scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 0; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 13px; }
.muted { color: var(--muted); }
.usdt { color: var(--usdt); }
.fiat { color: var(--fiat); }
.alert { color: var(--alert); }
.eyebrow {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}
.display {
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  font-variant-numeric: tabular-nums; font-size: 26px;
}

/* ---------- Каркас ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; padding: 20px 12px;
  position: sticky; top: 12px; height: calc(100vh - 24px); margin: 12px 0 12px 12px;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto; scrollbar-width: none;
  /* Стекло, как у .tile: полупрозрачная поверхность, размытие и блик кромки */
  border-radius: 20px;
  background: linear-gradient(160deg,
    color-mix(in oklab, var(--surface) 78%, transparent) 0%,
    color-mix(in oklab, var(--surface) 50%, transparent) 100%);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 0 0 1px var(--edge),
    0 2px 8px rgba(0, 0, 0, .25),
    0 24px 56px -22px rgba(0, 0, 0, .6);
}
:root.light .sidebar { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border), 0 1px 2px rgba(0,0,0,.04); }
.brand { font-weight: 800; letter-spacing: -0.02em; font-size: 17px; padding: 4px 12px 18px; }
.brand span { color: var(--muted); font-weight: 500; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; text-decoration: none;
  color: var(--muted); font-weight: 500; min-height: 44px;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 600; padding: 1px 7px;
  border-radius: 9999px; background: color-mix(in oklab, var(--amber) 18%, transparent);
  color: var(--amber);
}
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.main { flex: 1; min-width: 0; padding: 28px 32px 80px; }
.page { max-width: 1240px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Стекло ---------- */
.tile {
  position: relative; border-radius: 20px; padding: 20px;
  background: linear-gradient(160deg,
    color-mix(in oklab, var(--surface) 72%, transparent) 0%,
    color-mix(in oklab, var(--surface) 46%, transparent) 100%);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 var(--edge),
    inset 0 0 0 1px var(--edge),
    0 2px 8px rgba(0, 0, 0, .25),
    0 24px 56px -22px rgba(0, 0, 0, .6);
}
:root.light .tile { box-shadow: inset 0 0 0 1px var(--border), 0 1px 2px rgba(0,0,0,.04); background: var(--surface); }
.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tile.flush { padding: 0; overflow: hidden; }
.tile.flush > .tile-head { padding: 18px 20px 0; }

.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.cards { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.kpi .display { margin-top: 6px; }
.kpi .sub { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ---------- Кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2); font-weight: 500;
  transition: background var(--fast) var(--ease), opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:hover { background: var(--border); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); border-radius: 14px; font-weight: 600; }
.btn-primary:hover { background: var(--text); opacity: .88; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }
.btn-danger { color: var(--alert); }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 10px; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; }
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: .5; cursor: default; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.input, .select {
  min-height: 40px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2); outline: none;
  transition: box-shadow var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.input:focus, .select:focus { border-color: color-mix(in oklab, var(--text) 35%, var(--border)); box-shadow: 0 0 0 4px color-mix(in oklab, var(--text) 8%, transparent); }
.btn:focus-visible, .nav-link:focus-visible, .cell-edit:focus-visible, .switch:focus-visible { outline: 2px solid color-mix(in oklab, var(--text) 60%, transparent); outline-offset: 2px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filters .field { min-width: 140px; }
.filters .grow { flex: 1; min-width: 200px; }

/* Переключатель вкл/выкл */
.switch {
  position: relative; width: 38px; height: 22px; border-radius: 9999px; flex-shrink: 0;
  background: var(--border); border: none; cursor: pointer; padding: 0;
  transition: background var(--fast) var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--muted);
  transition: transform var(--normal) var(--ease), background var(--fast) var(--ease);
}
.switch[aria-checked="true"] { background: color-mix(in oklab, var(--text) 80%, transparent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: var(--bg); }
.toggle-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }

/* Сегменты (табы истории) */
.segments { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); gap: 2px; }
.segments button { border: none; background: transparent; padding: 7px 14px; border-radius: 9px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 14px; }
.segments button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.2); }

/* ---------- Таблицы ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
td { padding: 10px 12px; border-bottom: 1px solid var(--edge); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--fast) var(--ease); }
tbody tr:hover { background: color-mix(in oklab, var(--surface-2) 55%, transparent); }
td.r, th.r { text-align: right; }
tr.off td { opacity: .45; }
tr.off td.keep { opacity: 1; }
.cell-sub { display: block; font-size: 12px; color: var(--muted); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }

/* Ячейка, которая правится по клику */
.cell-edit {
  display: inline-flex; align-items: center; gap: 6px; cursor: text; min-height: 30px;
  padding: 2px 8px; margin: -2px -8px; border-radius: 8px; border: 1px dashed transparent;
  background: none; text-align: inherit;
}
.cell-edit:hover { border-color: var(--border); background: var(--surface-2); }
.cell-edit .unit { color: var(--muted); font-size: 12px; }
.cell-input { width: 110px; min-height: 32px; padding: 0 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }

/* ---------- Бейджи и полоски ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 9999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: color-mix(in oklab, currentColor 14%, transparent);
}
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.live::before { animation: pulse 1.8s ease-in-out infinite; }
.b-ok { color: var(--usdt); }
.b-sky { color: var(--fiat); }
.b-warn { color: var(--amber); }
.b-bad { color: var(--alert); }
.b-neutral { color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 9999px; background: var(--surface-2); font-size: 12px; color: var(--muted); white-space: nowrap; }
.chip b { color: var(--text); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-x {
  border: none; background: none; cursor: pointer; color: var(--muted); padding: 0 2px;
  font-size: 15px; line-height: 1; margin-right: -4px;
}
.chip-x:hover { color: var(--alert); }
.chip-add { border: 1px dashed var(--border); background: transparent; cursor: pointer; font: inherit; font-size: 12px; }
.chip-add:hover { color: var(--text); border-color: var(--muted); }

.meter { height: 6px; border-radius: 9999px; background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 9999px; background: var(--usdt); transform-origin: left; }
.meter.warn > i { background: var(--amber); }
.meter.full > i { background: var(--alert); }

/* ---------- Связи ---------- */
.ex-card .route { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.route-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.route-row .who { font-weight: 500; }
.route-row .where { font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border-radius: 12px; overflow: hidden; margin-top: 12px; }
.kv > div { background: var(--surface-2); padding: 10px 12px; }
.kv .v { font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ---------- График ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: 180px; overflow: visible; }
.chart .bar { fill: var(--fiat); transition: opacity var(--fast) var(--ease); }
.chart .hit { fill: transparent; cursor: default; }
.chart g:hover .bar { opacity: .75; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font-sans); }
.tooltip {
  position: absolute; pointer-events: none; z-index: 20; padding: 8px 10px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; line-height: 1.5;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); white-space: nowrap; transform: translate(-50%, -100%);
  opacity: 0; transition: opacity var(--fast) var(--ease);
}
.tooltip.show { opacity: 1; }

/* ---------- Модалки и тосты ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade var(--normal) var(--ease);
}
.modal { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; animation: rise var(--normal) var(--ease); background: var(--surface); }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.modal .form { display: grid; gap: 14px; margin-top: 16px; }
.modal .form.cols { grid-template-columns: 1fr 1fr; }
.modal .form .wide { grid-column: 1 / -1; }
.modal .section { padding-top: 14px; border-top: 1px solid var(--border); }
.modal { width: min(500px, 100%); }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,.35); max-width: 380px; font-size: 14px; animation: rise var(--normal) var(--ease);
}
.toast.err { border-color: color-mix(in oklab, var(--alert) 50%, var(--border)); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.totals { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.totals b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.totals b.fiat { color: var(--fiat); }
.totals b.usdt { color: var(--usdt); }

.skeleton {
  border-radius: 12px; min-height: 96px;
  background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
.rise-in { animation: rise var(--normal) var(--ease); }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Мобила: нижняя навигация ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar {
    position: fixed; top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); left: 8px; right: 8px;
    z-index: 50; height: auto; width: auto; margin: 0; border-radius: 18px;
    flex-direction: row; padding: 6px; justify-content: flex-start;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  }
  .brand, .sidebar-foot, .nav-badge { display: none; }
  .nav-link { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 8px; flex-shrink: 0; min-width: 64px; }
  .main { padding: 20px 16px 110px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: 1fr 1fr; }
  .modal .form.cols { grid-template-columns: 1fr; }
}

/* ---------- Рассылки ---------- */
.tg-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 12px 12px 0 0; background: var(--surface-2); border: 1px solid var(--border); border-bottom: none; }
.tg-toolbar .btn { min-height: 30px; padding: 0 9px; }
.tg-toolbar-sep { width: 1px; background: var(--border); margin: 4px 4px; }
.tg-textarea { width: 100%; min-height: 150px; padding: 12px; border-radius: 0 0 12px 12px; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; resize: vertical; }
.tg-bubble {
  margin-top: 6px; padding: 10px 14px; border-radius: 16px 16px 16px 4px; max-width: 520px;
  background: color-mix(in oklab, var(--fiat) 14%, var(--surface-2)); white-space: pre-wrap; line-height: 1.5; font-size: 15px; overflow-wrap: anywhere;
}
.tg-bubble.small { font-size: 14px; max-height: 140px; overflow: hidden; }
.tg-bubble:empty::before { content: "Здесь появится сообщение"; color: var(--muted); }
.tg-bubble code, .tg-bubble pre { font-family: var(--font-mono); font-size: 13px; }
.tg-bubble blockquote { margin: 4px 0; padding: 2px 10px; border-left: 3px solid var(--fiat); border-radius: 4px; background: color-mix(in oklab, var(--fiat) 8%, transparent); }
.tg-bubble a { color: var(--fiat); }
.tg-bubble .tg-spoiler { background: var(--muted); color: transparent; border-radius: 4px; }
.tg-bubble .tg-spoiler:hover { color: inherit; background: transparent; }
.tg-cemoji { box-shadow: 0 0 0 1px color-mix(in oklab, var(--amber) 60%, transparent); border-radius: 6px; padding: 0 1px; }
.tg-var { color: var(--fiat); font-family: var(--font-mono); font-size: .9em; }
.pick-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 9999px; background: var(--surface-2); font-size: 13px; cursor: pointer; border: 1px solid transparent; }
.pick-chip.on { border-color: color-mix(in oklab, var(--text) 30%, var(--border)); }
.pick-chip input { accent-color: var(--text); }
.bc-card.off { opacity: .6; }
.modal.wide { width: min(640px, 100%); }

/* ---------- Инструкция ---------- */
.guide { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: start; }
.guide-body { max-width: 820px; }
.guide-toc { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; }
.guide-toc .eyebrow { padding: 0 10px 8px; }
#guide-toc { display: flex; flex-direction: column; gap: 2px; }
.guide-toc button {
  text-align: left; background: none; border: none; cursor: pointer; padding: 7px 10px; border-radius: 9px;
  color: var(--muted); font-size: 14px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.guide-toc button:hover { color: var(--text); background: var(--surface); }
.guide-toc button[aria-current] { color: var(--text); background: var(--surface-2); }
.guide-sec { padding: 26px 28px; scroll-margin-top: 20px; }
.guide-sec h2 { font-size: 22px; margin: 6px 0 14px; }
.guide-sec h3 { margin: 22px 0 8px; font-size: 16px; }
.guide-sec p { margin: 0 0 12px; line-height: 1.65; }
.guide-sec .lead { font-size: 16px; color: var(--text); }
.guide-sec kbd, .guide-sec .inline-f {
  font-family: var(--font-mono); font-size: 13px; padding: 1px 7px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap;
}
/* Формулы в строке длинные — на узком экране пусть переносятся */
.guide-sec .inline-f { white-space: normal; }
.guide-sec { min-width: 0; overflow-wrap: anywhere; }
.formula { overflow-x: auto; }
.guide-list { margin: 0 0 12px; padding-left: 20px; line-height: 1.65; }
.guide-list li { margin-bottom: 6px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding: 12px 14px 12px 50px; border-radius: 12px; background: var(--surface-2); line-height: 1.6; }
.steps li::before {
  content: counter(step); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--text); color: var(--bg);
}
.guide-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.guide-cards > div { padding: 14px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.guide-cards span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.guide-table { width: 100%; margin: 0 0 12px; }
.guide-table td { vertical-align: top; line-height: 1.55; }
.guide-table td:first-child { width: 34%; white-space: normal; }
.formula {
  margin: 14px 0; padding: 16px 18px; border-radius: 14px; background: var(--surface-2);
  border-left: 3px solid var(--fiat); display: grid; gap: 12px; font-size: 15px; line-height: 1.5;
}
.formula .f-name { font-weight: 700; }
.formula .f-var { font-style: italic; }
.formula .f-result { font-weight: 500; }
.frac { display: inline-flex; flex-direction: column; vertical-align: middle; text-align: center; margin: 0 3px; font-size: 13px; }
.frac > span:first-child { border-bottom: 1px solid currentColor; padding: 0 4px 1px; }
.frac > span:last-child { padding: 1px 4px 0; }
.example { margin: 14px 0; padding: 16px 18px; border-radius: 14px; border: 1px dashed var(--border); }
.example .eyebrow { margin-bottom: 6px; }
.calc { margin: 6px 0 10px; font-size: 14px; }
.calc td { padding: 7px 8px; border-bottom: 1px solid var(--edge); font-variant-numeric: tabular-nums; }
.calc td:first-child { color: var(--muted); white-space: nowrap; }
.calc tr.total td { font-weight: 600; border-bottom: none; }
.callout { margin: 14px 0; padding: 14px 16px; border-radius: 12px; line-height: 1.6; font-size: 14px; }
.callout.tip { background: color-mix(in oklab, var(--fiat) 10%, transparent); }
.callout.warn { background: color-mix(in oklab, var(--amber) 12%, transparent); }
.code-block { font-family: var(--font-mono); font-size: 13px; background: var(--surface-2); padding: 14px 16px; border-radius: 12px; margin: 0 0 10px; line-height: 1.6; overflow-x: auto; }
.guide-figure { margin: 18px 0 6px; overflow-x: auto; }
.guide-figure svg { width: 100%; min-width: 560px; height: auto; color: var(--muted); }
.guide-figure .g-node rect { fill: var(--surface-2); stroke: var(--border); }
.guide-figure .g-title { fill: var(--text); font: 600 14px var(--font-sans); }
.guide-figure .g-sub { fill: var(--muted); font: 12px var(--font-sans); }
.guide-figure .g-label { font: 600 12px var(--font-mono); }
.guide-figure .g-line { stroke-width: 2; }
.guide-figure .fiat { stroke: var(--fiat); fill: var(--fiat); color: var(--fiat); }
.guide-figure .usdt { stroke: var(--usdt); fill: var(--usdt); color: var(--usdt); }
.faq details { border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 18px; color: var(--muted); }
.faq details[open] summary::before { content: "−"; }
.faq details p { padding: 0 16px 14px 34px; margin: 0; color: var(--muted); }
.changelog .cl-day { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.changelog .cl-date { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.changelog ul { margin: 0; padding-left: 18px; line-height: 1.65; }
@media (max-width: 1100px) {
  .guide { grid-template-columns: minmax(0, 1fr); }
  .guide-toc { display: none; }
}
@media (max-width: 760px) {
  .guide-sec { padding: 20px 16px; }
  .guide-cards { grid-template-columns: minmax(0, 1fr); }
  .guide-table td:first-child { width: 42%; }
  .changelog .cl-day { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
