/* ==========================================================================
   Cobalt Ledger — Design System
   Geometry follows the mark: 30° hex angles, chamfered bars, metal gradients.
   ========================================================================== */

:root {
  /* Brand metals (from the logo) */
  --orange-hi: #FFB02E;
  --orange: #F57A12;
  --orange-deep: #D9480A;
  --gold-hi: #FFE38A;
  --gold: #E2B04A;
  --gold-deep: #9A6A1E;
  --grad-orange: linear-gradient(135deg, #FFB02E 0%, #F57A12 48%, #D9480A 100%);
  --grad-gold: linear-gradient(135deg, #FFE38A 0%, #E2B04A 42%, #A9761F 100%);
  --grad-brand: linear-gradient(100deg, #F57A12 0%, #F59A20 40%, #E2B04A 70%, #FFE38A 100%);

  --font-display: "Outfit", "Poppins", "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ui: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-xs: 4px; --r-sm: 7px; --r-md: 10px; --r-lg: 16px; --r-xl: 22px;
  --chamfer: 9px;
  --sidebar-w: 256px;
  --topbar-h: 64px;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;

  /* Dark — the vault (default) */
  --bg: #050505;
  --bg-2: #0A0A0A;
  --panel: #101011;
  --panel-2: #161618;
  --panel-3: #1D1D20;
  --line: rgba(255,255,255,.075);
  --line-2: rgba(255,255,255,.13);
  --text: #F5F4F2;
  --text-2: #C9C5BD;
  --muted: #8E8A82;
  --faint: #5E5B56;
  --accent-text: #F5A640;
  --gold-text: #E8BE5E;
  --pos: #3DD68C;
  --pos-bg: rgba(61,214,140,.12);
  --neg: #FF6B5E;
  --neg-bg: rgba(255,107,94,.12);
  --warn: #FFB02E;
  --warn-bg: rgba(255,176,46,.13);
  --info: #8FB3FF;
  --info-bg: rgba(143,179,255,.12);
  --crit: #FF4D6D;
  --crit-bg: rgba(255,77,109,.14);
  --shadow-pop: 0 24px 60px -12px rgba(0,0,0,.7), 0 0 0 1px var(--line-2);
  --glow: 0 0 0 1px rgba(245,122,18,.35), 0 8px 30px -8px rgba(245,122,18,.45);
  --chart-grid: rgba(255,255,255,.06);
  --sidebar-bg: #000;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F4F3F0;
  --bg-2: #EDECE8;
  --panel: #FFFFFF;
  --panel-2: #F8F7F4;
  --panel-3: #EFEEEA;
  --line: rgba(0,0,0,.08);
  --line-2: rgba(0,0,0,.14);
  --text: #0A0A0A;
  --text-2: #33312D;
  --muted: #6B6760;
  --faint: #A19D95;
  --accent-text: #C2530A;
  --gold-text: #8E6412;
  --pos: #0F8A52;
  --pos-bg: rgba(15,138,82,.1);
  --neg: #C8321F;
  --neg-bg: rgba(200,50,31,.09);
  --warn: #B86A00;
  --warn-bg: rgba(255,176,46,.18);
  --info: #2F5FD0;
  --info-bg: rgba(47,95,208,.09);
  --crit: #C0183F;
  --crit-bg: rgba(192,24,63,.09);
  --shadow-pop: 0 24px 60px -16px rgba(20,16,8,.28), 0 0 0 1px var(--line-2);
  --chart-grid: rgba(0,0,0,.06);
  --sidebar-bg: #000;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--font-ui);
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
}
:root { box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
img, svg { max-width: 100%; }
svg[viewBox="0 0 24 24"] { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.org-switch > svg { color: #8E8A82; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(245,122,18,.35); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 999; background: var(--orange); color: #000; padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ==========================================================================
   Shell
   ========================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100%; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  background: var(--sidebar-bg); color: #EDEAE4;
  border-right: 1px solid rgba(255,255,255,.07);
  display: flex; flex-direction: column; z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; text-decoration: none !important; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-word { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.03em; line-height: 1; }
.brand-word .w1 { background: linear-gradient(180deg,#FF9A24,#E0540A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-word .w2 { background: linear-gradient(180deg,#F0C660,#A9761F); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { display: block; font: 500 11px/1 var(--font-ui); color: #7F7B74; margin-top: 5px; letter-spacing: .02em; }

.org-switch {
  margin: 4px 12px 10px; padding: 10px 12px; display: flex; align-items: center; gap: 10px;
  background: #0E0E0F; border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-md);
  cursor: pointer; text-align: left; width: calc(100% - 24px); color: #EDEAE4;
  transition: border-color .15s;
}
.org-switch:hover { border-color: rgba(226,176,74,.45); }
.org-avatar { width: 30px; height: 30px; flex: none; display: grid; place-items: center; font: 600 12px var(--font-display); color: #000; background: var(--grad-gold); clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%); }
.org-meta { min-width: 0; flex: 1; }
.org-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-mode { font-size: 11px; color: #8E8A82; }

.nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-group { margin-top: 14px; }
.nav-label { font-size: 11px; color: #6A665F; padding: 0 10px 6px; font-weight: 500; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: var(--r-sm); color: #B9B5AD; font-weight: 500; font-size: 13.5px;
  text-decoration: none; transition: background .12s, color .12s;
}
.nav a svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a[aria-current="page"] { color: #fff; background: linear-gradient(90deg, rgba(245,122,18,.16), rgba(245,122,18,0) 85%); }
.nav a[aria-current="page"] svg { color: var(--orange-hi); opacity: 1; }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 5px;
  background: var(--grad-orange); clip-path: polygon(0 18%, 100% 0, 100% 82%, 0 100%);
}
.nav .count { margin-left: auto; font-size: 11px; font-weight: 600; min-width: 22px; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.08); color: #D8D4CC; text-align: center; }
.nav .count.hot { background: var(--grad-orange); color: #000; }

.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.user-dot { width: 32px; height: 32px; border-radius: 50%; background: #1A1A1B; display: grid; place-items: center; font: 600 12px var(--font-display); color: var(--gold); border: 1px solid rgba(226,176,74,.35); flex: none; }
.user-chip b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip span { font-size: 11px; color: #8E8A82; }
.local-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #9FD8B8; }
.local-badge i { width: 7px; height: 7px; border-radius: 50%; background: #3DD68C; box-shadow: 0 0 0 3px rgba(61,214,140,.18); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-width: 0; }
.crumbs b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs svg { width: 14px; height: 14px; opacity: .5; flex: none; }
.search-trigger {
  margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 280px;
  padding: 8px 10px 8px 12px; border-radius: var(--r-md); border: 1px solid var(--line-2);
  background: var(--panel); color: var(--muted); cursor: pointer; font-size: 13px;
}
.search-trigger:hover { border-color: var(--gold); }
.search-trigger svg { width: 16px; height: 16px; }
.kbd { margin-left: auto; font: 500 11px var(--font-ui); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); background: var(--panel-2); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.menu-btn { display: none; }

.page { padding: 28px 28px 64px; max-width: 1560px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 30px; line-height: 1.1; font-weight: 600; letter-spacing: -.025em; }
.page-sub { color: var(--muted); margin-top: 6px; font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.data-through { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line-2); }
.data-through svg { width: 13px; height: 13px; color: var(--gold-text); }

/* Mode ribbon — Bank Activity vs Ledger must be visually distinct */
.mode-ribbon { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-md); margin-bottom: 20px; font-size: 13px; line-height: 1.45; }
.mode-ribbon svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.mode-ribbon.bank { background: var(--warn-bg); color: var(--text-2); border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent); }
.mode-ribbon.bank svg { color: var(--warn); }
.mode-ribbon.ledger { background: var(--info-bg); color: var(--text-2); border: 1px solid color-mix(in srgb, var(--info) 40%, transparent); }
.mode-ribbon.ledger svg { color: var(--info); }
.mode-ribbon b { color: var(--text); }

/* ==========================================================================
   Primitives
   ========================================================================== */
.btn {
  --bh: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--bh);
  padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--panel-2);
  color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background .14s, border-color .14s, transform .08s, box-shadow .14s; text-decoration: none !important;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { border-color: var(--gold); background: var(--panel-3); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  border: 0; color: #140800; background: var(--grad-orange); border-radius: 3px;
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
  padding: 0 18px;
}
.btn-primary:hover { background: linear-gradient(135deg,#FFC04F,#FF8A1F 48%,#E5520C); filter: saturate(1.1); }
.btn-gold { border: 0; color: #1A1000; background: var(--grad-gold); border-radius: 3px;
  clip-path: polygon(var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)), calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer)); padding: 0 18px; }
.btn-gold:hover { filter: brightness(1.08); background: var(--grad-gold); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--panel-2); border-color: var(--line); }
.btn-danger { color: var(--neg); }
.btn-danger:hover { border-color: var(--neg); background: var(--neg-bg); }
.btn-sm { --bh: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-xs { --bh: 26px; padding: 0 8px; font-size: 12px; gap: 5px; }
.btn-xs svg { width: 14px; height: 14px; }
.icon-btn { width: 36px; padding: 0; }
.icon-btn.btn-sm { width: 30px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.hint { font-size: 12px; color: var(--muted); }
.input, .select, textarea.input {
  height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); width: 100%; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 90px; line-height: 1.5; }
.input:hover, .select:hover { border-color: color-mix(in srgb, var(--gold) 60%, var(--line-2)); }
.input:focus, .select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245,122,18,.2); }
.select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23E2B04A' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
.select option { background: var(--panel); color: var(--text); }
.input-sm { height: 30px; font-size: 12.5px; padding: 0 9px; }
.select.input-sm { padding-right: 26px; background-position: right 8px center; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 34px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--orange); width: 16px; height: 16px; cursor: pointer; margin: 0; }
input[type="range"] { accent-color: var(--orange); width: 100%; }

.switch { position: relative; display: inline-block; vertical-align: middle; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--panel-3); border: 1px solid var(--line-2); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .18s var(--ease), background .15s; }
.switch input:checked + span { background: var(--grad-orange); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Badges — always icon/text, never color alone */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--panel-3); color: var(--text-2); border: 1px solid var(--line); }
.badge svg { width: 12px; height: 12px; }
.badge.pos { background: var(--pos-bg); color: var(--pos); border-color: transparent; }
.badge.neg { background: var(--neg-bg); color: var(--neg); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge.crit { background: var(--crit-bg); color: var(--crit); border-color: transparent; }
.badge.gold { background: rgba(226,176,74,.14); color: var(--gold-text); border-color: transparent; }
.badge.draft { background: transparent; color: var(--gold-text); border: 1px dashed var(--gold); }
.risk { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.risk i { width: 9px; height: 9px; display: inline-block; clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%); }
.risk.low { color: var(--pos); } .risk.low i { background: var(--pos); }
.risk.medium { color: var(--warn); } .risk.medium i { background: var(--warn); }
.risk.high { color: var(--neg); } .risk.high i { background: var(--neg); }
.risk.critical { color: var(--crit); } .risk.critical i { background: var(--crit); box-shadow: 0 0 0 3px var(--crit-bg); }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--panel-3); color: var(--text-2); }
.pos-t { color: var(--pos); } .neg-t { color: var(--neg); } .muted { color: var(--muted); } .gold-t { color: var(--gold-text); } .accent-t { color: var(--accent-text); }

/* Panels — hierarchy varies: hero panels get the metal edge, others stay quiet */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.panel-title { font-family: var(--font-display); font-size: 15.5px; font-weight: 600; }
.panel-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.panel-body { padding: 16px 18px 18px; }
.panel-body.flush { padding: 12px 0 0; }
.panel.metal { position: relative; overflow: hidden; }
.panel.metal::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--grad-brand); }
.panel.inset { background: var(--panel-2); }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 380px; }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.grow { flex: 1; min-width: 0; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { position: relative; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi-label svg { width: 14px; height: 14px; }
.kpi-value { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -.03em; margin-top: 6px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.kpi .spark { position: absolute; right: 12px; bottom: 12px; width: 90px; height: 32px; opacity: .9; }
.kpi.hero { background: radial-gradient(120% 140% at 100% 0%, rgba(245,122,18,.18), transparent 55%), var(--panel); border-color: rgba(245,122,18,.28); }
.kpi.hero .kpi-value { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 32px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 12px; }
.delta svg { width: 12px; height: 12px; }
.delta.up { color: var(--pos); } .delta.down { color: var(--neg); }

/* Hero band on portfolio/client pages, with faint hex lattice from the mark */
.hero-band {
  position: relative; border-radius: var(--r-xl); padding: 26px 28px; margin-bottom: 18px; overflow: hidden;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(245,122,18,.20), transparent 60%),
    radial-gradient(60% 90% at 0% 100%, rgba(226,176,74,.12), transparent 60%),
    var(--panel);
  border: 1px solid rgba(245,122,18,.22);
}
.hero-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16Z M28 64v33' fill='none' stroke='%23E2B04A' stroke-opacity='.10' stroke-width='1'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%); mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
}
.hero-band > * { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1.5fr); gap: 28px; align-items: center; }
.hero-figure { font-family: var(--font-display); font-size: clamp(38px, 4.4vw, 56px); font-weight: 600; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-figure .cents { font-size: .5em; color: var(--muted); letter-spacing: 0; }
.hero-label { color: var(--text-2); font-size: 13.5px; margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }
.hero-stats { display: flex; gap: 26px; margin-top: 18px; flex-wrap: wrap; }
.hero-stats div b { display: block; font: 600 18px var(--font-display); letter-spacing: -.02em; }
.hero-stats div span { font-size: 12px; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th { position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 9px 12px; background: var(--panel); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text); }
.table th .sort-ind { display: inline-block; margin-left: 4px; color: var(--gold-text); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--panel-2); }
.table tbody tr.selected { background: rgba(245,122,18,.08); }
.table tbody tr.clickable { cursor: pointer; }
.table td:first-child, .table th:first-child { padding-left: 18px; }
.table td:last-child, .table th:last-child { padding-right: 18px; }
.table .desc { max-width: 340px; }
.table .desc b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table .desc span { font-size: 11.5px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table.dense td { padding: 7px 12px; }
.table tfoot td { font-weight: 700; border-top: 1px solid var(--line-2); background: var(--panel-2); }
.inline-select { height: 28px; font-size: 12.5px; padding: 0 26px 0 8px; border-radius: 6px; border: 1px solid transparent; background-color: transparent; background-position: right 7px center; max-width: 180px; }
.inline-select:hover { border-color: var(--line-2); background-color: var(--panel-2); }
.conf { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; }
.conf-bar { width: 40px; height: 5px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.conf-bar i { display: block; height: 100%; background: var(--grad-gold); }
.conf.low .conf-bar i { background: var(--neg); }
.conf.mid .conf-bar i { background: var(--warn); }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); gap: 10px; flex-wrap: wrap; }

/* Filters toolbar */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { font-size: 11px; opacity: .7; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; }
.seg button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 0 var(--line-2), 0 0 0 1px var(--line-2); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { position: relative; height: 40px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--grad-orange); clip-path: polygon(3px 0, 100% 0, calc(100% - 3px) 100%, 0 100%); }

