/* =========================================================
   BIBIL0DAY Scan — design system
   White surfaces, cool gray structure, red as the one accent.
   ========================================================= */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --panel: #ffffff;
  --panel-2: #f1f3f6;
  --line: #e2e5ea;
  --line-soft: #eceef2;
  --line-strong: #cfd4dc;
  --text: #14161b;
  --muted: #4f5663;
  --muted-2: #6b7280;

  --accent: #d71920;          /* signal red */
  --accent-hover: #b8141a;
  --accent-ink: #ffffff;      /* text on red */
  --accent-dim: rgba(215, 25, 32, 0.08);
  --accent-glow: rgba(215, 25, 32, 0.28);
  --ok: #15803d;
  --warn: #a15c07;
  --danger: #b42318;
  --row-hover: rgba(20, 22, 27, 0.03);

  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 14px 44px rgba(20, 22, 27, 0.09);
  --shadow-sm: 0 1px 2px rgba(20, 22, 27, 0.05), 0 4px 14px rgba(20, 22, 27, 0.04);
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Cascadia Code", Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Space Grotesk", "Inter", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

code, .mono { font-family: var(--mono); }
.container { width: min(1200px, 100% - 40px); margin: 0 auto; }

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

/* ---------- Top navigation ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
}
.topbar .container { display: flex; align-items: center; gap: 20px; height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--text); }
.brand .mark { width: 38px; height: 38px; flex: none; display: block; }
.brand .wordmark-img { height: 17px; width: auto; display: block; }
.brand .tag {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  background: var(--accent); color: var(--accent-ink);
  padding: 3px 7px; border-radius: 5px; margin-left: 1px;
}
.brand.sm .mark { width: 30px; height: 30px; }
.brand.sm .wordmark-img { height: 14px; }

.nav { display: flex; gap: 2px; margin-left: 14px; }
.nav a { color: var(--muted); padding: 8px 13px; border-radius: 9px; font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--panel-2); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle {
  display: none; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer;
  align-items: center; justify-content: center;
}
.balance {
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text);
  border: 1px solid var(--line); background: var(--bg-soft);
  padding: 6px 12px; border-radius: 999px;
}
.balance:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text);
  font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .08s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { border-color: #aab1bd; background: var(--bg-soft); color: var(--text); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  box-shadow: 0 6px 20px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); box-shadow: 0 8px 26px rgba(215,25,32,.38); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--panel-2); border-color: transparent; }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 92px 0 56px; text-align: center; background: var(--bg); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(720px 340px at 50% -10%, rgba(215, 25, 32, 0.09), transparent 70%),
    radial-gradient(600px 300px at 12% 0%, rgba(20, 22, 27, 0.04), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(20,22,27,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20,22,27,.055) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(640px 380px at 50% 0%, #000 15%, transparent 75%);
  -webkit-mask-image: radial-gradient(640px 380px at 50% 0%, #000 15%, transparent 75%);
}
.hero .container { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--muted);
  border: 1px solid var(--line); background: var(--panel);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 26px; box-shadow: var(--shadow-sm);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(215,25,32,0); } 100% { box-shadow: 0 0 0 0 rgba(215,25,32,0); } }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(34px, 5.6vw, 66px);
  line-height: 1.04; letter-spacing: -0.035em; font-weight: 700;
  margin: 0 auto 20px; max-width: 17ch;
}
.hero h1 .hl { color: var(--accent); }
.hero h1 .zero { color: var(--accent); }
.hero p.lead { color: var(--muted); font-size: 18px; max-width: 60ch; margin: 0 auto 34px; }

/* ---------- Search ---------- */
.searchbar {
  display: flex; gap: 10px; text-align: left;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-lg);
  padding: 9px; box-shadow: var(--shadow);
  max-width: 800px; margin: 0 auto;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.searchbar:focus-within { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 4px var(--accent-dim); }
.searchbar .field { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.searchbar .field svg { position: absolute; left: 14px; color: var(--muted-2); pointer-events: none; }
.searchbar input[type="text"] {
  width: 100%; margin: 0; background: transparent; border: 0; box-shadow: none; outline: none;
  color: var(--text); font-family: var(--mono); font-size: 15px;
  padding: 13px 44px 13px 42px; border-radius: 10px;
}
.searchbar input[type="text"]:focus { box-shadow: none; }
.searchbar input::placeholder { color: var(--muted-2); opacity: .8; }
.searchbar kbd {
  position: absolute; right: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--bg-soft);
}
.searchbar select {
  background: var(--bg-soft); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 0 12px; font-family: var(--mono); font-size: 13px; outline: none; cursor: pointer;
}
.search-meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; color: var(--muted-2); font-size: 13px; }
.chip {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); background: var(--panel);
  padding: 5px 11px; border-radius: 8px; cursor: pointer; transition: all .15s ease;
}
.chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

