/* Forge CRM — internal dashboard.
 *
 * Deliberately not the public site's Obsidian theme. This is a light, dense
 * operations console built to the reference the owner supplied: a dark icon
 * rail, accent-topped summary cards with a trend line each, and a wide activity
 * panel beside a narrow attention panel.
 *
 * Manrope is reused from the public site's self-hosted set — no third-party font
 * request here either, for the same reason it was removed there.
 */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/manrope-400-700-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #1f2d3d;
  --ink-strong: #12263a;
  --text: #4d5763;
  --muted: #6a7179;
  --line: #dfe2e5;
  --line-soft: #edeff1;
  --strip: #f4f5f6;
  --rail: #1e2b39;
  --rail-mark: #14202c;
  --rail-icon: #96a3b1;
  --green: #7fb800;
  --green-text: #547c00;
  --accent-indigo: #5c6bc0;
  --accent-rose: #c2547f;
  --accent-lime: #a9c40b;
  --accent-violet: #9575cd;
  --sky: #2799cf;
  --slate: #808a94;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 13.5px/1.45 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

p { margin: 0; }

h1, h2 { margin: 0; font-weight: 700; }

ul { margin: 0; padding: 0; list-style: none; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Focus is visible everywhere. The public site's VPAT commits to this and there
   is no reason an internal tool should be worse. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

.skip {
  position: fixed;
  top: 6px; left: 56px;
  z-index: 20;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.admin { display: grid; grid-template-columns: 48px 1fr; min-height: 100vh; }

/* ---------- rail ---------- */

.rail {
  background: var(--rail);
  color: var(--rail-icon);
  display: flex;
  flex-direction: column;
}

.rail .mark {
  display: grid;
  place-items: center;
  height: 47px;
  background: var(--rail-mark);
  color: #fff;
}

.rail li a {
  display: grid;
  place-items: center;
  height: 48px;
  border-left: 3px solid transparent;
  transition: color 90ms linear;
}

.rail li a:hover { color: #e8eef4; }

.rail li.current a {
  color: #fff;
  border-left-color: var(--green);
  background: #24313f;
}

/* ---------- top bar ---------- */

.frame { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 47px;
  padding: 0 20px 0 24px;
  border-bottom: 1px solid var(--line);
}

.who { font-size: 13.5px; color: var(--text); }
.who b { color: var(--ink); font-weight: 700; }
.who span { margin: 0 4px; color: var(--muted); }

.topbar-tools { display: flex; align-items: center; gap: 18px; color: #68717b; }

.topbar-tools button {
  border: 0;
  background: none;
  padding: 0;
  font: 700 11.5px/1 "Manrope", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green-text);
  cursor: pointer;
}

/* ---------- page ---------- */

.canvas { padding: 0 24px 32px; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0 20px;
}

.page-head h1 {
  font-size: 46px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink-strong);
}

.page-actions { display: flex; gap: 10px; }

.btn-solid,
.btn-dark {
  padding: 11px 16px;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 2px;
}

/* White on --green measures 2.6:1, so the label is the reference's dark ink
   instead. Same silhouette, and it clears 4.5:1. */
.btn-solid { background: var(--green); color: #14210a; }
.btn-dark { background: var(--ink); color: #fff; }

.btn-outline {
  padding: 7px 11px;
  border: 1px solid var(--green);
  color: var(--green-text);
  background: #fff;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.link-view {
  color: var(--green-text);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ---------- summary cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card,
.panel {
  background: #fff;
  border: 1px solid var(--line);
  min-width: 0;
}

.stat-card { border-top: 5px solid var(--accent); }
.accent-indigo { --accent: var(--accent-indigo); }
.accent-rose { --accent: var(--accent-rose); }
.accent-lime { --accent: var(--accent-lime); }
.accent-violet { --accent: var(--accent-violet); }

.panel-head {
  padding: 14px 18px;
  background: var(--strip);
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #25313c;
}

.stat-card-body { padding: 2px 18px 18px; }

.stat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "label action" "figure action";
  align-items: end;
  gap: 0 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.stat-label { grid-area: label; font-size: 13px; }

.stat-figure {
  grid-area: figure;
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 1px;
}
.stat-figure b { font-size: 27px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.stat-figure span { font-size: 13px; color: var(--muted); }

.stat-action { grid-area: action; align-self: end; padding-bottom: 3px; }

.chart-window { padding-top: 16px; font-size: 13px; }

.chart { display: block; margin: 6px 0 2px; width: 100%; height: auto; }

.line-indigo-dark { stroke: #2b3a8f; }
.line-indigo-light { stroke: #7e8ad1; }
.line-rose-dark { stroke: #8f2b55; }
.line-rose-light { stroke: #c17999; }
.line-lime-dark { stroke: #5c6708; }
.line-lime-light { stroke: #8f9c30; }
.line-violet-dark { stroke: #4a3b8f; }
.line-violet-light { stroke: #9585c5; }

/* Chart axes. Recessive by design — a gridline that competes with the data
   is noise. Solid hairlines, never dashed. */
.gridline { stroke: var(--line); stroke-width: 1; }
.axis-label { fill: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }

/* Data points. The surface-coloured ring is what keeps two overlapping series
   readable as two dots rather than one blob. */
.point { stroke: #fff; stroke-width: 1.5; }
.point-indigo-dark { fill: #2b3a8f; }
.point-indigo-light { fill: #7e8ad1; }
.point-rose-dark { fill: #8f2b55; }
.point-rose-light { fill: #c17999; }
.point-lime-dark { fill: #5c6708; }
.point-lime-light { fill: #8f9c30; }
.point-violet-dark { fill: #4a3b8f; }
.point-violet-light { fill: #9585c5; }

.chart-range { color: var(--muted); }

.legend { display: flex; gap: 16px; font-size: 12.5px; }
.legend li { display: flex; align-items: center; gap: 6px; }

.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-indigo-dark { background: #2b3a8f; }
.dot-indigo-light { background: #7e8ad1; }
.dot-rose-dark { background: #8f2b55; }
.dot-rose-light { background: #c17999; }
.dot-lime-dark { background: #5c6708; }
.dot-lime-light { background: #8f9c30; }
.dot-violet-dark { background: #4a3b8f; }
.dot-violet-light { background: #9585c5; }

/* ---------- lower row ---------- */

.lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  margin-top: 16px;
}

.panel-body { padding: 0 18px; }

.totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0;
}

.total { display: flex; align-items: center; gap: 12px; }

.badge {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex: 0 0 42px;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
}
.badge-ink { background: var(--ink); }
.badge-slate { background: var(--slate); }
.badge-sky { background: var(--sky); }
.badge-lime { background: #6f9e00; }

.total-label { font-size: 13px; color: var(--text); }
.total-note { font-size: 13px; color: var(--muted); }

.lead-row {
  display: grid;
  /* The strip and the chevron are flush, as in the reference — the chevron reads
     as the end of the strip rather than a detached button. */
  grid-template-columns: 34px 190px 118px minmax(0, 1fr) 28px;
  align-items: center;
  column-gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
}

.lead-row > .stages { margin-right: -12px; }

.avatar {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #72777c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lead-who { min-width: 0; }
.lead-name { font-size: 13px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-company { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lead-when { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.clock { color: var(--sky); flex: 0 0 auto; }
.lead-age { color: var(--muted); }

.stages { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; }

.stage {
  padding: 6px 10px 8px;
  background: #e9ebed;
  overflow: hidden;
}
.stage span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-when { font-size: 10px; line-height: 1.3; color: #5b6672; letter-spacing: 0.02em; }
.stage-what { font-size: 12.5px; line-height: 1.25; color: #2c3742; }
.stage-done { background: #cfe8ac; }
.stage-done .stage-what { text-decoration: line-through; text-decoration-color: #6d7f4e; }
.stage-current { background: #c5e5f5; }
.stage-current .stage-what { font-weight: 700; }
/* Behind the lead but never entered — a stage the pipeline jumped. Left plain so
   it reads as "did not happen" rather than "done" or "next". */
.stage-skipped .stage-what { color: #626b75; }
.stage-won { background: #a5cf6d; }
.stage-won .stage-what { font-weight: 700; }
.stage-lost { background: #dcd2d2; }

.lead-open {
  display: grid;
  place-items: center;
  align-self: stretch;
  background: #70777d;
  color: #fff;
}
.lead-open:hover { background: #5d6368; }

/* ---------- attention panel ---------- */

.attention-block { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.attention-block:last-child { border-bottom: 0; }

.attention-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #25313c;
}

.attention-detail { margin-top: 5px; font-size: 12.5px; color: var(--muted); }

.attention-figure {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.attention-figure b { font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }

.attention-hint { margin-top: 9px; font-size: 12.5px; color: var(--muted); }

/* ---------- leads list ---------- */

/* A person's name keeps its own capitalisation. */
.page-head h1.h1-name { text-transform: none; letter-spacing: -0.015em; }

.page-sub { margin-top: 7px; font-size: 13px; color: var(--muted); }
.page-sub .pill { margin-left: 4px; }

.crumb { font-size: 11.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.crumb a { color: var(--green-text); }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

.filters input,
.filters select {
  padding: 9px 11px;
  border: 1px solid #b9c0c7;
  border-radius: 2px;
  font: 400 13.5px/1.2 "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
}
.filters input { min-width: 280px; }
.filters input:focus-visible,
.filters select:focus-visible { outline: 2px solid var(--sky); outline-offset: 1px; }

.filters button {
  padding: 10px 15px;
  border: 0;
  border-radius: 2px;
  background: var(--ink);
  color: #fff;
  font: 700 11.5px/1 "Manrope", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.chip {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  color: var(--text);
}
.chip:hover { border-color: #9aa3ab; }
/* Dark on lime, not white — the same 4.5:1 decision as the primary button. */
.chip-on { background: var(--green); border-color: var(--green); color: #14210a; font-weight: 700; }

.table-wrap { overflow-x: auto; }

.grid { width: 100%; border-collapse: collapse; font-size: 13px; }

.grid th {
  padding: 12px 16px;
  text-align: left;
  background: var(--strip);
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #25313c;
  white-space: nowrap;
}

.grid td { padding: 11px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.grid tbody tr:hover { background: #fafbfc; }

.cell-who a { display: flex; align-items: center; gap: 11px; }
.cell-name { display: block; font-weight: 700; color: var(--ink); }
.cell-sub { display: block; font-size: 12px; color: var(--muted); }
.cell-date { white-space: nowrap; color: var(--text); }
.cell-never { color: var(--muted); }

.avatar-sm { width: 30px; height: 30px; flex: 0 0 30px; font-size: 11px; }

.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

.pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 2px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
/* Every pill fill is light enough to carry the dark ink at well over 4.5:1. */
.pill-indigo { background: #dfe3f8; color: #2b3a8f; }
.pill-sky { background: #d6ecf8; color: #12556f; }
.pill-rose { background: #f8dfe9; color: #8f2b55; }
.pill-lime { background: #e8f0c0; color: #4c5806; }
.pill-won { background: #cfe8ac; color: #35471a; }
.pill-lost { background: #e4dcdc; color: #5c4a4a; }
.pill-slate { background: #e4e7ea; color: #3b454f; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--text);
}
.pager div { display: flex; gap: 8px; }

/* ---------- lead detail ---------- */

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }

.detail-side { display: grid; gap: 16px; }

.stages-wide { margin-bottom: 22px; }
.stages-wide .stage { padding: 9px 12px 11px; }

.fields { display: grid; grid-template-columns: 190px minmax(0, 1fr); margin: 0; font-size: 13px; }
.fields dt { padding: 9px 0; color: var(--muted); border-top: 1px solid var(--line-soft); }
.fields dd { padding: 9px 0; margin: 0; color: var(--ink); border-top: 1px solid var(--line-soft); overflow-wrap: anywhere; }

.sub-head {
  margin: 24px 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #25313c;
}

.message {
  padding: 14px 16px;
  background: #f7f8f9;
  border-left: 3px solid var(--line);
  font-size: 13.5px;
  color: var(--ink);
  /* Submitted text keeps its own line breaks; the validator preserved them. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message-empty { color: var(--muted); font-style: italic; white-space: normal; }

.consent-note { margin: 20px 0 4px; font-size: 12.5px; color: var(--muted); }

.status-form { display: flex; gap: 8px; padding: 18px 0 0; }
.status-form select {
  flex: 1;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #b9c0c7;
  border-radius: 2px;
  font: 400 13.5px/1.2 "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
}
.status-form select:focus-visible { outline: 2px solid var(--sky); outline-offset: 1px; }
.status-form button {
  padding: 10px 16px;
  border: 0;
  border-radius: 2px;
  background: var(--green);
  color: #14210a;
  font: 700 11.5px/1 "Manrope", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.hint { padding: 12px 0 18px; font-size: 12.5px; color: var(--muted); }

.banner-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #fdeceb;
  border-left: 3px solid #b3261e;
  color: #8c1d18;
  font-size: 13px;
}

.timeline { padding: 6px 0 18px; }
.timeline li { padding: 11px 0; border-top: 1px solid var(--line-soft); font-size: 13px; }
.timeline li:first-child { border-top: 0; }
.timeline-when { display: block; font-size: 11.5px; color: var(--muted); }
.timeline-what { display: block; color: var(--ink); font-weight: 700; }
.timeline-from { font-weight: 400; color: var(--muted); }
.timeline-who { display: block; font-size: 12.5px; color: var(--text); }
.timeline-detail { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline-empty { color: var(--muted); }

/* ---------- sign in ---------- */

.signin-page { background: #f4f5f6; }

.signin {
  width: min(400px, calc(100% - 32px));
  margin: 12vh auto 0;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--green);
}

.signin-mark {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  background: var(--rail-mark);
  color: #fff;
}

.signin h1 { margin: 18px 0 4px; font-size: 26px; color: var(--ink-strong); }
.signin-lede { font-size: 13px; color: var(--muted); }

.signin-error {
  margin-top: 18px;
  padding: 11px 13px;
  /* 5.9:1 on this fill — an error must be readable, not merely red. */
  background: #fdeceb;
  border-left: 3px solid #b3261e;
  color: #8c1d18;
  font-size: 13px;
}

.signin form { margin-top: 22px; display: grid; gap: 6px; }

.signin label {
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #25313c;
}

.signin input {
  padding: 11px 12px;
  border: 1px solid #b9c0c7;
  border-radius: 2px;
  /* 16px so iOS does not zoom the viewport on focus, as on the public site. */
  font: 400 16px/1.3 "Manrope", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
}
.signin input:focus-visible { outline: 2px solid var(--sky); outline-offset: 1px; border-color: var(--sky); }

.signin button {
  margin-top: 22px;
  padding: 13px;
  border: 0;
  border-radius: 2px;
  background: var(--green);
  color: #14210a;
  font: 700 12.5px/1 "Manrope", sans-serif;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
}
.signin button:hover { background: #74a800; }

/* ---------- narrower screens ---------- */

@media (max-width: 1340px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lower,
  .detail { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 780px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-row { grid-template-columns: 34px minmax(0, 1fr) 26px; }
  .lead-when, .stages { display: none; }
  /* The strip is the point of the detail page, so it stays and wraps instead. */
  .stages-wide { display: grid; grid-auto-flow: row; grid-auto-columns: auto; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .fields dt { padding-bottom: 0; border-top: 0; }
  .fields dd { padding-top: 2px; border-top: 0; }
  .filters input { min-width: 0; width: 100%; }
}

/* ---------- reports, retention, settings ----------
 *
 * Added when the three remaining rail destinations were built. Everything here
 * reuses the tokens above rather than introducing colours: admin.css is NOT
 * covered by scripts/check-contrast.mjs (it reads styles/forge.css only), so a
 * new colour here is one nobody is checking. The bars are the one thing that
 * could have been a chart library and deliberately is not — one number per row,
 * no script, and it prints. */

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  align-items: start;
}

.panel-wide { grid-column: 1 / -1; }

.panel-title {
  margin: 0;
  padding: 14px 18px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-strong);
}

.panel-title .count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--strip);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
}

.panel-note {
  margin: 0;
  padding: 0 18px 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
}

.panel-tight .grid th,
.panel-tight .grid td { padding-top: 6px; padding-bottom: 6px; }

.grid-compact { width: 100%; }
.grid-compact th,
.grid-compact td {
  padding: 7px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.grid-compact tr:last-child th,
.grid-compact tr:last-child td { border-bottom: 0; }

.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

.bar-cell { width: 45%; }

.bar {
  height: 7px;
  border-radius: 4px;
  background: var(--strip);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--accent-indigo);
}

.bar-indigo { background: var(--accent-indigo); }
.bar-rose   { background: var(--accent-rose); }
.bar-lime   { background: var(--green); }
.bar-muted  { background: var(--slate); }

/* Figures and policy: the same two-column definition list at two densities. */
.figures,
.policy {
  margin: 0;
  padding: 0 18px 14px;
}

.figures { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.figures div { min-width: 90px; }
.figures dt { font-size: 11.5px; color: var(--muted); }
.figures dd {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}

.policy div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line-soft);
}
.policy div:last-child { border-bottom: 0; }
.policy dt { flex: 0 0 200px; font-size: 12.5px; color: var(--text); }
.policy dd { margin: 0; font-size: 12.5px; color: var(--ink-strong); }

/* Volume chart. Bars grow from the baseline, so an empty week is an absent bar
   rather than a gap in the row — which would read as missing data. */
.weeks {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 4px 18px 16px;
  min-height: 150px;
}

.week { flex: 1 1 0; min-width: 0; text-align: center; }

.week-bar {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 96px;
  background: var(--strip);
  border-radius: 3px;
}

.week-bar span {
  display: block;
  width: 100%;
  min-height: 2px;
  background: var(--accent-indigo);
  border-radius: 3px;
}

.week-count {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
  min-height: 14px;
}

.week-label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

/* Settings */
.notice {
  margin: 0 0 14px;
  padding: 11px 14px;
  border: 1px solid;
  border-radius: 6px;
  font-size: 12.5px;
}
.notice-ok    { border-color: #b4d36a; background: #f6fbe9; color: #46680a; }
.notice-error { border-color: #e2a3b6; background: #fdf3f6; color: #8f2b4c; }

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0 18px 16px;
}

.stack-form label { display: flex; flex-direction: column; gap: 4px; }
.stack-form span { font-size: 12px; color: var(--text); }

.stack-form input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font: inherit;
  font-size: 13px;
  color: var(--ink-strong);
  background: #fff;
}

.stack-form input:focus-visible { outline: 2px solid var(--accent-indigo); outline-offset: 1px; }

.stack-form button {
  align-self: flex-start;
  padding: 8px 16px;
  border: 0;
  border-radius: 5px;
  background: var(--rail);
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.stack-form button:hover { background: var(--rail-mark); }

/* Screenshot-driven corrections.
 *
 * Auto table layout plus uppercased enum labels pushed the bar and percentage
 * columns clean out of the narrow report panels — "Primary interest" and "Role"
 * rendered with no bars at all, and the funnel lost two columns entirely. Fixed
 * layout gives every column a share that long text cannot take, and these row
 * headers stop shouting: "VP / Director (Security or Engineering)" is a third
 * narrower in sentence case, and reads better besides. */
.grid-compact,
.funnel-table {
  table-layout: fixed;
  width: 100%;
}

.grid-compact th[scope="row"],
.funnel-table th[scope="row"] {
  text-transform: none;
  letter-spacing: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-strong);
  white-space: normal;
  /* break-word, not anywhere, and no auto hyphens: "anywhere" split
     "(Security or Engineering)" as "(Se-curity", which reads as a typo. Long
     labels here always contain spaces, so breaking at them is enough. */
  overflow-wrap: break-word;
}

/* The percentage column was being clipped by the panel border: the widths summed
   to 100% and the cell padding then pushed the last column past the edge. Narrower
   columns and tighter padding on the numeric cells leave it room. */
.grid-compact col.c-label { width: 40%; }
.grid-compact col.c-bar   { width: 28%; }
.grid-compact col.c-num   { width: 14%; }
.grid-compact col.c-pct   { width: 18%; }

.grid-compact td.num { padding-left: 4px; padding-right: 14px; }

.funnel-table col.f-label { width: 36%; }
.funnel-table col.f-num   { width: 13%; }
.funnel-table col.f-prev  { width: 15%; }
.funnel-table col.f-bar   { width: 20%; }
.funnel-table col.f-pct   { width: 16%; }

.funnel-table th,
.funnel-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
}
.funnel-table thead th {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.funnel-table tr:last-child th,
.funnel-table tr:last-child td { border-bottom: 0; }

/* The bar needs a floor: at 1% of a large total it was rendering as an invisible
   hairline, which reads as zero rather than as "few". */
.bar-fill { min-width: 2px; }
