/* ─────────────────────────────────────────────────────────────
   cc-autopilot — styles
   ───────────────────────────────────────────────────────────── */

@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('../fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('../fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; font-display: swap; src: url('../fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --bg: #07090d;
  --bg-elev: #0a0e14;
  --surface: #0e131b;
  --surface-2: #131a25;
  --line: #1b2330;
  --line-2: #273143;
  --text: #e7ecf3;
  --muted: #8d99ab;
  --dim: #5d697b;
  --accent: #3df2ae;
  --accent-ink: #03140c;
  --accent-soft: rgba(61, 242, 174, 0.12);
  --accent-2: #a6e85c; /* second green (sell side) */
  --up: #3df2ae;
  --down: #ff6b7d;
  --flat: #c9d2de;
  --warn: #ffc65c;

  --c-eth: #8c9eff;
  --c-base: #3a7bff;
  --c-arb: #28a0f0;
  --c-op: #ff3b4e;
  --c-polygon: #9b6bff;

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --gutter: 24px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
small { font-size: 0.8125rem; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.is-up { color: var(--up); }
.is-down { color: var(--down); }
.is-flat { color: var(--flat); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: 820px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 30px -10px rgba(61, 242, 174, 0.55); }
.btn-primary:hover { color: var(--accent-ink); background: #6bf7c3; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 0.875rem; border-radius: 10px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  transition: color 0.15s, border-color 0.15s, transform 0.2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn.ghost { background: transparent; border-color: transparent; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 0.875rem; }
.link-btn:hover { color: var(--text); }

/* ── Top bar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 13, 0.78); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; flex: none; box-shadow: 0 8px 22px -8px rgba(61, 242, 174, 0.7); }
.brand-name { color: #fff; white-space: nowrap; }
.brand-name i, .brand i { font-style: normal; background: linear-gradient(90deg, #3df2ae 0%, #7cf0c4 45%, #a6e85c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: 0.925rem; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.topbar-cta { display: flex; align-items: center; gap: 8px; }
.show-sm { display: none; }

/* ── Shared atoms ────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 0.75rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
}
.pulse, .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(61, 242, 174, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 242, 174, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(61, 242, 174, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 242, 174, 0); } }
.live { display: inline-flex; align-items: center; gap: 8px; font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.1em; color: var(--accent); padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); }
.live.is-paused { color: var(--warn); background: rgba(255, 198, 92, 0.12); }
.live.is-paused i { background: var(--warn); animation: none; }
.lede { color: var(--muted); font-size: 1.075rem; max-width: 62ch; }
.lede em { color: var(--text); font-style: normal; }
.hl { color: var(--accent); }
.fineprint { color: var(--dim); font-size: 0.8125rem; line-height: 1.55; }
.fineprint b { color: var(--muted); }
.chain-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.c-eth { background: var(--c-eth); } .c-base { background: var(--c-base); } .c-arb { background: var(--c-arb); } .c-op { background: var(--c-op); } .c-polygon { background: var(--c-polygon); }

/* ── Hero ────────────────────────────────────────────────── */
.hero { position: relative; padding: 72px 0 40px; isolation: isolate; }
.hero-in { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.5rem); margin: 18px 0 20px; }
.hero .lede { font-size: 1.15rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.trust { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; color: var(--muted); font-size: 0.95rem; }
.trust li { display: flex; align-items: center; gap: 10px; }
.trust svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.hero-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-2); border-radius: 20px; padding: 18px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(61, 242, 174, 0.05), 0 30px 80px -30px rgba(61, 242, 174, 0.25);
}
.hc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hc-head .muted { margin-left: auto; font-size: 0.85rem; }
.hc-cols, .hc-book li { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; align-items: center; }
.hc-cols { padding: 12px 8px 6px; font: 600 0.7rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.hc-cols span:not(:first-child), .hc-book li span:not(:first-child) { text-align: right; }
.hc-book { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.hc-book li { padding: 9px 8px; border-radius: 8px; font-size: 0.925rem; }
.hc-book li:hover { background: rgba(255, 255, 255, 0.02); }
.hc-book li span:first-child { display: flex; align-items: center; gap: 8px; }
.tag { font: 600 0.62rem/1 var(--font-mono); letter-spacing: 0.08em; padding: 4px 6px; border-radius: 5px; }
.tag.buy { color: var(--accent); background: var(--accent-soft); }
.tag.sell { color: var(--accent-2); background: rgba(166, 232, 92, 0.14); }
.hc-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.hc-foot div { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.hc-foot small { color: var(--dim); font-size: 0.75rem; }
.hc-foot b { font-size: 1.25rem; }
.skeleton span { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--line) 0%, var(--line-2) 50%, var(--line) 100%) 0 0 / 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

.stats { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px; display: grid; gap: 6px; align-content: start; transition: border-color 0.2s, transform 0.2s; }
.stat:hover { border-color: rgba(61, 242, 174, 0.35); transform: translateY(-3px); }
.stat::after { content: ''; position: absolute; right: -70px; bottom: -90px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(61, 242, 174, 0.13), transparent 70%); pointer-events: none; }
.stat-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid rgba(61, 242, 174, 0.18); margin-bottom: 12px; }
.stat-ic svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat b { font: 700 2.7rem/1 var(--font-display); letter-spacing: -0.035em; color: var(--text); }
.stat strong { font-family: var(--font-display); font-size: 1.06rem; font-weight: 700; color: var(--text); }
.stat > span:last-child { color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 56px 0; }
.section-app { padding: 56px 0; }
.section-head { display: grid; gap: 14px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@property --orbit { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.feature {
  position: relative; border-radius: var(--radius); padding: 28px; border: 1px solid transparent;
  background:
    radial-gradient(260px 140px at 0% 0%, rgba(61, 242, 174, 0.07), transparent 70%) padding-box,
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--orbit), var(--line) 0deg 220deg, rgba(61, 242, 174, 0.95) 285deg, #a6e85c 320deg, var(--line) 360deg) border-box;
  animation: orbit 8s linear infinite;
  transition: transform 0.2s;
}
.feature:nth-child(2) { animation-delay: -1.33s; }
.feature:nth-child(3) { animation-delay: -2.66s; }
.feature:nth-child(4) { animation-delay: -4s; }
.feature:nth-child(5) { animation-delay: -5.33s; }
.feature:nth-child(6) { animation-delay: -6.66s; }
.feature:hover { transform: translateY(-3px); animation-duration: 3s; }
@keyframes orbit { to { --orbit: 360deg; } }
.feature svg { width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: var(--accent-soft); fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 18px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 0.95rem; }

/* ── Panels & forms ──────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-bar #scan-pause { margin-left: auto; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.panel-title h3 { font-size: 1rem; }

.ex-status { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; color: var(--dim); padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); }
.ex-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.ex-dot.ok { color: var(--muted); }
.ex-dot.ok::before { background: var(--accent); }
.ex-dot.err { color: var(--down); border-color: rgba(255, 107, 125, 0.3); }
.ex-dot.err::before { background: var(--down); }

.form { padding: 22px; display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
input[type='text'], input[type='url'], input[type='password'], input[type='number'], select {
  width: 100%; min-height: 44px; padding: 0 14px; border-radius: 10px;
  background: var(--bg-elev); border: 1px solid var(--line-2); color: var(--text); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: var(--dim); }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%238d99ab' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 34px; font-family: var(--font-mono); }
.input-suffix em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--dim); font-family: var(--font-mono); }
.form-msg { min-height: 1.4em; font-size: 0.875rem; color: var(--muted); }
.form-msg:empty { display: none; }
.form-msg.is-error, .field-error { color: var(--down); }
.form-msg.is-ok { color: var(--accent); }
.field-error { font-size: 0.8rem; }
.field-error:empty { display: none; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font: 600 0.75rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }
.callout { font-size: 0.875rem; color: var(--muted); background: rgba(255, 198, 92, 0.07); border: 1px solid rgba(255, 198, 92, 0.25); border-radius: 12px; padding: 12px 14px; }
.callout b { color: var(--warn); display: block; margin-bottom: 2px; }

/* ── Scanner ─────────────────────────────────────────────── */
.scan-controls { display: grid; grid-template-columns: 1fr auto; gap: 20px 28px; padding: 18px; border-bottom: 1px solid var(--line); align-items: end; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: 600 0.8rem/1 var(--font-mono); color: var(--muted); border: 1px solid var(--line-2); background: var(--bg-elev);
  transition: all 0.15s;
}
.chip span:hover { color: var(--text); }
.chip input:checked + span { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.scan-fields { display: grid; grid-template-columns: repeat(3, 130px); gap: 12px; }

.table-wrap { overflow-x: auto; }
.scan-table { width: 100%; border-collapse: collapse; font-size: 0.925rem; }
.scan-table th { text-align: left; padding: 12px 18px; font: 600 0.7rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--line); white-space: nowrap; }
.scan-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.scan-table th:nth-child(2), .scan-table td:nth-child(2), .scan-table th:nth-child(5), .scan-table td:nth-child(5), .scan-table th:nth-child(6), .scan-table td:nth-child(6) { text-align: right; }
.scan-row:hover td { background: rgba(255, 255, 255, 0.015); }
.scan-row.is-alert td { background: rgba(61, 242, 174, 0.06); }
.scan-row.is-alert td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.coin b { font-family: var(--font-display); font-size: 1rem; }
.coin em { font-style: normal; color: var(--dim); font-size: 0.8rem; margin-left: 2px; }
.scan-table td a { font-weight: 600; }
.sub { color: var(--muted); font-size: 0.85rem; margin-left: 6px; }
.net { font-weight: 600; }
.toggle-cell { width: 56px; text-align: right; }
.icon-btn[aria-expanded='true'] svg { transform: rotate(180deg); }
.icon-btn svg { transition: transform 0.2s; }

.scan-detail td { padding: 0 18px 16px; background: var(--bg-elev); }
.books { list-style: none; margin: 0; padding: 12px 0 0; display: grid; gap: 4px; }
.books li { display: grid; grid-template-columns: 140px 1fr 120px 120px; gap: 14px; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 0.875rem; }
.books .books-head { font: 600 0.68rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); padding-bottom: 4px; }
.books li > :nth-child(3), .books li > :nth-child(4) { text-align: right; }
.books li.is-buy { background: var(--accent-soft); }
.books li.is-sell { background: rgba(166, 232, 92, 0.09); }
.books li.is-out { opacity: 0.45; }
.bk-name small { color: var(--warn); font-size: 0.7rem; }
.bk-bar { position: relative; height: 6px; border-radius: 3px; background: var(--line); }
.bk-bar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--muted); min-width: 4px; }
.is-buy .bk-bar i { background: var(--accent); }
.is-sell .bk-bar i { background: var(--accent-2); }
.panel > .fineprint { padding: 14px 18px 18px; }

