/*
 * Shared design system for talent.cortadogroup.com/.ai.
 *
 * Direction: ashbyhq.com's clean, minimal, typography-driven look --
 * generous whitespace, thin borders instead of heavy shadows, sparse
 * copy, one accent color used sparingly -- built on Cortado's existing
 * brand tokens (navy/lime/Montserrat). --cg-* vars are the source of
 * truth; includes/client_branding_css.html overrides them per-org and
 * must stay included AFTER this file.
 */

:root {
  --cg-primary: #051C2C;
  --cg-accent: #97D700;
  /* Readable foregrounds on primary/accent; includes/client_branding_css.html derives these per client (#319). */
  --cg-on-primary: #fff;
  --cg-on-primary-muted: #D5DADD;
  --cg-on-primary-subtle: #9AA6AD;
  --cg-on-accent: #051C2C;
  --cg-accent-hover: #A9E612;
  --cg-on-accent-hover: #051C2C;
  /* Accent as text/dot on the header: derived so it never vanishes against the primary. */
  --cg-header-accent: var(--cg-accent);
  /* Header accent as hover TEXT (4.5:1), stricter than the dot token above. */
  --cg-header-accent-text: var(--cg-accent);
  /* Primary as TEXT on white surfaces: darkened per client until it reads at 4.5:1 (#371). */
  --cg-primary-text: var(--cg-primary);
  --cg-link-hover: #0a3a56;
  /* Non-text focus ring, the muted label on the primary band, workspace stage tints and the pending cohort band (#371). Unbranded defaults reproduce the pre-token look. */
  --cg-focus-ring: var(--cg-primary);
  /* Form control focus outline. Unbranded pages keep the lime accent; branded pages get a derived 3:1 colour (#390). */
  --cg-input-focus: var(--cg-accent);
  --cg-on-primary-meta: rgba(255, 255, 255, 0.78);
  --cg-tint-25: color-mix(in srgb, var(--cg-primary) 25%, #fff);
  --cg-tint-25-label: var(--cg-primary);
  --cg-tint-45: color-mix(in srgb, var(--cg-primary) 45%, #fff);
  --cg-tint-45-label: var(--cg-primary);
  --cg-tint-75: color-mix(in srgb, var(--cg-primary) 75%, #fff);
  --cg-tint-75-label: var(--cg-on-primary);
  --cg-pending-band: color-mix(in srgb, var(--cg-primary) 70%, #fff);
  --cg-on-pending-band: #fff;
  --cg-pending-text: var(--cg-pending-band);
  /* Lime is for navy surfaces. On light surfaces small lime text fails contrast, so use the house dark green. */
  --cg-accent-ink: #4B6C00;
  --cg-light: #F3F3F3;

  --cg-ink: #374151;
  /* Muted text: 4.62:1 on --cg-light, 5.13:1 on white (was #6b7280, 4.36:1 on light grey). */
  --cg-muted: #686e79;
  /* One input border for the whole product: 3.67:1 on white, 3.31:1 on --cg-light (non-text 3:1). */
  --cg-input-border: #80868f;
  --cg-border: #E5E7EB;
  --cg-surface: #ffffff;

  --cg-radius: 6px;
  --cg-radius-lg: 10px;

  --cg-space-1: 0.5rem;
  --cg-space-2: 1rem;
  --cg-space-3: 1.5rem;
  --cg-space-4: 2.5rem;
  --cg-space-5: 4rem;
  --cg-space-6: 6rem;

  --cg-max-width: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito Sans', 'Montserrat', system-ui, -apple-system, sans-serif;
  color: var(--cg-primary-text);
  background: var(--cg-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cg-primary-text); }
a:hover { color: var(--cg-link-hover); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }

.cg-accent { color: var(--cg-accent); }

/* Eyebrow: small-caps section label, used instead of underline-bar headings. */
.cg-eyebrow {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cg-accent-ink);
  font-weight: 700;
  margin: 0 0 var(--cg-space-1);
}
/* Eyebrows placed on navy keep the lime. */
.cg-eyebrow-on-dark, .cg-dark .cg-eyebrow, header.cg-header .cg-eyebrow { color: var(--cg-header-accent-text); }

/* Buttons: solid navy primary, thin-border ghost secondary. Accent color
   is reserved for small highlight moments, not big CTA fills. */
.cg-btn {
  display: inline-block;
  background: var(--cg-primary);
  color: var(--cg-on-primary);
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--cg-primary);
  border-radius: var(--cg-radius);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.cg-btn:hover { background: var(--cg-link-hover); border-color: var(--cg-link-hover); color: var(--cg-on-primary); }

.cg-btn-ghost {
  background: transparent;
  color: var(--cg-primary-text);
  border: 1px solid var(--cg-border);
}
.cg-btn-ghost:hover { background: var(--cg-light); color: var(--cg-primary-text); border-color: var(--cg-border); }

.cg-btn-accent { background: var(--cg-accent); color: var(--cg-on-accent); border-color: var(--cg-accent); }
.cg-btn-accent:hover { background: var(--cg-accent-hover); border-color: var(--cg-accent-hover); color: var(--cg-on-accent-hover); }

/* Layout shell */
header.cg-header {
  background: var(--cg-surface);
  border-bottom: 1px solid var(--cg-border);
  padding: var(--cg-space-1) var(--cg-space-3);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.cg-header a { text-decoration: none; font-weight: 600; }
header.cg-header nav a { font-weight: 500; color: var(--cg-muted); }

main.cg-main { max-width: var(--cg-max-width); margin: 0 auto; padding: var(--cg-space-4) var(--cg-space-3); }

footer.cg-footer {
  max-width: var(--cg-max-width);
  margin: 0 auto;
  padding: 0 var(--cg-space-3) var(--cg-space-3);
  font-size: 0.78rem;
  color: var(--cg-muted);
  border-top: 1px solid var(--cg-border);
  padding-top: var(--cg-space-3);
}
footer.cg-footer a { color: var(--cg-muted); }

/* Cards: thin border instead of box-shadow; shadow reserved for hover. */
.cg-card {
  background: var(--cg-surface);
  border: 1px solid var(--cg-border);
  border-radius: var(--cg-radius-lg);
  padding: var(--cg-space-3);
}
.cg-card-interactive { text-decoration: none; color: inherit; display: block; transition: box-shadow 0.15s, border-color 0.15s; }
.cg-card-interactive:hover { box-shadow: 0 4px 16px rgba(5, 28, 44, 0.08); border-color: var(--cg-primary); color: inherit; }

.cg-section { padding: var(--cg-space-5) 0; }
.cg-section-tight { padding: var(--cg-space-4) 0; }

.cg-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--cg-border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cg-muted);
}

@media (max-width: 720px) {
  main.cg-main { padding: var(--cg-space-3) var(--cg-space-2); }
  .cg-section { padding: var(--cg-space-4) 0; }
}

/* ------------------------------------------------------------------
 * Cortado presentation layer: the house style from the Cortado Group
 * decks and catalogue (navy #051C2C, lime #97D700, Montserrat headings
 * over Nunito Sans body, slate #495459 secondary text). Token-driven, so
 * per-client branding (--cg-primary / --cg-accent) still flows through.
 * ------------------------------------------------------------------ */
:root { --cg-slate: #495459; --cg-line: #CBCDCE; --cg-wash: #F3F3F3; }

h1, h2, h3, h4, .cg-btn, .cg-eyebrow, header.cg-header, table th, summary {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
}

/* Header: navy bar with a lime rule and a lime brand dot. */
header.cg-header {
  background: var(--cg-primary);
  border-bottom: 3px solid var(--cg-accent);
  padding: 0.85rem var(--cg-space-3);
}
header.cg-header a { color: var(--cg-on-primary); font-weight: 700; letter-spacing: 0.01em; }
header.cg-header > a:first-child::before {
  content: ""; display: inline-block; width: 0.55rem; height: 0.55rem;
  border-radius: 50%; background: var(--cg-header-accent); margin-right: 0.15rem;
}
header.cg-header nav a { color: var(--cg-on-primary-muted); font-weight: 600; }
header.cg-header nav a:hover { color: var(--cg-header-accent-text); }
header.cg-header nav span { color: var(--cg-on-primary-subtle) !important; }
header.cg-header nav button { color: var(--cg-on-primary-muted) !important; text-decoration: none !important; font-weight: 600; font-family: inherit; }
header.cg-header nav button:hover { color: var(--cg-header-accent-text) !important; }
header.cg-header .cg-btn-ghost { color: var(--cg-on-primary); }
header.cg-header .cg-btn-ghost:hover { background: var(--cg-accent); border-color: var(--cg-accent); color: var(--cg-on-accent); }

/* Primary buttons: lime on navy text, as on the public hero. */
.cg-btn { background: var(--cg-accent); border-color: var(--cg-accent); color: var(--cg-on-accent); font-weight: 700; }
.cg-btn:hover { background: var(--cg-accent-hover); border-color: var(--cg-accent-hover); color: var(--cg-on-accent-hover); }
main.cg-main .cg-btn.secondary, main.cg-main .cg-btn-ghost { background: transparent; color: var(--cg-primary-text); border: 1.5px solid var(--cg-primary-text); }
main.cg-main .cg-btn.secondary:hover, main.cg-main .cg-btn-ghost:hover { background: var(--cg-primary); color: var(--cg-on-primary); border-color: var(--cg-primary); }

/* Panels: white cards with a navy top edge and a soft shadow. */
main.cg-main .su-panel, main.cg-main .rf-panel, main.cg-main .cg-panel {
  background: var(--cg-surface);
  border: 1px solid #D9DDE0;
  border-top: 4px solid var(--cg-primary);
  border-radius: var(--cg-radius-lg);
  box-shadow: 0 2px 14px rgba(5, 28, 44, 0.07);
}
main.cg-main .su-panel h1, main.cg-main .rf-panel h1, main.cg-main .cg-panel h1 { font-size: 1.85rem; letter-spacing: -0.015em; color: var(--cg-primary-text); }
main.cg-main .su-panel h2, main.cg-main .rf-panel h2, main.cg-main .cg-panel h2 { font-size: 1.2rem; color: var(--cg-primary-text); margin-bottom: 0.75rem; }
main.cg-main .su-panel h2::after, main.cg-main .rf-panel h2::after, main.cg-main .cg-panel h2::after {
  content: ""; display: block; width: 34px; height: 3px; margin-top: 0.4rem; background: var(--cg-accent);
}
main.cg-main .su-panel h3, main.cg-main .rf-panel h3, main.cg-main .cg-panel h3 { color: var(--cg-primary-text); font-size: 1rem; }
main.cg-main .su-sub, main.cg-main .su-panel p, main.cg-main .rf-panel p, main.cg-main .cg-panel p { color: var(--cg-slate); }
main.cg-main .su-sub { font-size: 0.92rem; }

/* Tables: navy header row, zebra body. */
main.cg-main .su-table thead th, main.cg-main table thead th, main.cg-main table tr:first-child:not(:has(> td)) > th {
  background: var(--cg-primary); color: var(--cg-on-primary); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700; padding: 0.6rem 0.7rem; border-bottom: 0;
}
main.cg-main table thead th:first-child, main.cg-main table tr:first-child:not(:has(> td)) > th:first-child { border-top-left-radius: var(--cg-radius); }
main.cg-main table thead th:last-child, main.cg-main table tr:first-child:not(:has(> td)) > th:last-child { border-top-right-radius: var(--cg-radius); }
main.cg-main .su-table tbody tr:nth-child(even) td, main.cg-main table tbody tr:nth-child(even) td { background: #F7F8F9; }
main.cg-main .su-table td, main.cg-main .rf-panel table td { border-bottom: 1px solid #E4E7E9; padding: 0.6rem 0.7rem; }

/* Fields: stronger labels, clearer inputs, lime focus ring. */
main.cg-main .su-field label, main.cg-main .rf-field label { color: var(--cg-primary-text); font-weight: 700; font-size: 0.88rem; }
main.cg-main .su-field input[type=text], main.cg-main .su-field select, main.cg-main .su-field textarea,
main.cg-main .rf-field input, main.cg-main .rf-field select, main.cg-main .rf-field textarea { border: 1px solid var(--cg-input-border); background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--cg-input-focus); outline-offset: 1px; border-color: var(--cg-primary); }

footer.cg-footer { color: var(--cg-slate); }

/* Header buttons sit on navy: lime fill with navy text (white on lime fails contrast). */
header.cg-header a.cg-btn { background: var(--cg-accent); border-color: var(--cg-header-accent); color: var(--cg-on-accent); }
header.cg-header a.cg-btn:hover, header.cg-header a.cg-btn:focus-visible { background: var(--cg-accent-hover); border-color: var(--cg-accent-hover); color: var(--cg-on-accent-hover); }

/* Phones: the header wraps instead of spilling past the viewport; wide tables scroll inside their card. */
@media (max-width: 720px) {
  header.cg-header { flex-wrap: wrap; gap: 0.5rem 0.75rem; padding: 0.7rem 1rem; }
  header.cg-header nav { flex-wrap: wrap; gap: 0.35rem 1rem !important; width: 100%; }
  header.cg-header nav span { display: none; }
  main.cg-main table:not(.su-table) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Phones: stacked-record tables, full-width action buttons. */
.cg-stack { width: 100%; border-collapse: collapse; }
.dash-actions .cg-btn { text-align: center; }
.wt-tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--cg-border); margin: 0 0 1.25rem; padding: 0; }
.wt-tabs a { display: inline-block; padding: .6rem 1rem; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--cg-primary-text); text-decoration: none; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: .95rem; }
.wt-tabs a:hover, .wt-tabs a:focus-visible { background: var(--cg-light); }
.wt-tabs a[aria-current] { border-bottom-color: var(--cg-accent); font-weight: 700; }
@media (max-width: 720px) {
  main.cg-main table.cg-stack { display: table; overflow: visible; }
  main.cg-main table.cg-stack thead, main.cg-main table.cg-stack tr:first-child:not(:has(> td)) { display: none; }
  main.cg-main table.cg-stack tr { display: block; border-bottom: 1px solid var(--cg-border); padding: 0.5rem 0; }
  main.cg-main table.cg-stack td { display: block; border: 0; padding: 0.15rem 0; background: transparent !important; overflow-wrap: anywhere; }
  main.cg-main table.cg-stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--cg-muted); }
  .dash-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .dash-actions .cg-btn { width: 100%; }
}