/* Bulk action bar */
.bulkbar {
  position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: calc(50% + var(--sidebar-w) / 2); transform: translateX(-50%); z-index: 60; width: max-content; max-width: calc(100vw - var(--sidebar-w) - 32px);
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 14px;
  background: #000; color: #fff; border: 1px solid rgba(226,176,74,.4); box-shadow: 0 18px 50px -10px rgba(0,0,0,.6);
  animation: rise .22s var(--ease); flex-wrap: wrap;
}
.bulkbar b { font-weight: 600; }
.bulkbar .select, .bulkbar .btn { --bh: 32px; height: 32px; background-color: #151516; color: #fff; border-color: rgba(255,255,255,.14); }
.bulkbar .btn-primary { background: var(--grad-orange); color: #140800; }
@keyframes rise { from { translate: 0 12px; opacity: 0; } to { translate: 0 0; opacity: 1; } }

/* Progress — skewed segments echo the logo bars */
.progress { height: 8px; border-radius: 2px; background: var(--panel-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad-brand); border-radius: 2px; transition: width .4s var(--ease); }
.segbar { display: flex; gap: 3px; height: 10px; }
.segbar i { flex: 1; background: var(--panel-3); transform: skewX(-30deg); border-radius: 1px; }
.segbar i.on { background: var(--grad-orange); }
.segbar i.gold { background: var(--grad-gold); }

/* Stepper */
.stepper { display: flex; gap: 0; margin-bottom: 20px; overflow-x: auto; padding-bottom: 2px; }
.step { flex: 1; min-width: 118px; display: flex; flex-direction: column; gap: 8px; padding-right: 6px; cursor: default; }
.step-bar { height: 5px; background: var(--panel-3); transform: skewX(-30deg); }
.step.done .step-bar { background: var(--grad-gold); }
.step.active .step-bar { background: var(--grad-orange); }
.step-name { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.step-name span { font-size: 11px; color: var(--faint); }
.step.active .step-name, .step.done .step-name { color: var(--text); }
.step.done .step-name svg { color: var(--gold-text); width: 14px; height: 14px; }

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); padding: 36px 20px; text-align: center; cursor: pointer;
  background: repeating-linear-gradient(-60deg, transparent 0 14px, color-mix(in srgb, var(--gold) 4%, transparent) 14px 15px), var(--panel-2);
  transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--orange); background-color: rgba(245,122,18,.05); }
