/* Resinen Forecast · mockup stylesheet and design system.
 *
 * Builds on the real suite tokens (../../packages/suite-tokens/tokens.css): every
 * surface, text, border, status and app colour comes from there. This file adds
 * only the FORECAST layer (--fc-*): how the past, the future, the likely range,
 * today and a target look, and the three levels of "how sure".
 *
 * Rules of the forecast layer:
 *  - Past is a solid ink line. Future is a dashed ink line. Never colour a forecast
 *    by app: the app colour is a dot or chip that says where a number came from.
 *  - The likely range is a soft band behind the future line, never a second line.
 *  - Good and bad (green / red) only for a change against plan or last forecast.
 *  - Every forecast number says how sure it is, in words.
 */

:root {
  --font-jakarta: "Plus Jakarta Sans";
  --font-plex-mono: "IBM Plex Mono";
  --font-deva: "Noto Sans Devanagari"; /* the suite stack names it; must be set or every font: rule fails */

  /* ── Forecast layer · light ─────────────────────────────────────── */
  --fc-actual: var(--rs-text-strong);
  --fc-forecast: var(--rs-text-strong);
  --fc-band: oklch(0.55 0.02 60 / 0.13);
  --fc-band-strong: oklch(0.55 0.02 60 / 0.22);
  --fc-today: var(--rs-accent);
  --fc-target: var(--rs-information);
  --fc-grid: var(--rs-border-subtle);
  --fc-axis: var(--rs-text-subtle);
  --fc-danger-zone: oklch(0.645 0.19 27 / 0.08);
  --fc-bar-sure: var(--rs-neutral-800);
  --fc-bar-likely: var(--rs-neutral-400);
  --fc-bar-maybe: var(--rs-neutral-200);

  /* How sure: three steps, said in words, never a bare percentage */
  --fc-sure: var(--rs-positive);
  --fc-fair: var(--rs-notice);
  --fc-rough: var(--rs-text-subtle);

  --fc-dash: 5 4;
  --sidebar-w: 236px;
}
[data-theme="dark"] {
  --fc-band: oklch(0.8 0.02 60 / 0.12);
  --fc-band-strong: oklch(0.8 0.02 60 / 0.2);
  --fc-danger-zone: oklch(0.645 0.19 27 / 0.14);
  --fc-bar-sure: var(--rs-neutral-200);
  --fc-bar-likely: var(--rs-neutral-500);
  --fc-bar-maybe: var(--rs-neutral-800);
}

/* ── Base ────────────────────────────────────────────────────────── */
[hidden] { display: none !important; } /* components set their own display; hidden must still win */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: var(--rs-type-body);
  color: var(--rs-text-normal);
  background: var(--rs-surface-page);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rs-focus-ring); outline-offset: 2px; border-radius: var(--rs-radius-xs); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--rs-text-muted); }
.subtle { color: var(--rs-text-subtle); }
.strong { color: var(--rs-text-strong); font-weight: 600; }
.ph { line-height: 1; flex: none; }

/* ── Shell ───────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--rs-surface-raised); border-right: 1px solid var(--rs-border-subtle);
  padding: var(--rs-space-4) var(--rs-space-3); display: flex; flex-direction: column; gap: var(--rs-space-1);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: var(--rs-radius-sm); background: var(--rs-brand); color: var(--rs-text-on-brand);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.brand b { color: var(--rs-text-strong); font: var(--rs-type-title); display: block; }
.brand span { font: var(--rs-type-caption); color: var(--rs-text-muted); }
.nav-label { font: var(--rs-type-overline); letter-spacing: var(--rs-type-overline-tracking); text-transform: uppercase; color: var(--rs-text-subtle); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--rs-radius-sm);
  font: var(--rs-type-label); color: var(--rs-text-normal);
  transition: background-color var(--rs-duration-quick) var(--rs-easing-standard);
}
.nav a:hover { background: var(--rs-surface-hover); }
.nav a[aria-current="page"] { background: var(--rs-brand-subtle); color: var(--rs-text-strong); font-weight: 600; }
.nav a .ph { font-size: 17px; color: var(--rs-text-muted); }
.nav a .dot { margin-left: auto; }
.side-foot { margin-top: auto; padding-top: var(--rs-space-4); display: flex; gap: 6px; flex-wrap: wrap; }

.main { min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--rs-space-3);
  padding: 10px var(--rs-space-8); background: color-mix(in oklch, var(--rs-surface-page) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--rs-border-subtle);
}
.top .crumbs { font: var(--rs-type-label); color: var(--rs-text-muted); }
.top .crumbs b { color: var(--rs-text-strong); font-weight: 600; }
.top .spacer { flex: 1; }
.content { padding: var(--rs-space-8); max-width: 1320px; display: flex; flex-direction: column; gap: var(--rs-space-6); }

.page-head { display: flex; align-items: flex-end; gap: var(--rs-space-4); flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 260px; }
.eyebrow { font: var(--rs-type-overline); letter-spacing: var(--rs-type-overline-tracking); text-transform: uppercase; color: var(--rs-text-subtle); display: flex; align-items: center; gap: 8px; }
h1 { font: var(--rs-type-heading-lg); letter-spacing: var(--rs-type-heading-lg-tracking); color: var(--rs-text-strong); margin: 6px 0 4px; }
h2 { font: var(--rs-type-heading); letter-spacing: var(--rs-type-heading-tracking); color: var(--rs-text-strong); margin: 0; }
h3 { font: var(--rs-type-title); letter-spacing: var(--rs-type-title-tracking); color: var(--rs-text-strong); margin: 0; }
.lede { font: var(--rs-type-body-lg); color: var(--rs-text-muted); margin: 0; max-width: 68ch; }

/* ── Layout ──────────────────────────────────────────────────────── */
.grid { display: grid; gap: var(--rs-space-4); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.row { display: flex; align-items: center; gap: var(--rs-space-2); }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: var(--rs-space-3); }
.stack-sm { display: flex; flex-direction: column; gap: var(--rs-space-1); }