/* ------------------------------------------------------------------
 * Wave 1 shared quick wins (Refs #340).
 * ------------------------------------------------------------------ */

/* Control baseline. Every selector sits inside :where() so it has ZERO
 * specificity: it only replaces browser defaults and loses to any
 * component class (cg-btn, sq-*, as-option, login-card, ...). */
:where(main.cg-main) :where(select, textarea,
  input:not([type=checkbox], [type=radio], [type=hidden], [type=submit], [type=button], [type=reset], [type=range], [type=color], [type=image], [type=file])) {
  font: inherit;
  color: var(--cg-primary-text);
  background-color: #fff;
  border: 1px solid var(--cg-input-border);
  border-radius: var(--cg-radius);
  padding: 0.5rem 0.7rem;
  max-width: 100%;
}
:where(main.cg-main) :where(select,
  input:not([type=checkbox], [type=radio], [type=hidden], [type=submit], [type=button], [type=reset], [type=range], [type=color], [type=image], [type=file])) {
  min-height: 2.5rem;
}
:where(main.cg-main) :where(select) { padding-right: 1.9rem; }
:where(main.cg-main) :where(input[type=file]) { font: inherit; max-width: 100%; color: var(--cg-slate); }
:where(main.cg-main) input[type=file]::file-selector-button {
  font: 700 0.9rem 'Montserrat', system-ui, sans-serif;
  background: var(--cg-accent); color: var(--cg-on-accent);
  border: 1px solid var(--cg-accent); border-radius: var(--cg-radius);
  padding: 0.5rem 1rem; margin-right: 0.75rem; min-height: 2.25rem; cursor: pointer;
}
:where(main.cg-main) input[type=file]::file-selector-button:hover { background: var(--cg-accent-hover); border-color: var(--cg-accent-hover); color: var(--cg-on-accent-hover); }
:where(main.cg-main) :where(input[type=checkbox], input[type=radio]) {
  accent-color: var(--cg-accent);
  width: 1.125rem; height: 1.125rem; min-width: 1.125rem; flex: none; margin: 0;
  vertical-align: middle;
}
/* Range sliders get the brand accent too, without the checkbox sizing above. */
:where(main.cg-main) :where(input[type=range]) { accent-color: var(--cg-accent); }
/* Give the label around a checkbox/radio a 32px hit area. */
:where(main.cg-main) :where(label:has(> input[type=checkbox], > input[type=radio])) {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2rem;
}
/* Unclassed buttons are primary actions. */
:where(main.cg-main) :where(button:not([class]), input[type=submit]:not([class])) {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-weight: 700; font-size: 0.9rem;
  background: var(--cg-accent); color: var(--cg-on-accent);
  border: 1px solid var(--cg-accent); border-radius: var(--cg-radius);
  padding: 0.5rem 1.1rem; min-height: 2.5rem; cursor: pointer;
}
:where(main.cg-main button:not([class]):hover, main.cg-main input[type=submit]:not([class]):hover) { background: var(--cg-accent-hover); border-color: var(--cg-accent-hover); color: var(--cg-on-accent-hover); }
:where(main.cg-main button:not([class]):disabled) { opacity: 0.55; cursor: not-allowed; }

/* Secondary button: ONE class, `cg-btn secondary` (outlined navy). It works anywhere,
 * not only inside main.cg-main. The `cg-btn-secondary` and `cg-btn--secondary` spellings
 * are kept here only as inert aliases so a stray old class still renders outlined (no
 * template uses them; the design lint blocks cg-btn-secondary). Issue #340 tranche 2. */
.cg-btn.secondary, .cg-btn.cg-btn-secondary, .cg-btn.cg-btn--secondary {
  background: transparent; color: var(--cg-primary-text); border: 1.5px solid var(--cg-primary-text);
}
.cg-btn.secondary:hover, .cg-btn.cg-btn-secondary:hover, .cg-btn.cg-btn--secondary:hover {
  background: var(--cg-primary); color: var(--cg-on-primary); border-color: var(--cg-primary);
}
.cg-btn-danger { background: transparent; color: #b91c1c; border-color: #b91c1c; }
.cg-btn.cg-btn-danger:hover { background: #b91c1c; color: #fff; border-color: #b91c1c; }

/* Tap targets and text floors (13px minimum for meta, 12px for uppercase micro-labels). */
:where(main.cg-main) :where(fieldset) { border: 1px solid var(--cg-line); border-radius: var(--cg-radius); }
header.cg-header nav a, header.cg-header nav button { padding-top: 0.35rem; padding-bottom: 0.35rem; }
:where(main.cg-main) :where(summary) { padding: 0.3rem 0; cursor: pointer; }
footer.cg-footer { font-size: 0.875rem; }
footer.cg-footer a { display: inline-block; padding: 0.4rem 0.25rem; }
/* Border-left separators between footer links, so a wrapped line never starts or ends with an orphan dot. */
footer.cg-footer a + a { border-left: 1px solid var(--cg-line); margin-left: 0.5rem; padding-left: 0.75rem; }
header.cg-header > a:first-child { padding: 0.3rem 0; min-height: 2rem; }
:where(main.cg-main) :where(small) { font-size: 0.8125rem; }
main.cg-main .su-table thead th, main.cg-main table thead th { font-size: 0.75rem; }
.cg-badge { font-size: 0.8125rem; }

@media (max-width: 720px) {
  /* A lone Log in button stays on the brand row instead of wrapping beneath it. */
  header.cg-header { padding: 0.5rem 1rem; }
  header.cg-header > a:first-child { font-size: 0.9rem; min-width: 0; }
  header.cg-header nav { row-gap: 0 !important; }
  header.cg-header nav:has(> a.cg-btn:only-child) { width: auto; margin-left: auto; }
  header.cg-header nav a.cg-btn { padding: 0.4rem 1rem !important; }
}

/* Fit-to-target tokens and the shared status and table components (#28, SPEC sections 3 and 4).
   Status meaning is carried by the visible words; colour only reinforces it. */
:root {
  --cg-slate: #495459;
  --cg-line: #CBCDCE;
  --cg-within: #365B20; --cg-within-bg: #EDF3E5;
  --cg-near: #795100; --cg-near-bg: #FFF3D6;
  --cg-outside: #A12B2B; --cg-outside-bg: #FBEDED;
  --cg-insufficient: #495459;
  --cg-pending: #344F62;
  /* Fit words Strong / Good / Possible / Weak (owner decision, #1181). One place
     for the colours so the app-wide change (#1198) can reuse them. Possible and
     Weak are proposed; Insufficient evidence and Pending stay neutral grey.
     Every band also carries a pattern and a count, never colour alone. */
  --cg-fit-strong: #1F5A1A; --cg-fit-strong-bg: #D7EBD2;
  --cg-fit-good: #5E9B2E; --cg-fit-good-bg: #EAF4DE;
  --cg-fit-possible: #795100; --cg-fit-possible-bg: #FFF3D6;
  --cg-fit-weak: #A12B2B; --cg-fit-weak-bg: #FBEDED;
  --cg-fit-neutral: #495459; --cg-fit-neutral-bg: #F3F3F3;
}
.cg-status { font-weight: 700; }
.cg-status--within { color: var(--cg-within); }
.cg-status--near { color: var(--cg-near); }
.cg-status--outside { color: var(--cg-outside); }
.cg-status--insufficient, .cg-status--zero, .cg-status--no_target { color: var(--cg-insufficient); }
.cg-status--pending { color: var(--cg-pending); }
a.cg-status { display: inline-flex; align-items: center; min-height: 32px; }
a.cg-status.is-active { border-left: 3px solid var(--cg-primary); padding-left: 8px; }
.cg-table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.cg-table caption { text-align: left; color: var(--cg-slate); margin-bottom: 12px; }
.cg-table thead th { background: var(--cg-primary); color: var(--cg-on-primary); padding: 12px 14px; font-weight: 700; vertical-align: top; }
.cg-table th[scope="row"], .cg-table td { padding: 16px 14px; border-bottom: 1px solid var(--cg-line); vertical-align: top; overflow-wrap: anywhere; font-weight: 400; }
.cg-table th[scope="row"] a { font-weight: 700; display: inline-flex; align-items: center; min-height: 32px; }
@media (max-width: 720px) {
  .cg-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cg-table, .cg-table tbody, .cg-table tr, .cg-table th, .cg-table td { display: block; width: 100%; }
  .cg-table caption { display: block; }
  .cg-table tr { border-top: 3px solid var(--cg-primary); margin: 0 0 24px; padding-top: 10px; }
  .cg-table th[scope="row"], .cg-table td { border: 0; padding: 5px 0; }
  .cg-table td::before { content: attr(data-label); display: block; font-weight: 700; color: var(--cg-slate); }
}

/* Accessibility baseline (#553). Skip link is hidden until it takes keyboard focus. */
.cg-skip-link {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 100;
  background: var(--cg-accent); color: var(--cg-on-accent);
  padding: 0.6rem 1rem; border-radius: var(--cg-radius); font-weight: 700; text-decoration: none;
}
.cg-skip-link:focus { top: 0.5rem; outline: 3px solid var(--cg-on-accent); outline-offset: 2px; }
main.cg-main:focus { outline: none; }
/* Visible keyboard focus on links, buttons and summaries (2.4.7, 1.4.11): 3px ring in the primary on light surfaces, accent on navy bands (no white halo). */
a:focus-visible, button:focus-visible, summary:focus-visible, [role=tab]:focus-visible {
  outline: 3px solid var(--cg-focus-ring); outline-offset: 2px;
}
/* The question heading takes focus on load so screen readers land on it. It is not interactive, so no ring is drawn around it. */
.as-question-heading:focus, .as-question-heading:focus-visible { outline: none; }
[role=alert][tabindex="-1"]:focus { outline: none; box-shadow: 0 0 0 2px var(--cg-focus-ring); }
/* Navy bands: the navy ring would vanish, so use the header accent (derived per client to read on the primary). */
:is(.as-hero, .done-hero, .demo-hero, .home-hero, .cg-hero, .cta-card, .cg-on-dark) :is(a, button, summary, [role=tab]):focus-visible {
  outline-color: var(--cg-header-accent);
}
header.cg-header a:focus-visible, header.cg-header button:focus-visible {
  outline-color: var(--cg-header-accent); box-shadow: none;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
@media print { .cg-skip-link { display: none !important; } }

/* ------------------------------------------------------------------
 * Tranche 2 shared pieces (Refs #340).
 * ------------------------------------------------------------------ */

/* Panel spacing for the shared white panel with the navy top edge (colours and edge come from the panel rule above). */
main.cg-main .cg-panel { padding: 2rem; margin: 0 0 1.25rem; }
/* Narrow centred column for short single-purpose pages (invalid link, registration complete, not ready). */
.cg-narrow { max-width: 36rem; margin: 2rem auto 3rem; }
main.cg-main .cg-panel p { line-height: 1.6; margin: 0 0 1rem; }
.cg-panel-actions { margin-top: 1.5rem; }
/* Wide variant of the page shell for dense staff tables. */
main.cg-main.cg-main--wide { max-width: 1280px; }

/* Control states the baseline did not cover: placeholder contrast, disabled fields, textarea sizing. */
:where(main.cg-main) :where(input, textarea)::placeholder { color: var(--cg-muted); opacity: 1; }
:where(main.cg-main) :where(select, textarea,
  input:not([type=checkbox], [type=radio], [type=hidden], [type=submit], [type=button], [type=reset], [type=range], [type=color], [type=image], [type=file])):disabled {
  background-color: var(--cg-light); color: var(--cg-muted); cursor: not-allowed;
}
:where(main.cg-main) :where(textarea) { line-height: 1.45; resize: vertical; }

/* Legacy intern pages (they do not extend base.html). Zero-specificity utility fallbacks so their scripts' show/hide toggles
 * work even when the page's own Tailwind build is not loaded; a real Tailwind build loaded later still wins any tie. */
:where(.cg-legacy) .hidden { display: none; }
:where(.cg-legacy) .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------
 * Tranche 3 shared components (Refs #340): hero band, chips, fields,
 * messages, details, prose, plus the pages that used to carry their own
 * <style> blocks (home, opportunities, assessment, sign-in pages).
 * Page-specific rules sit in labelled sections at the end of this block.
 * ------------------------------------------------------------------ */
:root { --cg-font-head: 'Montserrat', system-ui, -apple-system, sans-serif; }

/* Page shell: the footer sticks to the bottom of short pages and follows the wide width. The header stays sticky. */
body:not(.cg-legacy) { min-height: 100vh; display: flex; flex-direction: column; }
body:not(.cg-legacy) > main.cg-main { flex: 1 0 auto; width: 100%; }
body:not(.cg-legacy) > footer.cg-footer { flex: none; width: 100%; }
body:has(main.cg-main--wide) footer.cg-footer { max-width: 1280px; }

/* Navy hero band. Modifiers: --lg (bigger headline), --split (copy plus figure), --bleed (cancels the page padding). */
.cg-hero { background: var(--cg-primary); color: var(--cg-on-primary); border-radius: 0; padding: 3.5rem 3rem; }
.cg-hero h1 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); line-height: 1.12; margin: 0 0 1.1rem; color: var(--cg-on-primary); letter-spacing: -0.01em; }
.cg-hero .lede { font-size: 1.05rem; line-height: 1.65; color: var(--cg-on-primary-meta); margin: 0 0 1.25rem; max-width: 40rem; }
.cg-hero .cg-eyebrow { color: var(--cg-header-accent-text); margin-bottom: 1.1rem; }
.cg-hero h1 em { font-style: normal; color: var(--cg-header-accent); }
.cg-hero--lg h1 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.08; }
.cg-hero--split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; }
.cg-hero--bleed { margin: -2.5rem -1.5rem 3rem; padding: 5rem 2rem 4rem; }
.cg-hero--bleed .cg-hero-inner { max-width: 900px; margin: 0 auto; }
.cg-hero-action { margin: 1.75rem 0 0; }
.cg-hero-tagline { font-style: italic; color: var(--cg-on-primary-subtle); border-left: 3px solid var(--cg-header-accent); padding-left: 1rem; margin: 0; }
@media (max-width: 860px) {
  .cg-hero--split { grid-template-columns: 1fr; padding: 2.25rem 1.5rem; }
}
@media (max-width: 720px) {
  .cg-hero--bleed { margin: -1.5rem -1rem 2rem; padding: 3rem 1.25rem 2.5rem; }
}
@media (max-width: 640px) { .cg-hero:not(.cg-hero--bleed) { padding: 2.25rem 1.5rem; } }

