/* Enterprise AI Suite — design system (no build step).
   Direction: calm, light enterprise SaaS. Neutral slate surfaces, one indigo accent, a colour per product,
   Inter type, hairline borders with soft layered shadows, sidebar workspaces, drawers for detail. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e6e8ec;
  --border-strong: #d4d8de;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-ink: #3730a3;

  --ok: #047857;   --ok-soft: #ecfdf5;   --ok-line: #a7f3d0;
  --warn: #b45309; --warn-soft: #fffbeb; --warn-line: #fde68a;
  --bad: #b91c1c;  --bad-soft: #fef2f2;  --bad-line: #fecaca;
  --info: #475569; --info-soft: #f1f5f9; --info-line: #e2e8f0;

  --p-rfp: #4f46e5;        --p-rfp-soft: #eef2ff;
  --p-knowledge: #0d9488;  --p-knowledge-soft: #f0fdfa;
  --p-compliance: #7c3aed; --p-compliance-soft: #f5f3ff;
  --p-recon: #0284c7;      --p-recon-soft: #f0f9ff;
  --p-value: #059669;      --p-value-soft: #ecfdf5;

  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 20px;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .04);
  --sh-2: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --sh-3: 0 10px 30px -8px rgba(15, 23, 42, .14), 0 4px 10px -4px rgba(15, 23, 42, .06);
  --sh-4: 0 24px 60px -12px rgba(15, 23, 42, .28);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --top: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.012em; color: var(--text); }
h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.022em; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: .98rem; font-weight: 650; }
h4 { font-size: .9rem; font-weight: 650; }
p { margin: 0 0 .75em; }
code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
mark { background: #fef08a; color: inherit; border-radius: 3px; padding: 0 2px; }
.ic { flex: none; display: inline-block; vertical-align: middle; }
::selection { background: #c7d2fe; }

/* ---------------------------------------------------------------- top bar */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top); background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 24px; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; white-space: nowrap; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 45%, #7c3aed 100%); box-shadow: 0 4px 12px -4px rgba(79, 70, 229, .55), inset 0 1px 0 rgba(255,255,255,.25); }
.nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); padding: 7px 12px; border-radius: 8px; font-weight: 550; white-space: nowrap; font-size: 13.5px; transition: background .15s, color .15s; }
.nav a:hover { color: var(--text); background: var(--surface-3); }
.nav a.active { color: var(--text); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); }
.nav a .label-short { display: none; }
.nav a .dot { width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--accent)); opacity: .9; }
.nav a:not(.active) .dot { opacity: .45; }
.top-right { display: flex; align-items: center; gap: 10px; }
.value-link { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px dashed var(--border-strong);
  color: var(--muted); font-weight: 550; font-size: 13px; white-space: nowrap; }
.value-link:hover, .value-link.active { color: var(--p-value); border-color: var(--p-value); border-style: solid; background: var(--p-value-soft); }
.avatar-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  padding: 3px 8px 3px 3px; cursor: pointer; color: var(--text-2); font: inherit; font-size: 13px; }
.avatar-btn:hover { border-color: var(--border-strong); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: #fff;
  background: linear-gradient(135deg, #64748b, #334155); text-transform: uppercase; }

/* dropdown menus */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--sh-3); padding: 6px; z-index: 40; display: none; animation: pop .14s var(--ease); }
.menu.open { display: block; }
.menu .menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu .menu-head b { display: block; font-size: 13.5px; }
.menu .menu-head span { color: var(--muted); font-size: 12px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 8px;
  font: inherit; font-size: 13.5px; color: var(--text-2); cursor: pointer; text-align: left; }
.menu button:hover, .menu a:hover { background: var(--surface-3); color: var(--text); }
.menu button.danger { color: var(--bad); }
.menu button.danger:hover { background: var(--bad-soft); color: var(--bad); }
.menu .sep { height: 1px; background: var(--border); margin: 4px 0; }
.menu .menu-note { padding: 6px 10px 4px; font-size: 11.5px; color: var(--faint); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- app shell (product workspace) */
.app { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: calc(100vh - var(--top)); }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 14px 24px; position: sticky; top: var(--top);
  height: calc(100vh - var(--top)); overflow-y: auto; }