/* ── Card ────────────────────────────────────────────────────────── */
.card {
  background: var(--rs-surface-raised); border: 1px solid var(--rs-border-subtle); border-radius: var(--rs-radius-lg);
  box-shadow: var(--rs-elevation-low); padding: var(--rs-space-5); min-width: 0;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; gap: var(--rs-space-3); margin-bottom: var(--rs-space-4); }
.card-head .grow { flex: 1; min-width: 0; }
.card-head p { margin: 3px 0 0; color: var(--rs-text-muted); font: var(--rs-type-label); font-weight: 400; }
.card.sunken { background: var(--rs-surface-sunken); box-shadow: none; }
.card.hero { padding: var(--rs-space-6); }

/* ── Forecast number (the big figure + its range) ─────────────────── */
.fnum { display: flex; flex-direction: column; gap: 2px; }
.fnum .label { font: var(--rs-type-label); color: var(--rs-text-muted); display: flex; align-items: center; gap: 6px; }
.fnum .value { font: var(--rs-type-display); letter-spacing: var(--rs-type-display-tracking); color: var(--rs-text-strong); font-variant-numeric: tabular-nums; }
.fnum .value.md { font: var(--rs-type-heading-lg); letter-spacing: var(--rs-type-heading-lg-tracking); }
.fnum .value.sm { font: var(--rs-type-heading); }
.fnum .value .about { font: var(--rs-type-title); color: var(--rs-text-muted); margin-right: 4px; letter-spacing: 0; }
.fnum .range { font: var(--rs-type-caption); color: var(--rs-text-muted); font-variant-numeric: tabular-nums; }

/* Pillar card: one per app, identity shown by a dot and top hairline only */
.pillar { position: relative; display: flex; flex-direction: column; gap: var(--rs-space-3); }
.pillar::before { content: ""; position: absolute; left: 20px; right: 20px; top: -1px; height: 2px; border-radius: 0 0 2px 2px; background: var(--app); }
.pillar .foot { margin-top: auto; padding-top: var(--rs-space-3); border-top: 1px solid var(--rs-border-subtle); font: var(--rs-type-label); font-weight: 400; color: var(--rs-text-muted); }
a.pillar:hover { border-color: var(--rs-border-strong); }

/* App identity */
[data-app="relationships"] { --app: var(--rs-app-relationships); --app-subtle: var(--rs-app-relationships-subtle); --app-border: var(--rs-app-relationships-border); }
[data-app="structure"] { --app: var(--rs-app-structure); --app-subtle: var(--rs-app-structure-subtle); --app-border: var(--rs-app-structure-border); }
[data-app="strength"] { --app: var(--rs-app-strength); --app-subtle: var(--rs-app-strength-subtle); --app-border: var(--rs-app-strength-border); }
[data-app="projects"] { --app: var(--rs-app-projects); --app-subtle: var(--rs-app-projects-subtle); --app-border: var(--rs-app-projects-border); }
[data-app="forecast"] { --app: var(--rs-accent); --app-subtle: var(--rs-accent-subtle); --app-border: var(--rs-accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--app, var(--rs-text-subtle)); display: inline-block; flex: none; }

/* Source chip: "from Strength" */
.src {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 6px; border-radius: var(--rs-radius-pill);
  background: var(--app-subtle); border: 1px solid var(--app-border); font: var(--rs-type-caption); color: var(--rs-text-normal); white-space: nowrap;
}

