/* ---------- Tokens ---------- */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e3e6eb;
  --text: #1a1d23;
  --muted: #6b7280;
  --primary: #2f6fed;
  --primary-soft: #e6eefe;
  --ok: #15803d;   --ok-soft: #dcfce7;
  --warn: #b45309; --warn-soft: #fef3c7;
  --bad: #b91c1c;  --bad-soft: #fee2e2;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --radius: 12px;
  --sidebar: 232px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1115; --surface: #171a21; --surface-2: #1e222b; --border: #2a2f3a;
    --text: #e7e9ee; --muted: #9aa3b2; --primary: #6c9bff; --primary-soft: #1d2a47;
    --ok: #4ade80; --ok-soft: #133321; --warn: #fbbf24; --warn-soft: #3a2c0c; --bad: #f87171; --bad-soft: #3b1515;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1115; --surface: #171a21; --surface-2: #1e222b; --border: #2a2f3a;
  --text: #e7e9ee; --muted: #9aa3b2; --primary: #6c9bff; --primary-soft: #1d2a47;
  --ok: #4ade80; --ok-soft: #133321; --warn: #fbbf24; --warn-soft: #3a2c0c; --bad: #f87171; --bad-soft: #3b1515;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0; }
code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; justify-content: center; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary); filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 6px 10px; }
.btn.block { width: 100%; }
.link { background: none; border: 0; color: var(--primary); cursor: pointer; font: inherit; padding: 0; }
.link:hover { text-decoration: underline; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: 13px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; }
.alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-warn { background: var(--warn-soft); color: var(--warn); margin: 16px 0; }
.note { background: var(--surface-2); padding: 10px 12px; border-radius: 8px; }

/* ---------- Installer / login ---------- */
.install-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.install-card {
  width: 100%; max-width: 580px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; box-shadow: var(--shadow);
}
.install-card.narrow { max-width: 380px; }
.install-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 8px; }
.brand-mark { color: var(--primary); font-size: 18px; }
.stepper { display: flex; list-style: none; padding: 0; margin: 0 0 24px; gap: 6px; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--border); }
.stepper li span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: 11px; font-weight: 600; flex: none; }
.stepper li.current { color: var(--text); border-color: var(--primary); }
.stepper li.current span { background: var(--primary); color: #fff; }
.stepper li.done { border-color: var(--primary); }
.stepper li.done span { background: var(--primary-soft); color: var(--primary); }
.checklist { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; }
.checklist li > div { flex: 1; }
.checklist .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.checklist .pass .dot { background: var(--ok); }
.checklist .fail .dot { background: var(--bad); }
.checklist .warn .dot { background: var(--warn); }
.tag { font-size: 11px; font-weight: 600; color: var(--muted); }
.actions { display: flex; justify-content: space-between; margin-top: 20px; }
.choice { display: grid; gap: 8px; }
.choice-item { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; padding: 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 400 !important; }
.choice-item:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice-item input { width: auto; margin-top: 3px; }
.meter { height: 4px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: -6px; }
.meter span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; background: var(--bad); }
.meter span[data-level="ok"] { background: var(--warn); }
.meter span[data-level="strong"] { background: var(--ok); }
.summary { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; margin: 16px 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 26px; margin-bottom: 12px; animation: pop .4s ease; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  transition: width .2s ease; z-index: 30;
}
.sidebar-head { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-weight: 600; white-space: nowrap; overflow: hidden; }
.sidebar nav { flex: 1; padding: 8px 10px; display: grid; gap: 2px; align-content: start; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; white-space: nowrap; position: relative;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 500; }
.badge { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; background: var(--primary); color: #fff; border-radius: 10px; padding: 0 7px; }
.collapse-btn { display: flex; align-items: center; gap: 12px; margin: 10px; padding: 9px 12px; background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; border-radius: 8px; white-space: nowrap; }
.collapse-btn:hover { background: var(--surface-2); }
.collapse-btn svg { transition: transform .2s; }

.sb-collapsed .sidebar { width: 68px; }
.sb-collapsed .sidebar .brand-text,
.sb-collapsed .sidebar .nav-link span,
.sb-collapsed .sidebar .collapse-btn span { display: none; }
.sb-collapsed .badge { position: absolute; top: 2px; right: 4px; padding: 0 5px; }
.sb-collapsed .collapse-btn svg { transform: rotate(180deg); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 28px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.search { flex: 1; max-width: 420px; position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; }
.search input { padding-left: 34px; background: var(--surface); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.dot-indicator { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); border: 2px solid var(--bg); }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-weight: 600; font-size: 12px; cursor: pointer; }
.mobile-only { display: none; }

.dropdown { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 260px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12);
  padding: 6px; display: none; z-index: 50;
}
.menu.open { display: block; animation: drop .12s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.menu-title { position: relative; display: flex; flex-direction: column; padding: 8px 10px; font-weight: 600; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-title .link { position: absolute; right: 14px; top: 14px; font-size: 12px; font-weight: 500; }
.menu-title small { font-weight: 400; color: var(--muted); }
.menu-item { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; border: 0; background: none; color: var(--text); font: inherit; cursor: pointer; text-decoration: none; }
.menu-item:hover { background: var(--surface-2); }
.menu-item small { color: var(--muted); }
.menu-item b { font-weight: 500; }
.menu-item.unread b::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); margin-right: 6px; vertical-align: middle; }
.menu-item.danger { color: var(--bad); }

