/* =====================================================================
   MinuteProof design rules (keep these; they are the whole system)
   - One accent: --accent green, spent only on primary actions, the active
     place and progress. Red and amber are status colors, never decoration.
   - One grey family: the green-tinted cool greys below.
   - Shape lock: buttons --r-sm (squared, like the public site); tags and
     nav are pills; cards and panels --r-lg;
     inputs, menus and tooltips --r-md; small inline marks --r-sm.
   - Elevation: resting surfaces are flat with a hairline border. Only things
     that float (menus, popovers, the sticky save bar) get --shadow.
   - Type: Figtree for everything, headlines included. Emphasis is weight or
     italic of Figtree, never a second family. Numbers use tabular figures.
     Weights 400/500/600/700. Sizes come from the ramp only:
     12 / 13 / 14 / 16 / 18 / 20 / 24 / 32 / 40 / 48, plus clamp()ed
     display sizes for the landing hero and capture timer.
   - Labels are sentence case. No tracked uppercase eyebrows.
   ===================================================================== */
:root {
  --bg: #f2f5f3;
  --surface: #ffffff;
  --fill: #f2f5f3;
  --fill-2: #e8eeea;
  --grey-mid: var(--grey-mid);
  --ink: #17231c;
  --ink-2: #34433a;
  --muted: #5d6d64;
  --muted-2: #8d9b93;
  --line: #dde4df;
  --line-strong: #c9d3cd;
  --accent: #1f7a5c;
  --accent-deep: #155a44;
  --accent-soft: #e6f2ec;
  --accent-line: #c7e2d4;
  --bad: #b8322a;
  --bad-soft: #fcefed;
  --bad-line: #f0cbc6;
  --bad-wash: #fdf7f6;
  --warn: #a5520b;
  --warn-soft: #fdf3e6;
  --warn-line: #f0d6b2;
  --good: #1f7a5c;
  --formula: var(--fill);
  --input: #ffffff;
  --input-line: var(--line-strong);
  --shadow: 0 1px 2px rgba(23, 35, 28, 0.06), 0 8px 24px rgba(23, 35, 28, 0.10);
  --shadow-sm: none;
  --focus: 0 0 0 3px rgba(31, 122, 92, 0.22);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --sans: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;
  --radius: var(--r-lg);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
}
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num, td, .kpi-row b, .hero-figure b, .compare dd { font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 22px 16px;
  background: rgba(242, 245, 243, 0.94);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo {
  display: inline-flex;
}
.brand-right {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.study-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 0;
}
.study-chip strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(52vw, 360px);
}
.study-chip span {
  color: var(--muted);
  font-size: 12px;
}

.stage {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 120px;
}

.sheet-head { margin-bottom: 28px; max-width: 46rem; }
.hero-actions { margin-top: 20px; }
.hero-actions .btn { min-height: 46px; padding: 0 22px; }
.kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
}
.lede, .help { color: var(--muted); }
.lede { margin: 12px 0 0; font-size: 18px; line-height: 1.45; }
.help { margin: 0 0 14px; font-size: 14px; }

.floor-block {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 22px 24px;
  margin: 0 0 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.floor-block h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.floor-block h3 {
  margin: 20px 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.muted-block {
  background: var(--fill);
  box-shadow: none;
}

.floor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}
.floor-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.floor-grid label, .choice {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.wide { grid-column: 1 / -1; }

.in {
  background: var(--input);
  border: 1px solid var(--input-line);
  border-radius: var(--r-md);
  padding: 9px 12px;
  min-height: 42px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.in:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--focus);
}
.in::placeholder { color: var(--muted-2); font-weight: 400; }
.in.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  width: 100%;
}
.floor-grid .in.num { max-width: 11rem; }

.floor-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.floor-table th,
.floor-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 8px;
  text-align: left;
  vertical-align: middle;
}
.floor-table thead th {
  background: var(--fill);
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.floor-table thead th:first-child { border-radius: 0; }
.floor-table thead th:last-child { border-radius: 0; }
.floor-table tbody th { background: var(--fill); font-weight: 600; width: 8rem; }
.floor-table tbody tr:last-child td { border-bottom: 0; }
.floor-table tr.dup td { background: var(--bad-soft); }
.floor-table tr.warn td { background: var(--warn-soft); }
.lookup-id { max-width: 192px; }
.row-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  white-space: nowrap;
}
.formula {
  background: var(--formula);
  text-align: right;
  color: var(--ink-2);
  white-space: nowrap;
  min-width: 4.5rem;
  border-radius: var(--r-sm);
}
.table-scroll {
  overflow-x: auto;
  margin: 0 -6px;
  padding: 0 6px;
}
.floor-table .in {
  min-width: 6.5rem;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: var(--r-md);
}
.floor-table .in.num { min-width: 4.5rem; }