/* ── Chips, badges, deltas ───────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: var(--rs-radius-pill); font: var(--rs-type-caption); border: 1px solid var(--rs-neutral-border); background: var(--rs-neutral-subtle); color: var(--rs-text-normal); white-space: nowrap; }
.chip.pos { background: var(--rs-positive-subtle); border-color: var(--rs-positive-border); color: var(--rs-positive); }
.chip.neg { background: var(--rs-negative-subtle); border-color: var(--rs-negative-border); color: var(--rs-negative); }
.chip.warn { background: var(--rs-notice-subtle); border-color: var(--rs-notice-border); color: var(--rs-notice); }
.chip.info { background: var(--rs-information-subtle); border-color: var(--rs-information-border); color: var(--rs-information); }
.tier { font: var(--rs-type-overline); letter-spacing: .04em; padding: 2px 6px; border-radius: var(--rs-radius-xs); background: var(--rs-tier-ultra-bg); color: var(--rs-tier-ultra-fg); }
.delta { font: var(--rs-type-label); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 2px; }
.delta.up { color: var(--rs-positive); }
.delta.down { color: var(--rs-negative); }
.delta.flat { color: var(--rs-text-muted); }

/* How sure: three bars + words */
.sure { display: inline-flex; align-items: center; gap: 6px; font: var(--rs-type-caption); color: var(--rs-text-muted); white-space: nowrap; }
.sure i { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sure i b { width: 3px; border-radius: 1px; background: var(--rs-border-strong); }
.sure i b:nth-child(1) { height: 5px; } .sure i b:nth-child(2) { height: 8px; } .sure i b:nth-child(3) { height: 12px; }
.sure.s3 i b { background: var(--fc-sure); }
.sure.s2 i b:nth-child(-n+2) { background: var(--fc-fair); }
.sure.s1 i b:nth-child(1) { background: var(--fc-rough); }

/* ── Buttons, segmented, toggles ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: var(--rs-control-height); padding: 0 14px; border-radius: var(--rs-radius-md);
  font: var(--rs-type-label); font-weight: 600; border: 1px solid var(--rs-border-normal); background: var(--rs-surface-raised); color: var(--rs-text-strong);
  transition: background-color var(--rs-duration-quick) var(--rs-easing-standard), transform var(--rs-duration-instant);
  white-space: nowrap;
}
.btn:hover { background: var(--rs-surface-hover); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--rs-brand); border-color: var(--rs-brand); color: var(--rs-text-on-brand); }
.btn.primary:hover { background: var(--rs-brand-hover); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--rs-surface-hover); }
.btn.sm { height: var(--rs-control-height-sm); padding: 0 10px; font-weight: 500; }
.icon-btn { width: var(--rs-control-height-sm); height: var(--rs-control-height-sm); display: inline-grid; place-items: center; border-radius: var(--rs-radius-sm); color: var(--rs-text-muted); }
.icon-btn:hover { background: var(--rs-surface-hover); color: var(--rs-text-strong); }
.seg { display: inline-flex; padding: 2px; border-radius: var(--rs-radius-md); background: var(--rs-surface-sunken); border: 1px solid var(--rs-border-subtle); }
.seg button { height: calc(var(--rs-control-height-sm) - 2px); padding: 0 10px; border-radius: var(--rs-radius-sm); font: var(--rs-type-label); color: var(--rs-text-muted); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--rs-surface-raised); color: var(--rs-text-strong); box-shadow: var(--rs-elevation-low); font-weight: 600; }

/* ── Lists and tables ────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.list > * { display: flex; align-items: center; gap: var(--rs-space-3); padding: 12px 0; border-top: 1px solid var(--rs-border-subtle); min-height: 44px; }
.list > *:first-child { border-top: 0; padding-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .t { color: var(--rs-text-strong); font: var(--rs-type-body-strong); }
.list .d { color: var(--rs-text-muted); font: var(--rs-type-label); font-weight: 400; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: var(--rs-type-caption); color: var(--rs-text-muted); padding: 10px var(--rs-cell-padding-x); border-bottom: 1px solid var(--rs-border-subtle); white-space: nowrap; background: var(--rs-surface-sunken); }
td { padding: 0 var(--rs-cell-padding-x); height: var(--rs-row-height); border-bottom: 1px solid var(--rs-border-subtle); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--rs-surface-hover); }

/* Progress / completeness bar */
.bar { height: 6px; border-radius: 3px; background: var(--rs-surface-sunken); overflow: hidden; }
.bar > b { display: block; height: 100%; border-radius: 3px; background: var(--app, var(--rs-text-strong)); }
.bar.thick { height: 10px; border-radius: 5px; }

/* ── Insight: the "so what" of a forecast ────────────────────────── */
.insight { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; padding: var(--rs-space-4); border-radius: var(--rs-radius-lg); border: 1px solid var(--rs-border-subtle); background: var(--rs-surface-raised); }
.insight .ico { grid-row: span 3; width: 34px; height: 34px; border-radius: var(--rs-radius-md); display: grid; place-items: center; font-size: 18px; background: var(--rs-neutral-subtle); color: var(--rs-text-strong); }
.insight.neg .ico { background: var(--rs-negative-subtle); color: var(--rs-negative); }
.insight.warn .ico { background: var(--rs-notice-subtle); color: var(--rs-notice); }
.insight.pos .ico { background: var(--rs-positive-subtle); color: var(--rs-positive); }
.insight .t { font: var(--rs-type-body-strong); color: var(--rs-text-strong); }
.insight .d { color: var(--rs-text-muted); }
.insight .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

/* Driver: "why the number is what it is" */
.drivers { display: flex; flex-direction: column; gap: 10px; }
.driver { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.driver .w { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--rs-surface-sunken); position: relative; }
.driver .w b { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: var(--app, var(--rs-text-strong)); }
.driver .n { font: var(--rs-type-label); color: var(--rs-text-normal); display: flex; align-items: center; gap: 8px; min-width: 0; }
.driver .v { font: var(--rs-type-label); font-weight: 600; color: var(--rs-text-strong); font-variant-numeric: tabular-nums; }

/* Data gap nudge: fill this, forecast gets better */
.nudge { display: flex; align-items: center; gap: var(--rs-space-3); padding: 12px 14px; border-radius: var(--rs-radius-md); border: 1px dashed var(--rs-border-strong); background: var(--rs-surface-raised); }
.nudge .grow { flex: 1; min-width: 0; }
.nudge .gain { font: var(--rs-type-caption); color: var(--rs-positive); white-space: nowrap; }

/* Callout strip for brand moments (saffron is allowed here only) */
.callout { display: flex; align-items: center; gap: var(--rs-space-4); padding: var(--rs-space-4) var(--rs-space-5); border-radius: var(--rs-radius-lg); background: var(--rs-accent-subtle); border: 1px solid color-mix(in oklch, var(--rs-accent) 35%, transparent); }
.callout .ph { font-size: 22px; color: var(--rs-accent); }

/* Legend */
.legend { display: flex; gap: var(--rs-space-4); flex-wrap: wrap; font: var(--rs-type-caption); color: var(--rs-text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-actual { width: 16px; height: 2px; background: var(--fc-actual); }
.lg-forecast { width: 16px; height: 0; border-top: 2px dashed var(--fc-forecast); }
.lg-band { width: 14px; height: 10px; background: var(--fc-band-strong); border-radius: 2px; }
.lg-target { width: 16px; height: 0; border-top: 1.5px dotted var(--fc-target); }
.lg-sq { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }

/* ── Charts (SVG drawn by forecast.js) ───────────────────────────── */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.c-grid { stroke: var(--fc-grid); stroke-width: 1; }
.c-axis { fill: var(--fc-axis); font: 500 11px var(--rs-font-sans); font-variant-numeric: tabular-nums; }
.c-actual { fill: none; stroke: var(--fc-actual); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-forecast { fill: none; stroke: var(--fc-forecast); stroke-width: 2; stroke-dasharray: var(--fc-dash); stroke-linejoin: round; stroke-linecap: round; }
.c-alt { fill: none; stroke: var(--rs-information); stroke-width: 2; stroke-dasharray: var(--fc-dash); }
.c-band { fill: var(--fc-band); }
.c-today { stroke: var(--fc-today); stroke-width: 1.5; }
.c-today-label { fill: var(--fc-today); font: 600 11px var(--rs-font-sans); }
.c-target { stroke: var(--fc-target); stroke-width: 1.5; stroke-dasharray: 2 3; fill: none; }
.c-target-label { fill: var(--fc-target); font: 600 11px var(--rs-font-sans); }
.c-danger { fill: var(--fc-danger-zone); }
.c-danger-line { stroke: var(--rs-negative); stroke-width: 1; stroke-dasharray: 2 3; }
.c-danger-label { fill: var(--rs-negative); font: 600 11px var(--rs-font-sans); }
.c-point { fill: var(--rs-surface-raised); stroke: var(--fc-forecast); stroke-width: 2; }
.c-point.neg { stroke: var(--rs-negative); }
.c-note { fill: var(--rs-text-strong); font: 600 12px var(--rs-font-sans); font-variant-numeric: tabular-nums; }
.c-note-sub { fill: var(--rs-text-muted); font: 500 11px var(--rs-font-sans); }
.c-bar-sure { fill: var(--fc-bar-sure); }
.c-bar-likely { fill: var(--fc-bar-likely); }
.c-bar-maybe { fill: var(--fc-bar-maybe); }
.c-bar-in { fill: var(--rs-positive); opacity: .85; }
.c-bar-out { fill: var(--rs-negative); opacity: .75; }
.c-cap { stroke: var(--rs-text-strong); stroke-width: 2; stroke-dasharray: 4 3; fill: none; }
.c-hover { stroke: var(--rs-border-strong); stroke-width: 1; }
.tip {
  position: absolute; pointer-events: none; background: var(--rs-surface-inverse); color: var(--rs-text-inverse); padding: 6px 10px; border-radius: var(--rs-radius-sm);
  font: var(--rs-type-caption); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); opacity: 0; transition: opacity var(--rs-duration-quick); z-index: 3;
  font-variant-numeric: tabular-nums;
}
.tip.on { opacity: 1; }
.spark { width: 100%; height: 36px; display: block; }

/* Heat cells (load per team per week) */
.heat { display: grid; gap: 3px; font: var(--rs-type-caption); }
.heat .h { height: 30px; border-radius: var(--rs-radius-xs); display: grid; place-items: center; font-variant-numeric: tabular-nums; color: var(--rs-text-normal); }
.heat .lbl { color: var(--rs-text-muted); display: flex; align-items: center; padding-right: 8px; white-space: nowrap; }
.h0 { background: var(--rs-surface-sunken); }
.h1 { background: var(--rs-positive-subtle); }
.h2 { background: color-mix(in oklch, var(--rs-notice-subtle) 60%, var(--rs-notice-border)); }
.h3 { background: var(--rs-notice-border); }
.h4 { background: var(--rs-negative-border); color: var(--rs-text-strong); font-weight: 600; }

/* Timeline of jobs: promised vs likely */
.lanes { display: flex; flex-direction: column; gap: 2px; }
.lane { display: grid; grid-template-columns: 220px 1fr 110px; align-items: center; gap: 12px; min-height: 44px; border-top: 1px solid var(--rs-border-subtle); }
.lane:first-child { border-top: 0; }
.lane .track { position: relative; height: 22px; }
.lane .seg-b { position: absolute; top: 7px; height: 8px; border-radius: 4px; background: var(--rs-neutral-300); }
.lane .seg-b.done { background: var(--rs-text-strong); }
.lane .rng { position: absolute; top: 4px; height: 14px; border-radius: 7px; background: var(--fc-band-strong); }
.lane .promise { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fc-target); }
.lane .likely { position: absolute; top: 5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--rs-surface-raised); border: 2px solid var(--rs-text-strong); }
.lane .likely.late { border-color: var(--rs-negative); }
.lane .todayline { position: absolute; top: -6px; bottom: -6px; width: 1.5px; background: var(--fc-today); }

/* Slider (what-if levers) */
.lever { display: flex; flex-direction: column; gap: 8px; padding: 14px 0; border-top: 1px solid var(--rs-border-subtle); }
.lever:first-child { border-top: 0; padding-top: 0; }
.lever .row b { color: var(--rs-text-strong); font: var(--rs-type-body-strong); }
.lever output { margin-left: auto; font: var(--rs-type-label); font-weight: 600; color: var(--rs-text-strong); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--rs-brand); }
.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: var(--rs-border-strong); transition: background-color var(--rs-duration-quick); pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--rs-neutral-0); transition: transform var(--rs-duration-quick) var(--rs-easing-standard); box-shadow: var(--rs-elevation-low); }
.switch input:checked + span { background: var(--rs-brand); }
.switch input:checked + span::after { transform: translateX(14px); background: var(--rs-surface-raised); }