.content { padding: 28px; max-width: 1280px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.view { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ---------- Cards ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat, .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat { padding: 18px; display: grid; gap: 4px; }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat strong { font-size: 26px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; font-weight: 500; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { padding: 18px; min-width: 0; }
.span-2 { grid-column: span 2; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.narrow-card { max-width: 560px; }

.segmented { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; }
.segmented button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); font-weight: 500; }

/* Chart */
.chart { position: relative; height: 240px; }
.chart svg { width: 100%; height: 100%; stroke-width: initial; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; stroke: none; }
.chart .line { stroke: var(--primary); stroke-width: 2; fill: none; }
.chart .area { fill: var(--primary); opacity: .1; stroke: none; }
.chart .cursor { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .marker { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.tooltip {
  position: absolute; pointer-events: none; background: var(--text); color: var(--bg);
  font-size: 12px; padding: 5px 9px; border-radius: 6px; white-space: nowrap; opacity: 0;
  transform: translate(-50%, -120%); transition: opacity .1s;
}

/* Tasks */
.task-form { display: flex; gap: 8px; margin-bottom: 10px; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 240px; overflow: auto; }
.tasks li { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 6px; }
.tasks li:hover { background: var(--surface-2); }
.tasks input { width: 16px; height: 16px; accent-color: var(--primary); flex: none; }
.tasks span { flex: 1; overflow-wrap: anywhere; }
.tasks li.done span { text-decoration: line-through; color: var(--muted); }
.tasks .del { opacity: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; }
.tasks li:hover .del { opacity: 1; }
.tasks .empty { color: var(--muted); justify-content: center; padding: 20px; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: 0; }
.table td:last-child { text-align: right; }
.pill { font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 20px; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.idle { background: var(--surface-2); color: var(--muted); }

/* Activity */
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.activity li { display: flex; gap: 12px; }
.activity small { display: block; color: var(--muted); font-size: 12px; }
.a-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-top: 7px; flex: none; }
.a-dot.blue { background: var(--primary); }
.a-dot.green { background: var(--ok); }
.a-dot.amber { background: var(--warn); }

/* Settings */
.setting { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); gap: 12px; }
.setting:last-child { border: 0; }
.setting small { display: block; }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--border); border-radius: 22px; cursor: pointer; transition: background .2s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Skeleton placeholders */
.skeleton-card { display: grid; gap: 10px; }
.sk { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.sk.w60 { width: 60%; height: 16px; } .sk.w90 { width: 90%; } .sk.w75 { width: 75%; }
.sk.block { height: 90px; margin-top: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Toasts */
.toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: toast-in .2s ease; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.scrim { display: none; }

/* Number flash on refresh */
.flash { animation: flash .6s ease; }
@keyframes flash { 0% { color: var(--primary); } }

/* ---------- v0.2 additions ---------- */
textarea { resize: vertical; min-height: 96px; }
a { color: var(--primary); }
.brand { color: var(--text); text-decoration: none; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: var(--bad); filter: brightness(1.08); }
.btn.lg { padding: 11px 20px; font-size: 15px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.tight { margin: 6px 0 0; padding-left: 20px; }
.back-link { margin: 16px 0 0; }
.back-link a { color: var(--muted); text-decoration: none; }
.danger-choice:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.ph { font-style: normal; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: 1px; }
.stat-link { color: inherit; text-decoration: none; transition: border-color .15s; }
.stat-link:hover { border-color: var(--primary); }
.stat-link .delta.muted { color: var(--primary); }

/* Users page */
.card.flush { padding: 0; }
.table-filter { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.table-filter input { max-width: 340px; }
.users-table th:first-child, .users-table td:first-child { padding-left: 16px; }
.users-table td { vertical-align: middle; }
.user-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.user-cell small { display: block; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.avatar.sm { width: 32px; height: 32px; display: grid; place-items: center; font-size: 11px; flex: none; cursor: default; }
.pill.role-admin { background: var(--primary-soft); color: var(--primary); }
.row-muted td { opacity: .6; }
.row-muted td.row-actions { opacity: 1; }
.row-actions { width: 48px; }
.row-actions .menu { min-width: 190px; }
.row-actions .menu form { margin: 0; }
.empty-filter { padding: 20px; text-align: center; margin: 0; }

/* Dialogs */
.dialog { border: 1px solid var(--border); border-radius: 14px; padding: 24px; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(10,12,16,.45); backdrop-filter: blur(2px); }
.dialog[open] { animation: pop-in .15s ease; }
.dialog h2 { font-size: 18px; }
.dialog .actions { margin-top: 6px; justify-content: flex-end; gap: 8px; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* Account page */
.account-grid { grid-template-columns: repeat(2, 1fr); align-items: start; }
.account-grid .card:last-child { grid-column: 1 / -1; }
.form label small { font-weight: 400; }
input:disabled { opacity: .6; }

/* ---------- Landing page ---------- */
.landing { font-size: 15px; }
.l-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.l-nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.l-nav.scrolled { border-color: var(--border); }
.l-nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.l-nav .brand { margin: 0; font-size: 16px; }
.l-links { display: flex; gap: 24px; margin-left: auto; }
.l-links a { color: var(--muted); text-decoration: none; font-weight: 500; }
.l-links a:hover { color: var(--text); }
.l-nav-actions { display: flex; align-items: center; gap: 8px; }
.l-burger { display: none; }

.l-hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; max-width: 1120px; margin: 0 auto; padding: 80px 24px 96px; }
.l-hero .l-wrap { padding: 0; margin: 0; }
.l-eyebrow { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); padding: 4px 10px; border-radius: 20px; margin-bottom: 18px; }
.l-hero h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 18px; }
.l-lead { font-size: 18px; color: var(--muted); max-width: 520px; margin: 0 0 28px; }
.l-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.l-mock { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(16,24,40,.25); overflow: hidden; transform: perspective(1200px) rotateY(-8deg) rotateX(3deg); transition: transform .5s ease; }
.l-mock:hover { transform: none; }
.l-mock-bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.l-mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.l-mock-body { display: grid; grid-template-columns: 70px 1fr; height: 260px; }
.l-mock-side { background: var(--surface-2); }
.l-mock-main { padding: 16px; display: grid; gap: 14px; grid-template-rows: auto 1fr; }
.l-mock-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.l-mock-row span { height: 50px; border-radius: 8px; background: var(--surface-2); }
.l-mock-chart { border-radius: 8px; background:
  linear-gradient(to top, color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%),
  var(--surface-2);
  clip-path: polygon(0 70%, 12% 55%, 25% 62%, 38% 40%, 52% 48%, 66% 25%, 80% 33%, 100% 12%, 100% 100%, 0 100%); }

.l-section { padding: 88px 0; }
.l-section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.l-h2 { font-size: 30px; letter-spacing: -.02em; margin: 0 0 8px; }
.l-sub { color: var(--muted); margin: 0 0 36px; }
.l-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.l-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.l-card h3 { margin: 14px 0 6px; font-size: 17px; }
.l-card p { margin: 0; color: var(--muted); }
.l-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.l-icon svg { width: 22px; height: 22px; }
.l-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.l-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.l-stats div { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.l-stats strong { display: block; font-size: 32px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.l-stats span { color: var(--muted); font-size: 13px; }
.l-narrow { max-width: 640px; }
.l-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 13px; }
.l-footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.l-cards .reveal:nth-child(2) { transition-delay: .08s; }
.l-cards .reveal:nth-child(3) { transition-delay: .16s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .l-mock { transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .l-hero { grid-template-columns: 1fr; padding-top: 56px; }
  .l-hero-art { max-width: 560px; }
  .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .2s; width: var(--sidebar) !important; }
  .sb-collapsed .sidebar .brand-text, .sb-collapsed .sidebar .nav-link span { display: inline; }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .collapse-btn { display: none; }
  .mobile-only { display: grid; }
  .topbar { padding: 10px 16px; }
  .content { padding: 20px 16px; }
  .grid, .grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .stat strong { font-size: 22px; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .install-card { padding: 20px; }
  .stepper li { font-size: 0; gap: 0; }
  .account-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .table-filter input { max-width: none; }
  .l-wrap { padding: 0 16px; }
  .l-hero { padding: 40px 16px 64px; }
  .l-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px; }
  .l-links.open { display: flex; }
  .l-links a { padding: 12px 0; }
  .l-burger { display: grid; }
  .l-nav-actions { margin-left: auto; }
  .l-cards, .l-split { grid-template-columns: 1fr; }
  .l-section { padding: 64px 0; }
}