.main { min-width: 0; padding: 26px 32px 56px; }
.main-inner { max-width: 1180px; margin: 0 auto; }
.product-id { display: flex; align-items: center; gap: 11px; padding: 2px 6px 16px; }
.p-tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--pc); background: var(--pcs);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc) 18%, transparent); flex: none; }
.p-tile.lg { width: 48px; height: 48px; border-radius: 13px; }
.product-id b { display: block; font-size: 14.5px; letter-spacing: -.01em; }
.product-id span { display: block; font-size: 12px; color: var(--muted); }
.side .btn.block { width: 100%; justify-content: center; margin-bottom: 16px; }
.side-label { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 14px 8px 6px; display: flex; justify-content: space-between; align-items: center; }
.side-nav { display: grid; gap: 1px; }
.side-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 0; background: none;
  font: inherit; font-size: 13.5px; color: var(--text-2); cursor: pointer; text-align: left; transition: background .12s; }
.side-item:hover { background: var(--surface-3); color: var(--text); }
.side-item.active { background: var(--pcs, var(--accent-soft)); color: var(--pc, var(--accent-ink)); font-weight: 600; }
.side-item .ic { color: var(--faint); }
.side-item.active .ic { color: currentColor; }
.side-item .count { margin-left: auto; font-size: 11.5px; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 0 7px; font-weight: 600; }
.side-item.active .count { background: rgba(255,255,255,.7); }
.side-item.rich { align-items: flex-start; flex-direction: column; gap: 2px; padding: 9px 10px; }
.side-item.rich .t { font-weight: 560; line-height: 1.35; }
.side-item.rich .s { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; font-weight: 450; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); display: inline-block; flex: none; }
.status-dot.ok { background: #10b981; } .status-dot.warn { background: #f59e0b; } .status-dot.bad { background: #ef4444; } .status-dot.brand { background: var(--accent); }

body.p-rfp { --pc: var(--p-rfp); --pcs: var(--p-rfp-soft); }
body.p-knowledge { --pc: var(--p-knowledge); --pcs: var(--p-knowledge-soft); }
body.p-compliance { --pc: var(--p-compliance); --pcs: var(--p-compliance-soft); }
body.p-recon { --pc: var(--p-recon); --pcs: var(--p-recon-soft); }
body.p-value { --pc: var(--p-value); --pcs: var(--p-value-soft); }
.pc-rfp { --pc: var(--p-rfp); --pcs: var(--p-rfp-soft); }
.pc-knowledge { --pc: var(--p-knowledge); --pcs: var(--p-knowledge-soft); }
.pc-compliance { --pc: var(--p-compliance); --pcs: var(--p-compliance-soft); }
.pc-recon { --pc: var(--p-recon); --pcs: var(--p-recon-soft); }
.pc-value { --pc: var(--p-value); --pcs: var(--p-value-soft); }

/* page header inside a workspace */
.ws-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ws-head h1 { margin: 0 0 6px; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.ws-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* sub navigation (underline) */
.subnav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 22px; overflow-x: auto; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav button { position: relative; border: 0; background: none; padding: 10px 12px 12px; font: inherit; font-size: 13.5px; font-weight: 560; color: var(--muted);
  cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.subnav button:hover { color: var(--text); }
.subnav button.active { color: var(--text); }
.subnav button.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--pc, var(--accent)); }
.subnav .count { font-size: 11.5px; background: var(--surface-3); color: var(--muted); border-radius: 999px; padding: 0 7px; font-weight: 600; }

/* ---------------------------------------------------------------- cards & layout primitives */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.soft { background: var(--surface-2); box-shadow: none; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card-title { display: flex; align-items: center; gap: 9px; }
.card-title .ic { color: var(--faint); }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 650; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

/* KPI tiles */
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--sh-1); min-width: 0; }
.kpi .k { color: var(--muted); font-size: 12.5px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 1.75rem; font-weight: 700; letter-spacing: -.025em; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi .d { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi .v.ok { color: var(--ok); } .kpi .v.warn { color: var(--warn); } .kpi .v.bad { color: var(--bad); }
.meter { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: var(--pc, var(--accent)); transition: width .6s var(--ease); }

/* stacked status bar */
.sbar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-3); gap: 2px; }
.sbar i { display: block; height: 100%; }
.sbar .ok { background: #10b981; } .sbar .warn { background: #f59e0b; } .sbar .bad { background: #ef4444; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ring (score) */
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring .lbl b { font-size: 1.9rem; letter-spacing: -.03em; display: block; line-height: 1; }
.ring .lbl span { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------------------------------------- buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); padding: 7px 13px; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 560; cursor: pointer; white-space: nowrap;
  box-shadow: var(--sh-1); transition: background .12s, border-color .12s, box-shadow .12s, transform .06s; line-height: 1.4; }