.trust {
  margin-top: 40px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px;
  color: var(--muted-2); font-size: 13px;
}
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { color: var(--accent); }

/* ---------- Terminal preview (stays dark for contrast) ---------- */
.preview-wrap { padding: 8px 0 20px; }
.terminal {
  --panel: #14161b; --panel-2: #1c1f27; --bg-soft: #0f1115;
  --line: #2a2e39; --line-soft: #20232c; --text: #eef0f6; --muted: #a6adbf; --muted-2: #8b93a7;
  --accent: #ff5258; --row-hover: rgba(255,255,255,.04);
  color: var(--text);
  max-width: 980px; margin: 0 auto; border: 1px solid #2a2e39; border-radius: var(--radius-lg);
  background: #0f1115;
  box-shadow: 0 30px 80px rgba(20, 22, 27, 0.28); overflow: hidden;
}
.terminal .bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.03);
}
.terminal .bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3f4b; display: block; }
.terminal .bar i:nth-child(1) { background: #ff5258; }
.terminal .bar span { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted-2); }
.terminal .q { padding: 16px 20px 6px; font-family: var(--mono); font-size: 14px; color: var(--text); }
.terminal .q b { color: #ff7a7f; font-weight: 600; }
.terminal .q em { color: var(--muted-2); font-style: normal; }
.terminal .scroll { overflow-x: auto; padding: 8px 8px 12px; }
.terminal table { min-width: 640px; }
.terminal .note { padding: 0 20px 14px; font-size: 12px; color: var(--muted-2); }

/* ---------- Sections / grid ---------- */
section.block { padding: 72px 0; }
section.block.tight { padding-top: 0; }
.section-head { margin-bottom: 34px; }
.section-head.center { text-align: center; }
.section-head .kicker {
  display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px; font-weight: 600;
}
.section-head h2 { font-family: var(--display); font-size: clamp(26px, 3.4vw, 38px); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 10px; }
.section-head p { color: var(--muted); margin: 0; max-width: 62ch; font-size: 16px; }
.section-head.center p { margin: 0 auto; }
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card h3 { margin: 0 0 8px; font-size: 16px; font-family: var(--display); letter-spacing: -0.01em; }
.card p { color: var(--muted); margin: 0; font-size: 14px; }
.card.hover { transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.card.hover:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }

.icon-box {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 16px;
  color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(215,25,32,.18);
}
.step-no { font-family: var(--mono); font-size: 12px; color: var(--accent); font-weight: 700; letter-spacing: .1em; margin-bottom: 14px; display: block; }

.stats { border-block: 1px solid var(--line); background: var(--bg-soft); }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats .cell { padding: 28px 24px; border-left: 1px solid var(--line); }
.stats .cell:first-child { border-left: 0; padding-left: 0; }
.stat .value { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--text); }
.stat .value.accent { color: var(--accent); }
.stat .label { color: var(--muted-2); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.card.stat .value { color: var(--text); }

/* ---------- Syntax reference ---------- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.syntax { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); box-shadow: var(--shadow-sm); }
.syntax .row { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); align-items: baseline; }
.syntax .row:nth-child(even) { background: var(--bg-soft); }
.syntax .row:last-child { border-bottom: 0; }
.syntax code { color: var(--accent); font-size: 13px; font-weight: 600; }
.syntax span { color: var(--muted); font-size: 14px; }
.syntax .ex { font-family: var(--mono); font-size: 12px; color: var(--muted-2); font-weight: 400; display: block; margin-top: 2px; }

/* ---------- Pricing ---------- */
.plan { position: relative; display: flex; flex-direction: column; gap: 14px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 60px rgba(215,25,32,.12); }
.plan .badge {
  position: absolute; top: -12px; right: 18px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 999px; letter-spacing: .03em;
}
.plan .price { font-family: var(--mono); font-size: 36px; font-weight: 700; line-height: 1.1; }
.plan .price small { font-size: 13px; color: var(--muted-2); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 9px; color: var(--muted); font-size: 14px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: baseline; }
.plan li::before { content: "✓"; color: var(--accent); font-weight: 700; font-size: 12px; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-sm); transition: border-color .15s ease; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-size: 20px; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); font-size: 14.5px; }