/* ── Wallet ──────────────────────────────────────────────── */
.wallet-grid { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: stretch; }
.wallet-side { display: grid; gap: 20px; align-content: start; }
.activity { padding: 18px 20px; }
.activity-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 0.85rem; max-height: 320px; overflow: auto; }
.activity-list li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.activity-list li:last-child { border-bottom: 0; }
.activity-list time { color: var(--dim); font-size: 0.75rem; }
.wallet-list { display: grid; gap: 16px; align-content: start; }
.wallet-list:has(.empty) { align-content: stretch; }
.empty {
  height: 100%; min-height: 440px; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 40px 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px;
  background: radial-gradient(420px 240px at 50% 0%, rgba(61, 242, 174, 0.09), transparent 70%), rgba(14, 19, 27, 0.55);
}
.empty-ic { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid rgba(61, 242, 174, 0.2); }
.empty-ic svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-title { font: 700 1.4rem/1.2 var(--font-display); letter-spacing: -0.02em; }
.empty > .muted { max-width: 48ch; }
.empty-steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 600px; }
.empty-steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px; display: grid; gap: 8px; justify-items: center; font-size: 0.86rem; color: var(--muted); }
.empty-steps b { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 700 0.8rem/1 var(--font-mono); }
.empty-chains { justify-content: center; }

.wallet-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.wallet-card header { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.wallet-id h3 { font-size: 1.05rem; margin-bottom: 4px; }
.addr { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; font-size: 0.78rem; color: var(--muted); cursor: pointer; }
.addr:hover { color: var(--text); }
.wallet-total { font-size: 1.45rem; font-weight: 600; }
.chain-list { list-style: none; margin: 0; padding: 6px 10px; }
.chain-list li { display: grid; grid-template-columns: 130px 1fr 1fr 28px; gap: 12px; align-items: center; padding: 10px; border-radius: 8px; font-size: 0.9rem; }
.chain-list li > .mono { text-align: right; }
.chain-list li em { font-style: normal; color: var(--dim); font-size: 0.78rem; }
.chain-list li.is-zero { opacity: 0.45; }
.chain-list .span2 { grid-column: span 2; text-align: right; font-size: 0.8rem; }
.chain-name { display: flex; align-items: center; }
.ext { color: var(--dim); text-align: center; }
.wallet-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 0.82rem; }
.history { padding: 6px 20px 18px; border-top: 1px solid var(--line); background: var(--bg-elev); display: grid; gap: 10px; }
.history > p.muted { padding-top: 12px; font-size: 0.875rem; }
.tx-list { list-style: none; margin: 0; padding: 8px 0 0; display: grid; gap: 2px; }
.tx-list li { display: grid; grid-template-columns: 48px 130px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.tx-list a { color: var(--muted); font-size: 0.78rem; }
.tx-list a:hover { color: var(--accent); }
.tx-dir { font: 600 0.65rem/1 var(--font-mono); letter-spacing: 0.08em; text-align: center; padding: 5px 0; border-radius: 5px; }
.tx-dir.in { color: var(--accent); background: var(--accent-soft); }
.tx-dir.out { color: var(--down); background: rgba(255, 107, 125, 0.1); }

/* ── Alerts ──────────────────────────────────────────────── */
.alerts-form { gap: 22px; padding: 26px; }
.alerts-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.alerts-cols fieldset { display: grid; gap: 14px; align-content: start; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.alerts-cols legend { float: left; margin-bottom: 0; }
.alerts-cols legend + * { clear: both; }
.alerts-form .cta-row { margin-top: 0; }
.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-ui { flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; transition: background 0.2s; }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform 0.2s; }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); background: var(--accent-ink); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch > span:last-child { display: grid; }
.help summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.help summary:hover { color: var(--text); }
.help p { margin-top: 8px; color: var(--muted); font-size: 0.85rem; }
.help b { color: var(--text); font-weight: 600; }