/* Chips, breadcrumb and native disclosures. */
.cg-chip {
  display: inline-block; padding: 0.15rem 0.7rem; border-radius: 999px;
  background: color-mix(in srgb, var(--cg-accent) 20%, #fff); color: var(--cg-primary-text);
  font-size: 0.8125rem; font-weight: 600; line-height: 1.5;
}
.cg-chip--muted { background: var(--cg-light); color: var(--cg-slate); font-weight: 500; }
.cg-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cg-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1rem; font-size: 0.875rem; color: var(--cg-slate); }
.cg-crumb a { display: inline-flex; align-items: center; min-height: 2rem; color: var(--cg-slate); text-decoration: none; }
.cg-crumb a:hover { color: var(--cg-primary-text); text-decoration: underline; }
.cg-details { border-top: 1px solid var(--cg-line); padding: 0.5rem 0; }
.cg-details summary { font-weight: 700; color: var(--cg-primary-text); }
main.cg-main .cg-details p { margin: 0.25rem 0 0.75rem; }

/* Panel variants. */
main.cg-main .cg-panel--lead h2 { font-size: 1.5rem; }
main.cg-main .cg-panel--dark { background: var(--cg-primary); border-color: var(--cg-primary); border-top-color: var(--cg-accent); }
main.cg-main .cg-panel--dark h2, main.cg-main .cg-panel--dark h3 { color: var(--cg-on-primary); }
main.cg-main .cg-panel--dark p { color: var(--cg-on-primary-muted); }
main.cg-main .cg-panel--quiet { background: #F9FAFB; box-shadow: none; }
.cg-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.cg-grid-2 > .cg-panel { margin: 0; }
@media (max-width: 720px) { .cg-grid-2 { grid-template-columns: 1fr; } }
.cg-prose { color: var(--cg-ink); line-height: 1.7; font-size: 1.02rem; }
main.cg-main .cg-block .cg-prose p, main.cg-main .cg-panel .cg-prose p{ color: var(--cg-ink); margin: 0.75rem 0; }
main.cg-main .cg-block .cg-prose p:first-child, main.cg-main .cg-panel .cg-prose p:first-child{ margin-top: 0; }
main.cg-main .cg-block .cg-prose p:last-child, main.cg-main .cg-panel .cg-prose p:last-child{ margin-bottom: 0; }
.cg-prose ul { margin: 0.75rem 0; padding-left: 1.5rem; }
.cg-prose li { margin: 0.6rem 0; }
.cg-prose strong { color: var(--cg-primary-text); }
main.cg-main .cg-panel--dark .cg-prose, main.cg-main .cg-panel--dark .cg-prose p { color: var(--cg-on-primary-muted); }

/* Buttons: large and full-width variants. */
.cg-btn--lg { font-size: 1rem; padding: 0.85rem 1.75rem; min-height: 2.75rem; transition: background 0.15s, transform 0.1s; }
.cg-btn--lg:hover { transform: translateY(-1px); }
.cg-btn--block { display: block; width: 100%; text-align: center; }

/* Fields and messages shared by the sign-in pages and forms. */
.cg-field { margin: 0 0 1rem; min-width: 0; }
.cg-field > label { display: block; font-weight: 700; font-size: 0.875rem; color: var(--cg-primary-text); margin: 0 0 0.3rem; }
.cg-field :is(input, select, textarea) { width: 100%; font-size: 1rem; }
.cg-field-error { color: var(--cg-outside); font-size: 0.875rem; margin: 0.3rem 0 0; }
.cg-msg { padding: 0.75rem 1rem; border-left: 4px solid var(--cg-primary); background: var(--cg-light); margin: 0 0 1rem; font-size: 0.875rem; border-radius: var(--cg-radius); }
.cg-msg--error { border-left-color: var(--cg-outside); background: var(--cg-outside-bg); color: var(--cg-outside); }
.cg-msg--success { border-left-color: var(--cg-within); background: var(--cg-within-bg); color: var(--cg-within); }
.cg-narrow--form { max-width: 26rem; margin-top: 3rem; }
/* The shared panel rule (main.cg-main .cg-panel) zeroes margins; this keeps the form card centred. */
main.cg-main .cg-panel.cg-narrow--form { margin: 3rem auto 3rem; }
.cg-narrow--form h1 { margin-bottom: 0.5rem; }
.cg-narrow--form form .cg-btn { margin-top: 0.5rem; }
main.cg-main .cg-auth-links { margin: 1rem 0 0; font-size: 0.875rem; text-align: center; }
main.cg-main .cg-auth-links a { display: inline-block; padding: 0.4rem 0.25rem; }
main.cg-main .cg-auth-links span { margin: 0 0.5rem; color: var(--cg-muted); }
/* Password field with a Show/Hide toggle. The input rule is not type-specific because the toggle flips type=password to text. */
.password-wrapper { position: relative; display: flex; align-items: center; }
.password-wrapper input { width: 100%; padding-right: 4.5rem; }
.password-toggle {
  position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%);
  width: auto; min-width: 3.5rem; text-align: center; margin: 0; background: none; border: none; border-radius: var(--cg-radius);
  cursor: pointer; color: var(--cg-slate); padding: 0.35rem 0.6rem; min-height: 2rem;
  font-family: inherit; font-size: 0.8125rem; font-weight: 700; line-height: 1;
}
.password-toggle:hover { color: var(--cg-primary-text); background: var(--cg-light); }

/* Candidates arrive through a personal link: the header Log in is a quiet text link on these pages. */
.as-candidate .cg-header .cg-btn-ghost {
  background: none !important; border: 0 !important; box-shadow: none !important;
  padding: 0.25rem 0.1rem !important; font-size: 0.875rem; font-weight: 400;
  color: var(--cg-on-primary-meta); text-decoration: underline;
}
.as-candidate .cg-header .cg-btn-ghost:hover { color: var(--cg-on-primary); }
.as-candidate header.cg-header a.cg-btn.cg-btn-ghost:focus-visible {
  background: none !important; color: var(--cg-on-primary) !important;
  outline: 2px solid var(--cg-header-accent); outline-offset: 2px; border-radius: 2px;
}

