/* Innovative Refrigeration lead app.
   Built on the Innovative Design System (r717.net): Endeavour blue, Stratos navy,
   Anakiwa cyan as accent only, pure greys; Inter headings, Work Sans for the rest;
   8px corners, pill buttons, 1px borders, no card shadows; one 200x2 rule per page.
   Marketing sizes are translated to product density. */

@font-face { font-family: "Inter"; src: url("fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("fonts/work-sans-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  /* palette (DS primitives) */
  --white: #fff;
  --grey-1: #f2f2f2;          /* neutral-lightest, scheme 1 */
  --grey-2: #d8d8d8;          /* neutral-lighter */
  --grey-4: #7f7f7f;          /* neutral: UI strokes only, not text */
  --grey-5: #4c4c4c;          /* neutral-dark, text-muted */
  --ink: #000;
  --reach: #00806a;           /* eReach product colour: the badge only, never UI state */
  --endeavour: #015a9d;
  --endeavour-dark: #00487d;
  --endeavour-lighter: #ccdeeb;
  --endeavour-lightest: #e5eef5;
  --stratos: #001546;
  --stratos-darker: #000f33;
  --anakiwa: #7ee9ff;
  --yellow: #ffb200;
  --yellow-lightest: #fff7e5;
  --yellow-darker: #664700;
  --green: #83c78c;            /* energy-green: fills only */
  --green-ring: #2f6e38;       /* the 1px ring every energy-green dot carries */
  --endeavour-darkest: #001b2f; /* DS: end stop of the decorative rule only */
  --navy-muted: #b9c6dc;       /* muted text on Stratos Night only (10.9:1) */
  --ink-15: #00000026;
  --ink-40: #0006;
  --paper-20: #fff3;
  --rule: linear-gradient(90deg, var(--anakiwa) 50%, var(--endeavour) 76%, var(--endeavour-darkest));

  /* roles */
  --ground: var(--grey-1);
  --panel: var(--white);
  --text: var(--ink);
  --muted: var(--grey-5);
  --line: var(--ink-15);
  --control-line: var(--grey-4);
  --accent: var(--endeavour);

  --font-head: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-body: "Work Sans", "Segoe UI", system-ui, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --radius: 8px;
  --pill: 100px;
  --bar-h: 4rem;
  --control-h: 2.25rem;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t: .2s;
  --shadow-float: 0 0 0 1px #0000001a, 0 8px 24px -8px #00000033;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--grey-4) var(--grey-1); }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 400 1rem/1.5 var(--font-body);
}
.score, .table, .count, .points, .barlist, .figure b, .health .v, .funnel, .resultline strong, .kv dd, .meter { font-variant-numeric: tabular-nums; }
::selection { background: var(--endeavour-lighter); color: var(--ink); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -.02em; }
h2 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -.01em; }
h3 { font-size: 1rem; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
a { color: var(--endeavour); text-underline-offset: .18em; text-decoration-thickness: 1px; transition: color var(--t); }
a:hover { color: var(--endeavour-dark); }
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--endeavour); outline-offset: 2px; }
code { font: .8125rem/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--grey-1); border-radius: 4px; padding: 1px 5px; }
kbd {
  display: inline-block; min-width: 1.35em; padding: 0 .3em; border: 1px solid currentColor; border-radius: 4px;
  font: 500 .6875rem/1.35 var(--font-body); text-align: center; opacity: .8;
}
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 50; background: var(--white); padding: var(--s2) var(--s4); border-radius: var(--radius); }
.skip:focus { top: var(--s2); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .75rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.stack { display: grid; gap: var(--s3); }
.row { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- top bar (DS navbar at app density) ---------- */
.topbar {
  height: var(--bar-h); background: var(--white); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: var(--s5); padding: 0 var(--s6);
}
/* eReach lockup: badge mark + live wordmark; the credit sits on the same line */
.logo { display: flex; align-items: center; gap: .625rem; text-decoration: none; color: var(--ink); flex: none; }
.logo img { width: 2rem; height: 2rem; display: block; flex: none; }
.logo .wordmark { font: 700 1.25rem/1 var(--font-body); letter-spacing: -.01em; text-transform: none; }
.logo .credit { font: 500 .6875rem/1 var(--font-body); letter-spacing: .01em; color: var(--grey-5); align-self: center; margin-top: .2rem; margin-left: -.125rem; }
.mainnav { display: flex; align-items: stretch; height: 100%; gap: var(--s1); }
.mainnav a {
  display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s3); color: var(--ink); text-decoration: none;
  font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.mainnav a:hover { color: var(--endeavour); }
.mainnav a[aria-current="page"] { color: var(--endeavour); border-bottom-color: var(--endeavour); font-weight: 600; }
.count {
  display: inline-block; min-width: 1.6em; padding: 0 .45em; border-radius: var(--pill); text-align: center;
  font: 600 .75rem/1.5 var(--font-body); background: var(--grey-1); color: var(--ink); border: 1px solid var(--line);
}
a[aria-current="page"] .count { background: var(--endeavour); border-color: var(--endeavour); color: var(--white); }
.count.warn, a[aria-current="page"] .count.warn { background: var(--yellow-lightest); border-color: var(--yellow); color: var(--yellow-darker); }
.topbar .end { margin-left: auto; display: flex; align-items: center; gap: var(--s4); }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s2); font-size: .875rem; padding: var(--s2); border-radius: var(--radius); }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover { background: var(--grey-1); }
.usermenu .menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow-float); padding: var(--s2); display: grid;
}
.usermenu .menu a, .usermenu .menu button {
  display: block; width: 100%; text-align: left; padding: var(--s2) var(--s3); border-radius: 6px; color: var(--ink);
  text-decoration: none; background: none; border: 0; font: inherit; font-size: .9375rem; cursor: pointer;
}
.usermenu .menu a:hover, .usermenu .menu button:hover { background: var(--endeavour-lightest); }
.usermenu .who { padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); margin-bottom: var(--s1); font-size: .8125rem; color: var(--muted); }
.usermenu .who strong { display: block; color: var(--ink); font-size: .9375rem; }
.tabbar { display: none; }

