/* fando.trade — TradingView-style terminal, OptionAlgo-style amber brand.
   Layout: terminal grid (chart | side panel, bottom tabs under the chart); landing is a dotted-grid hero with pill nav. */
:root {
  --bg: #0d1016;
  --bg-dot: rgba(255, 255, 255, 0.045);
  --panel: #141821;
  --panel-2: #1b202b;
  --line: #262c38;
  --line-2: #323a49;
  --fg: #e7eaf0;
  --muted: #8a93a4;
  --faint: #5d6576;
  --accent: #ffb12e;
  --accent-2: #ff8a1f;
  --accent-ink: #1d1200;
  --accent-text: #ffb12e;
  --accent-soft: rgba(255, 177, 46, 0.12);
  --up: #089981;
  --dn: #f23645;
  --up-soft: rgba(8, 153, 129, 0.14);
  --dn-soft: rgba(242, 54, 69, 0.14);
  --itm: rgba(255, 177, 46, 0.055);
  --hover: rgba(255, 255, 255, 0.04);
  --select: #2962ff;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --f-display: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", "Trebuchet MS", Roboto, Ubuntu, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff; --bg-dot: rgba(19, 23, 34, 0.06); --panel: #f7f8fa; --panel-2: #eef0f4;
    --line: #e2e5ec; --line-2: #d3d7e0; --fg: #131722; --muted: #5f6675; --faint: #9097a5;
    --accent: #ffad1f; --accent-2: #ff8a1f; --accent-ink: #1d1200; --accent-text: #a35d00; --accent-soft: rgba(255, 160, 20, 0.14);
    --up: #078a74; --dn: #e0283a; --up-soft: rgba(8, 153, 129, 0.12); --dn-soft: rgba(242, 54, 69, 0.1);
    --itm: rgba(255, 170, 30, 0.08); --hover: rgba(19, 23, 34, 0.04); --select: #2962ff; --shadow: 0 12px 36px rgba(19, 23, 34, 0.16);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #ffffff; --bg-dot: rgba(19, 23, 34, 0.06); --panel: #f7f8fa; --panel-2: #eef0f4;
  --line: #e2e5ec; --line-2: #d3d7e0; --fg: #131722; --muted: #5f6675; --faint: #9097a5;
  --accent: #ffad1f; --accent-2: #ff8a1f; --accent-ink: #1d1200; --accent-text: #a35d00; --accent-soft: rgba(255, 160, 20, 0.14);
  --up: #078a74; --dn: #e0283a; --up-soft: rgba(8, 153, 129, 0.12); --dn-soft: rgba(242, 54, 69, 0.1);
  --itm: rgba(255, 170, 30, 0.08); --hover: rgba(19, 23, 34, 0.04); --select: #2962ff; --shadow: 0 12px 36px rgba(19, 23, 34, 0.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.45 var(--f-ui); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--select); outline-offset: 2px; }
.num, td, .tab-n { font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .dn { color: var(--dn); }
[hidden] { display: none !important; }

/* ---------- shared bits ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg); font: 700 19px/1 var(--f-display); letter-spacing: -0.01em; white-space: nowrap; }
.brand em { font-style: normal; color: var(--accent-text); }
.brand svg { flex: none; }
.sim { font: 700 9.5px/1 var(--f-ui); letter-spacing: 0.08em; color: var(--accent-text); border: 1px solid currentColor; border-radius: 3px; padding: 2px 4px; }
.btn { border: 1px solid var(--line-2); background: var(--panel-2); border-radius: 8px; padding: 8px 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--fg); }
.btn:hover { border-color: var(--faint); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 24px rgba(255, 150, 30, 0.25); }
.btn-primary:hover { filter: brightness(1.05); border-color: transparent; }
.btn-buy { background: var(--up); color: #fff; border-color: transparent; }
.btn-sell { background: var(--dn); color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 6px; }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pill { border: 1px solid transparent; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.pill:hover { color: var(--fg); background: var(--hover); }
.pill[aria-pressed="true"], .pill[aria-selected="true"] { color: var(--fg); background: var(--accent-soft); border-color: rgba(255, 177, 46, 0.35); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 5px 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--panel-2); color: var(--fg); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }
.input, select.input { background: var(--bg); border: 1px solid var(--line-2); border-radius: 7px; padding: 7px 9px; min-width: 0; width: 100%; }
.input:focus { border-color: var(--select); outline: none; }

/* ---------- terminal ---------- */
body.app { height: 100%; min-height: 100vh; display: flex; flex-direction: column; }
html:has(body.app) { height: 100%; }
.tb { display: flex; align-items: center; gap: 14px; padding: 8px max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--panel); flex-wrap: wrap; position: relative; z-index: 5; }
.tb .modes { margin-left: 4px; }
.tickers { display: flex; gap: 6px; flex-wrap: wrap; }
.tick { display: flex; align-items: baseline; gap: 7px; border: 1px solid var(--line); background: var(--bg); padding: 5px 10px; border-radius: 7px; white-space: nowrap; }
.tick[aria-pressed="true"] { border-color: var(--accent); }
.tick b { font-size: 12px; letter-spacing: 0.02em; }
.tick .px { font-weight: 600; }
.tick small { font-size: 12px; }
.mstat { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }
.tb .spacer { flex: 1; }
.fundsTop { display: flex; gap: 16px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.fundsTop b { display: block; color: var(--fg); font-size: 13.5px; }
.icon { border: 1px solid var(--line-2); background: transparent; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.icon:hover { color: var(--fg); }

.notice { display: flex; align-items: center; gap: 12px; padding: 7px max(14px, env(safe-area-inset-right, 0px)) 7px max(14px, env(safe-area-inset-left, 0px)); background: var(--accent-soft); color: var(--fg); font-size: 13px; border-bottom: 1px solid var(--line); }
.notice p { margin: 0; flex: 1; min-width: 0; }

.pbar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 8px max(14px, env(safe-area-inset-right, 0px)) 8px max(14px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); background: var(--panel); }
.pbar .clock { font: 700 18px/1 var(--f-display); font-variant-numeric: tabular-nums; min-width: 86px; }
.prog { flex: 1 1 160px; height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; min-width: 120px; }
.prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.pbar .note { font-size: 12px; color: var(--muted); }

.ws { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; grid-template-rows: minmax(260px, 1fr) 250px; grid-template-areas: "chart side" "bottom side"; }
.chartWrap { grid-area: chart; display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); position: relative; }
.ctool { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ctool .sym { font-weight: 700; display: flex; gap: 8px; align-items: center; }
.ctool .chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border-radius: 6px; padding: 3px 4px 3px 8px; font-size: 12.5px; }
.ctool .chip button { border: 0; background: transparent; color: var(--muted); padding: 0 4px; font-size: 14px; line-height: 1; }
.legend { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.legend b { color: var(--fg); font-weight: 600; }
.chart { flex: 1; min-height: 0; position: relative; }
.overlayMsg { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow); z-index: 3; display: flex; gap: 12px; align-items: center; max-width: calc(100% - 32px); }
.attrib { position: absolute; right: 70px; bottom: 30px; font-size: 10.5px; color: var(--faint); z-index: 2; }
.attrib a { color: inherit; }

.side { grid-area: side; display: flex; flex-direction: column; min-height: 0; background: var(--panel); position: relative; }
.sideHead { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.sideHead .row { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stats { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.stats b { color: var(--fg); font-weight: 600; }
.chainWrap { flex: 1; overflow: auto; min-height: 0; }
table { border-collapse: collapse; width: 100%; }
.chain { font-size: 12.5px; }
.chain th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-weight: 600; font-size: 11px; padding: 6px 6px; text-align: right; border-bottom: 1px solid var(--line); z-index: 1; white-space: nowrap; }
.chain th.side-h { text-align: center; letter-spacing: 0.06em; }
.chain td { padding: 5px 6px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; position: relative; }
.chain td.k { text-align: center; font-weight: 700; background: var(--panel-2); }
.chain tr.atm td.k { background: var(--accent-soft); color: var(--accent-text); }
.chain td.itm { background: var(--itm); }
.chain td.ltp { font-weight: 600; cursor: pointer; }
.chain td.ltp:hover { background: var(--hover); }
.chain .bs { position: absolute; top: 50%; transform: translateY(-50%); display: none; gap: 3px; }
.chain td.ce.ltp .bs { left: 4px; } .chain td.pe.ltp .bs { right: 4px; }
.chain tr:hover .bs { display: flex; }
.chain .bs button { border: 0; border-radius: 4px; font-size: 11px; font-weight: 700; padding: 2px 6px; color: #fff; }
.chain .bs .b { background: var(--up); } .chain .bs .s { background: var(--dn); }
.chain tr.spot td { padding: 0; border: 0; height: 0; position: relative; z-index: 2; }
.chain tr.spot td div { position: relative; height: 0; border-top: 1px dashed var(--accent); }
.chain tr.spot td.k div span { position: absolute; left: 50%; transform: translate(-50%, -50%); background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.chg { font-size: 11px; display: block; font-weight: 500; }
.oibar { position: absolute; top: 4px; bottom: 4px; opacity: 0.18; border-radius: 2px; pointer-events: none; }
.ce .oibar { right: 0; background: var(--dn); } .pe .oibar { left: 0; background: var(--up); }

.ticket { position: absolute; inset: 0; background: var(--panel); z-index: 4; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.ticket header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); gap: 8px; }
.ticket header b { font-size: 15px; }
.ticket .body { padding: 14px; display: flex; flex-direction: column; gap: 14px; overflow: auto; flex: 1; }
.bsSwitch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bsSwitch button { border: 1px solid var(--line-2); background: transparent; border-radius: 8px; padding: 9px; font-weight: 700; color: var(--muted); }
.bsSwitch button[data-side="BUY"][aria-pressed="true"] { background: var(--up); color: #fff; border-color: var(--up); }
.bsSwitch button[data-side="SELL"][aria-pressed="true"] { background: var(--dn); color: #fff; border-color: var(--dn); }
.quoteRow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.quoteRow div { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 4px; }
.quoteRow span { display: block; font-size: 11px; color: var(--muted); }
.quoteRow b { font-size: 15px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stepper { display: flex; align-items: stretch; }
.stepper button { width: 34px; border: 1px solid var(--line-2); background: var(--panel-2); }
.stepper button:first-child { border-radius: 7px 0 0 7px; } .stepper button:last-child { border-radius: 0 7px 7px 0; }
.stepper .input { border-radius: 0; text-align: center; border-left: 0; border-right: 0; }
.summary { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; }
.summary span { color: var(--muted); }
.ticket footer { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.ticket footer .btn { width: 100%; padding: 11px; font-size: 15px; }
.err { color: var(--dn); font-size: 12.5px; min-height: 1em; margin: 0; }

.bottom { grid-area: bottom; display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.btabs { display: flex; align-items: center; gap: 4px; padding: 5px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.btabs .total { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.btabs .total b { font-size: 14px; }
.tab-n { font-size: 11px; background: var(--panel-2); border-radius: 99px; padding: 0 6px; margin-left: 4px; color: var(--muted); }
.bview { flex: 1; overflow: auto; min-height: 0; }
.grid { font-size: 12.5px; }
.grid th { position: sticky; top: 0; background: var(--bg); color: var(--muted); font-weight: 600; font-size: 11px; text-align: right; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
.grid td { padding: 6px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.grid th:first-child, .grid td:first-child { text-align: left; }
.grid .l { text-align: left; }
.grid tr:hover td { background: var(--hover); }
.grid .mini { width: 78px; padding: 3px 6px; text-align: right; font-size: 12px; }
.tag { font-size: 10.5px; font-weight: 700; border-radius: 4px; padding: 2px 5px; letter-spacing: 0.03em; }
.tag.buy { background: var(--up-soft); color: var(--up); } .tag.sell { background: var(--dn-soft); color: var(--dn); }
.tag.muted { background: var(--panel-2); color: var(--muted); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.fundsGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; padding: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; min-width: 0; }
.kpi span { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.kpi b { font-size: 17px; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 12px 14px; align-items: center; }
.confirm { display: flex; gap: 8px; align-items: center; font-size: 13px; flex-wrap: wrap; }

.appfoot { display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; padding: 6px max(14px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); font-size: 11.5px; color: var(--faint); border-top: 1px solid var(--line); background: var(--panel); }
.appfoot a { color: var(--muted); }

#toasts { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(40px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--panel); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 12px; font-size: 13px; box-shadow: var(--shadow); animation: tin .18s ease-out; }
.toast.ok { border-left-color: var(--up); } .toast.bad { border-left-color: var(--dn); }
@keyframes tin { from { transform: translateY(6px); opacity: 0.4; } to { transform: none; opacity: 1; } }

/* ---------- backtest ---------- */
.bt { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: 400px minmax(0, 1fr); }
.btForm { border-right: 1px solid var(--line); background: var(--panel); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.btForm h2, .btRes h2 { margin: 0; font: 700 20px/1.2 var(--f-display); }
.btForm p.hint, .btRes p.hint { margin: 0; color: var(--muted); font-size: 12.5px; }
.legs { display: flex; flex-direction: column; gap: 6px; }
.leg { display: grid; grid-template-columns: 74px 64px minmax(0, 1fr) 64px 28px; gap: 6px; align-items: center; }
.leg .x { border: 0; background: transparent; color: var(--muted); font-size: 16px; }
.legHead { display: grid; grid-template-columns: 74px 64px minmax(0, 1fr) 64px 28px; gap: 6px; font-size: 11px; color: var(--muted); font-weight: 600; }
.btRes { padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.eqChart { height: 260px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tableBox { border: 1px solid var(--line); border-radius: 10px; overflow: auto; max-height: 420px; }

/* ---------- responsive terminal ---------- */
@media (max-width: 1100px) {
  .ws { grid-template-columns: minmax(0, 1fr) 360px; }
  .fundsTop { display: none; }
}
@media (max-width: 860px) {
  body.app { height: auto; }
  .ws { display: flex; flex-direction: column; }
  .chartWrap { border-right: 0; }
  .chart { height: 360px; flex: none; }
  .side { border-top: 1px solid var(--line); }
  .chainWrap { max-height: 520px; }
  .bottom { border-right: 0; min-height: 280px; }
  .bview { max-height: 420px; }
  .ticket { position: fixed; inset: auto 0 0 0; max-height: 88vh; border-radius: 14px 14px 0 0; border: 1px solid var(--line-2); box-shadow: var(--shadow); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bt { grid-template-columns: 1fr; }
  .btForm { border-right: 0; border-bottom: 1px solid var(--line); }
  .chain .hideS { display: none; }
  .tb { gap: 8px 10px; }
  .tb .modes { order: 5; width: 100%; margin-left: 0; }
}
@media (max-width: 480px) {
  .tickers .tick small { display: none; }
  .mstat span.lbl { display: none; }
}

/* ---------- landing ---------- */
body.site { background: var(--bg); background-image: radial-gradient(var(--bg-dot) 1px, transparent 1.2px); background-size: 22px 22px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 16px; flex-wrap: wrap; }
.nav .pills { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.nav .pill { text-decoration: none; }
.hero { text-align: center; padding-block: 56px 32px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.eyebrow { font: 700 12px/1 var(--f-ui); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-text); }
.hero h1 { font: 800 clamp(38px, 7vw, 76px)/1.02 var(--f-display); letter-spacing: -0.03em; margin: 0; text-wrap: balance; max-width: 15ch; }
.grad { background: linear-gradient(100deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; max-width: 60ch; color: var(--muted); font-size: 17px; text-wrap: pretty; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.hero .ctas .btn { padding: 13px 24px; font-size: 16px; border-radius: 12px; }
.trust { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; color: var(--muted); font-size: 13px; }
.trust span::before { content: "✓"; color: var(--up); margin-right: 6px; font-weight: 700; }
.term { margin-top: 18px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; text-align: left; }
.term .bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.term .bar .lights { display: flex; gap: 6px; } .term .bar .lights i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.term .tick { background: var(--bg); }
.term .body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 340px; }
.term .mini { height: 340px; }
.term .miniChain { border-left: 1px solid var(--line); overflow: hidden; }
.term .miniChain table { font-size: 12px; }
.term .miniChain td, .term .miniChain th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.term .miniChain th { color: var(--muted); font-size: 11px; font-weight: 600; }
.term .miniChain td.k { text-align: center; font-weight: 700; background: var(--panel-2); }
.term .miniChain tr.atm td.k { background: var(--accent-soft); color: var(--accent-text); }
.section { padding-block: 64px; display: flex; flex-direction: column; gap: 28px; }
.section h2 { font: 800 clamp(28px, 4.4vw, 44px)/1.08 var(--f-display); letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.section .lead { color: var(--muted); max-width: 62ch; margin: 0; font-size: 16px; }
.center { text-align: center; align-items: center; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { margin: 0; font: 700 19px/1.2 var(--f-display); }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.card .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-text); }
.card a { font-weight: 600; text-decoration: none; margin-top: auto; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: s; }
.steps li { list-style: none; counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.steps li::before { content: counter(s); font: 800 30px/1 var(--f-display); color: var(--accent-text); }
.steps b { font-size: 16px; } .steps span { color: var(--muted); }
.steps { padding: 0; margin: 0; }
.faq { display: flex; flex-direction: column; gap: 8px; max-width: 820px; width: 100%; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 15.5px; }
.faq p { color: var(--muted); margin: 10px 0 0; }
.cta { background: linear-gradient(135deg, var(--accent-soft), transparent); border: 1px solid var(--line-2); border-radius: 20px; padding: 40px 24px; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.sitefoot { border-top: 1px solid var(--line); padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 12px; }
.sitefoot .row { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.sitefoot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.sitefoot a { color: var(--muted); }
.legal { max-width: 760px; padding-block: 24px 64px; }
.legal h1 { font: 800 40px/1.1 var(--f-display); margin: 12px 0 6px; }
.legal h2 { font: 700 22px/1.2 var(--f-display); margin: 36px 0 8px; }
.legal p, .legal li { color: var(--muted); max-width: 68ch; }
@media (max-width: 860px) {
  .term .body { grid-template-columns: 1fr; }
  .term .miniChain { border-left: 0; border-top: 1px solid var(--line); }
  .term .mini { height: 280px; }
  .hero { padding-block: 32px 16px; }
}
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ---------- ads ---------- */
.adwrap { margin: 8px auto; width: 100%; max-width: 970px; text-align: center; min-width: 0; }
.adwrap small { display: none; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.adwrap:has(ins[data-ad-status="filled"]) small { display: block; }
.adwrap ins[data-ad-status="unfilled"] { display: none !important; }
.btForm .adwrap { margin-top: 12px; }