.dropzone .dz-icon { width: 52px; height: 52px; margin: 0 auto 12px; display: grid; place-items: center; color: #140800; background: var(--grad-orange); clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%); }
.dropzone .dz-icon svg { width: 22px; height: 22px; }
.dropzone h3 { font-size: 17px; }
.dropzone p { color: var(--muted); margin-top: 4px; font-size: 13px; }

.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel-2); }
.file-ico { width: 36px; height: 42px; flex: none; border-radius: 4px; display: grid; place-items: end center; padding-bottom: 5px; font: 700 9px var(--font-ui); color: #000; clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%); }
.file-ico.csv { background: var(--grad-gold); } .file-ico.pdf { background: var(--grad-orange); } .file-ico.xlsx { background: linear-gradient(135deg,#9BE3B9,#3DD68C); } .file-ico.ofx { background: linear-gradient(135deg,#C8D7FF,#8FB3FF); }

/* Equation (reconciliation) */
.equation { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; }
.eq-cell { padding: 14px; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line); min-width: 0; }
.eq-cell span { font-size: 12px; color: var(--muted); display: block; }
.eq-cell b { font: 600 20px var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.eq-op { font: 500 22px var(--font-display); color: var(--gold-text); text-align: center; }
.eq-result { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: var(--r-md); flex-wrap: wrap; }
.eq-result.ok { background: var(--pos-bg); border: 1px solid color-mix(in srgb, var(--pos) 40%, transparent); }
.eq-result.bad { background: var(--neg-bg); border: 1px solid color-mix(in srgb, var(--neg) 40%, transparent); }
.eq-result b { font: 600 22px var(--font-display); }

/* Checklist (close) */
.checklist { list-style: none; margin: 0; padding: 0; }
.check-item { display: grid; grid-template-columns: 28px minmax(0,1fr) 130px 110px 100px 36px; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.check-item:last-child { border-bottom: 0; }
.check-box { width: 22px; height: 22px; border-radius: 5px; border: 1.5px solid var(--line-2); display: grid; place-items: center; background: transparent; cursor: pointer; color: transparent; padding: 0; }
.check-box svg { width: 14px; height: 14px; }
.check-item.done .check-box { background: var(--grad-gold); border-color: transparent; color: #000; }
.check-item.done .ci-name { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.check-item.blocked { opacity: .65; }
.ci-name { font-weight: 600; font-size: 13.5px; }
.ci-sub { font-size: 12px; color: var(--muted); }

/* Drawer / modal / palette */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); z-index: 80; animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 90; background: var(--panel);
  border-left: 1px solid var(--line-2); display: flex; flex-direction: column; animation: slidein .26s var(--ease);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.drawer.wide { width: min(880px, 100vw); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal { position: fixed; z-index: 90; left: 50%; top: 12vh; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); animation: pop .2s var(--ease); max-height: 80vh; display: flex; flex-direction: column; }
@keyframes pop { from { transform: translateX(-50%) scale(.97); opacity: 0; } }
.modal .drawer-body { padding: 20px; }

.palette { position: fixed; z-index: 95; left: 50%; top: 12vh; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden; animation: pop .16s var(--ease); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.palette-input svg { width: 18px; height: 18px; color: var(--gold-text); }
.palette-input input { flex: 1; height: 56px; border: 0; background: transparent; font-size: 16px; outline: none; }
.palette-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.palette-sec { font-size: 11.5px; color: var(--muted); padding: 10px 10px 4px; font-weight: 600; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.palette-item svg { width: 16px; height: 16px; color: var(--muted); }
.palette-item .pi-meta { margin-left: auto; font-size: 12px; color: var(--muted); }
.palette-item[aria-selected="true"] { background: rgba(245,122,18,.12); }
.palette-item[aria-selected="true"] svg { color: var(--orange); }

.toasts { position: fixed; z-index: 100; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; border-radius: 12px; background: #000; color: #fff; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 16px 40px -10px rgba(0,0,0,.6); font-size: 13px; animation: rise .22s var(--ease); max-width: 420px; }
.toast svg { width: 17px; height: 17px; color: var(--orange-hi); flex: none; }
.toast .btn { --bh: 26px; height: 26px; padding: 0 9px; font-size: 12px; background: #1A1A1B; border-color: rgba(255,255,255,.15); color: #fff; }

/* Copilot */
.copilot-msg { padding: 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13.5px; line-height: 1.55; }
.copilot-msg.user { background: transparent; border-style: dashed; margin-left: 40px; }
.copilot-msg + .copilot-msg { margin-top: 12px; }
.copilot-msg .cite { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; margin: 0 2px; border-radius: 4px; font-size: 11px; font-weight: 700; background: rgba(226,176,74,.16); color: var(--gold-text); cursor: pointer; border: 0; }
.copilot-msg ul { margin: 8px 0 0; padding-left: 18px; }
.copilot-msg li { margin: 3px 0; }
.suggests { display: flex; flex-wrap: wrap; gap: 6px; }

/* Evidence viewer */
.evidence { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 18px; }
.paper { background: #FBFAF7; color: #1B1A18; border-radius: 6px; padding: 22px 22px 30px; font: 11px/1.6 "Courier New", ui-monospace, monospace; box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 20px 40px -20px rgba(0,0,0,.5); position: relative; overflow: hidden; }
.paper .ph { font: 700 13px var(--font-ui); margin-bottom: 2px; }
.paper .pl { display: grid; grid-template-columns: 50px 1fr 76px 80px; gap: 6px; padding: 1px 4px; }
.paper .pl.hl { background: rgba(245,122,18,.2); outline: 2px solid #F57A12; outline-offset: 1px; border-radius: 2px; }
.paper .pr { color: #8a857b; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* Timeline (audit) */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 25px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.tl-item { position: relative; display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; padding: 10px 18px 10px 0; }
.tl-dot { width: 22px; height: 22px; margin-left: 15px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line-2); clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%); color: var(--gold-text); z-index: 1; }
.tl-dot svg { width: 11px; height: 11px; }
.tl-item b { font-weight: 600; }
.tl-item .tl-meta { font-size: 12px; color: var(--muted); }
.hash { font: 500 11px ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); }

/* Gauge / score */
.score-ring { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring .sr-val { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.score-ring .sr-val b { display: block; font: 600 48px/1 var(--font-display); letter-spacing: -.04em; }
.score-ring .sr-val span { font-size: 12px; color: var(--muted); }
.dim-row { display: grid; grid-template-columns: minmax(0,1fr) 120px 54px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.dim-row:last-child { border-bottom: 0; }

/* Charts */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { fill: var(--muted); font: 500 11px var(--font-ui); }
.chart .grid-l { stroke: var(--chart-grid); }
.chart .axis-zero { stroke: var(--line-2); }
.chart-tip { position: fixed; z-index: 120; pointer-events: none; padding: 8px 10px; border-radius: 8px; background: #000; color: #fff; font-size: 12px; border: 1px solid rgba(226,176,74,.35); box-shadow: 0 10px 30px -10px rgba(0,0,0,.6); white-space: nowrap; }
.chart-tip b { font-weight: 700; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 4px; border-radius: 2px; display: inline-block; }
.legend i.dash { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; }
.chart-table-toggle { font-size: 12px; }

.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; font-size: 13px; }
.bar-item .bt { height: 6px; grid-column: 1 / -1; background: var(--panel-3); border-radius: 3px; overflow: hidden; }
.bar-item .bt i { display: block; height: 100%; border-radius: 3px; background: var(--grad-orange); }
.bar-item.gold .bt i { background: var(--grad-gold); }

/* Client cards */
.client-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s; text-align: left; color: var(--text); width: 100%; }
.client-card:hover { border-color: rgba(245,122,18,.45); }
.client-card:focus-visible { outline-offset: 3px; }
.client-top { display: flex; gap: 12px; align-items: center; }
.client-top .org-avatar { width: 40px; height: 40px; font-size: 14px; }

/* Documents */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.doc-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); overflow: hidden; cursor: pointer; text-align: left; padding: 0; color: var(--text); }
.doc-card:hover { border-color: var(--gold); }
.doc-thumb { height: 120px; background: var(--panel-2); display: grid; place-items: center; border-bottom: 1px solid var(--line); position: relative; }
.doc-thumb .mini-paper { width: 70px; height: 92px; background: #FBFAF7; border-radius: 2px; padding: 8px 7px; display: flex; flex-direction: column; gap: 4px; box-shadow: 0 8px 20px -8px rgba(0,0,0,.5); }
.doc-thumb .mini-paper i { height: 3px; background: #D9D5CC; border-radius: 2px; }
.doc-thumb .mini-paper i:first-child { background: #F57A12; width: 60%; }
.doc-meta { padding: 10px 12px; }
.doc-meta b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-meta span { font-size: 11.5px; color: var(--muted); }

/* Rule builder */
.rule-cond { display: grid; grid-template-columns: 150px 140px 1fr 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.code-pill { font: 500 12px ui-monospace, Menlo, monospace; padding: 2px 6px; border-radius: 4px; background: var(--panel-3); color: var(--gold-text); }

/* Empty state */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .e-ico { width: 56px; height: 56px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--panel-3); color: var(--gold-text); clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%); }
.empty .e-ico svg { width: 22px; height: 22px; }
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 4px; }

/* Unlock / login */
.unlock { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); background: #000; color: #fff; }
.unlock-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; border-right: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(70% 60% at 30% 35%, rgba(245,122,18,.28), transparent 70%), radial-gradient(50% 50% at 80% 90%, rgba(226,176,74,.16), transparent 70%), #000; }
.unlock-art::after { content: ""; position: absolute; inset: 0; opacity: .7; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16Z M28 64v33' fill='none' stroke='%23E2B04A' stroke-opacity='.09' stroke-width='1'/%3E%3C/svg%3E"); }
.unlock-art > * { position: relative; z-index: 1; }
.unlock-mark { width: min(340px, 60%); filter: drop-shadow(0 30px 60px rgba(245,122,18,.35)); animation: markin 1.1s var(--ease) both; }
@keyframes markin { from { opacity: 0; transform: translateY(14px) scale(.97); filter: drop-shadow(0 0 0 rgba(245,122,18,0)); } }
.unlock-headline { font: 600 clamp(32px, 3.6vw, 48px)/1.05 var(--font-display); letter-spacing: -.035em; max-width: 14ch; }
.unlock-copy { color: #B9B5AD; max-width: 46ch; margin-top: 14px; font-size: 15px; line-height: 1.6; }
.unlock-facts { display: flex; gap: 28px; margin-top: 28px; flex-wrap: wrap; }
.unlock-facts div b { display: block; font: 600 22px var(--font-display); background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.unlock-facts div span { font-size: 12.5px; color: #8E8A82; }
.unlock-form { display: flex; align-items: center; justify-content: center; padding: 44px 32px; background: #070707; }
.unlock-card { width: 100%; max-width: 380px; }
.unlock-card h1 { font-size: 26px; letter-spacing: -.02em; }
.unlock-card .input { background: #111112; border-color: rgba(255,255,255,.14); color: #fff; height: 46px; }
.unlock-card .btn-primary { height: 46px; width: 100%; font-size: 14px; }
.unlock-card .hint, .unlock-card .field > label { color: #9E9A92; }

/* Misc */
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md); background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.callout svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--gold-text); }
.callout.warn { background: var(--warn-bg); border-color: transparent; } .callout.warn svg { color: var(--warn); }
.callout.bad { background: var(--neg-bg); border-color: transparent; } .callout.bad svg { color: var(--neg); }
.callout.good { background: var(--pos-bg); border-color: transparent; } .callout.good svg { color: var(--pos); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.list-row:last-child { border-bottom: 0; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-main b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .lr-main span { font-size: 12px; color: var(--muted); }
.ico-hex { width: 30px; height: 30px; flex: none; display: grid; place-items: center; background: var(--panel-3); color: var(--gold-text); clip-path: polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%); }
.ico-hex svg { width: 14px; height: 14px; }
.ico-hex.o { background: rgba(245,122,18,.15); color: var(--orange-hi); }
.ico-hex.r { background: var(--neg-bg); color: var(--neg); }
.ico-hex.g { background: var(--pos-bg); color: var(--pos); }
.report-preview { background: #fff; color: #111; border-radius: 8px; padding: 36px 40px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); font-size: 12.5px; line-height: 1.55; }
.report-preview h2 { font-size: 22px; color: #000; }
.report-preview table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.report-preview td, .report-preview th { padding: 6px 4px; border-bottom: 1px solid #E6E3DC; text-align: left; }
.report-preview th { color: #6b665c; font-weight: 600; }
.report-preview .rp-disc { margin-top: 18px; padding: 10px 12px; background: #FFF6E8; border-left: 3px solid #F57A12; font-size: 11.5px; color: #4a3a22; }
.report-preview .rp-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #000; padding-bottom: 14px; margin-bottom: 16px; gap: 16px; }
.report-preview .rp-logo { height: 34px; }
.heat { display: grid; grid-template-columns: repeat(13, minmax(0,1fr)); gap: 3px; }
.heat i { aspect-ratio: 1; border-radius: 3px; background: var(--panel-3); }

/* Responsive */
@media (max-width: 1280px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-side { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .g-main, .g-3 { grid-template-columns: 1fr; }
  .evidence { grid-template-columns: 1fr; }
  .equation { grid-template-columns: 1fr; }
  .eq-op { transform: rotate(90deg); }
  .check-item { grid-template-columns: 28px minmax(0,1fr) 100px 36px; }
  .check-item .ci-owner, .check-item .ci-due { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .app.nav-open .sidebar { transform: none; box-shadow: 30px 0 60px rgba(0,0,0,.6); }
  .menu-btn { display: inline-flex; }
  .bulkbar { left: 50%; max-width: calc(100vw - 20px); }
  .search-trigger { min-width: 0; }
  .search-trigger .st-text, .search-trigger .kbd { display: none; }
  .topbar { padding: 0 14px; }
  .page { padding: 20px 14px 80px; }
  .page-title { font-size: 24px; }
  .g-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .unlock { grid-template-columns: 1fr; }
  .unlock-art { min-height: 46vh; padding: 28px; }
  .rule-cond { grid-template-columns: 1fr 1fr; }
  .crumbs .crumb-org, .crumbs .crumb-org + svg { display: none; }
  #copilot-btn span { display: none; }
}
@media (max-width: 560px) {
  .g-4 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 22px; }
  .hero-band { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .sidebar, .topbar, .page-actions, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  body { background: #fff; color: #000; }
}
.table .desc b span.tag, .table .desc b .badge { display: inline-flex; height: 18px; font-size: 10.5px; margin-left: 4px; vertical-align: 1px; padding: 0 6px; }
.table .desc b .badge svg { width: 11px; height: 11px; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
#main:focus, #main:focus-visible { outline: none; }
ol.stepper { list-style: none; padding: 0; margin: 0 0 20px; }
.g-side > aside, .g-side > .panel:last-child { align-self: start; }
.dropzone { display: block; }
.panel > .table-wrap:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.panel > .table-wrap:only-child { border-radius: var(--r-lg); }