.floor-actions {
  position: sticky;
  bottom: 12px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
  padding: 12px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.row-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.row-title h2 { margin: 0; }
.is-auto { border-style: dashed; }

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.12s var(--ease), background 0.12s var(--ease), border-color 0.12s var(--ease);
}
.btn:hover { background: var(--fill); border-color: var(--line-strong); }
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn.primary:hover { background: var(--accent-deep); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); background: var(--surface); }
.btn.primary:hover { border-color: var(--accent-deep); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { min-height: 32px; font-size: 12px; padding: 0 12px; flex-shrink: 0; }

.study-grid {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.study-grid a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s var(--ease);
}
.study-grid a:hover { border-color: var(--line-strong); }
.study-grid strong {
  display: block;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.study-grid .plant { color: var(--muted); font-size: 14px; flex: 1; }
.study-grid .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.study-grid em { font-style: normal; color: var(--accent-deep); font-weight: 700; }
.empty {
  color: var(--muted);
  padding: 28px;
  text-align: center;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px dashed var(--line-strong);
}

.feed { list-style: none; margin: 24px 0 0; padding: 0; }
.feed li { border-bottom: 1px solid var(--line); }
.feed a {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 4px;
}
.feed a:hover { background: transparent; }
.feed strong { display: block; font-size: 18px; letter-spacing: -0.02em; }
.feed span { color: var(--muted); font-size: 14px; }
.feed .meta { text-align: right; color: var(--muted); }
.feed em { font-style: normal; color: var(--ink); }

.clock {
  font-size: clamp(56px, 12vw, 80px);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.sheet-table { width: 100%; border-collapse: collapse; }
.sheet-table th, .sheet-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.frame {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.flag-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.flag, .banner {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  font-size: 14px;
}
.flag, .banner.error {
  background: var(--bad-soft);
  color: var(--bad);
  border: 1px solid var(--bad-line);
}
.flag.warn, .banner.warn {
  background: var(--warn-soft);
  border-color: var(--warn-line);
  color: var(--warn);
}
.banner.ok {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1px solid var(--accent-line);
  margin-bottom: 16px;
}
.flag.inline {
  display: inline-block;
  margin: 4px 8px 4px 0;
  padding: 6px 10px;
  font-size: 12px;
}
.floor-block.has-err {
  border-color: var(--bad-line);
}
.floor-table tr.err td { background: var(--bad-wash); }
.floor-table tr.gray-travel td.formula { color: var(--muted); }
.formula-box {
  display: flex;
  align-items: center;
  background: var(--formula);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 9px 12px;
  min-height: 42px;
  color: var(--ink-2);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
}
.kpi-row div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--fill);
  border-radius: var(--r-lg);
}
.kpi-row span { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi-row .bad { color: var(--bad); }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.status.amber { background: var(--warn-soft); color: var(--warn); }
.status.red { background: var(--bad-soft); color: var(--bad); }

.alloc-bar {
  display: flex;
  height: 16px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--fill);
  margin: 10px 0 16px;
}
.alloc-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 18px; }
.alloc-legend li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.alloc-legend i { width: 10px; height: 10px; border-radius: var(--r-pill); display: inline-block; }

.picker {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  max-width: 360px;
}
.picker label { width: 100%; }

.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
.account-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.account-meta strong {
  font-size: 13px;
  letter-spacing: -0.02em;
}
.account-meta em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.inline-form { display: inline; }

.steps {
  margin: 8px 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}
.steps li { margin: 8px 0; }
.steps strong { color: var(--ink); }

.is-public .topbar { padding-bottom: 14px; }
.is-public .brand-row {
  margin-bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.is-public .site-actions { justify-self: end; }
.is-public .stage {
  max-width: 1120px;
  padding-top: 40px;
  padding-bottom: 48px;
}
.site-nav,
.site-actions {
  display: flex;
  align-items: center;
  gap: 6px 18px;
  flex-wrap: wrap;
}
.site-nav { justify-content: center; }
.site-actions { justify-content: flex-end; }
.site-nav a,
.site-login {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.site-nav a:hover,
.site-login:hover { color: var(--ink); }
.site-actions .btn.primary { color: #fff; }

.is-landing {
  background: var(--bg);
}
.is-landing .topbar {
  background: transparent;
  border-bottom: none;
  padding: 22px 36px;
}
.is-landing .brand-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.is-landing .site-actions { justify-self: end; }
.is-landing .stage {
  max-width: none;
  padding: 0;
}
.is-landing h1,
.is-landing h2 {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
}
.is-landing h1 {
  font-size: clamp(36px, 5.6vw, 64px);
  max-width: min(16ch, 100%);
  margin: 0 auto;
  padding: 0 8px;
}
.is-landing h2 {
  font-size: clamp(28px, 3.8vw, 42px);
  margin: 0;
}

.sz-wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}
.sz-center { text-align: center; }
.sz-center .sz-lede,
.sz-center h2 { margin-left: auto; margin-right: auto; }
.sz-lede {
  max-width: 38rem;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
}
.sz-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.sz-cta .btn { min-height: 48px; padding: 0 24px; font-size: 16px; }

.sz-hero {
  padding: 108px 24px 0;
  text-align: center;
}
.sz-canvas {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
  width: min(1040px, 100%);
  margin: 64px auto 0;
  padding-bottom: 48px;
}
.sz-float {
  order: 2;
  padding: 18px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: left;
}
.sz-float-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.sz-float h3 { margin: 0 0 12px; font-size: 16px; }
.sz-float ul { margin: 0; padding: 0; list-style: none; }
.sz-float li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.sz-float li::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: var(--r-pill);
  background: var(--fill);
  box-shadow: inset 0 0 0 1.5px var(--line);
  flex: none;
}
.sz-float li.done { color: var(--ink); }
.sz-float li.done::before {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23f4f7f5' stroke-width='1.8' stroke-linecap='round' d='M2.5 6.2 5 8.6 9.5 3.6'/%3E%3C/svg%3E") center / 10px no-repeat;
  box-shadow: none;
}
.sz-float li.on { color: var(--accent-deep); }
.sz-float li.on::before {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.sz-doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 28px 32px 32px;
  text-align: left;
  min-height: 420px;
}
.sz-doc-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.sz-doc h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 22px 0 8px;
  max-width: 16ch;
}
.sz-doc-sub { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.sz-doc-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.sz-doc-kpis em {
  display: block;
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.sz-doc-kpis b {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.sz-doc-bar {
  height: 10px;
  margin: 18px 0 8px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0 8%, var(--grey-mid) 8% 16%, var(--line-strong) 16% 22%, var(--fill-2) 22% 100%);
}
.sz-doc table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.sz-doc th,
.sz-doc td {
  padding: 10px 0;
  text-align: left;
  border-bottom: 1px solid var(--fill);
}
.sz-doc th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.sz-band {
  padding: 96px 0 80px;
  scroll-margin-top: 88px;
}
.sz-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 40px;
  text-align: left;
}
.sz-pillars a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 20px 24px;
  box-shadow: var(--shadow-sm);
  min-height: 180px;
  transition: border-color 0.12s var(--ease);
}
.sz-pillars a:hover { border-color: var(--line-strong); }
.sz-pillars span {
  display: block;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.sz-pillars strong { display: block; font-size: 18px; letter-spacing: -0.02em; }
.sz-pillars p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.sz-chapter {
  padding: 48px 0;
  scroll-margin-top: 88px;
}
.sz-split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px 56px;
  align-items: center;
}
.sz-split.flip { grid-template-columns: 1.1fr 0.9fr; }
.sz-split.flip .sz-copy { order: 2; }
.icon { width: 1em; height: 1em; flex: none; vertical-align: -0.14em; }
.waiting-link .icon { width: 19px; height: 19px; }
.sz-copy .sz-step {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.sz-copy h2 { max-width: 14ch; }
.sz-copy p { color: var(--muted); font-size: 18px; line-height: 1.5; }
.sz-copy .btn { margin-top: 8px; }
.sz-mock {
  min-height: 320px;
  padding: 28px 24px 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  display: flex;
  align-items: flex-end;
}
.sz-mock { background: var(--fill-2); }
.sz-window {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.preview-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 18px;
  background: var(--fill);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 700;
}
.preview-bar em { font-style: normal; color: var(--muted); font-weight: 600; }
.preview-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px 16px 8px;
}
.preview-kpis div {
  background: var(--fill);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.preview-kpis span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.preview-kpis b {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.preview-alloc {
  height: 10px;
  margin: 6px 16px 18px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--accent) 0 8%, var(--grey-mid) 8% 16%, var(--line-strong) 16% 22%, var(--fill-2) 22% 100%);
}
.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.preview-table th,
.preview-table td {
  padding: 10px 16px 14px;
  text-align: left;
  color: var(--muted);
}
.preview-table th {
  font-size: 13px;
  font-weight: 600;
}
.preview-table td { color: var(--ink); font-variant-numeric: tabular-nums; }
.preview-table tr.bad td { background: var(--bad-soft); color: var(--bad); }

.land-tag {
  margin: 0 0 10px;
  color: var(--accent-deep);
  font-size: 14px;
  font-weight: 600;
}

.sz-flow {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  text-align: left;
}
.sz-flow li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 14px 18px;
  box-shadow: var(--shadow-sm);
}
.sz-flow span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
.sz-flow strong { display: block; font-size: 16px; }
.sz-flow p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }


.sz-close {
  padding: 100px 0 80px;
  scroll-margin-top: 88px;
}
.sz-request {
  position: relative;
  width: min(560px, 100%);
  margin: 36px auto 0;
  padding: 26px 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.sz-request .in { width: 100%; }
.sz-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.sz-request-actions .btn { min-height: 46px; padding: 0 22px; }
.sz-request-actions .btn.primary { flex: 1; }
.sz-request .help { margin: 0; }
.owner-tabs { margin: 0 0 16px; }
.owner-request-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.owner-request-head h2 { margin-bottom: 2px; }
.owner-note { margin: 12px 0 16px; padding: 12px 14px; background: var(--fill); border-radius: var(--r-md); white-space: pre-wrap; }
.owner-actions { align-items: center; gap: 10px; }
.owner-actions label.check { margin-right: auto; flex-direction: row; align-items: center; }
.owner-link { width: 100%; }
.sz-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sz-request-done { width: min(560px, 100%); margin: 32px auto 0; }
.sz-creds {
  width: min(520px, 100%);
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.sz-creds dt {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.sz-creds dd {
  margin: 2px 0 0;
  font-weight: 600;
  white-space: nowrap;
}

.sz-foot {
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.sz-foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.6fr 0.6fr;
  gap: 28px;
}
.sz-foot strong { color: var(--ink); font-size: 18px; }
.sz-foot p { margin: 8px 0 0; max-width: 28ch; }
.sz-foot span {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 700;
}
.sz-foot a { display: block; margin: 6px 0; }
.sz-foot a:hover { color: var(--ink); }

.consult-kpis {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.consult-kpis dt {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.consult-kpis dd { margin: 2px 0 0; font-weight: 600; }
.consult-flags {
  margin: 0 0 16px;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 13px;
}
.consult-chat {
  display: flex;
  flex-direction: column;
  padding-bottom: 16px;
}
.consult-log {
  min-height: 260px;
  max-height: 48vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 16px;
  padding-right: 4px;
}
.consult-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
}
.consult-form textarea {
  width: 100%;
  min-height: 72px;
  max-height: 180px;
  resize: vertical;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  outline: none;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
}
.consult-form textarea::placeholder { color: var(--muted-2); }
.consult-form textarea:hover { border-color: var(--line-strong); }
.consult-form textarea:focus {
  border-color: var(--accent);
  box-shadow: var(--focus);
}
.consult-form .btn {
  min-height: 48px;
  min-width: 88px;
  padding: 0 20px;
}

@media (max-width: 860px) {
  .consult-form { grid-template-columns: 1fr; }
  .consult-form .btn { width: 100%; }
}

.auth-wrap { max-width: 28rem; }
.auth-card { margin-top: 8px; }
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.auth-form .btn { margin-top: 4px; }
.demo-note {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

@media (max-width: 1100px) {
  .sz-flow { grid-template-columns: repeat(3, 1fr); }
  .sz-pillars { grid-template-columns: 1fr 1fr; }
  .sz-canvas { grid-template-columns: 1fr; width: min(720px, 100%); }
  .sz-float { order: 0; }
}
@media (max-width: 860px) {
  .floor-grid, .floor-grid.three, .grid-form { grid-template-columns: 1fr; }
  .stage { padding: 24px 16px 96px; }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .study-chip { display: none; }
  .account-meta { display: none; }
  .brand-row { margin-bottom: 10px; }
  .is-public .brand-row,
  .is-landing .brand-row {
    display: flex;
    justify-content: space-between;
  }
  .is-public .site-nav,
  .is-landing .site-nav { display: none; }
  .sz-split,
  .sz-split.flip,
  .sz-foot-grid,
  .sz-doc-kpis,
  .preview-kpis { grid-template-columns: 1fr; }
  .sz-split.flip .sz-copy { order: 0; }
  .is-landing .stage { padding: 0; }
}
@media (max-width: 720px) {
  .sz-flow { grid-template-columns: 1fr 1fr; }
  .sz-pillars,
  .sz-creds { grid-template-columns: 1fr; }
  .sz-request { grid-template-columns: 1fr; padding: 22px 18px 18px; }
  .sz-request-actions .btn { flex: 1 1 100%; }
  .sz-hero { padding-top: 108px; }
  .is-landing h1 { max-width: none; }
}

/* ---- Decision loop ---------------------------------------------------- */
.link { color: var(--accent-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(31, 122, 92, 0.35); }
.muted { color: var(--muted); font-size: 13px; }
.bad { color: var(--bad); }
.good { color: var(--accent-deep); }
.top-gap { margin-top: 12px; }
.form-end { display: flex; align-items: end; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.in.compact { min-height: 34px; padding: 4px 10px; width: auto; }
textarea.in { resize: vertical; font: inherit; line-height: 1.45; }
.mono, code { font-family: var(--mono); font-size: 13px; word-break: break-all; }
.empty.small { padding: 14px; font-size: 14px; }
.inline-h { display: inline; margin: 0; }
details > summary { cursor: pointer; }
details.floor-block > summary { list-style: none; }
details.floor-block > summary::after { content: " ▾"; color: var(--muted); }
.pair { display: flex; gap: 6px; }
.formula-note { margin-top: 12px; font-size: 12px; }

.decision-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.decision-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.12s var(--ease);
}
.decision-card:hover { border-color: var(--line-strong); }
.decision-card.overdue { box-shadow: inset 3px 0 0 var(--bad); }
.decision-card strong { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.decision-card p { margin: 0; color: var(--muted); font-size: 14px; }
.decision-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.kind { font-size: 13px; font-weight: 500; color: var(--muted); }
.decision-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.decision-meta.big { margin-top: 16px; font-size: 14px; align-items: center; }
.decision-meta .save { color: var(--accent-deep); font-weight: 700; }
.decision-meta .cost { color: var(--warn); font-weight: 700; }
.decision-meta .ref { font-family: var(--mono); font-size: 12px; }
.decision-meta .lock { color: var(--warn); font-weight: 600; }
.wide-head { max-width: 60rem; }

.dstatus {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  background: var(--fill);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.dstatus.sent, .dstatus.acknowledged, .dstatus.scheduled, .dstatus.question { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.dstatus.approved, .dstatus.done, .dstatus.held { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent-line); }
.dstatus.rejected, .dstatus.failed, .dstatus.cancelled { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.dstatus.draft { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.dstatus.received { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }

.decision-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 18px; align-items: start; }
.decision-grid.even { grid-template-columns: 1fr 1fr; }
.floor-table.kv th { width: 34%; font-size: 13px; color: var(--muted); }
.floor-table.kv td div + div { margin-top: 2px; }

.message { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; margin: 0 0 12px; background: var(--surface); }
.message.in { background: var(--fill); border-color: var(--line); }
.message header { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.message .subject { margin: 0 0 6px; font-weight: 600; }
.message-edit { display: flex; flex-direction: column; gap: 8px; }
pre.body {
  margin: 0 0 10px;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13.5px/1.5 var(--sans);
  background: var(--fill);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
pre.body.small { font: 12px/1.45 ui-monospace, Menlo, monospace; }
.proposal { border-color: var(--line-strong); }
.proposal blockquote { margin: 12px 0; padding: 8px 12px; border-left: 3px solid var(--accent); color: var(--ink); background: var(--fill); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.meeting { padding: 10px 0; border-bottom: 1px solid var(--line); }
.meeting:last-of-type { border-bottom: 0; }
.attendees { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; margin: 0; }
.attendees legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 4px; }
.scenario-row { display: grid; grid-template-columns: 1.2fr 1.4fr 0.8fr 1fr; gap: 10px; margin-bottom: 10px; }
.scenario-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.kpi-row b.good { color: var(--accent-deep); }
.kpi-row b.bad { color: var(--bad); }

@media (max-width: 900px) {
  .decision-grid, .decision-grid.even { grid-template-columns: 1fr; }
  .scenario-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .scenario-row { grid-template-columns: 1fr; }
}
.floor-grid label.check, .stack label.check, .attendees label.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.attendees label.check .muted { margin-left: auto; }
.kpi-row.compact b { font-size: 20px; }

/* ---------- Navigation: study step bar, results tabs, account menu ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.study-chip { text-decoration: none; padding: 4px 8px; border-radius: var(--r-md); }
.study-chip:hover { background: rgba(255, 255, 255, 0.7); }
.time-it { min-height: 40px; gap: 6px; padding: 0 16px; font-size: 14px; }
.time-it .icon { width: 16px; height: 16px; }

.study-nav {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.study-nav::-webkit-scrollbar { display: none; }
.stepper {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-shrink: 0;
}
.stepper a,
.nav-tail a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px 0 6px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.nav-tail a { padding: 0 12px; }
.stepper a:hover,
.nav-tail a:hover { background: rgba(255, 255, 255, 0.75); color: var(--ink); }
.stepper i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}
.stepper small { font-size: 12px; font-weight: 600; color: var(--muted-2); margin-left: -2px; }
.stepper a.done i { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper a.on,
.nav-tail a.on { background: var(--accent); color: #fff; }
.stepper a.on i { background: var(--surface); border-color: #fff; color: var(--accent-deep); }
.stepper a.on small { color: rgba(255, 255, 255, 0.8); }
.nav-sep { width: 1px; height: 24px; background: var(--line); flex-shrink: 0; }
.nav-tail { display: flex; gap: 4px; flex-shrink: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--warn);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; padding: 4px 6px 4px 4px; border-radius: var(--r-pill); }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:hover,
.account-menu[open] summary { background: rgba(255, 255, 255, 0.8); }
.caret { color: var(--muted); font-size: 12px; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: 240px;
  padding: 8px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.menu-panel a,
.menu-panel button {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-md);
  border: 0;
  background: none;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.menu-panel a:hover,
.menu-panel button:hover { background: var(--fill); }
.menu-panel form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.menu-label {
  margin: 12px 12px 4px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 600;
}
.menu-label:first-child { margin-top: 4px; }

.results-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 22px;
  padding: 4px;
  border-radius: var(--r-pill);
  background: var(--fill-2);
  border: 0;
}
.results-tabs a {
  padding: 7px 16px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.results-tabs a:hover { color: var(--ink); background: var(--surface); }
.results-tabs a.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); }

/* ---------- Utilization: green inside the plant's good range, red outside ---------- */
.status.green { background: var(--accent-soft); color: var(--accent-deep); }
.status.gray { background: var(--fill); color: var(--muted); }
.kpi-row b.red, .kpi-row .red { color: var(--bad); }
.kpi-row b.green { color: var(--accent-deep); }
.floor-table td.util-red { color: var(--bad); font-weight: 700; }
.floor-table td.util-green { color: var(--accent-deep); font-weight: 700; }
.band-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
.band-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.pct-in { display: inline-flex; align-items: center; gap: 6px; }
.pct-in i { font-style: normal; font-weight: 700; color: var(--ink); }
.pct-in .in.num { width: 6.5rem; }
.band-preview {
  display: flex;
  height: 10px;
  margin-top: 16px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--bad-soft);
}
.band-preview .bad-zone { background: var(--bad-soft); }
.band-preview .bad-zone:last-child { flex: 1; }
.band-preview .good-zone { background: var(--accent); }

/* ---------- "So what" summary on result pages ---------- */
.so-what {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: inset 4px 0 0 var(--accent);
}
.so-what.red { box-shadow: inset 4px 0 0 var(--bad); }
.so-what .so-icon { font-size: 24px; line-height: 1.2; }
.so-what h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.02em; }
.so-what p { margin: 0; color: var(--muted); }
.so-what ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink); }
.so-what li { margin: 4px 0; }
.so-what .so-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- Armed delete (click twice) ---------- */
.btn.armed { background: var(--bad); color: #fff; border-color: var(--bad); }

@media (max-width: 860px) {
  .time-it { min-height: 38px; padding: 0 12px; }
  .stepper a { padding-right: 10px; }
  .nav-sep { display: none; }
  .menu-panel { width: min(260px, calc(100vw - 28px)); }
}

/* ---------- Studies home ---------- */
.welcome {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px 28px;
  margin: 0 0 22px;
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}
.welcome > div:first-child { max-width: 40rem; }
.welcome .kicker { margin-bottom: 6px; }
.welcome h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.02em; }
.welcome p { margin: 0; color: var(--muted); }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.study-grid li { position: relative; }
.study-grid strong { padding-right: 84px; }
.study-grid .meta { align-items: center; flex-wrap: wrap; }
.study-grid .open-link { margin-left: auto; }
.study-grid .progress { display: flex; flex-direction: column; gap: 6px; }
.study-grid .progress em { font-size: 13px; font-weight: 600; color: var(--muted); }
.progress-bar { display: block; height: 6px; border-radius: var(--r-pill); background: var(--fill); overflow: hidden; }
.progress-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.study-grid a.time-chip {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--accent-soft);
  border: 0;
  box-shadow: none;
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
}
.study-grid a.time-chip:hover { background: var(--accent); color: #fff; transform: none; }

/* ---------- Capture: built for one hand, gloves and a noisy floor ---------- */
.capture-shell { max-width: 34rem; margin: 0 auto; }
.capture-form { display: flex; flex-direction: column; gap: 16px; }
.cap-what { display: flex; flex-direction: column; gap: 8px; font-size: 16px; font-weight: 700; }
.in.big { min-height: 54px; font-size: 16px; font-weight: 600; }
.capture-shell .clock {
  text-align: center;
  font-size: clamp(64px, 20vw, 104px);
  line-height: 1.05;
  margin: 6px 0 0;
  color: var(--ink);
}
.capture-shell .clock.running { color: var(--accent-deep); }
.laps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.laps li { padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
.cap-buttons { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.cap-btn {
  min-height: 88px;
  border-radius: var(--r-lg);
  border: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: transform 0.1s var(--ease);
}
.cap-btn:active { transform: scale(0.97); }
.cap-btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.cap-btn.go { background: var(--accent); color: #fff; }
.cap-btn.stop { background: var(--bad); color: #fff; }
.cap-btn.lap { background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.cap-btn.save { background: var(--ink); color: #fff; min-height: 72px; font-size: 20px; }
.cap-reset { align-self: center; }
.cap-note { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.cap-note .optional, .cap-details summary span { color: var(--muted); font-weight: 500; font-size: 13px; }
.cap-details { border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(255, 255, 255, 0.6); }
.cap-details summary { cursor: pointer; padding: 14px 16px; font-weight: 700; font-size: 14px; }
.cap-details[open] summary { border-bottom: 1px solid var(--line); }
.cap-details .grid-form { padding: 14px 16px 16px; }
.cap-status { margin: 14px 0 4px; text-align: center; font-weight: 600; color: var(--muted); }
.cap-status.ok { color: var(--accent-deep); }
.cap-foot { text-align: center; }
[hidden] { display: none !important; }
.capture-shell select.in, .capture-shell .in { width: 100%; max-width: 100%; min-width: 0; }
.study-nav { position: relative; }
.stepper a { position: relative; }
.floor-grid > label, .floor-grid > div { min-width: 0; }
.in { max-width: 100%; }
.optional { margin-left: 6px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.flag .code, .flag.inline .code { margin-left: 6px; font-size: 12px; font-weight: 600; opacity: 0.6; font-family: var(--mono); }
.admin-only { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.admin-only summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.admin-only label { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 12px; font-weight: 700; color: var(--muted); }

/* ---------- What-if ---------- */
.presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.presets .help { margin: 0 4px 0 0; }
.chip {
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent-deep); }
.scenario { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.scenario-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(200px, 1fr) minmax(180px, 0.8fr);
  gap: 12px;
  width: 100%;
  align-items: end;
}
.scenario-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; }
.scenario-row .sc-type { font-size: 14px; color: var(--ink); }
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; }
.compare-col { padding: 16px 18px; border-radius: var(--r-lg); background: var(--fill); }
.compare-col.after { background: var(--accent-soft); }
.compare-head { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.compare dl { margin: 0; display: grid; gap: 8px; }
.compare dl div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.compare dt { color: var(--muted); font-size: 14px; }
.compare dd { margin: 0; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; text-align: right; }
.compare dd small { font-size: 12px; font-weight: 700; margin-left: 4px; }
.compare dd.util-red { color: var(--bad); }
.compare dd.util-green { color: var(--accent-deep); }
.compare-arrow { align-self: center; font-size: 24px; color: var(--muted); }
.compare-total { margin: 16px 0 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.compare-total span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.save-decision { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.save-decision .help { margin: 0; }
@media (max-width: 860px) {
  .scenario-row { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .compare-arrow { transform: rotate(90deg); justify-self: center; }
}

/* Keep a focused field clear of the sticky header and the floating Save bar. */
html { scroll-padding-top: 150px; scroll-padding-bottom: 110px; }
.floor-actions { bottom: 10px; padding: 10px; }
.study-grid .status { text-transform: none; }

/* ---------- Deleting studies ---------- */
.study-grid.deletable a:not(.time-chip) { padding-bottom: 58px; }
.card-delete { position: absolute; left: 18px; bottom: 14px; }
.danger-zone { margin-top: 40px; border-color: var(--bad-line); }
.danger-zone h2 { color: var(--bad); }
.study-grid li { display: flex; }
.study-grid li > a:not(.time-chip) { flex: 1; }
.btn.danger.armed, .btn.danger.armed:hover { background: var(--bad); border-color: var(--bad); color: #fff; }

/* =====================================================================
   Quiet fields: plain white inputs, readable values, a clear focus ring.
   ===================================================================== */
.floor-grid label, .choice, .stack label, .grid-form label, .band-row label, .scenario-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.in {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: 9px 12px;
  min-height: 42px;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}
.in:hover { border-color: var(--muted-2); }
.in:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--focus);
}
.in::placeholder { color: var(--muted-2); font-weight: 400; }
select.in {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235d6d64' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.in.num { text-align: right; font-variant-numeric: tabular-nums; }
.floor-grid .in.num { max-width: 9rem; }
.floor-table .in { min-height: 36px; padding: 6px 9px; font-size: 14px; border-radius: var(--r-sm); }
.floor-table select.in { padding-right: 28px; background-position: right 9px center; }
.floor-table .in.num { min-width: 5rem; max-width: 7rem; }
.floor-table td:has(> .in) { padding: 6px 6px; }
.formula-box {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  background: var(--fill);
  border: 1px dashed var(--line-strong);
  color: var(--ink-2);
  font-size: 16px;
  font-weight: 500;
}
/* Units sit inside the box, after the number. */
.unit-in { position: relative; display: inline-flex; align-items: center; width: 100%; max-width: 11rem; }
.unit-in .in { width: 100%; max-width: none; padding-right: 3.2rem; }
.unit-in i {
  position: absolute;
  right: 12px;
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  pointer-events: none;
}

/* =====================================================================
   Report style: calculated numbers read as finished output, not cells.
   ===================================================================== */
.formula {
  background: none;
  border-radius: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.floor-table thead th {
  background: none;
  border-bottom: 1px solid var(--line-strong);
  padding-top: 6px;
  padding-bottom: 8px;
}
.floor-table tbody tr:hover td { background: var(--fill); }
.floor-table tbody th { background: none; color: var(--muted); font-weight: 600; }
.floor-table td.formula.total, .floor-table tr:last-child td.formula[colspan] { font-weight: 700; }
.floor-table td.util-red, .floor-table td.util-green { font-weight: 600; }
.kpi-row div { background: var(--surface); border: 1px solid var(--line); }
.kpi-row b {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi-row b.red { color: var(--bad); }
.kpi-row b.green { color: var(--accent-deep); }

/* =====================================================================
   Hero figure: exactly one per page, sans, large.
   ===================================================================== */
.so-what { gap: 28px; align-items: stretch; padding: 24px 26px; }
.so-what.neutral { box-shadow: inset 4px 0 0 var(--line-strong); }
.hero-figure {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 13rem;
  max-width: 17rem;
  padding-right: 26px;
  border-right: 1px solid var(--line);
}
.hero-figure b {
  font-family: var(--sans);
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.so-what.red .hero-figure b { color: var(--bad); }
.so-what.green .hero-figure b { color: var(--accent-deep); }
.hero-figure span { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.35; }
.hero-figure em { font-style: normal; font-size: 13px; color: var(--muted); }
.so-text { min-width: 0; }
.so-text h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.02em; }
.so-text p { margin: 0; color: var(--muted); }
.so-text ul { margin: 10px 0 0; padding-left: 18px; }
.so-text li { margin: 4px 0; }
.so-text .so-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* =====================================================================
   Crew range bars (bullet-graph style): bar = utilization, band = good range.
   ===================================================================== */
.range-head h2 { margin-bottom: 4px; }
.range-rows { display: grid; gap: 4px; margin-top: 10px; }
.range-row, .range-axis {
  display: grid;
  grid-template-columns: minmax(8rem, 15rem) 1fr 11rem;
  gap: 16px;
  align-items: center;
}
.range-row { padding: 7px 8px; border-radius: var(--r-md); outline: none; }
.range-row:hover, .range-row:focus-visible { background: var(--fill); }
.range-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.range-name b { font-size: 14px; }
.range-name em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.range-track { position: relative; height: 14px; border-radius: var(--r-pill); background: var(--fill); }
.range-band {
  position: absolute;
  top: -5px;
  bottom: -5px;
  border-radius: var(--r-sm);
  background: rgba(31, 122, 92, 0.14);
  box-shadow: inset 0 0 0 1px rgba(31, 122, 92, 0.25);
}
.range-hundred { position: absolute; top: -7px; bottom: -7px; width: 0; border-left: 1px dashed var(--muted-2); }
.range-fill {
  position: absolute;
  left: 0;
  top: 3px;
  height: 8px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--accent);
}
.range-fill.red { background: var(--bad); }
.range-fill.gray { background: var(--muted-2); }
.range-over { position: absolute; right: -14px; top: -5px; color: var(--bad); font-weight: 700; }
.range-value { display: flex; align-items: center; gap: 8px; justify-content: flex-start; }
.range-value b { font-size: 16px; font-variant-numeric: tabular-nums; min-width: 3.2rem; text-align: right; }
.range-axis { padding: 0 8px; margin-bottom: 2px; }
.range-track.ticks { background: none; height: 16px; }
.range-track.ticks i {
  position: absolute;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.range-track.ticks i:first-child { transform: none; }
.range-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  z-index: 5;
  width: max-content;
  max-width: 18rem;
  padding: 8px 11px;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.range-tip b { display: block; font-size: 13px; }
.range-row:hover .range-tip, .range-row:focus-visible .range-tip { opacity: 1; }

/* In-cell share bar on By part: a quiet magnitude cue next to the number. */
.share-bar {
  display: inline-block;
  width: calc(var(--w) * 0.6);
  max-width: 60%;
  height: 6px;
  margin-right: 8px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--accent);
  opacity: 0.55;
  vertical-align: middle;
}

@media (max-width: 860px) {
  .so-what { flex-direction: column; gap: 14px; }
  .hero-figure { border-right: 0; padding-right: 0; max-width: none; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
  .hero-figure b { font-size: 40px; }
  .range-row, .range-axis { grid-template-columns: 1fr; gap: 6px; }
  .range-axis { display: none; }
}
.unit-in .in.num, .floor-grid .unit-in .in.num, .floor-table .unit-in .in.num { max-width: none; width: 100%; }
.floor-table .unit-in { max-width: 9rem; }
.floor-table .in:not(.num) { min-width: 12rem; width: 100%; }

/* ---------- Ideas worth a look ---------- */
.ideas .row-title { align-items: flex-start; gap: 16px; }
.ideas .row-title .help { margin: 4px 0 0; max-width: 46rem; }
.idea-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.idea {
  display: grid;
  grid-template-columns: 1fr 15rem auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.idea.taken { opacity: 0.6; }
.idea-main strong { display: block; font-size: 16px; letter-spacing: -0.01em; margin: 2px 0 4px; }
.idea-main p { margin: 0; color: var(--muted); font-size: 14px; }
.idea-main .kind { margin: 0; }
.idea-record { margin-top: 6px !important; font-size: 13px !important; color: var(--accent-deep) !important; font-weight: 600; }
.ai-tag { color: var(--muted); }
.idea-numbers { display: flex; flex-direction: column; gap: 1px; }
.idea-numbers b { font-size: 18px; }
.idea-numbers span { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .idea { grid-template-columns: 1fr; } }

/* ---------- Waiting on you ---------- */
.waiting-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; }
.waiting-link:hover { background: rgba(255, 255, 255, 0.8); }
.waiting-link .badge { position: absolute; top: -2px; right: -4px; }
.inbox-group { margin-bottom: 26px; }
.inbox-group h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 20px; }
.decide-panel.focus { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

/* ---------- Pipeline board ---------- */
.filter-row { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin: 0 0 18px; }
.filter-row label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 14rem; }
.board { display: grid; grid-template-columns: repeat(6, minmax(14rem, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.board-col { background: rgba(255, 255, 255, 0.55); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 12rem; }
.board-col header h2 { display: flex; align-items: center; justify-content: space-between; margin: 0; font-size: 16px; }
.board-col header p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.board-col .count { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--fill); border-radius: var(--r-pill); padding: 1px 8px; }
.board-col .col-total { color: var(--accent-deep) !important; font-weight: 600; }
.board-card { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.board-card:hover { border-color: var(--line-strong); }
.board-card.overdue { box-shadow: inset 3px 0 0 var(--bad); }
.board-card strong { font-size: 14px; line-height: 1.3; letter-spacing: -0.01em; }
.board-card .kind { font-size: 12px; }
.board-meta { font-size: 12px; color: var(--muted); }
.board-card .save { font-size: 12px; font-weight: 700; color: var(--accent-deep); }
.board-empty { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- Contact timeline ---------- */
.timeline { list-style: none; margin: 8px 0 0; padding: 0 0 0 6px; border-left: 2px solid var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 6.5rem 1fr; gap: 12px; padding: 8px 0 8px 18px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.timeline li.tl-good::before { border-color: var(--accent); background: var(--accent-soft); }
.timeline li.tl-bad::before { border-color: var(--bad); background: var(--bad-soft); }
.timeline li.tl-in::before { border-color: var(--ink); }
.timeline li.tl-out::before { border-color: var(--accent); }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.timeline b { display: block; font-size: 13px; }
.filter-row.compact { margin: 0; } .filter-row.compact select { min-width: 12rem; }
.run-now { display: flex; align-items: center; justify-content: space-between; gap: 16px; } .run-now h2 { margin-bottom: 2px; } .run-now .help { margin: 0; }
.plant-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.plant-chips a { padding: 6px 14px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.plant-chips a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.board { grid-template-columns: repeat(6, minmax(10.5rem, 1fr)); gap: 10px; }
.board-col { padding: 10px; }



.time-it { white-space: nowrap; }

/* ---------- Ask MinuteProof: same building blocks as What-if ---------- */
.ask-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ask-col { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.ask-convo .row-title { align-items: center; gap: 12px; }
.ask-chat-tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ask-chat-tools select { max-width: 15rem; }
.ask-log { display: flex; flex-direction: column; gap: 12px; max-height: 58vh; min-height: 14rem; overflow-y: auto; padding-right: 4px; }
.ask-empty { margin: auto 0; padding: 26px; text-align: center; color: var(--muted); background: var(--fill); border-radius: var(--r-lg); }
.ask-msg { display: flex; flex-direction: column; gap: 4px; max-width: 92%; }
.ask-msg.user { align-self: flex-end; align-items: flex-end; }
.ask-who { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.ask-body { padding: 12px 14px; border-radius: var(--r-lg); font-size: 16px; line-height: 1.55; }
.ask-msg.user .ask-body { background: var(--accent); color: #fff; border-bottom-right-radius: var(--r-sm); }
.ask-msg.assistant .ask-body { background: var(--fill); border: 1px solid var(--line); border-top-left-radius: var(--r-sm); }
.ask-body.error { background: var(--warn-soft) !important; border-color: var(--warn-line) !important; color: var(--warn); }
.ask-body p { margin: 0 0 8px; }
.ask-body p:last-of-type { margin-bottom: 0; }
.ask-body ul, .ask-body ol { margin: 4px 0 8px; padding-left: 20px; }
.ask-body li { margin: 3px 0; }
.ask-body code { font-size: 13px; background: rgba(23, 35, 28, 0.06); padding: 1px 5px; border-radius: var(--r-sm); }
.ask-chips { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ask-chips:empty { display: none; }
.ask-chip {
  display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; text-align: left; font: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.ask-chip:hover { border-color: var(--line-strong); }
.ask-chip.on { border-color: var(--accent); box-shadow: var(--focus); }
.ask-chip strong { font-size: 14px; }
.ask-chip .kind { font-size: 12px; }
.ask-chip .muted { font-size: 13px; }
.ask-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ask-typing { display: inline-flex; gap: 5px; padding: 4px 0; }
.ask-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); animation: ask-dot 1.1s infinite ease-in-out; }
.ask-typing i:nth-child(2) { animation-delay: 0.15s; }
.ask-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes ask-dot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ask-form { display: flex; flex-direction: column; gap: 8px; }
.ask-form > label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ask-form textarea { width: 100%; resize: vertical; min-height: 64px; }
.ask-form-bar { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 12px; }
.ask-model { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ask-model select { max-width: 16rem; }
.formula-box.compact { min-height: 34px; padding: 4px 10px; font-size: 14px; }
.ask-form .help { margin: 0; font-size: 13px; }
/* The question box sits at the bottom of the conversation card, under a divider. */
.ask-compose { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.ask-card .row-title { align-items: flex-start; gap: 12px; }
.ask-card .row-title h2 { margin: 0; }
.ask-card .row-title .help { margin: 2px 0 0; }
.ask-card .kicker { margin-bottom: 4px; }
.ask-card-body { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.ask-card-body .range-row, .ask-card-body .range-axis { grid-template-columns: 6.5rem minmax(0, 1fr) 9.5rem; gap: 10px; }
.ask-card-body .kpi-row { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.ask-card-body .kpi-row b { font-size: 20px; }
.ask-kpis { grid-template-columns: repeat(3, 1fr); }
.ask-kpis b { font-size: 24px; }
@media (max-width: 1000px) { .ask-grid { grid-template-columns: 1fr; } }
select.in.compact { padding-right: 30px; background-position: right 10px center; }
.ask-tools .status, #ask-status { text-transform: none; }
.ask-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ask-card { position: sticky; top: 150px; max-height: calc(100vh - 170px); display: flex; flex-direction: column; }
.ask-card .row-title { flex-wrap: wrap; }
.ask-card .row-title > div:first-child { flex: 1 1 14rem; min-width: 0; }
.ask-card-body { overflow-y: auto; min-height: 0; padding-right: 4px; }
.ask-card-body .floor-table { font-size: 13px; }
.ask-card-body .floor-table td, .ask-card-body .floor-table th { padding: 6px 8px; }
.presets { min-width: 0; }
.ask-chat-tools select { min-width: 0; }
@media (max-width: 1000px) { .ask-card { position: static; max-height: none; } }
@media (max-width: 640px) {
  .ask-convo .row-title { flex-wrap: wrap; }
  .ask-chat-tools { flex-wrap: wrap; width: 100%; }
  .ask-chat-tools select { flex: 1; max-width: none; }
  .ask-model { flex-wrap: wrap; }
}
.ask-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .ask-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .ask-kpis b { font-size: 18px; } .ask-kpis div { padding: 10px; } }

/* Two short numbers in one form cell, e.g. full / empty weight. */
.pair { display: flex; gap: 8px; }
.pair .in.num { min-width: 0; }
.pager { margin-top: 14px; align-items: center; }

/* Legal and help pages: long reading text in the site's own type */
.prose-wrap { max-width: 50rem; margin: 0 auto; }
.prose { padding: 34px 40px 38px; }
.prose h1 { font-weight: 700; font-size: 32px; letter-spacing: -0.025em; margin: 0 0 4px; }
.prose h1 + p em { color: var(--muted); }
.prose h2 { font-weight: 600; font-size: 20px; letter-spacing: -0.02em; margin: 30px 0 8px; }
.prose h3 { font-size: 16px; margin: 20px 0 6px; }
.prose p, .prose li { color: var(--ink); line-height: 1.65; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.prose table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-weight: 600; font-size: 13px; }
.prose code { background: var(--fill); border-radius: var(--r-sm); padding: 1px 6px; font-size: 13px; }
.prose-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 4px 40px; font-size: 14px; color: var(--muted); }
.prose-links a:hover, .prose-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) { .prose { padding: 24px 20px; } .prose h1 { font-size: 24px; } }

/* Two-step sign-in */
.qr-box { display: inline-block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; margin: 4px 0 10px; }
.qr-box svg { display: block; width: 240px; height: 240px; shape-rendering: crispEdges; }
.setup-steps { padding-left: 20px; margin: 0 0 10px; }
.setup-steps li { margin: 4px 0; }
.backup-codes { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 12rem)); gap: 8px 18px; }
.backup-codes code { font-size: 18px; letter-spacing: 0.06em; }

/* Dock schedule: 21 small day × shift boxes */
.dock-table .in.tiny { width: 3.4rem; min-width: 0; padding-left: 6px; padding-right: 6px; }
.dock-table th.dock-day { text-align: center; border-left: 1px solid var(--line); }
.dock-table .lookup-id { width: 6.5rem; }

/* Results: print and export links, and paper output */
.results-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 22px; }
.packet-cover { margin-bottom: 18px; }
.packet-cover .meta { color: var(--muted); font-size: 14px; }
.packet-summary { white-space: pre-wrap; }
.packet-summary[contenteditable="true"] { outline: 1px dashed var(--line); outline-offset: 6px; border-radius: var(--r-sm); }
.page-break { break-before: page; }
@media print {
  @page { size: letter; margin: 14mm 12mm; }
  body { background: #fff !important; font-size: 11pt; }
  .topbar, .study-nav, .results-tabs, .results-actions, .floor-actions, .no-print, .picker, .btn, .banner a, .menu-panel { display: none !important; }
  .stage { padding: 0 !important; max-width: none !important; }
  .floor-block, .so-what { box-shadow: none !important; border-color: #ccc !important; break-inside: avoid; }
  .floor-table { font-size: 9.5pt; }
  .table-scroll { overflow: visible !important; }
  .packet-summary[contenteditable="true"] { outline: none; }
  a { color: inherit; text-decoration: none; }
}

/* AI draft notes on the Plant step */
.ai-draft .draft-notes { white-space: pre-wrap; font: inherit; font-size: 14px; margin: 8px 0 0; max-height: 18rem; overflow: auto; }

/* Help page: ask the guide */
.help-ask-form { display: flex; gap: 8px; }
.help-ask-form .in { flex: 1; }
.help-answer { white-space: pre-wrap; background: var(--fill); border-radius: var(--r-md); padding: 12px 14px; margin: 12px 0 0; }

/* Getting started checklist */
.checklist { list-style: none; padding: 0; margin: 6px 0 10px; display: grid; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 8px; }
.checklist li.done { color: var(--muted); }
.checklist li.done .icon { width: 18px; height: 18px; color: var(--accent); }
.checklist a { color: var(--accent-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.hero-actions .btn .icon, form[data-busy] .btn .icon { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }

/* "?" help button on every page: large, high-contrast, easy to hit */
.help-fab { position: fixed; right: 20px; bottom: 20px; z-index: 40; }
/* Same corner on every page: sticky Save bars keep their right end clear for it. */
.floor-actions { padding-right: 84px; }
.help-fab > summary {
  list-style: none; cursor: pointer; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: #fff;
  font: 700 26px/1 var(--sans); box-shadow: var(--shadow);
  border: 0; transition: transform 0.12s var(--ease);
}
.help-fab > summary::-webkit-details-marker { display: none; }
.help-fab > summary:hover { background: var(--accent-deep); }
.help-fab > summary:active { transform: scale(0.95); }
.help-fab > summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.help-fab[open] > summary { background: var(--accent-deep); }
.help-panel {
  position: absolute; right: 0; bottom: 74px; width: min(380px, calc(100vw - 32px));
  max-height: min(75vh, 620px); overflow: auto; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; font-size: 16px;
}
.help-panel-title { font: 600 20px/1.25 var(--sans); margin: 0 0 12px; }
.help-panel-ask { display: grid; gap: 8px; }
.help-panel-ask label { font-weight: 600; }
.help-panel-ask textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); resize: vertical; }
.help-panel-ask .btn { justify-self: start; font-size: 16px; padding: 10px 22px; }
.help-panel-answer { white-space: pre-wrap; background: var(--fill); border-radius: var(--r-md); padding: 12px 14px; margin: 12px 0 0; line-height: 1.55; }
.help-panel-links { display: grid; gap: 8px; margin-top: 16px; }
.help-panel-links .btn { justify-content: center; text-align: center; font-size: 16px; padding: 11px 16px; }
.help-panel-note { color: var(--muted); font-size: 14px; margin: 12px 0 0; }
@media (max-width: 640px) { .help-fab { right: 14px; bottom: 14px; } .floor-actions { padding-right: 78px; } }
@media print { .help-fab { display: none !important; } }
.sz-hero .sz-cta + .kicker { margin-top: 22px; }

/* Respect Reduce Motion: no lifts, scales or bouncing dots. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .btn:active, .cap-btn:active, .help-fab > summary:active { transform: none; }
}

/* =====================================================================
   Site-wide look, matched to the public site (2026-11-07).
   Near-black top bar on every page, the same soft green page wash,
   squared buttons (--r-sm). Pills stay for nav, tags and chips.
   ===================================================================== */
:root {
  --night: #0c1410;
  --night-line: rgba(255, 255, 255, 0.10);
  --night-ink: #eef4f0;
  --night-muted: #9fb2a7;
  --night-hover: rgba(255, 255, 255, 0.08);
  --glow: #4fd39b;
}
html { background: var(--bg); }
body {
  background:
    radial-gradient(ellipse 55% 420px at 6% 0, rgba(31, 122, 92, 0.10), transparent 70%),
    radial-gradient(ellipse 60% 420px at 96% 0, rgba(120, 160, 140, 0.13), transparent 70%),
    linear-gradient(180deg, #fbfcfb 0, var(--bg) 520px) no-repeat;
  background-color: var(--bg);
}

.topbar {
  background: var(--night);
  color: var(--night-ink);
  border-bottom: 1px solid var(--night-line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar .mark { color: #fff; }
.study-chip strong { color: #fff; }
.study-chip span,
.account-meta em,
.caret { color: var(--night-muted); }
.account-meta strong { color: #fff; }
.study-chip:hover,
.account-menu summary:hover,
.account-menu[open] summary,
.waiting-link:hover { background: var(--night-hover); }
.waiting-link { color: var(--night-ink); }

.stepper a,
.nav-tail a { color: var(--night-muted); }
.stepper a:hover,
.nav-tail a:hover { background: var(--night-hover); color: #fff; }
.stepper i { background: transparent; border-color: rgba(255, 255, 255, 0.24); color: var(--night-ink); }
.stepper small { color: rgba(255, 255, 255, 0.45); }
.stepper a.done i { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper a.on,
.nav-tail a.on { background: var(--accent); color: #fff; }
.stepper a.on i { background: #fff; border-color: #fff; color: var(--accent-deep); }
.nav-sep { background: var(--night-line); }
.menu-panel { color: var(--ink); }

.site-nav a,
.site-login { color: var(--night-muted); }
.site-nav a:hover,
.site-login:hover { color: #fff; }

.btn { border-radius: var(--r-sm); }
.site-actions > a:not(.btn) { color: var(--night-muted); font-size: 14px; font-weight: 600; }
.site-actions > a:not(.btn):hover { color: #fff; }

/* The account menu is long on study pages: keep it inside the screen and let it scroll. */
.menu-panel {
  max-height: calc(100vh - 84px);
  max-height: calc(100dvh - 84px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
body:has(.account-menu[open]) .help-fab { display: none; }

/* ---- onboarding: setup wizard, role tour, first-start choices */
.wizard-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 16px 0 0; counter-reset: wstep; flex-wrap: wrap; }
.wizard-steps li { counter-increment: wstep; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding: 6px 12px 6px 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.wizard-steps li::before { content: counter(wstep); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-pill); background: var(--fill-2); color: var(--ink-2); font-weight: 600; font-size: 12px; }
.wizard-steps li.on { color: var(--ink); border-color: var(--accent-line); font-weight: 600; }
.wizard-steps li.on::before { background: var(--accent); color: #fff; }
.wizard-steps li.done::before { content: "✓"; background: var(--accent-soft); color: var(--accent-deep); }
.tour-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tour-card { margin: 0; }
.tour-card h2 { font-size: 18px; margin: 4px 0 8px; }
.tour-card p:last-child { margin: 0; color: var(--ink-2); }
.welcome-start .tour-cards > div { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 8px; align-content: start; }
.welcome-start h3 { font-size: 16px; margin: 0; }
.welcome-start .help { margin: 0 0 4px; }
.access-levels { display: grid; gap: 6px; margin: 12px 0; }
.access-levels div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.access-levels dt { font-weight: 600; color: var(--ink-2); }
.access-levels dd { margin: 0; }
/* A checkbox with a sentence (and links) beside it: box + one text block, never stacked. */
.check { align-items: flex-start; }
.check input { flex: none; margin-top: 4px; }
.auth-form label.check { flex-direction: row; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.45; }
.staging-bar { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn-line); text-align: center; font-size: 13px; font-weight: 600; padding: 6px 16px; }

/* ---- study steps (pass 3): calm forms, quiet row actions, one-line summaries */
.icon-btn { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: var(--r-sm); background: transparent; color: var(--muted-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.icon-btn .icon { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--ink-2); background: var(--fill-2); }
.icon-btn.del:hover, .icon-btn.del.armed { color: var(--bad); background: var(--bad-soft); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.cell-actions { width: 1%; white-space: nowrap; text-align: right; }
.table-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.table-foot .help { margin: 0; }
.segmented { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--fill); }
.segmented label { position: relative; display: block; margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 7px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.segmented input:focus-visible + span { box-shadow: var(--focus); }
.fold > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: none; }
.fold > summary .chev { margin-left: auto; color: var(--muted); transition: transform 0.15s var(--ease); }
.fold[open] > summary .chev { transform: rotate(180deg); }
.fold > summary h2 { margin: 0; }
.fold[open] > summary { margin-bottom: 16px; }
.fold-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.fold-meta b { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.list-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -8px 0 12px; }
.list-tools .help { margin: 0; }
.fold-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.fold-foot .del { margin-left: auto; }
.compact-table { width: auto; }
.compact-table td, .compact-table th { padding-right: 24px; }
.issues-summary { margin-bottom: 20px; }
.issues-summary ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.issues-summary li { line-height: 1.45; }
.issues-summary .where { color: var(--muted); font-size: 13px; }
.issues-summary .where a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.badge-issue { display: inline-block; padding: 2px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--bad-soft); color: var(--bad); }
.badge-issue.warn { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 640px) {
  .fold > summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 12px; }
  .fold > summary .chev { grid-column: 2; grid-row: 1; }
  .fold > summary .fold-meta { grid-column: 1 / -1; }
  .list-tools { flex-direction: column; align-items: flex-start; margin-top: 0; }
}

/* == de-slop D == */
.field-label { margin: 20px 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
h2 + .field-label { margin-top: 0; }
.check-help { margin: 2px 0 0 28px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.setting-row:first-of-type { border-top: 0; padding-top: 4px; }
.setting-row .help { margin: 2px 0 0; }
.setting-row > .btn, .setting-row > button { flex: none; }
.setting-fold { border-top: 1px solid var(--line); padding-top: 14px; }
.setting-fold > summary b { font-weight: 600; }
.setting-fold[open] > summary { margin-bottom: 12px; }
.danger-zone-next { margin-top: 12px; }
@media (max-width: 600px) {
  .setting-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .check-help { margin-left: 0; }
}

/* == de-slop B == (decisions, pipeline, portfolio, inbox, outbox, contacts, history) */
.list-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 22px 0 8px; }
.list-head h2 { margin: 0; font-size: 20px; }
.list-head .help { margin: 0; }
.count-quiet { margin-left: 4px; color: var(--muted); font-weight: 500; }
.dlist { list-style: none; margin: 0 0 18px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.dlist > li + li { border-top: 1px solid var(--line); }
.dlist > li > a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; align-items: center; padding: 12px 18px; }
.dlist > li > a:hover { background: var(--fill); }
.dlist .d-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dlist .kind { font-size: 13px; }
.dlist .kind .dstatus { margin-left: 2px; }
.dlist strong { font-size: 16px; font-weight: 600; line-height: 1.35; }
.dlist .d-sum { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dlist .d-side { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 13px; color: var(--muted); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dlist .save { color: var(--accent-deep); font-weight: 600; }
.dlist .cost { color: var(--warn); font-weight: 600; }
.dlist .late { color: var(--bad); font-weight: 600; }
.floor-block .dlist { margin-bottom: 0; }
@media (max-width: 640px) {
  .dlist > li > a { grid-template-columns: 1fr; padding: 12px 14px; }
  .dlist .d-side { flex-direction: row; flex-wrap: wrap; gap: 2px 12px; align-items: flex-start; text-align: left; white-space: normal; }
  .dlist .d-sum { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
.sub-fold { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.sub-fold > summary { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.sub-fold[open] > summary { margin-bottom: 12px; }
.ev-item + .ev-item { margin-top: 4px; }
.ev-item b { font-weight: 600; margin-right: 4px; }
.decision-grid aside .stack > .btn { align-self: flex-start; }
.ob-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: start; padding: 12px 18px; }
.ob-subject { display: block; font-weight: 600; line-height: 1.35; margin: 1px 0 2px; }
.ob-subject:hover { text-decoration: underline; text-underline-offset: 3px; }
.ob-body > summary { font-size: 13px; color: var(--muted); cursor: pointer; width: max-content; }
.ob-body > summary:hover { color: var(--ink-2); }
.ob-body pre.body { margin: 8px 0 0; }
.ob-row .row-btns { margin: 0; }
@media (max-width: 640px) { .ob-row { grid-template-columns: 1fr; padding: 12px 14px; } }
.cell-actions form { display: inline; margin: 0; }
.kpi-row.fill { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.cell-actions .icon-btn { vertical-align: middle; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li + li { margin-top: 2px; }
.board { align-items: start; }
.board-col { min-height: 0; background: transparent; }
.board-col header { padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.board-card .kind { color: var(--muted); }
.board-empty { color: var(--muted-2); }
.nowrap { white-space: nowrap; }
.quiet-code { font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: var(--fill); border-radius: var(--r-sm); padding: 2px 6px; }
.audit-args { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
/* == end de-slop B == */

/* == de-slop C == */
.floor-grid > .span-2 { grid-column: span 2; }
.floor-grid > .span-3 { grid-column: 1 / -1; }
.floor-grid > .help { margin: 0; align-self: end; }
.help.block { display: block; margin: 2px 0 0; }
label.check > span { display: block; }
tr.muted td { color: var(--muted-2); }
@media (max-width: 640px) {
  .floor-grid > .span-2 { grid-column: auto; }
}
.narrow-page { max-width: 44rem; }
.code-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 10px; }
.code-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.code-form .in { width: 12ch; min-width: 10rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.setup-steps > li { margin-bottom: 14px; }
.setup-steps .qr-box { display: block; width: fit-content; margin: 12px 0 8px; }
/* "optional" stays next to its label text instead of taking a row of its own */
.floor-grid label:has(> .optional) { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 0; row-gap: 6px; }
.floor-grid label:has(> .optional) > :not(.optional) { grid-column: 1 / -1; }
.floor-grid label:has(> .optional) > .optional { justify-self: start; }
/* Help and legal: the page outline as a quiet two-column list */
.prose .toc { margin: 18px 0 6px; padding: 14px 0; border-block: 1px solid var(--line); }
.prose .toc ul { list-style: none; padding: 0; margin: 0; }
.prose .toc > ul > li > a { display: none; }
.prose .toc > ul > li { margin: 0; }
.prose .toc ul ul { columns: 2; column-gap: 28px; }
.prose .toc ul ul li { margin: 0 0 4px; break-inside: avoid; }
.prose .toc a { text-decoration: none; font-weight: 500; }
.prose .toc a:hover { text-decoration: underline; }
@media (max-width: 600px) { .prose .toc ul ul { columns: 1; } }

/* == de-slop A == (studies home, results, reports, suggestions, what-if, ask) */
.floor-table th.r, .floor-table td.r { text-align: right; }
.floor-table .nowrap, .nowrap { white-space: nowrap; }
.floor-table td .sub { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 400; }
.floor-table tfoot td { padding-top: 12px; border-top: 1px solid var(--line-strong); border-bottom: 0; color: var(--muted); font-size: 14px; }
.floor-table tfoot td.total { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.floor-table tr.pareto-cut td { padding: 6px 12px; background: var(--fill); color: var(--muted); font-size: 13px; font-weight: 600; }
.floor-table tr.pareto-cut:hover td { background: var(--fill); }
.results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 0 0 22px; }
.results-bar .results-tabs { margin: 0; }
.results-bar .results-actions { margin: 0; gap: 18px; font-size: 14px; }
.results-actions button.link { background: none; border: 0; padding: 0; cursor: pointer; }
.pill-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.pill-pick a { padding: 6px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pill-pick a:hover { border-color: var(--line-strong); }
.pill-pick a.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill-pick a.util-dot-red::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--bad); vertical-align: middle; }
.labor-crew .status { margin-left: 2px; }
.gs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gs-head h2 { margin: 0; }
.getting-started .checklist { gap: 10px; margin-top: 14px; }
.checklist .tick { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.checklist li.done .tick { border-color: var(--accent); background: var(--accent-soft); }
.checklist li.done .tick .icon { width: 14px; height: 14px; }
.checklist a { color: var(--ink); font-weight: 500; text-decoration: none; }
.checklist a:hover { color: var(--accent-deep); text-decoration: underline; }
.list-title { margin: 28px 0 12px; font-size: 18px; }
.study-grid.deletable a:not(.time-chip) { padding-bottom: 50px; }
.card-delete { left: 12px; bottom: 10px; }
.sug { margin-bottom: 14px; }
.sug-head h2 { margin: 0 0 2px; font-size: 18px; }
.sug-head .help { margin: 0; }
.sug-figs { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 14px 0 6px; }
.sug-figs dt { color: var(--muted); font-size: 13px; }
.sug-figs dd { margin: 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sug-figs dd.off { color: var(--warn); }
.sug-why { margin-top: 8px; font-size: 14px; }
.sug-why summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.sug-why .cites { margin: 8px 0; padding-left: 18px; }
.sug-why .cites span { font-weight: 600; }
.sug-actions { flex-wrap: wrap; }
.sug-actions form { margin: 0; }
.sug-edit > summary { list-style: none; }
.sug-edit > summary::-webkit-details-marker { display: none; }
.sug-edit[open] { flex-basis: 100%; order: 5; }
.sug-edit[open] > summary { display: none; }
.sug-edit-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.sug-edit-form label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sug-edit-form .grow { flex: 1; min-width: 12rem; }
.sug-edit-form input[type="number"] { width: 8rem; }
@media (max-width: 640px) {
  .results-bar { flex-direction: column; align-items: flex-start; }
  .gs-head { flex-direction: column; gap: 2px; }
  .results-bar .results-tabs { max-width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .results-bar .results-tabs a { white-space: nowrap; }
}
.so-actions .so-range { align-self: center; margin-left: 6px; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--line-strong); }
.so-actions .so-range:hover { color: var(--ink); }
p.results-actions > .btn:last-child { margin-left: auto; }
p.results-actions .help { margin: 0; }
/* == end de-slop A == */
.block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; }
.block-head h2 { margin: 0; }
.block-head .help { margin: 0; }
.progress-bar.spend { max-width: 28rem; }
.segmented .seg-link { display: block; padding: 6px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600; color: var(--muted); }
.segmented .seg-link b { margin-left: 4px; font-weight: 600; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.segmented .seg-link:hover { color: var(--ink); }
.segmented .seg-link.on { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.in[type="file"] { padding: 6px; }
.in[type="file"]::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.in[type="file"]::file-selector-button:hover { background: var(--fill); }
.team-access { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.team-access .check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; font-weight: 500; }
.team-access .check input { margin-top: 0; }
.row-more { position: relative; display: inline-block; }
.row-more > summary { list-style: none; gap: 4px; display: inline-flex; align-items: center; }
.row-more > summary::-webkit-details-marker { display: none; }
.row-more > summary::after { content: none; }
.row-more > summary .icon { width: 14px; height: 14px; }
.row-more-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 15; width: 18rem; display: grid; gap: 14px; padding: 14px; text-align: left; white-space: normal; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); }
.row-more-panel form { display: grid; gap: 8px; justify-items: start; }
.row-more-panel form + form { padding-top: 12px; border-top: 1px solid var(--line); }
.row-more-panel label { display: grid; gap: 6px; width: 100%; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.row-more-panel .help { margin: 0; }
.help code, .lede code { word-break: normal; overflow-wrap: anywhere; }
.team-access select.in { width: auto; min-width: 9rem; max-width: 12rem; }
.dock-table th.dock-shift { text-align: center; font-weight: 500; color: var(--muted-2); }
.dock-table .dock-first { border-left: 1px solid var(--line); }
.dock-table .dock-no { width: 4rem; }
.copy-field { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 10px; }
.copy-field .label { font-size: 13px; font-weight: 600; color: var(--ink-2); min-width: 6rem; }
.copy-field .formula-box { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.copy-field > code:first-child { grid-column: 1 / 3; }
@media (max-width: 640px) { .copy-field { grid-template-columns: minmax(0, 1fr) auto; } .copy-field .label { grid-column: 1 / -1; } .copy-field > code:first-child { grid-column: 1; } }
.kv { display: grid; gap: 0; margin: 12px 0 0; }
.kv > div { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv > div:last-child { border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.sub-fold > summary h3 { margin: 0; }
.sub-fold { padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .kv > div { grid-template-columns: 1fr; gap: 2px; } }
.cap-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
.cap-details > summary::-webkit-details-marker { display: none; }
.cap-details > summary::after { content: none; }
.cap-details > summary .help { font-weight: 500; }
.cap-details > summary .chev { color: var(--muted); transition: transform 0.15s var(--ease); }
.cap-details[open] > summary .chev { transform: rotate(180deg); }
.cap-details > summary .icon { width: 18px; height: 18px; }
.dock-table .in.lookup-id { width: 6.5rem; max-width: 6.5rem; }
.dock-table .in.dock-desc { width: 10rem; max-width: 10rem; }
.dock-table .in.dock-no { width: 3.6rem; max-width: 3.6rem; }
@media (max-width: 640px) {
  .team-table thead { display: none; }
  .team-table tr { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .team-table td { display: block; padding: 0; border: 0; }
  .team-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .row-more-panel { width: min(18rem, calc(100vw - 48px)); }
}
.dock-table .in.lookup-id, .dock-table .in.dock-desc, .dock-table .in.dock-no { min-width: 0; }
.dock-table .in.num.tiny { min-width: 0; width: 3rem; max-width: 3rem; padding-left: 4px; padding-right: 4px; text-align: center; }

/* Sign in with Google / Microsoft: neutral buttons with the providers' own marks */
.sso-buttons { display: grid; gap: 10px; margin: 4px 0 0; }
.sso-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 44px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; }
.sso-btn:hover { background: var(--fill); }
.sso-btn svg { flex: none; }
.sso-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 13px; }
.sso-or::before, .sso-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
