/* Customer dashboard.
   Loaded only by base_dashboard.html and portfolio.html, so login/admin/runs pages
   don't pay for it — which is also why the palette below can sit on :root and
   override the app-wide tokens without leaking off the dashboard.

   Ported from the handover pack's prototype (260906-aeo-handover-v1210hrs/
   dashboard.html) essentially verbatim: same tokens, same class names, same DOM
   contract. Templates emit the prototype's markup, so a rule here should read the
   same as its counterpart there. See docs/ui-design.md.

   Two adaptations the port needs, both because the prototype is a standalone file
   and we render inside base.html:
     - the prototype's .shell is base.html's .layout, and its bare `main` selector
       has to be `main.content` to outrank app.css's `.content`
     - the prototype is a JS-tabbed SPA; we serve a page per panel, so .panel and
       its display toggling are dropped. Sub-nav items are in-page anchors. */

:root {
  --ink: #16241c; --ink2: #4d5f55; --ink3: #83928a;
  --line: #e2e7e3; --line2: #c9d3cc;
  --page: #f7f8f6; --card: #fff; --soft: #f0f3f0;
  --dgreen: #1f4a32; --green: #3a7a52; --pale: #dceadf; --pale2: #eaf2ec;
  --gold: #a8790c; --palegold: #f7edd6;
  --bad: #8c3a2b; --palebad: #f7e5e0;
  --bar-you: #3a7a52; --bar-other: #a8b3ac; --bar-track: #ecefec;
  --r: 10px;
  /* Chart.js reads colour vars off document.documentElement (static/js/charts.js),
     so the series colour has to be global rather than scoped to a component. */
  --chart-you: #3a7a52;
}

* { box-sizing: border-box; }
/* `hidden` is display:none in the UA sheet at the weakest possible specificity, so any
   class that sets display wins over it — .btn is inline-block, which is why the Clear
   button stayed on screen after the script had hidden it. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
a { cursor: pointer; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: var(--font, Inter), Inter, system-ui, sans-serif; font-size: 14px; line-height: 1.55;
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased;
}

/* ---------- shell ----------
   base.html gives us <div class="layout"><nav …>…<main class="content">, which is
   the prototype's .shell / .nav / main. */
.layout { display: flex; align-items: flex-start; min-height: 100vh; }
main.content { flex: 1; min-width: 0; max-width: 900px; padding: 32px 38px 100px; }
/* Anchored sub-sections land a little below the viewport edge rather than flush. */
[id] { scroll-margin-top: 18px; }

.nav {
  width: 256px; flex: 0 0 256px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--dgreen); padding: 24px 0 30px; display: flex; flex-direction: column;
}
/* The product mark, above the property it is showing. Doubles as the way back to the
   portfolio, which is where the old chrome-bar back link went.
   
   The lockup is the brand's: the mark, then "Gauss Labs" set in Archivo (--figs) at
   700, one colour, with the space. It was "GaussLabs" with a gold second word, which is
   neither the spelling nor the treatment. White here rather than the brand's near-black
   only because this sits on the dark sidebar; the login card uses ink. */