/* --- Home --- */
.home-hero { margin: var(--cg-space-4) 0 var(--cg-space-5); }
.home-hero h1 .key { text-decoration: underline; text-decoration-color: var(--cg-header-accent); text-decoration-thickness: 4px; text-underline-offset: 0.12em; }
.home-hero .lede { max-width: 30rem; margin-bottom: 1.75rem; }
.home-hero .actions { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.home-hero .actions form { margin: 0; }
.home-hero .fineprint { margin-top: 1rem; font-size: 0.875rem; color: var(--cg-on-primary-meta); }
.home-hero .home-text-link { color: var(--cg-on-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 0.4rem 0; }
.home-hero .home-text-link:hover { color: var(--cg-header-accent-text); }
.home-radar { margin: 0; }
.home-radar-label { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cg-on-primary-meta); font-weight: 700; margin: 0 0 0.5rem; }
.home-radar svg { display: block; width: 100%; height: auto; max-width: 460px; margin: 0 auto; }
.home-radar svg text { font-family: inherit; font-size: 12px; fill: rgba(255,255,255,0.85); font-weight: 600; }
.home-radar svg text .val { fill: var(--cg-accent); font-weight: 700; }
.home-problem { max-width: 760px; margin: 0 auto; padding: var(--cg-space-5) var(--cg-space-3); }
.home-problem-text { font-size: 1.6rem; line-height: 1.4; color: var(--cg-primary-text); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.home-problem-name { display: block; margin: 0.75rem 0 1.5rem; font-size: 0.875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cg-muted); }
.home-problem-followup { font-size: 1.05rem; line-height: 1.65; color: var(--cg-ink); font-weight: 400; max-width: 640px; margin: 0; }
.home-how { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--cg-space-5); align-items: start; padding: var(--cg-space-5) 0; }
.home-how-lead { position: sticky; top: 5rem; }
.home-how-lead h2 { font-size: 1.6rem; margin: 0 0 var(--cg-space-3); color: var(--cg-primary-text); }
.home-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.home-steps li { counter-increment: step; display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 1rem; padding: 0 0 var(--cg-space-4); }
.home-steps li::before { content: counter(step); font-family: var(--cg-font-head); font-weight: 800; font-size: 2.75rem; line-height: 1; color: var(--cg-primary-text); grid-row: 1 / span 2; }
.home-steps h3 { font-size: 1.1rem; margin: 0 0 0.4rem; }
.home-steps p { color: var(--cg-muted); font-size: 0.95rem; margin: 0; line-height: 1.6; }
.home-facts { font-family: var(--cg-font-head); font-weight: 600; font-size: 1.4rem; line-height: 1.4; color: var(--cg-primary-text); margin: 0; }
.home-facts strong { font-weight: 800; }
.home-split { display: grid; grid-template-columns: 1fr; gap: var(--cg-space-3); margin: var(--cg-space-4) 0; }
.home-card { padding: var(--cg-space-4) var(--cg-space-3); display: flex; flex-direction: column; }
.home-card-line { font-family: var(--cg-font-head); font-weight: 700; font-size: 1.1rem; margin: 0 0 0.75rem; }
.home-claims { margin: 0.5rem 0 1rem; padding-left: 1.25rem; color: var(--cg-ink); }
.home-card .home-problem-followup { margin: 0 0 1.25rem; font-size: 0.95rem; }
.home-card .home-problem-text { font-size: 1.15rem; line-height: 1.4; margin: 0; }
.home-card .home-problem-name { margin: 0.4rem 0 0.75rem; }
.home-card-actions { margin-top: auto; padding-top: 0.5rem; }
.home-card-actions form { margin: 0; }
.home-card-actions .cg-btn-ghost { display: inline-block; }
.home-card-fine { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--cg-muted); }
@media (min-width: 861px) {
  .home-split { grid-template-columns: 1fr 1fr; gap: var(--cg-space-4); }
}
@media (max-width: 860px) {
  .home-hero .lede { max-width: none; }
  .home-how { grid-template-columns: 1fr; gap: var(--cg-space-3); }
  .home-how-lead { position: static; }
  .home-radar svg text { font-size: 18px; }
  .home-radar svg .band { display: none; }
}

/* --- Opportunities --- */
.cg-roles-section { scroll-margin-top: 5rem; margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--cg-border); }
.cg-roles-section h2 { color: var(--cg-primary-text); font-size: 2rem; margin: 0 0 0.5rem; }
.cg-roles-subhead { color: var(--cg-muted); margin: 0 0 2rem; font-size: 1.05rem; }
.cg-roles-subhead strong { color: var(--cg-primary-text); }
.cg-role-list { display: grid; gap: 1rem; }
.cg-role-list .cg-empty { color: var(--cg-muted); font-style: italic; }
/* Accent card: white, 1px border, 4px lime left bar (the brand signature on public role cards), slides on hover. */
main.cg-main .cg-card--accent { display: block; background: var(--cg-surface); border: 1px solid var(--cg-border); border-left: 4px solid var(--cg-accent); border-radius: 8px; box-shadow: 0 1px 3px rgba(5, 28, 44, 0.06); padding: 1.75rem 2rem; margin: 0; text-decoration: none; color: var(--cg-primary-text); transition: transform 0.12s, box-shadow 0.12s; }
main.cg-main a.cg-card--accent:hover { transform: translateX(4px); box-shadow: 0 3px 12px rgba(5, 28, 44, 0.1); color: var(--cg-primary-text); }
/* Open text block: no box, used for editorial copy on the public pages. */
main.cg-main .cg-block { padding: 2.5rem; margin: 0 0 1.5rem; }
main.cg-main .cg-block h2 { font-size: 1.75rem; color: var(--cg-primary-text); margin: 0 0 1rem; }
main.cg-main .cg-block h2::after { content: ""; display: block; width: 3rem; height: 3px; background: var(--cg-accent); margin-top: 0.5rem; }
main.cg-main .cg-block p { margin: 0.75rem 0; color: var(--cg-ink); line-height: 1.6; }
main.cg-main .cg-block summary { font-weight: 700; }
.cg-grid-2 > .cg-block { margin: 0; }
main.cg-main .role-section.cg-block { padding: 2rem 2.25rem; }
main.cg-main .role-section.cg-block h2 { font-size: 1.5rem; }
@media (max-width: 720px) { main.cg-main .cg-block, main.cg-main .role-section.cg-block { padding: 1.5rem 0; } }
main.cg-main a.cg-card--accent h3 { margin: 0 0 0.35rem; font-size: 1.5rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
main.cg-main a.cg-card--accent h3 .subtitle { display: block; margin-top: 0.3rem; font-weight: 400; color: var(--cg-muted); font-size: 1.1rem; letter-spacing: 0; }
main.cg-main a.cg-card--accent .summary { color: var(--cg-slate); margin: 0.75rem 0 0; font-size: 0.98rem; line-height: 1.55; }
main.cg-main a.cg-card--accent .meta { margin: 0.9rem 0 0; color: var(--cg-muted); font-size: 0.875rem; }
main.cg-main a.cg-card--accent .cg-chip { margin-right: 0.4rem; }
.cg-closing { text-align: center; padding: 4rem 0 1rem; }
.cg-closing-text { font-size: 1.5rem; font-weight: 700; color: var(--cg-primary-text); margin: 0; letter-spacing: -0.01em; }
main.cg-main .cg-block p.cg-pull { font-style: italic; color: var(--cg-slate); padding: 0.5rem 0; font-size: 1.05rem; }
.role-header { padding: 1.5rem 0 2rem; border-bottom: 1px solid var(--cg-border); margin-bottom: 2rem; }
.role-header h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0; color: var(--cg-primary-text); line-height: 1.1; }
.role-header .subtitle { font-size: 1.25rem; color: var(--cg-muted); margin: 0.5rem 0 0; }
.role-meta { margin: 1.25rem 0 0; }
.role-pullquote { border-left: 4px solid var(--cg-accent); padding: 0.5rem 0 0.5rem 1.25rem; margin: 1.5rem 0; color: var(--cg-ink); font-size: 1.1rem; line-height: 1.6; font-style: italic; }
.role-published { font-size: 0.875rem; color: var(--cg-muted); margin: 1rem 0 0; }
.role-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; align-items: start; }
@media (max-width: 900px) { .role-layout { grid-template-columns: 1fr; } }
main.cg-main .role-section .section-label { font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--cg-accent-ink); font-weight: 700; margin: 0 0 0.5rem; }
main.cg-main .cg-panel--dark .section-label { color: var(--cg-header-accent-text); }
.role-sidebar { position: sticky; top: 5rem; }
main.cg-main .role-sidebar .cg-btn { margin-top: 0.5rem; }
.role-sidebar .side-panel { margin-top: 1.25rem; padding: 1.25rem 1.5rem; }
main.cg-main .role-sidebar .side-panel h2 { font-size: 0.875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cg-slate); margin: 0 0 0.75rem; }
main.cg-main .role-sidebar .side-panel h2::after { display: none; }
.role-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.role-steps li { counter-increment: step; padding: 0.55rem 0 0.55rem 2.25rem; position: relative; color: var(--cg-ink); font-size: 0.95rem; line-height: 1.4; border-bottom: 1px solid var(--cg-border); }
.role-steps li:last-child { border-bottom: none; }
.role-steps li::before { content: counter(step); position: absolute; left: 0; top: 0.5rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--cg-accent); color: var(--cg-on-accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8125rem; }
main.cg-main .role-sidebar .side-panel p.role-note { margin: 0.75rem 0 0; font-style: italic; color: var(--cg-muted); font-size: 0.875rem; }
.cg-closing-band { margin: 3rem 0 1rem; padding: 2.5rem; text-align: center; }
main.cg-main .cg-closing-band > p:first-child { font-size: 1.35rem; font-weight: 700; color: var(--cg-primary-text); margin: 0; letter-spacing: -0.01em; line-height: 1.3; }
main.cg-main .cg-closing-band .cg-closing-body { margin: 1rem auto 0; max-width: 640px; color: var(--cg-slate); font-size: 1.05rem; line-height: 1.6; }
.cg-closing-band small { display: block; margin-top: 1.25rem; font-style: italic; color: var(--cg-muted); font-size: 0.875rem; }

/* --- Assessment (participant) --- */
.as-wrap { max-width: 880px; margin: 0 auto; }
.as-hero-inner { max-width: 560px; }
.cg-hero .as-internal-note { font-weight: 600; color: var(--cg-on-primary); }
.cg-hero .as-expect { font-size: 1rem; font-weight: 600; color: var(--cg-on-primary); margin: 0 0 2rem; }
.done-wrap { max-width: 760px; margin: 0 auto; }
.done-hero .lede { max-width: 30rem; margin-bottom: 2rem; }
.done-hero .lede + .lede { margin-top: -1rem; }
.done-hero .done-close { font-weight: 600; color: var(--cg-on-primary); }
.done-hero .done-close a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.done-hero .done-close a:focus-visible { outline: 2px solid var(--cg-on-primary); outline-offset: 3px; }
.done-note { border-top: 1px solid rgba(255,255,255,0.25); padding-top: 1.25rem; max-width: 30rem; margin: 0; }
.done-note .t { margin: 0 0 0.5rem; color: var(--cg-on-primary); font-weight: 700; }
.done-note .d { margin: 0; color: var(--cg-on-primary-meta); font-size: 0.95rem; line-height: 1.55; }

