/* ADSMoon UI v0.2 — ledger-first. Ink sidebar, paper surfaces, one pale-moon accent for money that is yours.
   Numbers are tabular mono; state is shown with pills and a left stripe, never colour alone. */
:root {
  --bg: #f5f8fc; --surface: #ffffff; --surface-2: #f8fafd; --fg: #0f1b33; --muted: #55617a; --line: #e2e8f2; --line-2: #cdd6e4;
  --ink: #0f1626; --ink-2: #18223a; --ink-fg: #e9edf5; --ink-muted: #9ba7bf;
  --moon: #e7cf8a; --moon-ink: #3b3006;
  --accent: #1d5bd6; --accent-fg: #ffffff; --accent-soft: #e8f0fe;
  --ok: #12805c; --ok-bg: #e3f5ed; --warn: #95600a; --warn-bg: #fcf1d9; --bad: #b42318; --bad-bg: #fde7e4;
  --shadow: 0 1px 2px rgba(15, 27, 51, .05), 0 2px 6px rgba(15, 27, 51, .04);
  --hero: linear-gradient(180deg, #eaf1ff 0%, #f5f8fc 100%); --promise-line: #cfdcf8;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --r: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b101c; --surface: #131a2a; --surface-2: #0f1524; --fg: #e6e9f0; --muted: #98a2b6; --line: #232d44; --line-2: #2f3a55;
    --ink: #070b14; --ink-2: #0f1626;
    --accent: #7fa6ea; --accent-fg: #0b101c; --accent-soft: #18243f;
    --ok: #5fcb92; --ok-bg: #11291c; --warn: #e8b453; --warn-bg: #2e230c; --bad: #f08479; --bad-bg: #351512;
    --shadow: none;
    color-scheme: dark;
    --hero: linear-gradient(180deg, #111c33 0%, #0b101c 100%); --promise-line: #23345a;
  }
}
:root[data-theme="dark"] {
    --bg: #0b101c; --surface: #131a2a; --surface-2: #0f1524; --fg: #e6e9f0; --muted: #98a2b6; --line: #232d44; --line-2: #2f3a55;
    --ink: #070b14; --ink-2: #0f1626;
    --accent: #7fa6ea; --accent-fg: #0b101c; --accent-soft: #18243f;
    --ok: #5fcb92; --ok-bg: #11291c; --warn: #e8b453; --warn-bg: #2e230c; --bad: #f08479; --bad-bg: #351512;
    --shadow: none;
    color-scheme: dark;
    --hero: linear-gradient(180deg, #111c33 0%, #0b101c 100%); --promise-line: #23345a;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
/* min-height, not height: a body fixed to the window height ends the sticky header half way down the page. */
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: 24px; letter-spacing: -.01em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------- primitives ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-b { padding: 16px; }
.card-b.flush { padding: 0; }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 20px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.scroll { overflow-x: auto; }

.btn { font: inherit; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; justify-content: center; border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; cursor: pointer; background: var(--accent); color: var(--accent-fg); text-decoration: none; white-space: nowrap; }
.btn.secondary { background: var(--surface); color: var(--fg); border-color: var(--line-2); }
.btn.ghost { background: transparent; color: var(--fg); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.gold { background: var(--moon); color: var(--moon-ink); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 11px 18px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

label.f { display: grid; gap: 5px; font-size: 13px; font-weight: 500; color: var(--muted); min-width: 0; }
label.f .hint { font-weight: 400; font-size: 12px; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--fg); background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 11px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form-grid .full { grid-column: 1 / -1; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--fg); white-space: nowrap; line-height: 1.6; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.plain::before { display: none; }

.notice { border-radius: 8px; padding: 11px 13px; background: var(--accent-soft); font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: var(--surface-2); }
th.num, td.num { text-align: right; }

.empty { padding: 28px 16px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }

.kpi { padding: 16px; display: grid; gap: 4px; }
.kpi .l { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.kpi .v { font-family: var(--mono); font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .s { font-size: 12.5px; color: var(--muted); }
.kpi.hl .v { color: var(--fg); }
.kpi.hl { border-top: 3px solid var(--moon); }

.plat { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.plat i { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.plat .microsoft { background: #0f6cbd; } .plat .google { background: #1a73e8; } .plat .meta { background: #0866ff; } .plat .tiktok { background: #111; box-shadow: inset 0 0 0 1px #444; }

.toast { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); background: var(--ink); color: var(--ink-fg); padding: 11px 15px; border-radius: 10px; max-width: min(420px, calc(100vw - 32px)); box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: 14px; z-index: 50; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: var(--ink-fg); display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: .01em; color: inherit; text-decoration: none; }
.moon { width: 18px; height: 18px; border-radius: 50%; background: var(--moon); box-shadow: inset -6px -2px 0 rgba(0,0,0,.22); display: inline-block; flex: none; }
.side .brand { padding: 4px 10px 18px; }
.side nav { display: grid; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.side nav a svg { width: 17px; height: 17px; flex: none; }
.side nav a:hover { color: var(--ink-fg); background: var(--ink-2); }
.side nav a[aria-current] { color: var(--ink-fg); background: var(--ink-2); box-shadow: inset 3px 0 0 var(--moon); }
.side nav .count { margin-left: auto; font-family: var(--mono); font-size: 11.5px; background: var(--ink-2); color: var(--ink-fg); border-radius: 999px; padding: 0 7px; }
.side nav a[aria-current] .count { background: var(--moon); color: var(--moon-ink); }
.side .foot { margin-top: auto; border-top: 1px solid var(--ink-2); padding: 14px 10px 0; display: grid; gap: 8px; font-size: 13px; }
.side .foot .org { color: var(--ink-fg); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .foot .who { color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .foot button { background: none; border: 1px solid var(--ink-2); color: var(--ink-muted); border-radius: 8px; padding: 6px 10px; font: inherit; cursor: pointer; justify-self: start; }
.side .foot button:hover { color: var(--ink-fg); }
.main { min-width: 0; padding-block: 28px 64px; padding-left: max(16px, min(4vw, 40px)); padding-right: max(16px, min(4vw, 40px), env(safe-area-inset-right)); }
.main-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 20px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-h .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.crumb { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.crumb:hover { color: var(--fg); }

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 30; height: auto; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0 8px;
    padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
  .side .brand { padding: 0; }
  .menu-btn { justify-self: end; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; max-width: 100%; padding: 6px 10px 6px 12px; border-radius: 10px;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  .menu-cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side nav, .side .foot { display: none; grid-column: 1 / -1; }
  .side.open nav { display: grid; gap: 2px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); max-height: calc(100dvh - 220px); overflow-y: auto; }
  .side.open nav a { padding: 11px 12px; font-size: 15px; }
  .side.open .foot { display: grid; margin-top: 8px; }
  .side.open { box-shadow: 0 18px 40px rgba(15, 27, 51, .18); }
}
@media (min-width: 861px) { .menu-btn { display: none; } }

/* onboarding checklist */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.steps li { padding: 14px 16px; display: grid; gap: 6px; border-right: 1px solid var(--line); align-content: start; }
.steps li:last-child { border-right: 0; }
.steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--muted); }
.steps li.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.now .n { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.steps li.done h3 { color: var(--fg); }

/* chart */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--accent); }
.chart .bar.spike { fill: var(--warn); }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.chart .grid { stroke: var(--line); stroke-width: 1; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; overflow-x: auto; }
.tabs button, .tabs a { text-decoration: none; font: inherit; font-size: 14px; font-weight: 600; background: none; border: 0; padding: 12px 10px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"], .tabs a[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }

/* platform chooser */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice > span { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line-2); border-radius: 10px; padding: 12px; font-weight: 600; background: var(--surface); }
.choice input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; }
.checklist li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.mark.ok { background: var(--ok); } .mark.bad { background: var(--bad); } .mark.warn { background: var(--warn); }

.feeline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; font-size: 14px; }
.feeline .total { font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px; }
.feeline .num { text-align: right; }

.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; border-left: 3px solid transparent; }
.alert-list li:last-child { border-bottom: 0; }
.alert-list li.unread { border-left-color: var(--accent); }
.alert-list li.k-spend_spike, .alert-list li.k-low_balance, .alert-list li.k-refund_late { border-left-color: var(--warn); }
.alert-list li.k-restricted { border-left-color: var(--bad); }

/* ops queue rows */
.qrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) auto; gap: 12px 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; border-left: 3px solid transparent; }
.qrow:last-child { border-bottom: 0; }
.qrow .perf-slot { grid-column: 1 / -1; min-width: 0; }
.qrow.late { border-left-color: var(--bad); }
.qrow.soon { border-left-color: var(--warn); }
.qrow .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.qrow form.inline { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: end; background: var(--surface-2); border-radius: 8px; padding: 10px; }
.qrow form.inline label { flex: 1 1 200px; }
@media (max-width: 720px) { .qrow { grid-template-columns: minmax(0, 1fr); } .qrow .acts { justify-content: flex-start; } }

/* ---------- marketing pages ---------- */
.site-h { background: var(--ink); color: var(--ink-fg); }
.site-h .in, .wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.site-h .in { display: flex; align-items: center; gap: 22px; min-height: 60px; flex-wrap: wrap; }
.site-h nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.site-h nav a { color: var(--ink-muted); text-decoration: none; }
.site-h nav a:hover, .site-h nav a[aria-current] { color: var(--ink-fg); }
.site-h .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.site-h .right a.plain { color: var(--ink-fg); text-decoration: none; font-size: 14px; }

.hero { background: var(--ink); color: var(--ink-fg); padding-block: 56px 72px; overflow: hidden; }
.hero .in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -.02em; line-height: 1.05; max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--moon); }
.hero .lede { color: var(--ink-muted); font-size: 18px; max-width: 54ch; margin-top: 18px; }
.hero .ctas { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero .ctas .btn.secondary { background: transparent; color: var(--ink-fg); border-color: #34405c; }
.hero .facts { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero .facts div { display: grid; gap: 2px; }
.hero .facts b { font-family: var(--mono); font-size: 22px; color: var(--moon); font-weight: 600; }
.hero .facts span { color: var(--ink-muted); font-size: 13px; }
@media (max-width: 900px) { .hero .in { grid-template-columns: minmax(0, 1fr); } }

/* product preview (marked as example) */
.preview { background: var(--surface); color: var(--fg); border-radius: 14px; box-shadow: 0 30px 60px rgba(0,0,0,.35); border: 1px solid #2a3550; overflow: hidden; transform: rotate(-1deg); }
.preview .bar { display: flex; gap: 6px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); align-items: center; }
.preview .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.preview .bar span { margin-left: auto; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.preview .body { padding: 16px; display: grid; gap: 14px; }
.preview table th, .preview table td { padding: 7px 10px; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .preview { transform: none; } }

.band { padding-block: 64px; }
.band.alt { background: var(--surface); border-block: 1px solid var(--line); }
.band h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.01em; }
.band .kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.band .intro { color: var(--muted); max-width: 62ch; margin-top: 10px; font-size: 16px; }
.platforms { display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.calc > div { padding: 22px; }
.calc > div + div { border-left: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 760px) { .calc { grid-template-columns: minmax(0, 1fr); } .calc > div + div { border-left: 0; border-top: 1px solid var(--line); } }
.calc .big { font-family: var(--mono); font-size: 34px; letter-spacing: -.02em; }

.how { counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); list-style: none; padding: 0; margin: 28px 0 0; }
.how li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 6px; align-content: start; }
.band.alt .how li { background: var(--bg); }
.how li::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }

.promise { background: var(--ink); color: var(--ink-fg); border-radius: 14px; padding: 28px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: center; }
.promise .clock { font-family: var(--mono); font-size: 44px; color: var(--moon); line-height: 1; }
.promise p { color: var(--ink-muted); margin-top: 6px; }
@media (max-width: 640px) { .promise { grid-template-columns: minmax(0, 1fr); } }

details.faq { border-bottom: 1px solid var(--line); padding: 14px 0; }
details.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
details.faq[open] summary::after { content: "–"; }
details.faq p { color: var(--muted); margin-top: 8px; max-width: 70ch; }

.site-f { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 13px; }
.site-f .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth aside { background: var(--ink); color: var(--ink-fg); padding: 40px max(24px, 4vw); display: flex; flex-direction: column; gap: 28px; }
.auth aside h2 { font-size: 28px; letter-spacing: -.01em; max-width: 16ch; }
.auth aside ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; color: var(--ink-muted); }
.auth aside li b { color: var(--ink-fg); display: block; }
.auth main { padding: 40px max(16px, 4vw); display: grid; align-content: start; justify-items: center; }
.auth .panel { width: min(100%, 520px); display: grid; gap: 18px; }
.aside-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.aside-link { font-size: 14px; font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.aside-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-foot { display: none; }
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .auth aside { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px;
    padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); border-right: 0 !important; border-bottom: 1px solid var(--line); }
  .auth aside ul, .auth aside h2, .aside-link { display: none; }
  .aside-bottom { margin: 0; }
  .auth main { padding: 20px 16px 32px; }
  .auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
  .auth-foot a { color: var(--muted); text-decoration: none; }
  .auth-foot a:hover { color: var(--fg); text-decoration: underline; }
}

/* invoice */
.invoice-page { background: var(--bg); }
.invoice { max-width: 780px; margin: 32px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 36px max(16px, 4vw); box-shadow: var(--shadow); }
.inv-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.inv-meta { text-align: right; display: grid; gap: 3px; justify-items: end; }
.inv-meta h1 { font-size: 28px; }
.inv-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 22px 0; }
.inv-parties h2 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.inv-lines th, .inv-lines td { padding: 10px 0; background: none; }
.inv-lines tfoot th { font-size: 16px; color: var(--fg); text-transform: none; letter-spacing: 0; border-top: 2px solid var(--fg); }

