/* Patrol Ready — Agency Readiness OS
   Design system: Patrol Brief light register (leadership-facing B2B).
   Tokens aligned to the Patrol Brief website handoff; dashboard patterns
   follow F-pattern hierarchy, KPI-first summary, scannable tables,
   skeleton loading, honest contextual indicators, and WCAG AA contrast. */

:root {
  /* Brand — Patrol Brief */
  --navy: #122345;
  --navy-deep: #0d1a31;
  --navy-2: #16294f;
  --navy-3: #1c355f;
  --gold: #fee780;
  --gold-deep: #c9a227;
  --sky: #17ade8;
  --link: #0f7fae;
  --link-body: #0f6f98;

  /* Surfaces */
  --bg: #f4f7fc;
  --panel: #ffffff;
  --surface: #f6f9fd;
  --surface-2: #eef3fa;
  --ink: #1b2430;
  --ink-2: #2c3949;
  --muted: #5d6878;
  /* Small text uses this (.cell-sub, timestamps, hints).  #8b95a4 was about
     3:1 on white.  This is 5.3:1 on white, 4.8:1 or better on the three
     surface tints, and 4.6:1 on the warn, bad, info and good fills over
     white, so 11-12px text meets WCAG AA there (review, 2026-11-10).  On a
     fill laid over the darkest tint it is about 4.1:1, as --muted is 4.4:1. */
  --faint: #616c7d;
  --line: #e2e8f1;
  --line-strong: #d3dced;
  --brand-primary: #122345;
  --brand-primary-text: #ffffff;
  --brand-text: #ffffff;
  --on-foreground: #ffffff;

  /* Semantic */
  --good: #1f9d55;
  --good-ink: #146c3b;
  --good-fill: rgba(31, 157, 85, .12);
  --warn: #b7791f;
  --warn-ink: #8a5a12;
  --warn-fill: rgba(183, 121, 31, .13);
  --bad: #c0392b;
  --bad-ink: #99271b;
  --bad-fill: rgba(192, 57, 43, .1);
  --info-fill: rgba(15, 127, 174, .1);

  /* Module signature accents */
  --m-dashboard: #0f7fae;
  --m-field: #3b7af5;
  --m-reviews: #b02a37;
  --m-policies: #22a855;
  --m-policymod: #099268;
  --m-documents: #0e9aa7;
  --m-standards: #c9a227;
  --m-peerbench: #5f3dc4;
  --m-training: #7c3aed;
  --m-deptevents: #0ea5e9;
  --m-readiness: #e8590c;
  --m-identity: #4f5bd5;
  --m-cmdintel: #b8860b;
  --m-copilot: #6741d9;
  --m-invest: #364fc7;
  --m-clery: #2b8a3e;
  --m-assistant: #0ca678;

  /* Scale */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --shadow-sm: 0 1px 2px rgba(18, 35, 69, .06);
  --shadow-md: 0 4px 16px rgba(18, 35, 69, .07), 0 1px 2px rgba(18, 35, 69, .05);
  --shadow-lg: 0 18px 48px rgba(18, 35, 69, .14);
  --ring: 0 0 0 3px rgba(15, 127, 174, .28);
  --sidebar-w: 256px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link-body); }
svg { flex: none; }
.icon { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.9; fill: none; stroke-linecap: round; stroke-linejoin: round; display: block; }
.icon-sm { width: 15px; height: 15px; }

/* Keyboard focus is a solid 2px outline: the translucent ring it replaces
   was hard to see on white and vanished on tinted rows (review, 2026-11-10).
   Text fields keep their own border-and-ring rule below. */
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; box-shadow: none; border-radius: var(--r-sm); }
.boot { padding: 40px; color: var(--muted); }

/* ---------- Boot loading screen ---------- */
#bootScreen {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1100px 640px at 50% 40%, var(--navy-2), var(--navy-deep));
  perspective: 900px;
  transition: opacity .55s ease;
}
#bootScreen.done { opacity: 0; pointer-events: none; }
.boot-stage { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.boot-flipper {
  position: relative; width: 220px; height: 220px;
  transform-style: preserve-3d;
  animation: bootSway 3.4s ease-in-out infinite;
  transition: transform .9s cubic-bezier(.45, -.05, .3, 1.15);
}
@keyframes bootSway {
  0%, 100% { transform: rotateY(-16deg) rotateX(5deg); }
  50%      { transform: rotateY(16deg) rotateX(-4deg); }
}
.boot-flipper.flipped { animation: none; transform: rotateY(180deg); }
.boot-flipper.expanded { transform: rotateY(180deg) scale(2.4); transition: transform .65s ease-in; }
.boot-face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.boot-front .boot-shield {
  width: 118px;
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, .5));
}
.boot-ring { position: absolute; inset: 0; animation: bootSpin 1.15s linear infinite; }
@keyframes bootSpin { to { transform: rotate(360deg); } }
.boot-back { transform: rotateY(180deg); }
/* Same lockup as pb-logo.jpg (1028x586 @ .307): jpg's shield, wordmark re-set as READY */
.boot-logo-card {
  position: relative; height: 180px; flex: none;
  display: flex; align-items: center;
  background: #132345; border-radius: 14px; overflow: hidden;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .55);
}
.boot-logo-shield { position: absolute; left: 0; top: 0; height: 100%; }
.boot-logo-word {
  position: relative; margin: 0 24px 0 101px;
  color: #fff; font-weight: 800; font-size: 34px; line-height: 1.18;
  letter-spacing: .04em;
}
.boot-caption {
  color: var(--gold); font-size: 12px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; opacity: .85;
  transition: opacity .3s ease;
}
#bootScreen.flipping .boot-caption { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .boot-flipper, .boot-ring { animation: none; }
  .boot-flipper.flipped, .boot-flipper.expanded { transition: none; }
}
.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; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-w) 1fr; }

/* ---------- Sidebar ---------- */
.side {
  background: linear-gradient(185deg, var(--navy-2) 0%, var(--navy) 46%, var(--navy-deep) 100%);
  color: #fff;
  padding: var(--sp-5) var(--sp-4) var(--sp-4);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  border-right: 1px solid rgba(0, 0, 0, .2);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px 2px; }