/* Compare: before → after */
.compare { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px 16px; align-items: baseline; }
.compare .k { color: var(--rs-text-muted); font: var(--rs-type-label); font-weight: 400; }
.compare .a { color: var(--rs-text-muted); font-variant-numeric: tabular-nums; text-align: right; }
.compare .b { color: var(--rs-text-strong); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

/* Design-system page bits */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--rs-space-3); }
.sw { border: 1px solid var(--rs-border-subtle); border-radius: var(--rs-radius-md); overflow: hidden; background: var(--rs-surface-raised); }
.sw .c { height: 56px; background: var(--c); }
.sw .m { padding: 8px 10px; font: var(--rs-type-caption); color: var(--rs-text-muted); }
.sw .m b { display: block; color: var(--rs-text-strong); font-weight: 600; margin-bottom: 2px; }
.sw code, code { font-family: var(--rs-font-mono); font-size: 11.5px; }
.spec { display: grid; grid-template-columns: 180px 1fr; gap: 0; }
.spec > * { padding: 12px 0; border-top: 1px solid var(--rs-border-subtle); }
.spec > :nth-child(-n+2) { border-top: 0; }
.spec dt { color: var(--rs-text-muted); font: var(--rs-type-label); }
.spec dd { margin: 0; }
.do, .dont { border-radius: var(--rs-radius-md); padding: 12px 14px; border: 1px solid; }
.do { border-color: var(--rs-positive-border); background: var(--rs-positive-subtle); }
.dont { border-color: var(--rs-negative-border); background: var(--rs-negative-subtle); }
.do b { color: var(--rs-positive); } .dont b { color: var(--rs-negative); }
.toc { display: flex; gap: 6px; flex-wrap: wrap; }
section[id] { scroll-margin-top: 70px; }
.sec-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: var(--rs-space-4); }
.sec-title .n { font: var(--rs-type-overline); color: var(--rs-text-subtle); }