.as-progress-head { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 0 1.5rem; flex-wrap: wrap; gap: 0.75rem; }
.as-progress-head .cg-eyebrow { margin: 0 0 0.35rem; color: var(--cg-muted); }
.as-progress-head h1 { font-size: 1.75rem; margin: 0; color: var(--cg-primary-text); letter-spacing: -0.01em; }
.as-progress { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.as-progress-text { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--cg-primary-text); }
.as-bar { width: 14rem; max-width: 100%; height: 0.5rem; box-sizing: border-box; border: 1px solid var(--cg-primary); border-radius: 999px; background: var(--cg-light); overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.as-bar-fill { display: block; height: 100%; box-sizing: border-box; background: var(--cg-primary); }
@media (max-width: 640px) { .as-progress { align-items: flex-start; width: 100%; } .as-bar { width: 100%; } }
.as-progress-dots { display: flex; gap: 0.4rem; }
.as-progress-dots span { width: 2rem; height: 5px; border-radius: 999px; background: var(--cg-border); }
.as-progress-dots span.done { background: var(--cg-accent); }
.as-progress-dots span.current { background: var(--cg-primary); }

main.cg-main .as-shell { padding: 2.25rem 2.5rem; }
@media (max-width: 640px) { main.cg-main .as-shell { padding: 1.5rem 1.25rem; } }
main.cg-main .as-shell .as-intro { background: var(--cg-light); border: 1px solid var(--cg-border); padding: 1rem 1.25rem; border-radius: 4px; margin: 0 0 2rem; color: var(--cg-ink); line-height: 1.55; }
main.cg-main .as-shell .as-required-note { margin: -1rem 0 1.5rem; color: var(--cg-ink); font-weight: 600; font-size: 0.95rem; }
.as-item { padding: 1.75rem 0; border-bottom: 1px solid var(--cg-border); }
.as-video { margin: 0 0 1.25rem; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.as-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.as-item:last-of-type { border-bottom: none; }
.as-item.has-error { background: #fef2f2; margin: 0 -1.25rem; padding-left: 1.25rem; padding-right: 1.25rem; border-radius: 8px; }
main.cg-main .as-shell .as-prompt { display: flex; gap: 0.75rem; align-items: flex-start; color: var(--cg-primary-text); font-weight: 600; font-size: 1.05rem; margin: 0 0 1.1rem; line-height: 1.4; }
.as-prompt .num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--cg-light); color: var(--cg-primary-text); font-size: 0.8125rem; font-weight: 700; }
.as-options { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.as-option { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.85rem 1.1rem; border: 1.5px solid var(--cg-input-border); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color 0.12s, background 0.12s, box-shadow 0.12s; }
.as-option:hover { border-color: var(--cg-accent); background: #FAFDF5; }
.as-option:has(input:checked) { border-color: var(--cg-primary); background: #EAF4D3; box-shadow: 0 0 0 2px var(--cg-primary); }
.as-option input[type=radio] { margin-top: 0.2rem; flex-shrink: 0; accent-color: var(--cg-primary); width: 1.15rem; height: 1.15rem; }
.as-option:has(input:focus-visible) { outline: 3px solid var(--cg-primary); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(151,215,0,0.55); }
.as-option input[type=radio]:checked + span { font-weight: 700; }
.as-option-text { color: var(--cg-primary-text); line-height: 1.5; }
main.cg-main .as-shell .as-error { color: #991b1b; font-size: 0.875rem; margin: 0.5rem 0 0; }
.as-textarea-label { display: block; color: var(--cg-primary-text); font-weight: 600; font-size: 1rem; margin: 0 0 0.5rem; }
.as-textarea { width: 100%; min-height: 7rem; padding: 0.75rem 0.9rem; }
.as-char-count { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--cg-primary-text); }
.as-nav { display: flex; justify-content: flex-end; margin-top: 2rem; }
main.cg-main .as-shell .as-global-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 0.75rem 1rem; border-radius: 4px; margin: 0 0 1.5rem; }
main.cg-main .as-shell .as-global-error p { color: #991b1b; margin: 0; }
/* Question page (#829): one question per page, one linear sequence. */
.as-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
main.cg-main .as-shell .as-group-title { margin: 0 0 0.5rem; font-size: 1.25rem; color: var(--cg-primary-text); }
main.cg-main .as-shell .as-resume { margin: 0 0 1rem; font-weight: 600; color: var(--cg-primary-text); }
.as-item { padding-top: 0.75rem; border-bottom: none; }
/* Next comes first in the markup (Enter submits Next); row-reverse shows Back on the left. */
.as-nav { gap: 0.75rem; flex-wrap: wrap; flex-direction: row-reverse; justify-content: flex-start; }
.as-nav .as-back { margin-right: auto; }
main.cg-main .as-shell .as-confirm { margin: 1.5rem 0 0; color: var(--cg-ink); font-weight: 600; }
.as-confirm + .as-nav { margin-top: 0.75rem; }
main.cg-main .as-shell .as-draft-note { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--cg-primary-text); }
/* Taker pages on phones: 44px links in the header, footer and close line. */
body.as-candidate header.cg-header > a:first-child, body.as-candidate footer.cg-footer a, body.as-candidate .done-close a { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 480px) {
  .as-nav { flex-direction: column; }
  .as-nav .as-submit, .as-nav .as-back { width: 100%; margin-right: 0; }
}

/* Legacy intern pages (.cg-legacy): their Tailwind inputs get the shared input-border token and the shared focus treatment.
 * The utility borders (border-gray-300/200, about 1.47:1) are gone from the form controls; focus:border-transparent plus a lime
 * ring (1.74:1) is overridden by a visible outline and a primary border. Scoped to .cg-legacy, so no markup rewrite is needed. */
.cg-legacy :is(input, select, textarea):not([type=checkbox], [type=radio], [type=hidden], [type=file], [type=range], [type=submit], [type=button], [type=color]) {
  border-color: var(--cg-input-border);
}
.cg-legacy :is(input, select, textarea):focus {
  outline: 2px solid var(--cg-input-focus); outline-offset: 1px; border-color: var(--cg-primary);
}

/* "Report an issue" dialog (#728). Lives in the shared header, outside main.cg-main,
 * so its controls carry their own token styles. */
header.cg-header nav button.cg-report-open { background: none; border: 0; padding-left: 0; padding-right: 0; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--cg-on-primary-muted); cursor: pointer; }
header.cg-header nav button.cg-report-open:hover { color: var(--cg-header-accent-text); }
dialog.cg-report { width: min(32rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: 12px; background: #fff; color: var(--cg-ink); box-shadow: 0 20px 50px rgba(5, 28, 44, 0.25); }
dialog.cg-report::backdrop { background: rgba(5, 28, 44, 0.55); }
.cg-report-form, .cg-report-done { padding: 1.5rem 1.5rem 1.25rem; }
.cg-report .cg-report-title { margin: 0 0 0.35rem; font-size: 1.25rem; color: var(--cg-primary-text); }
.cg-report .cg-report-help { margin: 0 0 1rem; font-size: 0.925rem; color: var(--cg-ink); line-height: 1.5; }
.cg-report .cg-report-error { margin: 0 0 1rem; padding: 0.65rem 0.85rem; border: 1px solid #fecaca; border-radius: var(--cg-radius); background: #fef2f2; color: #991b1b; font-size: 0.9rem; }
.cg-report-kinds { margin: 0 0 1rem; padding: 0; border: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1rem; }
.cg-report-kinds legend { margin: 0 0 0.5rem; padding: 0; font-weight: 600; color: var(--cg-primary-text); }
.cg-report-kinds label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.925rem; cursor: pointer; }
.cg-report-kinds input[type=radio] { accent-color: var(--cg-primary); width: 1rem; height: 1rem; margin: 0; }
@media (max-width: 480px) { .cg-report-kinds { grid-template-columns: 1fr; } }
.cg-report .cg-report-label { display: block; margin: 0 0 0.35rem; font-weight: 600; color: var(--cg-primary-text); }
dialog.cg-report textarea.cg-report-text { display: block; width: 100%; box-sizing: border-box; min-height: 7rem; padding: 0.65rem 0.8rem; border: 1px solid var(--cg-input-border); border-radius: var(--cg-radius); font: inherit; color: var(--cg-ink); resize: vertical; }
dialog.cg-report textarea.cg-report-text:focus { outline: 2px solid var(--cg-input-focus); outline-offset: 1px; border-color: var(--cg-primary); }
dialog.cg-report textarea.cg-report-text[aria-invalid=true] { border-color: #991b1b; }
.cg-report .cg-report-field-error { margin: 0.35rem 0 0; font-size: 0.875rem; color: #991b1b; }
.cg-report-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.25rem; }
.cg-report-done .cg-report-title:focus { outline: none; box-shadow: 0 0 0 3px var(--cg-input-focus); border-radius: 4px; }

/* Overrides that must come after the base rules above (same specificity, later wins): reduced motion and print. */
@media (prefers-reduced-motion: reduce) {
  .cg-btn--lg:hover, main.cg-main a.cg-card--accent:hover { transform: none; }
}
@media print {
  body:not(.cg-legacy) { display: block; min-height: 0; }
}

/* API access page (#922) */
.aa-wrap { max-width: 980px; margin: 0 auto; }
.aa-panel { border: 1px solid var(--cg-border); border-radius: var(--cg-radius-lg); padding: 1.5rem 1.75rem; margin: 0 0 1.25rem; }
.aa-panel h1, .aa-panel h2 { color: var(--cg-primary-text); margin: 0 0 .4rem; }
.aa-panel h1 { font-size: 1.5rem; }
.aa-panel h2 { font-size: 1.15rem; }
.aa-sub, .aa-small { color: var(--cg-muted); font-size: .88rem; }
.aa-warn { background: #fffbeb; border-left: 3px solid #d97706; padding: .7rem .9rem; border-radius: 4px; color: #78350f; }
.aa-msg { padding: .7rem 1rem; border-radius: 6px; margin: 0 0 1rem; font-size: .9rem; background: #ecfdf5; color: #065f46; }
.aa-errors { padding: .7rem 1rem; border-radius: 6px; margin: 0 0 1rem; font-size: .9rem; background: #fef2f2; color: #991b1b; }
.aa-errors ul { margin: 0; padding-left: 1.1rem; }
.aa-field { margin: 0 0 1rem; }
.aa-field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .25rem; }
.aa-field input[type=text], .aa-field input[type=number], .aa-field input[type=password], .aa-field select { padding: .5rem .7rem; border: 1px solid var(--cg-input-border); border-radius: 4px; font: inherit; max-width: 100%; }
.aa-field input[type=text] { width: 20rem; }
.aa-grants { border: 1px solid var(--cg-border); border-radius: 6px; padding: .6rem .9rem; margin: 0 0 1rem; }
.aa-grants legend { font-weight: 600; font-size: .85rem; padding: 0 .3rem; }
.aa-grant { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; padding: .3rem 0; }
.aa-grant label { font-weight: 400; display: inline-flex; gap: .4rem; align-items: center; margin: 0; }
.aa-scopes { display: flex; flex-direction: column; gap: .25rem; }
.aa-copyrow { display: flex; gap: .5rem; flex-wrap: wrap; }
.aa-copyrow input { flex: 1 1 22rem; font-family: ui-monospace, Menlo, Consolas, monospace; padding: .55rem .7rem; border: 1px solid var(--cg-input-border); border-radius: 4px; }
.aa-table-wrap { overflow-x: auto; }
.aa-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.aa-table th, .aa-table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--cg-border); vertical-align: top; }
.aa-status { font-weight: 600; }
.aa-status.active { color: #065f46; }
.aa-status.off { color: var(--cg-muted); }
.aa-actions { display: flex; flex-direction: column; gap: .4rem; }
.aa-actions form { margin: 0; }
.aa-actions details summary { cursor: pointer; color: var(--cg-primary-text); }
.aa-code { background: #0f172a; color: #e2e8f0; padding: .8rem 1rem; border-radius: 6px; overflow-x: auto; font-size: .82rem; white-space: pre; }
.aa-back { display: inline-block; margin-bottom: .8rem; font-size: .85rem; color: var(--cg-muted); }

/* Glossary tips (moved from the glossary_assets include, #922) */
/* Glossary tips (#926). Without the script the term keeps its title text and a visually hidden definition. */
.gl-term { text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: help; font-style: inherit; }
/* Inside an answer option the term is only underlined; its "?" button sits after the label. */
.gl-plain { cursor: inherit; }
.as-option-wrap { position: relative; }
.as-option.has-help { padding-right: 5.3rem; }
/* Each "?" button is 1.6rem plus a 1.125rem gap (the 44px tap areas touch, never overlap): grow the padding past two buttons. */
.as-option.has-help-3 { padding-right: 8rem; }
.as-option.has-help-4 { padding-right: 10.7rem; }
.as-option.has-help-5 { padding-right: 13.4rem; }
.as-option.has-help-6 { padding-right: 16.1rem; }
.gl-helps { position: absolute; top: 0.6rem; right: 0.7rem; display: flex; gap: 1.125rem; }
.gl-help { box-sizing: border-box; width: 1.6rem; height: 1.6rem; padding: 0; border: 1.5px solid var(--cg-primary-text, var(--cg-primary)); border-radius: 50%; background: #fff; color: var(--cg-primary-text, var(--cg-primary)); font: 700 0.8rem/1 'Montserrat', system-ui, sans-serif; cursor: help; }
.gl-help { position: relative; }
/* 44px tap target around the 26px mark: a transparent pseudo-element, so a near-miss taps the help button and never the option behind it. */
.gl-help::after { content: ""; position: absolute; top: -9px; right: -9px; bottom: -9px; left: -9px; }
.gl-help:hover { background: var(--cg-light); }
.gl-help:focus-visible { outline: 2px solid var(--cg-focus-ring, var(--cg-primary)); outline-offset: 2px; }
.gl-term:focus-visible { outline: 2px solid var(--cg-focus-ring, var(--cg-primary)); outline-offset: 2px; border-radius: 2px; }
.gl-tip { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.gl-ready .gl-tip.is-open { position: fixed; z-index: 1000; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; clip-path: none; white-space: normal; box-sizing: border-box; max-width: min(20rem, calc(100vw - 1.5rem)); padding: 0.55rem 0.75rem; border-left: 4px solid var(--cg-accent); border-radius: 8px; background: var(--cg-primary); color: var(--cg-on-primary); font-family: 'Montserrat', system-ui, -apple-system, sans-serif; font-size: 0.875rem; font-weight: 500; line-height: 1.4; text-decoration: none; box-shadow: 0 6px 18px rgba(5, 28, 44, 0.25); }
@media (forced-colors: active) { .gl-ready .gl-tip.is-open { border: 1px solid CanvasText; } }

/* Question coverage on the cohort preview (Refs #1000). */
.qcov-summary { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0 0 1rem; padding: 0; color: var(--cg-primary-text); font-size: .95rem; }
.qcov-figure { margin: 0 0 1rem; max-width: 34rem; }
.qcov-radar { width: 100%; height: auto; display: block; }
.qcov-ring { fill: none; stroke: var(--cg-line); stroke-width: 1; }
.qcov-ring-min { stroke: var(--cg-slate); stroke-width: 1.5; stroke-dasharray: 5 4; }
.qcov-axis { stroke: var(--cg-border); stroke-width: 1; }
.qcov-outline { fill: color-mix(in srgb, var(--cg-primary) 12%, transparent); stroke: var(--cg-primary-text); stroke-width: 2; }
.qcov-dot { fill: var(--cg-primary-text); }
.qcov-dot-below { fill: #92400e; }
.qcov-halo { fill: none; stroke: #92400e; stroke-width: 2; }
.qcov-key { list-style: none; margin: .5rem 0; padding: 0; font-size: .85rem; }
.qcov-axis-label { font-size: 13px; font-weight: 600; fill: var(--cg-ink); }
.qcov-axis-label-below { fill: #92400e; font-weight: 700; }
.qcov-path { margin-top: 1.25rem; }
.qcov-path h3 { margin: 0 0 .4rem; font-size: 1rem; color: var(--cg-primary-text); }
.qcov-bars { list-style: none; margin: 0; padding: 0; }
.qcov-bars li { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(5rem, 1fr) minmax(7rem, auto); gap: .5rem; align-items: center; padding: .2rem 0; font-size: .85rem; }
.qcov-bar { width: 100%; height: .7rem; display: block; }
.qcov-bar-track { fill: var(--cg-light); }
.qcov-bar-fill { fill: var(--cg-primary-text); }
.qcov-bar-fill-below { fill: #92400e; }
.qcov-bar-mark { stroke: var(--cg-slate); stroke-width: 2; vector-effect: non-scaling-stroke; }
@media (max-width: 600px) { .qcov-bars li { grid-template-columns: 1fr; } }

/* Cohort edit page: question-set tools (Refs #1000, slice 2) */
.qedit { margin-top: 1rem; padding-top: .5rem; border-top: 1px solid var(--cg-line); }
.qedit-h { margin: 1rem 0 .35rem; font-size: 1rem; color: var(--cg-primary-text); }
.qedit-delta { border: 1px solid var(--cg-border); border-radius: var(--cg-radius); padding: .5rem 1rem; margin: .75rem 0; background: var(--cg-light); }
.qedit-delta-list { margin: 0 0 .5rem; padding-left: 1.1rem; font-size: .9rem; }
.qedit-warn { color: #92400e; font-size: .88rem; }
.qedit-ok { color: #065f46; }
.qedit-gap h4 { margin: .75rem 0 .25rem; font-size: .95rem; }
.qedit-sugg, .qedit-list { list-style: none; margin: 0; padding: 0; }
.qedit-sugg li, .qedit-list li { display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--cg-line); font-size: .88rem; }
.qedit-sugg li > div:nth-child(2), .qedit-list li > div:nth-child(2) { grid-column: 1; }
.qedit-sugg li .cg-btn, .qedit-list li .cg-btn { grid-column: 2; grid-row: 1 / span 3; min-height: 44px; min-width: 44px; }
.qedit-list li .qedit-warn { grid-column: 1; }
.qedit-prompt { color: var(--cg-muted); }
.qedit-undo { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
@media (max-width: 600px) { .qedit-sugg li, .qedit-list li { grid-template-columns: 1fr; } .qedit-sugg li .cg-btn, .qedit-list li .cg-btn { grid-column: 1; grid-row: auto; } }

/* Team summary page (#1077); moved out of the template for the design lint. */
.ts-page { max-width:1120px; margin:2rem auto; padding:0 1rem; --ts-within:#236442; --ts-near:#805400; --ts-outside:#A52A25; --ts-neutral:#495459; }
.ts-crumb { font-size:.85rem; color:var(--cg-muted,#686e79); margin:0 0 .5rem; }
.ts-head { background:var(--cg-primary,#051C2C); color:var(--cg-on-primary,#fff); border-radius:var(--cg-radius-lg,10px) var(--cg-radius-lg,10px) 0 0; padding:1.5rem 1.75rem; }
.ts-head h1 { margin:.25rem 0; color:inherit; }
.ts-head p { margin:.25rem 0; color:var(--cg-on-primary-muted,#D5DADD); font-size:.9rem; }
.ts-eyebrow { font-size:.75rem; letter-spacing:.12em; text-transform:uppercase; font-weight:700; color:var(--cg-accent,#97D700); }
.ts-sheet { background:#fff; border:1px solid var(--cg-border,#E5E7EB); border-top:0; border-radius:0 0 var(--cg-radius-lg,10px) var(--cg-radius-lg,10px); padding:1.25rem 1.75rem 1.75rem; }
.ts-tools { display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; margin:0 0 1rem; }
.ts-tools select, .ts-tools .cg-btn { min-height:44px; }
.ts-notice { background:#edf2f5; border:1px solid #cdd8df; border-radius:var(--cg-radius,6px); padding:.65rem .9rem; margin:0 0 1rem; font-size:.9rem; }
.ts-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(9rem,1fr)); gap:1rem; margin:0 0 1.25rem; }
.ts-stats > div { display:flex; flex-direction:column; border-bottom:2px solid var(--cg-border,#E5E7EB); padding-bottom:.6rem; }
.ts-stats dt { font-size:.8rem; color:var(--cg-muted,#475864); order:2; }
.ts-stats dd { margin:0; font-size:1.9rem; font-weight:700; line-height:1.15; order:1; }
.ts-stats small { display:block; font-size:.72rem; color:var(--cg-muted,#475864); order:3; }
.ts-bar { display:flex; gap:3px; height:14px; margin:.5rem 0; }
.ts-bar i { display:block; min-width:2px; border-radius:2px; }
.ts-t-green { background:var(--ts-within); } .ts-t-amber { background:var(--ts-near); } .ts-t-red { background:var(--ts-outside); }
.ts-t-insufficient { background:var(--ts-neutral); } .ts-t-pending { background:#d7dfe4; }
.ts-small { font-size:.85rem; color:var(--cg-muted,#475864); }
.ts-table { width:100%; border-collapse:collapse; font-size:.9rem; margin:.5rem 0 1rem; }
.ts-table caption { text-align:left; color:var(--cg-muted,#475864); font-size:.85rem; padding-bottom:.4rem; }
.ts-table th, .ts-table td { text-align:left; padding:.45rem .4rem; border-bottom:1px solid #e8edef; vertical-align:middle; }
.ts-table thead th { font-size:.78rem; background:#f3f5f6; }
.ts-table thead th { white-space:normal !important; font-size:.7rem; padding:.45rem .3rem; }
.ts-table .n { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ts-dimbar { display:flex; height:9px; background:#e3e8eb; min-width:5rem; }
.ts-dimbar i { display:block; height:100%; }
.ts-scroll { overflow-x:auto; }
.ts-scroll:focus-visible { outline:3px solid var(--cg-focus-ring,#051C2C); outline-offset:2px; }
.ts-two { display:grid; grid-template-columns:1fr 1fr; gap:1.5rem; }
@media (max-width:760px) { .ts-two { grid-template-columns:1fr; } .ts-head, .ts-sheet { padding-left:1rem; padding-right:1rem; } }
/* #1088: Progress tab, one search with the rest of the filters folded away. */
.pg-more { grid-column:1 / -1; }
.pg-more > summary { cursor:pointer; font-size:.88rem; font-weight:700; padding:.25rem 0; }
.pg-more > summary:focus-visible { outline:3px solid var(--cg-focus-ring,#051C2C); outline-offset:2px; }

/* Needs attention today (#1088): one row per person, reasons in words. */
.pg-attention { margin:1rem 0; }
.pg-att-counts { list-style:none; display:flex; flex-wrap:wrap; gap:.5rem 1.25rem; margin:.5rem 0; padding:0; font-size:.9rem; }

/* Per-cohort link expiry table (#1121, #1138): plain counts and exact UTC times. */
.pg-expiry { margin:1rem 0; }
.pg-expiry-table { width:100%; border-collapse:collapse; font-size:.88rem; }
.pg-expiry-table th, .pg-expiry-table td { padding:.5rem .4rem; text-align:left; vertical-align:top; border-bottom:1px solid var(--cg-border); }
.pg-expiry-table thead th { background:#f3f5f6; font-size:.78rem; white-space:normal; }
/* Two classes beat the inline .ws-table th nowrap rule. */
.ws-table.pg-expiry-table tbody th { white-space:normal; overflow-wrap:anywhere; }
.pg-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.pg-ex-notes { list-style:none; margin:.5rem 0; padding:0; font-size:.9rem; }
.pg-ex-notes li { margin:.25rem 0; overflow-wrap:anywhere; }
@media (max-width:767px) {
  .pg-expiry-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .pg-expiry-table, .pg-expiry-table tbody, .pg-expiry-table tr, .pg-expiry-table th, .pg-expiry-table td { display:block; width:100%; box-sizing:border-box; }
  .pg-expiry-table tr { padding:.5rem 0; border-bottom:1px solid var(--cg-border); }
  .pg-expiry-table th, .pg-expiry-table td { border:0; padding:.15rem 0; overflow-wrap:anywhere; }
  .pg-expiry-table tbody th { font-size:1rem; padding-bottom:.25rem; }
  .pg-expiry-table td { display:grid; grid-template-columns:9.5rem 1fr; gap:0 .5rem; }
  .pg-expiry-table td::before { content:attr(data-label); font-size:.78rem; color:var(--cg-text-muted,#445561); }
}

/* Progress sentence (#1138): one computed sentence in place of metric tiles. */

/* Progress tab (#822, #1088); moved out of internal_workspace.html (#1110). */
/* #822: Progress tab. Meaning never rests on colour alone: every status, bucket and flag carries its own text. */
.pg-filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(10rem,1fr)); gap:.75rem; align-items:end; margin:1rem 0 .5rem; }
.pf-box { margin:.5rem 0; max-width:22rem; }
.pf-box label { display:block; font-size:.8rem; font-weight:700; }
.pf-box input { display:block; width:100%; margin-top:.25rem; padding:.45rem; border:1px solid var(--cg-input-border,#80868f); border-radius:5px; background:#fff; color:var(--cg-primary-text,#051C2C); font:inherit; }
.pf-box input:focus-visible { outline:3px solid var(--cg-focus-ring,#051C2C); outline-offset:2px; }
.pf-links a { white-space:nowrap; }
.pf-links a + a { margin-left:.75rem; }
.pf-id { font-size:.8rem; }
.pg-filters label { font-size:.8rem; font-weight:700; display:block; }
.pg-filters input, .pg-filters select { display:block; width:100%; margin-top:.25rem; padding:.45rem; border:1px solid var(--cg-input-border,#80868f); border-radius:5px; background:#fff; color:var(--cg-primary-text,#051C2C); font:inherit; }
.pg-filters input:focus-visible, .pg-filters select:focus-visible, .pg-table-wrap:focus-visible { outline:3px solid var(--cg-focus-ring,#051C2C); outline-offset:2px; }
.pg-table-wrap { overflow-x:auto; }
.pg-table caption { text-align:left; color:var(--cg-muted,#686e79); font-size:.85rem; padding-bottom:.5rem; }
.pg-table th { background:#f3f5f6; font-size:.78rem; }
/* #1088: let headers wrap and stack the two links so the table fits its container; the wrapper still scrolls as a fallback. */
.pg-table thead th { white-space:normal; }
.pg-table .pf-links a { display:block; margin-left:0; }
.pg-table td .cg-btn { padding:.4rem .6rem; font-size:.82rem; min-height:44px; }
/* Two classes: the inline .ws-table padding rule loads later and has one class. */
.ws-table.pg-table th, .ws-table.pg-table td { padding:.5rem .3rem; }
.pg-table tbody th { white-space:nowrap; background:#fff; font-size:.88rem; }
.pg-table td { vertical-align:middle; font-size:.85rem; }
.pg-chip { display:inline-block; border:1px solid #cdd8df; background:#eff4f7; border-radius:1rem; padding:.1rem .55rem; font-size:.78rem; white-space:nowrap; }
.pg-chip.finished { background:#eef3ec; border-color:#cedac6; }
.pg-flag { display:block; font-size:.74rem; font-weight:700; color:#655224; margin-top:.2rem; }
.pg-mini { display:block; width:7rem; height:.3rem; background:#e4e9ec; border-radius:.3rem; overflow:hidden; margin-top:.25rem; }
.pg-mini > span { display:block; height:100%; background:var(--ws-tint-75,var(--cg-tint-75,#445561)); }
.pg-sub { display:block; font-size:.74rem; color:var(--cg-muted,#686e79); }

/* Progress page, editorial layout (web Progress redesign). Scoped to
   .pg-editorial so Results and the other tabs are untouched. One finding,
   one bar, one ledger, one list; no cards, tiles or gradients. */
.pg-editorial .ws-page { max-width:1168px; padding:0 1.5rem; font-family:'Montserrat', system-ui, sans-serif; }
.pg-editorial .pg-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.pg-editorial .pg-text-action { display:inline-block; background:none; border:0; padding:.6rem .1rem; min-height:44px; box-sizing:border-box; font:inherit; font-size:.9rem; color:var(--cg-primary-text,#051C2C); text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.pg-editorial .pg-text-action:hover { color:var(--cg-link-hover,#051C2C); text-decoration-thickness:2px; }
.pg-editorial .pg-text-action:focus-visible, .pg-editorial summary:focus-visible { outline:3px solid var(--cg-focus-ring,#051C2C); outline-offset:2px; }


.pg-editorial .pg-expiry { margin:1.5rem 0; }
.pg-editorial .pg-expiry-table { table-layout:auto; font-size:.88rem; }
main.cg-main .pg-editorial .pg-expiry-table thead th { border-radius:0; padding:.6rem .3rem; background:none; color:var(--cg-primary-text,#051C2C); text-transform:none; letter-spacing:normal; font-size:.8rem; border-bottom:1px solid var(--cg-primary,#051C2C); font-weight:700; white-space:nowrap; }
.pg-editorial .pg-expiry-table th, .pg-editorial .pg-expiry-table td { padding:.6rem .3rem; }
.pg-editorial .pg-expiry-table tbody th { background:none; color:var(--cg-primary-text,#051C2C); text-transform:none; letter-spacing:normal; }
.pg-editorial .pg-expiry-table .pg-num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.pg-editorial .pg-expiry-table tbody tr { border-top:1px solid var(--cg-border); }
.pg-editorial .pg-expiry-table tbody th { min-width:8rem; overflow-wrap:anywhere; }
.pg-editorial .pg-expiry-table tbody tr.pg-detail-row { border-top:0; }
.pg-editorial .pg-expiry-table .pg-detail-row td { padding-top:0; text-align:left; white-space:normal; overflow-wrap:anywhere; }
.pg-editorial .pg-text-action:disabled { color:var(--cg-muted,#686e79); text-decoration:none; cursor:not-allowed; }
.pg-editorial .pg-cohort-details summary { cursor:pointer; font-weight:400; font-size:.82rem; text-decoration:underline; text-underline-offset:3px; padding:.25rem 0; }
.pg-editorial .pg-cohort-details dl { margin:.25rem 0; font-weight:400; }
.pg-editorial .pg-cohort-details dl div { display:flex; justify-content:space-between; gap:1rem; padding:.1rem 0; }
.pg-editorial .pg-cohort-details dt { color:var(--cg-muted,#686e79); }
.pg-editorial .pg-cohort-details dd { margin:0; font-variant-numeric:tabular-nums; text-align:right; }

.pg-editorial .pg-attention { margin:1.5rem 0; }
.pg-editorial .pg-reason-counts summary, .pg-editorial .pg-people-detail > summary, .pg-editorial .pg-more > summary { cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.pg-editorial .pg-people-detail > summary { font-weight:700; font-size:1.1rem; padding:.5rem 0; text-decoration:none; }
.pg-editorial .pg-people-detail { border-top:1px solid var(--cg-primary,#051C2C); }
main.cg-main .pg-editorial .pg-table thead th { text-transform:none; letter-spacing:normal; }
.pg-editorial .pg-chip { border-radius:0; border:0; background:none; padding:0; font-weight:700; }
.pg-editorial .pg-table-wrap { overflow-x:auto; }

/* Progress dashboard: one square per person, grouped per cohort row. Marks are
   shapes first (solid, filled from the bottom, dashed, cross); colour only
   reinforces. Navy and one red; no amber on the squares. */
.pg-editorial .pd { --pd-cell:26px; --pd-gap:4px; }
.pg-editorial .pg-people { min-width:0; margin-top:1rem; }
.pg-editorial .pd-bar { display:flex; align-items:center; gap:12px 20px; margin:14px 0 6px; flex-wrap:wrap; }
.pg-editorial .pd-bar-tools { margin-top:0; }
.pg-editorial .pd-invite { margin-left:auto; min-height:44px; display:inline-flex; align-items:center; }
.pg-editorial .pd-ibtn { width:44px; height:44px; border-radius:50%; border:1.5px solid var(--cg-primary,#051C2C); background:#fff; color:var(--cg-primary,#051C2C); font:700 1rem Georgia,serif; font-style:italic; cursor:pointer; }
.pg-editorial .pd-ibtn[aria-expanded="true"] { background:var(--cg-primary,#051C2C); color:#fff; }
.pg-editorial .pd-ibtn:focus-visible, .pg-editorial .pd-kb:focus-visible, .pg-editorial .pd-rh:focus-visible, .pg-editorial .pd-asum:focus-visible, .pg-editorial .pd-actbtn:focus-visible { outline:3px solid var(--cg-focus-ring,#051C2C); outline-offset:2px; }
.pg-editorial .pd-key { display:flex; flex-wrap:wrap; gap:4px 14px; margin:0; padding:0; list-style:none; min-width:0; }
.pg-editorial .pd-kb { display:inline-flex; align-items:center; gap:6px; min-height:44px; padding:0 4px; border:0; background:none; font:inherit; font-size:.82rem; color:var(--cg-ink,#374151); cursor:pointer; white-space:nowrap; border-radius:4px; }
.pg-editorial .pd-kb b { font-size:.95rem; font-variant-numeric:tabular-nums; color:var(--cg-primary,#051C2C); }
.pg-editorial .pd-kb[aria-pressed="true"] { box-shadow:inset 0 -3px 0 var(--cg-primary,#051C2C); }

.pg-editorial .pd-cell { position:relative; display:block; width:var(--pd-cell); height:var(--pd-cell); box-sizing:border-box; border-radius:2px; border:1.5px solid var(--cg-primary,#051C2C); background:#fff; text-decoration:none; }
.pg-editorial .pd-cell.fin { background:var(--cg-primary,#051C2C); }
.pg-editorial .pd-cell.ip { background:linear-gradient(to top,var(--cg-primary,#051C2C) var(--p),#fff var(--p)); }
.pg-editorial .pd-cell.ns { border:1.5px dashed var(--cg-muted,#686e79); }
.pg-editorial .pd-cell.bad, .pg-editorial .pd-mark.bad { --pd-x:var(--cg-outside,#A12B2B); border:1.5px solid var(--pd-x); background:linear-gradient(to top right,transparent calc(50% - 1px),var(--pd-x) calc(50% - 1px),var(--pd-x) calc(50% + 1px),transparent calc(50% + 1px)),linear-gradient(to top left,transparent calc(50% - 1px),var(--pd-x) calc(50% - 1px),var(--pd-x) calc(50% + 1px),transparent calc(50% + 1px)),var(--cg-outside-bg,#FBEDED); }
.pg-editorial .pd-cell:focus-visible { outline:3px solid var(--cg-focus-ring,#051C2C); outline-offset:3px; z-index:2; }
.pg-editorial .pd-cell:hover, .pg-editorial .pd-cell:focus-visible { z-index:3; }
.pg-editorial .pd[data-f="fin"] .pd-cell:not(.fin), .pg-editorial .pd[data-f="ip"] .pd-cell:not(.ip), .pg-editorial .pd[data-f="ns"] .pd-cell:not(.ns), .pg-editorial .pd[data-f="bad"] .pd-cell:not(.bad) { opacity:.22; }
.pg-editorial .pd-tip { display:none; position:absolute; left:50%; bottom:calc(100% + 10px); transform:translateX(-50%); z-index:5; background:var(--cg-primary,#051C2C); color:#fff; padding:7px 10px; border-radius:4px; font-size:.78rem; line-height:1.35; white-space:nowrap; font-weight:600; pointer-events:none; }
.pg-editorial .pd-tip small { display:block; font-weight:400; color:#D5DADD; }
.pg-editorial .pd-cell:hover .pd-tip, .pg-editorial .pd-cell:focus-visible .pd-tip { display:block; }
.pg-editorial .pd-mark { display:inline-block; width:16px; height:16px; box-sizing:border-box; border-radius:2px; border:1.5px solid var(--cg-primary,#051C2C); background:#fff; position:relative; flex:none; overflow:hidden; }
.pg-editorial .pd-mark.fin { background:var(--cg-primary,#051C2C); }
.pg-editorial .pd-mark.ip { background:linear-gradient(to top,var(--cg-primary,#051C2C) 50%,#fff 50%); }
.pg-editorial .pd-mark.ns { border:1.5px dashed var(--cg-muted,#686e79); }

.pg-editorial .pd-row { padding:14px 0 10px; border-bottom:1px solid var(--cg-border,#E5E7EB); display:grid; grid-template-columns:8.5rem minmax(0,1fr); gap:6px 20px; align-items:start; }
.pg-editorial .pd-rh { display:block; text-align:left; border:0; background:none; font:inherit; font-weight:700; font-size:.95rem; color:var(--cg-primary,#051C2C); padding:2px 0; cursor:pointer; min-height:44px; overflow-wrap:anywhere; border-radius:4px; }
.pg-editorial .pd-counts { display:none; font-size:.78rem; color:var(--cg-ink,#374151); margin:2px 0 0; line-height:1.5; }
.pg-editorial .pd-counts b { font-variant-numeric:tabular-nums; color:var(--cg-primary,#051C2C); }
.pg-editorial .pd-counts span { display:block; white-space:nowrap; }
.pg-editorial .pd-row:hover .pd-counts, .pg-editorial .pd-row.open .pd-counts { display:block; }
.pg-editorial .pd-grid { display:flex; flex-wrap:wrap; gap:var(--pd-gap); list-style:none; margin:0; padding:0; }
.pg-editorial .pd-grid li { display:block; margin:0 0 8px; }
.pg-editorial .pd-more { grid-column:2; margin:0; font-size:.82rem; }

.pg-editorial .pd-pair { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:40px; margin-top:18px; align-items:start; }
.pg-editorial .pg-attention { margin:0; }
.pg-editorial .pd-att { border-bottom:1px solid var(--cg-border,#E5E7EB); }
.pg-editorial .pd-asum { display:flex; align-items:center; gap:12px; min-height:56px; cursor:pointer; list-style:none; padding:4px 0; }
.pg-editorial .pd-asum::-webkit-details-marker { display:none; }
.pg-editorial .pd-asum b { font-size:.95rem; white-space:nowrap; }
.pg-editorial .pd-asum::after { content:""; width:8px; height:8px; border-right:2px solid var(--cg-primary,#051C2C); border-bottom:2px solid var(--cg-primary,#051C2C); transform:rotate(45deg); margin-left:auto; margin-right:6px; flex:none; }
.pg-editorial .pd-att[open] .pd-asum::after { transform:rotate(-135deg); }
.pg-editorial .pd-ini { display:flex; flex-wrap:wrap; gap:4px; }
.pg-editorial .pd-ini i { display:grid; place-items:center; min-width:26px; height:26px; box-sizing:border-box; padding:0 3px; border:1.5px solid var(--cg-primary,#051C2C); border-radius:50%; font:700 .6rem Montserrat,sans-serif; font-style:normal; letter-spacing:.02em; background:#fff; }
.pg-editorial .pd-alist { list-style:none; margin:0; padding:0; border-top:1px solid var(--cg-primary,#051C2C); }
.pg-editorial .pd-arow { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:12px; align-items:center; min-height:44px; border-bottom:1px solid var(--cg-border,#E5E7EB); font-size:.88rem; }
.pg-editorial .pd-arow:last-child { border-bottom:0; }
.pg-editorial .pd-nm { font-weight:700; overflow-wrap:anywhere; }
.pg-editorial .pd-rs { color:var(--cg-ink,#374151); font-size:.82rem; white-space:nowrap; }
.pg-editorial .pd-act form { margin:0; }
.pg-editorial .pd-actbtn { display:inline-flex; align-items:center; min-height:44px; padding:0 2px; background:none; border:0; font:inherit; font-size:.88rem; color:var(--cg-primary-text,#051C2C); text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.pg-editorial .pd-cap { font-size:.78rem; font-weight:700; margin:0 0 6px; }
.pg-editorial .pd-strip { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; border-bottom:1px solid var(--cg-primary,#051C2C); height:132px; }
.pg-editorial .pd-col { display:flex; flex-direction:column; justify-content:flex-end; height:100%; min-width:0; }
.pg-editorial .pd-num { font-size:.85rem; font-weight:700; text-align:center; font-variant-numeric:tabular-nums; margin-bottom:3px; }
.pg-editorial .pd-num.z { font-weight:400; color:var(--cg-muted,#686e79); }
.pg-editorial .pd-colbar { position:relative; box-sizing:border-box; border:1.5px solid var(--cg-primary,#051C2C); border-bottom:0; background:#fff; min-height:3px; }
.pg-editorial .pd-colbar i { position:absolute; left:0; right:0; bottom:0; background:var(--cg-primary,#051C2C); }
.pg-editorial .pd-days { display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-top:5px; font-size:.75rem; text-align:center; color:var(--cg-ink,#374151); }

.pg-editorial .pd-info { border:1px solid var(--cg-border,#E5E7EB); border-radius:var(--cg-radius,6px); padding:6px 16px 14px; margin:6px 0 10px; font-size:.85rem; background:var(--cg-light,#F3F3F3); }
.pg-editorial .pd-info[hidden] { display:none; }
.pg-editorial .pd-info h3 { font-size:.8rem; margin:12px 0 4px; }
.pg-editorial .pd-info p { margin:4px 0; color:var(--cg-ink,#374151); }
.pg-editorial .pd-legend { display:flex; flex-wrap:wrap; gap:6px 18px; margin:6px 0 4px; padding:0; list-style:none; }
.pg-editorial .pd-legend li { display:flex; gap:7px; align-items:center; }
.pg-editorial .pd-links { display:flex; flex-wrap:wrap; gap:0 18px; align-items:center; }
.pg-editorial .pd-links p { margin:0; }
.pg-editorial .pd-cohort { display:flex; align-items:center; gap:.5rem; margin:0; min-width:0; max-width:100%; }
.pg-editorial .pd-cohort select { min-height:44px; padding:6px 8px; border:1px solid var(--cg-input-border,#80868f); border-radius:var(--cg-radius,6px); font:inherit; background:#fff; color:var(--cg-primary-text,#051C2C); max-width:100%; min-width:0; }
.pg-editorial .pd-defs { margin:.75rem 0 0; }
.pg-editorial .pd-defs > summary { cursor:pointer; min-height:44px; display:flex; align-items:center; text-decoration:underline; text-underline-offset:3px; }
.pg-editorial .pd-defs ol { margin:0; padding-left:1.2rem; }
.pg-editorial .pd-defs li { margin:0 0 .5rem; overflow-wrap:anywhere; }
.pg-editorial .pd-info .pg-expiry { margin:.75rem 0 0; }
.pg-editorial .pd-info .pg-people-detail { background:#fff; padding:0 .75rem; }
@media (prefers-reduced-motion:no-preference) { .pg-editorial .pd-cell { transition:transform .12s ease-out; } .pg-editorial .pd-cell:hover { transform:translateY(-2px); } }
@media (max-width:820px) { .pg-editorial .pd-pair { grid-template-columns:minmax(0,1fr); gap:22px; } }
@media (max-width:640px) {
  .pg-editorial .pd { --pd-cell:20px; --pd-gap:3px; }
  .pg-editorial .pd-key { gap:0 2px; width:100%; justify-content:space-between; flex-wrap:wrap; }
  .pg-editorial .pd-kb { font-size:.74rem; gap:4px; padding:0 1px; }
  .pg-editorial .pd-kb b { font-size:.85rem; }
  .pg-editorial .pd-mark { width:14px; height:14px; }
  .pg-editorial .pd-row { grid-template-columns:minmax(0,1fr); gap:2px; padding:10px 0 4px; }
  .pg-editorial .pd-rh { display:inline-block; }
  .pg-editorial .pd-counts { display:none; }
  .pg-editorial .pd-row.open .pd-counts, .pg-editorial .pd-row.open:hover .pd-counts { display:flex; flex-wrap:wrap; gap:0 10px; }
  .pg-editorial .pd-row:hover .pd-counts { display:none; }
  .pg-editorial .pd-counts span { display:inline; }
  .pg-editorial .pd-more { grid-column:1; }
  .pg-editorial .pd-tip { white-space:normal; width:150px; }
  .pg-editorial .pd-bar { margin-top:8px; }
}

@media (max-width:1199px) { .pg-editorial .ws-page { padding:0 1.5rem; } }
@media (max-width:767px) {
  .pg-editorial .ws-page { padding:0 1.25rem; }
  .pg-editorial .pg-expiry-wrap { overflow-x:visible; }
  .pg-editorial .pg-expiry-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
  .pg-editorial .pg-expiry-table, .pg-editorial .pg-expiry-table tbody, .pg-editorial .pg-expiry-table tr { display:block; width:100%; box-sizing:border-box; }
  .pg-editorial .pg-expiry-table tr { padding:.75rem 0; border-top:1px solid var(--cg-border); }
  .pg-editorial .pg-expiry-table tr.pg-detail-row { display:block; padding:0 0 .5rem; border-top:0; }
  .pg-editorial .pg-expiry-table .pg-detail-row td { display:block; }
  .pg-editorial .pg-expiry-table tbody th { display:block; width:100%; padding:.1rem 0 .4rem; font-size:1rem; }
  .pg-editorial .pg-expiry-table td { display:flex; justify-content:space-between; align-items:baseline; gap:1rem; width:100%; box-sizing:border-box; padding:.2rem 0; border:0; white-space:normal; }
  .pg-editorial .pg-expiry-table td::before { content:attr(data-label); text-align:left; font-size:.82rem; color:var(--cg-muted,#686e79); font-weight:400; }
  .pg-editorial .pg-expiry-table td.pg-num { text-align:right; }
}

/* Question list stack-up panel (Refs #1000) */
  .qsu { margin: 1.25rem 0; padding: 0; border: 0; min-width: 0; }
  .qsu h3 { margin: 0 0 .35rem; font-size: 1rem; color: var(--cg-primary-text); }
  .qsu-headline { margin: 0 0 .25rem; font-size: 1.15rem; line-height: 1.4; color: var(--cg-primary-text); font-weight: 600; }
  .qsu-note { margin: 0 0 .5rem; font-size: .86rem; color: var(--cg-muted); }
  .qsu table { width: 100%; border-collapse: collapse; font-size: .88rem; margin: .75rem 0 0; font-variant-numeric: tabular-nums; }
  .qsu caption { text-align: left; font-weight: 600; color: var(--cg-primary-text); padding: 0 0 .3rem; }
  .qsu th, .qsu td { padding: .4rem .5rem; border-bottom: 1px solid var(--cg-border); text-align: left; vertical-align: top; }
  main.cg-main .qsu table thead th, main.cg-main .qsu table tr:first-child:not(:has(> td)) > th { background: none; color: var(--cg-muted); font-weight: 600; font-size: .78rem; text-transform: none; letter-spacing: normal; border-radius: 0; white-space: normal; border-bottom: 1px solid var(--cg-primary-text, #051C2C); padding: .4rem .5rem; }
  main.cg-main .qsu table tbody tr:nth-child(even) td, main.cg-main .qsu table tbody tr:nth-child(even) th { background: none; }
  main.cg-main .qsu table tbody tr:not(:first-child) th, main.cg-main .qsu table tbody th { font-weight: 400; color: inherit; background: none; text-transform: none; font-size: .88rem; letter-spacing: normal; }
  main.cg-main .qsu table thead th.qsu-n { text-align: right; }
  .qsu .qsu-n { text-align: right; white-space: nowrap; }
  .qsu .qsu-warn { margin: .75rem 0 0; font-size: .88rem; color: var(--cg-primary-text); }
  .qsu .qsu-warn strong { font-weight: 700; }
  .qsu-foot { margin: 1rem 0 0; padding: 0; list-style: none; font-size: .8rem; color: var(--cg-muted); }
  .qsu-foot li { margin: 0 0 .3rem; }
  @media (max-width: 767px) { .qsu th, .qsu td { padding: .35rem .3rem; } .qsu table { font-size: .84rem; } }

/* Time zone control in the footer (user-timezone DESIGN.md). */
footer.cg-footer .cg-tz { margin-top: 0.5rem; }
footer.cg-footer .cg-tz summary { cursor: pointer; padding: 0.4rem 0; }
footer.cg-footer .cg-tz .cg-tz-change { text-decoration: underline; }
footer.cg-footer .cg-tz-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.4rem 0; }
footer.cg-footer .cg-tz-form select { min-height: 2.25rem; max-width: 100%; }
footer.cg-footer .cg-tz-note { flex-basis: 100%; margin: 0; color: var(--cg-muted); }

/* Provisional-targets info icon: tooltip on hover and keyboard focus; icon only in print. */
.ds-info { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.1em; height: 1.1em; margin-left: .35em; border: 1px solid currentColor; border-radius: 50%; font: 600 .72em/1 Georgia, serif; font-style: italic; color: #6b7280; cursor: help; vertical-align: middle; }
.ds-info:hover, .ds-info:focus-visible { color: #1f2937; }
.ds-info::after { content: attr(data-tip); display: none; position: absolute; left: 50%; top: calc(100% + .4rem); transform: translateX(-50%); z-index: 20; width: max-content; max-width: 18rem; padding: .45rem .6rem; border-radius: 6px; background: #1f2937; color: #fff; font: 400 .8rem/1.35 system-ui, sans-serif; font-style: normal; text-align: left; }
.ds-info:hover::after, .ds-info:focus::after { display: block; }
@media print { .ds-info::after { display: none !important; } }
