/* ZSE Analitika – one design system for the marketing site and the app. */
:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --ink: #0e1620;
  --ink-2: #485363;
  --muted: #6f7a8a;
  --line: #e2e6eb;
  --line-strong: #cfd5dd;
  --accent: #0b6b57;
  --accent-ink: #ffffff;
  --accent-soft: #e4f3ee;
  --accent-hover: #095746;
  --pro: #8a5a00;
  --pro-soft: #fdf1d7;
  --up: #006300;
  --down: #b42323;
  --focus: #1f6fd0;
  --shadow: 0 1px 2px rgba(14, 22, 32, .05), 0 4px 16px rgba(14, 22, 32, .04);
  /* Chart roles (validated categorical order; colour follows the strategy, never its rank). */
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300;
  --bench: #7d8794;
  --grid: #e7eaee;
  --axis: #c3c9d1;
  --pos: 42, 120, 214;
  --neg: 208, 59, 59;
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c1117; --surface: #151b23; --surface-2: #1c232d; --ink: #e9edf2; --ink-2: #b4bdc9; --muted: #8893a2;
    --line: #262f3b; --line-strong: #364252; --accent: #3fcf9f; --accent-ink: #06261d; --accent-soft: #12352c;
    --accent-hover: #63dcb3; --pro: #f0c060; --pro-soft: #3a2d10; --up: #3fcf7a; --down: #f07a7a; --focus: #6aa9f5;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300;
    --bench: #8893a2; --grid: #222b36; --axis: #364252; --pos: 57, 135, 229; --neg: 230, 103, 103;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1117; --surface: #151b23; --surface-2: #1c232d; --ink: #e9edf2; --ink-2: #b4bdc9; --muted: #8893a2;
  --line: #262f3b; --line-strong: #364252; --accent: #3fcf9f; --accent-ink: #06261d; --accent-soft: #12352c;
  --accent-hover: #63dcb3; --pro: #f0c060; --pro-soft: #3a2d10; --up: #3fcf7a; --down: #f07a7a; --focus: #6aa9f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300;
  --bench: #8893a2; --grid: #222b36; --axis: #364252; --pos: 57, 135, 229; --neg: 230, 103, 103;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.15; font-weight: 650; text-wrap: balance; }
h1 { font-size: 26px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.num, td.n, th.n { font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); } .muted { color: var(--muted); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 40px); }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-small { height: 30px; padding: 0 10px; font-size: 13px; background: var(--surface); border-color: var(--line-strong); }
.btn-small:hover { border-color: var(--muted); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="date"], input:not([type]), select, textarea {
  height: 38px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); min-width: 0; width: 100%;
}
textarea { height: auto; padding: 8px 12px; resize: vertical; }
select { padding-right: 28px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 650; letter-spacing: .01em; white-space: nowrap; }
.pill-free { background: var(--accent-soft); color: var(--accent); }
.pill-pro { background: var(--pro-soft); color: var(--pro); }
.pill-admin { background: var(--ink); color: var(--surface); }
.pill-guest { background: var(--surface-2); color: var(--ink-2); }
.who { gap: 6px; max-width: 100%; }
.who-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 26ch; }
.pill-muted { background: var(--surface-2); color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); }
.brand-mark svg { width: 18px; height: 18px; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: var(--radius-sm); gap: 2px; }
.seg button { height: 28px; padding: 0 10px; border: 0; background: transparent; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--accent); }