@media (prefers-reduced-motion: no-preference) { .btn, .side nav a, tbody tr.link td { transition: background-color .12s, filter .12s, color .12s; } .btn:hover { filter: brightness(1.07); } }

/* fixes after visual check */
select { -webkit-appearance: none; appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a93a6' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
td.acct { min-width: 200px; }
.ov { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .ov { grid-template-columns: minmax(0, 1fr); } }
td.acct .sub { white-space: nowrap; margin: 2px 0 0 30px; }
.feeline { column-gap: 0; }
.feeline .num { padding-left: 16px; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.empty svg { width: 28px; height: 28px; }
.crumb svg { width: 14px; height: 14px; }
.qrow .mono, .notice .mono, .qrow div { overflow-wrap: anywhere; min-width: 0; }
.linkbtn{background:none;border:0;padding:0;font:inherit;color:var(--accent,inherit);text-decoration:underline;cursor:pointer;justify-self:start}
.perms{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:8px}
.perm{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:10px;padding:10px 12px;cursor:pointer}
.perm input{width:auto;margin-top:3px}
.perm > span{display:grid;gap:2px}
#lang [aria-pressed="true"]{background:var(--accent);color:#0b1020;border-color:var(--accent)}

/* ---------- customer pages: bright, light theme (html[data-theme="light"]) ---------- */
html.site .side { background: var(--surface); color: var(--fg); border-right: 1px solid var(--line); }
html.site .side nav a { color: var(--muted); }
html.site .side nav a:hover { color: var(--fg); background: var(--surface-2); }
html.site .side nav a[aria-current] { color: var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
html.site .side nav .count { background: var(--line); color: var(--fg); }
html.site .side nav a[aria-current] .count { background: var(--accent); color: var(--accent-fg); }
html.site .side .foot { border-top-color: var(--line); }
html.site .side .foot .org { color: var(--fg); }
html.site .side .foot .who { color: var(--muted); }
html.site .side .foot button { border-color: var(--line-2); color: var(--muted); }
html.site .side .foot button:hover { color: var(--fg); }
html.site .kpi.hl { border-top-color: var(--accent); }
html.site .btn.gold { background: var(--accent); color: var(--accent-fg); }
html.site .btn.gold:hover { filter: brightness(1.06); }

html.site .site-h { background: rgba(255, 255, 255, .92); color: var(--fg); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; backdrop-filter: saturate(1.4) blur(8px); }
html.site .site-h nav a { color: var(--muted); }
html.site .site-h nav a:hover, html.site .site-h nav a[aria-current] { color: var(--fg); }
html.site .site-h .right a.plain { color: var(--fg); }
html.site .hero { background: var(--hero); color: var(--fg); }
html.site .hero h1 em { color: var(--accent); }
html.site .hero .lede { color: var(--muted); }
html.site .hero .ctas .btn.secondary { background: var(--surface); color: var(--fg); border-color: var(--line-2); }
html.site .hero .facts b { color: var(--accent); }
html.site .hero .facts span { color: var(--muted); }
html.site .preview { border-color: var(--line); box-shadow: 0 24px 48px rgba(29, 91, 214, .12), 0 2px 6px rgba(15, 27, 51, .06); }
html.site .promise { background: var(--accent-soft); color: var(--fg); border: 1px solid var(--promise-line); }
html.site .promise .clock { color: var(--accent); }
html.site .promise p { color: var(--muted); }
html.site .auth aside { background: var(--hero); color: var(--fg); border-right: 1px solid var(--line); }
html.site .auth aside ul { color: var(--muted); }
html.site .auth aside li b { color: var(--fg); }
html.site .auth aside a:not(.brand) { color: var(--accent) !important; }
html.site .auth aside .brand { color: var(--fg); }
html.site .toast { background: var(--fg); color: #fff; }

/* trust strip under the hero */
.trust { border-bottom: 1px solid var(--line); background: var(--surface); }
.trust ul { list-style: none; margin: 0 auto; padding-block: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px 24px; }
.trust li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 13.5px; color: var(--muted); }
.trust li b { display: block; color: var(--fg); font-size: 14px; }
.trust .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; }
.trust .ic svg { width: 18px; height: 18px; }
.site-f .secure { display: inline-flex; align-items: center; gap: 6px; }

/* "Soft" background: warm neutral, less glare */
:root[data-theme="light"][data-bg="soft"] { --bg: #f4f3ef; --surface-2: #faf9f6; --line: #e5e2da; --line-2: #d3cfc4; --hero: linear-gradient(180deg, #ecebe5 0%, #f4f3ef 100%); --promise-line: #dcd8cc; }
html.site[data-theme="dark"] .toast, html.site:not([data-theme]) .toast { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }

/* visitor preferences: language and background */
.prefs { display: flex; gap: 8px; align-items: center; }
.prefs select { width: auto; padding: 5px 26px 5px 8px; font-size: 13px; border-radius: 8px; background-color: var(--surface); }
.side .prefs { flex-wrap: wrap; margin-bottom: 6px; }
[dir="rtl"] .side nav a[aria-current] { box-shadow: inset -3px 0 0 var(--accent); }
[dir="rtl"] .num { text-align: left; }
/* Arabic letters join: no letter-spacing, and a proportional face for words set in the mono style. */
[dir="rtl"] * { letter-spacing: 0 !important; }
[dir="rtl"] .hero .facts b, [dir="rtl"] .promise .clock { font-family: var(--font); }
/* phones: one compact header row, still sticky */
@media (max-width: 640px) {
  .site-h .in { gap: 10px; padding-block: 10px; }
  .site-h nav { display: none; }
  .site-h .right { width: 100%; margin-left: 0; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
  .prefs select { padding: 4px 22px 4px 6px; font-size: 12px; max-width: 120px; }
  .hero { padding-block: 32px 40px; }
}
/* public site footer */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); padding-block: 44px 28px; margin-top: 24px; }
.site-foot .cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .site-foot .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.site-foot h2 { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-foot a { color: var(--fg); text-decoration: none; font-size: 14.5px; }
.site-foot a:hover { color: var(--accent); text-decoration: underline; }
.site-foot li span { color: var(--muted); font-size: 14px; }
.site-foot .bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.site-foot .bottom .moon { width: 12px; height: 12px; vertical-align: -1px; }
.themes { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.themes button { width: 34px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.themes button svg { width: 17px; height: 17px; }
.themes button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
[dir="rtl"] .site-foot h2 { font-family: var(--font); }
/* "Ask ADSMoon" chat */
#ask-adsmoon { position: fixed; z-index: 60; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 10px; }
[dir="rtl"] #ask-adsmoon { right: auto; left: max(16px, env(safe-area-inset-left, 0px)); align-items: flex-start; }
.ask-fab { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-fg); font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; box-shadow: 0 10px 28px rgba(29, 91, 214, .35); }
.ask-fab svg { width: 20px; height: 20px; }
#ask-adsmoon.is-open .ask-fab span { display: none; }
.ask-panel { width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 110px)); background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 27, 51, .22); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.ask-panel header { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ask-panel header strong { display: block; font-size: 15px; }
.ask-panel header span { display: block; font-size: 12px; color: var(--muted); }
.ask-tools { display: flex; gap: 4px; }
.ask-tools button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 14px; }
.ask-log { overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ask-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-msg.bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ask-msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-fg); border-bottom-right-radius: 4px; }
.ask-msg.wait { color: var(--muted); font-style: italic; }
.ask-src { margin-top: 8px; font-size: 12.5px; color: var(--muted); white-space: normal; }
.ask-src a { color: var(--accent); }
.ask-person { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--accent); }
.ask-form { border-top: 1px solid var(--line); padding: 10px 12px 12px; display: grid; gap: 8px; }
.ask-mode { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); justify-self: start; }
.ask-mode label { cursor: pointer; }
.ask-mode input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; padding: 0; margin: 0; }
.ask-mode span { display: block; padding: 4px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ask-mode input:checked + span { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.ask-mode input:focus-visible + span { outline: 2px solid var(--accent); }
.ask-row { display: flex; gap: 8px; align-items: flex-end; }
.ask-row textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; font-size: 14px; }
.ask-row button { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-fg); cursor: pointer; font-size: 16px; flex: none; }
.ask-row button:disabled { opacity: .5; cursor: default; }
.ask-note { font-size: 11.5px; color: var(--muted); margin: 0; }
@media (max-width: 480px) { .ask-fab span { display: none; } .ask-panel { height: min(520px, calc(100vh - 96px)); } }
.site-foot .legal { font-size: 12.5px; margin-top: 6px; max-width: 70ch; }
.contact-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .contact-band { grid-template-columns: minmax(0, 1fr); } }
.ticks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; color: var(--fg); font-size: 15px; }
.ticks li::before { content: "✓"; color: var(--ok); font-weight: 700; }
.lead-kind { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); justify-self: start; }
.lead-kind input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; padding: 0; margin: 0; }
.lead-kind span { display: block; padding: 6px 12px; border-radius: 7px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.lead-kind input:checked + span { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }
.lead-kind input:focus-visible + span { outline: 2px solid var(--accent); }
.lead-done { display: grid; gap: 6px; padding: 10px 4px; }
.lead-done p { color: var(--muted); }
.wd-facts { display: grid; gap: 10px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.wd-facts > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.wd-facts dt { font-size: 13px; color: var(--muted); }
.wd-facts dd { margin: 0; }
.wd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wd-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--muted); }
.wd-steps li > span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid var(--line); }
.wd-steps li.done { color: var(--fg); } .wd-steps li.done > span { background: var(--ok); border-color: var(--ok); color: #fff; }
.wd-steps li.now { color: var(--fg); } .wd-steps li.now > span { border-color: var(--accent); color: var(--accent); }
.perf-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.perf-kpis > div { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); min-width: 0; }
.perf-kpis .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.perf-kpis .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.perf-kpis .up { color: var(--ok); } .perf-kpis .down { color: var(--bad); }
.health { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.health .score { width: 76px; height: 76px; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 5px solid var(--line); font: 600 24px/1 var(--mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.health .score small { font-size: 11px; color: var(--muted); font-weight: 500; }
.health .score.ok { border-color: var(--ok); } .health .score.warn { border-color: var(--warn); } .health .score.bad { border-color: var(--bad); }
.health ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.health .checks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.health .checks span { font-family: var(--mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; color: var(--muted); }
@media (max-width: 480px) { .health { grid-template-columns: 1fr; } }
.insights { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.insights li { padding: 9px 12px; border-radius: 8px; border-left: 3px solid var(--accent); background: var(--accent-soft); font-size: 14px; }
.insights li.warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.insights li.bad { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.seg button { border: 0; background: none; padding: 4px 9px; border-radius: 6px; font: 600 12.5px/1 inherit; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--shadow); }

/* Customer stories carousel (home page): one slide per view, swipe or use the arrows and dots. */
.stories { list-style: none; margin: 24px 0 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 16px; overscroll-behavior-x: contain; }
.stories::-webkit-scrollbar { display: none; }
.story { box-sizing: border-box; flex: 0 0 100%; min-width: 0; scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.story:not(:has(figure)) { grid-template-columns: 1fr; }
.story.proof { grid-template-columns: 1fr; align-content: start; gap: 12px; }
.story.proof img { max-height: 460px; }
.story figure { margin: 0; display: grid; gap: 6px; }
.story img { width: 100%; max-height: 360px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); display: block; }
.story-b { display: grid; gap: 14px; }
.story blockquote { margin: 0; font-size: clamp(17px, 2vw, 21px); line-height: 1.5; letter-spacing: -.005em; }
.story blockquote::before { content: "“"; color: var(--accent); font-size: 1.6em; line-height: 0; vertical-align: -.35em; margin-right: 4px; }
.story .who { margin: 0; }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: var(--line-2); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--accent); width: 24px; border-radius: 5px; }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; padding: 16px; gap: 16px; } .story img { max-height: 280px; } }

/* Ops › Google Ads: MCC rows open and close their client accounts */
.nowrap { white-space: nowrap; }
.mcc-row { cursor: pointer; background: var(--surface-2); }
.mcc-row:hover { background: var(--accent-soft); }
.mcc-tog { width: 24px; height: 24px; padding: 0; margin-right: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--fg); font-size: 14px; line-height: 1; cursor: pointer; vertical-align: middle; }