/* ---------- CTA band ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center; padding: 60px 24px;
  border-radius: 22px; color: #fff;
  background:
    radial-gradient(520px 240px at 50% 0%, rgba(215,25,32,.38), transparent 70%),
    #14161b;
}
.cta h2 { font-family: var(--display); font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -0.025em; margin: 0 0 10px; }
.cta p { color: #b6bccb; margin: 0 auto 26px; max-width: 52ch; font-size: 16px; }
.cta .btn-primary { box-shadow: 0 8px 28px rgba(215,25,32,.5); }

/* ---------- Tables ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; background: var(--panel); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; padding: 12px 14px; background: var(--panel-2); color: var(--muted);
  font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:hover { background: var(--row-hover); }
tbody tr:last-child td { border-bottom: 0; }
td.mono, th.mono { font-family: var(--mono); font-size: 12.5px; }
.host-cell { color: var(--accent); font-weight: 500; }
.host-cell a { color: inherit; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); background: var(--bg-soft); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.queued { color: var(--muted); }
.pill.running { color: var(--text); border-color: var(--line-strong); }
.pill.running::before { background: var(--accent); animation: pulse 1.1s infinite; }
.pill.completed { color: var(--ok); border-color: rgba(21,128,61,.28); background: rgba(21,128,61,.07); }
.pill.failed { color: var(--danger); border-color: rgba(180,35,24,.3); background: rgba(180,35,24,.07); }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- Forms / auth ---------- */
.auth-wrap { max-width: 440px; margin: 56px auto; width: calc(100% - 40px); }
.auth-wrap .card { padding: 32px; box-shadow: var(--shadow); }
.auth-wrap .auth-brand { display: flex; justify-content: center; margin-bottom: 22px; }
.auth-wrap h1, .auth-wrap h2 { font-family: var(--display); letter-spacing: -0.02em; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin: 0 0 6px; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--text); padding: 12px 14px; font-family: inherit; font-size: 14px; outline: none; margin-bottom: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder { color: #98a0ad; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-note { color: var(--muted-2); font-size: 13px; }

/* ---------- Flash / toasts ---------- */
.flash {
  border: 1px solid var(--line); border-left-width: 3px; border-radius: 10px;
  padding: 12px 16px; margin: 18px 0; font-size: 14px; background: var(--panel); box-shadow: var(--shadow-sm);
}
.flash.success { border-left-color: var(--ok); }
.flash.error { border-left-color: var(--accent); }
.flash.info { border-left-color: #6b7280; }

/* ---------- Progress / queue ---------- */
.progress { height: 5px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); width: 30%; border-radius: 999px; animation: slide 1.4s infinite ease-in-out; }
@keyframes slide { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }

.empty { text-align: center; color: var(--muted-2); padding: 48px 16px; }

.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head .grow { flex: 1; min-width: 260px; }
.page-head h1, .page-head h2 { font-family: var(--display); letter-spacing: -0.02em; margin: 0 0 6px; }
.page-head h1 { font-size: 28px; }
.page-head h1.mono { font-family: var(--mono); letter-spacing: 0; }
.page-head .meta { color: var(--muted-2); font-size: 13px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.stat .value.token { font-size: 14px; font-weight: 500; word-break: break-all; color: var(--text); line-height: 1.5; }
[hidden] { display: none !important; }

/* ---------- Announcement / maintenance bars ---------- */
.announce { background: var(--text); color: #fff; text-align: center; font-size: 13.5px; padding: 9px 20px; }
.announce a { color: #fff; text-decoration: underline; font-weight: 600; }
.announce-alert { background: var(--accent); }
.nav-mobile-only { display: none; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.nav-admin { color: var(--accent) !important; font-weight: 600; }

/* ---------- Admin ---------- */
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-tabs a { padding: 8px 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted); }
.admin-tabs a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.admin-tabs a.active { background: var(--text); color: #fff; }
.split-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.split-2 > * { min-width: 0; }
.status-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 14px; align-items: start; }
.form-grid > div { min-width: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea { margin-bottom: 0; }
.inline-search { display: flex; gap: 10px; align-items: center; }
.inline-search input { flex: 1; min-width: 0; }
.row-actions { display: inline-flex; gap: 4px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: rgba(180,35,24,.08); }
.btn.danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; box-shadow: none; }
.btn.danger-solid:hover { background: #8f1b11; border-color: #8f1b11; color: #fff; }
.card-alert { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm); }
.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
input[type="number"], input[type="date"], select.field, textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--text); padding: 12px 14px; font-family: inherit; font-size: 14px; outline: none; margin-bottom: 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
select.field { appearance: auto; cursor: pointer; }
input[type="number"]:focus, input[type="date"]:focus, select.field:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

/* toggle switch */
.switch { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; margin: 0; color: var(--text); font-size: 14px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line-strong); position: relative; margin-top: 2px; transition: background .15s ease; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s ease; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-text { display: grid; gap: 2px; }
.switch-text span { color: var(--muted-2); font-size: 13.5px; font-weight: 400; }

/* ---------- Copyable command blocks ---------- */
.cmd { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; }
.cmd pre {
  flex: 1; min-width: 0; margin: 0; padding: 14px 16px; overflow-x: auto;
  background: #0f1115; color: #e6e9f2; border-radius: 10px; border: 1px solid #2a2e39;
  font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre; user-select: all;
}
.kv .v.wrap { word-break: break-all; text-align: right; max-width: 70%; }
.wrap { word-break: break-all; }

/* ---------- Deposit ---------- */
.balance-lg { font-family: var(--mono); font-size: 15px; border: 1px solid var(--line); background: var(--bg-soft); padding: 8px 16px; border-radius: 12px; }
.balance-lg b { font-size: 20px; margin-left: 8px; }
.net-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.net {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.net:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.net[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 30px rgba(215,25,32,.10); }
.net:disabled { opacity: .6; cursor: progress; }
.net .net-name { font-weight: 600; font-family: var(--display); }
.net .net-assets { font-size: 12px; color: var(--accent); font-weight: 600; }
.net .net-note { font-size: 12.5px; color: var(--muted-2); }
.deposit-panel { padding: 24px; }
.dp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dp-top h3 { margin: 0; font-size: 18px; }
.dp-body { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.qr-box { padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.qr-box img { display: block; }
.dp-main { flex: 1; min-width: 260px; }
.addr-row { display: flex; gap: 10px; align-items: stretch; }
.addr {
  flex: 1; min-width: 0; word-break: break-all; font-size: 13.5px; line-height: 1.5;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; user-select: all;
}
.dp-notes { margin: 16px 0 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; display: grid; gap: 6px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 40px; }
.footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding: 48px 0 36px; }
.footer p { color: var(--muted-2); font-size: 13.5px; max-width: 42ch; margin: 14px 0 0; }
.footer h4 { margin: 0 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--text); font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14px; }
.footer ul a { color: var(--muted); }
.footer ul a:hover { color: var(--accent); text-decoration: none; }
.footer .legal {
  border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted-2); font-size: 12.5px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.status-dot { display: inline-flex; align-items: center; gap: 8px; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-family: var(--mono); }

.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.right { text-align: right; }
.center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.pos { color: var(--ok); }
.neg { color: var(--danger); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .stats .container { grid-template-columns: 1fr 1fr; }
  .stats .cell:nth-child(3) { border-left: 0; padding-left: 0; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
  .footer .cols > :first-child { grid-column: 1 / -1; }
}
/* The header can hold up to 7 links for admins, so collapse into the menu early. */
@media (max-width: 1200px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0; margin: 0;
    flex-direction: column; padding: 10px 20px 16px; gap: 2px;
    background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; }
  .nav-mobile-only { display: block; }
  .topbar .actions .btn-ghost { display: none; }
}
@media (max-width: 820px) {
  .net-grid { grid-template-columns: 1fr 1fr; }
  .split-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .net-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .addr-row { flex-direction: column; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .hero { padding: 60px 0 40px; }
  .hero p.lead { font-size: 16px; }
  .searchbar { flex-wrap: wrap; }
  .searchbar .field { flex-basis: 100%; }
  .searchbar select { flex: 1; padding: 12px; }
  .searchbar .btn { flex: 1; }
  .searchbar kbd { display: none; }
  .brand .tag { display: none; }
  .brand .wordmark-img { height: 15px; }
  .topbar .container { gap: 12px; }
  .topbar .actions .btn { padding: 8px 12px; }
  .eyebrow { border-radius: 14px; padding: 6px 12px; font-size: 11.5px; }
  .searchbar input[type="text"] { font-size: 14px; }
  section.block { padding: 52px 0; }
  .stats .cell { padding: 20px 14px; }
  .syntax .row { grid-template-columns: 1fr; gap: 4px; }
  .footer .cols { grid-template-columns: 1fr; gap: 28px; }
  .auth-wrap .card { padding: 24px; }
}
