/* Nocture LLM · llm.nocture.vn
   Same night palette as nocture.vn: near-black canvas, hairline rails, one starlight accent. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/Inter-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/Inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/Inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/assets/fonts/JetBrainsMono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap; src: url(/assets/fonts/JetBrainsMono-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

:root {
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  --maxw: 1200px; --hdr: 64px; --ease: cubic-bezier(.2,.7,.2,1);
  --bg: #fafafa; --bg-2: #f4f4f5; --panel: #ffffff; --panel-2: #f4f4f5;
  --line: rgba(9,9,11,.085); --line-2: rgba(9,9,11,.15);
  --fg: #09090b; --fg-2: #52525b; --muted: #71717a;
  --accent: #3a4fd6; --accent-soft: rgba(58,79,214,.09); --accent-glow: rgba(58,79,214,.18);
  --p-bg: #09090b; --p-fg: #fafafa; --s-bg: #ffffff; --s-fg: #09090b;
  --ok: #16a34a; --warn: #b45309; --bad: #dc2626; --ok-soft: rgba(22,163,74,.1); --bad-soft: rgba(220,38,38,.09); --warn-soft: rgba(180,83,9,.1);
  --shadow: 0 1px 2px rgba(9,9,11,.04), 0 20px 50px -24px rgba(9,9,11,.18);
  --tile: #0b0f2b; --tile-line: rgba(195,205,255,.75); --tile-star: #e6eaff; --tile-bright: #fff;
  --hdr-bg: rgba(250,250,250,.8); --code-bg: #0c0c10; --code-fg: #e4e4e7;
  color-scheme: light;
}
:root[data-theme="dark"], :root:not([data-theme="light"]) {
  --bg: #09090b; --bg-2: #0c0c0f; --panel: #0e0e11; --panel-2: #15151a;
  --line: rgba(255,255,255,.075); --line-2: rgba(255,255,255,.13);
  --fg: #fafafa; --fg-2: #a1a1aa; --muted: #71717a;
  --accent: #a8b8ff; --accent-soft: rgba(168,184,255,.1); --accent-glow: rgba(120,144,255,.28);
  --p-bg: #fafafa; --p-fg: #09090b; --s-bg: #15151a; --s-fg: #fafafa;
  --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; --ok-soft: rgba(74,222,128,.1); --bad-soft: rgba(248,113,113,.1); --warn-soft: rgba(251,191,36,.1);
  --shadow: 0 0 0 1px rgba(255,255,255,.02), 0 30px 60px -30px rgba(0,0,0,.9);
  --tile: #12162e; --hdr-bg: rgba(9,9,11,.75); --code-bg: #0b0b0e;
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 12px); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .92em; }
.nc-tile { fill: var(--tile); } .nc-line { stroke: var(--tile-line); } .nc-star { fill: var(--tile-star); } .nc-bright { fill: var(--tile-bright); }
[hidden] { display: none !important; }
.frame { width: calc(100% - 40px); max-width: var(--maxw); margin: 0 auto; }
.rails { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.muted { color: var(--muted); } .fg2 { color: var(--fg-2); } .ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--p-bg); color: var(--p-fg); }
.skip:focus { top: 12px; }

/* ---------- header / footer ---------- */
.hdr { position: sticky; top: 0; z-index: 50; height: var(--hdr); background: var(--hdr-bg); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.hdr-row { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.brand small { font: 500 11px var(--font-mono); padding: 2px 7px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--fg-2); letter-spacing: .04em; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 6px 12px; border-radius: 8px; color: var(--fg-2); font-size: 14px; transition: color .15s, background .15s; }
.nav a:hover, .nav a[aria-current] { color: var(--fg); background: var(--accent-soft); }
.hdr-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--fg-2); }
.icon-btn:hover { color: var(--fg); border-color: var(--line-2); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: var(--hdr); left: 0; right: 0; flex-direction: column; padding: 10px 20px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .menu-btn { display: inline-grid; }
  .hdr-tools .btn-ghost { display: none; }
}
.ftr { border-top: 1px solid var(--line); margin-top: 80px; }
.ftr-in { padding: 48px 28px 28px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.ftr h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.ftr a { display: block; color: var(--fg-2); font-size: 14px; padding: 3px 0; }
.ftr a:hover { color: var(--fg); }
.ftr p { color: var(--fg-2); font-size: 14px; max-width: 340px; margin-top: 12px; }
.ftr-base { padding: 18px 28px 28px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
@media (max-width: 760px) { .ftr-in { grid-template-columns: 1fr 1fr; } }

/* ---------- buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: transform .2s var(--ease), background .15s, border-color .15s, box-shadow .2s, opacity .15s; background: var(--s-bg); color: var(--s-fg); border-color: var(--line-2); }
.btn:hover { border-color: var(--fg-2); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--p-bg); color: var(--p-fg); border-color: transparent; box-shadow: 0 8px 30px -12px var(--accent-glow); }
.btn-primary:hover { box-shadow: 0 0 0 4px var(--accent-soft), 0 12px 34px -12px var(--accent-glow); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
.btn-ghost:hover { color: var(--fg); border-color: var(--line); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn svg { width: 15px; height: 15px; }
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 500; color: var(--fg-2); }
.field small { color: var(--muted); font-size: 12px; }
.input, select.input, textarea.input { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-sm { height: 32px; font-size: 13px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.form { display: grid; gap: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }

/* ---------- tags, chips, badges ---------- */
.tag { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--fg-2); padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); }
.tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--fg-2); background: var(--panel); cursor: pointer; transition: all .15s; white-space: nowrap; }
.chip:hover { color: var(--fg); border-color: var(--line-2); }
.chip.on { color: var(--p-fg); background: var(--p-bg); border-color: transparent; }
.chip b { font-weight: 500; opacity: .6; font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; font: 500 11px var(--font-mono); background: var(--panel-2); color: var(--fg-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }

/* ---------- surfaces ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { font-size: 15px; font-weight: 600; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush .card-h { padding: 16px 20px 0; }
.stat { display: grid; gap: 4px; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-family: var(--font-mono); }
.stat .v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.stat .s { font-size: 13px; color: var(--fg-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.note { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--fg); font-size: 14px; border: 1px solid transparent; }
.note.warn { background: var(--warn-soft); }
.note.bad { background: var(--bad-soft); }
.note.ok { background: var(--ok-soft); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--accent-soft); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.mono, .tbl .mono { font-size: 13px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 14px; font-size: 13px; color: var(--muted); }

/* ---------- code ---------- */
.code { position: relative; background: var(--code-bg); color: var(--code-fg); border-radius: 14px; border: 1px solid var(--line); font: 13px/1.65 var(--font-mono); overflow: hidden; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; white-space: pre; }
.code .copy { position: absolute; top: 8px; right: 8px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #a1a1aa; font: 12px var(--font-sans); cursor: pointer; opacity: 0; transition: opacity .15s; }
.code:hover .copy, .code .copy:focus { opacity: 1; }
.code .copy:hover { color: #fff; }
.code-tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); overflow-x: auto; }
.code-tabs button { background: none; border: 0; color: #71717a; padding: 6px 12px 9px; font: 12.5px var(--font-sans); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.code-tabs button.on { color: #fafafa; border-bottom-color: #a8b8ff; }
.code .c { color: #71717a; } .code .s { color: #a5d6a7; } .code .k { color: #a8b8ff; } .code .n { color: #fbbf24; }
:not(pre) > code { padding: 1px 6px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); font-size: .86em; }
.copyable { cursor: pointer; }
.kbox { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px dashed var(--line-2); font: 13px var(--font-mono); word-break: break-all; }
.kbox span { flex: 1; }

/* ---------- modal + toast ---------- */
dialog.modal { border: 1px solid var(--line-2); border-radius: 18px; padding: 0; background: var(--panel); color: var(--fg); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: var(--shadow); }
dialog.modal.wide { width: min(860px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(3px); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-h h3 { font-size: 16px; font-weight: 600; }
.modal-b { padding: 20px 22px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--panel); }
.toasts { position: fixed; z-index: 200; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; padding: 10px 16px; border-radius: 12px; background: var(--p-bg); color: var(--p-fg); font-size: 14px; box-shadow: var(--shadow); animation: tin .25s var(--ease); max-width: min(520px, calc(100vw - 32px)); }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #04130a; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- marketing (homepage, same language as nocture.vn: rails, dot matrix, hatch) ---------- */
:root { --dot: 9, 9, 11; --dot-a: .32; --ease-out: cubic-bezier(.16, 1, .3, 1); }
:root[data-theme="dark"], :root:not([data-theme="light"]) { --dot: 255, 255, 255; --dot-a: .5; }
.rails { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
body[data-page="home"] .hdr-row { padding: 0 20px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
body[data-page="home"] .ftr { margin-top: 0; }
.dots { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.display { font-size: clamp(38px, 6vw, 72px); font-weight: 500; line-height: 1.12; letter-spacing: -.04em; text-wrap: balance; }
.lede { margin-top: 22px; max-width: 620px; color: var(--fg-2); font-size: clamp(16px, 1.4vw, 18px); line-height: 1.65; text-wrap: pretty; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.lp-tag { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); background: var(--accent-soft); color: var(--accent); font: 500 11.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.lp-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 500; line-height: 1.16; letter-spacing: -.035em; text-wrap: balance; }
.sub { margin-top: 16px; max-width: 580px; color: var(--fg-2); font-size: 17px; line-height: 1.65; text-wrap: pretty; }
.center { text-align: center; } .center .sub { margin-left: auto; margin-right: auto; }
[data-rise] { opacity: 0; transform: translateY(14px); filter: blur(6px); }
.ready [data-rise] { opacity: 1; transform: none; filter: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), filter .9s var(--ease-out); }
.ready .hero-in > :nth-child(2) { transition-delay: .07s; } .ready .hero-in > :nth-child(3) { transition-delay: .14s; } .ready .hero-in > :nth-child(4) { transition-delay: .21s; } .ready .hero-in > :nth-child(5) { transition-delay: .28s; } .ready .sc { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { [data-rise] { opacity: 1; transform: none; filter: none; } }

/* hero */
.hero { position: relative; padding-top: 96px; overflow: hidden; }
.hero > .dots { left: 50%; width: 100vw; height: 900px; transform: translateX(-50%); -webkit-mask-image: radial-gradient(55% 62% at 50% 40%, transparent 28%, #000 70%, rgba(0,0,0,.35) 100%); mask-image: radial-gradient(55% 62% at 50% 40%, transparent 28%, #000 70%, rgba(0,0,0,.35) 100%); }
.hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: 0 24px; text-align: center; }
.hero .display { margin-top: 24px; max-width: 920px; }
.hero-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font: 12px var(--font-mono); letter-spacing: .02em; color: var(--muted); }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .7; }

/* showcase: model list + code + streamed reply */
.sc { position: relative; z-index: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); margin: 72px 32px 0; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 18px 18px 0 0; background: var(--panel); text-align: left; }
.sc::before { content: ""; position: absolute; left: 8%; right: 8%; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.sc-glow { position: absolute; left: 10%; right: 10%; top: -150px; height: 300px; z-index: -1; pointer-events: none; background: radial-gradient(50% 50% at 50% 50%, var(--accent-glow), transparent 70%); filter: blur(10px); }
.sc-side { display: flex; flex-direction: column; gap: 2px; padding: 16px 10px; border-right: 1px solid var(--line); min-width: 0; }
.sc-lbl { padding: 2px 10px 10px; font: 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sc-m { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; color: var(--fg-2); transition: background-color .2s, color .2s; min-width: 0; }
.sc-m:hover, .sc-m[aria-pressed="true"] { background: var(--panel-2); color: var(--fg); }
.sc-m[aria-pressed="true"] .vendor-ico { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); }
.sc-m span:last-child { min-width: 0; }
.sc-m b { display: block; font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-m small { display: block; font: 11px var(--font-mono); color: var(--muted); white-space: nowrap; }
.sc-more { margin-top: auto; padding: 12px 10px 2px; font-size: 13px; color: var(--fg-2); }
.sc-more:hover { color: var(--fg); }
.sc-main { display: flex; flex-direction: column; min-width: 0; }
.sc-tabs { display: flex; align-items: center; gap: 22px; height: 50px; padding: 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.sc-tabs button { position: relative; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; font: 13px var(--font-mono); color: var(--muted); white-space: nowrap; transition: color .2s; }
.sc-tabs button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .35s var(--ease-out); }
.sc-tabs button:hover, .sc-tabs button.on { color: var(--fg); }
.sc-tabs button.on::after { transform: scaleX(1); }
.sc-live { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; font: 11px var(--font-mono); color: var(--muted); white-space: nowrap; }
.sc-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: live 2s ease-in-out infinite; }
@keyframes live { 50% { opacity: .4; } }
.sc-code { position: relative; }
.sc-code pre { margin: 0; padding: 20px 22px; min-height: 236px; overflow-x: auto; font: 13px/1.7 var(--font-mono); color: var(--fg); white-space: pre; }
.sc-code .c { color: var(--muted); } .sc-code .s { color: #16a34a; } .sc-code .k { color: var(--accent); } .sc-code .n { color: #d97706; }
:root[data-theme="dark"] .sc-code .s, :root:not([data-theme="light"]) .sc-code .s { color: #a5d6a7; }
:root[data-theme="dark"] .sc-code .n, :root:not([data-theme="light"]) .sc-code .n { color: #fbbf24; }
.sc-code .copy { position: absolute; top: 12px; right: 14px; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--fg-2); font: 12px var(--font-sans); cursor: pointer; }
.sc-code .copy:hover { color: var(--fg); }
.sc-out { position: relative; margin: 0 22px 22px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: radial-gradient(80% 120% at 0% 0%, var(--accent-soft), transparent 60%), var(--bg-2); min-height: 132px; }
.sc-out-h { display: flex; align-items: center; gap: 10px; font: 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sc-out-h b { font-weight: 500; color: var(--fg-2); text-transform: none; letter-spacing: 0; }
.sc-out-h .st { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--ok); }
.sc-out-h .st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sc-txt { margin-top: 10px; font-size: 15px; line-height: 1.65; color: var(--fg); min-height: 50px; }
.sc-txt .cur { display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sc-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); font: 12px var(--font-mono); color: var(--muted); }
.sc-foot b { color: var(--fg); font-weight: 500; }
.sc-foot .cost b { color: var(--accent); }

/* strip of tools */
.strip { display: grid; grid-template-columns: 1.3fr repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip > * { display: flex; align-items: center; justify-content: center; gap: 10px; height: 88px; border-left: 1px solid var(--line); font-size: 16px; font-weight: 600; letter-spacing: -.02em; color: var(--fg-2); white-space: nowrap; transition: color .2s, background-color .2s; }
.strip > a:hover { color: var(--fg); background: var(--accent-soft); }
.strip > :first-child { justify-content: flex-start; padding: 0 22px; border-left: 0; font: 11px/1.5 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: normal; }
.strip svg { width: 20px; height: 20px; flex: none; opacity: .8; }

.hatch { height: 44px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(-45deg, var(--line) 0 1px, transparent 1px 9px); }
.sec { position: relative; padding: 104px 0 0; }
.sec-hd { padding: 0 40px; }
.sec-hd .h2 { margin-top: 18px; }
.sec-hd.center { display: flex; flex-direction: column; align-items: center; }

/* pricing */
.px-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 44px; padding: 12px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.px-bar span { font: 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.px { width: 100%; border-collapse: collapse; font-size: 14px; }
.px th { padding: 12px 20px; text-align: left; font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.px td { padding: 14px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.px .num { text-align: right; font-variant-numeric: tabular-nums; }
.px tbody tr { cursor: pointer; transition: background-color .15s; }
.px tbody tr:hover { background: var(--accent-soft); }
.px td.empty { text-align: center; color: var(--muted); padding: 40px; cursor: default; }
.px-wrap { overflow-x: auto; }
.px-more { display: flex; justify-content: center; padding: 22px; border-bottom: 1px solid var(--line); }

/* feature grid */
.grid-f { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--line); }
.grid-f > div { padding: 34px 32px 36px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.grid-f > div:nth-child(3n + 1) { border-left: 0; }
.grid-f h3 { margin-top: 20px; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.grid-f p { margin-top: 8px; color: var(--fg-2); font-size: 15px; line-height: 1.6; }
.ico { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel); color: var(--accent); }
.ico svg { width: 19px; height: 19px; }

/* alternating rows */
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.row-vis { position: relative; display: grid; place-items: center; padding: 64px 40px; border-right: 1px solid var(--line); min-width: 0; overflow: hidden; background: radial-gradient(60% 60% at 50% 50%, var(--accent-soft), transparent 75%); }
.lrow-flip .row-vis { order: 2; border-right: 0; border-left: 1px solid var(--line); }
.row-txt { display: flex; flex-direction: column; justify-content: center; padding: 64px 52px; min-width: 0; }
.row-txt .lp-tag { align-self: flex-start; }
.row-txt h3 { margin-top: 18px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 500; line-height: 1.22; letter-spacing: -.03em; text-wrap: balance; }
.row-txt > p { margin-top: 14px; color: var(--fg-2); font-size: 16px; line-height: 1.65; }
.checks { display: grid; gap: 12px; margin: 24px 0 0; padding: 0; list-style: none; }
.checks li { position: relative; padding-left: 30px; color: var(--fg-2); font-size: 15px; line-height: 1.5; }
.checks li::before { content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.checks li::after { content: ""; position: absolute; left: 6px; top: 6.5px; width: 6px; height: 3.5px; border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }

/* visual: routing */
.route { position: relative; display: flex; align-items: center; }
.node { position: relative; z-index: 1; padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); font-size: 13px; white-space: nowrap; }
.node small { display: block; font: 10.5px var(--font-mono); color: var(--muted); letter-spacing: .04em; }
.node.gw { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.wire { position: relative; height: 1px; margin: 0 -1px; background: var(--line-2); }
.wire::after { content: ""; position: absolute; top: -2px; left: 0; width: 18px; height: 5px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: flow 1.8s linear infinite; }
@keyframes flow { from { left: 0; } to { left: calc(100% - 18px); } }
.ups { display: grid; gap: 10px; }
.ups .node { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.ups .node i { white-space: nowrap; }
.ups .node i { font: normal 10.5px var(--font-mono); padding: 2px 7px; border-radius: 999px; }
.ups .bad { opacity: .6; } .ups .bad i { color: var(--bad); background: var(--bad-soft); }
.ups .ok i { color: var(--ok); background: var(--ok-soft); }
.ups .ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.ups .idle i { color: var(--muted); background: var(--panel-2); }
.fan { position: relative; width: 44px; align-self: stretch; }
.fan svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fan path { fill: none; stroke: var(--line-2); stroke-width: 1; }
.fan path.on { stroke: var(--accent); stroke-dasharray: 4 4; animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -8; } }
.route-l { display: grid; grid-template-columns: auto 34px auto; align-items: center; }

/* visual: top-up */
.pay { position: relative; width: 100%; max-width: 380px; }
.pay-card { padding: 20px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.pay-top { display: flex; gap: 18px; align-items: center; }
.pay-qr { width: 116px; height: 116px; flex: none; padding: 8px; border-radius: 12px; background: #fff; }
.pay-qr canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.pay dl { display: grid; gap: 8px; margin: 0; font-size: 13px; min-width: 0; }
.pay dt { font: 10.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pay dd { margin: 0; font-weight: 500; }
.pay dd code { font: 500 13px var(--font-mono); color: var(--accent); }
.pay-bar { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--fg-2); }
.pay-bar b { color: var(--fg); font-variant-numeric: tabular-nums; transition: color .3s; }
.pay-bar b.up { color: var(--ok); }
.pay-toast { position: absolute; right: -18px; bottom: -26px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); font-size: 13px; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.pay-toast.show { opacity: 1; transform: none; }
.pay-toast i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); font-style: normal; font-size: 12px; }

/* visual: endpoints */
.eplist { width: 100%; max-width: 460px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.eplist-h { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 12px var(--font-mono); color: var(--fg-2); }
.eplist-h::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.ep-r { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); font: 12.5px var(--font-mono); }
.ep-r:last-child { border-bottom: 0; }
.ep-r em { font-style: normal; font-size: 10.5px; padding: 2px 0; border-radius: 6px; text-align: center; color: var(--accent); background: var(--accent-soft); }
.ep-r em.get { color: var(--ok); background: var(--ok-soft); }
.ep-r span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-r small { font: 11px var(--font-sans); color: var(--muted); white-space: nowrap; }

/* steps */
.steps4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps4 > div { position: relative; padding: 30px 28px 34px; border-left: 1px solid var(--line); }
.steps4 > div:first-child { border-left: 0; }
.steps4 b { display: block; font: 500 12px var(--font-mono); color: var(--accent); letter-spacing: .06em; }
.steps4 h3 { margin-top: 14px; font-size: 16px; font-weight: 600; }
.steps4 p { margin-top: 6px; color: var(--fg-2); font-size: 14.5px; line-height: 1.6; }
.steps4 > div:not(:last-child)::after { content: ""; position: absolute; top: 34px; right: -5px; z-index: 1; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); }

/* faq */
.faq2 { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); border-bottom: 1px solid var(--line); }
.faq2 > div:first-child { padding: 0 40px 64px; border-right: 1px solid var(--line); }
.faq2 > div:first-child p { margin-top: 16px; color: var(--fg-2); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 32px; cursor: pointer; list-style: none; font-weight: 500; transition: background-color .15s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--accent-soft); }
.faq summary::after { content: "+"; color: var(--muted); font: 20px/1 var(--font-mono); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 32px 22px; color: var(--fg-2); font-size: 15px; line-height: 1.7; }

/* cta */
.cta { position: relative; overflow: hidden; padding: 120px 24px 130px; text-align: center; border-bottom: 1px solid var(--line); }
.cta > .dots { -webkit-mask-image: radial-gradient(60% 70% at 50% 45%, transparent 25%, #000 80%); mask-image: radial-gradient(60% 70% at 50% 45%, transparent 25%, #000 80%); }
.cta > :not(.dots) { position: relative; }
.cta .sub { margin: 18px auto 0; }
.cta .cta-row { justify-content: center; }

@media (max-width: 960px) {
  .sc { grid-template-columns: 1fr; margin: 56px 16px 0; }
  .sc-side { flex-direction: row; gap: 6px; overflow-x: auto; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .sc-lbl, .sc-more { display: none; }
  .sc-m { flex: none; width: auto; border: 1px solid var(--line); }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip > :first-child { grid-column: 1 / -1; height: 52px; justify-content: center; border-bottom: 1px solid var(--line); }
  .strip > :nth-child(n+2) { border-bottom: 1px solid var(--line); }
  .strip > :nth-child(2), .strip > :nth-child(5) { border-left: 0; }
  .grid-f { grid-template-columns: 1fr 1fr; }
  .grid-f > div { border-left: 1px solid var(--line) !important; } .grid-f > div:nth-child(2n + 1) { border-left: 0 !important; }
  .lrow, .faq2 { grid-template-columns: 1fr; }
  .row-vis, .lrow-flip .row-vis { order: 0; border: 0; border-bottom: 1px solid var(--line); padding: 56px 24px 64px; }
  .row-txt { padding: 48px 28px 56px; }
  .steps4 { grid-template-columns: 1fr 1fr; }
  .steps4 > div:nth-child(3) { border-left: 0; } .steps4 > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .steps4 > div::after { display: none; }
  .faq2 > div:first-child { border-right: 0; padding: 0 28px 40px; }
}
@media (max-width: 600px) {
  .hero { padding-top: 64px; }
  .brand small { display: none; }
  .sec { padding-top: 80px; }
  .sec-hd { padding: 0 22px; }
  .sc-code pre { font-size: 12px; padding: 18px 16px; min-height: 0; }
  .sc-out { margin: 0 12px 12px; }
  .strip > * { height: 64px; font-size: 14px; }
  .grid-f { grid-template-columns: 1fr; }
  .grid-f > div { border-left: 0 !important; padding: 28px 22px; }
  .steps4 { grid-template-columns: 1fr; } .steps4 > div { border-left: 0 !important; border-bottom: 1px solid var(--line); } .steps4 > div:last-child { border-bottom: 0; }
  .faq summary { padding: 18px 22px; } .faq details p { padding: 0 22px 20px; }
  .route > .node:first-child, .route > .wire { display: none; }
  .route-l { grid-template-columns: auto 22px auto; } .ups .node { font-size: 12px; padding: 9px 11px; }
  .frame { width: calc(100% - 24px); }
  body[data-page="home"] .hdr-row { padding: 0 12px; gap: 12px; }
  .pay-toast { right: 0; }
  .px th, .px td { padding: 12px 14px; }
  .hide-sm { display: none; }
  .hero-meta, .sc-code .copy, .sc-out-h .st { display: none; }
  .px td:first-child { max-width: 170px; } .px td, .px th { padding-left: 12px; padding-right: 12px; }
}

.price-list .tbl td:first-child { font-weight: 500; }
.vendor-ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); font: 600 11px var(--font-sans); color: var(--fg-2); flex: none; }
.mname { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mname > div { min-width: 0; }
.mname b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mname small { display: block; font: 12px var(--font-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- page heads ---------- */
.page-h { padding: 48px 0 24px; }
.page-h h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -.03em; line-height: 1.1; font-weight: 600; }
.page-h p { color: var(--fg-2); margin-top: 10px; max-width: 680px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { max-width: 360px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.seg button { border: 0; background: none; padding: 4px 12px; border-radius: 7px; font-size: 13px; color: var(--fg-2); cursor: pointer; }
.seg button.on { background: var(--p-bg); color: var(--p-fg); }

/* ---------- rankings ---------- */
.rank { display: grid; gap: 8px; }
.rank-row { display: grid; grid-template-columns: 34px minmax(0, 1.3fr) 2fr 110px; gap: 14px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.rank-row .no { font: 500 14px var(--font-mono); color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--fg)); }
@media (max-width: 640px) { .rank-row { grid-template-columns: 28px 1fr 90px; } .rank-row .bar { display: none; } }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-top: 32px; }
.docs-nav { position: sticky; top: calc(var(--hdr) + 20px); align-self: start; max-height: calc(100vh - var(--hdr) - 40px); overflow: auto; font-size: 14px; }
.docs-nav h4 { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 6px; }
.docs-nav h4:first-child { margin-top: 0; }
.docs-nav a { display: block; padding: 4px 10px; border-radius: 7px; color: var(--fg-2); }
.docs-nav a:hover, .docs-nav a.on { color: var(--fg); background: var(--accent-soft); }
.prose { max-width: 820px; }
.prose section { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.prose h1 { font-size: 36px; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 12px; }
.prose h2 { font-size: 24px; letter-spacing: -.02em; margin-bottom: 12px; }
.prose h3 { font-size: 17px; margin: 22px 0 8px; }
.prose p, .prose li { color: var(--fg-2); }
.prose p { margin: 10px 0; }
.prose ul, .prose ol { padding-left: 20px; margin: 10px 0; display: grid; gap: 4px; }
.prose .code { margin: 14px 0; }
.prose table.tbl { margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; }
.prose a { color: var(--accent); }
@media (max-width: 900px) { .docs { grid-template-columns: 1fr; } .docs-nav { position: static; max-height: none; display: flex; flex-wrap: wrap; gap: 4px; } .docs-nav h4 { width: 100%; } }

/* ---------- app shell (console, admin) ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - var(--hdr)); }
.side { border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: var(--hdr); height: calc(100vh - var(--hdr)); overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; color: var(--fg-2); font-size: 14px; }
.side a svg { width: 17px; height: 17px; opacity: .8; }
.side a:hover { color: var(--fg); background: var(--panel-2); }
.side a.on { color: var(--fg); background: var(--accent-soft); }
.side h4 { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 6px; }
.side .bal { margin: 0 4px 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.side .bal .k { font: 500 11px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.side .bal .v { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 2px 0 10px; }
.side .grow { flex: 1; }
.main { padding: 28px 32px 60px; min-width: 0; }
.main-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.main-h h1 { font-size: 24px; letter-spacing: -.02em; font-weight: 600; }
.main-h p { color: var(--fg-2); font-size: 14px; margin-top: 4px; }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .side h4, .side .grow { display: none; }
  .side .bal { width: 100%; margin: 0 0 8px; }
  .main { padding: 20px 16px 50px; }
}
.auth { min-height: calc(100vh - var(--hdr)); display: grid; place-items: center; padding: 40px 16px; }
.auth .card { width: min(420px, 100%); padding: 28px; }
.auth h1 { font-size: 22px; letter-spacing: -.02em; margin-bottom: 4px; }
.auth .sub { color: var(--fg-2); font-size: 14px; margin-bottom: 20px; }
.auth .alt { margin-top: 16px; font-size: 14px; color: var(--fg-2); text-align: center; }
.auth .alt a, .link { color: var(--accent); cursor: pointer; }

/* charts */
.chart { width: 100%; height: 180px; }
.chart rect.b { fill: var(--accent); opacity: .85; }
.chart rect.b:hover { opacity: 1; }
.chart text { fill: var(--muted); font: 10px var(--font-mono); }
.chart line { stroke: var(--line); }

/* billing */
.topup { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .topup { grid-template-columns: 1fr; } }
.qr { background: #fff; border-radius: 16px; padding: 10px; border: 1px solid var(--line); }
.qr img { width: 100%; height: auto; border-radius: 10px; }
.bankrows { display: grid; gap: 8px; }
.bankrows > div { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-size: 14px; }
.bankrows span { color: var(--muted); }
.bankrows b { font-weight: 600; text-align: right; word-break: break-all; }
.amounts { display: flex; gap: 6px; flex-wrap: wrap; }
.waiting { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fg-2); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

/* playground */
.pg { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .pg { grid-template-columns: 1fr; } }
.chat { display: flex; flex-direction: column; min-height: 520px; }
.msgs { flex: 1; display: grid; gap: 12px; align-content: start; padding: 4px 0 16px; overflow: auto; max-height: 60vh; }
.msg { padding: 12px 14px; border-radius: 14px; background: var(--panel-2); white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; }
.msg.user { background: var(--accent-soft); margin-left: 40px; }
.msg.assistant { margin-right: 40px; }
.msg .who { font: 500 11px var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 4px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 52px; }