.brand-logo { height: 40px; width: auto; max-width: 118px; display: block; border-radius: 7px; }
.brand strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; line-height: 1.1; }
.brand span { display: block; color: #a9bdd8; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; margin-top: 3px; }
.mark { display: grid; place-items: center; }

.nav-rail { display: flex; flex: 1; min-width: 0; min-height: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; min-width: 0; margin: 0 -6px; padding: 0 6px; }
.nav:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nav::-webkit-scrollbar { width: 6px; height: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 999px; }
.nav-rail-control { display: none; }
.nav-group { color: #7f93b3; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; padding: 14px 10px 5px; }
.nav-group:first-child { padding-top: 2px; }
.nav button {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: var(--r-sm);
  padding: 9px 10px;
  background: transparent;
  color: #dbe6f5;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  transition: background .15s ease, color .15s ease;
}
.nav button .n-tile {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; flex: none;
  background: linear-gradient(140deg, color-mix(in srgb, var(--tile, #46608a) 88%, #fff) 0%, var(--tile, rgba(255, 255, 255, .1)) 45%, color-mix(in srgb, var(--tile, #46608a) 72%, #0d1a31) 100%);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 1px 3px rgba(0, 0, 0, .28);
}
.nav button .n-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav button:hover:not(:disabled) { background: rgba(255, 255, 255, .09); color: #fff; }
.nav button.active { background: rgba(255, 255, 255, .13); color: #fff; }
.nav button.active::before {
  content: ""; position: absolute; left: -6px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--gold);
}
.nav button:disabled { opacity: .48; cursor: not-allowed; }
.nav .lock { color: #92a4c2; }
.nav .lock .icon { width: 13px; height: 13px; }

.side-foot { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: var(--sp-3); display: grid; gap: 8px; }
.env-chip {
  display: inline-flex; align-items: center; gap: 7px; align-self: start;
  background: rgba(254, 231, 128, .14); color: var(--gold);
  border: 1px solid rgba(254, 231, 128, .3);
  border-radius: var(--r-pill); padding: 4px 10px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
}
.side-foot .tenant { color: #a9bdd8; font-size: 12px; padding: 0 4px; }
.side-foot .tenant b { color: #fff; font-weight: 700; }
.platform-admin-context {
  display: grid; gap: 5px; min-width: 0; margin: 4px 0;
  padding: 11px 12px; border: 1px solid rgba(254, 231, 128, .28);
  border-radius: var(--r-sm); background: rgba(254, 231, 128, .06);
  color: #fff; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere;
}
.platform-admin-label { color: var(--gold); font-weight: 800; font-size: 11px; }
.platform-admin-kind { color: #b9cbe3; font-size: 11px; }
.platform-admin-context summary { color: #e3ebf8; cursor: pointer; margin-top: 3px; }
.platform-enclave-links { display: grid; gap: 7px; padding-top: 9px; }
.platform-enclave-links a { color: #f6e4a4; font-size: 11px; line-height: 1.4; }

/* ---------- Main ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 12;
  display: flex; gap: var(--sp-4); justify-content: space-between; align-items: center;
  padding: 16px 28px;
  background: rgba(244, 247, 252, .82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { color: var(--navy); font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
.topbar .sub { color: var(--muted); margin: 3px 0 0; font-size: 13.5px; max-width: 64ch; }
.top-right { display: flex; align-items: center; gap: var(--sp-4); }
.freshness { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12px; font-weight: 600; white-space: nowrap; }
.freshness .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-fill); }
/* A module shown from the last answer offers the newer one (2026-10-06). */
.fresh-refresh { min-height: 28px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 12px; background: var(--panel); color: var(--link); font: inherit; font-weight: 700; cursor: pointer; }
.fresh-refresh:hover, .fresh-refresh:focus-visible { border-color: var(--link); }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, var(--navy-3), var(--navy)); box-shadow: var(--shadow-sm);
}
.user-meta { line-height: 1.25; text-align: right; }
.user-meta b { display: block; color: var(--ink); font-size: 13px; font-weight: 700; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { display: block; color: var(--faint); font-size: 11px; }

.module-stage { position: relative; flex: 1; min-width: 0; }
.content { padding: 24px 28px 40px; width: 100%; max-width: 1220px; }
.module-loading-overlay {
  position: absolute; inset: 0; z-index: 10;
  padding: 24px 28px 40px;
  background: var(--bg);
}
.module-loading-overlay[hidden] { display: none; }
.module-loading-overlay .resource-loader { width: 100%; max-width: 1164px; }
/* Wide desktops: the page fills the window instead of stopping at 1220px
   beside a blank band (2026-10-06, a 2000px screen). Narrower screens never
   reach this width, so tablet and phone layouts are unchanged. */
@media (min-width: 1480px) {
  .content { max-width: none; }
  .module-loading-overlay .resource-loader { max-width: none; }
  /* Policy text (Manual reader, Studio text view) widens with the page but
     stays a centered column instead of running edge to edge (Tim). */
  .policy-text { max-width: 1320px; margin-left: auto; margin-right: auto; }
}
.stack { display: grid; gap: var(--sp-4); }
.section-gap { margin-top: var(--sp-4); }

/* ---------- KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
.stat {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 16px 16px 15px; box-shadow: var(--shadow-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.stat::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent, var(--link)); }
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat .s-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .s-label { color: var(--muted); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.stat .s-ico {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  color: var(--accent, var(--link));
  background: color-mix(in srgb, var(--accent, var(--link)) 13%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent, var(--link)) 22%, #fff);
}
.stat .s-ico .icon { width: 17px; height: 17px; }
.stat .s-value { color: var(--navy); font-size: 32px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; margin-top: 12px; overflow-wrap: anywhere; }
.stat .s-sub { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; margin-top: 7px; }
.s-status { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 12px; padding: 1px 0; }
.s-status .dot { width: 8px; height: 8px; border-radius: 50%; }
.s-status.good { color: var(--good-ink); } .s-status.good .dot { background: var(--good); }
.s-status.warn { color: var(--warn-ink); } .s-status.warn .dot { background: var(--warn); }
.s-status.bad { color: var(--bad-ink); } .s-status.bad .dot { background: var(--bad); }

/* ---------- Tachometer gauges (dashboard KPIs) ---------- */
.gauge-card { display: flex; flex-direction: column; }
.g-wrap { position: relative; margin: 6px auto 0; width: min(100%, 190px); }
.g-svg { display: block; width: 100%; height: auto; }
.g-zone { fill: none; stroke-linecap: butt; }
.g-track { fill: none; stroke: var(--surface-2); }
.g-prog { fill: none; stroke-linecap: round; }
.g-tick { stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round; }
.g-tick.major { stroke: var(--faint); }
@keyframes gsweep { from { transform: rotate(0deg); } }
.g-needle {
  transform-origin: 100px 104px;
  transform: rotate(var(--sweep, 0deg));
  animation: gsweep 1s cubic-bezier(.25, .9, .3, 1.05);
}
.g-value {
  margin-top: 2px; text-align: center;
  color: var(--navy); font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.gauge-card .s-sub { justify-content: center; margin-top: 9px; }

/* ---------- Upload drop zone + file chips ---------- */
.drop {
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); padding: 18px 16px; text-align: center;
  color: var(--muted); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.drop:hover, .drop.over { border-color: var(--link); background: var(--info-fill); }
.drop .d-ico {
  width: 38px; height: 38px; border-radius: 10px; margin: 0 auto 8px;
  display: grid; place-items: center; color: var(--link);
  background: color-mix(in srgb, var(--link) 12%, #fff);
}
.drop b { display: block; color: var(--ink); font-size: 13.5px; font-weight: 700; }
.drop p { margin: 3px 0 0; font-size: 12px; }
.drop input[type="file"] { display: none; }
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.file-chip {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 5px 7px 5px 11px; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}
.file-chip .fc-name { max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .fc-size { color: var(--faint); font-weight: 500; }
.file-chip button {
  border: 0; background: transparent; color: var(--faint); display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%; padding: 0;
}
.file-chip button:hover { background: var(--bad-fill); color: var(--bad-ink); }
.file-chip .icon { width: 13px; height: 13px; }

/* ---------- Panels / cards ---------- */
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--sp-4); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); align-items: start; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.panel.pad { padding: 18px; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: 15px 18px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; color: var(--navy); font-size: 15px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.panel-head .ph-ico { color: var(--accent, var(--link)); display: grid; place-items: center; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.panel .stack { padding: 18px; }
h3.sub-h { margin: 0 0 10px; color: var(--navy); font-size: 13.5px; font-weight: 800; }

.source { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 13px 14px; background: var(--surface); }
.source b { color: var(--navy); font-size: 14px; }
.source .cite { color: var(--link-body); font-size: 12px; font-weight: 700; }
.source p { margin: 8px 0 0; color: var(--ink-2); font-size: 13.5px; }

.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mini { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; background: var(--surface); }
.mini b { display: block; color: var(--navy); font-size: 17px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.mini span { display: block; color: var(--muted); font-size: 10.5px; font-weight: 800; margin-top: 5px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Module cards (dashboard) ---------- */
.mod-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mod-card {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px; box-shadow: var(--shadow-sm);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.mod-card:not(:disabled):hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.mod-card:disabled { opacity: .62; cursor: not-allowed; }
.mod-card .m-tile {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent, var(--link)) 82%, #fff) 0%, var(--accent, var(--link)) 46%, color-mix(in srgb, var(--accent, var(--link)) 76%, #0d1a31) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), 0 2px 5px color-mix(in srgb, var(--accent, var(--link)) 32%, transparent);
}
.mod-card .m-tile .icon { width: 18px; height: 18px; }
.mod-card .m-body { min-width: 0; flex: 1; }
.mod-card .m-body b { display: block; color: var(--navy); font-size: 14px; font-weight: 700; }
.mod-card .m-body p { margin: 3px 0 9px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.mod-card .m-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Tables ---------- */
.tbl-wrap {
  overflow-x: auto;
  /* Scroll shadows: edge hints appear only while columns extend off-screen. */
  background:
    linear-gradient(90deg, var(--panel) 40%, transparent) left / 28px 100% no-repeat local,
    linear-gradient(-90deg, var(--panel) 40%, transparent) right / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(15, 30, 60, .16), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(15, 30, 60, .16), transparent) right / 12px 100% no-repeat scroll;
}
/* Explicit swipe cue for narrow screens where table columns clip. */
.tbl-scroll-hint { display: none; }
@media (max-width: 620px) {
  .tbl-scroll-hint {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px 0; color: var(--faint); font-size: 12px; font-weight: 600;
  }
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; padding: 10px 14px; background: var(--surface-2);
  color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--line);
}
tbody td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink-2); }
tbody tr:last-child td { border-bottom: 0; }
td b, td strong { color: var(--navy); font-weight: 700; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
tr.click { cursor: pointer; transition: background .12s ease; }
tr.click:hover td { background: var(--surface); }
.cell-sub { display: block; color: var(--faint); font-size: 12px; font-weight: 500; margin-top: 2px; }

/* progress bar inside cells */
.bar { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; min-width: 90px; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--good); }
.bar.warn > span { background: var(--warn); }
.bar.bad > span { background: var(--bad); }
.bar-wrap { display: flex; align-items: center; gap: 10px; }
.bar-wrap .pct { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); min-width: 40px; text-align: right; font-size: 13px; }

/* ---------- Pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--r-pill); padding: 3px 10px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { color: var(--good-ink); background: var(--good-fill); }
.pill.warn { color: var(--warn-ink); background: var(--warn-fill); }
.pill.bad { color: var(--bad-ink); background: var(--bad-fill); }
.pill.info { color: var(--link); background: var(--info-fill); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--navy); background: var(--navy); color: var(--brand-text, #fff);
  border-radius: var(--r-sm); padding: 9px 14px; font-weight: 700; font-size: 14px;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.btn:hover:not(:disabled) { background: var(--navy-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn.gold:hover:not(:disabled) { background: #ffdf5c; border-color: #ffdf5c; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--line-strong); }
.btn.ghost:hover:not(:disabled) { background: var(--surface); border-color: var(--muted); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .icon { width: 16px; height: 16px; }
.btn-back { color: var(--muted); background: transparent; border-color: transparent; padding-left: 4px; }
.btn-back:hover:not(:disabled) { color: var(--navy); background: var(--surface); }

/* ---------- Forms ---------- */
label { display: block; color: var(--navy); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 10px 12px; background: var(--panel); color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type="checkbox"] { width: 16px; height: 16px; padding: 0; flex: 0 0 auto; accent-color: var(--navy); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--link); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
.field-2 { grid-column: span 2; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row .grow { flex: 1 1 220px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .grow { flex: 1 1 260px; }

.diff {
  margin: 0; max-height: 320px; overflow: auto; white-space: pre-wrap;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #0d1a31; color: #cfe0f5;
  padding: 14px; font-size: 12.5px; font-family: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, monospace; line-height: 1.55;
}
.notice { border: 1px solid #cfe3ef; background: var(--info-fill); color: #285567; border-radius: var(--r-sm); padding: 11px 13px; font-size: 13px; }
.notice b { color: var(--link-body); }
.error { color: var(--bad-ink); font-weight: 600; font-size: 13.5px; }
.muted { color: var(--muted); }

/* Inline spinner for in-flight buttons / actions */
@keyframes spin { to { transform: rotate(360deg); } }
.spin {
  display: inline-block; width: 13px; height: 13px; flex: none;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
  animation: spin .6s linear infinite; vertical-align: -2px;
}

/* ---------- Empty & skeleton ---------- */
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty .e-ico { width: 46px; height: 46px; border-radius: 12px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--faint); }
.empty .e-ico .icon { width: 22px; height: 22px; }
.empty b { display: block; color: var(--ink); font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.empty p { margin: 0 auto; font-size: 13px; max-width: 42ch; }
td .empty { padding: 26px 12px; }

@keyframes shimmer { 100% { background-position: -200% 0; } }
.sk { border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, #e6edf6 37%, var(--surface-2) 63%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.sk-stat { height: 118px; border-radius: var(--r-md); }
.sk-line { height: 13px; margin: 9px 0; }
.sk-row { height: 44px; margin: 0; border-radius: 0; border-bottom: 1px solid var(--line); background-size: 200% 100%; }
.sk-block { height: 240px; border-radius: var(--r-md); }

/* The shell uses the same shield-and-gold-ring cue as Patrol Ready boot while
   any module's initial resources are fetched. */
.resource-loader {
  min-height: 230px; padding: 38px;
  display: flex; align-items: center; justify-content: center; gap: 24px;
  color: var(--muted);
}
.resource-loader b { display: block; color: var(--navy); font-size: 18px; margin-bottom: 5px; }
.resource-loader p { margin: 0; font-size: 13.5px; }
.resource-loader-mark {
  position: relative; width: 78px; height: 78px; flex: 0 0 78px;
  display: grid; place-items: center;
}
.resource-loader-mark img { position: relative; z-index: 1; width: 42px; max-height: 58px; object-fit: contain; }
.resource-loader-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--gold) 20%, transparent);
  border-top-color: var(--gold); border-right-color: var(--gold);
  animation: spin 1s linear infinite;
}
@media (max-width: 600px) {
  .resource-loader { min-height: 210px; padding: 30px 20px; flex-direction: column; text-align: center; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .resource-loader-ring { animation: none; }
}

/* ---------- Disclosure rows ----------
   Every <details> row draws its keyboard focus ring INSIDE the summary. The
   report bands and cards clip their overflow, which cut the shared outer
   box-shadow ring away entirely (PD-2026-10-07-01). */
details > summary:focus-visible,
.cov-band > summary:focus-visible,
.full-report-law > summary:focus-visible,
.pa-closest > summary:focus-visible,
.op-card > summary:focus-visible {
  outline: 2px solid var(--link); outline-offset: -2px; box-shadow: none;
}

/* ---------- Login ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-brand {
  background: linear-gradient(180deg, var(--navy-2), var(--navy) 55%, var(--navy-deep));
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand .a-top { display: flex; align-items: center; gap: 12px; }
.auth-brand h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 12px; max-width: 15ch; }
.auth-brand p { color: #c3d3e8; font-size: 15px; max-width: 40ch; margin: 0; }
.auth-feats { display: grid; gap: 12px; margin-top: 26px; }
.auth-feat { display: flex; gap: 11px; align-items: center; color: #dbe6f5; font-size: 14px; font-weight: 600; }
.auth-feat .af-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: var(--gold); }
.auth-foot { color: #8ea3c2; font-size: 12px; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: var(--bg); }
.login { width: 100%; max-width: 400px; }
.login h1 { color: var(--navy); font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 5px; }
.login > p { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.login .stack { gap: 14px; }
/* Product, surface and agency above the form. Shown only where the brand
   column is hidden (phones and narrow tablets), so the sign-in card always
   says which origin and agency it is. */
.auth-id { display: none; align-items: center; gap: 12px; margin: 0 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.auth-id .brand-logo { height: 36px; }
.auth-id-text { min-width: 0; }
.auth-id-text strong { display: block; color: var(--navy); font-size: 16px; font-weight: 800; letter-spacing: -.01em; line-height: 1.15; }
.auth-id-surface { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.auth-id-agency { display: block; margin-top: 6px; color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.3; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.divider::before, .divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

/* ---------- Toast ---------- */
.toast-host { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 40; }
.toast-msg { display: flex; align-items: center; gap: 9px; background: var(--navy); color: #fff; border-radius: var(--r-sm); padding: 11px 14px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; animation: toast-in .22s ease; max-width: 340px; }
.toast-msg .icon { color: var(--gold); }
.scan-notice { width: min(340px, calc(100vw - 32px)); background: var(--navy); color: #fff; border: 1px solid var(--gold); border-radius: var(--r-sm); padding: 13px 14px; box-shadow: var(--shadow-lg); display: grid; gap: 7px; font-size: 13px; animation: toast-in .22s ease; }
.scan-notice b { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.scan-notice b .icon { color: var(--gold); }
.scan-notice-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.scan-notice-actions .btn { color: #fff; border-color: rgba(255,255,255,.45); }
.scan-notice-actions .btn:hover { background: rgba(255,255,255,.14); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .grid-2, .grid-3, .mod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: max-content minmax(0, 1fr);
    align-content: start;
    width: 100%; min-width: 0;
  }
  .side {
    position: sticky; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap;
    gap: 8px; padding: 12px 16px; width: 100%; min-width: 0; max-width: 100vw; overflow: hidden;
    align-self: start;
  }
  .main { min-height: 0; }
  .brand { flex: 1; padding: 0; }
  .nav-rail { flex: 1 1 100%; width: 100%; min-width: 0; align-items: center; gap: 5px; }
  .nav {
    flex-direction: row; overflow-x: auto; overflow-y: hidden; flex: 1 1 auto;
    width: auto; min-width: 0; max-width: 100%; margin: 0; padding: 4px;
    gap: 6px; overscroll-behavior-inline: contain; scroll-padding-inline: 20px;
    scroll-snap-type: x mandatory; scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  /* A pill straddling the scroller edge was hard-cut mid-word ("idio",
     "ompliance"), reading as a broken label. Fade the clipped side instead so
     a partial pill reads as more-content-this-way; the snapped/selected pill
     stays fully visible inside the gutter. The rail-at-* classes come from
     updateModuleRailControls so a fully-scrolled edge never fades a complete
     first/last label. */
  .nav-rail.has-overflow .nav {
    -webkit-mask-image: linear-gradient(to right,
        transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to right,
        transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  }
  .nav-rail.has-overflow.rail-at-start .nav {
    -webkit-mask-image: linear-gradient(to right,
        #000 0, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to right,
        #000 0, #000 calc(100% - 22px), transparent 100%);
  }
  .nav-rail.has-overflow.rail-at-end .nav {
    -webkit-mask-image: linear-gradient(to right,
        transparent 0, #000 22px, #000 100%);
    mask-image: linear-gradient(to right,
        transparent 0, #000 22px, #000 100%);
  }
  .nav-rail.has-overflow.rail-at-start.rail-at-end .nav {
    -webkit-mask-image: none;
    mask-image: none;
  }
  /* `.side`-prefixed so these beat the base rules that come later in the
     file (the cascade ignores media blocks; specificity decides). */
  .nav-group, .side .side-tenant { display: none; }
  /* The user card moves into the top strip (sign out and change password
     must stay reachable on phones); its menu drops DOWN from there. */
  .side-foot { border-top: 0; padding-top: 0; display: flex; align-items: center; gap: 8px; order: 2; margin-left: auto; }
  .side-foot .env-chip { display: none; }
  .brand { order: 1; }
  .nav-rail { order: 3; }
  .side .platform-admin-context { order: 3; flex: 1 1 100%; margin: 0; }
  .platform-admin-shell .nav-rail { order: 4; }
  .side .side-user { width: auto; padding: 4px; }
  .side .side-user .user-meta, .side .side-user > .icon { display: none; }
  /* Fixed, not absolute: .side clips overflow in the compact strip, which
     cut the bottom of the dropped menu at phone width (review P2). */
  .side .user-menu { position: fixed; bottom: auto; top: 60px; left: auto; right: 12px; min-width: 210px; z-index: 80; }
  .nav button {
    width: auto; flex: 0 0 auto; border-radius: var(--r-pill);
    scroll-snap-align: center; scroll-snap-stop: always;
  }
  .nav button .n-label { max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; }
  .nav-rail-control {
    display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px;
    padding: 0; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%;
    background: rgba(255, 255, 255, .1); color: #fff;
  }
  .nav-rail-control:hover:not(:disabled), .nav-rail-control:focus-visible { background: rgba(255, 255, 255, .18); }
  .nav-rail-control:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
  .nav-rail-control:disabled { opacity: .34; cursor: default; }
  .nav-rail:not(.has-overflow) .nav-rail-control { visibility: hidden; }
  .nav button.active::before { left: 6px; right: 6px; top: auto; bottom: -3px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-id { display: flex; }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 18px 16px 32px; }
  .module-loading-overlay { padding: 18px 16px 32px; }
  .topbar { padding: 14px 16px; }
}
@media (max-width: 560px) {
  .kpi-grid, .grid-2, .grid-3, .mod-grid, .mini-grid, .form-grid { grid-template-columns: 1fr; }
  .field-2 { grid-column: auto; }
  .user-meta { display: none; }
  /* Phone topbar: the view title gets one lean line and the description
     moves out of the sticky bar (each panel repeats its own description),
     so the heading never crowds the account controls at 319-390px. */
  .topbar { gap: 8px; padding: 10px 12px; }
  .topbar > div:first-child { min-width: 0; }
  .topbar h1 { font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar .sub { display: none; }
  .topbar .avatar { display: none; }
  .user-chip { gap: 6px; }
  .top-right { gap: 8px; flex: none; }
  .freshness { display: none; }
  /* Phones keep only the Refresh button or the short failure note, so the
     title is never squeezed out. */
  .freshness.has-refresh { display: inline-flex; }
  .freshness.has-refresh .fresh-long { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Provider operating-scale workspaces ---------- */
.op-stack { display: grid; gap: 12px; }
.op-card { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); overflow: hidden; }
.op-card > summary { list-style: none; cursor: pointer; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--navy); background: var(--surface); }
.op-card > summary::-webkit-details-marker { display: none; }
.op-card > summary span { min-width: 0; }
.op-card > summary b { display: block; font-size: 14px; }
.op-card > summary small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 500; }
.op-card > summary .icon { transition: transform .16s ease; flex: none; }
.op-card[open] > summary .icon { transform: rotate(180deg); }
.op-card-body { border-top: 1px solid var(--line); padding: 14px; }
.op-actions { margin-top: 14px; }
.op-link-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.op-link-grid a { display: grid; gap: 3px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; background: var(--surface); color: var(--ink-2); text-decoration: none; }
.op-link-grid a:hover { border-color: var(--link); box-shadow: var(--shadow-sm); }
.op-link-grid b { color: var(--navy); font-size: 13px; }
.op-link-grid span { color: var(--muted); font-size: 11.5px; }
.op-link-grid .icon { width: 12px; height: 12px; vertical-align: -2px; }
.btn.danger { background: var(--ink); border-color: var(--ink); color: var(--on-foreground); }
.op-inline-select { width: auto; min-width: 180px; }
.op-fieldset { margin: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
.op-fieldset legend { color: var(--navy); font-size: 12px; font-weight: 700; padding: 0 5px; }
.op-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.op-check-grid label, .op-check { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--ink-2); font-size: 13px; }
.op-list { margin: 8px 0 0; padding-left: 22px; color: var(--ink-2); }
.op-list li { margin: 6px 0; }
.op-sow-title { margin: 0 0 8px; color: var(--navy); }
.op-comments { display: grid; gap: 10px; }
.op-comment { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px; background: var(--surface); }
.op-comment > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.op-comment b { color: var(--navy); font-size: 13px; }
.op-comment span { color: var(--faint); font-size: 11px; }
.op-comment p { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.op-artifact { display: block; width: 100%; min-height: 620px; border: 0; background: #fff; }
.op-selected td { background: var(--info-fill); }
.op-hash { display: block; max-width: 34ch; overflow-wrap: anywhere; font-family: "SF Mono", ui-monospace, monospace; font-size: 11px; }
.op-timeline { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.op-timeline li { border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 10px; background: var(--surface); font-size: 12px; }
.op-timeline li b { color: var(--navy); margin-right: 6px; }
.op-timeline li span { color: var(--muted); }
.brand-preview { border: 1px solid color-mix(in srgb, var(--preview-primary) 32%, transparent); border-radius: var(--r-md); overflow: hidden; background: var(--preview-bg); color: var(--preview-fg); }
.brand-preview-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px; background: var(--preview-primary); color: var(--preview-primary-text); }
.brand-preview-head > div { display: grid; }
.brand-preview-head span { font-size: 12px; opacity: .82; }
.brand-preview-mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 10px; font-weight: 800; }
.brand-preview-logo { width: auto; max-width: 150px; height: 42px; object-fit: contain; border-radius: 8px; }
.brand-preview-body { padding: 18px; }
.brand-preview-body p { margin: 6px 0 14px; }
.brand-preview-body button { border: 0; border-radius: var(--r-sm); padding: 9px 13px; background: var(--preview-primary); color: var(--preview-primary-text); font-weight: 700; }
@media (max-width: 620px) {
  .op-link-grid { grid-template-columns: 1fr; }
  .op-check-grid { grid-template-columns: 1fr; }
  .op-comment > div { display: grid; }
  .op-artifact { min-height: 480px; }
}

/* AI Intelligence Platform surfaces (v2 plan) — two-column detail layout */
.intel-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); align-items: start; }
@media (max-width: 980px) { .intel-cols { grid-template-columns: 1fr; } }
.intel-cols > div > .panel + .section-gap { margin-top: var(--sp-4); }
details.source summary::-webkit-details-marker { display: none; }
details.source summary { list-style: none; }
details.source[open] summary { margin-bottom: 8px; }

/* Sample suggestion cards: dashed border + muted wash so an illustration can
   never be mistaken for a real, actionable suggestion. */
.sg-sample { border: 1px dashed var(--line-2, var(--line)); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface); }

/* ── Policy Assistant: formatted answers + citation cards ────────────────── */
.answer-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.answer-prose { color: var(--ink); font-size: 14.5px; line-height: 1.6; }
.answer-prose p { margin: 0 0 10px; }
.answer-prose h2.md-h, .answer-prose h3.md-h, .answer-prose h4.md-h { color: var(--navy); margin: 14px 0 6px; font-weight: 800; }
.answer-prose h2.md-h { font-size: 16px; } .answer-prose h3.md-h { font-size: 14.5px; }
.answer-prose ol.md-list, .answer-prose ul.md-list { margin: 4px 0 12px; padding-left: 22px; }
.answer-prose ol.md-list > li, .answer-prose ul.md-list > li { margin: 5px 0; padding-left: 3px; }
.answer-prose code { background: var(--surface-2); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.md-quote { border-left: 3px solid var(--gold-deep); background: var(--surface); margin: 8px 0; padding: 8px 12px; color: var(--ink-2); border-radius: 0 6px 6px 0; font-size: 13.5px; }
.cite-list { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.cite-list-head { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.cite-card { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--panel); }
.cite-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.cite-head b { color: var(--navy); font-size: 14px; }
.cite-idx { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--m-assistant, #0ca678); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.cite-foot { display: flex; gap: 16px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--faint); }
.cite-open { font-weight: 700; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pa-context { max-width: 900px; margin: 24px auto 0; }
.pa-context .cite-list-head { justify-content: center; text-align: center; }
.pa-context-note { margin: 0 0 12px; color: var(--muted); font-size: 13px; text-align: center; }
.pa-context-list { list-style: none; padding: 0; margin: 0; }
.pa-context-list > li + li { border-top: 1px solid var(--line); }
.pa-context-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 12px; border-radius: 6px; color: var(--link); }
.pa-context-link:hover { background: var(--surface-2); }
.pa-context-link:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.pa-context-title { display: flex; align-items: flex-start; gap: 8px; min-width: 0; font-size: 14px; font-weight: 650; }
.pa-context-title > span { overflow-wrap: anywhere; }
.pa-context-title > svg { flex-shrink: 0; margin-top: 2px; }
.pa-context-open { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; font-size: 12px; }
@media (max-width: 600px) {
  .pa-context-link { align-items: flex-start; flex-direction: column; gap: 6px; }
  .pa-context-open { margin-left: 24px; }
}
/* Every candidate answer, for the officer to choose (2026-10-06) */
.pa-alts .cite-head { gap: 8px; }
.pa-alt-where { color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.pa-alts .cite-foot { flex-wrap: wrap; gap: 10px 16px; }
.pa-alts-rest[hidden] { display: none; }
.pa-not-right { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; }
.pa-not-right .btn { min-height: 44px; }
.pa-learned-qs { margin: 6px 0 0; padding-left: 18px; }
.pa-learned-qs li { margin: 4px 0; color: var(--ink-2); font-size: 13px; }
.pa-learned-qs li .cell-sub { display: inline; margin-left: 6px; }

/* ── Policy Modernization: stat chips, controls, finding cards ───────────── */
.stat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.stat-chip { background: var(--surface-2); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.stat-chip b { color: var(--ink); font-weight: 800; }
.stat-chip.bad { background: var(--bad-fill); color: var(--bad-ink); } .stat-chip.bad b { color: var(--bad-ink); }
.stat-chip.warn { background: var(--warn-fill); color: var(--warn-ink); } .stat-chip.warn b { color: var(--warn-ink); }
.stat-chip.info { background: var(--info-fill); color: var(--link); } .stat-chip.info b { color: var(--link); }
.pm-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.pm-ctl { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.pm-ctl select { min-width: 150px; }
.pm-count { padding: 10px 16px 0; margin: 0; color: var(--muted); }
.find-card { border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: 10px; padding: 13px 15px; margin: 12px 16px 0; background: var(--panel); }
.find-card.sev-high { border-left-color: var(--bad); } .find-card.sev-medium { border-left-color: var(--warn); }
.find-card.sev-low { border-left-color: var(--link); } .find-card.sev-info { border-left-color: var(--line-strong); }
.find-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.find-title { font-size: 14.5px; color: var(--ink-2); } .find-title b { color: var(--navy); }
.find-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.find-block { margin-top: 10px; }
.find-label { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.find-cite { display: flex; gap: 7px; align-items: flex-start; margin: 4px 0; color: var(--ink-2); font-size: 13px; }
.find-cite a { font-weight: 700; }
.find-actions { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ── Policy text reader ──────────────────────────────────────────────────── */
.policy-text { margin-top: 12px; max-height: 480px; overflow-y: auto; white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }

/* ── Studio ↔ Modernization chips ────────────────────────────────────────── */
.mod-cell { white-space: nowrap; }
.mod-chip { border: 0; background: transparent; padding: 2px; display: inline-flex; gap: 5px; align-items: center; border-radius: 8px; }
.mod-chip:hover { background: var(--surface-2); }

/* ── Collaborative review (Studio) ───────────────────────────────────────── */
.collab-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: var(--sp-4); align-items: start; }
.collab-layout > * { min-width: 0; }
@media (max-width: 1100px) { .collab-layout { grid-template-columns: minmax(0,1fr); } }
.collab-rail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: var(--sp-4); }
.policy-text mark.cmt-mark { background: #fdf0c8; color: inherit; border-bottom: 2px solid var(--gold-deep); border-radius: 2px; cursor: pointer; padding: 0 1px; }
.policy-text mark.cmt-mark.active { background: #fde68a; }
.cmt-adder { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; background: var(--surface); }
.cmt-adder textarea { width: 100%; }
.cmt-quote { font-size: 12px; color: var(--muted); font-style: italic; border-left: 3px solid var(--gold-deep); padding-left: 8px; margin-bottom: 6px; }
.cmt-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.cmt-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; background: var(--panel); }
.cmt-item:hover { border-color: var(--line-strong); }
.cmt-item.active { border-color: var(--gold-deep); box-shadow: 0 0 0 2px rgba(201,162,39,.18); }
.cmt-item.resolved { opacity: .62; }
.cmt-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 5px; }
.cmt-author { font-size: 12.5px; font-weight: 700; color: var(--navy); display: inline-flex; align-items: center; gap: 5px; }
.cmt-time { font-size: 11px; color: var(--faint); white-space: nowrap; }
.cmt-body { font-size: 13px; color: var(--ink-2); line-height: 1.5; white-space: pre-wrap; }
.cmt-foot { margin-top: 7px; }
.chat-wrap { display: flex; flex-direction: column; height: 340px; }
.chat-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; padding: 4px; }
.chat-msg { max-width: 90%; }
.chat-msg.me { align-self: flex-end; text-align: right; }
.chat-meta { font-size: 11px; color: var(--faint); margin-bottom: 2px; }
.chat-meta b { color: var(--navy); }
.chat-text { display: inline-block; text-align: left; font-size: 13px; line-height: 1.45; background: var(--surface-2); border-radius: 10px; padding: 7px 11px; color: var(--ink-2); white-space: pre-wrap; }
.chat-msg.me .chat-text { background: #fdf3d0; }
.chat-compose { display: flex; gap: 8px; margin-top: 8px; }
.chat-compose input { flex: 1; }

/* ── Manual import progress ──────────────────────────────────────────────── */
.import-line { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); padding: 8px 2px; }
.import-line.good { color: var(--good-ink); }
.import-line.bad { color: var(--bad-ink); }

/* ── Collab v2: threads, mentions, bell ─────────────────────────────────── */
.cmt-reply { border-left: 2px solid var(--line-strong); margin: 8px 0 0 10px; padding: 4px 0 4px 10px; }
.cmt-reply-box { display: flex; gap: 6px; margin-top: 8px; }
.cmt-reply-box input { flex: 1; }
.mention, b.mention { color: var(--link-body); font-weight: 700; }
#mentionBell .badge { position: absolute; top: -5px; right: -5px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 1px 5px; min-width: 16px; text-align: center; }
.top-right { position: relative; }
.mention-panel { position: absolute; top: 42px; right: 0; width: 340px; max-height: 420px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 60; padding: 6px; }
.mention-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 9px 10px; font-size: 13px; color: var(--ink-2); }
.mention-item:hover { background: var(--surface-2); }

/* ── Import staging ─────────────────────────────────────────────────────── */
.stg-panel { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 10px; background: var(--surface); }

/* ── Detail section expanders ───────────────────────────────────────────── */
#toggleVersions svg:last-child, #toggleNewVersion svg:last-child { transition: transform .15s ease; }
#toggleVersions.open svg:last-child, #toggleNewVersion.open svg:last-child { transform: rotate(180deg); }

/* ── Assistant suggestion chips ─────────────────────────────────────────── */
.pa-suggest-label { display: block; color: var(--faint); font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px; }
.pa-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pa-chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; line-height: 1.35; cursor: pointer; text-align: left; max-width: 100%; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.pa-chip:hover, .pa-chip:focus-visible { border-color: var(--link); color: var(--link); background: var(--surface-2); }

/* ── Assistant clarification cards ─────────────────────────────────────── */
.pa-clarify-intro { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
/* No clear answer (2026-10-07): a notice that cannot be missed, and the
   closest passages collapsed behind it. */
.pa-no-answer { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--warn); border-left-width: 5px; border-radius: 10px; background: var(--warn-fill); }
.pa-no-answer > .icon { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--warn-ink); }
.pa-no-answer b { display: block; color: var(--warn-ink); font-size: 16px; line-height: 1.35; }
.pa-no-answer p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
.pa-closest > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--navy); font-size: 13.5px; font-weight: 600; }
.pa-closest > summary::-webkit-details-marker { display: none; }
.pa-closest > summary small { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.pa-closest > summary .icon { flex: none; transition: transform .16s ease; }
.pa-closest[open] > summary { margin-bottom: 10px; }
.pa-closest[open] > summary .icon { transform: rotate(180deg); }
.pa-closest-hide, .pa-closest[open] .pa-closest-show { display: none; }
.pa-applies { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.pa-applies > .icon { flex: none; margin-top: 2px; color: var(--muted); }
.pa-applies b { color: var(--navy); }
.pa-scope-ask { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pa-scope-ask h3 { margin: 0 0 10px; color: var(--navy); font-size: 15px; }
.pa-scope-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.pa-scope-buttons .btn { min-height: 44px; }
.pa-closest[open] .pa-closest-hide { display: inline; }
@media (max-width: 520px) { .pa-closest > summary { flex-wrap: wrap; } .pa-closest > summary small { margin-left: 24px; flex-basis: 100%; } }
.pa-clarify-list { display: grid; gap: 12px; }
.pa-clarify-card { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); }
.pa-clarify-number { display: grid; place-items: center; align-self: start; width: 28px; height: 28px; border-radius: 50%; background: color-mix(in srgb, var(--m-assistant) 14%, var(--surface)); color: var(--navy); font-size: 12px; font-weight: 850; }
.pa-clarify-card-body { min-width: 0; }
.pa-clarify-card h3 { margin: 1px 0 3px; color: var(--navy); font-size: 14px; line-height: 1.35; }
.pa-clarify-card p { margin: 0 0 10px; color: var(--faint); font-size: 12px; line-height: 1.4; }
.pa-clarify-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pa-clarify-choice { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px; background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.pa-clarify-choice:hover, .pa-clarify-choice:focus-visible { border-color: var(--link); box-shadow: 0 0 0 2px color-mix(in srgb, var(--link) 12%, transparent); }
.pa-clarify-choice[aria-pressed="true"] { border-color: var(--link); background: color-mix(in srgb, var(--m-assistant) 10%, var(--panel)); box-shadow: inset 0 0 0 1px var(--link); }
.pa-clarify-choice b { display: block; font-size: 12.5px; line-height: 1.35; }
.pa-clarify-choice small { display: block; margin-top: 3px; color: var(--faint); font-size: 11.5px; line-height: 1.35; }
.pa-clarify-check { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-strong); border-radius: 6px; color: transparent; background: var(--surface); }
.pa-clarify-choice[aria-pressed="true"] .pa-clarify-check { border-color: var(--link); background: var(--link); color: white; }
.pa-clarify-check .icon { width: 13px; height: 13px; }
.pa-clarify-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 2px; }
.pa-clarify-context { margin-bottom: 12px; }
.pa-clarify-applied-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pa-clarify-applied { display: inline-flex; flex-direction: column; gap: 1px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; background: var(--surface-2); color: var(--ink-2); font-size: 11.5px; line-height: 1.35; }
.pa-clarify-applied b { color: var(--navy); font-size: 10.5px; }
@media (max-width: 680px) {
  .pa-clarify-options { grid-template-columns: 1fr; }
  .pa-clarify-actions { align-items: stretch; flex-direction: column; }
  .pa-clarify-actions .btn { width: 100%; justify-content: center; }
}

/* ── Policy lifecycle strip (Studio) ────────────────────────────────────── */
.pl-strip { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.pl-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: plstage; }
.pl-stages li { counter-increment: plstage; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--faint); font-size: 12px; font-weight: 700; }
.pl-stages li::before { content: counter(plstage); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--line); color: var(--ink-2); font-size: 10.5px; }
.pl-stages li.done { color: var(--navy); border-color: color-mix(in srgb, var(--m-policies) 40%, var(--line)); }
.pl-stages li.done::before { content: "✓"; background: var(--m-policies); color: #fff; }
.pl-stages li.current { color: var(--navy); border-color: var(--m-policies); box-shadow: inset 0 0 0 1px var(--m-policies); }
.pl-stages li.current::before { background: color-mix(in srgb, var(--m-policies) 22%, var(--surface)); color: var(--navy); }
.pl-next { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }

/* ── Assistant search progress ──────────────────────────────────────────── */
.pa-trace { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pa-trace-step { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; opacity: .45; transition: opacity .3s ease; }
.pa-trace-step.is-active, .pa-trace-step.is-done { opacity: 1; }
.pa-trace-dot { width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); box-sizing: border-box; }
.pa-trace-step.is-active .pa-trace-dot { border-color: var(--m-assistant); animation: paTracePulse 1.1s ease-in-out infinite; }
.pa-trace-step.is-done .pa-trace-dot { border-color: var(--m-assistant); background: var(--m-assistant); }
.pa-trace-main { min-width: 0; }
.pa-trace-main > b { display: block; color: var(--navy); font-size: 13px; line-height: 1.35; }
.pa-trace-body { margin-top: 6px; min-height: 18px; }
.pa-trace-chips, .pa-trace-maps, .pa-trace-policies { display: flex; flex-wrap: wrap; gap: 6px; }
.pa-trace-chip, .pa-trace-map, .pa-trace-policy { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; line-height: 1.3; max-width: 100%; animation: paTraceIn .35s ease both; animation-delay: calc(var(--i, 0) * 90ms); }
.pa-trace-chip.found { border-color: color-mix(in srgb, var(--m-assistant) 45%, var(--line)); color: var(--navy); }
.pa-trace-map .from { color: var(--ink-2); }
.pa-trace-map .arrow { color: var(--m-assistant); font-weight: 800; }
.pa-trace-map .to { color: var(--navy); font-weight: 700; }
.pa-trace-policy { border-radius: 8px; }
.pa-trace-policy .icon { width: 13px; height: 13px; color: var(--faint); flex: none; }
.pa-trace-policy.chosen { border-color: var(--m-assistant); background: color-mix(in srgb, var(--m-assistant) 10%, var(--surface)); color: var(--navy); font-weight: 700; }
.pa-trace-policy.chosen .icon { color: var(--m-assistant); }
.pa-trace-skel { display: inline-block; width: 160px; height: 12px; margin-right: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.pa-trace-skel.short { width: 96px; }
.pa-trace-bar { display: block; width: min(260px, 100%); height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.pa-trace-bar i { display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--m-assistant); animation: de-slide 1.3s ease-in-out infinite; }
.pa-trace-summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; color: var(--faint); font-size: 11.5px; line-height: 1.4; }
.pa-trace-summary .icon { width: 13px; height: 13px; }
@keyframes paTraceIn { from { opacity: 0; transform: translateY(4px); } }
@keyframes paTracePulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--m-assistant) 18%, transparent); } }
@media (prefers-reduced-motion: reduce) {
  .pa-trace-step { transition: none; }
  .pa-trace-chip, .pa-trace-map, .pa-trace-policy, .pa-trace-step.is-active .pa-trace-dot,
  .pa-trace-skel, .pa-trace-bar i { animation: none; }
}

/* ── Assistant source viewer ────────────────────────────────────────────── */
.pa-src-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); padding: 12px 14px; margin: 4px 0 14px; }
.pa-src-wrap { position: relative; margin: 0 auto; max-width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 10px rgba(15, 30, 60, .10); overflow: auto; -webkit-overflow-scrolling: touch; }
.pa-src-wrap canvas { display: block; }
.pdf-load-progress { margin: 12px 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.pdf-load-progress[hidden], .pdf-load-progress [hidden] { display: none; }
.pdf-load-copy { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 9px; font-size: 13px; color: var(--ink); }
.pdf-load-copy > span { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy); }
.pdf-load-track { height: 9px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.pdf-load-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--gold-deep); transition: width .12s linear; }
@media (prefers-reduced-motion: reduce) { .pdf-load-track > span { transition: none; } }
.pa-src-inline { list-style: none; }
.pa-src-mark { position: absolute; background: rgba(250, 204, 21, .42); box-shadow: 0 0 0 1px rgba(202, 138, 4, .55); border-radius: 2px; pointer-events: none; mix-blend-mode: multiply; }
.pa-src-hl { position: absolute; background: rgba(23, 173, 232, .28); box-shadow: 0 0 0 3px rgba(23, 173, 232, .28); border-radius: 3px; pointer-events: none; mix-blend-mode: multiply; }
.pa-src-modal { position: fixed; inset: 0; z-index: 80; background: rgba(8, 22, 45, .48); backdrop-filter: blur(2px); overflow: auto; padding: 24px 12px; }
.pa-src-modal-card { width: min(96vw, 1000px); margin: 0 auto; box-shadow: 0 18px 60px rgba(13, 26, 49, .35); }

/* ── Assistant answer source links ──────────────────────────────────────── */
.ans-src { text-decoration: none; color: var(--navy); background: color-mix(in srgb, var(--sky) 16%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sky) 32%, #fff); border-radius: 5px; padding: 1px 6px; cursor: pointer; transition: background .15s ease; }
.ans-src:hover { background: color-mix(in srgb, var(--sky) 28%, #fff); }
.ans-src strong, .ans-src b { color: var(--navy); }
.ans-src::after { content: " ↗"; font-size: 11px; color: var(--link); }
.ans-cites { font-size: 11px; font-weight: 700; color: var(--faint); text-decoration: none; margin-left: 6px; vertical-align: super; white-space: nowrap; }
.ans-cites:hover { color: var(--link); }

/* ── Publication package options ────────────────────────────────────────── */
.pub-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .pub-options { grid-template-columns: 1fr; } }
.pub-opt { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.pub-opt-head { display: flex; align-items: center; gap: 8px; color: var(--navy); font-size: 13.5px; }
.pub-opt-desc { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; flex: 1 1 auto; }
.pub-opt .btn { align-self: flex-start; }

/* ── Section modernization severity filter chips ────────────────────────── */
.sev-chip { cursor: pointer; border: 1px solid transparent; }
.sev-chip:hover { border-color: var(--link); }
.sev-chip.on { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy) inset; font-weight: 800; }

/* ── Studio tool tiles ──────────────────────────────────────────────────── */
.tool-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (max-width: 1100px) { .tool-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tool-tiles { grid-template-columns: 1fr; } }
.tool-tile { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.tool-tile:hover, .tool-tile:focus-visible { border-color: var(--link); box-shadow: var(--ring); }
.tool-tile.on { border-color: var(--navy); background: var(--surface-2); }
.tool-tile .tt-ico { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.tool-tile.on .tt-ico { background: var(--navy); color: var(--on-foreground); }
.tool-tile .tt-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tool-tile .tt-text b { font-size: 13px; color: var(--ink); }
.tool-tile .tt-hint { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-tile .tt-chev { flex: 0 0 auto; color: var(--faint); transition: transform .15s ease; }
.tool-tile.on .tt-chev { transform: rotate(180deg); }

/* ── Manual chapter modules ─────────────────────────────────────────────── */
.chap-card { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 14px 16px; margin: 0 0 14px; }
.chap-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.chap-head b { color: var(--navy); font-size: 14.5px; }
.chap-head .cell-sub { margin: 0; }
/* CLO-686: a chapter folds to its heading. */
details.chap-card > summary.chap-head { list-style: none; cursor: pointer; user-select: none; margin: -4px -6px 6px; padding: 4px 6px; border-radius: 8px; }
details.chap-card > summary.chap-head::-webkit-details-marker { display: none; }
details.chap-card > summary.chap-head:hover { background: var(--surface-2); }
details.chap-card:not([open]) > summary.chap-head { margin-bottom: -4px; }
.chap-caret { flex: none; align-self: center; width: 0; height: 0; color: var(--muted); border-left: 6px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; transition: transform .15s ease; }
details.chap-card[open] > summary .chap-caret { transform: rotate(90deg); }
#manualFoldAll[hidden] { display: none; } /* .btn's inline-flex would override [hidden] */
.chap-cols { column-count: 3; column-gap: 22px; }
@media (min-width: 1500px) { .chap-cols { column-count: 4; } }
@media (max-width: 1200px) { .chap-cols { column-count: 2; } }
@media (max-width: 760px) { .chap-cols { column-count: 1; } }
.sec-item { display: inline-flex; align-items: center; gap: 7px; width: 100%; break-inside: avoid; border: 0; background: transparent; text-align: left; padding: 4px 6px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.sec-item:hover, .sec-item:focus-visible { background: var(--surface-2); color: var(--navy); }
.sec-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; }
.sec-dot.on { background: #16a34a; }
.sec-dot.warn { background: #d97706; }
.sec-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-hold { color: #b45309; display: inline-flex; }
.sec-modchip { flex: 0 0 auto; }
#manualDock { margin: 4px 0 14px; }
#mdWrap { position: relative; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 10px rgba(15, 30, 60, .10); overflow: hidden; }
#mdWrap canvas { display: block; }
#manualDocToggle svg:last-child { transition: transform .15s ease; }
#manualDocToggle.open svg:last-child { transform: rotate(180deg); }

/* ── Document (PDF) view ────────────────────────────────────────────────── */
.pt-viewtoggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.pt-viewtoggle button { border: 0; background: var(--surface); padding: 6px 14px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.pt-viewtoggle button.on { background: var(--navy); color: var(--on-foreground); }
.pt-viewtoggle button:disabled { opacity: .45; cursor: not-allowed; }
#pdfDock { margin-top: 12px; }
#pdfWrap { position: relative; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 10px rgba(15, 30, 60, .10); overflow: hidden; }
#pdfWrap canvas { display: block; }
.textLayer { position: absolute; inset: 0; overflow: hidden; line-height: 1; }
.textLayer span, .textLayer br { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0 0; }
.textLayer span::selection { background: rgba(15, 127, 174, .35); }
#pdfHl { position: absolute; inset: 0; pointer-events: none; }
#pdfHl .pdf-mark { position: absolute; background: rgba(253, 224, 71, .38); border-bottom: 2px solid var(--gold-deep); border-radius: 2px; pointer-events: auto; cursor: pointer; }
#pdfHl .pdf-mark.active { background: rgba(253, 230, 138, .6); }
.pdf-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }

/* ── Policy text reader cleanup ─────────────────────────────────────────── */
/* Spans wrap existing characters only (comment anchors depend on the text
   staying byte-identical); the visual breaks come from pseudo-elements. */
.pt-banner { display: block; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .04em; margin: 16px 0 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.pt-banner + .pt-banner { margin-top: 0; padding-top: 0; border-top: 0; }
.pt-head { display: block; font-weight: 800; color: var(--ink); font-size: 14px; margin: 16px 0 6px; }
.pt-item { font-weight: 700; }
.pt-item::before { content: "\A"; white-space: pre; }

/* ── Version upload split ───────────────────────────────────────────────── */
.upload-split { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; align-items: stretch; }
.upload-split .drop { height: 100%; box-sizing: border-box; }
@media (max-width: 980px) { .upload-split { grid-template-columns: 1fr; } }

/* ── Collab who-line ────────────────────────────────────────────────────── */
.collab-who { display: flex; align-items: center; gap: 8px; min-width: 0; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); }
.collab-who .who-avatar { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--on-foreground); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.collab-who b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.collab-who a { flex: 0 0 auto; white-space: nowrap; font-weight: 600; }

/* ── Workflow settings ──────────────────────────────────────────────────── */
.wf-toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; margin: 0; }
.wf-toggle input[type="checkbox"] { margin-top: 2px; }
.wf-toggle b { white-space: nowrap; font-size: 13.5px; }
.wf-toggle .cell-sub { margin-top: 1px; }

/* ── Tracked changes ────────────────────────────────────────────────────── */
.tc-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.tc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tc-accept { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.tc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .tc-cols { grid-template-columns: 1fr; } }
.tc-old > div, .tc-new > div { white-space: pre-wrap; font-size: 12.5px; line-height: 1.5; border-radius: 6px; padding: 8px 10px; }
.tc-old > div { background: rgba(192, 57, 43, .06); border: 1px solid rgba(192, 57, 43, .18); }
.tc-new > div { background: rgba(31, 157, 85, .07); border: 1px solid rgba(31, 157, 85, .2); }

/* ---------- Compliance Programs (plan §9) ---------- */
.c-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; padding: 18px; }
.c-card { width: 100%; text-align: left; color: inherit; display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; background: var(--surface); transition: box-shadow .15s ease, transform .15s ease; }
.c-card:hover { box-shadow: var(--shadow-2, 0 4px 14px rgba(16, 33, 61, .10)); transform: translateY(-1px); }
.c-card-main { display: grid; gap: 3px; min-width: 0; }
.c-card-main > b { color: var(--navy); }
.c-card-counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.c-card-counts .pill { white-space: normal; text-align: left; }
.c-ring text { user-select: none; }
.c-structure td { background: var(--surface); color: var(--navy); border-top: 2px solid var(--line); }
.c-structure .cell-sub { display: inline; }
.c-muted td { opacity: .55; }
.c-reasons { margin: 6px 0 0 18px; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.pill-x { border: 0; background: none; cursor: pointer; font-weight: 800; color: var(--muted); padding: 0 2px; }
.pill-x:hover { color: var(--bad); }
.field-label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.c-detail-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(8, 22, 45, .48); backdrop-filter: blur(2px); }
.c-detail-drawer { position: fixed; inset: 0 0 0 auto; z-index: 71; width: min(720px, calc(100vw - 40px)); height: 100dvh; overflow-y: auto; padding: 16px; background: var(--bg); box-shadow: -18px 0 48px rgba(8, 22, 45, .22); }
.c-detail-backdrop[hidden], .c-detail-drawer[hidden] { display: none; }
.c-detail-drawer > .panel { margin: 0; min-height: calc(100dvh - 32px); }
.c-detail-drawer .panel-head { position: sticky; top: -16px; z-index: 2; background: var(--surface); border-bottom: 1px solid var(--line); }
.c-detail-drawer .panel-body { grid-template-columns: minmax(0, 1fr); }
.c-detail-drawer .panel-body > *, .c-detail-drawer .row > * { min-width: 0; max-width: 100%; }
.c-detail-drawer .row { flex-wrap: wrap; }
body.c-drawer-open { overflow: hidden; }
@media (max-width: 640px) {
  .c-cards { padding: 12px; }
  .c-detail-drawer { width: 100vw; padding: 8px; }
  .c-detail-drawer > .panel { min-height: calc(100dvh - 16px); }
  .c-detail-drawer .panel-head { top: -8px; flex-direction: column; align-items: stretch; }
  .c-detail-drawer .panel-head > .row { width: 100%; }
}

/* Public assessor report page */
.assessor-page { min-height: 100vh; background: var(--bg); padding: 8px; }
@media print {
  .assessor-page .panel { box-shadow: none; border: 0; }
  .assessor-page .btn { display: none; }
}

/* mention panel: unread/assignment states */
.mention-head { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.mention-item.attn { border-left: 3px solid var(--gold-deep); }

/* @mention autocomplete popover */
.mention-ac { position: absolute; left: 6px; right: 6px; bottom: calc(100% + 4px); z-index: 40; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(16, 33, 61, .16); overflow: hidden; }
.mention-ac-item { display: flex; gap: 8px; align-items: baseline; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; cursor: pointer; font: inherit; }
.mention-ac-item.on, .mention-ac-item:hover { background: var(--surface-2); }
.mention-ac-item b { color: var(--link); }

/* agency-citation review banner */
.c-cite-banner { border: 1px solid var(--info-fill, #dbeafe); background: var(--info-fill, #eff6ff); border-radius: var(--r-md); padding: 12px 14px; }
.c-cite-banner > b { color: var(--link); display: inline-flex; align-items: center; gap: 6px; }

/* citation review passage */
.c-cite-src { cursor: pointer; border: 1px solid var(--line); background: var(--surface); font: inherit; }
.c-cite-src:hover { border-color: var(--link); }
.c-cite-review { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: 10px 12px; }
.c-cite-passage { margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; border-left: 3px solid var(--gold-deep); padding-left: 10px; }
.c-cite-passage mark { background: rgba(253, 224, 71, .45); border-radius: 2px; padding: 0 2px; font-weight: 700; }

/* Department Event Import drop target */
.dropzone { margin-top: 14px; padding: 26px 18px; border: 2px dashed var(--line);
  border-radius: 12px; text-align: center; cursor: pointer; display: flex;
  flex-direction: column; align-items: center; gap: 6px;
  transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--m-deptevents); outline: none; }
.dropzone.over { border-color: var(--m-deptevents); background: rgba(14,165,233,.08); }
.dropzone .icon { width: 26px; height: 26px; opacity: .75; }

/* Event Import: step progress + review table alignment */
.de-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.de-bar-fill { height: 100%; background: var(--m-deptevents); border-radius: 999px;
  transition: width .35s ease; }
.de-bar-indet .de-bar-fill { width: 40%; animation: de-slide 1.1s ease-in-out infinite; }
@keyframes de-slide { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
/* Give every control in the row the same shape: a label line above a control.
   Aligning by flex-end alone left the button high, because it had no label
   line and its box started lower than the inputs'. */
/* margin-bottom:0 matters: a global `label` rule adds 6px, which the
   <div> wrapping the button does not have — that 6px was the whole
   misalignment (measured in-browser, not guessed). */
.de-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 0; }
.de-field > .cell-sub { line-height: 1.2; min-height: 1.2em; }
.de-field > input, .de-field > select, .de-field > .btn { height: 38px; box-sizing: border-box; }
.de-field > .btn { display: inline-flex; align-items: center; justify-content: center; }
.de-winrow { gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.de-editor > td { background: rgba(14,165,233,.05); }

/* Review table: scroll instead of clipping the source/action columns at
   narrow widths, with a visible cue that there is more to the right. */
.de-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.de-scroll > table { min-width: 640px; }
.de-swipe-cue { display: none; margin-top: 4px; }
@media (max-width: 720px) { .de-swipe-cue { display: block; } }
/* Keep a real focus ring; a border-colour change alone is not visible enough. */
.dropzone:focus-visible { outline: 2px solid var(--m-deptevents);
  outline-offset: 2px; }

/* Department event calendar management */
.de-module-nav { display:flex; align-items:flex-end; justify-content:space-between;
  gap:16px; margin-bottom:12px; flex-wrap:wrap; }
.de-module-nav .de-field { min-width:220px; }
.de-tabs { display:flex; gap:4px; padding:4px; border:1px solid var(--line);
  border-radius:10px; background:var(--surface); }
.de-tab { border:0; background:transparent; color:var(--muted);
  border-radius:7px; padding:8px 12px; font:inherit; font-weight:650; cursor:pointer; }
.de-tab.active { background:var(--m-deptevents); color:#fff; }
.de-calendar-heading { gap:12px; align-items:flex-start; flex-wrap:wrap; }
.de-draft-banner { display:flex; align-items:center; justify-content:space-between;
  gap:12px; margin-top:14px; padding:12px; border:1px solid var(--m-deptevents);
  border-radius:10px; background:color-mix(in srgb, var(--m-deptevents) 8%, transparent); }
.de-month-toolbar { display:flex; align-items:center; gap:8px; margin:22px 0 10px; }
.de-month-toolbar h3 { min-width:190px; text-align:center; margin:0; }
.de-calendar-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.de-calendar-grid { display:grid; grid-template-columns:repeat(7, minmax(100px, 1fr));
  min-width:720px; border-left:1px solid var(--line); border-top:1px solid var(--line); }
.de-calendar-weekdays { border:0; }
.de-calendar-weekdays > div { padding:7px; color:var(--muted); font-size:12px;
  font-weight:700; text-align:center; text-transform:uppercase; letter-spacing:.04em; }
.de-cal-day { min-height:112px; padding:7px; border-right:1px solid var(--line);
  border-bottom:1px solid var(--line); background:var(--surface); }
.de-cal-day.outside { background:color-mix(in srgb, var(--surface) 65%, var(--bg)); }
.de-cal-day.has-events { background:color-mix(in srgb, var(--m-deptevents) 3%, var(--surface)); }
.de-cal-number { display:block; margin-bottom:5px; color:var(--muted);
  font-size:12px; font-weight:700; }
.de-cal-events { display:flex; flex-direction:column; gap:4px; }
.de-cal-event { width:100%; border:0; border-left:3px solid var(--m-deptevents);
  border-radius:4px; padding:5px 6px; background:color-mix(in srgb, var(--m-deptevents) 11%, var(--surface));
  color:var(--ink); font:inherit; font-size:11px; line-height:1.25; text-align:left;
  cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.de-cal-event:hover, .de-cal-event:focus-visible { background:color-mix(in srgb, var(--m-deptevents) 20%, var(--surface)); }
.de-all-events { margin-top:24px; }
.de-event-list { display:flex; flex-direction:column; margin-top:10px;
  border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.de-event-card { display:grid; grid-template-columns:minmax(145px, .65fr) minmax(220px, 2fr) auto;
  gap:14px; align-items:center; padding:12px; background:var(--surface);
  border-bottom:1px solid var(--line); }
.de-event-card:last-child { border-bottom:0; }
.de-event-date, .de-event-copy { display:flex; flex-direction:column; gap:3px; }
.de-event-date span, .de-event-copy span { color:var(--muted); font-size:12px; }
.de-event-actions { display:flex; gap:6px; justify-content:flex-end; }
.btn.danger { color:var(--bad); }
.de-calendar-empty { display:flex; flex-direction:column; align-items:center;
  padding:52px 20px; text-align:center; }
.de-calendar-empty .icon { width:34px; height:34px; color:var(--m-deptevents); }
.de-publication { display:grid; grid-template-columns:auto minmax(0, 1fr);
  gap:14px; align-items:start; }
.de-publication > :not(.de-publication-mark) { grid-column:2; }
.de-publication-mark { display:grid; place-items:center; width:46px; height:46px;
  grid-row:1 / span 6; border-radius:50%; background:var(--surface); }
.de-publication-mark.ok { color:var(--good); background:color-mix(in srgb, var(--good) 12%, var(--surface)); }
.de-publication-mark.fail { color:var(--bad); background:color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.de-publication-mark.pending { color:var(--m-deptevents); background:color-mix(in srgb, var(--m-deptevents) 12%, var(--surface)); }
.de-publication-counts { display:grid; grid-template-columns:repeat(4, minmax(110px, 1fr));
  gap:8px; margin:4px 0; }
.de-publication-counts > div { display:flex; flex-direction:column; padding:10px;
  border:1px solid var(--line); border-radius:8px; }
.de-publication-counts b { font-size:20px; }
.de-publication-counts span { color:var(--muted); font-size:11px; }
.de-publication-error { padding:10px; border:1px solid var(--bad); border-radius:8px; }

@media (max-width: 720px) {
  .de-module-nav { align-items:stretch; }
  .de-module-nav .de-field, .de-tabs { width:100%; }
  .de-tab { flex:1; }
  .de-calendar-heading .btn { width:100%; }
  .de-draft-banner { align-items:flex-start; flex-direction:column; }
  .de-event-card { grid-template-columns:1fr auto; }
  .de-event-copy { grid-column:1 / -1; grid-row:2; }
  .de-event-actions { grid-column:2; grid-row:1; }
  .de-publication-counts { grid-template-columns:repeat(2, minmax(110px, 1fr)); }
}

@media (max-width: 430px) {
  .de-month-toolbar h3 { min-width:0; flex:1; font-size:16px; }
  .de-month-toolbar #deMonthToday { display:none; }
  .de-event-card { display:flex; flex-direction:column; align-items:stretch; }
  .de-event-actions { justify-content:flex-start; }
  .de-publication { grid-template-columns:1fr; }
  .de-publication > :not(.de-publication-mark) { grid-column:1; }
  .de-publication-mark { grid-row:auto; }
}

/* Modernization panel: the two scan tools must read as DIFFERENT tools.
   Mismatch (reviews existing policies) wears amber; coverage (finds missing
   policies) wears the module green. Left accent + tinted head + an eyebrow
   tag give each card its own identity, and the gap keeps them from reading
   as one stacked form. */
.panel.scan-mismatch { border-left: 4px solid var(--gold-deep); }
.panel.scan-mismatch > .panel-head { background: rgba(254, 231, 128, .16); }
.panel.scan-coverage { border-left: 4px solid var(--m-policymod); margin-top: 16px; }
.panel.scan-coverage > .panel-head { background: rgba(9, 146, 104, .07); }
.scan-tag {
  display: inline-block; font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em;
  padding: 2px 8px; border-radius: 999px; margin-bottom: 5px;
}
.scan-tag.mismatch { background: rgba(201, 162, 39, .18); color: #8a6d0b; }
.scan-tag.coverage { background: rgba(9, 146, 104, .12); color: var(--m-policymod); }

/* Cited-text viewer: the exact retrieved passage a finding rests on, shown
   in-product. The official-source link is secondary. */
.cite-modal-backdrop {
  position: fixed; inset: 0; background: rgba(13, 26, 49, .45);
  display: grid; place-items: center; z-index: 90; padding: 18px;
}
.cite-modal {
  background: var(--panel); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg, 0 18px 50px rgba(13, 26, 49, .35));
  max-width: 720px; width: 100%; max-height: 82dvh;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
}
.cite-modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cite-modal-text {
  overflow: auto; white-space: pre-wrap; font-size: 13px; line-height: 1.55;
  border-left: 3px solid var(--m-policymod); padding: 8px 12px;
  background: var(--surface-2); border-radius: 6px; color: var(--ink);
}

/* Coverage report verdict bands — collapsed drop-down cards. Each band is a
   distinct tinted card (tone matches its count pill) so the closed rows read
   as different severities at a glance, with an explicit caret affordance. */
.cov-band {
  border: 1px solid var(--line); border-left: 4px solid var(--line-strong);
  border-radius: 10px; background: var(--panel); margin-top: 12px; overflow: hidden;
}
.cov-band > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; background: var(--surface-2);
}
.cov-band > summary::-webkit-details-marker { display: none; }
.cov-band > summary:hover { filter: brightness(.985); }
.cov-band .cov-caret {
  flex: none; width: 0; height: 0; color: var(--muted);
  border-left: 6px solid currentColor;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  transition: transform .15s ease;
}
.cov-band[open] > summary .cov-caret { transform: rotate(90deg); }
.cov-band[open] > summary { border-bottom: 1px solid var(--line); }
.cov-band.bad { border-left-color: var(--bad); }
.cov-band.bad > summary { background: var(--bad-fill); }
.cov-band.bad .cov-caret { color: var(--bad-ink); }
.cov-band.warn { border-left-color: var(--warn); }
.cov-band.warn > summary { background: var(--warn-fill); }
.cov-band.warn .cov-caret { color: var(--warn-ink); }
.cov-band.on { border-left-color: var(--good); }
.cov-band.on > summary { background: var(--good-fill); }
.cov-band.on .cov-caret { color: var(--good-ink); }

/* Coverage report head + unevaluated-requirements prompt. Both were bare
   panel-body runs that blended into the band pills below: the head is now a
   tinted scoreboard strip of stat-chips (heavier than in-band pills), and
   the fact prompt is a bounded, info-accented card with hairline rows. */
.cov-summary { padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.stat-chip.on { background: var(--good-fill); color: var(--good-ink); } .stat-chip.on b { color: var(--good-ink); }
.report-jump {
  border: 1px solid var(--line); cursor: pointer; font: inherit; line-height: 1.35;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.report-jump:hover { border-color: var(--link); transform: translateY(-1px); }
.report-jump:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; box-shadow: none; }

/* Reports are a dedicated Policy Modernization subview. Keep the way back
   and the user's location visible while the report scrolls beneath it. */
.pm-report-view { min-width: 0; }
.pm-report-view-bar {
  position: sticky; z-index: 13;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; padding: 9px 12px;
  background: var(--panel);
  background: color-mix(in srgb, var(--panel) 97%, transparent);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 6px 18px rgba(13, 26, 49, .08);
  backdrop-filter: blur(8px);
}
.pm-report-view-bar .btn-back { flex: 0 0 auto; }
.pm-report-breadcrumb {
  display: flex; align-items: center; justify-content: flex-end; gap: 7px;
  min-width: 0; color: var(--muted); font-size: 12px;
}
.pm-report-breadcrumb b {
  color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-report-view-content { min-width: 0; outline: none; }
.pm-report-view-content:focus-visible { outline: none; border-radius: 12px; box-shadow: var(--ring); }

/* Full-review navigation stays within reach while the user moves between the
   law and coverage legs. The law leg is a native disclosure and starts
   closed, so the coverage report is visible without traversing every law
   finding first. */
.full-report-nav {
  position: sticky; z-index: 11; display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-top: 12px; padding: 9px 12px;
  background: var(--panel);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 6px 18px rgba(13, 26, 49, .08);
  backdrop-filter: blur(8px);
}
.full-report-nav-label {
  color: var(--muted); font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.full-report-section { margin-top: 16px; }
/* Full policy review: the billing statement sits under the launch button on
   every origin, billed or not (PD-2026-10-07-04). */
.pm-billing-line { margin: 8px 0 0; }
.full-report-law {
  border: 1px solid var(--line); border-left: 4px solid var(--gold-deep);
  border-radius: 12px; background: var(--panel); overflow: hidden;
}
.full-report-law > summary {
  list-style: none; cursor: pointer; user-select: none;
  display: block;
  padding: 13px 15px; background: rgba(254, 231, 128, .16);
}
.full-report-law > summary::-webkit-details-marker { display: none; }
.full-report-law > summary:hover { filter: brightness(.985); }
.full-report-law-summary { display: grid; gap: 8px; width: 100%; }
.full-report-law-title {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.full-report-law-summary > .cell-sub { display: block; padding-left: 16px; }
.full-report-law-summary > .stat-chips { margin-top: 0; padding-left: 16px; }
.full-report-law > summary .cov-caret {
  flex: none; width: 0; height: 0; color: var(--gold-deep);
  border-left: 6px solid currentColor;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  transition: transform .15s ease;
}
.full-report-law[open] > summary .cov-caret { transform: rotate(90deg); }
.full-report-law[open] > summary { border-bottom: 1px solid var(--line); }
.full-report-section-tools {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  flex-wrap: wrap; padding: 8px 2px;
}
.full-report-law > .full-report-section-tools { padding: 10px 14px 14px; }
.full-report-coverage > .full-report-section-tools { justify-content: space-between; }

@media (max-width: 720px) {
  .pm-report-view-bar { align-items: flex-start; flex-direction: column; }
  .pm-report-breadcrumb { justify-content: flex-start; width: 100%; }
  .full-report-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .full-report-nav > * { flex: 0 0 auto; }
  .full-report-nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
.cov-facts { border: 1px solid var(--line); border-left: 4px solid var(--link); border-radius: 10px; background: var(--info-fill); margin-top: 12px; padding: 12px 14px; }
.cov-facts-head { display: flex; align-items: center; gap: 8px; color: var(--navy); }
.cov-fact-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.cov-fact-row:first-child { border-top: 0; }
.cov-facts .btn.ghost { background: var(--panel); }
.rank-input { width: 140px; font-size: 13px; padding: 6px 10px; }

/* Recent scans is history, not a scan surface: neutral slate edge + tinted
   head so it reads as its own card between the run cards and the report.
   Reports carry the scan-kind edge (scan-mismatch / scan-coverage) plus
   breathing room above so the report never merges into the table above it. */
.panel.scan-history { border-left: 4px solid var(--line-strong); margin-top: 16px; }
.panel.scan-history > .panel-head { background: var(--surface-2); }
.panel.scan-report { margin-top: 16px; }

/* Accreditation import card: its own quiet identity next to the amber and
   green scan tools. */
.panel.scan-accred { border-left: 4px solid var(--navy, #46608a); margin-top: 16px; }
.panel.scan-accred > .panel-head { background: rgba(70, 96, 138, .07); }
.scan-tag.accred { background: rgba(70, 96, 138, .12); color: var(--navy, #46608a); }

/* Peer comparison section inside the coverage report */
.cov-band.cov-peer { border-left: 4px solid var(--m-standards); }
.scan-tag.peer { background: rgba(201, 162, 39, .14); color: #8a6d0b; }
.find-card.peer-card { border-left-color: var(--m-standards); }

/* ---------- 2026-10-04 redesign: shell identity, dialogs, determinations,
   department profile, manual health, assistant answer columns ---------- */

/* Sidebar agency identity card (enclave origins) */
.side-tenant {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: grid;
  gap: 2px;
}
.side-tenant .side-tenant-label { color: var(--gold); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.side-tenant b { color: #fff; font-size: 13px; font-weight: 700; line-height: 1.3; }
.side-tenant span { color: #a9bdd8; font-size: 11.5px; }

/* Sidebar user card + menu (replaces the topbar icon pair) */
.side-user {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; border-radius: var(--r-sm); padding: 7px 8px;
  background: transparent; color: #dbe6f5; text-align: left; cursor: pointer;
}
.side-user:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.side-user .avatar { width: 32px; height: 32px; font-size: 12px; background: var(--gold); color: var(--navy); }
.side-user .user-meta { flex: 1; min-width: 0; text-align: left; }
.side-user .user-meta b { color: #fff; max-width: none; }
.side-user .user-meta span { color: #a9bdd8; }
.user-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; z-index: 60;
  background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; display: grid; gap: 1px;
}
.user-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  border: 0; border-radius: 7px; padding: 8px 10px; background: transparent;
  color: var(--ink-2); font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
}
.user-menu-item:hover { background: var(--surface-2); }
.user-menu-item.danger { color: var(--bad-ink); }

/* In-product dialog (shares the cite-modal backdrop/panel) */
.pr-dialog { max-width: 560px; max-height: 86vh; overflow-y: auto; }
.pr-dialog [hidden] { display: none !important; }
.pr-choice input[type="radio"] { width: auto; flex: none; }
.pr-dialog-ico { color: var(--m-policymod); display: grid; place-items: center; margin-top: 1px; }
.pr-dialog-body { padding: 4px 0 2px; }
.pr-dialog-foot { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.pr-dialog .fld label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.pr-dialog .fld input, .pr-dialog .fld select { width: 100%; box-sizing: border-box; }
.pr-dialog .bad-note { color: var(--bad-ink); font-weight: 600; }
.pr-choices { display: grid; gap: 8px; }
.pr-choice {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1.5px solid var(--line-strong); border-radius: 10px;
  padding: 10px 12px; background: var(--panel); cursor: pointer;
}
.pr-choice:hover { border-color: var(--link); }
.pr-choice:has(input:checked) { border-color: var(--gold-deep); box-shadow: 0 0 0 2px rgba(201, 162, 39, .25); background: rgba(254, 231, 128, .1); }
.pr-choice input { margin-top: 3px; accent-color: var(--gold-deep); }
.pr-choice b { display: block; font-size: 13px; }
.pr-choice small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.4; margin-top: 2px; }

/* Determination controls on coverage rows */
.cov-det {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); padding: 10px 12px; margin-top: 8px;
}
.cov-det.recorded { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); background: color-mix(in srgb, var(--good-fill) 55%, var(--panel)); }
.cov-det .cov-det-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cov-det-strip {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  border: 1px solid rgba(183, 121, 31, .35); border-radius: 10px;
  background: var(--warn-fill); color: var(--warn-ink);
  padding: 11px 14px; margin: 12px 16px 0; font-size: 13px;
}
.cov-det-strip .grow b { color: var(--warn-ink); }
.cov-det-strip .cell-sub { margin: 1px 0 0; }

/* Manual health card (Modernization dashboard) */
.panel.scan-health { border-left: 4px solid var(--m-policymod); }
.health-bar {
  display: flex; height: 13px; border-radius: 999px; overflow: hidden;
  border: 1px solid var(--line); margin-top: 12px; background: var(--surface-2);
}
.health-bar span { display: block; height: 100%; min-width: 2px; }
.panel.scan-health .cov-det-strip { margin: 12px 0 0; }

/* Department profile rows */
.profile-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); padding: 10px 14px;
}
.profile-row.needed { background: rgba(254, 231, 128, .08); }
.profile-row .grow b { color: var(--navy); }

/* Assistant: answer prose beside its cited passages on wide screens */
.answer-cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.answer-cols .answer-aside .cite-list { margin-top: 0; border-top: 0; padding-top: 0; }
@media (max-width: 980px) {
  .answer-cols { grid-template-columns: 1fr; }
  .answer-cols .answer-aside .cite-list { border-top: 1px solid var(--line); padding-top: 12px; }
}

/* ---------- Hover explainer (2026-11-12) ---------- */
.explainer {
  position: absolute; z-index: 1000; max-width: 320px;
  padding: 10px 12px; border-radius: var(--r-md, 10px);
  background: var(--ink); color: #fff;
  font-size: 13px; line-height: 1.45; font-weight: 500;
  box-shadow: var(--shadow-lg);
}
.explainer[hidden] { display: none; }

/* Modernization: a policy list and one focused review pane. */
.pm-wb-heading { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:16px; margin:0 0 22px; }
.pm-wb-heading h2 { margin:0 0 7px; color:var(--navy); font-size:24px; letter-spacing:-.025em; }
.pm-wb-heading p { margin:0; color:var(--muted); font-size:15px; }
.pm-wb-meta { display:flex; align-items:center; flex-wrap:wrap; gap:10px; color:var(--muted); font-size:12px; }
.pm-workbench { display:grid; grid-template-columns:minmax(250px, .9fr) minmax(0, 1.8fr); min-height:580px; background:var(--panel); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.pm-wb-sidebar { display:flex; flex-direction:column; min-width:0; padding:22px 20px; border-right:1px solid var(--line); }
.pm-wb-sidebar h3 { margin:0 0 16px; color:var(--navy); font-size:20px; }
.pm-wb-sidebar input { width:100%; }
.pm-wb-filter-status { display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px; margin:12px 0 6px; }
.pm-wb-sidebar #pmWbCount { margin:0; flex:1 1 160px; }
.pm-wb-filter-status .btn { flex:none; }
.pm-wb-filter-status .btn[hidden] { display:none; }
#pmWbList { max-height:460px; overflow:auto; margin:0 -8px; padding:3px; }
.pm-wb-policy { display:flex; align-items:center; gap:10px; width:100%; min-height:58px; padding:14px 10px; background:transparent; border:0; border-bottom:1px solid var(--line); border-radius:6px; font:inherit; text-align:left; color:var(--navy); cursor:pointer; }
.pm-wb-policy > span:first-child { flex:1; min-width:0; overflow-wrap:anywhere; font-weight:650; font-size:14px; }
.pm-wb-policy > .pill, .pm-wb-policy > svg { flex-shrink:0; }
.pm-wb-policy.active { background:var(--good-fill); box-shadow:inset 3px 0 var(--good); }
.pm-wb-policy:hover { background:var(--surface-2); }
.pm-wb-policy:focus-visible, .pm-wb-types button:focus-visible { outline:3px solid var(--link); outline-offset:-3px; }
.pm-wb-profile { margin-top:0; padding-top:26px; }
.pm-wb-profile b { display:block; color:var(--navy); font-size:13px; }
.pm-wb-profile p { margin:7px 0 12px; color:var(--muted); font-size:12px; }
.pm-wb-detail { min-width:0; padding:24px 28px 28px; }
.pm-wb-policy-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.pm-wb-policy-head h3 { margin:0 0 9px; color:var(--navy); font-size:23px; line-height:1.25; overflow-wrap:anywhere; }
.pm-wb-types { display:flex; flex-wrap:wrap; gap:8px; padding:24px 0; margin-bottom:24px; border-bottom:1px solid var(--line); }
.pm-wb-types button { padding:11px 14px; min-height:44px; background:var(--panel); border:1px solid var(--line-strong); border-radius:8px; font:inherit; color:var(--navy); cursor:pointer; font-size:13px; }
.pm-wb-types button.active { background:var(--good-fill); border-color:var(--good); font-weight:750; }
.pm-wb-concern { padding-left:16px; border-left:4px solid var(--gold-deep); }
.pm-wb-detail h4 { margin:0 0 12px; font-size:19px; line-height:1.35; color:var(--navy); }
.pm-wb-detail p, .pm-wb-elements li { max-width:65ch; font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.pm-wb-concern p { margin:12px 0 20px; }
.pm-wb-pager { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; margin:-10px 0 16px; font-size:12px; color:var(--muted); }
.pm-wb-pager span { margin-right:auto; }
.pm-wb-sources { margin:26px 0; }
.pm-wb-sources > .btn { margin:0 8px 10px 0; }
.pm-wb-source { margin:10px 0; }
.pm-wb-source .btn { white-space:normal; text-align:left; }
.pm-wb-source .cell-sub { display:block; margin-top:5px; }
.pm-wb-elements, .pm-wb-sources details { margin:18px 0; padding:12px 0; border-block:1px solid var(--line); font-size:13px; }
.pm-wb-elements summary, .pm-wb-sources summary { cursor:pointer; color:var(--navy); font-weight:650; }
.pm-wb-caution { display:flex; gap:8px; align-items:flex-start; color:var(--muted); font-size:13px!important; }
.pm-wb-caution svg { flex-shrink:0; margin-top:3px; }
.pm-wb-next { margin:20px 0; }
.pm-wb-actions { display:flex; flex-wrap:wrap; gap:12px; margin:24px 0 14px; }
.pm-wb-decision { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:24px; padding-top:18px; border-top:1px solid var(--line); font-size:13px; }
.pm-wb-decision select { max-width:220px; }
.pm-wb-scope { margin:14px 0 24px; color:var(--muted); }
.pm-wb-scope p { font-size:12px; line-height:1.5; margin:6px 0; }
.pm-wb-notices { margin-bottom:16px; }
.pm-wb-notices p { margin:4px 0; }
.pm-wb-tools { margin:14px 0; border-top:1px solid var(--line); }
.pm-wb-tools > summary { padding:18px 4px; font-size:14px; font-weight:650; color:var(--navy); cursor:pointer; }
@media (max-width:1050px) {
  .pm-workbench { grid-template-columns:minmax(220px, .85fr) minmax(0,1.5fr); }
  .pm-wb-detail { padding:22px 20px; }
  .pm-wb-policy-head { flex-wrap:wrap; }
  .pm-wb-policy > .pill { font-size:10px; padding:3px 6px; }
}
@media (max-width:760px) {
  .pm-workbench { grid-template-columns:1fr; }
  .pm-wb-sidebar { padding:18px; border-right:0; border-bottom:1px solid var(--line); }
  #pmWbList { max-height:230px; }
  .pm-wb-profile { padding-top:16px; }
  .pm-wb-detail { padding:22px 18px; }
  .pm-wb-policy-head h3 { font-size:21px; }
  .pm-wb-heading h2 { font-size:23px; }
  .pm-wb-types { gap:6px; padding:18px 0; }
  .pm-wb-types button { flex:1 1 140px; }
  .pm-wb-actions .btn { flex:1 1 160px; justify-content:center; }
}
.pm-wb-start { display:flex; flex-direction:column; align-items:flex-end; gap:5px; }
.pm-wb-start small { font-size:11px; color:var(--muted); }
.pm-wb-policy > span:first-child { font-size:15px; }
.pm-wb-detail p, .pm-wb-elements li { font-size:15px; }
.pm-wb-detail h4 { font-size:21px; }
.pm-wb-sources .btn { min-height:40px; padding:6px 0; background:transparent; border:0; box-shadow:none; color:var(--link); font-size:14px; font-weight:600; text-decoration:underline; }
.pm-wb-sources .btn:focus-visible { outline:3px solid var(--link); outline-offset:3px; }
.pm-wb-actions > .btn { min-height:46px; padding:12px 20px; font-size:15px; }
.pm-wb-notices { border-left:3px solid var(--gold-deep); background:var(--warn-fill); padding:10px 14px; font-size:13px; }

.pm-wb-detail { scroll-margin-top:95px; }

.pm-wb-caution { display:block; }
.pm-wb-caution > svg { display:inline-block; vertical-align:-3px; margin:0 6px 0 0; }

/* Identify the legal basis separately from the department policy. */
.pm-wb-reason-label { display:block; margin-bottom:6px; color:var(--navy); }
.pm-wb-law-basis { margin-top:22px; padding:18px; border:1px solid var(--line-strong); border-radius:8px; background:var(--surface-2); }
.pm-wb-law-basis h4 { margin-bottom:8px; }
.pm-wb-law-basis > p { margin:8px 0; }
.pm-wb-law-basis .pm-wb-source:last-child { margin-bottom:0; }

.pt-issue-mark { background:var(--gold); color:var(--navy); outline:2px solid var(--gold-deep); scroll-margin:100px; }

.pm-wb-suggestion { margin:22px 0; padding:16px; background:var(--surface-2); border-left:3px solid var(--link); border-radius:6px; }
.pm-wb-suggestion .pm-wb-proposal { white-space:pre-wrap; }
.cite-element-nav { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
.cite-element-nav p { width:100%; margin:4px 0; }
.cite-element-nav .btn { white-space:normal; text-align:left; }
.law-element-mark { background:var(--warn-fill); color:inherit; }
.law-element-mark.active { background:var(--gold); outline:2px solid var(--good); }
.la-source-reader .law-element-mark { background:var(--gold); color:var(--ink); box-shadow:0 1px 0 var(--gold-deep); }
.la-source-reader #pmCiteWarnings { border-left:3px solid var(--warn); background:var(--warn-fill); padding:8px 10px; font-size:12px; }
.la-source-reader #pmCiteWarnings p { margin:3px 0; }
.la-source-reader .cite-modal-text { min-height:72px; }