/* ── How it works ────────────────────────────────────────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step-n { display: inline-block; font: 600 0.8rem/1 var(--font-mono); color: var(--accent); border: 1px solid rgba(61, 242, 174, 0.35); border-radius: 8px; padding: 6px 8px; margin-bottom: 18px; }
.steps h3 { font-size: 1.15rem; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 0.95rem; }
.sources { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.sources > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 14px; align-content: start; }
.sources h3 { font-size: 1rem; }
.sources p { font-size: 0.875rem; }
.pill-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list a, .pill-list span { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--line-2); font-size: 0.85rem; }

/* ── Pricing ─────────────────────────────────────────────── */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 36px; display: grid; gap: 18px; align-content: start; }
.price-card.is-main { border-color: rgba(61, 242, 174, 0.4); background: linear-gradient(180deg, rgba(61, 242, 174, 0.06), var(--surface) 55%); }
.price-card h3 { font-size: 1.1rem; }
.price { display: flex; align-items: baseline; gap: 10px; }
.price b { font: 700 3rem/1 var(--font-display); }
.price span { color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; color: var(--muted); }
.checks li::before { content: ''; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%233df2ae' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.price-card .btn { justify-self: start; }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; transition: border-color 0.2s; }
.faq details[open] { border-color: var(--line-2); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 76px 20px 24px; position: relative; font-family: var(--font-display); font-weight: 500; font-size: 1.08rem; }
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 24px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  background: linear-gradient(var(--accent), var(--accent)) center / 16px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) center / 2px 16px no-repeat;
  transition: background-size 0.25s ease;
}
.faq details[open] summary::after { background-size: 16px 2px, 2px 0; }
.faq details p { padding: 0 24px 22px; }
.faq details p { padding: 0 22px 20px; color: var(--muted); }

/* ── CTA band ────────────────────────────────────────────── */
.band { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 36px 40px; border-radius: 22px; border: 1px solid var(--line-2); background: radial-gradient(500px 200px at 90% 50%, rgba(61, 242, 174, 0.14), transparent 70%), var(--surface); }
.band h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 6px; }

/* ── Footer ──────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 64px 0 28px; background: linear-gradient(180deg, rgba(10, 14, 20, 0.7), var(--bg-elev)); }
.footer-top { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr; gap: 40px; } /* brand · Product · More · Legal */
.footer-brand { display: grid; gap: 16px; align-content: start; max-width: 400px; }
.footer-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-brand p { font-size: 0.9rem; }
.footer nav { display: grid; gap: 9px; align-content: start; font-size: 0.9rem; }
.footer nav a { color: var(--muted); }
.footer nav a:hover { color: var(--text); }
.footer h4 { font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--dim); font-size: 0.82rem; }
.powered a { color: var(--accent); font-weight: 600; }
.powered a:hover { text-decoration: underline; }