/* Marketing site */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 62px; }
.site-nav { display: flex; gap: 22px; margin-right: auto; font-size: 14px; font-weight: 550; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); }
.site-actions { display: flex; gap: 8px; margin-left: auto; }
.hero { padding: 64px 0 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 650; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.hero h1 { font-size: clamp(34px, 4.6vw, 52px); letter-spacing: -.035em; line-height: 1.05; }
.lead { margin-top: 18px; font-size: 18px; color: var(--ink-2); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-note { margin-top: 12px; font-size: 13px; color: var(--muted); }
.hero-visual { padding: 18px 18px 10px; }
.hero-visual svg { width: 100%; height: auto; display: block; }
.card-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
svg .grid { stroke: var(--grid); stroke-width: 1; }
svg .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--bench) 0 5px, transparent 5px 8px) !important; }
.proof { border-block: 1px solid var(--line); background: var(--surface); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 26px; }
.proof-grid strong { display: block; font-size: 26px; letter-spacing: -.02em; }
.proof-grid span { font-size: 13px; color: var(--ink-2); }
.section { padding: 64px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.section h2 { font-size: 30px; letter-spacing: -.03em; }
.section-lead { margin-top: 10px; color: var(--ink-2); font-size: 16px; max-width: 70ch; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 28px; }
.strategy-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; transition: border-color .12s, transform .12s; }
.strategy-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.strategy-card p { color: var(--ink-2); font-size: 14px; flex: 1; }
.strategy-card h3 { font-size: 18px; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.kind { font-size: 12px; color: var(--muted); font-weight: 600; }
.spark { width: 100%; height: 56px; display: block; margin-top: 4px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.mini-stats dt { font-size: 12px; color: var(--muted); }
.mini-stats dd { font-weight: 650; font-variant-numeric: tabular-nums; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 6px; padding-top: 16px; border-top: 2px solid var(--accent); }
.steps li::before { content: counter(step); font-weight: 700; color: var(--accent); font-size: 14px; }
.steps strong { font-size: 17px; } .steps span { color: var(--ink-2); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; margin-top: 32px; }
.feature h3 { font-size: 16px; margin-bottom: 6px; } .feature p { color: var(--ink-2); font-size: 14.5px; }
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 20px; margin-top: 28px; }
.plan { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.plan-pro { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan h3 { font-size: 18px; }
.price { font-size: 32px; font-weight: 700; letter-spacing: -.03em; } .price small { font-size: 15px; font-weight: 500; color: var(--muted); }
.price-sub { color: var(--muted); font-size: 13px; margin-top: -8px; }
.plan ul { display: grid; gap: 8px; margin: 6px 0 10px; flex: 1; align-content: start; }
.plan li { padding-left: 24px; position: relative; font-size: 14.5px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.request-form { display: grid; gap: 10px; }
.faq { margin-top: 20px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { font-weight: 600; font-size: 16px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin-top: 10px; color: var(--ink-2); max-width: 68ch; }
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--ink-2); font-size: 14px; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; }
.site-footer nav { display: flex; gap: 20px; align-items: start; flex-wrap: wrap; }
.site-footer nav a:hover { color: var(--ink); }
.site-footer p { margin-top: 8px; }
.fineprint { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); max-width: 100ch; }
.simple { padding: 48px 0 72px; min-height: 60vh; }
.notice, .sign-in { padding: 32px; display: grid; gap: 14px; justify-items: start; max-width: 520px; margin-inline: auto; }
.notice p, .sign-in p { color: var(--ink-2); }
.auth-form { display: grid; gap: 12px; width: 100%; }
.auth-alt { font-size: 14px; } .auth-alt a, .prose a { color: var(--accent); font-weight: 600; }
.form-error { color: var(--down) !important; font-weight: 600; }
.form-ok { color: var(--up) !important; font-weight: 600; }
.pay-form { grid-auto-flow: row; }
.row-actions { flex-wrap: wrap; }
.prose { display: grid; gap: 12px; } .prose h1 { font-size: 30px; margin-bottom: 8px; } .prose h2 { margin-top: 16px; } .prose p, .prose li { color: var(--ink-2); max-width: 72ch; }
.prose ul { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
.admin { display: grid; gap: 20px; } .admin .card { padding: 22px; display: grid; gap: 14px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; } .inline-form label { flex: 1 1 200px; }
.row-actions { display: flex; gap: 6px; }
.view.view-admin { max-width: none; }
.admin, .admin .card { min-width: 0; }
.admin .table-wrap { margin: 0; padding: 0; }
.admin .table { font-size: 13px; }
.admin .table th, .admin .table td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.admin .table thead th { font-size: 11px; }
.admin time { display: inline-block; white-space: nowrap; }
.admin time small { display: block; color: var(--muted); }
.admin .row-actions { flex-direction: column; align-items: flex-start; }
.admin .row-actions button { white-space: nowrap; }
.admin .gift-notify { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; font-weight: 500; line-height: 1.4; cursor: pointer; }
.admin .gift-notify input { width: 16px; height: 16px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.admin .row-actions .gift-notify { max-width: 180px; margin-bottom: 3px; }
.admin .gift-confirm { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.admin .gift-confirm .gift-notify { flex: 0 1 auto; }
.admin .inline-form label { min-width: 0; }
.admin .admin-filters label { flex: 0 1 300px; }
.admin select { width: 100%; background: var(--surface); }
.nav-link.nav-admin { height: auto; min-height: 36px; padding-block: 7px; line-height: 1.3; }
@media (max-width: 680px) {
  .admin .card { padding: 16px; }
  .admin .table-wrap { overflow: visible; }
  .admin-table, .admin-table tbody { display: block; }
  .admin-table thead { display: none; }
  .admin-table tr { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .admin-table tr:last-child { border-bottom: 0; }
  .admin .admin-table tbody td, .admin .admin-table tbody th { display: grid; grid-template-columns: 105px minmax(0, 1fr); gap: 10px; padding: 0; border: 0; }
  .admin-table [data-label]::before { content: attr(data-label); font-size: 12px; font-weight: 500; color: var(--muted); }
  .admin .row-actions { flex-direction: row; }
  .admin time small { display: inline; margin-left: 6px; }
  .admin .inline-form label { flex-basis: 100%; }
}

/* App shell */
body.app { background: var(--bg); }
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); }
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar .brand { padding: 4px 8px 14px; }
.nav-group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.nav-link { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 550; font-size: 14px; }
.nav-link svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav-link .pill { margin-left: auto; height: 18px; font-size: 10.5px; padding: 0 6px; }
.sidebar-foot { margin-top: auto; padding-top: 12px; }
.upsell { padding: 14px; border-radius: var(--radius); background: var(--accent-soft); display: grid; gap: 8px; font-size: 13px; color: var(--ink-2); }
.upsell strong { color: var(--ink); font-size: 14px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.admin-preview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 28px; background: var(--accent-soft); border-bottom: 1px solid var(--line); }
.admin-preview strong, .admin-preview span { display: block; }
.admin-preview span { font-size: 12px; color: var(--ink-2); }
.admin-preview .seg { flex-shrink: 0; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 440px; }
.search input { padding-left: 36px; background: var(--surface); }
.search > svg { position: absolute; left: 11px; top: 10px; width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, .14); max-height: 380px; overflow-y: auto; padding: 6px; z-index: 30; }
.search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; font-size: 14px; }
.search-results a:hover, .search-results a.active { background: var(--surface-2); }
.search-results small { color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.asof { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.view { padding: 28px; display: grid; gap: 20px; align-content: start; max-width: 1320px; width: 100%; }
.view:focus { outline: none; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: end; justify-content: space-between; }
.page-head p { color: var(--ink-2); margin-top: 6px; max-width: 78ch; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; }
.crumbs a:hover { color: var(--ink); }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel { padding: 20px; display: grid; gap: 14px; min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.panel-head p { color: var(--muted); font-size: 13px; }
.panel-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 2px; }
.tile span { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.tile strong { font-size: 22px; letter-spacing: -.02em; font-weight: 650; }
.tile small { font-size: 12.5px; color: var(--ink-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button { height: 40px; padding: 0 14px; border: 0; background: none; font-weight: 600; font-size: 14px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.lock-icon { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table thead th { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: var(--surface); position: sticky; top: 0; }
.table th.n, .table td.n { text-align: right; }
.table tbody th { font-weight: 600; }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table tbody tr.link { cursor: pointer; } .table tbody tr.link:hover { background: var(--surface-2); }
.table th[data-sort] { cursor: pointer; user-select: none; } .table th[data-sort]:hover { color: var(--ink); }
.table th[aria-sort="ascending"]::after { content: " ↑"; } .table th[aria-sort="descending"]::after { content: " ↓"; }
.table .sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.table .wrap-cell { white-space: normal; min-width: 220px; }
.table tfoot td, .table tfoot th { font-weight: 650; border-top: 1px solid var(--line-strong); border-bottom: 0; }
.wbar { display: inline-block; height: 6px; border-radius: 3px; background: var(--accent); vertical-align: middle; margin-right: 8px; min-width: 2px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: baseline; }
.tag { display: inline-block; font-size: 12px; font-weight: 650; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.tag.new { background: var(--accent-soft); color: var(--accent); } .tag.out { background: rgba(var(--neg), .14); color: var(--down); }
.star { border: 0; background: none; padding: 2px; color: var(--line-strong); font-size: 16px; line-height: 1; }
.star[aria-pressed="true"] { color: #e0a100; }
.locked-cell { color: var(--muted); letter-spacing: 2px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.pager div { display: flex; gap: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filters label { flex: 0 1 180px; } .filters label.grow { flex: 1 1 220px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }

/* Charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .tick { fill: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--grid); } .chart .axis { stroke: var(--axis); }
.chart .cursor { stroke: var(--axis); stroke-width: 1; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.tooltip { position: absolute; pointer-events: none; z-index: 5; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); min-width: 150px; display: none; }
.tooltip b { display: block; margin-bottom: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.tooltip div { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.tooltip div span:first-child { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.tooltip i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.tooltip div span:last-child { font-weight: 650; font-variant-numeric: tabular-nums; }
.heat { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: 12px; font-variant-numeric: tabular-nums; }
.heat th { font-weight: 600; color: var(--muted); padding: 2px 4px; text-align: center; }
.heat td { text-align: center; padding: 5px 2px; border-radius: 4px; min-width: 40px; }
.heat td.total { font-weight: 700; background: var(--surface-2); }
.heat-wrap { overflow-x: auto; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; }
.statgrid div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.statgrid dt { color: var(--ink-2); } .statgrid dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.rules { display: grid; gap: 8px; } .rules li { padding-left: 18px; position: relative; color: var(--ink-2); }
.rules li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.note { font-size: 13px; color: var(--muted); max-width: 90ch; }
.callout { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13.5px; color: var(--ink-2); }

/* Paywall */
.lock { padding: 36px 24px; display: grid; gap: 12px; justify-items: center; text-align: center; }
.lock-badge { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--pro-soft); color: var(--pro); }
.lock-badge svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lock p { color: var(--ink-2); max-width: 52ch; }
.lock ul { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 13.5px; color: var(--ink-2); }
.lock li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.lock .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.calc { display: grid; gap: 14px; }
.calc-input { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.calc-input label { flex: 0 1 220px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.chip:hover { background: var(--accent-soft); color: var(--accent); }
.chip small { color: var(--muted); font-weight: 500; }
.news { display: grid; }
.news a { display: grid; grid-template-columns: 88px 64px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
.news a:last-child { border-bottom: 0; }
.news.compact a { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.news.compact time { order: -1; }
.news.compact .news-ticker { display: none; }
.news a:hover .news-title { color: var(--accent); }
.news time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.news .news-ticker { font-weight: 650; }
.news small { display: block; color: var(--muted); font-size: 12.5px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; } .kv dt { color: var(--muted); } .kv dd { font-weight: 600; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 60; }
.backdrop { display: none; }

@media (max-width: 1080px) {
  .grid-main, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero { padding: 40px 0 32px; }
  .hero-grid, .grid-2, .pricing, .steps, .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .section { padding: 44px 0; } .section h2 { font-size: 24px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 40; width: 264px; left: 0; transform: translateX(-100%); transition: transform .18s; box-shadow: 8px 0 32px rgba(0, 0, 0, .18); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 35; border: 0; }
  .icon-btn.menu-btn { display: grid; }
  .topbar { padding: 0 16px; } .view { padding: 18px 16px 32px; gap: 16px; }
  .asof { display: none; }
  .panel { padding: 16px; } .table-wrap { margin: 0 -16px; padding: 0 16px; }
  h1 { font-size: 22px; }
  .news a { grid-template-columns: 76px minmax(0, 1fr); } .news .news-ticker { display: none; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .site-actions .btn-ghost:not(.who) { display: none; }
  .who-mail { display: none; }
  .wrap, .wrap.narrow { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .sidebar, .topbar, .site-header, .site-footer { display: none !important; } .shell { display: block; } }

.sandbox-banner{padding:8px 16px;text-align:center;background:#fff1c4;color:#513e00;font-size:13px;font-weight:600}.topbar .who-mail{max-width:260px;overflow:hidden;text-overflow:ellipsis}.admin select{padding:10px;border:1px solid var(--line);border-radius:8px;color:inherit}@media(max-width:600px){.topbar .who-mail{max-width:150px}.topbar-right{gap:4px}}

@media(max-width:600px){
  .topbar{height:auto;min-height:58px;flex-wrap:wrap;padding:8px 16px;gap:6px}
  .topbar-right{flex-wrap:wrap;justify-content:flex-end;min-width:0}
  .topbar .who-mail,.site-header .who-mail{display:inline;max-width:none;white-space:normal;overflow-wrap:anywhere;font-size:11px}
  .who{min-width:0;flex-wrap:wrap;justify-content:flex-end}
  .site-header .wrap{height:auto;min-height:62px;flex-wrap:wrap;padding-block:10px;gap:8px}
  .site-actions{flex-wrap:wrap;gap:6px}
}