/* ---------- page frame ---------- */
main { padding: var(--s5) var(--s6) var(--s7); max-width: 1440px; margin: 0 auto; }
.pagehead { display: flex; align-items: flex-end; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.pagehead .titles { display: grid; gap: var(--s2); min-width: 0; }
.rule { width: 200px; max-width: 100%; height: 2px; background: var(--rule); margin-bottom: var(--s2); }
.pagehead .lede { color: var(--muted); max-width: 70ch; }
.crumb { font-size: .875rem; color: var(--muted); display: flex; gap: var(--s2); align-items: center; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--endeavour); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); }
.panel > h2 { margin-bottom: var(--s3); }
.panel.flush { padding: 0; overflow: hidden; }
.section + .section { margin-top: var(--s5); padding-top: var(--s5); border-top: 1px solid var(--line); }
.section > h2 { margin-bottom: var(--s3); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s5); align-items: start; }
.halves { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); align-items: start; }

/* ---------- buttons (DS: pills, weight 500, darken on hover, no shrink) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--control-h);
  padding: 0 1.25rem; border-radius: var(--pill); border: 1px solid var(--ink-40); background: transparent; color: var(--ink);
  font: 500 .9375rem/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t), border-color var(--t), color var(--t);
}
.btn:hover { border-color: var(--ink); color: var(--ink); background: var(--white); }
.btn.primary { background: var(--endeavour); border-color: var(--endeavour); color: var(--white); }
.btn.primary:hover { background: var(--endeavour-dark); border-color: var(--endeavour-dark); color: var(--white); }
.btn.navy { background: var(--stratos); border-color: var(--stratos); color: var(--white); border-radius: .25em; }
.btn.navy:hover { background: var(--stratos-darker); border-color: var(--stratos-darker); color: var(--white); }
.btn.small { min-height: 1.875rem; padding: 0 .875rem; font-size: .875rem; }
.btn.link { border-color: transparent; padding: 0 .25rem; color: var(--endeavour); background: none; }
.btn.link:hover { color: var(--endeavour-dark); text-decoration: underline; }
.btn[aria-expanded="true"], .btn[aria-pressed="true"] { background: var(--endeavour-lightest); border-color: var(--endeavour); color: var(--endeavour-dark); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn kbd { opacity: .7; }
.btn.primary kbd { border-color: #ffffffb3; }
.chev { width: 16px; height: 16px; flex: none; }
.textlink { display: inline-flex; align-items: center; gap: var(--s1); font-weight: 500; text-decoration: none; }
.textlink:hover { text-decoration: underline; }

/* ---------- tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: .0625rem .625rem; border: 1px solid var(--line);
  border-radius: var(--pill); font-size: .8125rem; line-height: 1.5; white-space: nowrap; color: var(--ink); background: transparent;
}
.tag.nc { background: var(--endeavour); border-color: var(--endeavour); color: var(--white); }
.tag.am { background: var(--stratos); border-color: var(--stratos); color: var(--white); }
.tag.pm { background: var(--yellow-lightest); border-color: var(--yellow); color: var(--yellow-darker); }
.tag.accent { background: var(--endeavour-lightest); border-color: var(--endeavour-lighter); color: var(--endeavour-dark); }
.tag.warn { background: var(--yellow-lightest); border-color: var(--yellow); color: var(--yellow-darker); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green-ring); }
.new-mark { display: inline-flex; align-items: center; gap: 5px; font: 600 .75rem/1 var(--font-body); color: var(--endeavour); text-transform: uppercase; letter-spacing: .03em; }
.new-mark::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--endeavour); }

/* ---------- score: numeral + band word, one hue ---------- */
.score {
  display: inline-grid; justify-items: center; align-content: center; min-width: 3rem; padding: 4px 6px;
  border-radius: var(--radius); border: 1px solid var(--line); color: var(--grey-5); background: var(--white);
}
.score b { font: 700 1rem/1.1 var(--font-head); color: inherit; }
.score i { font: 500 .6875rem/1.2 var(--font-body); font-style: normal; text-transform: uppercase; letter-spacing: .04em; }
.score.hot { background: var(--endeavour); border-color: var(--endeavour); color: var(--white); }
.score.warm { background: var(--endeavour-lightest); border-color: var(--endeavour-lighter); color: var(--endeavour-dark); }
.score.big { min-width: 4.5rem; padding: 8px 10px; }
.score.big b { font-size: 1.75rem; }
.score.big i { font-size: .6875rem; }

/* ---------- forms ---------- */
input[type=text], input[type=search], input[type=url], input[type=email], input[type=number], select, textarea {
  font: 400 1rem/1.4 var(--font-body); color: var(--ink); background: var(--white);
  border: 1px solid var(--control-line); border-radius: var(--radius); min-height: var(--control-h); padding: 0 .75rem; max-width: 100%;
  transition: border-color var(--t);
}
select { padding-right: 2rem; appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right .6rem center; }
textarea { padding: .5rem .75rem; min-height: 5rem; width: 100%; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--grey-5); opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--endeavour); width: 1.05rem; height: 1.05rem; margin: 0; }
input, textarea { caret-color: var(--endeavour); }
.field { display: grid; gap: 6px; font-size: .875rem; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; font-weight: 400; }
.field .help { font-weight: 400; color: var(--muted); font-size: .8125rem; }
.check { display: inline-flex; align-items: center; gap: var(--s2); font-size: .9375rem; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s3) var(--s4); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-weight: 600; margin-bottom: var(--s2); }

/* segmented control: real links or radios, pill group */
.seg { display: inline-flex; border: 1px solid var(--control-line); border-radius: var(--pill); padding: 2px; background: var(--white); flex-wrap: wrap; }
.seg a, .seg label, .seg button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 1.875rem; padding: 0 .875rem; border-radius: var(--pill);
  color: var(--ink); text-decoration: none; font-size: .875rem; font-weight: 500; cursor: pointer; transition: background-color var(--t), color var(--t);
}
.seg button { border: 0; background: none; font: inherit; font-size: .875rem; font-weight: 500; }
.seg a:hover, .seg label:hover, .seg button:hover { background: var(--grey-1); color: var(--ink); }
.seg a[aria-current="true"], .seg input:checked + label, .seg button[aria-pressed="true"] { background: var(--endeavour); color: var(--white); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:focus-visible + label { outline: 2px solid var(--endeavour); outline-offset: 2px; }

/* disclosure */
details.more > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s1); color: var(--endeavour); font-weight: 500; font-size: .9375rem;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .chev { transition: transform .3s var(--ease); }
details.more[open] > summary .chev { transform: rotate(90deg); }
details.more > .body { margin-top: var(--s3); }