/* Mockup banner */
.mock-note { font: var(--rs-type-caption); color: var(--rs-text-muted); display: flex; align-items: center; gap: 6px; }

/* ── Phone width ─────────────────────────────────────────────────── */
.menu-btn { display: none; }
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1, .g-1-2, .g3 { grid-template-columns: 1fr; }
  .g-2-1 > *, .g-1-2 > *, .g3 > * { grid-column: 1 / -1 !important; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 20; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform var(--rs-duration-moderate) var(--rs-easing-standard); box-shadow: var(--rs-elevation-high); }
  body.nav-open .side { transform: none; }
  .menu-btn { display: inline-grid; }
  .top { padding: 10px var(--rs-space-4); }
  .top .hide-sm { display: none; }
  .content { padding: var(--rs-space-4); gap: var(--rs-space-4); }
  .g2, .g4 { grid-template-columns: 1fr; }
  .fnum .value { font: var(--rs-type-heading-lg); }
  .lane { grid-template-columns: 1fr; gap: 4px; padding: 8px 0; }
  .spec { grid-template-columns: 1fr; }
  .spec dd { border-top: 0; padding-top: 0; }
  .compare { gap: 6px 10px; }
  .btn { white-space: normal; height: auto; min-height: var(--rs-control-height); }
  .btn.sm { min-height: var(--rs-control-height-sm); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ── App layout: sidebar + slim top bar ─────────────────────────────
   Sidebar: workspace switcher, search, pages with live signals, saved
   what-ifs, forecast quality, the person (with the display menu). It folds
   to an icon rail on wide screens and becomes a drawer on small ones. */
:root { --sidebar-w: 272px; }
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; z-index: 20; height: 100vh; display: flex; flex-direction: column; gap: 10px;
  padding: 12px 10px; overflow: hidden auto; scrollbar-width: none;
  background: var(--side-bg, var(--rs-surface-raised)); border-right: 1px solid var(--rs-border-subtle);
}
.side > *, .side-bottom > * { flex-shrink: 0; }
.side-top { display: flex; align-items: center; gap: 2px; }
.ws { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--rs-radius-md); text-align: left; }
.ws:hover { background: var(--rs-surface-hover); }
.ws-logo {
  width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--ws-logo-bg, var(--rs-brand)); color: var(--ws-logo-fg, var(--rs-text-on-brand)); font: 700 12px/1 var(--rs-font-sans); letter-spacing: .03em;
}
.ws-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ws-text b { font: 600 13.5px/18px var(--rs-font-sans); color: var(--rs-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-text span { font: var(--rs-type-caption); color: var(--rs-text-muted); white-space: nowrap; }
.ws > .ph { margin-left: auto; color: var(--rs-text-subtle); font-size: 14px; }
.collapse-btn .ph { transition: transform var(--rs-duration-moderate) var(--rs-easing-standard); }

.search {
  display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px; margin: 2px 0 4px;
  border-radius: var(--rs-radius-md); border: 1px solid var(--rs-border-normal); background: var(--rs-surface-page);
  color: var(--rs-text-subtle); font: var(--rs-type-label); font-weight: 400; text-align: left;
  transition: border-color var(--rs-duration-quick);
}
.search:hover { border-color: var(--rs-border-strong); color: var(--rs-text-muted); }
.search .ph { font-size: 16px; }
.search kbd { margin-left: auto; font: 500 10.5px/1 var(--rs-font-mono); padding: 3px 5px; border: 1px solid var(--rs-border-normal); border-radius: 5px; color: var(--rs-text-subtle); }

.side .nav { display: flex; flex-direction: column; gap: 1px; }
.side .nav-label { padding: 14px 10px 6px; font: var(--rs-type-overline); letter-spacing: var(--rs-type-overline-tracking); color: var(--rs-text-subtle); }
.side .nav a {
  position: relative; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--rs-radius-md);
  font: var(--rs-type-label); color: var(--rs-text-normal); transition: background-color var(--rs-duration-quick), color var(--rs-duration-quick);
}
.side .nav a > .ph { font-size: 18px; color: var(--rs-text-muted); width: 22px; text-align: center; }
.side .nav a:hover { background: var(--rs-surface-hover); }
.side .nav a[aria-current="page"] { background: var(--rs-brand-subtle); color: var(--rs-text-strong); font-weight: 600; }
.side .nav a[aria-current="page"] > .ph { color: var(--rs-text-strong); }
.side .nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--app, var(--rs-text-strong));
}
.app-ic { width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid; place-items: center; background: var(--app-subtle); }
.app-ic .ph { font-size: 13px; color: var(--app); }
.side .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side .meta { font: var(--rs-type-caption); color: var(--rs-text-subtle); font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { font: 600 11px/1 var(--rs-font-sans); padding: 4px 7px; border-radius: var(--rs-radius-pill); font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge.neg { background: var(--rs-negative-subtle); color: var(--rs-negative); }
.badge.warn { background: var(--rs-notice-subtle); color: var(--rs-notice); }
.badge.info { background: var(--rs-information-subtle); color: var(--rs-information); }
.pip.info { background: var(--rs-information); }
.pip { display: none; position: absolute; top: 7px; right: 9px; width: 7px; height: 7px; border-radius: 50%; }
.pip.neg { background: var(--rs-negative-intense-bg); } .pip.warn { background: var(--rs-notice-intense-bg); }

.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 10px; }
.health {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 11px; border-radius: var(--rs-radius-lg);
  border: 1px solid var(--rs-border-subtle); background: var(--rs-surface-page); font: var(--rs-type-caption); color: var(--rs-text-muted);
  transition: border-color var(--rs-duration-quick);
}
.health:hover { border-color: var(--rs-border-strong); }
.health > .row b { font: 600 16px/1 var(--rs-font-sans); color: var(--rs-text-strong); font-variant-numeric: tabular-nums; }
.health .bar { height: 5px; }
.health .bar b { background: var(--rs-positive-intense-bg); }
.side .nav-sm a { height: 30px; font-size: 12.5px; color: var(--rs-text-muted); }
.side .nav-sm a > .ph { font-size: 16px; }
.me-wrap { position: relative; border-top: 1px solid var(--rs-border-subtle); padding-top: 6px; }
.me { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--rs-radius-md); text-align: left; }
.me:hover, .me[aria-expanded="true"] { background: var(--rs-surface-hover); }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--avatar-bg, var(--rs-app-relationships-subtle)); color: var(--rs-text-strong); font: 600 11.5px/1 var(--rs-font-sans); }
.me .lbl b { display: block; font: 600 13px/17px var(--rs-font-sans); color: var(--rs-text-strong); }
.me .lbl span { font: var(--rs-type-caption); color: var(--rs-text-muted); }
.me > .ph { color: var(--rs-text-subtle); }
.menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; width: 248px; z-index: 30; display: none; flex-direction: column; gap: 6px; padding: 12px;
  background: var(--rs-surface-overlay); border: 1px solid var(--rs-border-normal); border-radius: var(--rs-radius-lg); box-shadow: var(--rs-elevation-high);
}
.menu.open { display: flex; animation: fc-pop var(--rs-duration-moderate) var(--rs-easing-entrance); }
.menu-label { font: var(--rs-type-caption); color: var(--rs-text-muted); margin-top: 4px; }
.menu .seg { display: flex; width: 100%; }
.menu .seg.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.menu .seg button { flex: 1; height: 28px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 6px; }