.btn:hover { background: var(--surface-2); border-color: #c4c9d1; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.3), inset 0 1px 0 rgba(255,255,255,.14); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.ghost { border-color: transparent; background: none; box-shadow: none; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-3); }
.btn.lg { padding: 10px 18px; font-size: 14.5px; border-radius: 11px; }
.btn.sm { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.icon { padding: 7px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { background: #991b1b; border-color: #991b1b; color: #fff; }
.btn.ghost.danger-text { color: var(--bad); }
.btn.ghost.danger-text:hover { background: var(--bad-soft); color: var(--bad); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: 9px; padding: 8px 11px; font: inherit; font-size: 13.5px; background: #fff; color: var(--text);
  transition: border-color .12s, box-shadow .12s; }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, .16); }
label, .label { font-weight: 560; font-size: 12.5px; display: block; margin-bottom: 5px; color: var(--text-2); }
.field + .field { margin-top: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.search { position: relative; }
.search .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 32px; }

/* segmented filter chips */
.chips { display: inline-flex; gap: 2px; background: var(--surface-3); border: 1px solid var(--border); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.chips button { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 560; color: var(--muted); padding: 5px 11px; border-radius: 7px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chips button:hover { color: var(--text); }
.chips button.active { background: var(--surface); color: var(--text); box-shadow: var(--sh-2); }
.chips .n { font-size: 11px; color: var(--faint); font-weight: 600; }

/* file drop */
.drop { border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 22px; text-align: center; background: var(--surface-2); cursor: pointer; transition: border-color .12s, background .12s; display: block; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { display: none; }
.drop .ic { color: var(--accent); margin-bottom: 6px; }
.drop b { display: block; font-size: 13.5px; }
.drop span { font-size: 12px; color: var(--muted); }
.drop.has-file b { color: var(--accent-ink); }

/* ---------------------------------------------------------------- badges & pills */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; line-height: 1.6; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.b-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.b-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.b-bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.b-info { background: var(--info-soft); color: var(--info); border-color: var(--info-line); }
.b-brand { background: var(--accent-soft); color: var(--accent-ink); border-color: #c7d2fe; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 560; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.tag.lock { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.ai-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 560; color: var(--muted); padding: 2px 9px 2px 7px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(99,102,241,.08), rgba(124,58,237,.08)); border: 1px solid rgba(99,102,241,.18); white-space: nowrap; }
.ai-pill .ic { color: #6366f1; }

/* ---------------------------------------------------------------- tables & lists */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; transition: background .1s; }
tbody tr.click:hover td { background: #fafbff; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td .t { font-weight: 560; color: var(--text); }
td .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
tr.done td { opacity: .5; }
.id { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace; font-size: 12px; color: var(--muted); white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background .1s; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: #fafbff; }
.list-item .main-col { min-width: 0; flex: 1; }
.list-item .t { font-weight: 560; }
.list-item .s { font-size: 12.5px; color: var(--muted); }
.doc-ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }

/* ---------------------------------------------------------------- empty, notices, skeleton */
.empty { text-align: center; color: var(--muted); padding: 44px 16px; }
.empty .ic { color: var(--faint); margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.start { text-align: center; padding: 56px 24px; background: radial-gradient(ellipse at top, var(--pcs, var(--accent-soft)), transparent 70%), var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sh-1); }
.start .p-tile { margin: 0 auto 16px; }
.start h2 { font-size: 1.35rem; letter-spacing: -.02em; }
.start p { color: var(--muted); max-width: 540px; margin: 0 auto 20px; }
.start .facts { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.callout { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 10px 12px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.callout .ic { color: var(--muted); margin-top: 2px; }
.callout.warn { background: var(--warn-soft); border-color: var(--warn-line); color: #78350f; }
.callout.warn .ic { color: var(--warn); }
.error-box { border-radius: 10px; padding: 10px 12px; background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad-line); font-size: 13px; }
.skel { background: linear-gradient(90deg, var(--surface-3) 25%, #e9edf2 37%, var(--surface-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* AI progress panel (long-running AI work) */
.progress-card { max-width: 560px; margin: 24px auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sh-3); padding: 26px 28px; position: relative; overflow: hidden; }
.progress-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--pc, var(--accent)), #a78bfa, transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: sweep 1.6s ease-in-out infinite; }
@keyframes sweep { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.progress-card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.progress-card h3 .ic { color: var(--pc, var(--accent)); }
.progress-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.stages { display: grid; gap: 4px; }
.stage { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; color: var(--faint); font-size: 13.5px; transition: background .2s, color .2s; }
.stage .si { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--border-strong); flex: none; color: #fff; }
.stage.run { color: var(--text); background: var(--surface-2); font-weight: 560; }
.stage.run .si { border-color: var(--pc, var(--accent)); color: var(--pc, var(--accent)); }
.stage.done { color: var(--text-2); }
.stage.done .si { background: #10b981; border-color: #10b981; }
.stage .el { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 450; }
.progress-foot { margin-top: 16px; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }

/* ---------------------------------------------------------------- sources & citations */
.src-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: var(--surface); border-radius: 7px; padding: 2px 8px;
  font-size: 12px; margin: 3px 5px 3px 0; cursor: pointer; color: var(--text-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-family: inherit; }
.src-chip .ic { color: var(--faint); }
.src-chip:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.cite { display: inline-grid; place-items: center; min-width: 17px; height: 17px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 5px;
  font-size: 10.5px; font-weight: 700; padding: 0 4px; cursor: pointer; margin: 0 1px; vertical-align: 2px; border: 1px solid #c7d2fe; }
.cite:hover { background: var(--accent); color: #fff; }
.source-card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  cursor: pointer; text-align: left; font: inherit; width: 100%; transition: border-color .12s, box-shadow .12s; }
.source-card:hover { border-color: #c7d2fe; box-shadow: var(--sh-2); }
.source-card .n { min-width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.source-card .t { font-weight: 560; font-size: 13px; }
.source-card .s { font-size: 12px; color: var(--muted); }
.quote { border-left: 3px solid var(--pc, var(--accent)); background: var(--surface-2); padding: 10px 14px; border-radius: 0 10px 10px 0; color: var(--text-2); font-size: 13.5px; white-space: pre-wrap; }

/* ---------------------------------------------------------------- markdown & document views */
.md p { margin: 0 0 .7em; }
.md ul, .md ol { margin: 0 0 .7em; padding-left: 1.35em; }
.md li { margin: 3px 0; }
.md h3, .md h4 { margin: 1em 0 .4em; }
.doc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); padding: 40px 48px; }
.doc h1 { font-size: 1.55rem; }
.doc h2 { font-size: 1.12rem; margin-top: 1.8em; padding-top: 1.2em; border-top: 1px solid var(--border); }
.doc h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.2em; }
.doc .md { color: var(--text-2); font-size: 14.5px; line-height: 1.7; }
.doc .sec-sources { margin-top: 6px; }
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.toc { position: sticky; top: calc(var(--top) + 20px); display: grid; gap: 1px; }
.toc .side-label { padding-left: 10px; }
.toc a { font-size: 13px; color: var(--muted); padding: 5px 10px; border-radius: 7px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); background: var(--surface-3); }
.pre { white-space: pre-wrap; font-family: inherit; background: var(--surface-2); padding: 14px 16px; border-radius: 10px; font-size: 13.5px; line-height: 1.65; margin: 0; color: var(--text-2); border: 1px solid var(--border); }

/* ---------------------------------------------------------------- drawer, modal, toast */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .32); z-index: 50; animation: fade .16s ease; backdrop-filter: blur(2px); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100vw); background: var(--surface); z-index: 51; box-shadow: var(--sh-4);
  display: flex; flex-direction: column; animation: slidein .22s var(--ease); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head .ttl { flex: 1; min-width: 0; }
.drawer-head h2 { margin: 0; font-size: 1.05rem; }
.drawer-head .crumb { margin-bottom: 4px; }
.drawer-body { padding: 18px 22px 28px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); }
.dl { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; font-size: 13px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; color: var(--text); word-break: break-word; }
.section-title { font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin: 22px 0 8px; }
.section-title:first-child { margin-top: 0; }
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); display: grid; place-items: center; z-index: 60; padding: 20px; animation: fade .15s ease; backdrop-filter: blur(2px); }
.modal { background: var(--surface); border-radius: 16px; max-width: 520px; width: 100%; max-height: 86vh; overflow-y: auto; box-shadow: var(--sh-4); animation: pop .18s var(--ease); }
.modal.wide { max-width: 760px; }
.modal-head { padding: 20px 22px 0; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.toast-wrap { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 70; }
.toast { display: flex; gap: 10px; align-items: center; background: #0f172a; color: #fff; padding: 11px 14px; border-radius: 11px; box-shadow: var(--sh-3); max-width: 400px; font-size: 13.5px; animation: pop .18s var(--ease); }
.toast .ic { color: #34d399; }
.toast.err { background: #7f1d1d; }
.toast.err .ic { color: #fecaca; }

/* ---------------------------------------------------------------- chat (Knowledge Assistant) */
.chat-shell { display: flex; flex-direction: column; min-height: calc(100vh - var(--top) - 82px); max-width: 860px; margin: 0 auto; }
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 22px; padding-bottom: 18px; }
.msg-user { align-self: flex-end; background: var(--text); color: #fff; padding: 10px 15px; border-radius: 16px 16px 4px 16px; max-width: 80%; font-size: 14px; }
.msg-bot { display: flex; gap: 12px; align-items: flex-start; }
.msg-bot .avatar-ai { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--pcs); color: var(--pc); flex: none; }
.msg-bot .bubble { flex: 1; min-width: 0; }
.msg-bot .bubble .md { font-size: 14.5px; line-height: 1.7; color: var(--text-2); }
.msg-bot .srcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 12px; }
.msg-bot .foot { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.not-found { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; color: var(--text-2); }
.composer-wrap { position: sticky; bottom: 0; padding: 12px 0 18px; background: linear-gradient(to top, var(--bg) 70%, rgba(246,247,249,0)); }
.composer { display: flex; gap: 8px; align-items: flex-end; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; padding: 8px 8px 8px 16px; box-shadow: var(--sh-3); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.14), var(--sh-3); }
.composer textarea { border: 0; padding: 7px 0; min-height: 24px; max-height: 160px; resize: none; box-shadow: none !important; font-size: 14.5px; background: transparent; }
.composer .btn { border-radius: 11px; }
.composer-note { text-align: center; font-size: 11.5px; color: var(--faint); margin-top: 8px; }
.welcome { text-align: center; padding: 48px 0 24px; }
.welcome .p-tile { margin: 0 auto 16px; }
.welcome h1 { font-size: 1.75rem; }
.welcome p { color: var(--muted); max-width: 520px; margin: 0 auto; }
.prompts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 28px; text-align: left; }
.prompt { border: 1px solid var(--border); background: var(--surface); border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--text-2); text-align: left;
  display: flex; gap: 10px; align-items: flex-start; transition: border-color .12s, box-shadow .12s, transform .12s; }
.prompt:hover { border-color: color-mix(in srgb, var(--pc) 40%, white); box-shadow: var(--sh-2); transform: translateY(-1px); }
.prompt .ic { color: var(--pc); margin-top: 2px; }
.prompt b { display: block; font-size: 13px; color: var(--text); font-weight: 600; }
.prompt span { font-size: 12.5px; color: var(--muted); }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

/* ---------------------------------------------------------------- timeline (key dates) */
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 14px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0; width: 2px; background: var(--border); }
.tl:last-child::before { display: none; }
.tl .d { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--surface); background: var(--border-strong); box-shadow: 0 0 0 1px var(--border-strong); margin-top: 3px; }
.tl.key .d { background: var(--pc, var(--accent)); box-shadow: 0 0 0 1px var(--pc, var(--accent)); }
.tl .w { font-weight: 600; font-size: 13px; }
.tl .e { font-size: 12.5px; color: var(--muted); }

/* bars (category breakdown) */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) 90px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row .track { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; background: var(--pc, var(--accent)); border-radius: 999px; }
.bar-row .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ---------------------------------------------------------------- landing */
.landing { max-width: 1160px; margin: 0 auto; padding: 56px 24px 72px; }
.hero { text-align: center; max-width: 780px; margin: 0 auto 48px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid #c7d2fe; padding: 4px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 16px; }
.hero h1 .grad { background: linear-gradient(90deg, #4f46e5, #7c3aed 55%, #0d9488); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 16.5px; color: var(--muted); max-width: 640px; margin: 0 auto; line-height: 1.6; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.product-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 26px; box-shadow: var(--sh-1);
  display: flex; flex-direction: column; color: inherit; transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s; overflow: hidden; }
.product-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; background: radial-gradient(ellipse at 20% 0%, var(--pcs), transparent 70%); pointer-events: none; }
.product-card > * { position: relative; z-index: 1; }
.product-card:hover { box-shadow: var(--sh-3); transform: translateY(-2px); border-color: color-mix(in srgb, var(--pc) 30%, var(--border)); color: inherit; }
.product-card h2 { font-size: 1.2rem; margin: 16px 0 6px; }
.product-card .lead { color: var(--muted); margin-bottom: 16px; }
.product-card ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; }
.product-card li { display: flex; gap: 9px; font-size: 13.5px; color: var(--text-2); }
.product-card li .ic { color: var(--pc); margin-top: 2px; }
.product-card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--pc); font-size: 13.5px; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 48px; }
.how > div { display: flex; gap: 12px; align-items: flex-start; }
.how .num { width: 28px; height: 28px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; color: var(--muted); flex: none; box-shadow: var(--sh-1); }
.how b { display: block; font-size: 14px; }
.how span { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- value (pitch deck) */
.deck { max-width: 1160px; margin: 0 auto; padding: 40px 24px 80px; }
.deck-nav { position: sticky; top: calc(var(--top) + 10px); z-index: 10; display: flex; justify-content: center; margin: 0 0 30px; }
.deck-nav .chips { background: rgba(255,255,255,.9); backdrop-filter: blur(8px); box-shadow: var(--sh-2); }
.slide { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--sh-2); padding: 40px; margin-bottom: 28px; scroll-margin-top: calc(var(--top) + 70px); position: relative; overflow: hidden; }
.slide::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--pc), color-mix(in srgb, var(--pc) 30%, white)); }
.slide-head { display: flex; gap: 16px; align-items: center; margin-bottom: 26px; }
.slide-head .k { font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--pc); }
.slide-head h2 { font-size: 1.6rem; margin: 2px 0 0; letter-spacing: -.025em; }
.slide-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 36px; }
.pitch h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.pitch .block { margin-bottom: 22px; }
.pitch p { color: var(--text-2); font-size: 14.5px; line-height: 1.65; }
.pitch ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pitch li { display: flex; gap: 9px; color: var(--text-2); font-size: 14px; }
.pitch li .ic { color: var(--pc); margin-top: 3px; }
.calc { background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
.calc-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calc-inputs .field + .field { margin-top: 0; }
.calc-inputs input { background: var(--surface); }
.calc-out { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; display: grid; gap: 2px; }
.calc-out .line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13.5px; color: var(--text-2); }
.calc-out .line b { font-variant-numeric: tabular-nums; color: var(--text); }
.headline { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.headline span { color: var(--muted); font-size: 13px; }
.headline b { font-size: 1.8rem; letter-spacing: -.03em; color: var(--pc); font-variant-numeric: tabular-nums; }
.illustrative { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.summary-grid .kpi { border-top: 3px solid var(--pc); }
.total { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; border-radius: 18px; color: #fff;
  background: linear-gradient(120deg, #0f172a, #312e81 60%, #4c1d95); flex-wrap: wrap; gap: 10px; }
.total span { color: #c7d2fe; }
.total b { font-size: 2.2rem; letter-spacing: -.03em; }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--surface); }
.login-art { position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(ellipse at 10% 10%, rgba(99,102,241,.55), transparent 55%), radial-gradient(ellipse at 90% 90%, rgba(13,148,136,.45), transparent 55%), #0f172a; }
.login-art h1 { color: #fff; font-size: 2.1rem; letter-spacing: -.03em; max-width: 460px; line-height: 1.15; }
.login-art p { color: #cbd5e1; max-width: 440px; }
.login-art .plist { display: grid; gap: 10px; max-width: 420px; }
.login-art .plist div { display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.login-art .plist .p-tile { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; width: 30px; height: 30px; border-radius: 8px; }
.login-form { display: grid; place-items: center; padding: 40px 24px; }
.login-form form { width: 100%; max-width: 360px; }
.login-form h2 { font-size: 1.45rem; letter-spacing: -.02em; }

/* ---------------------------------------------------------------- footer */
.foot { text-align: center; color: var(--faint); font-size: 11.5px; padding: 0 20px 22px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .cols-4, .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-main, .slide-grid { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 14px 16px; }
  .side .side-group { display: flex; gap: 4px; overflow-x: auto; }
  .side .side-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .side .side-item { width: auto; white-space: nowrap; flex: none; }
  .side .side-item.rich { max-width: 240px; }
  .side .side-item.rich .t { white-space: normal; }
  .main { padding: 20px 16px 48px; }
  .products, .cols-2, .cols-3, .how, .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .doc { padding: 24px 20px; }
  .slide { padding: 26px 20px; border-radius: 18px; }
  .prompts { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar-inner { gap: 12px; padding: 0 12px; }
  .brand .brand-name { display: none; }
  .nav a { padding: 7px 9px; }
  .nav a .label-long { display: none; }
  .nav a .label-short { display: inline; }
  .nav a .dot { display: none; }
  .ws-head h1 { font-size: 1.3rem; }
  .ws-head > div:first-child { flex-basis: 100%; }
  .meta-row { font-size: 12.5px; }
  .welcome h1 { font-size: 1.4rem; }
  .value-link .label-long { display: none; }
  .avatar-btn .uname { display: none; }
  .cols-4, .summary-grid, .calc-inputs { grid-template-columns: 1fr 1fr; }
  .landing, .deck { padding-left: 16px; padding-right: 16px; }
  .bar-row { grid-template-columns: minmax(0, 1fr) 80px; }
  .bar-row .track { grid-column: 1 / -1; grid-row: 2; }
  .dl { grid-template-columns: 1fr; gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  th, td { padding: 9px 10px; }
  .hide-sm { display: none; }
  .toast-wrap { left: 12px; right: 12px; }
}
@media (max-width: 420px) {
  .cols-4, .summary-grid, .calc-inputs { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