/* notices */
.notice { border-radius: var(--radius); padding: var(--s3) var(--s4); background: var(--endeavour-lightest); border: 1px solid var(--endeavour-lighter); font-size: .9375rem; }
.notice.warn { background: var(--yellow-lightest); border-color: var(--yellow); color: var(--yellow-darker); }
.notice.warn a { color: var(--yellow-darker); }
.notices { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.notices:not(:has(*)) { display: none; }
.health-banner { margin: var(--s3) auto 0; max-width: min(1200px, calc(100% - 32px)); }

/* status region (toast) */
.status-region {
  position: fixed; left: 50%; bottom: var(--s5); transform: translateX(-50%); z-index: 40; width: max-content; max-width: min(640px, calc(100vw - 32px));
  background: var(--stratos-darker); color: var(--white); border-radius: var(--radius); padding: var(--s3) var(--s4);
  box-shadow: var(--shadow-float); display: flex; gap: var(--s4); align-items: center; font-size: .9375rem;
}
.status-region.idle { opacity: 0; pointer-events: none; transform: translate(-50%, 8px); }
.status-region { transition: opacity var(--t), transform var(--t); }
.status-actions { display: flex; gap: var(--s2); }
.status-actions:empty { display: none; }
.status-region button { background: none; border: 1px solid var(--paper-20); color: var(--white); border-radius: var(--pill); padding: 6px 14px; font: inherit; font-size: .875rem; cursor: pointer; }
.status-region :focus-visible { outline-color: var(--white); }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; }
.table th { text-align: left; font: 600 .75rem/1.3 var(--font-body); color: var(--muted); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; font-size: .9375rem; }
.table tbody th { text-align: left; font: 500 .9375rem/1.4 var(--font-body); color: var(--ink); padding: var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody th.person { font-weight: 600; padding-left: var(--s5); }
.table tr:last-child td, .table tr:last-child th { border-bottom: 0; }
.table .num { text-align: right; }
.table-scroll { overflow-x: auto; }
.zero { color: var(--grey-5); font-weight: 400; } /* a quiet zero that still reads at 8.9:1 */

/* ---------- leads list ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-bottom: var(--s3); }
.toolbar .search { flex: 1 1 260px; max-width: 420px; position: relative; }
.toolbar .search input { width: 100%; padding-left: 2.25rem; border-radius: var(--pill); }
.toolbar .search svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); pointer-events: none; }
.morefilters { width: 100%; }
.morefilters .body { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); display: grid; gap: var(--s4); }
.morefilters .checks { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: center; padding-top: var(--s3); border-top: 1px solid var(--line); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.field .pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s2); align-items: center; font-weight: 400; color: var(--muted); }
.field.range { grid-column: span 2; }
.pdfmenu { position: relative; }
.pdfmenu summary { list-style: none; display: inline-flex; align-items: center; gap: var(--s2); }
.pdfmenu summary::-webkit-details-marker { display: none; }
.pdfmenu .menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 260px; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow-float); padding: var(--s2); display: grid;
}
.pdfmenu[open] > summary.btn { background: var(--endeavour-lightest); border-color: var(--endeavour); color: var(--endeavour-dark); }
.pdfmenu .menu p { margin: 0; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); margin-bottom: var(--s1); max-width: 30ch; }
.pdfmenu .menu a { display: flex; justify-content: space-between; gap: var(--s4); align-items: center; min-height: 40px; padding: var(--s2) var(--s3); border-radius: var(--radius); color: var(--ink); text-decoration: none; font-size: .9375rem; }
.pdfmenu .menu a .n { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.pdfmenu .menu a.inlist { color: var(--endeavour); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); margin-top: var(--s1); }
.pdfmenu .menu a:hover { background: var(--endeavour-lightest); }
fieldset.seg-field { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
fieldset.seg-field legend { padding: 0; }
.segfield { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; vertical-align: bottom; margin: 0 var(--s3) var(--s2) 0; }
.toolbar .seg label { padding: 0 .625rem; }
.toolbar-break { flex-basis: 100%; height: 0; }
.seglabel { font-size: .75rem; font-weight: 600; color: var(--muted); padding-left: var(--s3); }
.activefilters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s3); }
.activefilters .chip { background: var(--white); }
.activefilters .clearall { font-size: .875rem; margin-left: var(--s1); }
.field.inline { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 500; }
.field.inline select { width: auto; }
.lead-title .new-mark { margin-right: 2px; vertical-align: 1px; }
.resultline { display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; margin: var(--s4) 0 var(--s2); font-size: .875rem; color: var(--muted); }
.resultline strong { font: 700 1rem/1 var(--font-head); color: var(--ink); }
.leads { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.leads th { position: sticky; top: 0; background: var(--white); z-index: 1; }
.leads th:first-child { padding-left: var(--s4); }
.leads td { padding: 10px var(--s3); vertical-align: middle; }
.leads td:first-child { padding-left: var(--s4); width: 4.5rem; }
.leads tbody tr { transition: background-color var(--t); }
.leads tbody tr:hover, .leads tbody tr.cursor { background: var(--endeavour-lightest); }
.leads tbody tr.cursor { outline: 1px solid var(--endeavour); outline-offset: -1px; }
.lead-title { color: var(--ink); text-decoration: none; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lead-title:hover { color: var(--endeavour); text-decoration: underline; }
.lead-sub { font-size: .8125rem; color: var(--muted); margin-top: 2px; }
.lead-sub .co { color: var(--ink); font-weight: 500; }
.owner-cell { font-size: .875rem; }
.owner-cell .none { color: var(--muted); }
.owner-cell .claimed { color: var(--ink); font-weight: 600; }
.flagline { margin-top: 2px; font-size: .8125rem; color: var(--ink); border: 1px solid var(--ink-15); border-radius: var(--radius); padding: 1px 8px; display: inline-block; }
tr.flagged .lead-title { color: var(--grey-5); font-weight: 500; }
.leads .act { width: 6rem; text-align: right; padding-right: var(--s4); }
tr.junked .lead-title { text-decoration: line-through; text-decoration-color: var(--grey-4); }
.pager { display: flex; gap: var(--s3); align-items: center; justify-content: center; margin-top: var(--s4); }
.empty { padding: var(--s6) var(--s5); text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font: 700 1.125rem/1.3 var(--font-head); margin-bottom: var(--s2); }
#results.htmx-request { opacity: .55; transition: opacity var(--t); }

/* ---------- triage deck ---------- */
.deck { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s5); align-items: start; }
.card-lead { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-lead .head { padding: var(--s5) var(--s5) var(--s4); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: start; }
.card-lead h2 { font-size: 1.5rem; line-height: 1.25; letter-spacing: -.015em; }
.card-lead h2 a { color: var(--ink); text-decoration: none; }
.card-lead h2 a:hover { color: var(--endeavour); text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); color: var(--muted); font-size: .9375rem; margin-top: var(--s2); }
.meta .co { color: var(--ink); font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
.decide { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; padding: var(--s3) var(--s5); background: var(--grey-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.decide .btn { min-height: 2.5rem; }
.decide .spacer { min-width: var(--s3); }
.junk-reasons { padding: var(--s3) var(--s5); border-bottom: 1px solid var(--line); background: var(--yellow-lightest); }
.junk-reasons[hidden] { display: none; }
.related { display: grid; gap: var(--s2); margin-top: var(--s3); padding: var(--s2) var(--s3); background: var(--endeavour-lightest); border: 1px solid var(--endeavour-lighter); border-radius: var(--radius); font-size: .875rem; }
.related-list .body { display: grid; gap: 6px; margin-top: var(--s2); }
.related .rel { align-items: baseline; font-size: .875rem; }
.decide .assign select { min-height: 2.5rem; border-radius: var(--pill); }
abbr.mini { text-decoration: none; cursor: help; }
.mini { display: inline-block; font: 600 .6875rem/1.4 var(--font-body); padding: 0 6px; border-radius: var(--pill); border: 1px solid var(--line); margin-right: 4px; }
.mini.nc { background: var(--endeavour); border-color: var(--endeavour); color: var(--white); }
.mini.am { background: var(--stratos); border-color: var(--stratos); color: var(--white); }
.mini.pm { background: var(--yellow-lightest); border-color: var(--yellow); color: var(--yellow-darker); }
.junk-reasons .chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.card-lead .body { padding: var(--s5); display: grid; gap: var(--s5); }
.card-lead .body h3 { margin-bottom: var(--s2); }
.summary { font-size: 1.0625rem; line-height: 1.55; max-width: 72ch; }
.evidence { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.evidence li { display: grid; gap: 2px; }
.evidence .when { font-size: .8125rem; color: var(--muted); }
.evidence .excerpt { font-size: .875rem; color: var(--muted); max-width: 80ch; }

.upnext { position: sticky; top: var(--s4); }
.upnext .panel { padding: 0; }
.upnext header { padding: var(--s4) var(--s4) var(--s3); border-bottom: 1px solid var(--line); }
.meter { height: 6px; border-radius: 3px; background: var(--grey-1); overflow: hidden; margin-top: var(--s2); }
.meter span { display: block; height: 100%; background: var(--endeavour); transform-origin: left; transition: transform .4s var(--ease); }
.upnext ol { list-style: none; margin: 0; padding: 0; }
.upnext li a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s3) var(--s4); text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.upnext li:last-child a { border-bottom: 0; }
.upnext li a:hover { background: var(--endeavour-lightest); }
.upnext .t { font-size: .875rem; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upnext .s { font-size: .75rem; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upnext .score { min-width: 2.75rem; padding: 2px 4px; }
.upnext .score b { font-size: .875rem; }
.upnext .score i { font-size: .6875rem; letter-spacing: .02em; }
.upnext footer { padding: var(--s3) var(--s4); border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted); }
.clear { text-align: center; padding: var(--s7) var(--s5); }
.clear h2 { font-size: 1.5rem; margin-bottom: var(--s2); }
.clear p { color: var(--muted); max-width: 52ch; margin: 0 auto var(--s4); }
.deck-enter { animation: deck-in .2s var(--ease); }
@keyframes deck-in { from { transform: translateY(8px); } to { transform: none; } }

/* points breakdown: why it scored */
.points { display: grid; gap: 6px; max-width: 640px; }
.points .p { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) 3rem; gap: var(--s3); align-items: center; font-size: .875rem; }
.points .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.points .bar { height: 8px; background: var(--grey-1); border-radius: 4px; overflow: hidden; }
.points .bar span { display: block; height: 100%; background: var(--endeavour); border-radius: 4px; }
.points .neg .bar span { background: var(--yellow); }
.points .v { text-align: right; font-weight: 600; }
.points .note .lbl { grid-column: 1 / -1; white-space: normal; color: var(--muted); }
.points .total { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; font-weight: 600; }
.points .total .lbl, .points .total .v { font-weight: 700; }

/* ---------- lead detail ---------- */
.leadhead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s4); align-items: start; margin-bottom: var(--s4); }
.leadhead h1 { font-size: 1.625rem; }
/* decision band: grey between hairlines, one primary action */
.workbar { background: var(--grey-1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: var(--s3) 0; display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); align-items: center; margin-bottom: var(--s5); }
.workbar .who { font-size: .9375rem; color: var(--muted); flex: 1 1 18rem; }
.workbar .who form.inline { display: inline; white-space: nowrap; margin-left: 4px; }
.workbar .who strong { color: var(--ink); font-weight: 600; }
.workbar .actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-left: auto; }
.workbar .assign { flex-basis: 100%; }
form.inline { display: inline; }
.linkish { background: none; border: 0; padding: 0 2px; font: inherit; font-size: .875rem; color: var(--endeavour); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkish:hover { color: var(--endeavour-dark); }
.outcome { margin: calc(-1 * var(--s3)) 0 var(--s5); display: grid; gap: var(--s3); }
.outcome p { margin: 0; }
.lostform { border-top: 1px solid var(--line); padding-top: var(--s3); }
.lostform fieldset { border: 0; margin: 0; padding: 0; }
.junkform { margin: calc(-1 * var(--s3)) 0 var(--s5); }
.junkform .reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s1) var(--s4); }
.flags { border: 1px solid var(--ink-15); border-radius: var(--radius); background: var(--white); padding: var(--s3) var(--s4); margin: calc(-1 * var(--s3)) 0 var(--s5); }
.flags h2 { font-size: 1rem; margin: 0 0 var(--s1); }
.flags ul { margin: 0; padding-left: 18px; }
.inline-h { display: inline-flex; align-items: center; gap: var(--s2); margin: 0; font-size: 1.125rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--endeavour); border-radius: var(--pill); color: var(--endeavour); text-decoration: none; font-size: .875rem; min-height: var(--control-h); }
.chip:hover { background: var(--endeavour-lightest); }
.quickfilters { display: contents; }
.quickfilters > summary { display: none; }
.quickfilters-body { display: contents; }
.barlist a.unclaimed span:first-child { color: var(--muted); }
.barlist a.unclaimed .bar span { background: var(--grey-4); }
.phone-only { display: none; }
.workbar form { display: flex; gap: var(--s2); align-items: center; margin: 0; }
.workbar .sep { width: 1px; align-self: stretch; background: var(--line); }
.kv { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--s2) var(--s3); margin: 0; font-size: .9375rem; }
.kv dt { color: var(--muted); font-size: .875rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.unknown { font-size: .8125rem; color: var(--muted); margin-top: var(--s3); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { padding: var(--s3) 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .when { font-size: .8125rem; color: var(--muted); display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.contact { padding: var(--s3) 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.contact:first-of-type { border-top: 0; padding-top: 0; }
.contact .links { display: flex; gap: var(--s3); flex-wrap: wrap; font-size: .875rem; }
.find-people { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); display: grid; gap: var(--s2); }
.find-people ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); font-size: .875rem; }
.find-people a { display: inline-flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.rail { display: grid; gap: var(--s4); }
.rail .panel { padding: var(--s4); }
.kinds { display: flex; gap: var(--s2); flex-wrap: wrap; }
.notebox { display: grid; gap: var(--s2); }

/* ---------- paste ---------- */
.paste-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s5); align-items: start; }
.modes { margin-bottom: var(--s4); }
.mode-panel { display: none; }
#m-link:checked ~ .panels .p-link, #m-text:checked ~ .panels .p-text, #m-pdf:checked ~ .panels .p-pdf { display: grid; gap: var(--s2); }
.file-pick { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.file-pick input[type=file] { font: inherit; font-size: .875rem; }
.file-pick input[type=file]::file-selector-button { font: 500 .9375rem/1 var(--font-body); border: 1px solid var(--ink-40); background: transparent; border-radius: var(--pill); padding: .55rem 1.25rem; margin-right: var(--s3); cursor: pointer; }
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { padding: var(--s3) 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.recent li:first-child { border-top: 0; padding-top: 0; }
.recent a { font-weight: 500; overflow-wrap: anywhere; }
.waiting { display: flex; gap: var(--s4); align-items: center; }
.savebar { position: sticky; bottom: 0; background: var(--white); border-top: 1px solid var(--line); padding: var(--s3) var(--s4); display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; margin: var(--s4) calc(-1 * var(--s5)) calc(-1 * var(--s5)); border-radius: 0 0 var(--radius) var(--radius); }
.source-text { white-space: pre-wrap; max-height: 420px; overflow: auto; font-size: .875rem; color: var(--grey-5); }
.contact-edit { border-top: 1px solid var(--line); padding-top: var(--s3); margin-top: var(--s3); }
.contact-edit legend { font-size: .875rem; }

/* ---------- overview + admin ---------- */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s5); }
.figure { padding: var(--s4) var(--s5); border-left: 1px solid var(--line); display: grid; gap: 2px; text-decoration: none; color: var(--ink); }
.figure:first-child { border-left: 0; }
.figure b { font: 700 2rem/1.1 var(--font-head); letter-spacing: -.02em; }
.figure span { font-size: .875rem; color: var(--muted); }
a.figure:hover { background: var(--endeavour-lightest); }
a.figure:hover span { color: var(--endeavour-dark); }
a.figure .go { color: var(--endeavour); font-size: .8125rem; font-weight: 500; display: inline-flex; align-items: center; gap: 2px; }
.barlist { display: grid; gap: 8px; }
.barlist a, .barlist div.item { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 3rem; gap: var(--s3); align-items: center; font-size: .9375rem; color: var(--ink); text-decoration: none; }
.barlist a:hover { color: var(--endeavour); }
.barlist .bar { height: 8px; background: var(--grey-1); border-radius: 4px; overflow: hidden; }
.barlist .bar span { display: block; height: 100%; background: var(--endeavour); border-radius: 4px; }
.barlist .n { text-align: right; font-weight: 600; }
.health { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: var(--s5); }
.health > div { padding: var(--s4) var(--s5); border-left: 1px solid var(--line); display: grid; gap: 4px; align-content: start; }
.health > div:first-child { border-left: 0; }
.health .k { font-size: .8125rem; color: var(--muted); }
.health .v { display: flex; align-items: center; gap: var(--s2); font: 700 1.125rem/1.3 var(--font-head); }
.health .d { font-size: .8125rem; color: var(--muted); }
.state { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.state.ok { background: var(--green); box-shadow: 0 0 0 1px var(--green-ring); }
.state.bad { background: var(--yellow); box-shadow: 0 0 0 1px var(--yellow-darker); }
.switch { min-width: 4.25rem; }
.funnel { display: flex; gap: var(--s1); align-items: center; font-size: .875rem; white-space: nowrap; }
.funnel .arrow { color: var(--grey-4); }
.err { color: var(--yellow-darker); background: var(--yellow-lightest); border-radius: 4px; padding: 2px 6px; font-size: .8125rem; display: inline-block; margin-top: 4px; overflow-wrap: anywhere; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; }

/* keyboard help */
.keys { font-size: .8125rem; color: var(--muted); }
.keys summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.keys dl { display: grid; grid-template-columns: auto 1fr; gap: 6px var(--s3); margin: var(--s2) 0 0; }
.keys dd { margin: 0; }

/* dev environment strip */
.envstrip { background: var(--yellow-lightest); color: var(--yellow-darker); border-bottom: 1px solid var(--yellow); font-size: .8125rem; text-align: center; padding: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .deck, .cols, .paste-grid { grid-template-columns: minmax(0, 1fr); }
  .upnext { position: static; }
  .mainnav a { padding: 0 var(--s2); }
  .logo .credit { display: none; }
}
@media (max-width: 860px) {
  .topbar { padding: 0 var(--s4); gap: var(--s3); }
  .mainnav, .topbar .navy-wide { display: none; }
  .logo img { width: 1.75rem; height: 1.75rem; }
  .logo .wordmark { font-size: 1.125rem; }
  main { padding: var(--s4) var(--s4) calc(var(--s7) + 72px); }
  .halves { grid-template-columns: minmax(0, 1fr); }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 8px 4px 10px; min-height: 56px; font-size: .75rem; font-weight: 500; color: var(--ink); text-decoration: none; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--endeavour); box-shadow: inset 0 2px 0 var(--endeavour); }
  .tabbar a { position: relative; }
  .tabbar .count { position: absolute; top: 4px; left: calc(50% + 6px); font-size: .6875rem; min-width: 1.5em; padding: 0 .35em; }
  .status-region { bottom: calc(72px + var(--s4)); }
  html { scroll-padding-bottom: 88px; }
  h1 { font-size: 1.5rem; }
}
@media (max-width: 700px) {
  html:has(main.has-decide), html:has(.savebar) { scroll-padding-bottom: 150px; }
  /* an Undo toast stays up over the decide bar: keep focused lines clear of it */
  html:has(main.has-decide):has(.status-region:not(.idle)) { scroll-padding-bottom: 216px; }
  /* lead list becomes stacked rows: same table, reflowed */
  .leads thead { display: none; }
  .leads, .leads tbody { display: block; }
  .leads tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s2) var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); align-items: center; }
  .leads td { display: block; padding: 0; border: 0; }
  .leads td:first-child { grid-row: span 3; width: auto; padding: 0; align-self: start; }
  .leads td:nth-child(2) { grid-column: 2 / 4; }
  .leads td.opt { display: none; }
  .leads td.team-cell { display: block; grid-column: 2 / 4; }
  .leads td.owner-cell { grid-column: 2; }
  .leads td.act { grid-column: 3; width: auto; padding: 0; }
  .leads .act .btn { min-height: 44px; padding: 0 1.25rem; }
  .toolbar .seg { border-radius: 18px; }
  .toolbar .seg label { white-space: nowrap; }
  .resultline .keys, .resultline .spacer { display: none; }
  .card-lead .head, .card-lead .body { padding: var(--s4); }
  .card-lead .head { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .card-lead .head > :first-child { justify-self: start; } /* the score keeps its own size */
  .card-lead h2 { font-size: 1.25rem; }
  .decide {
    position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); z-index: 25; padding: var(--s2) var(--s3);
    display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); border-bottom: 0; background: var(--white); box-shadow: 0 -1px 0 var(--line);
  }
  .decide .btn { min-height: 48px; padding: 0 var(--s2); font-size: .9375rem; width: 100%; }
  .decide form { display: contents; }
  .decide .spacer, .decide .open-full, .decide kbd, .upnext footer, .decide .assign { display: none; }
  .junk-reasons { padding: var(--s3) var(--s4); }
  .junk-reasons .btn { min-height: 44px; }
  main.has-decide { padding-bottom: calc(var(--s7) + 140px); }
  .has-decide .pagehead .lede { display: none; }
  .has-decide ~ .status-region { bottom: calc(56px + 64px + var(--s3)); }
  .points .p { grid-template-columns: minmax(0, 1fr) 3.5rem 2.5rem; }
  .points .lbl { white-space: normal; }
  .leadhead { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .leadhead .score { justify-self: start; grid-auto-flow: column; gap: 6px; align-items: baseline; }
  .leadhead h1 { font-size: 1.3125rem; line-height: 1.25; }
  .workbar { display: grid; gap: var(--s3); padding: var(--s3) var(--s4); margin-left: calc(-1 * var(--s4)); margin-right: calc(-1 * var(--s4)); }
  .workbar .actions { margin-left: 0; display: flex; flex-wrap: wrap; }
  .workbar .actions form, .workbar .actions .btn { flex: 1 0 auto; }
  .workbar .who form.inline { display: block; margin-left: 0; }
  .workbar .who .linkish { padding-left: 0; }
  .workbar .actions .btn { white-space: nowrap; text-align: center; justify-content: center; min-height: 48px; line-height: 1.2; }
  .workbar .assign select { flex: 1; }
  .workbar .btn, .workbar select, .linkish { min-height: 44px; }
  .figure, .health > div { border-left: 0; border-top: 1px solid var(--line); }
  .figure:first-child, .health > div:first-child { border-top: 0; }
  .barlist a, .barlist div.item { grid-template-columns: minmax(0, 8rem) minmax(0, 1fr) 2.5rem; }
  .kv { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .savebar { position: fixed; left: 0; right: 0; bottom: calc(56px + env(safe-area-inset-bottom)); margin: 0; border-radius: 0; z-index: 25; }
  html:has(.savebar) .status-region { bottom: calc(56px + 76px + var(--s3)); } /* above the Save bar, never on it */
}
@media (max-width: 700px) {
  .quickfilters { display: block; width: 100%; }
  .phone-only { display: inline; }
  .resultline [data-shortcuts-toggle] { display: none; } /* phones: no hardware keyboard to need it */
  .filters:has(details.quickfilters:not([open])) .morefilters { display: none; }
  .quickfilters > summary { display: inline-flex; list-style: none; }
  .quickfilters > summary::-webkit-details-marker { display: none; }
  .quickfilters[open] .quickfilters-body { display: grid; gap: var(--s3); margin-top: var(--s3); }
  .stackable thead { display: none; }
  .stackable, .stackable tbody, .stackable tr, .stackable td, .stackable tbody th { display: block; width: 100%; }
  .stackable tr { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
  .stackable td, .stackable tbody th, .stackable tbody th.person { border: 0; padding: 6px 0 !important; text-align: left; }
  .stackable td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
  .stackable select, .stackable input[type=text] { width: 100% !important; min-height: 44px; }
  .stackable .btn { min-height: 44px; }
  .stackable .right { text-align: left; }
  .stackable td.empty-cell { display: none; }
}
@media (pointer: coarse) {
  .keys { display: none; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 44px; }
  input[type=text], input[type=search], input[type=url], input[type=email], select { min-height: 44px; }
  .seg a, .seg label, .seg button { min-height: 44px; }
  .check { min-height: 44px; }
  details.more > summary { min-height: 44px; }
  .usermenu summary { min-height: 44px; }
  .status-region button { min-height: 44px; }
  .linkish { min-height: 44px; }
}
/* Reduced motion: nothing slides or scales; short fades and colour changes
   stay, so a swap or a toast still visibly confirms the action. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .status-region, .status-region.idle { transform: translateX(-50%) !important; transition: opacity .12s linear !important; }
  details.more > summary .chev, .meter span { transition: none !important; }
  html { scroll-behavior: auto; }
}

/* paste: mode tabs are radios ahead of the segmented labels */
#m-link:checked ~ .modes label[for=m-link], #m-text:checked ~ .modes label[for=m-text], #m-pdf:checked ~ .modes label[for=m-pdf] { background: var(--endeavour); color: var(--white); }
#m-link:focus-visible ~ .modes label[for=m-link], #m-text:focus-visible ~ .modes label[for=m-text], #m-pdf:focus-visible ~ .modes label[for=m-pdf] { outline: 2px solid var(--endeavour); outline-offset: 2px; }
@media (max-width: 700px) {
  .field.range { grid-column: auto; }
  .pdfmenu .menu { right: auto; left: 0; }
  .seglabel { padding-left: var(--s2); }
  .toolbar-break { display: none; }
}
@media (pointer: coarse) {
  .pdfmenu .menu a, .chip, .activefilters .clearall { min-height: 44px; }
  .activefilters .clearall { display: inline-flex; align-items: center; }
}

/* ---------- market pages ---------- */
.subtabs { display: flex; gap: var(--s1); border-bottom: 1px solid var(--line); margin: calc(-1 * var(--s3)) 0 var(--s4); flex-wrap: wrap; }
.subtabs a { padding: var(--s2) var(--s3); color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 40px; display: inline-flex; align-items: center; }
.subtabs a:hover { color: var(--endeavour); }
.subtabs a[aria-current="page"] { color: var(--endeavour); border-bottom-color: var(--endeavour); }
.opener { margin: 0 0 var(--s4); font-size: 1rem; }
.table.shows th[scope="row"] { min-width: 260px; white-space: normal; }
.table.shows th[scope="row"] .small { font-weight: 400; margin-top: 2px; }
.table.shows tr.past th, .table.shows tr.past td { color: var(--muted); }
.table.shows tr.editrow td { padding-top: 0; border-bottom: 1px solid var(--line); }
.table.shows tr:has(+ tr.editrow) th, .table.shows tr:has(+ tr.editrow) td { border-bottom: 0; }
.showform { margin-top: var(--s3); }
.showform .wide { grid-column: span 2; }
@media (max-width: 700px) { .showform .wide { grid-column: auto; } .subtabs a { min-height: 44px; } }
.rulecard { margin-bottom: var(--s4); display: grid; gap: var(--s2); }
.rulehead { display: flex; gap: var(--s4); justify-content: space-between; align-items: flex-start; }
.rulehead h2 { font-size: 1.0625rem; margin: 0 0 2px; }
.rulehead h2 a { color: var(--ink); }
.ruledate { display: grid; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stagetrack { margin: 0; }
.impact p { margin: var(--s1) 0 0; }
.doclist { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
@media (max-width: 700px) { .rulehead { flex-direction: column; } .ruledate { text-align: left; } }
.briefbar { display: flex; gap: var(--s4); align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: var(--s4); }
.briefbar .tag { margin-left: var(--s2); }
.panel.brief { margin-bottom: var(--s4); }
.panel.brief h2 { font-size: 1.0625rem; margin: 0 0 var(--s2); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.kpi { display: grid; gap: 2px; }
.kpi b { font: 700 2rem/1.1 var(--font-head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.strip { width: 100%; height: auto; font-family: var(--font-body); }
.strip text { paint-order: stroke; stroke: var(--panel); stroke-width: 4px; stroke-linejoin: round; }
.itemlist { margin: 0; padding-left: 18px; display: grid; gap: var(--s2); }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Overview: executive figures and weekly chart */
.figures.exec { margin-bottom: var(--s2); }
.figures.exec .figure { gap: 4px; }
.figures.exec .figure b { font-variant-numeric: tabular-nums; }
.figures.exec .name { color: var(--ink); font-weight: 600; }
.figures.exec .delta, .figures.exec .usual { font-size: .8125rem; }
.defs { margin: 0 0 var(--s5); }
.sectionhead { font: 700 1.125rem/1.3 var(--font-head); margin: var(--s6) 0 var(--s3); }
.weekchart { width: 100%; height: auto; display: block; font-family: var(--font-body); }
.weekchart .axis { stroke: var(--line); stroke-width: 1; }
.weekchart .rest { fill: var(--endeavour-lighter); stroke: var(--endeavour); stroke-width: 1; } /* 3:1 edge against white (SC 1.4.11) */
.weekchart .hot { fill: var(--endeavour); }
.weekchart .val { font-size: 12px; font-weight: 600; fill: var(--ink); font-variant-numeric: tabular-nums; }
.weekchart .lbl, .weekchart .none { font-size: 12px; fill: var(--muted); }
.key { display: inline-block; width: 10px; height: 10px; vertical-align: -1px; margin-left: 8px; }
.key.hot { background: var(--endeavour); margin-left: 0; }
.key.rest { background: var(--endeavour-lighter); border: 1px solid var(--endeavour); }
.barlist .bar { position: relative; }
.barlist .bar .tick { position: absolute; top: -2px; width: 2px; height: 12px; background: var(--stratos); margin-left: -1px; }
.table.tophot td { vertical-align: top; }
@media print {
  .topbar, .tabbar, .pagehead .actions, .status-region { display: none !important; }
  .panel { break-inside: avoid; }
}
.ovw > .panel, .ovw > .halves { margin-bottom: var(--s5); }
.ovw > .halves > .panel { height: 100%; }
.panel.brief { margin-bottom: var(--s4); }
.panel.brief .bullets { margin: var(--s2) 0; padding-left: 1.2em; display: grid; gap: var(--s2); }
.panel.brief p + p { margin-top: var(--s2); }
.checkrep, .briefbar + .notice { margin-bottom: var(--s4); }
.subhead { font: 700 1rem/1.3 var(--font-head); margin: var(--s5) 0 var(--s1); }
@media (max-width: 700px) {
  .figures.exec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures.exec .figure { border-left: 0; border-top: 1px solid var(--line); padding: var(--s3) var(--s4); }
  .figures.exec .figure:nth-child(-n+2) { border-top: 0; }
  .figures.exec .figure:nth-child(even) { border-left: 1px solid var(--line); }
  .figures.exec .figure b { font-size: 1.5rem; }
}

/* competitors page */
.panel + .panel { margin-top: var(--s4); }
.halves > .panel + .panel { margin-top: 0; } /* side by side, the pair shares one top edge */
.panel .pad { padding: var(--s5) var(--s5) 0; }
.panel.notice { margin-bottom: var(--s4); display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.newslist { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.newsrow { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.newsrow:first-child { border-top: 0; }
.table.competitors tr.group th { font-weight: 600; padding-top: var(--s4); }
.table.competitors th[scope="row"] { white-space: normal; }
@media (max-width: 640px) {
  .newsrow { grid-template-columns: 1fr; gap: var(--s1); }
}
.panel h3.pad { padding: var(--s4) var(--s5) 0; margin: 0; font-size: 1rem; }
.panel p.pad { padding: var(--s2) var(--s5) 0; margin: 0; }
.panel p.pad:last-child { padding-bottom: var(--s5); }
.table.readthrough { margin-top: var(--s3); }
.table.readthrough .spark { color: var(--endeavour); vertical-align: middle; }
.factgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s3); margin: 0 0 var(--s4); }
.factgrid > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s3) var(--s4); }
.factgrid .k { font-size: .8rem; color: var(--muted); }
.factgrid .v { font-size: 1.25rem; font-weight: 600; }
.chg { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sparkwrap { display: inline-flex; align-items: center; gap: var(--s2); }
.sparkrange { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.jumps { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin: calc(-1 * var(--s2)) 0 var(--s4); }
.panel h3.sub { margin: var(--s4) 0 0; font-size: 1rem; }
details.more > summary .inline-h { display: inline; margin: 0; font-size: 1.15rem; }
.table.readthrough td.num, .table.readthrough th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table.readthrough thead th { white-space: normal; }
@media (max-width: 700px) {
  .table.readthrough .opt, .table.competitors .opt { display: none; }
}
.crumbs { margin: 0 0 var(--s2); color: var(--muted); }
.crumbs a { color: var(--muted); }
.phone-only { display: none; }
.wrapany { overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .table.readthrough .qcol { display: none; }
  .table.readthrough .phone-only { display: block; }
}
.linechart { margin: var(--s2) 0 0; color: var(--endeavour); }
.linechart svg { max-width: 100%; height: auto; display: block; }
.linechart .grid { stroke: var(--line); stroke-width: 1; }
.linechart .axis { font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.seriesgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s4); align-items: start; }
.seriesgrid .panel h3 { margin: 0 0 var(--s1); font-size: 1rem; }
.risklist { margin: var(--s3) 0 0; padding-left: 1.4rem; }
.risklist > li { margin-bottom: var(--s3); }
.risklist > li p { margin: 0 0 var(--s1); }
.risklist ul { margin: 0; padding-left: 1rem; }
.seriesgrid > .panel { margin: 0; }

/* account menu: the Innovative app family */
.usermenu .family { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: var(--s2); padding-top: var(--s2); }
.usermenu .family > span { font: 600 .75rem/1.3 var(--font-body); color: var(--grey-5); padding: var(--s1) var(--s3); }
.usermenu .family a { display: flex; align-items: center; gap: var(--s2); }
.usermenu .family i { width: .875rem; height: .875rem; border-radius: 50%; flex: none; }

/* ---------- sign-in (eReach welcome) ---------- */
body.signin { background: var(--stratos-darker); color: var(--white); min-height: 100vh; }
.signin-main { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: var(--s6) var(--s4) var(--s5); max-width: none; }
.signin-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; max-width: 22.5rem; width: 100%; padding-bottom: 6vh; }
.signin-badge { width: 10rem; height: 10rem; margin-bottom: var(--s5); }
.signin h1 { font: 700 1.75rem/1.2 var(--font-head); letter-spacing: -.02em; margin: 0; color: var(--white); }
.signin .lede { margin: var(--s2) 0 var(--s5); color: var(--navy-muted); font-size: 1rem; }
.signin-btn { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; width: 100%; min-height: 3rem;
  background: var(--white); color: var(--ink); border: 0; border-radius: 999px; font: 600 1rem/1 var(--font-body); text-decoration: none; }
.signin-btn:hover { background: var(--grey-1); }
.signin-hint { margin: var(--s3) 0 0; font-size: .8125rem; color: var(--navy-muted); }
.signin-note { width: 100%; margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border-radius: 8px; background: rgba(255,255,255,.08); font-size: .9375rem; text-align: left; }
.signin-note.is-error { background: var(--yellow-lightest); color: var(--yellow-darker); }
.signin-foot { width: 100%; max-width: 40rem; border-top: 1px solid rgba(255,255,255,.2); padding-top: var(--s4); text-align: center; }
.signin-foot .copy { margin: 0; font-size: .75rem; color: var(--navy-muted); }
body.signin :focus-visible { outline: 2px solid var(--white); outline-offset: 3px; } /* focus is white on navy */
@media (max-width: 860px) { .signin-badge { width: 7.5rem; height: 7.5rem; } }

/* contact numbers and addresses are tapped one-handed between site visits */
@media (pointer: coarse) { .contact .links a { display: inline-flex; align-items: center; min-height: 44px; } }
/* the phone tab bar keeps four destinations; Paste a Lead lives in the account menu there */
.usermenu .menu-paste { display: none; }
@media (max-width: 860px) { .usermenu .menu-paste { display: block; } }
.barlist .item.zero .n { color: var(--grey-5); font-weight: 400; } /* lighter weight marks the zero; grey-5 keeps 8.9:1 */