/* Folded to an icon rail (wide screens only) */
@media (min-width: 961px) {
  .shell.collapsed { --sidebar-w: 68px; }
  .shell.collapsed .side { padding: 12px 10px; align-items: stretch; overflow: visible; }
  .shell.collapsed .side-top { flex-direction: column; gap: 6px; }
  .shell.collapsed .ws { justify-content: center; padding: 6px 0; }
  .shell.collapsed .collapse-btn .ph { transform: scaleX(-1); }
  .shell.collapsed :is(.ws-text, .ws > .ph, .side .lbl, .search kbd, .health, .side .meta, .side .badge, .me > .ph) { display: none; }
  .shell.collapsed .side .nav-label { font-size: 0; padding: 0; height: 1px; margin: 10px 8px; background: var(--rs-border-subtle); }
  .shell.collapsed :is(.side .nav a, .search, .me) { justify-content: center; padding: 0; }
  .shell.collapsed .pip { display: block; }
  .shell.collapsed .menu { left: 54px; bottom: 0; }
}

/* Slim top bar */
.appbar {
  position: sticky; top: 0; z-index: 5; height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 28px;
  background: color-mix(in srgb, var(--rs-surface-page) 86%, transparent); backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--rs-border-subtle);
}
.appbar .crumbs { display: flex; align-items: center; gap: 7px; font: var(--rs-type-label); color: var(--rs-text-muted); }
.appbar .crumbs .ph { font-size: 11px; color: var(--rs-text-subtle); }
.appbar .crumbs b { color: var(--rs-text-strong); font-weight: 600; }
.appbar .spacer { flex: 1; }
.appbar .icon-btn { position: relative; width: 34px; height: 34px; font-size: 18px; }
.appbar .mock-note { margin-right: 6px; }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--rs-positive-intense-bg); display: inline-block; animation: fc-live 2.4s ease-in-out infinite; }
@keyframes fc-live { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rs-positive-intense-bg) 45%, transparent); } 50% { box-shadow: 0 0 0 4px transparent; } }
.bell-dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--rs-negative-intense-bg); box-shadow: 0 0 0 2px var(--rs-surface-page); }

/* The page */
.content { max-width: 1320px; margin: 0 auto; padding: 28px 32px 72px; gap: 24px; }
.page-head { padding: 6px 0 2px; align-items: flex-end; }
.page-head h1 { margin: 8px 0 6px; text-wrap: balance; }
.content > * { animation: fc-rise .55s var(--rs-easing-entrance) both; }
.content > :nth-child(2) { animation-delay: 60ms; } .content > :nth-child(3) { animation-delay: 120ms; }
.content > :nth-child(4) { animation-delay: 180ms; } .content > :nth-child(n+5) { animation-delay: 240ms; }
@keyframes fc-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes fc-pop { from { opacity: 0; transform: translateY(4px) scale(.98); } }

/* Search palette (Ctrl K) */
.palette { position: fixed; inset: 0; z-index: 60; display: none; justify-content: center; align-items: flex-start; padding-top: 12vh; background: var(--rs-scrim); backdrop-filter: blur(3px); }
.palette.open { display: flex; }
.palette-box { width: min(580px, 92vw); background: var(--rs-surface-overlay); border: 1px solid var(--rs-border-normal); border-radius: var(--rs-radius-xl); box-shadow: var(--rs-elevation-high); overflow: hidden; animation: fc-pop var(--rs-duration-moderate) var(--rs-easing-entrance); }
.palette-in { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--rs-border-subtle); color: var(--rs-text-muted); }
.palette-in .ph { font-size: 18px; }
.palette-in input { flex: 1; border: 0; outline: 0; background: none; font: var(--rs-type-body-lg); color: var(--rs-text-strong); }
.palette-in kbd { font: 500 10.5px/1 var(--rs-font-mono); padding: 3px 5px; border: 1px solid var(--rs-border-normal); border-radius: 5px; color: var(--rs-text-subtle); }
.palette-list { max-height: 52vh; overflow: auto; padding: 6px; }
.palette-list a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--rs-radius-md); }
.palette-list a:hover, .palette-list a.on { background: var(--rs-surface-hover); }
.palette-list a > .ph { font-size: 18px; color: var(--rs-text-muted); }
.palette-list b { display: block; font: var(--rs-type-label); font-weight: 600; color: var(--rs-text-strong); }
.palette-list a span span { font: var(--rs-type-caption); color: var(--rs-text-muted); }