.navlogo {
  display: flex; align-items: center; gap: 10px; padding: 0 22px 18px;
  color: #fff; text-decoration: none;
}
.navlogo img { display: block; }
.navlogo span {
  font-family: var(--figs); font-weight: 700; font-size: 16px; letter-spacing: -.02em;
}
.navlogo:hover span { opacity: .85; }
.nav .id { padding: 0 22px 18px; margin-bottom: 16px; border-bottom: 1px solid #2d5c40; }
.nav .id b { display: block; color: #fff; font-weight: 500; font-size: 14.5px; line-height: 1.3; }
.nav .id span { display: block; color: #8fb7a0; font-size: 11.5px; margin-top: 4px; }
.nav .navsp { margin-top: auto; padding-top: 14px; }
.navgrp { margin-bottom: 2px; }
.navtop {
  display: block; width: 100%; text-align: left; appearance: none; background: none; border: 0;
  font: inherit; font-size: 13px; color: #c4dbcd; padding: 9px 22px; cursor: pointer;
  border-left: 2px solid transparent; line-height: 1.35; text-decoration: none;
}
.navtop:hover { color: #fff; }
.navgrp.on > .navtop { color: #fff; font-weight: 500; border-left-color: var(--gold); background: #22543a; }
.navgrp a.sub { display: none; }
.navgrp.on a.sub {
  display: block; font-size: 12.5px; color: #9dbcaa; text-decoration: none;
  padding: 6px 22px 6px 34px; border-left: 2px solid transparent; line-height: 1.35;
}
.navgrp.on a.sub:hover { color: #fff; }
.navgrp.on a.sub.on { color: #fff; border-left-color: #5d9075; }
.navgrp.on { padding-bottom: 8px; }
.navout { padding: 12px 22px 0; margin-top: 6px; border-top: 1px solid #2d5c40; }
.navout button {
  appearance: none; background: none; border: 0; padding: 0; font: inherit;
  font-size: 12.5px; color: #9dbcaa; cursor: pointer;
}
.navout button:hover { color: #fff; }
.navtag {
  display: inline-block; font-size: 10px; background: #2f6044; color: #a9cbb7;
  border-radius: 20px; padding: 2px 7px; margin-left: 6px; vertical-align: middle;
}

/* ---------- type ---------- */
h1 { font-size: 25px; font-weight: 500; margin: 0 0 3px; letter-spacing: normal; }
h2 { font-size: 20px; font-weight: 500; margin: 0 0 5px; letter-spacing: normal; }
h3 { font-size: 16px; font-weight: 500; margin: 0 0 5px; }
h1 .chev { font-size: 14px; color: var(--ink3); font-weight: 400; vertical-align: middle; }
.sub { color: var(--ink2); font-size: 13px; margin: 0 0 26px; }
.sub2 { color: var(--ink2); font-size: 12.5px; margin: 0 0 18px; }
.sec { padding-top: 36px; margin-top: 36px; border-top: 1px solid var(--line2); }
.sec:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.blk { margin-top: 30px; }
.ovw { padding-bottom: 6px; }
.lab { font-size: 11px; color: var(--ink3); margin: 0 0 7px; display: flex; justify-content: space-between; gap: 14px; }
.ttl { font-size: 13px; font-weight: 500; margin: 0 0 11px; }
.ttl.s { font-size: 12px; margin-bottom: 7px; }
.bhead { font-size: 12.5px; font-weight: 500; color: var(--ink2); margin: 0 0 11px; }
/* A second heading inside one block starts a new subject, so it needs air above
   it — otherwise it reads as a caption on the thing before it. */
.bhead.next { margin-top: 22px }
.shead { display: block; font-size: 13px; font-weight: 500; margin: 0 0 11px; }
.shead em { font-style: normal; font-weight: 400; font-size: 11px; color: var(--ink3); }
.meta {
  margin: 11px 0 0; font-size: 11.5px; color: var(--ink3); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.def { margin: 6px 0 0; font-size: 12px; color: var(--ink2); }
.mut { color: var(--ink3); }
.split-rule { border-top: 1px solid var(--line2); margin: 26px 0 22px; }
.subrule { border-top: 1px solid var(--line); margin: 32px 0 0; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 18px; }
.soft { background: var(--soft); border-radius: var(--r); padding: 13px 15px; }
.grid { display: grid; gap: 11px; align-items: stretch; }
.grid > .card, .grid > .soft { display: flex; flex-direction: column; height: 100%; }
.grid > .card > .def, .grid > .soft > .def { margin-bottom: 0; min-height: 3.1em; }
.grid > .card > .meta, .grid > .soft > .meta { margin-top: 0; padding-top: 12px; min-height: 3.4em; }
/* The prototype's summary cards are divs; ours are real links, so they need
   blockifying — an inline <a> collapses the card and its text spills out. */
a.card, a.soft { display: block; }
a.card, a.soft, .go { color: inherit; text-decoration: none; transition: border-color .12s, background .12s; }
/* headline figure beside its delta */
.numrow { display: flex; align-items: baseline; gap: 10px; }
.go { cursor: pointer; }
.card.go:hover { border-color: var(--green); }
.soft.go:hover { background: var(--pale2); }
.go:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.num { font-size: 30px; font-weight: 500; line-height: 1.04; font-family: inherit; color: var(--ink); }
.num.sm { font-size: 22px; }
.dlt { font-size: 12px; color: var(--ink3); }
.dlt.up { color: var(--green); }
.dlt.dn { color: var(--bad); }
.dlt.ph { color: var(--ink3); }

/* ---------- hero stat ---------- */
.hero { display: flex; align-items: center; gap: 28px; padding: 4px 0 18px; flex-wrap: wrap; }
.hero .fig { font-size: 62px; font-weight: 500; line-height: .92; letter-spacing: -.02em; }
.hero .side { flex: 1; min-width: 260px; }
.hero .side p { margin: 0 0 9px; font-size: 13.5px; color: var(--ink2); }
.split { display: flex; gap: 30px; flex-wrap: wrap; font-size: 12px; color: var(--ink3); }
.split b { display: block; font-size: 17px; font-weight: 500; color: var(--ink); line-height: 1.2; }

/* ---------- bars ---------- */
/* The columns live on `.bars`, and each row borrows them with `subgrid`. That is the
   whole trick: every `.row` is its own grid, so sizing the label column per row — which
   is what `auto` did — measured each label separately and the bars started at a
   different x on every line. Declared once on the parent, `max-content` is the widest
   label across the whole chart, so the bars align and no more space is held back than
   the longest label needs.

   Behind @supports because a dropped `grid-template-columns` would not degrade — it
   would stack every label, bar and value vertically. Without subgrid the rows fall back
   to the proportional split they had before. */
.bars { display: grid; gap: 9px; }
.card > .bars { padding: 2px 0; }
/* The proportional fallback, for anything without subgrid. */
.row {
  display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 3fr) 78px;
  align-items: center; gap: 12px;
}
@supports (grid-template-columns: subgrid) {
  .bars {
    gap: 9px 12px;
    grid-template-columns: minmax(90px, max-content) minmax(0, 1fr) 78px;
  }
  /* No `gap` here: a subgrid inherits the parent's, and setting it to zero is what
     ran the longest label straight into its bar. `.bars` owns both gaps — 12px
     between the columns, 9px between the rows. */
  .row { grid-template-columns: subgrid; grid-column: 1 / -1; }
  .bars.mini { grid-template-columns: 112px minmax(46px, 1fr) 56px; gap: 9px 11px; }
}
/* Capped so one long label cannot squeeze the bar it labels: past this it wraps
   rather than pushing the chart over. The cap also bounds the max-content track. */
.row .k { font-size: 13px; color: var(--ink); max-width: 280px; overflow-wrap: anywhere; }
.row .t { height: 22px; background: var(--bar-track); border-radius: 5px; overflow: hidden; }
.row .t i { display: block; height: 100%; background: var(--bar-you); }
.row .t i.other { background: var(--bar-other); }
.row .v { text-align: right; font-size: 13px; font-weight: 500; color: var(--ink); }
.row .v small { display: block; font-weight: 400; font-size: 11px; color: var(--ink3); margin-top: 0; }
.mini .row { grid-template-columns: 112px minmax(46px, 1fr) 56px; gap: 11px; }
.mini .row .k { white-space: nowrap; font-size: 12.5px; color: var(--ink); }
.mini .row .v small { white-space: nowrap; }
.mini .row .t { height: 15px; }
.mini .row .v { font-size: 12.5px; color: var(--ink); }
.tt { display: block; height: 13px; background: var(--bar-track); border-radius: 4px; overflow: hidden; }
.tt i { display: block; height: 100%; background: var(--bar-other); }

/* ---------- share-of-voice tables ---------- */
.sov td { padding: 7px 8px 7px 0; }
.sub-cell { font-size: 12px; color: var(--ink2); }
.bad-cell { font-size: 12px; color: var(--bad); }
.good-cell { font-size: 12px; color: var(--green); }
.sov { table-layout: auto; }
/* The name is as wide as it needs to be; the bar takes the rest. `width: 100%` on a
   table cell is a instruction to grow, not a literal width — the other two columns
   size to their content and this one absorbs the remainder. */
.sov th.sov-bar, .sov td:nth-child(2) { width: 100%; }
.sov td:nth-child(1) { white-space: nowrap; padding-right: 18px; }
.sov td:nth-child(2) { padding-right: 18px; }
.sov td:nth-child(n+3) { width: 84px; padding-right: 0; }
.sov tr.me td { font-weight: 500; }
.sov tr.me .tt i { background: var(--bar-you); }
.sov tr.bench td { border-top: 1px solid var(--line2); color: var(--ink2); font-style: italic; }
.sov tr.bench .tt i { background: var(--bar-other); }

/* stacked categorical bar: colour encodes the category across every row, and the
   property's own row is marked by label weight instead. Negative always --bad:
   it is a flag, not a step in the ramp. */
.stack { display: flex; height: 15px; background: var(--bar-track); border-radius: 3px; overflow: hidden; }
.stack i { display: block; height: 100%; }
.stack i + i { box-shadow: inset 1px 0 0 #fff; }
.stack i.a { background: #6f7f76; }
.stack i.b { background: #aab5ae; }
.stack i.c { background: #dfe4e0; }
.stack i.d { background: var(--bad); }
.key { display: flex; gap: 16px; margin: 10px 0 0; font-size: 11px; color: var(--ink3); }
.key span { display: flex; align-items: center; gap: 5px; }
/* The swatch classes mirror .stack i — the prototype set these inline; keeping them
   here is what lets the templates hold no inline colour at all. */
.key b { display: block; width: 9px; height: 9px; border-radius: 2px; }
.key b.a { background: #6f7f76; }
.key b.b { background: #aab5ae; }
.key b.c { background: #dfe4e0; }
.key b.d { background: var(--bad); }

/* ---------- buttons ----------
   app.css builds .btn from --ink, a near-black that belongs to the app shell. On the
   dashboard the palette is green, and a control that is nearly black reads as a
   different product. Secondary is the same green, outlined: "Cancel" beside "Add
   prompt" was falling through to the browser's own grey button chrome, which is what
   made the dialog look unfinished. */
.btn { background: var(--dgreen); border-color: var(--dgreen); color: #fff; }
.btn:hover { background: var(--green); border-color: var(--green); opacity: 1; }
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn.secondary { background: var(--card); color: var(--dgreen); border-color: var(--line2); }
.btn.secondary:hover {
  background: var(--pale2); border-color: var(--green); box-shadow: none; opacity: 1;
}
.btn.sm { font-size: 12.5px; padding: 7px 14px; }

/* The shared form focus ring is --vis, the app's blue. Nothing else on the dashboard is
   blue, so a focused field was the one thing on screen from another palette. */
form.styled input:focus, form.styled select:focus, form.styled textarea:focus {
  outline-color: var(--green); border-color: var(--green);
}

/* ---------- sign in ----------
   Its own centred card on the page ground, with no sidebar and no chrome bar. */
/* base.html wraps every page in main.content, which is capped at 900px and sits at the
   left of the layout — right for a dashboard beside a sidebar, wrong for a sign-in page
   that has no sidebar and should sit in the middle of the window. */
main.content:has(> .signin) { max-width: none; padding: 0; }
.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.signin-card {
  width: min(420px, 100%); background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 34px 34px 30px; box-shadow: var(--menu);
}
/* The same lockup on the brand's own ground, so here the wordmark is ink. */
.signin-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.signin-brand img { display: block; }
.signin-brand span {
  font-family: var(--figs); font-weight: 700; font-size: 20px; letter-spacing: -.02em;
  color: var(--ink);
}
.signin-card h1 { font-size: 23px; margin: 0 0 4px; }
.signin-card .sub { margin-bottom: 22px; }
.signin-card form.styled label { margin-top: 16px; }
.signin-card form.styled input { max-width: none; }
.signin-card .btn { width: 100%; margin-top: 24px; text-align: center; }
.signin-reset { display: block; margin-top: 16px; font-size: 12.5px; color: var(--ink2); text-decoration: none; }
.signin-reset:hover { color: var(--ink); }
.signin .errorlist { margin: 0 0 4px; padding: 0; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; font-size: 11px; color: var(--ink3); padding: 0 8px 7px 0; border-bottom: 1px solid var(--line); }
td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; padding-right: 0; }

/* A link in a table cell. There was no rule for one, so it fell through to the
   browser's default blue underline — the only place on the dashboard that happened.
   Same treatment as a link in a takeaway: the text keeps its colour and a hairline
   carries the affordance. */
td a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--line2); }
td a:hover { border-bottom-color: var(--ink3); }

.chip { display: inline-block; font-size: 11px; padding: 2px 9px; border-radius: 20px; background: var(--pale); color: var(--dgreen); border: 0; }
.chip.g { background: var(--palegold); color: var(--gold); }
.chip.b { background: var(--palebad); color: var(--bad); }
.chip.n { background: var(--soft); color: var(--ink2); }

/* ── Prompts ──────────────────────────────────────────────────────────────
   Search bar, the add-prompt dialog, and an answer's own prose. The dialog is a
   native <dialog>, so the backdrop, focus trap and Escape key are the browser's
   job rather than ours. */
.promptbar { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; }
.promptbar input[type=search] {
  flex: 1; min-width: 0; font: inherit; font-size: 13px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 11px;
}
.promptbar input[type=search]:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--pale2);
}
/* The pager's controls are buttons now that paging happens in the browser, so they
   have to be un-buttoned back to the link they look like everywhere else. */
.pager .linkbtn {
  font: inherit; font-size: 12px; color: var(--ink2); background: none; border: 0;
  padding: 0; cursor: pointer; border-bottom: 1px solid var(--line2);
}
.pager .linkbtn:hover:not(:disabled) { color: var(--ink); border-bottom-color: var(--ink3); }
.pager .linkbtn:disabled { color: var(--ink3); border-bottom-color: transparent; cursor: default; }

.modal {
  /* `margin: auto` is what centres a modal <dialog>, and app.css's `* { margin: 0 }`
     had already taken it away — which is why this opened hard against the top left. */
  margin: auto;
  width: min(520px, calc(100vw - 32px)); border: 1px solid var(--line);
  border-radius: var(--r); background: var(--card); color: var(--ink); padding: 22px 24px;
  box-shadow: 0 12px 40px rgba(22, 36, 28, .18);
}
.modal::backdrop { background: rgba(22, 36, 28, .35); }
.modal h3 { margin: 0 0 4px; }
.modal .sub2 { margin-bottom: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* An assistant's answer is prose it wrote, not a figure we computed. Left as written,
   with its own line breaks kept. */
.answer { margin: 0; white-space: pre-wrap; font-size: 13px; line-height: 1.7; }

/* One panel per assistant, paging through that assistant's answers. The rule under
   .shead carries the boundary; the extra space above a following group is what stops
   two assistants reading as one list. */
.answer-group + .answer-group { margin-top: 34px; }
.answer-group .pager { padding-top: 12px; }
/* A panel holds one answer at a time, and answers differ wildly in length. Without a
   floor the panel collapses to two lines and the pager jumps up the page between
   clicks; with a ceiling a very long answer scrolls inside its own panel rather than
   pushing the assistant below it off the screen. */
.answer-card { min-height: 150px; max-height: 60vh; overflow-y: auto; }

/* ---------- stated empty states (design-spec.md §8) ---------- */
.empty, .emptybox, .empty-state {
  background: var(--soft); border: 1px dashed var(--line2); border-radius: var(--r);
  padding: 20px 18px; color: var(--ink2); font-size: 13px;
}
.empty b, .emptybox b { display: block; font-weight: 500; color: var(--ink); margin-bottom: 3px; }
.note { background: var(--palegold); border: 1px solid #e8d5a8; border-radius: var(--r); padding: 13px 16px; font-size: 12.5px; color: #6b4c05; }
.note b { font-weight: 500; }
.quote { border-left: 2px solid var(--line2); padding-left: 12px; margin: 9px 0 0; color: var(--ink); font-size: 12.5px; line-height: 1.6; }
.grid > .card > .quote { margin-bottom: 0; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; font-family: ui-monospace, monospace; }
ul.t { margin: 6px 0 0; padding-left: 17px; font-size: 12.5px; color: var(--ink2); }
ul.t li { margin-bottom: 4px; }
dl.m { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; font-size: 12.5px; }
dl.m dt { color: var(--ink3); }
dl.m dd { margin: 0; color: var(--ink2); }

.tobuild {
  display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 400;
  background: var(--palegold); color: var(--gold); border-radius: 20px; padding: 3px 10px; margin-left: 8px;
}
.plist { margin-top: 4px; }
.pname { font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); }
.pname:first-child { border-top: 0; }
.todo { display: grid; grid-template-columns: 170px 1fr; gap: 22px; align-items: start; }
.todo-l { border-right: 1px solid var(--line); padding-right: 20px; }

/* The small numeral before a block heading — i, ii, iii within a view. The page-level
   numbers this also carried are gone: the sidebar is the order, and a "3" beside a
   title read as a rank rather than a position. */
.lvl { color: var(--gold); font-weight: 500; margin-right: 7px; font-variant-numeric: normal; }

/* ---------- chrome bar (the prototype's .chrome; carries our working menus) ---------- */
.chrome { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; flex-wrap: wrap; }
.chrome .back {
  font-size: 12.5px; color: var(--ink2); text-decoration: none;
  background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer;
}
.chrome .back:hover { color: var(--ink); }
/* The trail that replaced the property switcher. Sized like the .back link it also
   replaced, so the chrome bar keeps its weight — the current page is the only part that
   takes full ink, because everything before it is somewhere to go rather than where you
   are. */
.chrome-crumbs { font-size: 12.5px; color: var(--ink2); line-height: 1.4; }
.chrome-crumbs a { color: var(--ink2); text-decoration: none; }
.chrome-crumbs a:hover { color: var(--ink); border-bottom: 1px solid var(--ink3); }
.chrome-crumbs .sep { color: var(--ink3); margin: 0 6px; }
.chrome-crumbs .cur { color: var(--ink); }
.chrome .spacer { flex: 1; }
.chrome .ctl, .chrome select.ctl {
  font-size: 12px; color: var(--ink2); border: 1px solid var(--line); border-radius: 7px;
  padding: 4px 10px; background: var(--card); font-family: inherit;
}
/* The period a customer sees is a label, not a control. It used to carry .ctl, which is
   the admin's run picker, so it sat in the chrome bar boxed and bordered beside the
   property switcher and invited a click that does nothing. Same size and colour, no
   affordance. */
.chrome .period { font-size: 12px; color: var(--ink3); padding: 4px 2px; font-family: inherit; }
.chrome .badge { font-size: 11px; color: var(--ink3); background: var(--soft); border-radius: 7px; padding: 4px 9px; }
.chrome .badge-link { text-decoration: none; display: inline-block; }
.chrome .badge-link:hover { background: var(--pale2); color: var(--ink2); }
.chrome .cog {
  font-size: 14px; color: var(--ink3); background: none; border: 0; cursor: pointer;
  padding: 4px 6px; line-height: 1;
}
.chrome .cog:hover { color: var(--ink); }
.menuwrap { position: relative; }
.menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: 270px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--menu, 0 8px 24px rgba(22, 36, 28, .12)); padding: 6px;
}
.menu.right { left: auto; right: 0; width: 220px; }
.menu.open { display: block; }
.menu .mi {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px;
  text-decoration: none; color: var(--ink); font-size: 13px;
}
.menu .mi:hover, .menu .mi.cur { background: var(--soft); }
.menu .mi img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; flex: none; }
.menu .mi .nm { display: block; font-size: 13px; font-weight: 500; }
.menu .mi .lc { display: block; font-size: 11.5px; color: var(--ink3); }
.menu .mi .tick { margin-left: auto; color: var(--green); }
.menu .div { height: 1px; background: var(--line); margin: 7px 4px; }
.menu .all { display: block; padding: 8px 10px; border-radius: 7px; text-decoration: none; color: var(--ink2); font-size: 12.5px; }
.menu .all:hover { background: var(--soft); color: var(--ink); }
.menu .logout { width: 100%; text-align: left; border: 0; background: none; font: inherit; cursor: pointer; color: var(--ink); }

/* ---------- portfolio ---------- */
.wrap { max-width: var(--content-max, 1080px); margin: 0 auto; }
.grouphd { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 26px 0 22px; }
.grouphd h1 { font-size: 28px; }
.grouphd p { margin: 8px 0 0; color: var(--ink2); font-size: 14px; }
.props { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prop {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; text-decoration: none; color: inherit; display: block;
  transition: border-color .14s ease;
}
.prop:hover { border-color: var(--green); }
.prop .ph { position: relative; aspect-ratio: 16 / 10; background: var(--line); }
.prop .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop .body { padding: 16px 18px 18px; }
.prop h3 { font-size: 15px; font-weight: 500; margin: 0; color: var(--ink); }
.prop .loc { color: var(--ink3); font-size: 12.5px; margin-top: 3px; }
.pchips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 15px; }
.pchip { border-radius: 7px; padding: 8px 6px; text-align: center; background: var(--soft); }
.pchip .cv { font-size: 14px; font-weight: 500; color: var(--ink); }
.pchip .cv.none { font-size: 12.5px; color: var(--ink3); }
.pchip .cl { font-size: 10px; letter-spacing: 0.03em; margin-top: 2px; color: var(--ink3); }

/* ---------- page head (settings/reports keep a plain heading) ---------- */
.phead { margin-bottom: 18px; }
.phead p { margin: 7px 0 0; color: var(--ink2); font-size: 13px; }
.crumb { font-size: 12.5px; color: var(--ink3); margin-bottom: 7px; }
.crumb a { color: var(--ink3); text-decoration: none; }
.crumb a:hover { color: var(--ink); }

/* ---------- settings fields ---------- */
.field { padding: 13px 0; border-top: 1px solid var(--line); display: flex; gap: 18px; align-items: flex-start; }
.field:first-of-type { border-top: 0; }
.field .lb { width: 180px; flex: none; color: var(--ink3); font-size: 13px; padding-top: 2px; }
.field .vl { flex: 1; font-size: 13.5px; }
.field .vl small { display: block; color: var(--ink3); font-size: 12px; margin-top: 3px; }

@media (max-width: 900px) { .props, .pchips { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  .todo { grid-template-columns: 1fr; }
  .todo-l { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
}
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .nav { width: 100%; flex: none; position: static; height: auto; padding: 16px 0; overflow-y: visible; }
  .nav .navsp { margin-top: 0; }
  .navgrp.on a.sub { padding-left: 34px; }
  main.content { padding: 20px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .hero .fig { font-size: 46px; }
  .row { grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr) 66px; gap: 10px; }
  .props { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ── TYPE RULE ───────────────────────────────────────────────────
   A label naming a thing            13px, --ink        (bar labels, table cells)
   A value                           13px, 500, --ink
   Its sample size or sub-figure     11px, --ink3
   Column headers                    11px, 500, --ink3
   Commentary under a visual         11.5px, --ink3
   Nothing that names a thing is ever set in a lighter colour than
   anything else that names a thing.
   ────────────────────────────────────────────────────────────────
   BAR COLOUR RULE
   Colour says WHOSE number it is, never whether it is good or bad.
     default  green  var(--bar-you)    a value belonging to this property
     .other   grey   var(--bar-other)  a rival, a benchmark, or a non-you category
     track           var(--bar-track)  the empty remainder
   Length carries good and bad. Never add a third bar colour.
   ──────────────────────────────────────────────────────────────── */

/* ── Detail pages ─────────────────────────────────────────────────────────
   A recommendation brief and a check detail are reached from a table row, so
   they need a way back that is not the browser button. */
.crumbs { font-size: 12px; margin: 0 0 14px; letter-spacing: .01em }
.crumbs a { color: var(--ink2); text-decoration: none; border-bottom: 1px solid var(--rule) }
.crumbs a:hover { color: var(--ink); border-bottom-color: var(--ink3) }
.crumbs .mut { margin: 0 6px }

.steps { margin: 0; padding-left: 20px }
.steps li { padding: 5px 0; line-height: 1.5 }
.steps li + li { border-top: 1px solid var(--rule) }

.scope { margin: 0; padding-left: 18px; list-style: none }
.scope li { padding: 3px 0; word-break: break-all; font-size: 12px }

/* ── Filters and pagination ───────────────────────────────────────────────
   The recommendations page groups by kind of work, each group carrying its own
   rail (see .audit-workgroup). A kind with nothing in it keeps its filter chip
   and shows a zero: an empty Publications group is a finding about thin
   evidence, not a gap to fill with invented actions. */
.pager {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 2px 0; font-size: 12px;
}
.pager a { color: var(--ink2); text-decoration: none; border-bottom: 1px solid var(--rule) }
.pager a:hover { color: var(--ink) }
.chrome .back.on { color: var(--ink); border-bottom: 1px solid var(--ink3) }

/* A card whose analysis is not written yet. Muted and stated, not hidden: an empty space
   reads as a view that has nothing to say, where this one has not been written. */
.structure-takeaways.pending, .structure-related.pending { border-style: dashed }
.structure-takeaways.pending p, .structure-related.pending p {
  margin: 10px 0 0; font-size: 12.5px; color: var(--ink3);
}

/* One check, as v3 draws it: a card carrying where the rule lives, what it asks, and
   how it came out. Tables put the verdict in a column where it reads as data; the badge
   makes it the thing you scan for. */
.audit-list-row {
  display: flex; gap: 15px; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 15px 16px; margin: 8px 0;
}
.audit-list-row > div:first-child { flex: 1; min-width: 0 }
.audit-list-row h4 { font-size: 13px; font-weight: 500; margin: 4px 0 }
.audit-list-row p { font-size: 12px; line-height: 1.6; color: var(--ink2); margin: 6px 0 0 }
.audit-list-row .audit-label {
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3);
}
.audit-list-row .checklink {
  font-size: 12px; color: var(--ink2); text-decoration: none; white-space: nowrap;
  border-bottom: 1px solid var(--rule);
}
.audit-list-row .checklink:hover { color: var(--ink) }
.audit-pill.pass { background: #e8f2e8; color: #2f653b }
.audit-pill.work { background: #fbebe1; color: #96502b }
.audit-pill.confirm { background: #f6efdb; color: #7a5c1e }
.audit-pill.optional { background: var(--soft); color: var(--ink3) }

/* The filter row above a rule list: area on the left, result on the right, the current
   choice marked. Server-side links rather than selects, so a filtered view can be shared
   and the back button does what a reader expects. */
.audit-toolbar {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px;
}
.audit-toolbar label { font-size: 11px; color: var(--ink3); display: inline-flex;
  align-items: center; gap: 6px }
.audit-toolbar .audit-filter {
  font: inherit; font-size: 12px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px;
}
.audit-toolbar .audit-label { font-size: 10px; color: var(--ink3) }
.audit-toolbar .audit-spacer { flex: 1 }
.audit-toolbar .audit-btn {
  font-size: 12px; color: var(--ink2); text-decoration: none; padding: 4px 9px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card);
}
.audit-toolbar .audit-btn:hover { border-color: var(--green); color: var(--ink) }
.audit-toolbar .audit-btn.on {
  background: var(--wash); border-color: var(--dgreen); color: var(--dgreen); font-weight: 500;
}
.structure-access-group.on { border-color: var(--dgreen); background: var(--wash) }

/* Key takeaways and What we recommend: two cards, as v3 draws them. A numbered list,
   the number in a soft disc so the eye can count findings without reading them. */
.structure-takeaways, .structure-related { padding: 16px 18px; margin: 18px 0 }
.structure-takeaways h3, .structure-related h3 { font-size: 13px; margin: 0 }
.structure-takeaways ol, .structure-related ol {
  list-style: none; padding: 0; margin: 12px 0 0; counter-reset: insight;
}
.structure-takeaways li, .structure-related li {
  counter-increment: insight; position: relative; padding: 11px 0 11px 30px;
  border-top: 1px solid var(--line); font-size: 13px; line-height: 1.65;
}
.structure-takeaways li:first-child, .structure-related li:first-child { border-top: 0 }
.structure-takeaways li::before, .structure-related li::before {
  content: counter(insight); position: absolute; left: 0; top: 13px; width: 20px;
  height: 20px; border-radius: 50%; background: var(--soft); text-align: center;
  font-size: 11px; line-height: 20px; color: var(--dgreen);
}
.structure-related .structure-section-head { margin: 0; display: flex;
  justify-content: space-between; align-items: baseline; gap: 12px }
.structure-related li a { color: inherit; text-decoration: none;
  border-bottom: 1px solid var(--rule) }
.structure-related li a:hover { border-bottom-color: var(--ink) }
.structure-related .audit-btn {
  border: 0; background: none; padding: 0; font-size: 12px; color: var(--ink2);
  text-decoration: none; cursor: pointer;
}
/* The base a takeaway's own figures rest on, set apart from the sentence. */

/* ── Takeaways ────────────────────────────────────────────────────────────
   An issue and the actions answering it, above the charts that evidence them.
   Only pairs render: an issue with no action is context, and context belongs
   in a chart rather than at the top of a page. */
.takeaways { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 18px }
.takeaway {
  border-left: 2px solid var(--ink3); padding: 2px 0 2px 14px;
}
.takeaway p { margin: 0 0 6px; line-height: 1.5 }
.takeaway ul { margin: 0; padding-left: 16px }
.takeaway li { font-size: 12px; color: var(--ink2); padding: 2px 0 }
.takeaway a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule) }
.takeaway a:hover { color: var(--ink) }

/* ═══ v3 layout ═══════════════════════════════════════════════════════════
   Ported from the prototype's structure.css and customer-report.css. Our
   tokens are the same names and the same values, so this is the prototype's
   geometry on our palette rather than a reinterpretation of it. */

.structure-heading { margin-bottom: 18px }
.structure-heading h2 { font-size: 20px; margin: 0 0 5px }
.structure-heading .sub { font-size: 13px; margin-bottom: 18px }
.structure-explainer { font-size: 12.5px; color: var(--ink2); line-height: 1.65 }

/* An interpretation of the page, not a number from it. Gold rule, cream ground. */
.structure-takeaway {
  font-size: 13px; line-height: 1.65; border-left: 3px solid var(--gold);
  background: var(--palegold); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 18px 0;
}

.structure-section-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin: 26px 0 12px;
}
.structure-section-head h2, .structure-section-head h3 { margin: 0 }
.structure-section-head h3 { font-size: 14px }

/* The four views of a panel, as tabs. One line, name over figure — the summary page
   carries the definitions and the evidence, so a tab needs only enough to be recognised
   and to show which way its number went. */
.viewtabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  margin: 0 0 22px;
}
.viewtab {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: var(--card); color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--line);
}
.viewtab:hover { border-color: var(--green); background: #fcfefb }
.viewtab.on { border-color: var(--line); border-bottom-color: var(--dgreen); background: var(--wash) }
.viewtab-label { font-size: 12px; color: var(--ink2); line-height: 1.3 }
.viewtab.on .viewtab-label { color: var(--dgreen); font-weight: 500 }
.viewtab > strong {
  font-size: 17px; font-weight: 500; letter-spacing: -.2px; line-height: 1.3;
  overflow-wrap: anywhere;
}
/* The words qualifying the figure, set like a summary tile's caption: smaller and grey,
   so the number reads first and the unit explains it rather than competing. */
.viewtab-unit { font-size: 11.5px; font-weight: 400; color: var(--ink3); letter-spacing: 0 }
/* An unmeasured view still gets a tab: it is reachable, and it says why it is empty
   when you open it. Sizing it like a figure would make "not measured" look like one. */
.viewtab > strong.none { font-size: 12px; font-weight: 400; color: var(--ink3) }

@media (max-width: 860px) {
  .viewtabs { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}

.structure-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px }
.structure-card {
  display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 15px;
  background: var(--card); color: var(--ink); text-decoration: none; min-width: 0;
}
.structure-card:hover { border-color: var(--green); background: #fcfefb }
.structure-card-title {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  width: 100%; font-size: 13px; font-weight: 500;
}
.structure-card-title > span { color: var(--ink3) }
.structure-card > strong {
  font-size: 24px; font-weight: 500; letter-spacing: -.5px; line-height: 1.35; color: var(--ink);
}
.structure-card > strong.none { font-size: 13px; letter-spacing: 0; color: var(--ink3) }

/* What a metric means lives in a tooltip, not in the card. The definition was a
   paragraph on every card, so eight cards carried eight paragraphs and the figures they
   were meant to frame had to compete with them for the reader's eye. A reader who wants
   the definition asks for it; one who wants the number should meet the number. */
.info {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; margin-left: 6px; border: 1px solid var(--line2);
  border-radius: 50%; font-size: 9.5px; font-style: italic; color: var(--ink3);
  cursor: help; position: relative; vertical-align: middle; flex: 0 0 auto;
}
.info .tip {
  display: none; position: absolute; left: 50%; top: 20px; transform: translateX(-50%);
  width: 230px; background: var(--ink); color: #fff; font-size: 11.5px; font-style: normal;
  font-weight: 400; line-height: 1.45; padding: 9px 11px; border-radius: 7px;
  z-index: 20; text-align: left; letter-spacing: 0; text-transform: none;
}
/* Focus as well as hover: the icon is tabbable, so the definition has to be reachable
   without a pointer. */
.info:hover .tip, .info:focus .tip, .info:focus-within .tip { display: block }

/* The comparison line sits at the foot of the card so the eight of them line up, and
   it is absent rather than blank where no rival number exists to compare against. */
/* The evidence the figure rests on, at the foot of the card so the eight of them line
   up. min-height reserves the second line: without it a one-line caption shortens its
   card and the grid goes ragged. */
.structure-card-caption {
  font-size: 11.5px; line-height: 1.6; padding-top: 8px; margin: auto 0 0;
  min-height: 2.6em; color: var(--ink2); width: 100%;
}

/* The recommendation preview: one count, then the work to start with. */
/* Built from .structure-card so it matches the eight above it — same title row, same
   figure size and ink, same hover. It differs only in spanning the grid. */
.structure-summary-actions { gap: 14px; padding-bottom: 18px }
.structure-summary-actions > strong {
  font-size: 24px; font-weight: 500; letter-spacing: -.5px; line-height: 1.35; color: var(--ink);
}

/* The shape of the work, along the bottom. A row scales to however many kinds there
   are, where the stacked list did not; each cell is its own block so the count reads
   first and the label under it. A kind with nothing in it is dimmed, not dropped. */
.sa-breakdown {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px;
  margin: 4px 0 0; width: 100%;
}
.sa-breakdown > div { background: var(--soft); border-radius: 8px; padding: 10px 12px }
.sa-breakdown > div.none { background: transparent; box-shadow: inset 0 0 0 1px var(--line) }
.sa-breakdown dd {
  margin: 0; font-size: 17px; font-weight: 500; color: var(--ink); line-height: 1.2;
}
.sa-breakdown > div.none dd { color: var(--ink3) }
.sa-breakdown dt {
  font-size: 11px; color: var(--ink2); margin-top: 3px; text-transform: capitalize;
}
@media (max-width: 700px) {
  .sa-breakdown { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr) }
}

/* The "n more in your full plan" line under a What-we-recommend list. Ruled off and
   indented clear of the numbers so it cannot be read as an unnumbered list item. */
.related-more {
  margin: 0; padding: 12px 0 0 30px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink3);
}

.report-summary-link { text-align: right; margin: 10px 0 }
.report-summary-link .audit-btn {
  border: 0; background: none; padding: 0; font-size: 13px; color: var(--ink2);
  text-decoration: none; cursor: pointer;
}
.report-summary-link .audit-btn:hover { color: var(--ink) }

#summary h1 { font-size: 25px; margin-bottom: 22px }
.shead {
  font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--dgreen);
  padding-bottom: 9px; border-bottom: 1px solid var(--line2); margin: 28px 0 12px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.shead .src { text-transform: none; letter-spacing: 0; color: var(--ink3); font-size: 11.5px }

/* Three headline figures above a diagnostic view. */
.structure-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 }
.audit-metric { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: var(--card) }
.audit-metric .audit-label {
  font-size: 10px; letter-spacing: .7px; text-transform: uppercase; color: var(--ink3);
  display: block; margin-bottom: 6px;
}
.audit-metric strong { font-size: 26px; font-weight: 500; line-height: 1.2; display: block }
.audit-metric small { font-size: 12px; color: var(--ink2); display: block; margin-top: 6px }

/* Pass / needs work / everything else, as one bar. */
.structure-status { margin: 16px 0 }
.structure-status-track { display: flex; height: 10px; border-radius: 8px; overflow: hidden; background: var(--soft) }
.structure-status-track i.pass { background: var(--green) }
.structure-status-track i.work { background: #c18b49 }
.structure-status-track i.other { background: #c9d3cc }
.structure-status-key { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 9px; color: var(--ink2); font-size: 12px }

.structure-access-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 22px 0 }
.structure-access-group {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left;
  border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--card);
  color: var(--ink); text-decoration: none; font-size: 13px;
}
.structure-access-group:hover { border-color: var(--green) }
.structure-access-group strong { font-size: 18px; font-weight: 500; color: var(--dgreen) }
.structure-access-group small { color: var(--ink2); font-size: 11px }

@media (max-width: 760px) {
  .structure-cards, .structure-access-groups, .structure-metrics { grid-template-columns: 1fr }
  .structure-section-head { align-items: flex-start; flex-direction: column; gap: 8px }
}

/* The base a takeaway is quoting, beside the claim. Without it a share of one
   population reads as a contradiction of the headline's different population. */

/* ── Recommendations, v3 geometry ─────────────────────────────────────────
   Grouped sections, each with a sticky rail naming the kind of work, and one
   card per action. Not a table: an action carries a title, a reason, where its
   evidence lives and how big it is, and a table row flattens those into
   columns that fight for width. */
.audit-workgroup {
  display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
}
.audit-workgroup:first-of-type { border-top: 0; margin-top: 4px; padding-top: 0 }
.audit-workrail { align-self: start; position: sticky; top: 24px; padding-top: 18px }
.audit-workrail h3 { font-size: 14px; margin: 0 0 8px }
.audit-count { display: block; line-height: 1.6; font-size: 12px; color: var(--ink3) }

.structure-action {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px;
  padding: 16px 18px; margin: 0 0 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card);
}
.structure-action > div:first-child { grid-column: 1 / -1 }
.structure-action h4 { font-size: 13px; line-height: 1.5; margin: 0 0 6px; font-weight: 500 }
.structure-action p { font-size: 12px; margin: 0; line-height: 1.6; color: var(--ink2) }
.structure-action-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap }
.structure-action-sources {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink2); margin-top: 10px;
}
.structure-action-sources a {
  color: var(--ink2); text-decoration: none; border-bottom: 1px solid var(--line2); padding: 2px 0;
}
.structure-action-sources a:hover { color: var(--ink) }
.structure-action .brief {
  justify-self: end; align-self: center; font-size: 12px; color: var(--dgreen);
  text-decoration: none; white-space: nowrap;
}
.structure-action .brief:hover { border-bottom: 1px solid var(--dgreen) }

/* Work size as three rising bars: a word buried in a row is skipped, a shape is not. */
.structure-effort { display: inline-flex; gap: 7px; align-items: center; font-size: 12px; color: var(--ink2) }
.structure-effort > span { display: flex; gap: 3px; height: 16px; align-items: flex-end }
.structure-effort i { width: 4px; background: var(--line2); height: 6px; display: block }
.structure-effort i:nth-child(2) { height: 11px }
.structure-effort i:nth-child(3) { height: 16px }
.structure-effort i.filled { background: var(--green) }

.audit-pill {
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px;
  border-radius: 999px; background: var(--soft); color: var(--ink2); white-space: nowrap;
}
.audit-pill.first { background: var(--pale); color: var(--dgreen) }

@media (max-width: 1050px) {
  .audit-workgroup { grid-template-columns: 1fr; gap: 4px }
  .audit-workrail { position: static; display: flex; gap: 12px; align-items: baseline; padding: 0 }
}
@media (max-width: 700px) {
  .structure-action { grid-template-columns: 1fr }
  .structure-action > div:first-child { grid-column: auto }
  .structure-action .brief { justify-self: start }
}

/* A section a reader opens rather than scrolls past: secondary evidence that belongs on
   the page but should not compete with the measurement above it. */
.report-details { margin: 18px 0 }
.report-details > summary {
  cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink2);
  padding: 10px 0; border-top: 1px solid var(--line);
}
.report-details > summary:hover { color: var(--ink) }
.report-details[open] > summary { color: var(--ink) }

/* Timeline key: the tier a marker's colour stands for. Sits under the chart rather than
   inside the SVG, so it wraps on a narrow screen and the text is selectable. */
.timeline-key { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; }
.timeline-key span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink3); }
.timeline-key i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

/* An imported figure and our own computation disagreeing. Admin-only, and deliberately
   plain: it is a note to whoever owns both pipelines, not a customer-facing warning. */
.disagreement { color: var(--ink3); border-left: 2px solid var(--line); padding-left: 10px; }
