:root {
  --navy: #221A45; --navy-2: #3B3264; --peach: #E8654A; --peach-soft: #FDEDE8; --peach-ink: #B03E27;
  --bg: #F5F6FA; --card: #FFFFFF; --line: #E9EBF1; --line-2: #F1F2F6;
  --ink: #221A45; --ink-2: #4A5470; --muted: #8A91A5;
  --good: #12976A; --good-bg: #E7F6EF; --bad: #D64545; --bad-bg: #FCEBEB; --watch: #B9761A; --watch-bg: #FBF3E4;
  --blue: #5B7BE8;
  --r: 16px; --r-sm: 10px;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 1px 2px rgba(34, 26, 69, .05), 0 10px 26px -14px rgba(34, 26, 69, .16);
  --shadow-hover: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 4px rgba(34, 26, 69, .05), 0 18px 36px -16px rgba(34, 26, 69, .24);
  --well: inset 0 1px 2px rgba(34, 26, 69, .06);
  --shadow-lg: 0 24px 60px -20px rgba(34, 26, 69, .28);
  --rail: 68px; --rail-open: 232px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, sans-serif;
  --chart-1: #221A45; --chart-grid: #EEF0F5; --tooltip: #221A45; --hover: #FAFBFD; --glass: rgba(255, 255, 255, .92); --bar-glass: rgba(245, 246, 250, .82);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 13.5px/1.45 var(--font); color: var(--ink); background: radial-gradient(1100px 520px at 100% -8%, #E9EDF7 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #E5F3F4 0%, transparent 55%), var(--bg); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
.i { width: 18px; height: 18px; flex-shrink: 0; }
.hint { color: var(--muted); font-size: var(--fs-2); margin: 2px 0 0; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 28px; text-align: center; }
kbd { font: 600 var(--fs-1) var(--font); padding: 2px 6px; border-radius: var(--r-1); background: var(--line-2); border: 1px solid var(--line); color: var(--ink-2); }

/* ---------- Rail: collapsed; opens when the pointer reaches the left edge ---------- */
.edge { position: fixed; left: 0; top: 0; bottom: 0; width: 14px; z-index: 39; }
.rail { position: fixed; left: 0; top: 0; bottom: 0; width: var(--rail); background: var(--card); border-right: 1px solid var(--line); box-shadow: 1px 0 0 rgba(255, 255, 255, .6), 6px 0 24px -18px rgba(34, 26, 69, .25); z-index: 40;
  display: flex; flex-direction: column; padding: 18px 12px; gap: 22px; overflow: hidden; transition: width .22s cubic-bezier(.2, .7, .2, 1), box-shadow .22s; }
.rail.open { width: var(--rail-open); box-shadow: var(--shadow-lg); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 5px; min-height: 36px; white-space: nowrap; }
.brand img { flex-shrink: 0; }
.word { font-size: var(--fs-5); letter-spacing: -.02em; opacity: 0; transition: opacity .15s; }
.word b { color: var(--navy); font-weight: 700; } .word i { color: var(--peach); font-style: normal; font-weight: 700; }
.rail.open .word { opacity: 1; }
#nav, .rail-foot { display: flex; flex-direction: column; gap: 2px; }
#nav { flex: 1; }
.nav { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 11px; border-radius: var(--r-sm); color: var(--ink-2); white-space: nowrap; font-weight: 500; position: relative; }
.nav:hover { background: var(--line-2); color: var(--ink); }
.nav.active { background: var(--navy); color: #fff; }
.nav.active::after { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 var(--r-1) var(--r-1) 0; background: var(--peach); }
.nav span { opacity: 0; transition: opacity .15s; flex: 1; }
.nav kbd { opacity: 0; background: transparent; border-color: currentColor; color: inherit; opacity: 0; }
.rail.open .nav span { opacity: 1; } .rail.open .nav kbd { opacity: .45; }

/* ---------- Main ---------- */
main { margin-left: var(--rail); padding: 20px 28px 48px; min-height: 100vh; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20; margin: -20px -28px 0; padding: 16px 28px 14px; background: var(--bar-glass); border-bottom: 1px solid var(--line-2); }
h1 { font-size: var(--fs-6); letter-spacing: -.02em; margin: 0; font-weight: 700; }
#subtitle { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-3); }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); font-weight: 500; color: var(--ink); box-shadow: 0 1px 2px rgba(34, 26, 69, .05); }
.pill:hover { border-color: #D5D9E3; }
.pill b.count { background: var(--peach); color: var(--navy); border-radius: var(--r-pill); font-size: var(--fs-1); padding: 0 6px; line-height: 17px; }
.pill.dark { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill.dark:hover { background: var(--navy-2); }
.pill .i { width: 16px; height: 16px; }
.seg { display: inline-flex; height: 36px; padding: 3px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(34, 26, 69, .05); }
.seg button.on, .pill.dark, .nav.active, .tabs button.on { box-shadow: 0 4px 10px -4px rgba(34, 26, 69, .45); }
.seg button { padding: 0 12px; border-radius: var(--r-pill); color: var(--ink-2); font-weight: 500; }
.seg button.on { background: var(--navy); color: #fff; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 0; min-height: 0; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 11px; border-radius: var(--r-pill); background: var(--peach-soft); color: var(--peach-ink); font-weight: 500; font-size: var(--fs-2); }
.chip button { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; }
.chip button:hover { background: rgba(52, 133, 140, .15); }
.chip .i { width: 12px; height: 12px; }
.chip.clear { background: none; color: var(--ink-2); padding-right: 11px; }
#view { margin-top: 18px; }

/* ---------- Grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; }
.s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s9 { grid-column: span 9; } .s12 { grid-column: span 12; }
.card { background: var(--card); border: 1px solid rgba(34, 26, 69, .07); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow-hover); }
.card h3 { margin: 0; font-size: var(--fs-4); font-weight: 600; letter-spacing: -.01em; }
.vhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.vtools { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.types { display: inline-flex; box-shadow: var(--well); background: var(--line-2); border-radius: var(--r-2); padding: 2px; margin-right: 4px; }
.types button { width: 28px; height: 26px; display: grid; place-items: center; border-radius: var(--r-1); color: var(--muted); }
.types button:hover { color: var(--ink); }
.types button.on { background: var(--card); color: var(--navy); box-shadow: 0 1px 2px rgba(34, 26, 69, .12); }
.types .i { width: 15px; height: 15px; }
.ib { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: var(--r-2); color: var(--muted); position: relative; }
.ib:hover { background: var(--line-2); color: var(--ink); }
.ib .i { width: 16px; height: 16px; }
.ib.cm b { position: absolute; top: 1px; right: 0; background: var(--peach); color: var(--navy); font-size: var(--fs-1); min-width: 15px; height: 15px; border-radius: var(--r-2); display: grid; place-items: center; padding: 0 3px; }
.ib.cm.has { color: var(--peach-ink); }
.vbody { position: relative; }
.vbody.sm { height: 190px; } .vbody.md { height: 280px; } .vbody.lg { height: 380px; } .vbody.xl { height: 460px; }
.vbody.scroll { overflow: auto; }
.visual.focused { position: fixed; inset: 28px 28px 28px calc(var(--rail) + 28px); z-index: 30; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.visual.focused .vbody { flex: 1; height: auto; }
body.has-focus .scrim { display: block !important; }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; cursor: default; }
.kpi .l { font-size: var(--fs-3); color: var(--ink-2); font-weight: 500; display: flex; justify-content: space-between; align-items: center; }
.kpi .v { font-size: var(--fs-7); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.kpi .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.kpi .sub { font-size: var(--fs-2); color: var(--muted); }
.kpi.hero { background: linear-gradient(150deg, #3B3264 0%, var(--navy) 55%); color: #fff; border-color: transparent; box-shadow: 0 2px 4px rgba(34, 26, 69, .12), 0 18px 34px -16px rgba(34, 26, 69, .55); }
.kpi.hero .l, .kpi.hero .sub { color: rgba(255, 255, 255, .72); }
.kpi.hero::after { content: ""; position: absolute; right: -34px; top: -34px; width: 96px; height: 96px; border-radius: 50%; border: 7px solid var(--peach); opacity: .85; border-left-color: transparent; border-bottom-color: transparent; transform: rotate(-10deg); pointer-events: none; }
.kpi.hero > * { position: relative; z-index: 1; }
.kpi.hero .spark polyline { stroke: var(--peach); }
.kpi .ib { width: 24px; height: 24px; margin: -4px -4px 0 0; }
.kpi.hero .ib { color: rgba(255, 255, 255, .6); }
.spark { width: 72px; height: 22px; flex-shrink: 0; }
.spark polyline { fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark.down polyline { stroke: var(--bad); } .spark.up polyline { stroke: var(--good); }

.trend { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-2); font-weight: 600; padding: 2px 8px 2px 6px; border-radius: var(--r-pill); white-space: nowrap; }
.trend .i { width: 13px; height: 13px; stroke-width: 2.2; }
.trend.up { background: var(--good-bg); color: var(--good); } .trend.down { background: var(--bad-bg); color: var(--bad); }
.trend.flat { background: var(--line-2); color: var(--ink-2); } .trend.mixed { background: var(--watch-bg); color: var(--watch); } .trend.none { color: var(--muted); padding: 0; }
.kpi.hero .trend.up { background: rgba(18, 151, 106, .22); color: #8BE3C0; } .kpi.hero .trend.down { background: rgba(214, 69, 69, .25); color: #FFB0B0; }
.kpi.hero .trend.flat { background: rgba(255, 255, 255, .12); color: #fff; }
.delta { font-size: var(--fs-2); font-weight: 600; } .delta.pos { color: var(--good); } .delta.neg { color: var(--bad); }

/* Highlights */
.notes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.notes-list li { display: flex; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.notes-list li:first-child { border-top: 0; padding-top: 2px; }
.notes-list li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--blue); }
.notes-list li.good::before { background: var(--good); } .notes-list li.bad::before { background: var(--bad); } .notes-list li.watch::before { background: var(--watch); }

/* Tables (matrix + data grid) */
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; display: table; }
table.grid th { position: sticky; top: 0; background: var(--card); z-index: 1; text-align: left; font-size: var(--fs-1); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
/* A hand only where a click sorts: the headings of matrix() tables and of the Data tables, not those of plain tables. */
table.grid th[data-sort], table.grid th[data-col] { cursor: pointer; }
table.grid th.sorted { color: var(--navy); }
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
table.grid td.wrap { white-space: normal; min-width: 220px; }
table.grid .num { text-align: right; }
table.grid tbody tr:hover td { background: var(--hover); }
table.grid tbody tr[data-key], table.grid tbody tr[data-open] { cursor: pointer; }
table.grid tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; background: var(--card); position: sticky; bottom: 0; }
table.compact td, table.compact th { padding: 7px 8px; }
.sharebar { display: inline-block; width: 64px; height: 5px; border-radius: var(--r-2); background: var(--line-2); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.sharebar i { display: block; height: 100%; background: var(--navy); border-radius: var(--r-2); }
.tag { display: inline-block; font-size: var(--fs-1); font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); background: var(--line-2); color: var(--ink-2); }
.tag.GP { background: #EAF0FF; color: #3D5CC9; } .tag.HCA { background: #E6F5F1; color: #2B8C79; }
.tag.Consultants { background: var(--peach-soft); color: var(--peach-ink); } .tag.Corporate { background: #F3EEFC; color: #7556B8; }
.tablewrap { max-height: 560px; overflow: auto; border-radius: var(--r-sm); }

/* Data page */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs button { height: 34px; padding: 0 14px; border-radius: var(--r-pill); color: var(--ink-2); font-weight: 500; }
.tabs button:hover { background: var(--line-2); }
.tabs button.on { background: var(--navy); color: #fff; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.search { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--card); min-width: 240px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; flex: 1; color: var(--ink); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .lab { font-weight: 600; font-size: var(--fs-3); display: flex; justify-content: space-between; gap: 8px; }
.field > label output { color: var(--navy); font-weight: 700; }
input[type=text], input[type=number], select, textarea { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-sm); padding: 8px 10px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(34, 26, 69, .08); }
input[type=range] { accent-color: var(--navy); width: 100%; }
input[type=color] { width: 40px; height: 32px; border: 1px solid var(--line); border-radius: var(--r-2); padding: 2px; background: var(--card); }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); font-weight: 600; border: 1px solid var(--line); background: var(--card); }
.btn:hover { border-color: #D5D9E3; }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-2); }
.btn.peach { background: var(--peach); color: var(--navy); border-color: var(--peach); }
.btn .i { width: 16px; height: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* Sheets: detail drawer and comments */
.scrim { position: fixed; inset: 0; background: rgba(34, 26, 69, .22); z-index: 25; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(600px, 100vw); background: var(--card); z-index: 45; box-shadow: var(--shadow-lg);
  transform: translateX(105%); transition: transform .28s cubic-bezier(.2, .7, .2, 1); overflow-y: auto; padding: 24px 26px 40px; }
.sheet.narrow { width: min(400px, 100vw); display: flex; flex-direction: column; }
/* The side panel a click opens fits its tables (Krishna, 11 Nov 2026: no scrolling sideways): wider on a big screen, the whole width on a
   phone, and text in its tables wraps; amounts, dates and invoice numbers stay on one line. */
.sheet:not(.narrow) { width: min(960px, 94vw); }
@media (max-width: 700px) { .sheet:not(.narrow) { width: 100vw; } }
.sheet table.grid { width: 100%; }
/* Columns keep their words on one line (no column squeezed to a letter wide); only the long text column (td.wrap, e.g. Service) wraps, at
   word boundaries, and takes the room that is left. */
.sheet table.grid th, .sheet table.grid td { white-space: nowrap; }
.sheet table.grid td.wrap { white-space: normal; min-width: 200px; }
.sheet.open { transform: none; }
.sheet .x { position: absolute; top: 18px; right: 18px; }
.sheet h2 { font-size: var(--fs-6); letter-spacing: -.02em; margin: 2px 40px 4px 0; }
.sheet .eyebrow { font-size: var(--fs-2); color: var(--muted); font-weight: 500; }
.sheet h4 { font-size: var(--fs-2); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 22px 0 8px; }
.mini-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.mini-kpis div { box-shadow: var(--well); background: var(--bg); border-radius: var(--r-sm); padding: 10px 12px; font-size: var(--fs-2); color: var(--muted); }
.mini-kpis b { display: block; font-size: var(--fs-5); color: var(--ink); letter-spacing: -.02em; margin-bottom: 2px; }
.list { display: flex; flex-direction: column; }
.list button { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line-2); text-align: left; }
.list button:hover { background: var(--hover); }
.list .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.list .lbar { grid-column: 1 / 3; height: 4px; border-radius: var(--r-1); background: var(--line-2); overflow: hidden; }
.list .lbar i { display: block; height: 100%; background: var(--peach); }

/* Comments */
.thread { flex: 1; display: flex; flex-direction: column; gap: 10px; margin-top: 16px; overflow-y: auto; }
.note { border: 1px solid var(--line); border-radius: var(--r-3); padding: 10px 12px; }
.note .meta { display: flex; justify-content: space-between; font-size: var(--fs-2); color: var(--muted); margin-bottom: 4px; }
.note textarea { width: 100%; border: 0; padding: 0; resize: none; min-height: 40px; box-shadow: none !important; }
.note .del { color: var(--muted); }
.saved-state { font-size: var(--fs-2); color: var(--muted); height: 16px; }
.composer { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.composer textarea { width: 100%; min-height: 84px; resize: vertical; }

/* Popovers */
.pop { position: fixed; z-index: 50; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--shadow-lg); padding: 10px; min-width: 260px; max-height: 70vh; overflow: auto; }
.pop h5 { margin: 6px 8px 8px; font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pop .opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--r-2); text-align: left; }
.pop .opt:hover { background: var(--line-2); }
.pop .opt.on { color: var(--navy); font-weight: 600; }
.pop .opt.on::after { content: "✓"; color: var(--peach-ink); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.pop .filters { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; min-width: 620px; }
.pop .fcol { max-height: 300px; overflow: auto; }
.pop .fnet { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 0 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.pop .fnet h5 { margin: 0 4px 0 8px; }
.pop label.ck { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: var(--r-1); font-size: var(--fs-3); cursor: pointer; }
.pop label.ck:hover { background: var(--line-2); }
.pop label.ck input { accent-color: var(--navy); }

/* Simulator */
.sim-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: -4px -4px 14px; padding: 0 4px; }
.sim-tabs button { padding: 10px 11px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.sim-tabs button.on { color: var(--navy); border-color: var(--peach); }
.lever-table { width: 100%; border-collapse: collapse; }
.lever-table td { padding: 5px 4px; border-bottom: 1px solid var(--line-2); }
.lever-table input { width: 76px; padding: 5px 7px; text-align: right; }
.stack { border: 1px solid var(--line); border-radius: var(--r-3); padding: 12px; margin-bottom: 10px; position: relative; }
.stack .rm { position: absolute; top: 8px; right: 8px; }
.headline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.headline > div { background: var(--bg); border-radius: var(--r-3); padding: 12px 14px; box-shadow: var(--well); }
.headline .k { font-size: var(--fs-2); color: var(--muted); font-weight: 500; }
.headline .v { font-size: var(--fs-6); font-weight: 700; letter-spacing: -.03em; }
.headline .main { background: var(--navy); color: #fff; } .headline .main .k { color: rgba(255, 255, 255, .7); }
.warn { background: var(--watch-bg); color: var(--watch); border-radius: var(--r-2); padding: 8px 12px; font-size: var(--fs-3); margin-top: 8px; }

/* Settings */
.set-section { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding: 22px 0; border-top: 1px solid var(--line); }
.set-section:first-child { border-top: 0; padding-top: 4px; }
.set-section h3 { font-size: var(--fs-5); margin: 0 0 6px; }
.set-section .why { color: var(--ink-2); font-size: var(--fs-3); }
.set-section .why p { margin: 0 0 8px; }
.savebar { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 12px; border-radius: var(--r-3); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); }
.savebar .state { margin-right: auto; color: var(--muted); font-size: var(--fs-3); }
.savebar .state.dirty { color: var(--peach-ink); font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2); font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.on::before { background: var(--good); } .status.off::before { background: #C7CCD9; }
.upload-box { border: 1.5px dashed #CBD1DE; border-radius: var(--r-3); padding: 18px; text-align: center; color: var(--ink-2); cursor: pointer; }
.upload-box:hover { border-color: var(--navy); background: var(--hover); }

/* Presentation: the current page, one card at a time */
body.presenting { overflow: hidden; }
body.presenting .rail, body.presenting .edge, body.presenting .top, body.presenting .bar, body.presenting .chips { display: none; }
body.presenting main { margin-left: 0; }
body.presenting #view div.grid > :not(.pslide):not(:has(.pslide)) { display: none; }
/* The same inside any box that holds the slide (e.g. the Overview headline around the key figures), so nothing
   but the slide shows behind it. */
body.presenting #view :has(.pslide) > :not(.pslide):not(:has(.pslide)) { display: none; }
.pslide { position: fixed !important; top: 76px; left: 48px; right: 48px; bottom: 60px; z-index: 55; overflow: auto; display: flex; flex-direction: column; animation: slidein .3s cubic-bezier(.2, .7, .2, 1); }
.pslide.kpis { display: grid; grid-template-columns: repeat(3, 1fr); align-content: center; gap: 22px; overflow: visible; }
.pslide.kpis .kpi { padding: 28px; } .pslide.kpis .kpi .v { font-size: var(--fs-10); }
.pslide .vbody, .pslide .tablewrap { flex: 1; height: auto !important; max-height: none !important; min-height: 0; }
.pslide .vtools .ib[data-act="focus"] { display: none; }
@keyframes slidein { from { opacity: 0; transform: translateY(10px); } }
.present { position: fixed; inset: 0; z-index: 54; pointer-events: none; }
.present .ptop { position: absolute; top: 0; left: 48px; right: 48px; height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.present .ptop .word { opacity: 1; font-size: var(--fs-5); }
.present .ptitle { font-size: var(--fs-5); color: var(--ink-2); } .present .ptitle b { color: var(--ink); }
.present .meta { color: var(--muted); font-weight: 500; font-size: var(--fs-3); }
.present .pfoot { position: absolute; bottom: 0; left: 48px; right: 48px; height: 52px; display: flex; align-items: center; color: var(--muted); font-size: var(--fs-2); }
.present .progress { flex: 1; height: 3px; background: var(--line); margin: 0 18px; border-radius: var(--r-1); overflow: hidden; }
.present .progress i { display: block; height: 100%; background: var(--peach); transition: width .3s; }

/* Modal (shortcuts) */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: rgba(34, 26, 69, .35); }
.modal .box { background: var(--card); border-radius: var(--r-4); padding: 24px 26px; width: min(560px, 92vw); box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 14px; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }
.keys div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line-2); }

.dropzone { position: fixed; inset: 12px; z-index: 80; border: 2px dashed var(--peach); border-radius: var(--r-4); background: var(--bar-glass); display: grid; place-items: center; font-size: var(--fs-6); font-weight: 600; text-align: center; }
.dropzone small { display: block; font-size: var(--fs-3); color: var(--muted); font-weight: 500; margin-top: 6px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 24px); opacity: 0; background: var(--navy); color: #fff; padding: 10px 18px; border-radius: var(--r-pill); font-weight: 500; transition: all .25s; z-index: 90; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .s3 { grid-column: span 6; } .s4, .s5, .s7, .s8, .s9 { grid-column: span 12; } .s6 { grid-column: span 12; }
  .headline { grid-template-columns: 1fr 1fr; }
  .set-section { grid-template-columns: 1fr; gap: 12px; }
  .pop .filters { grid-template-columns: 1fr; min-width: 0; }
}
@media (max-width: 720px) {
  :root { --rail: 0px; }
  .rail { transform: translateX(-100%); } .rail.open { transform: none; }
  main { padding: 16px 16px 40px; }
  .s3 { grid-column: span 12; }
  .row2, .row3, .mini-kpis { grid-template-columns: 1fr 1fr; }
  .pslide { left: 16px; right: 16px; } .pslide.kpis { grid-template-columns: 1fr 1fr; }
}
/* No movement when html.calm (public/depth.js: Still chosen, or nothing chosen and the computer asks for less movement; Gentle chosen plays it). */
html.calm * { animation: none !important; transition: none !important; }

/* Utilities (inline styles are blocked by the Content-Security-Policy) */
.m0 { margin: 0 !important; } .mt { margin-top: 12px !important; } .mt6 { margin-top: 6px !important; } .px4 { padding: 0 4px; }
.grow { flex: 1; } .left { text-align: left; } .pad { margin: 4px 10px 8px; }
.inline { display: flex; gap: 8px; align-items: center; }
.big-list { margin-top: 10px; font-size: var(--fs-5); }
.opt-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.msel { height: 30px; padding: 0 8px; font-size: var(--fs-3); margin-right: 4px; }
.lab.ck { display: flex; justify-content: flex-start; gap: 8px; align-items: center; font-weight: 500; margin-bottom: 10px; cursor: pointer; }
.lab.ck input { accent-color: var(--navy); }
.present .vbody { height: calc(100vh - 360px); }
.present .card.visual { height: 100%; }
#svc-res, .set-section .search { margin-top: 12px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { background: #BD3434; }
.btn.danger-ghost { height: 30px; padding: 0 10px; color: var(--bad); border-color: transparent; background: none; }
.btn.danger-ghost:hover { background: var(--bad-bg); }
.btn.on { background: var(--line-2); }
.toolbar.end { justify-content: flex-end; gap: 8px; margin-top: 18px !important; }
.modal .why { color: var(--ink-2); margin: 0; }
.weeks-panel { margin: 0 0 14px; border: 1px solid var(--line); border-radius: var(--r-3); padding: 4px 8px; box-shadow: var(--well); background: var(--bg); }
.weeks-panel table.grid th, .weeks-panel table.grid td { background: transparent; }
.offscreen { position: fixed; left: -10000px; top: 0; pointer-events: none; }

/* Sidebar groups */
.nav-group { height: 22px; margin: 8px 0 2px; padding: 0 12px; display: flex; align-items: center; }
.nav-group span { font-size: var(--fs-1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); opacity: 0; transition: opacity .15s; white-space: nowrap; }
.nav-group::before { content: ""; display: block; width: 18px; height: 1px; background: var(--line); margin-right: 8px; flex-shrink: 0; }
.rail.open .nav-group span { opacity: 1; } .rail.open .nav-group::before { display: none; }
#nav { gap: 1px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.nav { height: 36px; }

/* Stat rows (finance pages) */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--bg); border-radius: var(--r-3); padding: 12px 14px; box-shadow: var(--well); min-width: 0; }
.stat .k { font-size: var(--fs-2); color: var(--muted); font-weight: 500; }
.stat .v { font-size: var(--fs-6); font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.stat .v small { font-size: var(--fs-3); color: var(--muted); font-weight: 500; }
.stat .s { font-size: var(--fs-2); color: var(--muted); margin-top: 2px; }
.stat.main { background: linear-gradient(150deg, #3B3264 0%, var(--navy) 60%); color: #fff; box-shadow: 0 10px 22px -14px rgba(34, 26, 69, .6); }
.stat.main .k, .stat.main .s { color: rgba(255, 255, 255, .72); }
.stat.warnish .v { color: var(--peach-ink); }
.stat input { width: 100%; margin-top: 6px; }
.stat.end-self { display: flex; align-items: flex-end; background: none; box-shadow: none; }
.status-tag { font-size: var(--fs-1); font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); }
.status-tag.ahead { background: var(--good-bg); color: var(--good); } .status-tag.on-track { background: var(--line-2); color: var(--ink-2); } .status-tag.behind { background: var(--bad-bg); color: var(--bad); }
.pbar { position: relative; display: inline-block; width: 110px; height: 7px; border-radius: var(--r-2); background: var(--line-2); vertical-align: middle; margin-right: 6px; }
.pbar i { display: block; height: 100%; border-radius: var(--r-2); background: var(--navy); }
.pbar em, .progress-xl em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--peach); border-radius: var(--r-1); }
.progress-xl { position: relative; height: 12px; border-radius: var(--r-3); background: var(--line-2); margin-top: 16px; box-shadow: var(--well); }
.progress-xl i { display: block; height: 100%; border-radius: var(--r-3); background: linear-gradient(90deg, var(--navy), #2A4486); transition: width .6s; }
.progress-xl em { top: -5px; bottom: -5px; width: 3px; }
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tblock { border: 1px solid var(--line); border-radius: var(--r-3); padding: 6px 10px; max-height: 460px; overflow: auto; }
.tblock h4 { margin: 8px 0; font-size: var(--fs-2); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tblock input, .field.tight input { width: 110px; text-align: right; }
.field.tight { flex-direction: row; align-items: center; gap: 12px; }

/* Needs-data cards */
.needs { background: linear-gradient(180deg, var(--card), var(--hover)); }
.needs-body { display: flex; gap: 14px; align-items: flex-start; color: var(--ink-2); }
.needs-body > .i { width: 34px; height: 34px; padding: 8px; border-radius: var(--r-2); background: var(--peach-soft); color: var(--peach-ink); flex-shrink: 0; }
.needs-body p { margin: 0 0 8px; }

/* Board pack */
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; margin-bottom: 14px; }
.checks .ck { display: flex; gap: 8px; align-items: center; padding: 4px 0; cursor: pointer; font-size: var(--fs-3); }
.checks input { accent-color: var(--navy); }
.pack-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0 14px; }
.pack-preview { max-height: calc(100vh - 220px); overflow: auto; background: var(--bg); border-radius: var(--r-3); padding: 14px; box-shadow: var(--well); }
.subhead { font-size: var(--fs-2); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 6px; }
.add-promo { margin-top: 12px; } .add-promo summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
@media (max-width: 1180px) { .tgrid { grid-template-columns: 1fr; } }

.stat .v .delta { font-size: inherit; }
.spark.mixed polyline { stroke: var(--watch); }

/* Cash forecast */
.seg.sm { height: 32px; } .seg.sm button { padding: 0 11px; font-size: var(--fs-3); }
.big-line { font-size: var(--fs-5); line-height: 1.5; margin: 4px 0 14px; color: var(--ink-2); letter-spacing: -.01em; }
.big-line b { color: var(--ink); font-weight: 700; }
.neg-text { color: var(--bad); }
.section-head { margin: 18px 2px 0; }
.section-head h2 { margin: 0; font-size: var(--fs-6, 20px); }
.section-head .hint { margin: 4px 0 0; }
.assume { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.assume .lab { margin-bottom: 7px; } .assume .lab b { color: var(--navy); }
.assume input[type=range] { width: 100%; accent-color: var(--navy); margin: 8px 0 2px; }
.week-detail h4 { display: flex; justify-content: space-between; font-size: var(--fs-2); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 6px; }
.week-detail h4 b { color: var(--ink); letter-spacing: 0; }
.wd-total { font-size: var(--fs-7); font-weight: 700; letter-spacing: -.02em; margin-top: 6px; } .wd-total small { font-size: var(--fs-3); color: var(--muted); font-weight: 500; letter-spacing: 0; }
ul.wd { list-style: none; margin: 0; padding: 0; }
ul.wd li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: var(--fs-3); }
ul.wd li span { min-width: 0; font-weight: 500; } ul.wd li em { display: block; font-style: normal; font-weight: 400; color: var(--muted); font-size: var(--fs-2); margin-top: 1px; }
ul.wd li b { white-space: nowrap; } ul.wd li.dim { color: var(--muted); }
.wd-bal { margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg); box-shadow: var(--well); font-size: var(--fs-3); }
[data-visual="cash-13"] tbody tr { cursor: pointer; } [data-visual="cash-13"] tbody tr.on td { background: var(--peach-soft); }
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; margin-top: 6px; }
.step { display: flex; gap: 12px; min-width: 0; } .step > div { min-width: 0; flex: 1; }
.step > i { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font-style: normal; font-weight: 700; font-size: var(--fs-3); display: grid; place-items: center; }
.step h4 { margin: 3px 0 6px; font-size: var(--fs-4); } .step p { margin: 0 0 8px; color: var(--ink-2); line-height: 1.5; }
.step .tablewrap { margin: 6px 0 8px; }
ul.plain { margin: 4px 0 8px; padding-left: 18px; color: var(--ink-2); line-height: 1.6; } ul.plain b { color: var(--ink); }
.row5 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.field.end-self { display: flex; align-items: flex-end; }
.card.soon { background: linear-gradient(180deg, var(--card), var(--bg)); border-style: dashed; }
/* Operations */
table.heat td.hc { border-radius: var(--r-1); border: 2px solid var(--card); font-variant-numeric: tabular-nums; }
/* A hand only on the rows that open something: the "When are we busy?" table (tr[data-spec]: a name opens the specialty, a number its appointments), not the busy-hours or retention maps. */
table.heat tbody tr[data-spec] { cursor: pointer; }

.calc { display: flex; flex-direction: column; margin-top: 14px; border-radius: var(--r-sm); background: var(--bg); box-shadow: var(--well); padding: 4px 14px; }
.calc > div { display: grid; grid-template-columns: 220px 1fr auto; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-3); }
.calc > div:last-child { border-bottom: 0; } .calc span { color: var(--muted); font-weight: 500; } .calc b { font-weight: 500; color: var(--ink-2); } .calc em { font-style: normal; font-weight: 700; }
.calc .total em { color: var(--good); font-size: var(--fs-5); } .calc .total span { color: var(--ink); }
@media (max-width: 900px) { .assume, .steps { grid-template-columns: 1fr; } .calc > div { grid-template-columns: 1fr auto; } .calc b { grid-column: 1 / -1; grid-row: 2; } }
/* Signals */
.sigs { display: flex; flex-direction: column; }
.sig { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) 90px 76px 150px; gap: 14px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line-2); text-align: left; border-radius: var(--r-2); }
.sig-name { display: flex; gap: 8px; align-items: center; min-width: 0; } .sig-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sig-what em { font-style: normal; color: var(--muted); font-size: var(--fs-2); } .sig .delta { text-align: right; } .sig .trend { justify-self: start; }
.m0b { margin: 0 0 10px !important; } .pos-text { color: var(--good); }
table.gaps tbody tr { cursor: pointer; }
@media (max-width: 900px) { .sig { grid-template-columns: 1fr auto; } .sig .spark, .sig .trend { display: none; } .sig-what { grid-row: 2; } }
/* Forecast trust + fine-tune */
.trust { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px; font-size: var(--fs-3); color: var(--ink-2); }
.trust .i { width: 16px; height: 16px; color: var(--good); } .trust a { color: var(--blue); font-weight: 600; }
.big-line.sm { font-size: var(--fs-5); }
.tag.good { background: var(--good-bg); color: var(--good); }
table.grid tr.on td { background: var(--peach-soft); }
details.finetune { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
details.finetune summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
details.finetune summary::-webkit-details-marker { display: none; }
details.finetune summary::before { content: "›"; display: inline-block; font-size: var(--fs-6); line-height: 1; color: var(--muted); transition: transform .15s; }
details.finetune[open] summary::before { transform: rotate(90deg); }
/* Fold-outs in the same style: earlier months on Monthly sign-off (Home), "What is sent" under Settings → Smart answers. */
details.month-more { border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: 2px; }
details.month-more summary, details.smart-sent summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; color: var(--ink-2); }
details.month-more summary::-webkit-details-marker, details.smart-sent summary::-webkit-details-marker { display: none; }
details.month-more summary::before, details.smart-sent summary::before { content: "›"; display: inline-block; font-size: var(--fs-6); line-height: 1; color: var(--muted); transition: transform .15s; }
details.month-more[open] summary::before, details.smart-sent[open] summary::before { transform: rotate(90deg); }
details.smart-sent { margin-top: 8px; }
.ask-modes .lab { align-items: center; }
/* "What next" under a tab's answer card (pages.js answerCardHtml `next`). */
.next-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.next-row .next-lab { font-size: var(--fs-1); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
ol.rq-steps { margin: 6px 0 8px 18px; padding: 0; color: var(--ink-2); } ol.rq-steps li { margin: 2px 0; } /* Marketing → Data we need */
/* The sidebar's folding "Settings" heading (app.js renderShell): Data and Setup open under it. */
.foot-body { display: flex; flex-direction: column; gap: 2px; }
.foot-body .nav-group:first-child { margin-top: 6px; }
.nav.foot-head .foot-chev { margin-left: auto; font-style: normal; font-size: var(--fs-5); line-height: 1; color: var(--muted); transition: transform .15s; }
.nav.foot-head.open .foot-chev { transform: rotate(90deg); }
:root[data-rail="min"] .nav.foot-head .foot-chev { display: none; }
.ft-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 14px; }
.ft-grid .lab.ck { align-items: flex-start; } .ft-grid .lab.ck input { margin-top: 3px; }
.lab.ck em, .events .lab em { display: block; font-style: normal; font-weight: 400; color: var(--muted); font-size: var(--fs-2); margin-top: 3px; line-height: 1.45; }
.events { margin-top: 16px; } .events .lab { display: flex; gap: 8px; align-items: baseline; justify-content: flex-start; margin-bottom: 6px; }
.events .lab em { display: inline; margin: 0; }
.ev { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: var(--fs-3); }
.ev .grow { flex: 1; min-width: 0; } .ev.add { border: 0; flex-wrap: wrap; } .ev.add #ev-pct { width: 170px; }
.adj { margin: 8px 0 0; font-size: var(--fs-2); color: var(--watch); background: var(--watch-bg); border-radius: var(--r-2); padding: 7px 10px; }
@media (max-width: 1180px) { .ft-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .ft-grid { grid-template-columns: 1fr; } }
table.heat tr[data-spec] td.hc[data-a], table.heat tr[data-spec] td.hc-all { cursor: pointer; }
.list .row-static { display: flex; justify-content: space-between; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line-2); }
/* Scenarios */
.levers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 8px; }
.lever { background: var(--bg); box-shadow: var(--well); border-radius: var(--r-3); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lever h4 { margin: 0; font-size: var(--fs-4); } .lever .hint { margin: 0; } .lever .field { margin: 0; }
.scen-result { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 16px 0 12px; }
.scen-result > div { border: 1px solid var(--line); border-radius: var(--r-3); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.scen-result span { font-size: var(--fs-2); color: var(--muted); font-weight: 500; } .scen-result b { font-size: var(--fs-6); letter-spacing: -.01em; } .scen-result em { font-style: normal; font-size: var(--fs-2); color: var(--muted); }
#scen-name { min-width: 260px; }
.lever-on { display: flex; align-items: center; gap: 10px; background: var(--peach-soft); color: var(--peach-ink); border-radius: var(--r-2); padding: 8px 12px; margin-bottom: 12px; font-size: var(--fs-3); }
.lever-on .i { width: 16px; height: 16px; flex-shrink: 0; } .lever-on span { flex: 1; }
.btn.sm { height: 28px; padding: 0 10px; font-size: var(--fs-2); }
.goal { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .goal input { width: 160px; }
.lab.ck.off { opacity: .55; }
.tag.warn-tag { background: var(--watch-bg); color: var(--watch); }
button.linkish { color: var(--blue); font-weight: 600; padding: 0; } tr[data-week] { cursor: pointer; }
@media (max-width: 720px) { #scen-name { min-width: 0; width: 100%; } }
.levers { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.lever .row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; }
.lever input, .lever select { width: 100%; min-width: 0; }
.lever .field > label { font-size: var(--fs-2); font-weight: 500; color: var(--ink-2); line-height: 1.3; }
.w90 { width: 90px; } table.pay select { min-width: 150px; } table.pay td { vertical-align: middle; }
.mbar { display: inline-block; width: 56px; height: 5px; border-radius: var(--r-1); background: var(--line-2); overflow: hidden; margin-right: 8px; vertical-align: middle; } .mbar i { display: block; height: 100%; background: var(--good); }
.goal select { max-width: 100%; min-width: 0; } @media (max-width: 720px) { .goal select, .goal input { width: 100%; } }
@media (max-width: 720px) { .vhead { flex-wrap: wrap; } .vtools { flex-wrap: wrap; max-width: 100%; } }
/* Fix in Semble */
.issue { border-left: 4px solid var(--line); } .issue.sev-high { border-left-color: var(--bad); } .issue.sev-medium { border-left-color: var(--watch); } .issue.sev-low { border-left-color: var(--blue); }
.issue h3 { margin: 6px 0 8px; font-size: var(--fs-5); }
.issue-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: var(--fs-3); }
.issue .sev { font-weight: 700; font-size: var(--fs-1); text-transform: uppercase; letter-spacing: .05em; }
.sev-high .sev { color: var(--bad); } .sev-medium .sev { color: var(--watch); } .sev-low .sev { color: var(--blue); }
.issue-body p { margin: 0 0 6px; color: var(--ink-2); line-height: 1.5; max-width: 980px; } .issue-body b { color: var(--ink); }
.issue-detail { display: none; margin: 8px 0 10px; max-height: 360px; } .issue.open .issue-detail { display: block; }
.issue-actions { justify-content: flex-start; gap: 8px; margin-top: 10px !important; }
.btn.ghost { background: transparent; box-shadow: none; }
.nav .badge { margin-left: auto; background: var(--bad); color: #fff; border-radius: var(--r-pill); font-size: var(--fs-1); font-weight: 700; padding: 0 6px; line-height: 17px; }
/* Ask */
.pill.ask { background: var(--peach-soft); border-color: transparent; color: var(--peach-ink); }
.ask-form { display: flex; gap: 8px; margin: 14px 0 10px; } .ask-form input { flex: 1; min-width: 0; height: 42px; font-size: var(--fs-5); }
.ask-ex { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ask-ex button { border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 11px; font-size: var(--fs-3); color: var(--ink-2); background: var(--card); }
.ask-ex button:hover { border-color: var(--peach); color: var(--ink); }
.ask-answer { margin-top: 14px; padding: 16px; border-radius: var(--r-3); background: var(--bg); box-shadow: var(--well); }
.ask-answer p { margin: 0 0 8px; line-height: 1.55; color: var(--ink-2); } .ask-answer p b { color: var(--ink); }
.ask-head { font-size: var(--fs-5); color: var(--ink) !important; }
.understood { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.understood span { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-2); padding: 3px 8px; font-size: var(--fs-2); }
.understood em { font-style: normal; color: var(--muted); margin-right: 5px; }
.ask-answer #ask-chart .card { box-shadow: none; margin-top: 8px; }
.ask-answer tr[data-open] { cursor: pointer; }
/* Prices page */
p.lead { font-size: var(--fs-5); line-height: 1.55; color: var(--ink); margin: 4px 0 14px; max-width: 820px; }
.pricebar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg); box-shadow: var(--well); color: var(--ink-2); }
.pricebar p { flex: 1 1 360px; }
.pricebar .tools { display: flex; gap: 8px; flex-wrap: wrap; }
.review { padding: 14px 16px; border: 1px solid var(--peach); border-radius: var(--r-sm); background: var(--peach-soft); }
.review ul { margin: 6px 0; padding-left: 18px; }
table.clickable > tbody > tr[data-svc] { cursor: pointer; }
table.clickable > tbody > tr[data-svc]:hover td, table.clickable > tbody > tr.on td { background: var(--bg); }
table.grid tr.sub > td { background: var(--bg); padding: 6px 12px 12px; }
.pop .opt[disabled] { opacity: .55; cursor: default; background: none; }
/* Money missed / Dependency risk */
.splitbar { display: flex; height: 10px; border-radius: var(--r-pill); overflow: hidden; background: var(--line-2); gap: 2px; }
.splitbar i { display: block; height: 100%; }
.splitbar i.lost, .dot.lost { background: var(--bad); }
.splitbar i.risk, .dot.risk { background: var(--peach); }
.splitbar i.lost + i.lost { opacity: .7; } .splitbar i.risk + i.risk { opacity: .7; }
h5.leak-group { margin: 18px 0 4px; font-size: var(--fs-1); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.leak { border-top: 1px solid var(--line-2); }
.leak-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; cursor: pointer; border-radius: var(--r-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; } .dot.off { background: var(--line); }
.leak-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.leak-v { font-weight: 600; font-variant-numeric: tabular-nums; font-size: var(--fs-5); }
.leak .chev { transition: transform .15s; color: var(--muted); }
.leak.open .chev { transform: rotate(180deg); }
.leak-detail { display: none; padding: 0 4px 14px 24px; }
.leak.open .leak-detail { display: block; }
ul.rules { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); line-height: 1.55; }
ul.rules li + li { margin-top: 4px; }
/* Data checks */
.titles { display: flex; flex-direction: column; align-items: flex-start; }
button.checks { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2px 9px 2px 7px; border-radius: var(--r-pill); font-size: var(--fs-2); font-weight: 500; }
button.checks .i { width: 13px; height: 13px; }
button.checks.ok { color: var(--good); background: var(--good-bg); }
button.checks.fail { color: var(--bad); background: var(--bad-bg); }
.tag.bad-tag { background: var(--bad-bg); color: var(--bad); }
ul.checklist { list-style: none; margin: 8px 0 0; padding: 0; }
ul.checklist li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line-2); }
ul.checklist li .tag { flex: none; min-width: 92px; text-align: center; }
p.caveat { margin: -6px 0 14px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--watch-bg); color: var(--watch); font-size: var(--fs-3); max-width: 820px; }