.scrim { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 284px; transform: translateX(-102%); transition: transform var(--rs-duration-moderate) var(--rs-easing-standard); box-shadow: var(--rs-elevation-high); }
  body.nav-open .side { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: var(--rs-scrim); }
  .menu-btn { display: inline-grid; }
  .collapse-btn { display: none; }
}
@media (max-width: 760px) {
  .appbar { padding: 0 12px; }
  .appbar .hide-sm { display: none; }
  .page-head .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .page-head .seg .tier { display: none; }
  .content { padding: 18px 16px 48px; gap: 16px; }
  .card, .card.hero { padding: 18px; }
  .card-head { flex-wrap: wrap; }
  .card-head > .grow { flex: 1 1 100%; }
}

/* ── Kit: toasts, layers (dialog, drawer), menus, forms, done states ── */
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 8px 8px 14px; max-width: min(560px, 92vw);
  background: var(--rs-surface-inverse); color: var(--rs-text-inverse); border-radius: var(--rs-radius-lg); box-shadow: var(--rs-elevation-high);
  font: var(--rs-type-label); animation: fc-toast-in .25s var(--rs-easing-entrance);
}
.toast > .ph { font-size: 18px; color: var(--rs-positive-intense-bg); }
.toast span { flex: 1; }
.toast button { height: 30px; padding: 0 12px; border-radius: var(--rs-radius-sm); font-weight: 600; color: var(--rs-text-inverse); background: color-mix(in srgb, var(--rs-text-inverse) 14%, transparent); }
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; }
@keyframes fc-toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.layer { position: fixed; inset: 0; z-index: 70; background: var(--rs-scrim); opacity: 0; transition: opacity .2s var(--rs-easing-standard); }
.layer.open { opacity: 1; }
.layer-box { position: absolute; background: var(--rs-surface-overlay); border: 1px solid var(--rs-border-normal); box-shadow: var(--rs-elevation-high); color: var(--rs-text-normal); }
.layer.dialog .layer-box { left: 50%; top: 12vh; width: min(520px, 94vw); max-height: 80vh; overflow: auto; border-radius: var(--rs-radius-xl); transform: translate(-50%, 8px) scale(.98); transition: transform .22s var(--rs-easing-entrance); }
.layer.dialog.open .layer-box { transform: translate(-50%, 0); }
.layer.drawer .layer-box { right: 0; top: 0; bottom: 0; width: min(500px, 100vw); border-radius: 0; border-width: 0 0 0 1px; transform: translateX(24px); opacity: 0; transition: transform .26s var(--rs-easing-entrance), opacity .2s; display: flex; }
.layer.drawer.open .layer-box { transform: none; opacity: 1; }
.dlg-head, .drw-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 6px; }
.dlg-head > div, .drw-head .grow { flex: 1; min-width: 0; }
.dlg-head h2, .drw-head h2 { font: var(--rs-type-heading); letter-spacing: var(--rs-type-heading-tracking); color: var(--rs-text-strong); margin: 0; }
.dlg-head p, .drw-head p { margin: 4px 0 0; color: var(--rs-text-muted); }
.dlg-body { padding: 14px 22px 4px; display: flex; flex-direction: column; gap: 14px; }
.dlg-foot, .drw-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px 20px; }
.drw { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.drw-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--rs-border-subtle); }
.drw-head .eyebrow { margin-bottom: 6px; }
.drw-body { flex: 1; overflow: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 18px; }
.drw-foot { border-top: 1px solid var(--rs-border-subtle); }
.btn.danger { background: var(--rs-negative-intense-bg); border-color: var(--rs-negative-intense-bg); color: #fff; }

.popmenu {
  position: fixed; z-index: 80; min-width: 220px; padding: 5px; background: var(--rs-surface-overlay); border: 1px solid var(--rs-border-normal);
  border-radius: var(--rs-radius-lg); box-shadow: var(--rs-elevation-high); animation: fc-pop .16s var(--rs-easing-entrance);
}
.popmenu button, .popmenu a { width: 100%; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--rs-radius-md); font: var(--rs-type-label); color: var(--rs-text-normal); text-align: left; }
.popmenu button:hover, .popmenu a:hover { background: var(--rs-surface-hover); color: var(--rs-text-strong); }
.popmenu .ph { font-size: 17px; color: var(--rs-text-muted); }
.popmenu kbd { margin-left: auto; font: 500 10.5px/1 var(--rs-font-mono); color: var(--rs-text-subtle); }
.popmenu .danger, .popmenu .danger .ph { color: var(--rs-negative); }
.popmenu hr { border: 0; border-top: 1px solid var(--rs-border-subtle); margin: 5px 4px; }
.pm-label { padding: 8px 10px 4px; font: var(--rs-type-caption); color: var(--rs-text-subtle); }