/* ── Reveal ──────────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ── Legal page ──────────────────────────────────────────── */
.legal { padding: 56px 0 88px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 10px; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 40px; }
.legal-toc a { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.85rem; color: var(--muted); }
.legal section { padding: 28px 0; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.legal h2 { font-size: 1.5rem; }
.legal h3 { font-size: 1.05rem; margin-top: 8px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.legal .placeholder { color: var(--warn); font-family: var(--font-mono); font-size: 0.9em; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1080px) {
  .scan-controls { grid-template-columns: 1fr; }
  .scan-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wallet-grid { grid-template-columns: 1fr; }
  .wallet-side { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px; background: rgba(7, 9, 13, 0.97); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 8px; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .topbar-cta { margin-left: auto; }
  .show-sm { display: inline-grid; }
  .hero { padding-top: 48px; }
  .hero-in { grid-template-columns: 1fr; gap: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 48px; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --gutter: 24px; }
  .hide-sm { display: none; }
  .section { padding: 44px 0; }
  .section-app { padding: 44px 0; }
  .features, .steps, .sources, .pricing, .alerts-cols, .wallet-side { grid-template-columns: 1fr; }
  .scan-fields { grid-template-columns: 1fr 1fr; }
  .scan-fields .field:last-child { grid-column: 1 / -1; }
  .panel-bar #scan-pause { margin-left: 0; }

  /* Table → stacked cards */
  .scan-table thead { display: none; }
  .scan-table, .scan-table tbody, .scan-table tr, .scan-table td { display: block; width: 100%; }
  .scan-row { position: relative; padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .scan-row td { padding: 0; border: 0; white-space: normal; text-align: left !important; display: grid; gap: 2px; }
  .scan-row td::before { content: attr(data-label); font: 600 0.65rem/1.2 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
  .scan-row td.toggle-cell { position: absolute; top: 12px; right: 12px; width: auto; }
  .scan-row td.toggle-cell::before { content: none; }
  .scan-row td:first-child { grid-column: 1 / -1; }
  .scan-row td:first-child::before { content: none; }
  .scan-row.is-alert td:first-child { box-shadow: none; }
  .scan-row.is-alert { box-shadow: inset 3px 0 0 var(--accent); }
  .sub { display: block; margin-left: 0; }
  .scan-detail td { padding: 0 12px 14px; }
  .books li { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .books .bk-bar, .books .books-head span:nth-child(2) { display: none; }

  .wallet-card header { grid-template-columns: 1fr auto; }
  .wallet-total { grid-column: 1 / -1; grid-row: 2; font-size: 1.3rem; }
  .chain-list li { grid-template-columns: 1fr 1fr 24px; }
  .chain-list li { row-gap: 4px; }
  .chain-list li .chain-name { grid-column: 1 / 3; grid-row: 1; }
  .chain-list li > .mono { text-align: left; grid-row: 2; }
  .chain-list li .span2 { grid-row: 2; grid-column: 1 / 3; }
  .chain-list li .ext { grid-column: 3; grid-row: 1; }
  .chain-list .span2 { text-align: left; }
  .tx-list li { grid-template-columns: 44px 1fr; }
  .tx-list li > :nth-child(3), .tx-list li > :nth-child(4) { grid-column: 2; }
  .band { flex-direction: column; align-items: flex-start; padding: 28px 22px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hc-foot b { font-size: 1.05rem; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .stat { padding: 22px 20px; }
  .cta-row .btn { flex: 1 1 100%; }
  .hc-book li { font-size: 0.82rem; }
}

/* ─────────────────────────────────────────────────────────────
   v1.1 — animated background, header, reviews, admin
   ───────────────────────────────────────────────────────────── */

/* Animated background: slow drifting green light, behind everything */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; will-change: transform; }
.b1 { top: -32vmax; left: -22vmax; background: radial-gradient(circle, rgba(61, 242, 174, 0.17), transparent 60%); animation: drift1 24s ease-in-out infinite alternate; }
.b2 { top: 8vmax; right: -34vmax; background: radial-gradient(circle, rgba(166, 232, 92, 0.11), transparent 60%); animation: drift2 31s ease-in-out infinite alternate; }
.b3 { bottom: -40vmax; left: 12vmax; background: radial-gradient(circle, rgba(31, 191, 134, 0.15), transparent 60%); animation: drift3 37s ease-in-out infinite alternate; }
.bg-fade { position: absolute; inset: 0; background: radial-gradient(ellipse 120% 90% at 50% 30%, transparent 40%, rgba(7, 9, 13, 0.55) 100%); }
@keyframes drift1 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(22vmax, 16vmax) scale(1.18); } }
@keyframes drift2 { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(-26vmax, 14vmax) scale(0.88); } }
@keyframes drift3 { 0% { transform: translate(0, 0) scale(1.05); } 100% { transform: translate(-16vmax, -22vmax) scale(1.22); } }

/* Header */
.topbar { transition: box-shadow 0.25s, background-color 0.25s; }
.topbar.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9); background: rgba(7, 9, 13, 0.88); }
.topbar .icon-btn, .footer .icon-btn { width: 40px; height: 40px; border-radius: 11px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-2); color: var(--muted); }
.topbar .icon-btn:hover { color: var(--accent); border-color: rgba(61, 242, 174, 0.5); background: var(--accent-soft); transform: translateY(-1px); }
.topbar .icon-btn svg { width: 20px; height: 20px; }
.topbar-cta { gap: 10px; }

/* "Powered by bonebreakerxyz" */
.powered-pill { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding: 8px 16px 8px 12px; border-radius: 999px; border: 1px solid rgba(61, 242, 174, 0.28); background: rgba(61, 242, 174, 0.06); color: var(--muted); font-size: 0.86rem; transition: border-color 0.2s, color 0.2s; }
.powered-pill b { color: var(--text); font-weight: 600; }
.powered-pill:hover { color: var(--text); border-color: var(--accent); }

/* Reviews */
.reviews { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: stretch; }
.review-summary { padding: 28px; display: grid; gap: 14px; align-content: start; }
.rs-score { display: flex; align-items: center; gap: 16px; }
.rs-score b { font: 700 3.4rem/1 var(--font-display); letter-spacing: -0.04em; }
.review-summary .btn { justify-self: start; }
.stars { display: inline-flex; gap: 3px; }
.stars i { display: block; width: 20px; height: 20px; color: var(--line-2); }
.stars i svg { width: 100%; height: 100%; fill: currentColor; }
.stars i.on { color: var(--accent); }
.stars.sm i { width: 15px; height: 15px; }
.review-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-content: start; }
.review-list:has(.review-empty) { align-content: stretch; }
.review-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; align-content: start; }
.review-card header { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.rv-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #3df2ae, #1fbf86); color: var(--accent-ink); font: 700 1rem/1 var(--font-display); }
.rv-who { display: grid; }
.rv-who time { font-size: 0.78rem; color: var(--dim); }
.review-card p { color: var(--muted); white-space: pre-line; }
.review-empty { grid-column: 1 / -1; height: 100%; min-height: 260px; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 40px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; background: rgba(14, 19, 27, 0.55); }
.re-ic { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(61, 242, 174, 0.2); }
.re-ic svg { width: 26px; height: 26px; fill: currentColor; }
.re-title { font: 700 1.3rem/1.2 var(--font-display); }
.review-form { margin-top: 20px; padding: 28px; }
.rf-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.rating legend { margin-bottom: 10px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { width: 36px; height: 36px; cursor: pointer; color: var(--line-2); transition: color 0.15s, transform 0.15s; }
.star-input label svg { width: 100%; height: 100%; fill: currentColor; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: var(--accent); }
.star-input label:hover { transform: scale(1.1); }
.star-input input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
textarea { width: 100%; min-height: 130px; padding: 12px 14px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--line-2); color: var(--text); font: inherit; outline: none; resize: vertical; transition: border-color 0.15s, box-shadow 0.15s; }
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea::placeholder { color: var(--dim); }
.field > span small { margin-left: 8px; font-weight: 400; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Admin (api/admin.php) */
.admin-wrap { max-width: 920px; padding-top: 32px; padding-bottom: 80px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 36px; }
.admin-box { max-width: 420px; margin: 8vh auto; padding: 28px; }
.admin-box h1, .admin-section h1, .admin-section h2 { font-size: 1.5rem; margin-bottom: 6px; }
.admin-section { display: grid; gap: 12px; margin-bottom: 44px; }
.admin-count { font: 600 0.82rem/1 var(--font-mono); color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 4px 9px; vertical-align: middle; margin-left: 6px; }
.admin-review { padding: 18px 20px; display: grid; gap: 10px; }
.admin-review header { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; }
.admin-stars { color: var(--accent); letter-spacing: 2px; }
.admin-review p { color: var(--muted); }
.admin-actions { display: flex; gap: 8px; }
code { font-family: var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

@media (max-width: 960px) {
  .reviews { grid-template-columns: 1fr; }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
}
@media (max-width: 760px) {
  .empty { min-height: 0; padding: 32px 18px; }
  .empty-steps { grid-template-columns: 1fr; }
  .review-list { grid-template-columns: 1fr; }
  .rf-row { grid-template-columns: 1fr; }
  .price-card { padding: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .topbar .icon-btn { width: 38px; height: 38px; }
  .brand-name { font-size: 1.05rem; }
}
@media (max-width: 380px) {
  .topbar .icon-btn[data-link='kofi'] { display: none; }
}
.review-summary > .fineprint { padding: 0; }
.hl { background: linear-gradient(90deg, #3df2ae 0%, #7cf0c4 45%, #a6e85c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Confirm dialog (site.js → confirmDialog) */
html:has(dialog.modal[open]) { overflow: hidden; }
.modal { width: min(460px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
.modal::backdrop { background: rgba(3, 5, 8, 0.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
.modal[open]::backdrop { animation: modal-fade 0.2s ease; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } }
@keyframes modal-fade { from { opacity: 0; } }
.modal-card { position: relative; overflow: hidden; display: grid; gap: 12px; padding: 30px 28px 26px; border-radius: 22px; border: 1px solid var(--line-2); background: radial-gradient(360px 180px at 0% 0%, rgba(61, 242, 174, 0.07), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface)); box-shadow: 0 40px 90px -24px rgba(0, 0, 0, 0.85); }
.modal-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--accent), #a6e85c); }
.modal-danger .modal-card::before { background: linear-gradient(90deg, var(--down), #ffb36b); }
.modal-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 6px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(61, 242, 174, 0.25); }
.modal-danger .modal-ic { color: var(--down); background: rgba(255, 107, 125, 0.1); border-color: rgba(255, 107, 125, 0.3); }
.modal-ic svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.modal-title { font-size: 1.4rem; letter-spacing: -0.02em; }
.modal-text { color: var(--muted); font-size: 0.95rem; }
.modal-list { list-style: none; margin: 4px 0 0; padding: 14px 16px; display: grid; gap: 9px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--line); }
.modal-list li { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 0.9rem; }
.modal-list svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--down); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.modal:not(.modal-danger) .modal-list svg { stroke: var(--accent); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.modal-x:hover { color: var(--text); border-color: var(--line-2); }
.modal-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.btn-danger { background: var(--down); color: #1d0609; box-shadow: 0 8px 26px -10px rgba(255, 107, 125, 0.6); }
.btn-danger:hover { background: #ff8a97; color: #1d0609; }
@media (max-width: 420px) {
  .modal-card { padding: 26px 20px 20px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
}

/* Header v1.1.2: Open scanner → Discord → Ko-fi, brand-coloured icons */
.topbar-in { height: 70px; }
.nav { gap: 2px; margin-right: 6px; }
.nav a { font-size: 0.97rem; font-weight: 500; padding: 9px 14px; }
.topbar .btn-sm { min-height: 42px; padding: 0 20px; border-radius: 12px; font-size: 0.93rem; }
.topbar .icon-btn { width: 42px; height: 42px; border-radius: 12px; }
.topbar .icon-btn svg { width: 22px; height: 22px; }
.topbar .icon-btn[data-link='discord']:hover { color: inherit; border-color: rgba(88, 101, 242, 0.65); background: rgba(88, 101, 242, 0.14); }
.topbar .icon-btn[data-link='kofi']:hover { color: inherit; border-color: rgba(255, 94, 91, 0.65); background: rgba(255, 94, 91, 0.12); }
@media (max-width: 960px) { .nav { top: 70px; margin-right: 0; } }
@media (max-width: 760px) { .topbar .icon-btn { width: 40px; height: 40px; } }
.powered-pill { height: 38px; padding: 0 16px 0 14px; gap: 10px; line-height: 1; }
.powered-pill .pulse { flex: none; }
.powered-txt { display: block; line-height: 1; padding-bottom: 1px; }

/* Hero headline pill */
.h1-tail { white-space: nowrap; }
.h1-pill {
  display: inline-flex; align-items: center; position: relative; top: -0.42em; overflow: hidden;
  margin-left: 0.45em; padding: 0 14px; height: 32px; border-radius: 999px; vertical-align: middle;
  font: 600 0.88rem/1 var(--font-body); letter-spacing: 0.01em; color: #d5ffee;
  background: linear-gradient(135deg, rgba(61, 242, 174, 0.2), rgba(166, 232, 92, 0.1));
  border: 1px solid rgba(61, 242, 174, 0.42);
  box-shadow: 0 0 22px -8px rgba(61, 242, 174, 0.8);
}
.h1-pill::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg); animation: pill-shine 4.5s ease-in-out infinite;
}
@keyframes pill-shine { 0%, 62% { left: -60%; } 100% { left: 130%; } }
@media (max-width: 760px) { .h1-pill { height: 28px; padding: 0 11px; font-size: 0.78rem; top: -0.3em; } }
.alerts-form > .fineprint { padding: 0; }

/* Last section before the footer: same space below as above */
.section-last { padding-bottom: 112px; }
@media (max-width: 760px) { .section-last { padding-bottom: 88px; } }

/* Discord / Ko-fi icon buttons: lift + brand glow on hover */
.topbar .icon-btn, .footer-btns .btn { transition: transform 0.18s ease, background-color 0.18s, border-color 0.18s, box-shadow 0.18s; }
.topbar .icon-btn svg, .footer-btns .btn svg { transition: transform 0.18s ease; }
.topbar .icon-btn:hover { transform: translateY(-2px); }
.topbar .icon-btn:hover svg { transform: scale(1.08); }
.topbar .icon-btn[data-link='discord']:hover, .footer-btns [data-link='discord']:hover { border-color: rgba(88, 101, 242, 0.75); background: rgba(88, 101, 242, 0.16); box-shadow: 0 8px 22px -10px rgba(88, 101, 242, 0.9); color: #fff; }
.topbar .icon-btn[data-link='kofi']:hover, .footer-btns [data-link='kofi']:hover { border-color: rgba(255, 94, 91, 0.75); background: rgba(255, 94, 91, 0.14); box-shadow: 0 8px 22px -10px rgba(255, 94, 91, 0.9); color: #fff; }
.h1-pill { margin-left: 18px; height: 28px; padding: 0 12px; font-size: 0.76rem; top: -0.5em; }
@media (max-width: 760px) { .h1-pill { margin-left: 12px; height: 25px; padding: 0 10px; font-size: 0.7rem; top: -0.35em; } }

/* Footer bottom: copyright left, "Powered by" far right */
.footer-bottom .powered { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; }
.powered a { display: inline-flex; align-items: center; gap: 6px; }
.powered a svg { flex: none; }
@media (max-width: 760px) { .footer-bottom .powered { margin-left: 0; } }

/* Stat cards: centred, bigger numbers, no icons */
.stat { text-align: center; justify-items: center; padding: 36px 26px 32px; gap: 8px; }
.stat b { font-size: 3.8rem; letter-spacing: -0.04em; margin-bottom: 4px; background: linear-gradient(180deg, #ffffff 30%, #bfffe4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat strong { font-size: 1.1rem; }
.stat::after { right: auto; left: 50%; bottom: -120px; width: 260px; height: 220px; transform: translateX(-50%); }
/* "Powered by" pill centred under the stat cards */
.powered-row { display: flex; justify-content: center; margin-top: 30px; }
.powered-row .powered-pill { margin-top: 0; }
@media (max-width: 420px) { .stat b { font-size: 3.2rem; } }

/* Header Discord / Ko-fi: no border, hover tints the background only */
.topbar .icon-btn[data-link] { border-color: transparent; background: rgba(255, 255, 255, 0.05); box-shadow: none; }
.topbar .icon-btn[data-link]:hover, .topbar .icon-btn[data-link]:hover svg { transform: none; }
.topbar .icon-btn[data-link='discord']:hover { border-color: transparent; box-shadow: none; background: rgba(88, 101, 242, 0.28); }
.topbar .icon-btn[data-link='kofi']:hover { border-color: transparent; box-shadow: none; background: rgba(255, 94, 91, 0.26); }
.footer-btns [data-link='discord']:hover, .footer-btns [data-link='kofi']:hover { border-color: var(--line-2); box-shadow: none; }

/* Footer "Powered by": softer green, icon + text centred, no underline */
.footer-bottom .powered { line-height: 1; }
.powered a { color: #7fdcb4; font-weight: 600; line-height: 1; text-decoration: none; transition: color 0.15s; }
.powered a:hover { color: #b3f2d6; text-decoration: none; }
.powered a svg { display: block; width: 16px; height: 16px; }

/* ─────────────────────────────────────────────────────────────
   v1.2 — Best price · History · Gas · Price alerts · Peg · Consent · Admin
   ───────────────────────────────────────────────────────────── */

/* Segmented control (Buy / Sell, 24h / 7d) */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--line-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 0 16px; min-height: 36px; display: inline-flex; align-items: center; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--muted); transition: background 0.15s, color 0.15s; }
.seg label:hover { color: var(--text); }
.seg input:checked + label { background: var(--accent); color: var(--accent-ink); }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.best-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 0.68rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }

/* Best price */
.best-controls { display: grid; grid-template-columns: auto 1fr 140px auto; gap: 14px; align-items: end; padding: 20px; border-bottom: 1px solid var(--line); }
.best-controls .seg { align-self: end; }
.best-summary { padding: 16px 20px 0; color: var(--muted); }
.best-summary b { color: var(--text); }
.best-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.best-table th { text-align: left; padding: 14px 20px 10px; font: 600 0.7rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid var(--line); white-space: nowrap; }
.best-table td { padding: 13px 20px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.best-table th:nth-child(n+3), .best-table td:nth-child(n+3) { text-align: right; }
.best-table td em { font-style: normal; color: var(--dim); font-size: 0.8rem; }
.best-table td.strong { font-weight: 600; color: var(--text); }
.best-table td small { color: var(--dim); }
.best-table tr.is-best td { background: rgba(61, 242, 174, 0.06); }
.best-table tr.is-best td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.best-table tr.is-off td { opacity: 0.55; }
.best-table .rank { width: 70px; color: var(--dim); font-family: var(--font-mono); }
#best-body.is-loading { opacity: 0.45; transition: opacity 0.2s; }
.best-fees { padding: 4px 20px 0; }
.best-fees summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 0.92rem; }
.fee-grid { display: grid; gap: 8px; max-width: 620px; margin-bottom: 10px; }
.fee-row { display: grid; grid-template-columns: 1fr 140px 170px; gap: 12px; align-items: center; font-size: 0.9rem; }
.fee-row input { min-height: 38px; }
.fee-head { font: 600 0.68rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.best > .fineprint, .hist > .fineprint, .gas > .fineprint, .watch > .fineprint { padding: 14px 20px 18px; }

/* Arbitrage history */
.hist-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); }
.hist-bar .field { width: 140px; }
.hist-status { margin-left: auto; font-size: 0.85rem; padding-bottom: 10px; }
.hist-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 20px 20px 0; }
.hist-stats:empty { display: none; }
.hist-tile { background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 4px; text-align: center; }
.hist-tile b { font-size: 1.6rem; font-weight: 600; color: var(--text); }
.hist-tile strong { font-family: var(--font-display); font-size: 0.95rem; }
.hist-tile span { font-size: 0.8rem; }
.hist-title { padding: 22px 20px 6px; font-size: 1rem; }
.hist-chart { position: relative; padding: 0 12px; min-height: 280px; }
.hist-chart svg { display: block; width: 100%; height: auto; }
.hist-grid { stroke: var(--line); stroke-width: 1; }
.hist-zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.hist-axis { fill: var(--dim); font: 11px var(--font-mono); }
.hist-profit-zone { fill: rgba(61, 242, 174, 0.05); }
.hist-area { fill: rgba(61, 242, 174, 0.08); }
.hist-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.hist-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.hist-cross { stroke: var(--line-2); stroke-width: 1; }
.hist-focus { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.hist-tip { position: absolute; transform: translate(-50%, calc(-100% - 14px)); display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.8); font-size: 0.82rem; white-space: nowrap; pointer-events: none; }
.hist-empty { min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.hist-data { padding: 4px 20px 0; }
.hist-data summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 0.9rem; }
.hist-table { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.hist-table table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.hist-table th, .hist-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.hist-table th { position: sticky; top: 0; background: var(--surface-2); font: 600 0.68rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }

/* Cheapest chain for USDC */
.gas { margin-top: 20px; }
.gas .panel-title { padding: 18px 20px 0; }
.gas-list { list-style: none; margin: 0; padding: 6px 20px 0; display: grid; gap: 4px; }
.gas-list li { display: grid; grid-template-columns: 210px 1fr 90px 260px; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.gas-list li:last-child { border-bottom: 0; }
.gas-list li.is-best .gas-usd { color: var(--accent); }
.gas-list li.is-off { opacity: 0.5; grid-template-columns: 210px 1fr; }
.gas-bar { position: relative; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.gas-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--accent); }
.gas-usd { text-align: right; font-weight: 600; }
.gas-meta { font-size: 0.8rem; }
.gas .chain-name { gap: 0; }
.gas .best-badge { margin-left: 10px; }

/* Price alerts + peg */
.watch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.watch { display: grid; align-content: start; }
.watch .panel-title { padding: 18px 20px 0; margin-bottom: 4px; }
.pa-form { display: grid; grid-template-columns: 90px 1fr 1fr auto; gap: 8px; padding: 8px 20px 0; }
.pa-form select, .pa-form input { min-height: 40px; }
#pa-msg { padding: 8px 20px 0; }
.pa-list { list-style: none; margin: 0; padding: 8px 20px 0; display: grid; gap: 6px; }
.pa-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--line); font-size: 0.9rem; }
.pa-list li.is-fired { border-color: rgba(61, 242, 174, 0.35); }
.pa-list .pa-empty { display: block; background: none; border: 0; padding: 6px 0; }
.pa-state { color: var(--dim); font-size: 0.8rem; }
.pa-state.is-fired { color: var(--accent); }
.pa-actions { display: inline-flex; align-items: center; gap: 8px; }
.pa-actions .icon-btn { width: 28px; height: 28px; border-radius: 8px; }
.peg-list { list-style: none; margin: 0; padding: 8px 20px 0; display: grid; gap: 6px; }
.peg-list li { display: grid; grid-template-columns: 60px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--line); }
.peg-list li small { grid-column: 1 / -1; margin-top: -4px; }
.peg-price { font-size: 1.1rem; font-weight: 600; }
.peg-chip { height: 24px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 999px; font: 700 0.68rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.peg-chip.ok { color: var(--accent); background: var(--accent-soft); }
.peg-chip.warn { color: var(--warn); background: rgba(255, 198, 92, 0.12); }
.peg-chip.bad { color: var(--down); background: rgba(255, 107, 125, 0.12); }
.peg-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; padding: 16px 20px 0; }
.peg-th { width: 130px; }
.peg-th input { min-height: 38px; }

/* Privacy choices: panel + status button (bottom-left) */
.consent { position: fixed; left: 20px; bottom: 20px; z-index: 90; width: min(380px, calc(100vw - 40px)); padding: 18px 18px 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.85); display: grid; gap: 10px; font-size: 0.9rem; color: var(--muted); opacity: 0; transform: translateY(10px); transition: opacity 0.22s, transform 0.22s; }
.consent.is-open { opacity: 1; transform: none; }
.consent-fab > svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.consent-fab > svg circle { fill: currentColor; stroke: none; }
.consent a { color: var(--accent); }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; }
.consent-now { font-size: 0.8rem; color: var(--dim); }
.consent-fab { position: fixed; left: 18px; bottom: 18px; z-index: 89; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); cursor: pointer; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.8); transition: color 0.15s, background 0.15s; }
.consent-fab:hover { color: var(--text); background: var(--surface); }

/* Admin dashboard */
.adm-tabs { display: flex; gap: 4px; margin-left: auto; margin-right: 12px; }
.adm-tabs a, .adm-range a { padding: 8px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.adm-tabs a:hover, .adm-range a:hover { color: var(--text); background: var(--surface-2); }
.adm-tabs a.is-on, .adm-range a.is-on { color: var(--accent-ink); background: var(--accent); }
.adm-titlebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.adm-range { display: flex; gap: 4px; }
.adm-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.adm-kpis .panel { padding: 18px; display: grid; gap: 2px; }
.adm-kpis b { font: 700 1.9rem/1.1 var(--font-display); }
.adm-kpis span { font-weight: 600; }
.adm-kpis small { font-size: 0.78rem; }
.adm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.adm-card { padding: 18px 20px; display: grid; gap: 12px; align-content: start; }
.adm-card h2 { font-size: 1rem; }
.adm-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adm-bars li { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto; gap: 12px; align-items: center; font-size: 0.88rem; }
.adm-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar { display: block; border-radius: 4px; background: var(--line); }
.adm-bar rect { fill: var(--accent); }
.adm-daily { display: block; width: 100%; height: 140px; }
.adm-daily rect { fill: var(--accent); }
.adm-daily rect:hover { fill: #a6e85c; }
.adm-code { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--line); font: 0.85rem/1.5 var(--font-mono); white-space: pre-wrap; word-break: break-all; color: var(--text); }
.admin .admin-head { flex-wrap: wrap; gap: 12px; }

/* Responsive */
@media (max-width: 960px) {
  .best-controls { grid-template-columns: 1fr 1fr; }
  .best-controls .seg { grid-column: 1 / -1; justify-self: start; }
  .hist-stats { grid-template-columns: 1fr 1fr; }
  .gas-list li { grid-template-columns: 1fr 90px; }
  .gas-list li .gas-bar { display: none; }
  .gas-list li .gas-meta { grid-column: 1 / -1; margin-top: -6px; }
  .watch-grid, .adm-grid { grid-template-columns: 1fr; }
  .adm-kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .best-controls { grid-template-columns: 1fr; }
  .best-controls .btn { width: 100%; }
  .best-table thead { display: none; }
  .best-table, .best-table tbody, .best-table tr, .best-table td { display: block; width: 100%; }
  .best-table tr { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .best-table td { padding: 0; border: 0; text-align: left !important; white-space: normal; }
  .best-table td[data-label]::before { content: attr(data-label); display: block; font: 600 0.62rem/1.4 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
  .best-table td.rank { grid-column: 1 / -1; width: auto; }
  .best-table tr.is-off td[colspan] { grid-column: 1 / -1; }
  .fee-row { grid-template-columns: 1fr 1fr; }
  .fee-row > span:first-child { grid-column: 1 / -1; }
  .fee-head { display: none; }
  .hist-status { margin-left: 0; width: 100%; padding-bottom: 0; }
  .pa-form { grid-template-columns: 1fr 1fr; }
  .pa-form .btn { grid-column: 1 / -1; }
  .pa-list li { grid-template-columns: 1fr auto; }
  .pa-list .pa-state { grid-column: 1 / -1; grid-row: 2; }
  .consent { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .adm-tabs { margin: 0; order: 3; width: 100%; }
}

/* Powered by [Steam · bonebreakerxyz] [LIVE] — under the stat cards */
.powered-row { align-items: center; gap: 12px; flex-wrap: wrap; }
.powered-label { color: var(--muted); font-size: 0.92rem; }
.powered-chip { display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 16px 0 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); color: var(--text); font-weight: 600; font-size: 0.92rem; line-height: 1; transition: background 0.15s, border-color 0.15s; }
.powered-chip:hover { color: var(--text); background: rgba(61, 242, 174, 0.08); border-color: rgba(61, 242, 174, 0.35); }
.powered-steam { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.powered-steam svg { display: block; width: 15px; height: 15px; }
.live-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(61, 242, 174, 0.1); border: 1px solid rgba(61, 242, 174, 0.45); color: var(--accent); font: 700 0.75rem/1 var(--font-mono); letter-spacing: 0.12em; }
.live-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
.live-chip[hidden] { display: none !important; }
.hero h1 { margin-top: 0; }

/* Header: transparent at the top of the page, background + bottom line only once scrolled */
.topbar { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; transition: background-color 0.25s, border-color 0.25s, box-shadow 0.25s; }
.topbar.is-scrolled { background: rgba(7, 9, 13, 0.85); border-bottom-color: var(--line); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9); }

/* Background bubbles: green light that travels around the screen */
.blob { width: 52vmax; height: 52vmax; }
.b1 { top: -18vmax; left: -14vmax; background: radial-gradient(circle, rgba(61, 242, 174, 0.24), transparent 62%); animation: bubble1 18s ease-in-out infinite; }
.b2 { top: 18vh; right: -22vmax; background: radial-gradient(circle, rgba(166, 232, 92, 0.16), transparent 62%); animation: bubble2 23s ease-in-out infinite; }
.b3 { bottom: -26vmax; left: 18vw; background: radial-gradient(circle, rgba(31, 191, 134, 0.22), transparent 62%); animation: bubble3 27s ease-in-out infinite; }
.b4 { top: 30vh; left: 30vw; width: 38vmax; height: 38vmax; background: radial-gradient(circle, rgba(124, 240, 196, 0.13), transparent 62%); animation: bubble4 31s ease-in-out infinite; }
.bg-fade { background: radial-gradient(ellipse 130% 100% at 50% 35%, transparent 55%, rgba(7, 9, 13, 0.45) 100%); }
@keyframes bubble1 { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(38vw, 14vh) scale(1.15); } 50% { transform: translate(58vw, 48vh) scale(0.9); } 75% { transform: translate(14vw, 56vh) scale(1.1); } }
@keyframes bubble2 { 0%, 100% { transform: translate(0, 0) scale(1); } 30% { transform: translate(-42vw, 26vh) scale(1.12); } 60% { transform: translate(-60vw, -8vh) scale(0.92); } 80% { transform: translate(-18vw, -14vh) scale(1.05); } }
@keyframes bubble3 { 0%, 100% { transform: translate(0, 0) scale(1.05); } 35% { transform: translate(34vw, -44vh) scale(0.9); } 65% { transform: translate(-14vw, -60vh) scale(1.2); } }
@keyframes bubble4 { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(-26vw, -24vh) scale(1.2); } 50% { transform: translate(24vw, -10vh) scale(0.85); } 75% { transform: translate(10vw, 26vh) scale(1.1); } }

/* Header: one fixed height. Scrolling only fades in the bar behind it, nothing moves. */
.topbar-in { height: 76px; }
html { scroll-padding-top: 86px; }
@media (max-width: 960px) {
  .topbar-in { height: 68px; }
  .nav { top: 100%; }
}

/* Tooltips: [data-tip="…"] — styled bubble under the element, no arrow (social icons + LIVE chip) */
:where([data-tip]) { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 8px); z-index: 120;
  transform: translate(-50%, 4px); opacity: 0; pointer-events: none; transition: opacity 0.16s ease, transform 0.16s ease;
  padding: 8px 11px; border-radius: 9px; white-space: nowrap;
  background: linear-gradient(180deg, #16201c, var(--surface-2)); border: 1px solid rgba(61, 242, 174, 0.38);
  color: var(--text); font: 600 0.78rem/1 var(--font-body); letter-spacing: 0; text-transform: none;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.9), 0 0 18px -8px rgba(61, 242, 174, 0.55);
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { [data-tip]::after { display: none; } }

/* Ko-fi button in the Tip jar card: green gradient, mug with a red heart */
.btn-kofi {
  min-height: 52px; padding: 0 24px; gap: 10px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #5df7c0 0%, #3df2ae 40%, #16b47b 100%);
  color: #04140d; font-weight: 700; font-size: 1rem;
  box-shadow: 0 12px 32px -12px rgba(61, 242, 174, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-kofi:hover { color: #04140d; filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 16px 36px -12px rgba(61, 242, 174, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn-kofi svg { flex: none; }

/* ── Privacy choices: slim bar at the bottom centre ───────── */
.consent {
  left: 50%; right: auto; bottom: 20px; width: min(660px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 18px; padding: 14px 14px 14px 20px; border-radius: 16px;
  background: rgba(16, 21, 28, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transform: translate(-50%, 12px);
}
.consent.is-open { transform: translate(-50%, 0); }
.consent p { margin: 0; flex: 1; font-size: 0.88rem; line-height: 1.5; color: var(--muted); }
.consent-actions { flex: none; gap: 8px; }
.consent-now { color: var(--dim); }
@media (max-width: 640px) {
  .consent { left: 12px; right: 12px; bottom: 12px; width: auto; transform: translateY(12px); flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .consent.is-open { transform: none; }
  .consent-actions .btn { flex: 1; }
}

/* Cookie button: bottom-right, its colour shows the choice (green accepted, red declined) */
.consent-fab { left: auto; right: 18px; width: 46px; height: 46px; background: rgba(16, 21, 28, 0.9); }
.consent-fab > svg { width: 20px; height: 20px; }
.consent-fab.is-yes { color: var(--accent); border-color: rgba(61, 242, 174, 0.35); }
.consent-fab.is-no { color: #ff7d8c; border-color: rgba(255, 125, 140, 0.35); }
.consent-fab.is-yes:hover { color: #6bf7c3; background: var(--surface-2); box-shadow: 0 0 22px -6px rgba(61, 242, 174, 0.45); }
.consent-fab.is-no:hover { color: #ff9aa6; background: var(--surface-2); box-shadow: 0 0 22px -6px rgba(255, 125, 140, 0.45); }

/* ── Latest-update card (bottom-left, once per release) ───── */
.update-card {
  position: fixed; left: 18px; bottom: 18px; z-index: 88; width: min(340px, calc(100vw - 96px));
  padding: 18px 20px 16px; border-radius: 16px; border: 1px solid var(--line-2);
  background: rgba(16, 21, 28, 0.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.85);
  opacity: 0; transform: translateY(12px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.update-card.is-open { opacity: 1; transform: none; }
body.consent-open .update-card { opacity: 0; pointer-events: none; }
.update-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--dim); cursor: pointer; }
.update-x:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.update-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.update-eyebrow { margin: 0 0 12px; padding-right: 28px; font: 600 0.72rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.update-more { display: inline-block; margin-top: 14px; font-size: 0.86rem; font-weight: 600; color: var(--accent); }
.update-more:hover { color: #6bf7c3; }
@media (max-width: 640px) { .update-card { left: 12px; bottom: 12px; width: calc(100vw - 84px); padding: 16px; } }

/* Tagged change list (card + changelog page) */
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.ch-list li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: baseline; font-size: 0.9rem; line-height: 1.45; color: var(--text); }
.ch-tag { font: 600 0.66rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.ch-new { color: var(--accent); }
.ch-better { color: #a6e85c; }
.ch-fixed { color: var(--warn); }

/* "What's new" button in the hero */
.ver-chip { font: 600 0.72rem/1 var(--font-mono); padding: 5px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(61, 242, 174, 0.3); }

/* Footer: Product, More and Legal side by side on tablets; two columns on small phones */
@media (max-width: 960px) { .footer-top { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr 1fr; } }

/* Stat cards: number · small unit label · title · text */
.stat-unit { font: 700 0.74rem/1 var(--font-body); font-style: normal; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.stat strong { margin-bottom: 2px; }

/* ── Mobile menu: full screen, links centred; logo and icons stay on top ── */
.nav-burger { position: relative; }
.nav-burger span { position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px; border-radius: 2px; background: currentColor; transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-burger span:nth-child(1) { transform: translateY(-6px); }
.nav-burger span:nth-child(3) { transform: translateY(6px); }
.nav-burger[aria-expanded='true'] { color: var(--text); }
.nav-burger[aria-expanded='true'] span:nth-child(1) { transform: rotate(45deg); }
.nav-burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.nav-burger[aria-expanded='true'] span:nth-child(3) { transform: rotate(-45deg); }
@media (max-width: 960px) {
  .nav {
    display: flex; position: fixed; inset: 0; z-index: 1; margin: 0; padding: 96px 24px 48px;
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    background: radial-gradient(520px 380px at 50% 18%, rgba(61, 242, 174, 0.12), transparent 70%), radial-gradient(480px 360px at 50% 100%, rgba(166, 232, 92, 0.07), transparent 70%), #07090d;
    border: 0; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.25s ease; }
  .nav a { font: 600 1.7rem/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--text); padding: 12px 24px; border: 0; border-radius: 12px; text-align: center; }
  .nav a:hover, .nav a:focus-visible { color: var(--accent); background: transparent; }
  .nav.is-open a { animation: nav-in 0.4s ease both; }
  .nav.is-open a:nth-child(2) { animation-delay: 0.04s; } .nav.is-open a:nth-child(3) { animation-delay: 0.08s; }
  .nav.is-open a:nth-child(4) { animation-delay: 0.12s; } .nav.is-open a:nth-child(5) { animation-delay: 0.16s; }
  .nav.is-open a:nth-child(6) { animation-delay: 0.2s; } .nav.is-open a:nth-child(7) { animation-delay: 0.24s; }
  .topbar-in > .brand, .topbar-cta { position: relative; z-index: 2; }
  body.nav-open { overflow: hidden; }
  body.nav-open .update-card, body.nav-open .consent-fab, body.nav-open .consent { visibility: hidden; }
}
@keyframes nav-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Phones: latest-update card sits above the cookie button, full width */
@media (max-width: 640px) { .update-card { left: 12px; right: 12px; width: auto; bottom: 76px; } }

/* Narrow phones: long URLs and panels may shrink instead of pushing past the edge */
.watch-grid > *, .alerts-cols > *, .alerts-cols fieldset { min-width: 0; }
.help p { overflow-wrap: anywhere; }
.watch { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 420px) {
  .peg-list { padding: 8px 14px 0; }
  .peg-list li { grid-template-columns: 44px 1fr auto auto; gap: 6px 8px; padding: 12px; }
  .peg-controls, .watch .panel-title { padding-left: 14px; padding-right: 14px; }
  .watch .panel-title { flex-wrap: wrap; gap: 4px 12px; }
}

/* Phones: floating cards and the cookie button line up with the page container */
@media (max-width: 640px) {
  .update-card, .consent { left: var(--gutter); right: var(--gutter); }
  .consent-fab { right: var(--gutter); }
}

/* ── What's new page: centred title, one card per release grouped into New / Better / Fixed ── */
.whatsnew .wn-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.whatsnew .wn-head h1 { font-size: clamp(2.4rem, 6vw, 3.6rem); margin-bottom: 14px; }
.whatsnew .wn-head p { color: var(--muted); font-size: 1.04rem; line-height: 1.65; }
.whatsnew .wn-head a { color: var(--accent); }
.releases { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.release { padding: 30px 34px 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 96px; }
.release.is-latest { border-color: rgba(61, 242, 174, 0.3); background: linear-gradient(180deg, rgba(61, 242, 174, 0.05), var(--surface) 40%); }
.rel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 26px; }
.release .rel-head h2 { font: 700 1.75rem/1 var(--font-display); letter-spacing: -0.02em; color: var(--text); margin: 0; }
.rel-head time { color: var(--muted); font-size: 0.95rem; }
.rel-latest { font: 600 0.74rem/1 var(--font-body); padding: 6px 11px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(61, 242, 174, 0.35); }
.release .rel-group { font: 700 0.72rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin: 28px 0 14px; }
.release .rel-head + .rel-group { margin-top: 0; }
.releases .rel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.releases .rel-list li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.98rem; line-height: 1.65; }
.releases .rel-list li::before { content: ''; position: absolute; left: 3px; top: 0.66em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgba(61, 242, 174, 0.6); }
.releases .rel-list b { color: var(--text); font-weight: 600; }
@media (max-width: 640px) {
  .whatsnew .wn-head { margin-bottom: 28px; }
  .whatsnew .wn-head br { display: none; }
  .release { padding: 22px 20px; }
  .release .rel-head h2 { font-size: 1.45rem; }
  .releases .rel-list li { font-size: 0.94rem; }
}

/* Mobile menu: short green dash under each link, small version at the bottom */
.nav .nav-ver { display: none; }
@media (max-width: 960px) {
  .nav { overflow-y: auto; }
  .nav a:not(.nav-ver) { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 24px 12px; }
  .nav a:not(.nav-ver)::after { content: ''; width: 22px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #3df2ae, #a6e85c); opacity: 0.55; transition: width 0.25s ease, opacity 0.25s ease; }
  .nav a:not(.nav-ver):hover::after, .nav a:not(.nav-ver):focus-visible::after { width: 40px; opacity: 1; }
  .nav .nav-ver { display: block; position: absolute; left: 0; right: 0; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); padding: 8px; text-align: center; font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.08em; color: var(--dim); }
  .nav .nav-ver:hover { color: var(--accent); background: transparent; }
}

/* Header bar background lives on ::before. A backdrop-filter on .topbar itself would make it the
   containing block of the fixed full-screen menu, which then shrinks to the bar while it fades. */
.topbar, .topbar.is-scrolled { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.topbar::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(7, 9, 13, 0.85); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  opacity: 0; transition: opacity 0.25s ease;
}
.topbar.is-scrolled::before { opacity: 1; }

/* "Zero custody": the system font sits low in its line box, so lift the text a touch */
.h1-pill { padding-bottom: 2px; }

/* Footer sits straight on the page background: no fill, no top line */
.footer { background: transparent; border-top: 0; }

/* Mobile menu: links sit a little above centre, clear of the version line */
@media (max-width: 960px) {
  .nav { padding: 72px 24px 120px; justify-content: center; justify-content: safe center; }
}
@media (max-width: 960px) and (max-height: 700px) {
  .nav { padding-bottom: 92px; }
  .nav a:not(.nav-ver) { padding: 7px 24px 9px; gap: 8px; font-size: 1.5rem; }
}