/* ---------- Typography: Apple-style display numbers ---------- */
h1, h2, .kpi .v, .stat .v, .home-line, .proof-value, .ring-v { font-family: var(--font-display); }
.kpi .v, .stat .v, .ring-v, .proof-value, td.num, .leak-v { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
button.proof-link { text-align: left; color: inherit; border-radius: var(--r-1); cursor: pointer; transition: opacity .15s; }
button.proof-link:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.kpi .v.proof-link { display: block; font-size: var(--fs-7); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; padding: 0; }

/* ---------- Home ---------- */
.home-hero { position: relative; overflow: hidden; isolation: isolate; padding: 30px 32px 28px; color: #fff; border: 0;
  background: radial-gradient(700px 300px at 88% -20%, rgba(232, 101, 74, .22), transparent 60%), radial-gradient(600px 340px at -5% 120%, rgba(91, 123, 232, .28), transparent 60%), linear-gradient(135deg, #1B3266 0%, #221A45 52%, #0A1630 100%);
  box-shadow: 0 2px 4px rgba(34, 26, 69, .14), 0 28px 56px -24px rgba(34, 26, 69, .6), inset 0 1px 0 rgba(255, 255, 255, .08); }
.home-hero:hover { box-shadow: 0 2px 4px rgba(34, 26, 69, .14), 0 28px 56px -24px rgba(34, 26, 69, .6), inset 0 1px 0 rgba(255, 255, 255, .08); }
/* The Harbourline arc, large and quiet, behind the headline */
.home-hero::before { content: ""; position: absolute; z-index: -1; right: -70px; top: -90px; width: 420px; height: 420px; background: url(/brand/mark.svg) center / contain no-repeat; opacity: .16; transform: rotate(-8deg); pointer-events: none; }
.home-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, transparent, rgba(232, 101, 74, .55), transparent) top / 100% 1px no-repeat; pointer-events: none; }
.hero-glow { display: none; }
.hero-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; font-size: var(--fs-2); font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--peach); }
.hero-eyebrow span:last-child { color: rgba(255, 255, 255, .55); }
.hero-eyebrow i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .3); }
.hero-chip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px; border-radius: var(--r-pill); font-size: var(--fs-2); font-weight: 600; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); white-space: nowrap; }
.hero-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.hero-chip.good { color: #6BE0B4; } .hero-chip.watch { color: #F7C873; } .hero-chip.bad { color: #FF9A9A; }
.home-line { font-size: var(--fs-7); line-height: 1.38; letter-spacing: -.022em; font-weight: 400; margin: 0 0 26px; max-width: 900px; color: rgba(255, 255, 255, .78); text-wrap: pretty; }
.home-line b { font-weight: 700; color: #fff; }
.home-hero .pos-text { color: #6BE0B4; font-weight: 500; } .home-hero .neg-text { color: #FF9A9A; font-weight: 500; }
.pos-text { color: var(--good); }
.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ring-card { display: flex; align-items: center; gap: 18px; text-align: left; padding: 16px 20px 16px 16px; border-radius: var(--r-4); color: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035)); border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); }
button.ring-card:focus-visible { outline: 2px solid var(--peach); outline-offset: 2px; }
svg.ring { width: 96px; height: 96px; flex: none; overflow: visible; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 10; }
.ring-fg { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .9s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 6px color-mix(in srgb, currentColor 45%, transparent)); }
.ring.navy .ring-fg { stroke: #fff; color: #fff; } .ring.good .ring-fg { stroke: #6BE0B4; color: #6BE0B4; } .ring.peach .ring-fg { stroke: var(--peach); color: var(--peach); }
.ring.bad .ring-fg { stroke: #FF8E8E; color: #FF8E8E; } .ring.watch .ring-fg { stroke: #F7C873; color: #F7C873; }
.ring.off .ring-fg { stroke: none; }
.ring.off .ring-bg { stroke-dasharray: 2 6; stroke-width: 6; stroke: rgba(255, 255, 255, .22); }
.ring-tick { stroke: var(--peach); stroke-width: 3; stroke-linecap: round; }
.ring-v { font-size: var(--fs-7); font-weight: 700; fill: #fff; letter-spacing: -.03em; }
.ring.off .ring-v { fill: rgba(255, 255, 255, .4); }
.ring-t { min-width: 0; }
.ring-l { font-weight: 600; font-size: var(--fs-4); color: #fff; letter-spacing: -.01em; }
.ring-s { margin-top: 4px; font-size: var(--fs-3); line-height: 1.4; color: rgba(255, 255, 255, .58); }
.ring-s .link { color: var(--peach); text-decoration: underline; text-underline-offset: 3px; }
.attn-head { display: flex; align-items: center; gap: 8px; }
.count-dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); display: grid; place-items: center; font-size: var(--fs-2); font-weight: 700; background: var(--peach-soft); color: var(--peach-ink); }
ul.attn { list-style: none; margin: 10px -6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
ul.attn li button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: var(--r-3); text-align: left; font-weight: 500; color: var(--ink); transition: background .15s; }
ul.attn li button:hover { background: var(--hover); }
ul.attn li button::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--watch); box-shadow: 0 0 0 4px var(--watch-bg); }
ul.attn li.bad button::before { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
ul.attn .i { color: var(--muted); margin-left: auto; width: 16px; height: 16px; transition: transform .15s, color .15s; }
ul.attn li button:hover .i { transform: translateX(2px); color: var(--ink); }
.calm { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; }
.calm > span { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--good-bg); color: var(--good); flex: none; }
.calm b { font-weight: 600; } .calm p { margin: 1px 0 0; color: var(--muted); font-size: var(--fs-3); }
.live-strip { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 22px; align-items: center; }
.live-strip .hint { grid-column: 2 / -1; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(18, 151, 106, .5); animation: pulse 2s infinite; grid-row: span 2; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(18, 151, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 151, 106, 0); } }
label.signer { display: flex; align-items: center; gap: 8px; font-size: var(--fs-3); color: var(--muted); white-space: nowrap; }
label.signer input { width: 170px; }
ul.month-close { list-style: none; margin: 10px 0 0; padding: 0; }
ul.month-close li { display: grid; grid-template-columns: 170px 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line-2); }
.mc-name { font-weight: 600; padding-top: 3px; } .mc-act { display: flex; gap: 8px; }
.tl-form { display: grid; grid-template-columns: 150px 150px 1fr 150px auto; gap: 8px; margin: 10px 0 6px; }
.tl-form .tl-tags { grid-column: 1 / -1; }
ul.tl-list { list-style: none; margin: 8px 0 0; padding: 0; }
ul.tl-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
ul.tl-list li .muted { margin-left: auto; font-size: var(--fs-2); }
.marker-tip { position: absolute; top: 2px; max-width: 220px; padding: 6px 10px; border-radius: var(--r-2); background: var(--tooltip); color: #fff; font-size: var(--fs-2); line-height: 1.35; pointer-events: none; z-index: 2; }

/* ---------- Proof sheet ---------- */
.proof-value { font-size: var(--fs-9); font-weight: 700; letter-spacing: -.03em; margin: 10px 0 4px; }
.proof-how { color: var(--ink-2); margin: 0 0 12px; }
.proof-check { padding: 10px 12px; border-radius: var(--r-2); font-weight: 500; font-size: var(--fs-3); }
.proof-check.ok { background: var(--good-bg); color: var(--good); } .proof-check.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------- ⌘K ---------- */
.pill.icon-only { padding: 0 10px; gap: 6px; } .pill.icon-only kbd { font-size: var(--fs-1); }
.cmdk { position: fixed; inset: 0; z-index: 95; background: rgba(9, 14, 28, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.cmdk-box { width: min(640px, calc(100vw - 32px)); background: var(--card); border-radius: var(--r-4); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; animation: pop .16s ease-out; }
@keyframes pop { from { transform: scale(.98) translateY(-4px); opacity: 0; } }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-in input { flex: 1; border: 0 !important; box-shadow: none !important; background: none; font-size: var(--fs-5); padding: 4px 0; color: var(--ink); }
#cmdk-list { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow: auto; }
#cmdk-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-2); cursor: pointer; }
#cmdk-list li.on, #cmdk-list li:hover { background: var(--hover); }
#cmdk-list li.on { box-shadow: inset 3px 0 0 var(--peach); }
#cmdk-list .k { width: 74px; flex: none; font-size: var(--fs-1); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
#cmdk-list .l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#cmdk-list .h { font-size: var(--fs-2); color: var(--muted); }

/* ---------- Premium layer (Oct 2026): warm backdrop, frosted panels, pastel tiles ----------
   Everything here is driven by the --p-* tokens below so dark mode only has to swap tokens. */
:root {
  --p-page: radial-gradient(1200px 700px at 105% -10%, #BAE9F1 0%, rgba(186, 233, 241, 0) 60%),
            radial-gradient(1000px 700px at -15% 30%, #E2E6F6 0%, rgba(226, 230, 246, 0) 60%),
            radial-gradient(900px 600px at 60% 120%, #EFE3EE 0%, rgba(239, 227, 238, 0) 60%),
            linear-gradient(180deg, #F0F4F6 0%, #EBF0F1 100%);
  --p-glass: rgba(255, 255, 255, .7); --p-glass-strong: rgba(255, 255, 255, .86); --p-edge: rgba(255, 255, 255, .85);
  --p-shadow: 0 1px 1px rgba(44, 34, 60, .04), 0 22px 44px -28px rgba(44, 34, 60, .28);
  --p-shadow-hover: 0 1px 1px rgba(44, 34, 60, .05), 0 30px 56px -28px rgba(44, 34, 60, .36);
  --p-r: 22px;
  --p-t1: linear-gradient(150deg, #E7F7FE 0%, #89EAF2 100%);   /* peach */
  --p-t2: linear-gradient(150deg, #EFF3FF 0%, #C9D6FA 100%);   /* sky */
  --p-t3: linear-gradient(150deg, #FCF1F7 0%, #EDD5EA 100%);   /* blush */
  --p-t4: linear-gradient(150deg, #EFFAF5 0%, #CBEBDD 100%);   /* mint */
  --p-t5: linear-gradient(150deg, #FBF7EC 0%, #F0E2BE 100%);   /* sand */
  --p-tile-edge: rgba(255, 255, 255, .7); --p-tile-ink: #1A2240;
  --p-dark: radial-gradient(420px 220px at 100% 0%, rgba(232, 101, 74, .28), transparent 60%), linear-gradient(150deg, #24345F 0%, #141E3A 55%, #0E1630 100%);
}
body { background: var(--p-page); }

/* Floating sidebar */
.rail { top: 12px; bottom: 12px; left: 12px; border-radius: var(--r-4); border: 1px solid var(--p-edge); background: var(--p-glass-strong);
 box-shadow: var(--p-shadow); }
.rail.open { box-shadow: var(--shadow-lg); }
.nav { border-radius: var(--r-3); }
.nav.active { background: linear-gradient(150deg, #24345F, var(--navy)); }
.nav.active::after { left: auto; right: 8px; top: 50%; bottom: auto; width: 6px; height: 6px; border-radius: 50%; transform: translateY(-50%); }
main { margin-left: calc(var(--rail) + 24px); padding-left: 20px; }
.bar { background: transparent; border-bottom: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent); mask-image: linear-gradient(180deg, #000 80%, transparent); padding-bottom: 20px; }
h1 { font-size: var(--fs-7); font-weight: 600; letter-spacing: -.03em; }

/* Frosted cards */
.card { background: var(--p-glass); border: 1px solid var(--p-edge); border-radius: var(--p-r); padding: 20px;
 box-shadow: var(--p-shadow); }
.card:hover { box-shadow: var(--p-shadow-hover); }
.grid { gap: 18px; }
.vhead h3, .card h3 { letter-spacing: -.015em; }

/* Pills, segments, tabs, buttons: glass with a dark active state */
.pill, .seg, .btn { background: var(--p-glass-strong); border-color: var(--p-edge); box-shadow: 0 1px 2px rgba(44, 34, 60, .06), 0 6px 16px -10px rgba(44, 34, 60, .2); }
.pill.dark, .btn.primary { background: linear-gradient(150deg, #24345F, var(--navy)); border-color: transparent; }
.tabs { background: var(--p-glass-strong); border: 1px solid var(--p-edge); border-radius: var(--r-pill); padding: 4px; display: inline-flex; box-shadow: 0 1px 2px rgba(44, 34, 60, .06); }
.tabs button.on { background: linear-gradient(150deg, #24345F, var(--navy)); }

/* Tiles: one dark hero, the rest in soft pastels (cycle of five) */
.kpi, .stat { border: 1px solid var(--p-tile-edge); color: var(--p-tile-ink); box-shadow: 0 1px 1px rgba(44, 34, 60, .04), 0 18px 36px -26px rgba(44, 34, 60, .35); }
.kpi { border-radius: var(--p-r); }
.stat { border-radius: var(--r-4); padding: 14px 16px; }
.kpis > .kpi:nth-child(5n+1), .stats-row > .stat:nth-child(5n+1) { background: var(--p-t1); }
.kpis > .kpi:nth-child(5n+2), .stats-row > .stat:nth-child(5n+2) { background: var(--p-t2); }
.kpis > .kpi:nth-child(5n+3), .stats-row > .stat:nth-child(5n+3) { background: var(--p-t3); }
.kpis > .kpi:nth-child(5n+4), .stats-row > .stat:nth-child(5n+4) { background: var(--p-t4); }
.kpis > .kpi:nth-child(5n+5), .stats-row > .stat:nth-child(5n+5) { background: var(--p-t5); }
.kpi .l, .stat .k, .kpi .sub, .stat .s { color: rgba(26, 34, 64, .62); }
.kpi .v { font-size: var(--fs-8); font-weight: 600; letter-spacing: -.035em; }
.stat .v { font-size: var(--fs-7); font-weight: 600; letter-spacing: -.03em; }
.kpis > .kpi.hero, .stats-row > .stat.main { background: var(--p-dark); color: #fff; border-color: transparent; box-shadow: 0 2px 4px rgba(34, 26, 69, .12), 0 22px 40px -20px rgba(34, 26, 69, .6); }
.kpi.hero .l, .kpi.hero .sub, .stat.main .k, .stat.main .s { color: rgba(255, 255, 255, .72); }
.stat.end-self { background: none !important; border: 0; box-shadow: none; }

/* Home hero and rings */
.home-hero { border-radius: var(--r-5); background: var(--p-dark); }
.ring-card { border-radius: var(--r-4); }

/* Tables: airy rows */
table.grid th { background: transparent; }
table.grid td { border-bottom-color: rgba(26, 34, 64, .06); }
table.grid tbody tr:hover td { background: rgba(255, 255, 255, .55); }
.tag { border-radius: var(--r-pill); }
@media (max-width: 720px) { main { margin-left: 0; padding-left: 16px; } .rail { transform: translateX(calc(-100% - 16px)); } .rail.open { transform: none; } .tabs { display: flex; border-radius: var(--r-4); } }


/* ---------- Phone ---------- */
@media (max-width: 900px) {
  .rings { grid-template-columns: 1fr; gap: 8px; }
  svg.ring { width: 80px; height: 80px; }
  .home-line { font-size: var(--fs-6); }
  .home-hero::before { width: 280px; height: 280px; right: -80px; top: -70px; }
  ul.month-close li { grid-template-columns: 1fr; gap: 6px; }
  .tl-form { grid-template-columns: 1fr 1fr; } .tl-form input[name=title] { grid-column: 1 / -1; }
  .live-strip { grid-template-columns: auto 1fr; } .live-strip .hint { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .home-hero { padding: 22px 18px 18px; }
  .hero-head { flex-wrap: wrap; }
  .hero-eyebrow i, .hero-eyebrow span:last-child { display: none; }
  .ring-card { gap: 14px; padding: 12px 14px; }
  svg.ring { width: 72px; height: 72px; }
  .bar { position: static; }
  .bar .tools { flex-wrap: wrap; gap: 6px; }
  #search-btn, #present-btn { display: none; }
  .bar .seg button { padding: 0 9px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  label.signer { white-space: normal; }
  .proof-value { font-size: var(--fs-8); }
}
ul.checklist .ck-body { flex: 1; min-width: 0; }
ul.checklist .ck-body > .toolbar { justify-content: flex-start; }
.ck-open { margin-top: 10px; }
p.ck-how { margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r-2); background: var(--bg); box-shadow: var(--well); color: var(--ink-2); }
ul.checklist tr.muted td { color: var(--muted); }
/* Clear a check or an issue (Fix in Semble): the reason box opens in place, and a check that came back says so. */
.ck-clear, .issue-clear { display: none; margin-top: 10px; max-width: 640px; }
ul.checklist li.clearing .ck-clear, .issue.clearing .issue-clear { display: flex; flex-direction: column; gap: 6px; }
.ck-clear .lab, .issue-clear .lab { font-weight: 600; font-size: var(--fs-3); display: block; }
.ck-clear input, .issue-clear input { width: 100%; }
.ck-clear .toolbar, .issue-clear .toolbar { justify-content: flex-start; margin-top: 4px; }
p.ck-changed { color: var(--watch); margin-top: 6px; } p.ck-cleared { margin-top: 6px; }
.ck-must { font-size: var(--fs-2); color: var(--muted); }
tr.link-row { cursor: pointer; } tr.link-row:hover td { background: var(--hover); }


/* ---------- Reception (public/pages-reception.js) and Settings → Reception emails (public/reception-settings.js) ---------- */
.rc-cell { display: inline-block; max-width: 170px; white-space: normal; vertical-align: top; }
.rc-actions { display: inline-flex; gap: 6px; white-space: nowrap; }
.rc-note { display: block; max-width: 260px; margin-top: 2px; white-space: normal; font-size: var(--fs-1); font-weight: 400; color: var(--muted); }
input.days-in { width: 72px; text-align: right; }
.field input[type=time], .field textarea { border: 1px solid var(--t-outline, var(--line)); background: var(--t-solid, var(--card)); border-radius: var(--r-3, var(--r-sm)); padding: 8px 10px; color: var(--ink); }
.field textarea { width: 100%; max-width: 520px; resize: vertical; }
.field input[type=time] { width: 140px; }
pre.mail-preview { margin: 6px 0 0; padding: 12px; overflow-x: auto; white-space: pre-wrap; font: var(--fs-2)/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; border-radius: var(--r-3, var(--r-sm)); border: 1px solid var(--t-outline, var(--line)); }
@media (max-width: 720px) { .rc-actions { flex-direction: column; align-items: stretch; gap: 4px; } .rc-actions .btn.sm { padding: 0 6px; font-size: var(--fs-1); } }

/* Settings → People and roles: one column per role, a select per tab (public/roles-settings.js). */
.roles-grid th, .roles-grid td { vertical-align: top; }
.roles-grid th { white-space: nowrap; }
.roles-grid input.role-name { width: 9.5em; font-weight: 600; }
.roles-grid select { max-width: 9.5em; }
.roles-grid .lab.ck { margin: 0; }
.roles-grid table { width: auto; }
.roles-grid td.wrap { max-width: 380px; }
.roles-grid td.ticks { white-space: nowrap; }
.roles-grid .role-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-weight: 400; }
.roles-grid select.preset { max-width: 9em; }
.roles-grid td.ticks .lab.ck { display: inline-flex; margin-right: 12px; }

#roles ol.steps { margin: 6px 0 8px 18px; padding: 0; }
#roles ol.steps li { margin: 2px 0; }

/* Help ("How do I…?") and settings links: the section the page was opened for is marked for a moment (app.js spotlight). With calm
   movement the outline still shows, without the pulse. */
.card.spotlight { outline: 2px solid var(--accent); outline-offset: 3px; animation: spot 1.2s ease-out 2; }
@keyframes spot { 0% { box-shadow: 0 0 0 0 rgba(232, 101, 74, .45); } 100% { box-shadow: 0 0 0 14px rgba(232, 101, 74, 0); } }
.ask-answer.how-to ol.rq-steps { margin: 8px 0 4px; }

/* What's new (public/whats-new.js): the bell's count, and the list in the side panel. */
.round.news { position: relative; }
.news-n { position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; font-size: 11px; line-height: 17px; text-align: center; color: var(--on-accent); background: var(--accent); }
.news-list { display: grid; gap: 10px; margin-top: 12px; }
.news-item { padding: 12px 14px; border: 1px solid var(--line, rgba(0,0,0,.1)); border-radius: 12px; }
.news-item.is-new { border-color: var(--accent); background: var(--accent-soft); }
.news-item p { margin: 6px 0 8px; }
.news-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-h .muted { margin-left: auto; font-size: var(--fs-2); }
/* Beta (a tab still being built: everyone but the admin sees it). */
.beta-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); vertical-align: middle; }
.beta-note { padding: 10px 16px; }
.beta-note .beta-tag { margin: 0 8px 0 0; }
/* The tour (public/tour.js): the screen dimmed around the part being shown, and a card with the words. */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(10, 14, 20, .55); outline: 2px solid var(--accent); transition: all .25s ease; pointer-events: none; }
.tour.centre { background: rgba(10, 14, 20, .55); }
.tour-card { position: fixed; max-width: 340px; padding: 16px 18px 14px; border-radius: 14px; color: var(--ink); background: var(--card, #fff); box-shadow: 0 12px 40px rgba(0,0,0,.25); transition: left .25s ease, top .25s ease; outline: none; }
.tour.centre .tour-card { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(380px, calc(100vw - 32px)) !important; }
.tour-card h3 { margin: 2px 0 6px; }
.tour-card p { margin: 0 0 12px; }
.tour-n { font-size: var(--fs-2); color: var(--ink-2); }
.tour-btns { display: flex; align-items: center; gap: 6px; }
.tour-btns .sp { flex: 1; }
.news-f { display: flex; gap: 6px; }
.news-empty { margin: 14px 0; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); }
.news-earlier, .news-post { margin-top: 14px; }
.news-earlier > summary, .news-post > summary { font-weight: 600; }
.news-post { padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; }
/* Needs attention while its checks are still being worked out (pages-home.js): a quiet line, no arrow. */
.attn li.attn-wait { padding: 8px 12px; font-size: var(--fs-2); }