/* Form fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .lbl { font: var(--rs-type-label); color: var(--rs-text-strong); font-weight: 600; }
.field .hint { font: var(--rs-type-caption); color: var(--rs-text-muted); }
.input, .field input:not([type=checkbox]):not([type=range]):not([type=radio]), .field select, .field textarea, select.input {
  height: var(--rs-control-height); padding: 0 12px; border-radius: var(--rs-radius-md); border: 1px solid var(--rs-border-strong);
  background: var(--rs-surface-raised); color: var(--rs-text-strong); font: var(--rs-type-body); width: 100%;
}
.field textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--rs-focus-ring); outline-offset: 1px; border-color: transparent; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money-in { position: relative; } .money-in::before { content: "₹"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--rs-text-muted); }
.money-in input { padding-left: 26px !important; }
.check { display: flex; align-items: center; gap: 10px; font: var(--rs-type-label); color: var(--rs-text-normal); }
.check input { width: 16px; height: 16px; accent-color: var(--rs-brand); }

/* Done, live numbers, sortable headers */
[data-act].is-done { pointer-events: none; color: var(--rs-positive); background: var(--rs-positive-subtle); border-color: var(--rs-positive-border); box-shadow: none; }
[data-act].is-done.primary { background: var(--rs-positive-subtle); color: var(--rs-positive); }
.insight.is-done { opacity: .72; }
.nudge.is-done { border-style: solid; }
.nudge.is-done .gain { opacity: .5; }
.insight.is-done > .t { text-decoration: line-through; text-decoration-color: var(--rs-text-subtle); }
.insight.is-done .ico { background: var(--rs-positive-subtle); color: var(--rs-positive); }
.done-tag { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; font: var(--rs-type-caption); color: var(--rs-positive); text-decoration: none; vertical-align: 1px; }
.done-tag button { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; color: var(--rs-text-muted); }
.bump { animation: fc-bump .6s var(--rs-easing-entrance); }
@keyframes fc-bump { 0% { background: color-mix(in srgb, var(--rs-positive-intense-bg) 28%, transparent); } 100% { background: transparent; } }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--rs-text-strong); }
th.sortable::after { content: "↕"; margin-left: 4px; opacity: .35; font-size: 10px; }
th[data-dir="asc"]::after { content: "↑"; opacity: .9; } th[data-dir="desc"]::after { content: "↓"; opacity: .9; }
tr.clickable { cursor: pointer; }
tr.is-done td { color: var(--rs-text-subtle); }
.empty-row td { text-align: center; color: var(--rs-text-muted); height: 80px; }

/* App chrome: trial banner, create button, notifications, activity */
.banner { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 6px 48px; position: relative; background: var(--rs-accent-subtle); border-bottom: 1px solid var(--rs-border-subtle); font: var(--rs-type-label); font-weight: 400; color: var(--rs-text-normal); text-align: center; }
.banner b { color: var(--rs-text-strong); }
.banner a { font-weight: 600; color: var(--rs-text-strong); text-decoration: underline; text-underline-offset: 3px; }
.banner .icon-btn { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.create { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: var(--rs-radius-md); font: var(--rs-type-label); font-weight: 600; color: var(--create-fg, var(--rs-text-strong)); width: 100%; text-align: left; }
.create:hover { background: var(--rs-surface-hover); }
.create .ph { font-size: 18px; }
.create kbd { margin-left: auto; font: 500 10.5px/1 var(--rs-font-mono); padding: 3px 5px; border: 1px solid var(--rs-border-normal); border-radius: 5px; color: var(--rs-text-subtle); }
.notif { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: start; padding: 12px; border-radius: var(--rs-radius-md); }
.notif:hover { background: var(--rs-surface-hover); }
.notif .t { color: var(--rs-text-strong); font: var(--rs-type-label); }
.notif.unread .t { font-weight: 600; }
.notif .when { grid-column: 2; font: var(--rs-type-caption); color: var(--rs-text-subtle); }
.notif .unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rs-information); margin-top: 6px; }
.logrow { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--rs-border-subtle); }
.logrow:first-child { border-top: 0; }
.logrow .t { font: var(--rs-type-label); color: var(--rs-text-strong); }
.logrow .when { grid-column: 2; font: var(--rs-type-caption); color: var(--rs-text-subtle); }
.logrow .dot { margin-top: 6px; }
.kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; align-items: center; }
.kbd-list kbd { font: 500 11px/1 var(--rs-font-mono); padding: 4px 7px; border: 1px solid var(--rs-border-normal); border-bottom-width: 2px; border-radius: 5px; color: var(--rs-text-strong); justify-self: start; }
.checklist { display: flex; flex-direction: column; }
.checklist > * { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rs-border-subtle); }
.checklist > :first-child { border-top: 0; }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--rs-border-strong); flex: none; font-size: 12px; color: transparent; }
.checklist .on .tick { background: var(--rs-positive-intense-bg); border-color: var(--rs-positive-intense-bg); color: #fff; }
.checklist .on .t { text-decoration: line-through; color: var(--rs-text-subtle); }
.checklist .grow { flex: 1; min-width: 0; }
.checklist .t { font: var(--rs-type-label); color: var(--rs-text-strong); }
.checklist .d { font: var(--rs-type-caption); color: var(--rs-text-muted); }
@media (max-width: 760px) {
  .layer.dialog .layer-box { top: auto; bottom: 0; left: 0; right: 0; width: 100%; transform: translateY(16px); border-radius: var(--rs-radius-xl) var(--rs-radius-xl) 0 0; }
  .layer.dialog.open .layer-box { transform: none; }
  .field-row { grid-template-columns: 1fr; }
  .banner { padding: 6px 44px 6px 12px; justify-content: flex-start; text-align: left; }
}

/* The plan strip on Outlook: the saved what-if you chose, as steps to tick off */
.plan-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px; margin: 4px 0 14px; border-radius: var(--rs-radius-md); background: var(--rs-surface-sunken); font: var(--rs-type-label); color: var(--rs-text-normal); }
.plan-strip > .ph { font-size: 17px; color: var(--rs-text-strong); }
.plan-strip .grow { flex: 1 1 220px; min-width: 0; }
.plan-strip > a { margin-left: auto; }
.plan-strip b { color: var(--rs-text-strong); }
.plan-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-steps .chip { cursor: pointer; }
.plan-steps .chip:hover { border-color: var(--rs-border-strong); }
