:root {
  --bg: #f6f7f8;
  --panel: #ffffff;
  --ink: #17212b;
  --muted: #5b6774;
  --line: #e1e5ea;
  --brand: #0f4c5c;
  --brand-soft: #e3eff2;
  --focus: #1d7fa0;
  --safety: #c0392b;
  --recall: #d35400;
  --label: #be185d;
  --guideline: #1f6fb2;
  --regulation: #0f766e;
  --policy: #4d7c0f;
  --inspection: #92400e;
  --approval: #6d28d9;
  --news: #64748b;
  color-scheme: light;
}
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */
  :root:where([data-theme="dark"]) {
    --bg: #0f1418;
    --panel: #171e24;
    --ink: #e6edf2;
    --muted: #9aa8b5;
    --line: #2a343d;
    --brand: #7cc4d6;
    --brand-soft: #1b2e35;
    --focus: #7cc4d6;
    --safety: #f0766a;
    --recall: #f39c4a;
    --label: #f472b6;
    --guideline: #6aa9e0;
    --regulation: #4fc1b5;
    --policy: #9bc65a;
    --inspection: #d9a05b;
    --approval: #a78bfa;
    --news: #9aa8b5;
    color-scheme: dark;
  }
@media (prefers-color-scheme: dark){
  :root:where(:not([data-theme])) {
    --bg: #0f1418;
    --panel: #171e24;
    --ink: #e6edf2;
    --muted: #9aa8b5;
    --line: #2a343d;
    --brand: #7cc4d6;
    --brand-soft: #1b2e35;
    --focus: #7cc4d6;
    --safety: #f0766a;
    --recall: #f39c4a;
    --label: #f472b6;
    --guideline: #6aa9e0;
    --regulation: #4fc1b5;
    --policy: #9bc65a;
    --inspection: #d9a05b;
    --approval: #a78bfa;
    --news: #9aa8b5;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; text-decoration: none; color: var(--brand); }
.tagline { margin: 0; color: var(--muted); font-size: 14px; flex: 1; min-width: 200px; }
.toplinks { display: flex; gap: 16px; }
.toplinks a { text-decoration: none; color: var(--brand); font-weight: 600; font-size: 14px; }

.layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 24px; }
.filters { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; padding-right: 4px; }
.field { margin-bottom: 20px; }
.field > label, .label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
input[type="search"], select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.chip[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--panel); }
.cats { list-style: none; margin: 0; padding: 0; }
.cat { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px; font-size: 14px; }
.cat:hover { background: var(--brand-soft); }
.cat[aria-pressed="true"] { background: var(--brand-soft); font-weight: 600; }
.cat .n { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--news)); flex: none; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: var(--panel); padding: 6px 4px; font-size: 13px; }
.seg button + button { border-left: 1px solid var(--line); }
.field > .check { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 400; }
.link { border: 0; background: none; padding: 0; color: var(--brand); text-decoration: underline; font-size: 13px; margin-top: 6px; }
.reset { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 12px; font-size: 13px; }
.show-filters { display: none; }

.c-safety { --c: var(--safety); }
.c-recall { --c: var(--recall); }
.c-label { --c: var(--label); }
.c-guideline { --c: var(--guideline); }
.c-regulation { --c: var(--regulation); }
.c-policy { --c: var(--policy); }
.c-inspection { --c: var(--inspection); }
.c-approval { --c: var(--approval); }
.c-news { --c: var(--news); }

.key { margin-bottom: 28px; }
h2 { font-size: 17px; margin: 0 0 12px; }

.listhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.updated { color: var(--muted); font-size: 13px; }
.day { margin: 20px 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--c, var(--news));
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }
.tag { color: var(--c); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.where { border: 0; background: var(--brand-soft); border-radius: 999px; padding: 1px 8px; font-size: 12px; }
.badge { border: 1px solid var(--brand); color: var(--brand); border-radius: 4px; padding: 0 5px; font-size: 11px; font-weight: 600; }
.card h3 { font-size: 16px; line-height: 1.35; margin: 6px 0 4px; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.summary { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.src { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); padding: 24px 0; }
.more { display: block; margin: 16px auto; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 20px; }
.foot { max-width: 1240px; margin: 0 auto; padding: 16px 24px 40px; color: var(--muted); font-size: 13px; }

/* Agencies directory and About */
.page { max-width: 1000px; margin: 0 auto; padding: 24px; }
.page h1 { font-size: 24px; margin: 0 0 8px; }
.page .intro { color: var(--muted); margin: 0 0 24px; }
.region { margin-bottom: 28px; }
.agency-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.agency { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.agency h3 { margin: 0 0 4px; font-size: 15px; }
.agency p { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.agency .links { display: flex; gap: 12px; font-size: 13px; }
.agency .links a { color: var(--brand); }
.prose p, .prose li { max-width: 70ch; }
.prose code { background: var(--brand-soft); padding: 1px 4px; border-radius: 4px; }

@media (max-width: 820px) {
  .top { padding: 10px 16px; }
  .tagline { display: none; }
  .layout { grid-template-columns: 1fr; padding: 16px; gap: 0; }
  .filters { display: none; position: static; max-height: none; overflow: visible; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
  .filters-open .filters { display: block; }
  .show-filters { display: inline-block; margin-bottom: 16px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 14px; }
  .page { padding: 16px; }
  .foot { padding: 16px; }
}

/* Shared header: same links on every page, current page highlighted, Menu button on small screens */
.skip { position: absolute; left: 8px; top: -60px; z-index: 20; background: var(--brand); color: var(--panel); padding: 8px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 8px; }
.toplinks { align-items: center; gap: 4px; flex-wrap: wrap; }
.toplinks a { padding: 6px 10px; border-radius: 8px; }
.toplinks a:hover { background: var(--brand-soft); }
.toplinks a[aria-current="page"] { background: var(--brand-soft); color: var(--ink); text-decoration: none; }
.toplinks a.signin { margin-left: 8px; border: 1px solid var(--brand); }
.menu-btn { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 14px; font-weight: 600; color: var(--brand); }
.menu-btn::before { content: "☰ "; }
.menu-open .menu-btn::before { content: "✕ "; }
@media (max-width: 1180px) { .tagline { display: none; } .top { justify-content: space-between; } }
@media (max-width: 900px) {
  .menu-btn { display: inline-block; }
  .toplinks { display: none; width: 100%; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 6px 0 4px; border-top: 1px solid var(--line); }
  .menu-open .toplinks { display: grid; }
  .toplinks a { padding: 10px 12px; font-size: 15px; }
  .toplinks a.signin { grid-column: 1 / -1; margin: 6px 0 0; text-align: center; }
}

/* Buttons used in page content */
.btn { display: inline-block; border: 1px solid var(--line); background: var(--panel); color: var(--brand); border-radius: 8px; padding: 7px 14px; font-size: 14px; font-weight: 600; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--panel); }

/* First-visit welcome on the updates page */
.welcome { display: flex; gap: 16px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; }
.welcome h2 { margin: 0 0 4px; }
.welcome p { margin: 0; max-width: 68ch; font-size: 14px; }
.welcome-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.layout > main { min-width: 0; }

/* Filters in use, shown above the list */
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; }
.active-filters .label { margin: 0 4px 0 0; }
.active-filters .link { margin: 0 0 0 4px; }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--ink); }
.foot a { color: var(--brand); margin-left: 4px; }

@media (max-width: 820px) {
  /* Comfortable tap targets */
  .chip, .seg button, .cat, .act, .imp-toggle, .reset, .show-filters, .btn, .att-open { min-height: 36px; }
  .welcome { padding: 14px 16px; }
}

/* Impact cards (main list and My PV Briefing) */
.imp-toggle { margin-top: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 3px 10px; font-size: 12px; color: var(--brand); font-weight: 600; }
.imp-toggle[aria-expanded="true"] { background: var(--brand-soft); }
.card.dismissed { opacity: .6; }
.ws-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.ws-badge { border-radius: 4px; padding: 0 6px; font-size: 11px; font-weight: 600; background: var(--brand-soft); color: var(--brand); }
.ws-badge.dim { background: var(--line); color: var(--muted); }
.ws-badge.a-action { background: var(--safety); color: var(--panel); }
.impact { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; display: grid; gap: 12px; }
.impact h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.impact p { margin: 0; }
.impact .changed { font-size: 15px; }
.why { color: var(--muted); font-size: 12px; }
.none { color: var(--muted); font-style: italic; }
.warn { color: var(--recall); font-weight: 600; }
.pot { font-size: 10px; font-weight: 700; border: 1px solid var(--muted); border-radius: 3px; padding: 0 4px; margin-left: 4px; vertical-align: 1px; text-transform: lowercase; letter-spacing: 0; }
.imp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.imp-list { margin: 0; padding-left: 18px; }
.imp-list li { margin-bottom: 3px; }
.imp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.chip-s { border-radius: 999px; padding: 1px 9px; font-size: 12px; border: 1px solid var(--line); background: var(--bg); }
.chip-s.place { background: var(--brand-soft); border-color: transparent; font-weight: 600; }
.chip-s.sub { border-style: dashed; }
.imp-dates { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 0; }
.imp-dates dt { font-weight: 600; font-size: 13px; }
.imp-dates dd { margin: 0; }
.imp-dates dt:has(+ dd + dd) { grid-row: span 2; }
.imp-notes p { margin: 0 0 3px; font-size: 13px; }
.imp-notes:empty { display: none; }
.imp-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.act, .imp-form button, .profile button, .filebtn { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 4px 10px; font-size: 13px; }
.act[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
button.primary, .profile button.primary { background: var(--brand); border-color: var(--brand); color: var(--panel); font-weight: 600; }
.imp-panel:empty { display: none; }
.imp-form { display: grid; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.imp-form label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.imp-form input, .imp-form select, .imp-form textarea, .profile textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.imp-form textarea, .profile textarea { width: 100%; resize: vertical; }
.imp-form input[type="text"] { flex: 1; min-width: 160px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hint { color: var(--muted); font-size: 12px; margin: 0; }
.imp-foot { color: var(--muted); font-size: 11px; }

/* My PV Briefing */
.brief { max-width: 1000px; }
.brief-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.brief-head .intro { margin: 0; }
.scope { font-size: 13px; }
.brief-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.inline { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.inline select { width: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 24px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: grid; }
.tile b { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 12px; }
.tile.hot b { color: var(--brand); }
.tile.safety b { color: var(--safety); }
.brief-sec { margin-bottom: 28px; }
.whyhere { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.profile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 24px; }
.profile h2 { margin-bottom: 2px; }
.profile .hint { margin-bottom: 14px; }
.pf-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.pf-checks { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pf-check { display: flex; align-items: center; gap: 5px; font-size: 13px; }
.pf-region { border: 0; padding: 0; margin: 0 0 10px; }
.pf-region legend { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; padding: 0; }
.pf-data { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.filebtn { cursor: pointer; }
.upcoming { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.upcoming li { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 14px; }
.upcoming time { font-weight: 700; font-variant-numeric: tabular-nums; }
.upcoming a { text-decoration: none; font-weight: 600; }
.upcoming a:hover { text-decoration: underline; }
.dtype { font-size: 11px; font-weight: 700; text-transform: uppercase; border-radius: 4px; padding: 0 6px; background: var(--brand-soft); color: var(--brand); }
.dtype.t-consultation { background: var(--policy); color: var(--panel); }
.dtype.t-effective { background: var(--regulation); color: var(--panel); }
.views { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 18px; }
.views .label { margin: 0 4px 0 0; }
.setup { background: var(--panel); border: 2px solid var(--brand); border-radius: 12px; padding: 18px 20px; margin-bottom: 24px; }
.setup h2 { margin-bottom: 4px; }
.setup .hint { margin-bottom: 14px; }
.step { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 12px; }
.role-card { display: grid; gap: 4px; text-align: left; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 12px 14px; }
.role-card:hover, .role-card:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
.role-card b { font-size: 15px; color: var(--brand); }
.role-card span { font-size: 13px; color: var(--muted); }
.setup input[type="search"] { max-width: 520px; }
.groups-list { display: grid; gap: 10px; margin-bottom: 12px; }
.group-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.group-row input[type="text"] { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.group-row .g-name { font-weight: 600; min-width: 240px; }
.group-row .g-words { flex: 1; min-width: 200px; }
.group-row label { font-size: 13px; display: flex; gap: 6px; align-items: center; }
.group-row select { width: auto; }
.group-row .pf-checks { flex-basis: 100%; }
.brief-sec h2 .n { color: var(--muted); font-weight: 400; }
.small { font-size: 13px; }
.empty.small { padding: 4px 0 8px; }
.statusrow { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 14px; }
.glance, .gaps { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; }
.glance li { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.glance a { color: var(--ink); }
.worktabs { margin-bottom: 12px; max-width: 560px; }
@media (max-width: 820px) {
  .imp-cols, .pf-grid { grid-template-columns: 1fr; }
  .toplinks { gap: 12px; flex-wrap: wrap; }
}

/* "Ask PV Info" launcher, bottom right: labelled pill, round on phones. */
.chat-fab {
  position: fixed;
  z-index: 45;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 11px;
  height: 64px;
  padding: 0 24px 0 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #1a8a9c 0%, #0f5f70 45%, #0f4c5c 100%);
  color: #fff;
  font: 600 15px/1.15 "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(15, 76, 92, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.95);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: chatpop 0.45s ease both 0.3s;
}
.chat-fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: chatpulse 2.2s ease-out 1s 4;
}
.chat-fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 18px 40px rgba(15, 76, 92, 0.55), 0 0 0 3px #fff; }
.chat-fab:focus-visible { outline: 3px solid #f5b301; outline-offset: 3px; }
.chat-fab-ico { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.chat-fab-label { display: grid; gap: 2px; }
.chat-fab-label b { font-size: 16px; font-weight: 750; letter-spacing: -0.01em; }
.chat-fab-label small { font-size: 12px; font-weight: 500; opacity: 0.88; }
.chat-fab-badge { position: absolute; top: -7px; right: 6px; padding: 2px 7px; border-radius: 999px; background: #f5b301; color: #1d1a10; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }
.chat-fab.open { padding: 0 11px; }
.chat-fab.open .chat-fab-label, .chat-fab.open .chat-fab-badge { display: none; }
.chat-fab.open::before { animation: none; }
@keyframes chatpop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes chatpulse { 0% { box-shadow: 0 0 0 0 rgba(26, 138, 156, 0.6); } 100% { box-shadow: 0 0 0 18px rgba(26, 138, 156, 0); } }

.chat-teaser {
  position: fixed;
  z-index: 45;
  right: max(18px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 78px);
  max-width: min(300px, calc(100vw - 36px));
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 4px 18px;
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  animation: chatpop 0.3s ease both;
}

.chat-panel {
  position: fixed;
  z-index: 60;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(max(18px, env(safe-area-inset-bottom)) + 80px);
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 120px));
  height: min(600px, calc(100dvh - 120px));
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: chatin 0.22s ease both;
  transform-origin: bottom right;
}
@keyframes chatin { from { transform: translateY(12px) scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }

.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--brand); color: #fff; }
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */ :where([data-theme="dark"]) .chat-head { color: #0f1418; } @media (prefers-color-scheme: dark){ :where(:not([data-theme])) .chat-head { color: #0f1418; } }
.chat-head div { flex: 1; display: grid; line-height: 1.25; }
.chat-head b { font-size: 16px; }
.chat-head div span { font-size: 12px; opacity: 0.85; }
.chat-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); font-size: 18px; }
.chat-close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.2); color: inherit; font-size: 22px; line-height: 1; }

.chat-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px 6px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 94%; font-size: 14px; line-height: 1.45; }
.chat-msg > p { margin: 0; padding: 9px 13px; border-radius: 16px; }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.bot > p { background: var(--brand-soft); border-bottom-left-radius: 5px; }
.chat-msg.me { align-self: flex-end; }
.chat-msg.me > p { background: var(--brand); color: var(--panel); border-bottom-right-radius: 5px; }
.chat-msg.typing { display: flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--brand-soft); }
.chat-msg.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: chatdot 1s infinite ease-in-out; }
.chat-msg.typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-msg.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatdot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.chat-card { margin-top: 8px; padding: 9px 11px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.chat-card p { margin: 3px 0 0; }
.chat-card-meta { margin: 0 0 3px !important; color: var(--muted); font-size: 12px; }
.chat-card-title { color: var(--ink); font-weight: 650; text-decoration: none; }
.chat-card-title:hover { text-decoration: underline; }
.chat-line { font-size: 13px; color: var(--muted); }
.chat-card-src { color: var(--muted); font-size: 12px; }
.chat-more { display: inline-block; margin-top: 8px; color: var(--brand); font-weight: 600; font-size: 13px; }
.chat-ai-answer { padding: 9px 13px; border-radius: 16px; border-bottom-left-radius: 5px; background: var(--brand-soft); }
.chat-ai-answer p { margin: 0 0 6px; }
.chat-ai-answer p:last-child, .chat-ai-answer ul:last-child { margin-bottom: 0; }
.chat-ai-list { margin: 0 0 6px; padding-left: 18px; }
.chat-ai-list li { margin: 2px 0; }
.chat-cite { color: var(--brand); font-size: 12px; font-weight: 650; text-decoration: none; vertical-align: super; line-height: 0; }
.chat-cite:hover { text-decoration: underline; }
.chat-ai-note { margin: 6px 2px 0 !important; padding: 0 !important; background: none !important; color: var(--muted); font-size: 11px; }

.chat-chips { display: flex; gap: 6px; overflow-x: auto; padding: 6px 12px; scrollbar-width: none; }
.chat-chips:empty { display: none; }
.chat-chip { flex: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 13px; white-space: nowrap; }
.chat-chip:hover { background: var(--brand-soft); }

.chat-form { display: flex; gap: 8px; padding: 8px 12px 4px; }
.chat-input { flex: 1; min-width: 0; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font: inherit; font-size: 16px; }
.chat-send { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--brand); color: var(--panel); font-size: 15px; }
.chat-foot { margin: 0; padding: 4px 14px 10px; color: var(--muted); font-size: 11px; line-height: 1.35; }

/* Phones: the chat takes the whole screen, like a messaging app. */
@media (max-width: 560px) {
  .chat-panel { inset: 0; width: auto; height: auto; border-radius: 0; border: 0; }
  .chat-panel:not([hidden]) ~ .chat-fab { display: none !important; }
  .chat-fab { width: 64px; padding: 0; justify-content: center; }
  .chat-fab-label { display: none; }
  .chat-fab-ico { background: none; }
  .chat-fab-badge { right: -4px; }
  .chat-teaser { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 76px); }
  .chat-head { padding-top: max(12px, env(safe-area-inset-top)); }
  .chat-foot { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .chat-fab, .chat-fab::before, .chat-panel, .chat-teaser, .chat-msg.typing span { animation: none; }
}

/* PV Globe */
.globepage { background: radial-gradient(ellipse at 40% 50%, #0b2230 0%, #03070c 70%); color: #fff; overflow: hidden; height: 100vh; height: 100dvh; }
.globe-canvas { position: fixed; inset: 0; touch-action: none; cursor: grab; }
.globe-canvas:active { cursor: grabbing; }
.globe-top { position: fixed; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 14px; padding: max(14px, env(safe-area-inset-top)) 18px 14px; }
.globe-top .brand { color: #fff; }
.globe-title { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.globe-title b { font-size: 17px; }
.globe-title span { color: rgba(255, 255, 255, 0.65); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.globe-chip { color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px; padding: 5px 12px; font-size: 13px; text-decoration: none; white-space: nowrap; }
.globe-chip:hover { background: rgba(255, 255, 255, 0.1); }

.globe-card {
  position: fixed;
  z-index: 2;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: min(380px, 34vw);
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(6, 20, 28, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.globe-card-head { display: flex; flex-direction: column; gap: 2px; padding-right: 20px; }
.globe-card-place { font-size: 18px; font-weight: 800; }
.globe-card-meta { color: rgba(255, 255, 255, 0.7); font-size: 13px; }
.globe-card-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 10px; }
.globe-card-list li { border-left: 3px solid var(--c, #9aa8b5); padding-left: 10px; }
.globe-card-list a { color: #fff; font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; display: block; }
.globe-card-list a:hover { text-decoration: underline; }
.globe-card-list span { color: rgba(255, 255, 255, 0.6); font-size: 12px; }
.globe-card-more { color: #7cc4d6; font-size: 13px; font-weight: 600; text-decoration: none; }
.globe-card-close { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: #fff; font-size: 22px; }
.globepage .c-safety { --c: #f0766a; }
.globepage .c-recall { --c: #f39c4a; }
.globepage .c-label { --c: #f472b6; }
.globepage .c-guideline { --c: #6aa9e0; }
.globepage .c-regulation { --c: #4fc1b5; }
.globepage .c-policy { --c: #9bc65a; }
.globepage .c-inspection { --c: #d9a05b; }
.globepage .c-approval { --c: #a78bfa; }

.globe-legend { position: fixed; left: 18px; bottom: 18px; z-index: 1; display: flex; flex-direction: column; gap: 4px; color: rgba(255, 255, 255, 0.7); font-size: 12px; pointer-events: none; }
.globe-legend span { display: flex; align-items: center; gap: 8px; }
.globe-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-alert { box-shadow: 0 0 0 2px rgb(255, 90, 90); background: #fff; }
.lg-update { box-shadow: 0 0 0 2px rgb(160, 240, 255); background: #fff; }
.lg-body { background: #ffd166; }
.globe-hint { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 1; margin: 0; text-align: center; color: rgba(255, 255, 255, 0.5); font-size: 13px; pointer-events: none; }
.globe-empty { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; }

@media (max-width: 700px) {
  .globe-top .brand span { display: none; }
  .globe-card { left: 16px; right: 16px; top: auto; bottom: max(16px, env(safe-area-inset-bottom)); transform: none; width: auto; max-height: 42vh; overflow: auto; }
  .globe-hint { bottom: auto; top: 72px; }
  .globe-legend { display: none; }
}

/* Account, team queue and archive (database features) */
.team-line { margin: 2px 0 6px; font-size: 13px; }
.imp-notes .team-line { margin: 0 0 3px; }
.ws-badge.overdue { background: var(--safety); border-color: var(--safety); color: var(--panel); margin-right: 6px; }
.imp-form .hint:empty { display: none; }
.members li .act { margin-left: auto; }
.log time { font-weight: 400; color: var(--muted); font-size: 12px; min-width: 70px; }
code.invite { font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; overflow-wrap: anywhere; }
.archive-form { display: grid; gap: 10px; }
.archive-form input, .archive-form select { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.archive-form input[type="search"] { flex: 1; min-width: 220px; }
#teams form input, #me input { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
#teams h3 { margin: 12px 0 6px; }

/* Research & Innovation */
.r-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.r-tabs button { border: 0; border-bottom: 3px solid transparent; background: none; padding: 8px 12px; font-weight: 600; color: var(--muted); }
.r-tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.r-tabs .n { font-weight: 400; }
.r-watching .listhead, .r-watching #list, .r-watching #more, .r-watching #health { display: none !important; }
.r-watch h2 { margin-top: 20px; }
.r-card { --c: var(--guideline); }
.r-card.r-retracted { --c: var(--safety); }
.r-type { font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--guideline); }
.r-type.t-preprint { color: var(--recall); }
.r-type.t-review { color: var(--regulation); }
.badge.warnb { border-color: var(--recall); color: var(--recall); }
.badge.s-retracted, .badge.s-concern { border-color: var(--safety); background: var(--safety); color: var(--panel); }
.badge.s-corrected { border-color: var(--inspection); color: var(--inspection); }
.r-mat { border-radius: 4px; padding: 0 6px; font-size: 11px; font-weight: 600; background: var(--line); color: var(--ink); }
.r-mat.m-experimental { background: var(--brand-soft); color: var(--brand); }
.r-mat.m-external { background: var(--regulation); color: var(--panel); }
.r-mat.m-operational { background: var(--policy); color: var(--panel); }
.r-by { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.r-q { font-weight: 600; }
.r-card .imp-chips button { cursor: pointer; }
.r-card .imp-actions a.act, .r-paper a.act { text-decoration: none; display: inline-block; }
.r-health { margin: 8px 0; font-size: 13px; color: var(--muted); }
.r-health ul { margin: 6px 0; padding-left: 18px; }
.r-paper h1 { font-size: 22px; line-height: 1.3; margin: 8px 0; }
.r-author { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-decoration: underline dotted; }
.r-author[aria-pressed="true"] { color: var(--brand); font-weight: 600; }
.r-alert { border-radius: 8px; padding: 10px 14px; font-weight: 600; background: var(--brand-soft); }
.r-alert.s-retracted, .r-alert.s-concern { background: var(--safety); color: var(--panel); }
.r-basis { margin: 14px 0 8px; padding: 8px 12px; border-left: 3px solid var(--brand); background: var(--brand-soft); font-size: 14px; }
.r-lensrow { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0 4px; }
.r-lensrow .label { margin: 0; }
.r-lens { min-width: 300px; }
.r-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 12px 0; }
.r-sec h2 { margin: 0 0 2px; font-size: 16px; }
.r-sec .hint { margin-bottom: 8px; }
.r-sec.r-interp { border-style: dashed; }
.r-sec summary { font-weight: 600; cursor: pointer; }
.r-sec textarea { width: 100%; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.r-quote { margin: 6px 0; padding: 4px 0 4px 12px; border-left: 3px solid var(--line); }
.r-quote cite { display: block; color: var(--muted); font-size: 12px; font-style: normal; margin-top: 2px; }
@media (max-width: 560px) { .r-lens { min-width: 0; width: 100%; } }
.r-timing #list, .r-timing #more { display: none !important; }
.tl-head { display: grid; gap: 10px; margin-bottom: 12px; }
.tl-head .seg { width: auto; }
.tl-head .seg button { padding: 4px 10px; }
.tl-wide-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.k-publication { --k: var(--guideline); }
.k-preprint { --k: var(--recall); }
.k-dataset { --k: var(--approval); }
.k-implementation { --k: var(--policy); }
.k-guidance { --k: var(--regulation); }
.tl-chip[aria-pressed="true"] { background: var(--k); border-color: var(--k); }
.tl { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); margin-left: 8px; }
.tl-month { margin: 18px 0 6px -22px; padding-left: 22px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tl-item { position: relative; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--k); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.tl-item.k-guidance { border-style: dashed; border-left-style: solid; }
.tl-item.r-retracted { opacity: .75; }
.tl-dot { position: absolute; left: -31px; top: 14px; width: 14px; height: 14px; border-radius: 50%; background: var(--k); border: 3px solid var(--bg); }
.tl-item.k-guidance .tl-dot { border-radius: 3px; }
.tl-item.k-preprint .tl-dot { background: var(--panel); box-shadow: inset 0 0 0 3px var(--k); }
.tl-date { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 8px; }
.tl-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--k); margin-right: 6px; }
.tl-item h3 { font-size: 15px; margin: 4px 0 2px; line-height: 1.35; }
.tl-item h3 a { text-decoration: none; }
.tl-contrib { margin: 4px 0; font-size: 14px; }
.tl-rel { margin: 4px 0; font-size: 13px; }
.tl-item .badge, .tl-item .r-mat { margin-right: 4px; }
@media (min-width: 1000px) {
  .tl-wide { border-left: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; background: linear-gradient(var(--line), var(--line)) center / 2px 100% no-repeat; }
  .tl-wide .tl-month { grid-column: 1 / -1; text-align: center; margin: 18px 0 6px; padding: 0; }
  .tl-wide .tl-l { grid-column: 1; }
  .tl-wide .tl-r { grid-column: 2; }
  .tl-wide .tl-dot { display: none; }
}
.r-review { border-left: 3px solid var(--policy); padding: 6px 12px; background: var(--brand-soft); font-size: 13px; margin: 8px 0; }
.r-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.r-boxes .check, .imp-form .check { font-weight: 400; }
.r-history { margin-top: 8px; font-size: 13px; }
.page .r-tabs { flex-wrap: wrap; }
.tl-head .seg button { white-space: nowrap; }

/* Data freshness strip (every page) and the Data status page */
.freshness { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: center; padding: 6px 24px; font-size: 13px; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--line); }
.freshness a { color: var(--brand); font-weight: 600; }
.freshness.f-warn { color: var(--ink); background: color-mix(in srgb, var(--recall) 12%, var(--panel)); }
.freshness.f-stale { color: var(--ink); background: color-mix(in srgb, var(--safety) 14%, var(--panel)); font-weight: 600; }
.st-summary { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--regulation); border-radius: 10px; padding: 12px 16px; margin: 16px 0 24px; }
.st-summary p { margin: 4px 0; }
.st-summary.f-warn { border-left-color: var(--recall); }
.st-summary.f-stale { border-left-color: var(--safety); }
.st-head { font-weight: 700; font-size: 16px; }
.st-problems { padding-left: 20px; }
.st-table-wrap { overflow-x: auto; margin-bottom: 24px; }
.st-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.st-table th, .st-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.st-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.st-table tr.st-bad td { color: var(--safety); }
.st-note { color: var(--muted); font-size: 14px; }
.st-more summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-bottom: 8px; }

/* Company Explorer (companies.html, company.html) */
.co-draft { background: var(--brand-soft); border: 1px dashed var(--brand); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.co-search { margin-bottom: 24px; }
.co-combo { position: relative; max-width: 640px; }
.co-combo input { width: 100%; font-size: 17px; padding: 10px 12px; }
.co-suggest { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgb(0 0 0 / .12); max-height: 360px; overflow: auto; }
.co-suggest li { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.co-suggest small { color: var(--muted); font-size: 12px; }
.co-suggest .co-opt[aria-selected="true"], .co-suggest .co-opt:hover { background: var(--brand-soft); }
.co-suggest .co-opt-note { cursor: default; background: var(--bg); font-size: 13px; }
.co-examples .link { margin: 0; font-size: 13px; }
.co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-bottom: 20px; }
.co-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.co-card h3 { margin: 0 0 2px; font-size: 16px; }
.co-card h3 a { text-decoration: none; color: var(--brand); }
.co-card h3 a:hover { text-decoration: underline; }
.co-card p { margin: 0 0 4px; font-size: 13px; }
.co-sub, .co-via { color: var(--muted); }
.co-meta { font-size: 13px; }
.co-cov { display: inline-block; border-radius: 4px; padding: 0 6px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); }
.co-cov::before { margin-right: 4px; }
.cov-mapped { border-color: var(--regulation); color: var(--regulation); }
.cov-mapped::before { content: "●"; }
.cov-partial { border-color: var(--guideline); color: var(--guideline); }
.cov-partial::before { content: "◐"; }
.cov-not-mapped { color: var(--muted); border-style: dashed; }
.cov-not-mapped::before { content: "○"; }
.co-pub { font-size: 12px; color: var(--muted); }
.co-amb { background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 6px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.co-prods { margin-top: 8px; }
.co-prod-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.co-prod-list li { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.co-kind { display: inline-block; min-width: 72px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.co-prod-cos { color: var(--muted); }
.co-browse { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-end; }
.co-browse .field { margin-bottom: 8px; }
.co-browse select { width: auto; min-width: 200px; }
.co-az summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.co-az-list { columns: 3 220px; padding-left: 18px; font-size: 14px; }
.co-az-list li { break-inside: avoid; margin-bottom: 2px; }
.co-coverage { margin-top: 32px; }
.co-coverage h3 { font-size: 15px; margin: 16px 0 6px; }
.co-limits { margin: 0; padding-left: 16px; font-size: 13px; }
.co-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.co-title h1 { margin: 0; }
.co-page .intro { margin-bottom: 8px; }
.co-facts { padding-left: 18px; }
.co-facts li { margin-bottom: 4px; }
.co-lane { border-radius: 4px; padding: 0 6px; font-size: 11px; font-weight: 700; border: 1px solid currentColor; }
.lane-direct { color: var(--safety); }
.lane-substance { color: var(--label); }
.lane-class { color: var(--guideline); }
.lane-corporate { color: var(--muted); }
.co-label { font-size: 12px; color: var(--muted); }
.co-outside { font-style: italic; }
.co-filters { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.co-filters .field { margin: 0; }
.co-filters select, .co-filters input[type="search"] { width: auto; min-width: 160px; }
.co-filters > .check { display: flex; gap: 6px; align-items: center; font-size: 13px; align-self: center; }
.co-scope { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.co-scope .check { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.co-table td small { font-size: 11px; }
@media (max-width: 560px) {
  .co-filters { flex-direction: column; }
  .co-filters select, .co-filters input[type="search"] { width: 100%; }
  .co-kind { display: block; }
}

/* Admin console */
.ad-jump { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; font-size: 14px; }
#ad-msg:not(:empty) { position: sticky; top: 0; z-index: 2; background: var(--brand-soft); color: var(--ink); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 14px; }
.co-request { margin-top: 24px; }
#app input:not([type=checkbox]):not([type=radio]), #app select { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
#app .imp-form label { flex-wrap: wrap; }
.ad-menu { list-style: none; padding: 0; margin: 0 0 12px; max-width: 420px; }
.ad-menu li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 4px; background: var(--panel); }
.ad-menu li.off { opacity: .6; }
.ad-menu button { min-width: 32px; }

/* Admin → Data sources */
.page.brief.wide { max-width: 1440px; }
.ds-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.ds-card { display: grid; gap: 2px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--news); border-radius: 10px; padding: 10px 14px; font: inherit; color: var(--ink); cursor: pointer; }
.ds-card b { font-size: 26px; font-variant-numeric: tabular-nums; }
.ds-card small { color: var(--muted); font-size: 12px; }
.ds-card[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); }
.ds-card.k-active { border-left-color: var(--regulation); }
.ds-card.k-paused { border-left-color: var(--news); }
.ds-card.k-failing { border-left-color: var(--safety); }
.ds-card.k-stale { border-left-color: var(--recall); }
.ds-tools { margin-bottom: 12px; }
.ds-tools input[type="search"] { flex: 1; min-width: 220px; }
.ds-tools select, .ds-tools input[type="search"] { width: auto; }
.ds-tools input, .ds-tools select { font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.ds-table { font-size: 13px; min-width: 1500px; }
.ds-table td { white-space: normal; }
.ds-url { min-width: 220px; max-width: 300px; overflow-wrap: anywhere; }
.ds-table td:first-child { min-width: 170px; }
.ds-url code { font-size: 12px; }
.ds-when { white-space: nowrap; }
.ds-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ds-acts { display: flex; flex-wrap: wrap; gap: 4px; min-width: 150px; }
.ds-acts button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 6px; padding: 3px 8px; font-size: 12px; }
.ds-h, .ds-s { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); white-space: nowrap; }
.ds-h.h-successful { color: var(--regulation); border-color: currentColor; }
.ds-h.h-failed { background: var(--safety); border-color: var(--safety); color: var(--panel); }
.ds-h.h-stale { color: var(--recall); border-color: currentColor; }
.ds-h.h-never { color: var(--muted); }
.ds-s.s-active { background: var(--brand-soft); }
.ds-s.s-paused { border-style: dashed; }
.ds-s.s-draft { color: var(--muted); border-style: dotted; }
#ds-panel:not(:empty) { margin-bottom: 18px; }
.ds-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 0; display: grid; gap: 8px; }
.ds-form legend { font-weight: 700; font-size: 13px; padding: 0 4px; }
.ds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 14px; }
#app .imp-form label.ds-field, .ds-field { display: grid; gap: 3px; align-content: start; font-size: 13px; font-weight: 600; }
.ds-field .check { font-weight: 400; }
.ds-field input:not([type=radio]):not([type=checkbox]), .ds-field select, .ds-field textarea { width: 100%; box-sizing: border-box; }
.ds-field .check { display: flex; align-items: center; gap: 6px; }
#ds-gen { color: var(--muted); font-size: 12px; }
.ds-test { border: 1px solid var(--line); border-left: 4px solid var(--news); border-radius: 8px; padding: 8px 12px; background: var(--panel); }
.ds-test.ok { border-left-color: var(--regulation); }
.ds-test.bad { border-left-color: var(--safety); }
.ds-facts { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; }
.ds-samples { margin: 4px 0; padding-left: 20px; font-size: 13px; display: grid; gap: 4px; }
.ds-kept { color: var(--regulation); font-size: 12px; font-weight: 600; }
.ds-diff { margin: 4px 0; padding-left: 18px; font-size: 12px; }
.ds-diff del { color: var(--safety); }
.ds-diff ins { color: var(--regulation); text-decoration: none; }
.ds-log li { display: block; }
.ds-creds .members { margin: 0; }
.cov-table td:first-child { min-width: 200px; }
@media (max-width: 700px) { .ds-tools select, .ds-tools input[type="search"] { width: 100%; } }

/* Public Safety Data Resources (resources.html) and its admin page */
.rs-coverage { background: var(--brand-soft); border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; font-size: 14px; }
.rs-coverage summary { cursor: pointer; font-weight: 600; }
.rs-coverage p { margin: 8px 0 0; max-width: 80ch; }
.rs-guide { margin-bottom: 18px; }
.rs-guide h2 { font-size: 17px; margin: 0 0 8px; }
.rs-guide-qs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.rs-q { text-align: left; }
.rs-search { margin-bottom: 10px; }
.rs-search .row input { flex: 1; min-width: 220px; }
.rs-search button { border-radius: 8px; padding: 8px 16px; border: 1px solid var(--brand); }
.rs-filters { align-items: flex-end; margin-bottom: 8px; }
.rs-sel { display: flex; flex-direction: column; gap: 2px; min-width: 150px; flex: 1 1 150px; max-width: 240px; }
.rs-sel .label { margin: 0; }
.rs-understood { margin: 4px 0 8px; align-items: center; }
.rs-group { font-size: 17px; margin: 22px 0 10px; }
.rs-card { --c: var(--brand); }
.rs-card.rs-broken { --c: var(--recall); }
.rs-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.rs-head h3 { margin-top: 2px; }
.rs-org { margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.rs-fav { flex: none; }
.rs-collected { background: var(--brand-soft); border-color: transparent; color: var(--brand); font-weight: 600; }
.rs-purpose { margin: 8px 0; font-size: 14px; }
.rs-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; margin: 8px 0; font-size: 13px; }
.rs-facts h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.rs-facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 0 0 4px; }
.rs-facts dt { font-weight: 600; }
.rs-facts dd, .rs-facts p { margin: 0; }
.rs-reuse { font-weight: 600; }
.rs-reuse.u-open { color: var(--regulation); }
.rs-reuse.u-permission { color: var(--recall); }
.rs-links { margin: 10px 0 6px; }
.rs-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.rs-foot .link { border: 0; background: none; padding: 0; color: var(--brand); text-decoration: underline; font-size: 12px; cursor: pointer; }
.rs-form { margin-top: 8px; }
.rs-field { display: grid !important; gap: 3px; }
.rs-field input, .rs-field textarea { width: 100%; }
.rs-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.rs-suggest { margin-top: 28px; }
.rs-admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.rs-admin-form .wide { grid-column: 1 / -1; }
.rs-admin-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 0; }
.rs-admin-form legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 4px; }
.rs-admin-form textarea, .rs-admin-form input:not([type=checkbox]):not([type=radio]), .rs-admin-form select { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.rs-inbox li { margin-bottom: 10px; }
@media (max-width: 720px) {
  .rs-facts, .rs-admin-form { grid-template-columns: 1fr; }
  .rs-sel { max-width: none; }
}

/* Private company briefing: scope confirmation before evidence and assessment. */
.portfolio-page { max-width:1200px; }
.portfolio-steps { display:flex; gap:2rem; flex-wrap:wrap; padding:16px 32px; background:var(--brand-soft); border-radius:12px; }
.company-choices { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:8px; margin-top:12px; }
.co-choice { display:grid; gap:5px; text-align:left; padding:14px; border:1px solid var(--line); border-radius:10px; background:var(--panel); }
.co-choice:hover { border-color:var(--brand); background:var(--brand-soft); }
#company-search { width:min(100%,560px); margin-top:8px; }
.portfolio-markets { display:flex; flex-wrap:wrap; gap:20px; border:1px solid var(--line); border-radius:10px; margin-bottom:16px; }
.portfolio-products { max-height:420px; overflow:auto; border:1px solid var(--line); border-radius:10px; margin:12px 0 20px; }
.portfolio-product { padding:12px 16px; border-bottom:1px solid var(--line); }
.portfolio-product .check { display:flex; align-items:start; gap:10px; }
.portfolio-product .hint { display:block; margin:4px 0; }
.portfolio-evidence { padding-left:22px; font-size:13px; color:var(--muted); }
.company-context { border-left:3px solid var(--brand); background:var(--brand-soft); padding:14px; margin-bottom:16px; }
.portfolio-item .btn { margin-top:8px; }
.portfolio-page .row { flex-wrap:wrap; gap:8px; }
@media(max-width:600px) { .portfolio-steps{display:grid;gap:8px;} .portfolio-page .row>input{width:100%;} .portfolio-products{max-height:360px;} .portfolio-page .tiles{grid-template-columns:repeat(2,1fr);} }
/* Company Action Center */
.action-page{max-width:1440px}.action-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:18px 0}.action-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:.9rem}.action-field input,.action-field select,.action-field textarea{width:100%;box-sizing:border-box;min-width:0}.action-filters .action-field{flex:1;min-width:160px}.action-counts button{cursor:pointer;text-align:left}.action-counts [aria-pressed=true]{outline:2px solid var(--accent,#0f4c5c)}.action-layout{display:grid;grid-template-columns:minmax(230px,1fr) minmax(0,2fr);gap:24px;margin-top:24px}.action-case{display:flex;flex-direction:column;gap:9px;width:100%;text-align:left;padding:16px;margin-bottom:12px;border:1px solid #cddddd;border-radius:12px;background:var(--surface,#fff);color:inherit;cursor:pointer;overflow-wrap:anywhere}.action-case.selected{border:2px solid #0f4c5c;background:#edf7f5}.action-case .meta{font-size:.8rem}.action-form,.action-evidence{padding:18px;border:1px solid #d7e3e2;border-radius:12px;margin:16px 0;background:var(--surface,#fff)}.action-form{display:grid;gap:14px}.action-form h3{margin:0}.action-event{border-bottom:1px solid #e0e8e7;padding:12px 0;overflow-wrap:anywhere}.action-candidate{display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid #d7e3e2;padding:12px 0}.action-candidate span{overflow-wrap:anywhere}#case-detail{min-width:0;overflow-wrap:anywhere}#case-detail h2{font-size:1.4rem}#case-detail a{overflow-wrap:anywhere}@media(max-width:760px){.action-layout{grid-template-columns:1fr}.action-filters .action-field{min-width:130px}.action-candidate{align-items:start;flex-direction:column}.action-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.action-form,.action-evidence{padding:14px}}
/* Grouped navigation: native disclosures work with keyboard and touch. */
.toplinks .nav-direct{display:flex;align-items:center;gap:8px}.nav-direct .nav-words small{display:none}.nav-icon{display:grid;place-items:center;flex:none;width:30px;height:30px;border-radius:9px;background:var(--brand-soft);color:var(--brand);font-size:19px;font-weight:500}.nav-direct .nav-icon{background:transparent;width:20px;height:20px}.nav-words{display:flex;flex-direction:column;gap:4px;min-width:0}.nav-words strong{font-weight:650}.nav-words small{font-size:12px;line-height:1.4;color:var(--muted);font-weight:400}.nav-group{position:relative}.nav-group-title{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none;padding:10px 13px;border-radius:10px;color:var(--brand);font-size:14px;font-weight:650;user-select:none}.nav-group-title::-webkit-details-marker{display:none}.nav-group-title:hover,.nav-group[open]>.nav-group-title{background:var(--brand-soft)}.nav-group[data-current]>.nav-group-title{background:var(--brand-soft);color:var(--ink)}.nav-chevron{transition:transform .15s;font-size:17px}.nav-group[open] .nav-chevron{transform:rotate(180deg)}.nav-panel{position:absolute;z-index:40;left:0;top:calc(100% + 8px);min-width:290px;padding:8px;border:1px solid var(--line);border-radius:16px;background:var(--panel);box-shadow:0 16px 40px #12394024}.toplinks .nav-panel a{display:flex;gap:11px;align-items:center;padding:11px;border-radius:11px;font-size:14px}.nav-group-title:focus-visible,.toplinks a:focus-visible{outline:3px solid #58a8a3;outline-offset:2px}.menu-preview{display:flex!important;gap:4px;flex-wrap:wrap}.menu-preview .nav-panel{z-index:45}.menu-preview-wrap{padding:16px;border:1px solid #cae2de;border-radius:16px;background:linear-gradient(120deg,#f0faf7,#f3f7fc);margin:20px 0}.menu-eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:10px;font-weight:800;color:var(--muted);display:block;margin-bottom:8px}.menu-studio-title{display:flex;align-items:center;justify-content:space-between;gap:16px}.menu-studio-title h2{margin:0}.menu-studio-title p{margin-bottom:0}.menu-note{font-size:13px;padding:12px 16px;border-left:3px solid #58a8a3;background:#f2f8f7;border-radius:0 10px 10px 0;color:var(--muted)}.menu-group-card{border:1px solid var(--line);border-radius:16px;background:var(--panel);margin:16px 0;overflow:hidden}.menu-group-head{display:flex;align-items:center;gap:14px;padding:16px;background:#f6f9fb;border-bottom:1px solid var(--line)}.menu-group-symbol{display:grid;place-items:center;width:42px;height:42px;background:#dceeea;color:var(--brand);border-radius:13px;font-size:15px;font-weight:800;flex:none}.menu-group-name{flex:1;min-width:0}.menu-group-name label{font-size:11px;color:var(--muted);display:flex;flex-direction:column;gap:3px}.menu-group-name input{font-weight:700;font-size:16px;background:transparent;border:1px solid transparent;border-radius:6px;padding:4px 6px;color:var(--ink);max-width:300px;width:100%;box-sizing:border-box}.menu-group-name input:focus{border-color:var(--brand);background:white}.menu-group-name .hint{font-size:11px}.menu-item-row{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid #edf1f3}.menu-item-row:last-child{border-bottom:0}.menu-item-row.is-hidden{background:#f7f8fa;color:var(--muted)}.menu-item-icon{font-size:20px;width:28px;text-align:center;color:var(--brand)}.menu-item-name{flex:1;min-width:110px}.menu-item-name input{border:1px solid transparent;border-radius:6px;padding:5px;width:100%;box-sizing:border-box;color:inherit;background:transparent;font-weight:600}.menu-item-name input:focus{border-color:var(--brand)}.menu-item-name small{display:block;padding-left:5px;font-size:10px;color:var(--muted)}.menu-visibility{font-size:12px;white-space:nowrap}.menu-destination{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}.menu-destination select{max-width:170px;padding:7px;border:1px solid var(--line);border-radius:8px;font-size:12px;background:var(--panel);color:var(--ink)}.menu-move{display:flex;gap:4px;align-items:center}.menu-icon-btn{width:30px;height:30px;background:var(--panel);border:1px solid var(--line);border-radius:8px;color:var(--brand);cursor:pointer}.menu-icon-btn:disabled{opacity:.3;cursor:default}.menu-studio-actions{display:flex;gap:10px;flex-wrap:wrap;position:sticky;bottom:12px;background:#fffffff0;border:1px solid var(--line);border-radius:12px;padding:12px;z-index:5;box-shadow:0 4px 20px #12394010}.menu-empty{padding:12px 16px}@media(max-width:900px){.menu-open .toplinks{grid-template-columns:1fr;gap:6px}.nav-group-title{padding:13px 12px;font-size:15px;justify-content:space-between}.nav-panel{position:static;min-width:0;margin:5px 0 8px 10px;box-shadow:none;border-radius:12px}.toplinks .nav-direct{padding:12px}.menu-preview .nav-group{width:100%}.menu-preview .nav-direct{width:100%}}@media(max-width:640px){.menu-studio{padding:14px}.menu-studio-title{align-items:start;flex-direction:column}.menu-group-head{flex-wrap:wrap;padding:12px;gap:8px}.menu-group-head>.menu-move{margin-left:auto}.menu-group-name{min-width:140px}.menu-item-row{display:grid;grid-template-columns:24px minmax(0,1fr) auto;padding:12px;gap:8px}.menu-visibility{grid-column:3;grid-row:1}.menu-destination{grid-column:2;grid-row:2}.menu-destination select{width:100%;max-width:160px}.menu-item-row>.menu-move{grid-column:3;grid-row:2}.menu-item-name{min-width:0}.menu-studio-actions>*{flex:1}.menu-preview-wrap{padding:10px}}

/* Pharmacovigilance (PV) Info: visual identity refresh. Existing page grids stay intact. */
:root{--bg:#f4f7f9;--ink:#19313d;--muted:#5e7180;--line:#dce6eb;--brand:#125568;--brand-soft:#e7f2f2;--focus:#187e91}
body{-webkit-font-smoothing:antialiased}
.top{padding-top:14px;padding-bottom:14px;gap:20px;border-bottom-color:var(--line);box-shadow:0 3px 18px #133d4d06}
.brand{gap:11px;flex:none;letter-spacing:-.025em}
.brand img{width:40px;height:40px;flex:none;border-radius:11px;box-shadow:0 4px 10px #16495616}
.brand-name{display:flex;flex-direction:column;font-size:18px;font-weight:750;line-height:1.15}
.brand-short{font-size:11px;line-height:1.4;font-weight:650;letter-spacing:.09em;color:var(--muted);margin-top:4px}
.tagline{font-size:12px;letter-spacing:.015em;line-height:1.6;min-width:160px;max-width:290px}
.toplinks{margin-left:auto}
.nav-group-title,.toplinks .nav-direct{font-size:13px;border-radius:10px}
.toplinks a.signin{border-color:var(--line);background:var(--panel);padding:9px 13px;border-radius:10px;box-shadow:0 2px 4px #19394805}
.nav-panel{border-radius:14px;box-shadow:0 16px 40px #11364218}
.layout>.filters{padding:18px 16px;background:var(--panel);border:1px solid var(--line);border-radius:15px;box-shadow:0 4px 18px #183f4c04}
.layout>.filters .field:last-child{margin-bottom:0}
.field>label,.label{font-size:11px;letter-spacing:.075em}
input[type=search],select{padding:10px 12px;border-radius:9px}
input[type=search]:focus-visible,select:focus-visible{outline:3px solid color-mix(in srgb,var(--focus) 24%,transparent);outline-offset:1px;border-color:var(--focus)}
.chip{padding:5px 11px}.cat{padding:8px 9px;border-radius:8px}.cat[aria-pressed=true]{color:var(--brand);box-shadow:inset 3px 0 var(--brand)}
.welcome{background:linear-gradient(120deg,var(--brand-soft),var(--panel));border-radius:16px;padding:20px 22px;border-color:var(--line)}
.welcome h2{font-size:19px;letter-spacing:-.02em}.welcome p{line-height:1.6}
.btn,.reset,.more{border-radius:9px;padding:9px 14px}.btn.primary{box-shadow:0 3px 8px #12556818}
.card{border-radius:14px;padding:16px 18px;margin-bottom:13px;box-shadow:0 3px 12px #153c4a05}
.card h3{font-size:17px;line-height:1.45;letter-spacing:-.015em;margin:9px 0 7px;font-weight:680}
.card .summary{line-height:1.65;margin-bottom:10px}.card .src{padding-top:5px;line-height:1.5}.card .meta{gap:7px}
.key-grid .card h3{font-size:15px}.key-grid .card{padding:15px 16px}
.where{padding:3px 9px}.badge{border-radius:5px;padding:1px 6px;font-size:10px;letter-spacing:.025em}
.day{font-size:11px;letter-spacing:.1em;font-weight:750;margin-top:25px}.listhead{padding-bottom:10px;margin-bottom:8px}.listhead h2{font-size:20px;letter-spacing:-.025em}
.profile,.agency,.co-card{border-radius:14px;box-shadow:0 3px 14px #183e4d04}
.page>h1{letter-spacing:-.035em}.page>.intro{line-height:1.7}
@media(hover:hover) and (prefers-reduced-motion:no-preference){.card{transition:box-shadow .16s ease,transform .16s ease}.card:hover{box-shadow:0 8px 22px #153c4a0c;transform:translateY(-1px)}.btn,.chip,.reset,.more{transition:background-color .15s ease,box-shadow .15s ease}}
@media(max-width:1480px){.top>.tagline{display:none}}
@media(max-width:1020px) and (min-width:901px){.top{gap:12px;padding-left:18px;padding-right:18px}.brand-name{font-size:16px}.brand img{width:36px;height:36px}.nav-group-title,.toplinks .nav-direct{padding-left:8px;padding-right:8px;font-size:12px}}
@media(max-width:900px){.top{gap:12px;padding:11px 16px}.brand-name{font-size:16px}.brand img{width:36px;height:36px}.brand-short{font-size:10px;margin-top:3px}.toplinks{margin-left:0}.menu-btn{padding:8px 11px;border-radius:9px;font-size:12px}.layout>.filters{position:static;margin-bottom:18px;padding:16px}.card{padding:15px;border-radius:12px}.card h3{font-size:16px}.welcome{padding:18px}.nav-group-title,.toplinks .nav-direct{font-size:14px}}
@media(max-width:360px){.brand{gap:8px}.brand-name{font-size:14px}.brand img{width:32px;height:32px}.top{padding-left:12px;padding-right:12px;gap:8px}.menu-btn{padding:7px 8px}}
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */:root:where([data-theme="dark"]){--bg:#0c1821;--panel:#16242e;--ink:#e8f0f4;--muted:#a0b5c2;--line:#2b3f4b;--brand:#8bd1d8;--brand-soft:#1c3540;--focus:#8bd1d8}:where([data-theme="dark"]) .top{box-shadow:0 3px 18px #0002}:where([data-theme="dark"]) .card{box-shadow:0 3px 12px #0001}:where([data-theme="dark"]) .brand-short{color:#a0b5c2}@media (prefers-color-scheme: dark){:root:where(:not([data-theme])){--bg:#0c1821;--panel:#16242e;--ink:#e8f0f4;--muted:#a0b5c2;--line:#2b3f4b;--brand:#8bd1d8;--brand-soft:#1c3540;--focus:#8bd1d8}:where(:not([data-theme])) .top{box-shadow:0 3px 18px #0002}:where(:not([data-theme])) .card{box-shadow:0 3px 12px #0001}:where(:not([data-theme])) .brand-short{color:#a0b5c2}}

/* Shared tool scope notice: visible even without JavaScript. */
.pv-safety-notice{padding:16px 20px;margin:16px 0 24px;border:1px solid var(--line);border-left:4px solid var(--brand);border-radius:12px;background:var(--panel);color:var(--ink);font-size:14px;line-height:1.65;overflow-wrap:anywhere}.pv-safety-notice p{margin:6px 0}.pv-safety-notice a{font-weight:650}.pv-notice-page{max-width:900px;margin:auto;padding:32px 22px 70px;line-height:1.8;overflow-wrap:anywhere}.pv-notice-page h2{font-size:21px;margin-top:32px}.pv-notice-footer{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;text-align:center;padding:24px;font-size:13px;border-top:1px solid var(--line);margin-top:30px}

/* Compact, searchable workspace launcher. Saved navigation order is preserved. */
.nav-panel{width:min(640px,calc(100vw - 32px));min-width:0;max-height:min(680px,72vh);overflow:auto;overscroll-behavior:contain;padding:14px;border-radius:20px;background:var(--panel)}
.nav-panel-heading{font-size:11px;text-transform:uppercase;letter-spacing:.1em;font-weight:750;color:var(--muted);padding:3px 7px 10px}.nav-search{width:100%;box-sizing:border-box;border:1px solid var(--line);background:var(--brand-soft);color:var(--ink);border-radius:11px;padding:10px 12px;font:inherit;font-size:13px;margin-bottom:10px}.nav-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.toplinks .nav-grid a{min-width:0;align-items:flex-start;border:1px solid transparent;padding:10px}.nav-grid a:hover{border-color:var(--line);background:var(--brand-soft);transform:translateY(-1px)}.nav-grid .nav-icon{width:34px;height:34px;border-radius:11px;background:linear-gradient(140deg,var(--brand-soft),#d7eceb)}.nav-grid .nav-words small{font-size:11px;line-height:1.4}.nav-grid .nav-words strong{font-size:13px}.nav-panel [hidden]{display:none!important}.nav-empty{font-size:13px;padding:10px;color:var(--muted)}.nav-panel-note{font-size:12px;line-height:16px;color:var(--muted);margin:-6px 7px 8px}
.brief-workspace{padding:24px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(125deg,var(--panel) 65%,var(--brand-soft));margin:24px 0 30px}.brief-work-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:20px}.brief-work-heading h2{margin:5px 0}.brief-eyebrow{font-size:10px;letter-spacing:.14em;font-weight:800;color:var(--brand);margin:0}.brief-work-art{font-size:42px;color:var(--brand);background:var(--brand-soft);width:72px;height:72px;display:grid;place-items:center;border-radius:22px;flex:none;transform:rotate(-6deg)}.brief-workspace .worktabs{display:flex;flex-wrap:wrap;gap:6px;border:0;background:transparent;margin-bottom:18px}.brief-workspace .worktabs button{border:1px solid var(--line);border-radius:12px!important;font-size:13px;padding:11px 16px}.brief-workspace .worktabs [aria-selected=true]{background:var(--brand);color:white;box-shadow:0 5px 14px #0f4c5c22}.brief-workspace .card{background:var(--panel)}
@media(max-width:900px){.nav-panel{width:auto;max-height:60vh;margin-left:0}.nav-grid{grid-template-columns:1fr}.nav-grid .nav-words small{display:none}.toplinks .nav-grid a{align-items:center}.brief-workspace{padding:16px}.brief-work-art{width:48px;height:48px;border-radius:15px;font-size:28px}.brief-workspace .worktabs button{flex:1 1 120px}.brief-work-heading .hint{font-size:12px}}

.menu-search-label{display:grid;gap:8px;margin:20px 0;font-size:13px;font-weight:650}.menu-search-label input{max-width:520px;width:100%;box-sizing:border-box;border:1px solid var(--line);padding:12px;border-radius:12px;background:var(--panel);color:var(--ink)}.menu-item-row[hidden]{display:none!important}.brief-tile-icon{display:grid!important;place-items:center;width:34px;height:34px;border-radius:11px;background:var(--brand-soft);color:var(--brand);font-size:20px!important;margin-bottom:9px}.tiles .tile{border-radius:17px;border:1px solid var(--line);background:var(--panel);box-shadow:0 3px 12px #12394006}

.chat-panel.chat-expanded{width:min(820px,calc(100vw - 40px));height:min(850px,calc(100dvh - 90px))}.chat-expand,.chat-clear{border:0;background:transparent;color:inherit;font-size:21px;cursor:pointer;padding:5px;border-radius:7px}.chat-head>div{flex:1;min-width:0}.chat-head>div>span{line-height:1.3}.chat-gap{padding:10px;border-left:3px solid #c48a34;background:var(--brand-soft);border-radius:6px;font-size:12px}.chat-log a{overflow-wrap:anywhere}.chat-log .chat-chip{white-space:normal;text-align:left}.chat-expanded .chat-log{padding:18px}.chat-expanded .chat-msg{max-width:94%}@media(max-width:600px){.chat-panel.chat-expanded{inset:0;width:auto;height:auto}.chat-head{gap:6px}.chat-head>div>span{font-size:10px}.chat-expand,.chat-clear{padding:4px}}

.chat-research-term{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.chat-research-term input{width:160px}.chat-log details{margin-top:10px;border:1px solid var(--line);padding:9px;border-radius:10px}.chat-log summary{cursor:pointer;font-weight:600}.chat-log .chat-card p{overflow-wrap:anywhere}.chat-log details p{white-space:pre-wrap;overflow-wrap:anywhere}

.chat-msg{min-width:0;overflow-wrap:anywhere}
.chat-research-passage{max-height:260px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;padding:10px;background:var(--brand-soft);border-radius:8px}

/* Impact levels and actionability (triage.js) */
.tier { border-radius: 4px; padding: 0 6px; font-size: 11px; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; }
.tier-critical { color: var(--safety); }
.tier-major { color: var(--inspection); }
.tier-minor { color: var(--regulation); }
.act-badge { border-radius: 4px; padding: 0 6px; font-size: 11px; font-weight: 600; background: var(--safety); color: var(--panel); white-space: nowrap; }
.seg button .n, .chip .n { font-size: 11px; opacity: .75; font-variant-numeric: tabular-nums; }
.hint-link { margin-left: 4px; font-weight: 400; text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; font-size: 11px; }
.imp-triage { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.imp-triage .tier, .imp-triage .act-badge { font-size: 13px; padding: 1px 8px; }

/* Mark as reviewed (review-control.js) and the review log page */
.rv-box { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 8px; }
.rv-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rv-link { font-size: 12px; }
.rv-line { margin: 4px 0 0; font-size: 12px; color: var(--regulation); }
.rv-line.o-withdrawn { color: var(--muted); text-decoration: line-through; }
.rl-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; }

/* Impact card toggle: a clear call to action on every update */
.imp-toggle { margin-top: 10px; border: 1px solid var(--brand); background: var(--brand); color: var(--panel); border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 700; box-shadow: 0 1px 3px #0f4c5c33; }
.imp-toggle::before { content: "⚡ "; }
.imp-toggle:hover { filter: brightness(1.1); }
.imp-toggle[aria-expanded="true"] { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
/* Context tags on the impact card */
.imp-context { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 10px 0 4px; font-size: 13px; }
.imp-context dt { color: var(--muted); font-weight: 600; }
.imp-context dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.chip-s.ctx-productTypes { border-color: var(--approval); }
.chip-s.ctx-areas { border-color: var(--guideline); }
.chip-s.ctx-populations { border-color: var(--policy); }
.chip-s.ctx-concerns { border-color: var(--safety); }
@media (max-width: 600px) { .imp-context { grid-template-columns: 1fr; } .imp-context dt { margin-top: 4px; } }
/* Label compare (label-compare.js) */
.lc-sec { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 0 0 16px; }
.lc-sec.absent { opacity: .7; padding: 12px 20px; }
.lc-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.lc-head h2 { font-size: 18px; margin: 0; }
.lc-status { font-size: 12px; font-weight: 600; color: var(--muted); }
.lc-status.s-changed, .lc-status.s-section-added, .lc-status.s-section-removed { color: var(--safety); }
.lc-table table { table-layout: fixed; }
.lc-table td { width: 50%; white-space: pre-wrap; }
.lc-sec ins, .lc-key ins { background: #d6f5dd; color: #0b4d1c; text-decoration: none; border-radius: 2px; }
.lc-sec del, .lc-key del { background: #fbd9d6; color: #7a1610; border-radius: 2px; }
.lc-added td:last-child { background: color-mix(in srgb, #d6f5dd 35%, transparent); }
.lc-deleted td:first-child { background: color-mix(in srgb, #fbd9d6 35%, transparent); }
.lc-skip td { color: var(--muted); font-size: 11px; text-align: center; padding: 6px; }
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */
  :where([data-theme="dark"]) .lc-sec ins, :where([data-theme="dark"]) .lc-key ins { background: #1d4a2a; color: #c7f2d2; }
  :where([data-theme="dark"]) .lc-sec del, :where([data-theme="dark"]) .lc-key del { background: #5a1f1a; color: #ffd2cc; }
@media (prefers-color-scheme: dark){
  :where(:not([data-theme])) .lc-sec ins, :where(:not([data-theme])) .lc-key ins { background: #1d4a2a; color: #c7f2d2; }
  :where(:not([data-theme])) .lc-sec del, :where(:not([data-theme])) .lc-key del { background: #5a1f1a; color: #ffd2cc; }
}
.lc-pick .check { flex-direction: row; align-items: center; font-size: 12px; }
/* Territory mapping (territory.js) */
.terr-badge { border-radius: 4px; padding: 0 6px; font-size: 11px; font-weight: 600; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.imp-terr { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 6px 6px 0; }
.imp-terr p { margin: 0 0 4px; }
/* Signal timeline (timeline.js) */
.st-form { grid-template-columns: 2fr 2fr auto; }
.st-list { list-style: none; padding: 0; margin: 10px 0 0; border-left: 2px solid var(--line); }
.st-ev { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 0 8px 12px; position: relative; }
.st-ev::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.st-evidence::before { background: var(--approval); }
.st-signal::before { background: var(--inspection); }
.st-action::before { background: var(--safety); }
.st-ev time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.st-meta { margin: 0; font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.st-title { margin: 2px 0; font-weight: 600; }
.st-follow li { margin: 4px 0; }
@media (max-width: 600px) { .st-form { grid-template-columns: 1fr; } .st-ev { grid-template-columns: 1fr; } }
.imp-anchors{display:flex;flex-wrap:wrap;gap:.35rem .8rem;align-items:baseline}

/* "For your role" shortcuts on the home page (PV roles; defaults only, never access) */
.role-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 20px; background: var(--panel); }
.role-shortcuts h2 { margin: 0; font-size: 15px; }
.role-shortcut-links { display: flex; flex-wrap: wrap; gap: 6px; }
.role-shortcut-links a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; text-decoration: none; }
.role-shortcut-links a:hover, .role-shortcut-links a:focus-visible { border-color: var(--brand); }
.role-shortcut-note { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); }
.role-shortcut-note a { color: inherit; }
.role-card.suggested { border-color: var(--brand); }
.suggested-badge { justify-self: start; font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 1px 8px; }
.role-nudge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; margin: -4px 0 14px; color: var(--muted); }
.team-defaults { display: grid; gap: 8px; margin: 8px 0 12px; } .team-defaults select { width: 100%; max-width: 480px; }

/* Impact assessment sections of an Action Center case (impact-assessment.js) */
.ia-panel{margin:16px 0;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--panel);min-width:0}
.ia-panel h3{margin:0 0 6px}.ia-panel h4{margin:14px 0 6px;font-size:1rem}
.ia-section{border-top:1px solid var(--line);padding:10px 0;min-width:0}
.ia-section>summary{cursor:pointer;font-weight:700;padding:4px 0;line-height:1.6}
.ia-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}.ia-head h4{margin:0}
.ia-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.ia-grid3{grid-template-columns:repeat(3,minmax(0,1fr))}
.ia-panel textarea{width:100%;box-sizing:border-box;font:inherit}
.ia-panel input,.ia-panel select{max-width:100%;box-sizing:border-box}
.ia-areas{border:1px solid var(--line);border-radius:10px;padding:8px 12px;display:flex;flex-wrap:wrap;gap:6px 16px;min-width:0;margin:0}
.ia-areas legend{font-size:.9rem;padding:0 4px}
.ia-check{display:inline-flex;align-items:center;gap:6px;font-size:.9rem;overflow-wrap:anywhere}
.ia-criteria{font-size:.88rem}.ia-criteria ul{margin:4px 0 8px;padding-left:20px}
.ia-lifecycle{display:grid;gap:6px}
.ia-lc-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(8rem,1fr) minmax(0,2fr);gap:8px;align-items:center;padding:4px 0;border-bottom:1px solid var(--line)}
.ia-lc-row input,.ia-lc-row select{width:100%}
.ia-lc-head{font-size:.8rem;color:var(--muted);font-weight:700}
.ia-pill{display:inline-block;border-radius:999px;padding:2px 10px;font-size:.75rem;font-weight:650;white-space:nowrap;border:1px solid currentColor;line-height:1.5}
.ia-l0{color:var(--regulation);background:color-mix(in srgb,var(--regulation) 12%,transparent)}
.ia-l1{color:var(--inspection);background:color-mix(in srgb,var(--inspection) 14%,transparent)}
.ia-l2{color:var(--recall);background:color-mix(in srgb,var(--recall) 14%,transparent)}
.ia-l3{color:var(--safety);background:color-mix(in srgb,var(--safety) 14%,transparent)}
.ia-l4{color:var(--panel);background:var(--safety);border-color:var(--safety)}
.ia-done,.ia-none{color:var(--muted);background:transparent}
.ia-clocks{padding:10px 0}
.ia-clock-list{list-style:none;margin:8px 0;padding:0}
.ia-clock-list li{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(0,1.6fr) auto;gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line);font-size:.9rem}
.ia-clock-name{font-weight:650}
.ia-policy ul{margin:6px 0;padding-left:20px;font-size:.88rem}
.ia-entry,.ia-task{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:8px 0;overflow-wrap:anywhere}
.ia-entry p,.ia-task p{margin:4px 0}
.ia-decision{border-left:4px solid var(--brand)}.ia-assumption{border-left:4px solid var(--inspection)}
.ia-tag{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.ia-task.editing{border-color:var(--brand)}
.ia-config,.ia-config-view{border:1px dashed var(--line);border-radius:10px;padding:8px 12px;margin:6px 0;min-width:0}
.ia-actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.ia-trace{list-style:none;display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:8px 0}
.ia-trace li{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:4px 10px;font-size:.82rem;color:var(--muted)}
.ia-trace li.has{color:var(--ink);border-color:var(--brand);background:var(--brand-soft)}
.ia-trace b{font-variant-numeric:tabular-nums}
.action-case .ia-pill{align-self:flex-start}
.ia-sla-grid{display:grid;grid-template-columns:minmax(0,2fr) repeat(3,minmax(0,1fr));gap:6px 10px;align-items:center;font-size:.9rem}
.ia-sla-grid input{width:100%;box-sizing:border-box}
@media(max-width:760px){.ia-panel{padding:12px}.ia-grid,.ia-grid3{grid-template-columns:1fr}.ia-lc-row{grid-template-columns:1fr 1fr}.ia-lc-row>span:first-child{grid-column:1/-1;font-weight:650}.ia-lc-head{display:none}.ia-clock-list li{grid-template-columns:minmax(0,1fr) auto}.ia-clock-list li>.hint{grid-column:1/-1}.ia-sla-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.ia-sla-grid>.ia-sla-label{grid-column:1/-1}}
.ia-clock-list .ia-pill{justify-self:end}
/* Dark mode for the Action Center cards and forms (they used a fixed white surface). */
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */:where([data-theme="dark"]) .action-case,:where([data-theme="dark"]) .action-form,:where([data-theme="dark"]) .action-evidence{background:var(--panel);border-color:var(--line)}:where([data-theme="dark"]) .action-case.selected{background:var(--brand-soft);border-color:var(--brand)}:where([data-theme="dark"]) .action-event,:where([data-theme="dark"]) .action-candidate{border-color:var(--line)}@media (prefers-color-scheme: dark){:where(:not([data-theme])) .action-case,:where(:not([data-theme])) .action-form,:where(:not([data-theme])) .action-evidence{background:var(--panel);border-color:var(--line)}:where(:not([data-theme])) .action-case.selected{background:var(--brand-soft);border-color:var(--brand)}:where(:not([data-theme])) .action-event,:where(:not([data-theme])) .action-candidate{border-color:var(--line)}}
.cc-summary{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px 14px;margin:8px 0;font-size:.9rem}.cc-summary dt{font-weight:650;color:var(--muted)}.cc-summary dd{margin:0;overflow-wrap:anywhere}
@media(max-width:560px){.cc-summary{grid-template-columns:1fr}.cc-summary dd{margin-bottom:6px}}

/* Impact card → company case form and the Action Center "From impact cards" handoffs. */
.card-case h4{margin:0}.card-case .card-case-fields{flex-wrap:wrap}.card-case label{flex-wrap:wrap;min-width:0;max-width:100%}.card-case select{max-width:100%;min-width:0}.card-case p,.action-card-handoffs p{overflow-wrap:anywhere}
.action-card-handoffs .action-candidate>div{flex:1 1 220px;min-width:0}.action-card-handoffs .action-candidate p{margin:2px 0}.action-card-handoffs label{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-weight:600;font-size:13px;margin:8px 0}.action-card-handoffs select{max-width:100%}
/* The impact card fits a 390 px phone: grid items may shrink and long badges wrap. */
.impact{grid-template-columns:minmax(0,1fr)}.impact>*{min-width:0}.impact .imp-triage .act-badge{white-space:normal}.impact a{overflow-wrap:anywhere}
.about-tagline{font-size:17px;font-weight:650;color:var(--brand);margin:4px 0 18px}.about-mission{padding:6px 24px 14px;margin:0 0 28px;border:1px solid var(--line);border-left:4px solid var(--brand);border-radius:12px;background:var(--panel);scroll-margin-top:90px}.about-mission h2{margin-top:16px}.about-mission p{margin:10px 0;line-height:1.75}.about-mission .about-mission-key{font-weight:700}@media(max-width:600px){.about-mission{padding:4px 16px 10px}}
/* Impact assessment phase 2: Action Center tabs, assessment register, global and local cases,
   prepared questions, lessons learned, similar assessments. Existing tokens only (dark mode via :root). */
.ac-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:4px 0 16px;overflow-x:auto;scrollbar-width:none}
.ac-tabs::-webkit-scrollbar{display:none}
.ac-tabs [role=tab]{flex:none;background:none;border:0;border-bottom:3px solid transparent;border-radius:0;padding:10px 14px;font:inherit;font-weight:700;color:var(--muted);cursor:pointer}
.ac-tabs [role=tab]:hover{color:var(--ink)}
.ac-tabs [role=tab][aria-selected=true]{color:var(--brand);border-bottom-color:var(--brand)}
.ac-tabs [role=tab]:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
.ia2-register-view{min-width:0}
.ia2-reg-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}.ia2-reg-head h2{margin:0}
.ia2-reg-filters input,.ia2-reg-filters select{max-width:100%;box-sizing:border-box}
.ia2-register-wrap{min-width:0}
.ia2-register{width:100%;border-collapse:collapse;font-size:.9rem;background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.ia2-register th,.ia2-register td{text-align:left;padding:8px 10px;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:break-word;word-break:normal}
.ia2-reg-filters input[type=date]{min-height:44px;box-sizing:border-box;border:1px solid var(--line);border-radius:11px;background:var(--panel);color:var(--ink);padding:0 12px;font:inherit}
.ia2-register thead th{font-size:.78rem;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.ia2-register tbody tr:hover{background:var(--brand-soft)}
.ia2-sub{display:block;font-size:.8rem}
.ia2-global{color:var(--approval);background:color-mix(in srgb,var(--approval) 12%,transparent)}
.ia2-local{color:var(--guideline);background:color-mix(in srgb,var(--guideline) 12%,transparent)}
.ia2-links{margin:6px 0;padding-left:20px;font-size:.9rem}
.ia2-link-row{align-items:flex-end}
.ia2-differs{display:inline-block;margin-left:4px;border-radius:999px;padding:0 8px;font-size:.72rem;font-weight:700;color:var(--inspection);background:color-mix(in srgb,var(--inspection) 14%,transparent)}
.ia2-compare-block{margin:10px 0}
.ia2-compare-wrap{position:relative;overflow-x:auto;max-width:100%;border:1px solid var(--line);border-radius:10px}
.ia2-compare{border-collapse:collapse;font-size:.85rem;min-width:100%}
.ia2-compare caption{text-align:left;padding:6px 10px}
.ia2-compare th,.ia2-compare td{text-align:left;vertical-align:top;padding:6px 10px;border-bottom:1px solid var(--line);min-width:9rem;max-width:22rem;overflow-wrap:anywhere}
.ia2-compare tbody th{font-weight:650;color:var(--muted)}
.ia2-compare td.ia2-diff{background:color-mix(in srgb,var(--inspection) 16%,transparent);box-shadow:inset 3px 0 0 var(--inspection)}
.ia2-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ia2-label{font-weight:650;border-left:4px solid var(--inspection);padding:4px 10px;background:color-mix(in srgb,var(--inspection) 8%,transparent);border-radius:0 8px 8px 0}
.ia2-q{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:8px 0;overflow-wrap:anywhere}
.ia2-q.prepared{border-left:4px solid var(--regulation)}
.ia2-q p{margin:4px 0}.ia2-q-text{font-weight:650}.ia2-q-src{font-size:.85rem}
.ia2-prep{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:6px}
.ia2-prep input[type=text]{flex:1 1 14rem;min-width:0;max-width:100%;box-sizing:border-box}
.ia2-lesson{border-left:4px solid var(--regulation)}
.ia2-tags{display:flex;flex-wrap:wrap;gap:4px}
.ia2-tag{font-size:.75rem;border:1px solid var(--line);border-radius:999px;padding:1px 8px;color:var(--muted)}
.ia2-lessons-mini{border-top:1px dashed var(--line);margin-top:6px;padding-top:4px;font-size:.88rem}
.ia2-inherited{margin:6px 0}
@media(max-width:760px){
 .ia2-register thead{display:none}
 .ia2-register,.ia2-register tbody,.ia2-register tr,.ia2-register td{display:block;width:100%;box-sizing:border-box}
 .ia2-register tr{border-bottom:2px solid var(--line);padding:6px 0}
 .ia2-register td{border:0;padding:3px 10px;display:grid;grid-template-columns:7.5rem minmax(0,1fr);gap:8px}
 .ia2-register td::before{content:attr(data-label);font-size:.75rem;font-weight:700;color:var(--muted)}
}
.cc-list{margin:0;padding-left:18px}.cc-list li{margin:2px 0}
/* Report schedule (Company Briefing) and next aggregate reports (phase 4) */
.rs-section{margin-top:24px}
.rs-note{margin:8px 0}
.rs-list{display:grid;gap:14px;margin:16px 0}
.rs-product{border:1px solid var(--line);border-radius:12px;padding:14px 16px;background:var(--panel);min-width:0;overflow-wrap:anywhere}
.rs-product header{display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline}
.rs-product h3{margin:0;font-size:1.05rem}
.rs-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:12px;margin:12px 0}
.rs-field{display:flex;flex-direction:column;gap:4px;font-size:.9rem;min-width:0}
.rs-field[hidden]{display:none}
.rs-field input,.rs-field select{padding:8px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);width:100%;box-sizing:border-box;font:inherit}
.rs-wide{grid-column:1/-1}
.rs-cite{font-size:.82rem;color:var(--muted)}
.rs-table-wrap{overflow-x:auto;max-width:100%}
.rs-table{border-collapse:collapse;width:100%;font-size:.9rem}
.rs-table th,.rs-table td{border-bottom:1px solid var(--line);padding:6px 8px;text-align:left;vertical-align:top}
.rs-consider summary,.rs-sources summary{cursor:pointer;color:var(--brand);font-weight:600;margin:8px 0}
.rs-consider ul,.rs-sources ul{padding-left:20px;line-height:1.6}
.rs-next{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.rs-next li{display:grid;grid-template-columns:6.5rem minmax(0,1fr);gap:10px;align-items:start;overflow-wrap:anywhere}
.rs-next time{font-weight:700;color:var(--brand)}
.rs-next span{display:block;font-size:.85rem;color:var(--muted)}
.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}
/* Major change insight cards (Leadership, phase 4) */
.mc-section{margin:24px 0}
.mc-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr));gap:14px}
.mc-card{background:var(--panel);color:var(--ink);border:1px solid var(--line);border-left:4px solid var(--safety);border-radius:14px;padding:16px 18px;min-width:0;overflow-wrap:anywhere}
.mc-card h3{font-size:1.02rem;line-height:1.45;margin:8px 0}
.mc-card dl{display:grid;grid-template-columns:minmax(6rem,auto) minmax(0,1fr);gap:4px 10px;font-size:.88rem;margin:10px 0}
.mc-card dt{color:var(--muted);font-weight:600}
.mc-card dd{margin:0}
.mc-card ul{padding-left:18px;font-size:.86rem;line-height:1.55}
.mc-card summary{cursor:pointer;color:var(--brand)}
.mc-days{display:inline-block;border-radius:16px;padding:3px 10px;font-size:.8rem;font-weight:700;background:var(--brand-soft);color:var(--brand)}
.mc-days[data-urgent]{background:var(--safety);color:#fff}
.mc-basis{font-size:.8rem;color:var(--muted)}

/* Priority (auto-triage): colour only for Critical and High; status is carried in words. */
.pri-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 6px 0 2px; }
.pri-chip { display: inline-flex; align-items: center; gap: 2px; min-height: 24px; box-sizing: border-box; border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; border: 1px solid var(--line); color: var(--muted); background: var(--panel); text-decoration: none; font-family: inherit; cursor: default; }
button.pri-chip, a.pri-chip { cursor: pointer; }
button.pri-chip:hover, a.pri-chip:hover { border-color: currentColor; }
button.pri-chip:focus-visible, a.pri-chip:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (pointer: coarse) { button.pri-chip, a.pri-chip { min-height: 32px; } }
.pri-chip .pri-dot { font-size: 9px; }
/* Who set it (slice 3): "✓ Reviewed" (a saved human decision) in bold with the glyph; automatic marks (AI-set,
   needs review) in plain weight with no glyph, never styled like a confirmation. Words carry it, not colour. */
.pri-chip .pri-name { margin-left: 2px; }
.pri-chip .pri-mark { margin-left: 0; }
.pri-chip .pri-mark.pri-auto, .pri-chip .pri-mark.pri-hold { font-weight: 500; }
.pri-chip .pri-mark.pri-reviewed { font-weight: 700; }
.pri-chip.pri-is-reviewed { border-width: 1.5px; background: color-mix(in srgb, currentColor 8%, var(--panel)); }   /* a light fill of the chip's own colour, so it differs from awaiting review without depending on hue */
.pri-critical { color: var(--safety); border-color: var(--safety); }
.pri-high { color: var(--inspection); border-color: var(--inspection); }
.pri-word.pri-critical, .pri-word.pri-high { border: 0; }
.chip.pri-filter.pri-critical, .chip.pri-filter.pri-high { border-color: currentColor; }
.pri-date { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
p.pri-date { margin: 2px 0 4px; }
.pri-panel .pri-status { margin: 4px 0; }
.pri-panel .pri-why { margin: 6px 0; }
.pri-table { overflow-x: auto; }
.pri-table table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.pri-table th, .pri-table td { text-align: left; vertical-align: top; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.pri-table thead th { font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.pri-table .pri-lvl { white-space: nowrap; }
.pri-num { color: var(--muted); font-variant-numeric: tabular-nums; }
.pri-ev { overflow-wrap: anywhere; color: var(--muted); }
.pri-missing, .pri-grey { color: var(--muted); font-size: 12px; }
.pri-more { margin: 6px 0; }
.pri-more > summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.pri-facts { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 2px 12px; margin: 6px 0; font-size: 12.5px; }
.pri-facts dt { color: var(--muted); }
.pri-facts dd { margin: 0; overflow-wrap: anywhere; }
.pri-key { font-size: 13px; }
@media (max-width: 520px) {
  .pri-facts { grid-template-columns: minmax(0, 1fr); } .pri-facts dd { margin-bottom: 4px; }
  .pri-table thead { display: none; }
  .pri-table tr { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
  .pri-table th, .pri-table td { border: 0; padding: 1px 0; }
  .pri-table .pri-ev { grid-column: 1 / -1; }
}
.pri-pa-views { margin: 8px 0; padding-left: 20px; line-height: 1.55; }
.pri-pa-views li { margin: 4px 0; }
.pri-src { margin: 8px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pri-verify { margin: 6px 0; padding: 6px 10px; border-left: 3px solid var(--brand, currentColor); border-radius: 0 6px 6px 0; background: var(--brand-soft, transparent); background: color-mix(in srgb, var(--brand) 14%, var(--panel, #fff)); font-size: 13px; }
.pri-story ul { margin: 6px 0; padding-left: 20px; font-size: 12.5px; line-height: 1.5; }
.pri-story li { margin: 3px 0; overflow-wrap: anywhere; }
/* Home topic menu: sub-topics of the open topic, and the Out of scope link */
.subcats { list-style: none; margin: 2px 0 6px 18px; padding: 0 0 0 8px; border-left: 1px solid var(--line, #e5e7eb); }
.cat.sub { font-size: 13px; padding: 5px 8px; min-height: 32px; }
.cats .oos { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line, #e5e7eb); }
.cats .oos .cat { color: var(--muted); font-size: 13px; }
.cat[aria-current="true"] { font-weight: 600; color: var(--brand); }
.cats .oos .cat[aria-pressed="true"] { color: var(--brand); }
@media (pointer: coarse) { .cat.sub, .cats .oos .cat { min-height: 44px; } }
.oos-note { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.tag.oos-reason { color: var(--muted); }
/* Quick triage (PV Info triage editors only): button beside Impact card, dialog on desktop, bottom sheet on phone */
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qt-btn { margin-top: 10px; border: 1px solid var(--brand); background: var(--panel); color: var(--brand); border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 700; min-height: 36px; cursor: pointer; }
.qt-btn:hover { background: var(--brand-soft); }
.qt-dialog { width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--panel); color: var(--ink); box-shadow: 0 12px 32px #0f4c5c33; }
.qt-dialog::backdrop { background: #17212b55; }
.qt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qt-head h2 { margin: 0; font-size: 17px; }
.qt-x { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; width: 36px; height: 36px; font-size: 18px; cursor: pointer; }
.qt-item { margin: 6px 0 10px; color: var(--muted); font-size: 13px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.qt-label { display: block; margin: 10px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.qt-tierline { margin: 0; font-size: 14px; }
.qt-tierline strong { font-size: 18px; }
.qt-why { margin: 6px 0 0; font-size: 14px; }
.qt-meter { position: relative; height: 8px; border-radius: 999px; background: var(--line); margin-top: 4px; }
.qt-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--recall); }
.qt-bar { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.qt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.qt-actions .btn { flex: 1 1 140px; min-height: 44px; }
.qt-change { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.qt-change textarea { width: 100%; box-sizing: border-box; font: inherit; }
.qt-change > .btn { width: 100%; margin-top: 8px; min-height: 44px; }
.qt-tiers { display: flex; flex-wrap: wrap; gap: 6px; }
.qt-tier { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.qt-tier[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); font-weight: 700; box-shadow: inset 0 0 0 1px var(--brand); }
.qt-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: 12px; font-size: 13px; }
.qt-ok { padding: 10px 12px; border-radius: 8px; background: var(--brand-soft); border: 1px solid var(--brand); }
.qt-conflict { padding: 10px 12px; border-radius: 8px; background: #fdf1e7; border: 1px solid var(--recall); }
.qt-conflict p { margin: 4px 0 0; }
.qt-err { margin-top: 10px; padding: 8px 10px; border-radius: 8px; background: #fbeaea; border: 1px solid var(--safety); }
.qt-live:empty { display: none; }
.qt-skel { height: 12px; margin: 8px 0; border-radius: 6px; background: var(--line); }
@media (max-width: 600px) {
  .qt-dialog { margin: auto 0 0; width: 100vw; max-width: 100vw; max-height: 85vh; border-radius: 16px 16px 0 0; box-sizing: border-box; }
}
/* dark theme: html[data-theme=dark], or the device setting when nothing is saved */ :where([data-theme="dark"]) .qt-conflict { background: #3a2414; } :where([data-theme="dark"]) .qt-err { background: #3a1616; } @media (prefers-color-scheme: dark){ :where(:not([data-theme])) .qt-conflict { background: #3a2414; } :where(:not([data-theme])) .qt-err { background: #3a1616; } }
.qt-foot > a { border: 0; background: none; padding: 0; min-height: 0; font-weight: 700; color: var(--brand); }
.qt-body > .qt-actions:not(:first-child) { border-top: 1px solid var(--line); padding-top: 12px; }
.qt-meter { background: var(--brand-soft); margin: 6px 0 8px; }
.qt-head h2:focus { outline: none; }
.qt-head h2:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.qt-next { margin-top: 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); }
.qt-next .qt-label { margin-top: 0; }
.qt-next p { margin: 4px 0 0; font-size: 14px; }
.qt-links .link { font: inherit; font-weight: 700; color: var(--brand); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.qt-links a { font-weight: 700; color: var(--brand); }
.qt-editor { margin-top: 12px; }
.qt-editor .qt-actions { margin-top: 4px; }
.qt-editor a.btn { text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
/* Attachments in home updates (Phase 1): paperclip on the card, list in the impact card. */
.att-chip { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 600; color: var(--ink); background: var(--panel); }
.att-list { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 6px; }
.att-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--panel); }
.att-type { flex: none; min-width: 42px; text-align: center; border-radius: 4px; padding: 3px 6px; line-height: 1.2; font-size: 11px; font-weight: 700; color: var(--panel); background: var(--news); }
.att-type.t-pdf { background: var(--safety); }
.att-type.t-doc, .att-type.t-docx { background: var(--guideline); }
.att-type.t-xls, .att-type.t-xlsx { background: var(--regulation); }
.att-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.att-name { font-weight: 600; overflow-wrap: anywhere; }
.att-host { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.att-open { font-size: 13px; align-self: flex-start; display: inline-flex; align-items: center; min-height: 24px; padding: 2px 0; }
.att-count { font-size: 12px; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; margin-left: 6px; }
.att-status { flex: none; border-radius: 999px; padding: 1px 9px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); background: var(--bg); }
.att-status.link-only { border: 1px solid var(--muted); color: var(--muted); background: transparent; }
/* Solid: on this page a dashed outline means only Preliminary. */
.att-status.link-only { border-style: solid; }
/* Attachments phase 2: one style per capture status; the glyph and the word carry the meaning, never colour alone. */
.att-status.queued, .att-status.downloading { border-color: var(--muted); color: var(--muted); background: transparent; }
.att-status.captured { border-color: var(--line); color: var(--ink); background: var(--line); }
.att-status.text-read { border-color: var(--brand); color: var(--panel); background: var(--brand); }
.att-status.failed, .att-status.blocked { border-color: var(--inspection); color: var(--inspection); background: transparent; }
.att-short { display: none; }
.att-detail { white-space: nowrap; }
.att-tip { display: none; color: var(--muted); font-size: 12px; }
/* title tooltips cannot be reached on touch screens: show the same words as text there. */
@media (hover: none) {
  .att-tip { display: block; }
  .att-row { flex-wrap: wrap; }
  .att-tip { flex-basis: 100%; padding-left: 52px; }
  .att-legend .att-legend-link { display: none; }
}
.att-chip.pending { border-color: var(--muted); }
/* Home filter: All | Has files on one row, Awaiting download on its own row so no label wraps. */
#att { flex-wrap: wrap; }
#att button { white-space: nowrap; }
#att button[data-v="pending"] { flex-basis: 100%; border-left: 0; border-top: 1px solid var(--line); }
.att-pend-short { display: none; }
.pri-chip.pri-prelim { border-style: dashed; border-color: currentColor; }
.pri-prelim-note { margin: 2px 0 6px; }
.pri-att-note { margin: 2px 0 6px; }
.pri-att-human-back { color: var(--ink); font-weight: 600; }
@media (max-width: 480px) {
  .att-row { display: grid; grid-template-columns: auto 1fr; align-items: start; }
  .att-status { grid-column: 2; justify-self: start; }
  .att-status .att-word { display: none; }
  .att-status .att-short { display: inline; }
  .att-detail { display: block; white-space: normal; }
  .att-sep { display: none; }
  .att-tip { grid-column: 2; padding-left: 0; }
  .att-pend-long { display: none; }
  .att-pend-short { display: inline; }
}
/* Admin › Triage rules › Learning from reviews */
.tr-learn { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.tr-learn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tr-learn-head h3 { margin: 0; }
.tr-learn-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 10px 0; }
.tr-learn-kpi { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; background: var(--brand-soft); }
.tr-learn-kpi strong { font-size: 22px; color: var(--brand); font-variant-numeric: tabular-nums; }
.tr-learn-kpi small { color: var(--muted); }
.tr-learn-empty { padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; }
.tr-learn-over ol { padding-left: 20px; }
.tr-learn-over li { margin: 6px 0; }
.tr-learn-over ul { margin: 2px 0 0; padding-left: 16px; }
.tr-learn-head select { width: auto; min-width: 150px; }
.tr-learn .tr-rules-table { margin: 16px 0 0; }
.tr-learn .tr-rules-table caption { font-weight: 600; font-size: .85rem; color: var(--ink); text-align: left; }
.tr-learn-over { margin-top: 20px; }
.tr-learn-kpis + .hint { margin-top: 0; }
@media (max-width: 600px) {
  .tr-learn .tr-rules-table table { min-width: 0; width: 100%; }
  .tr-learn .tr-rules-table th, .tr-learn .tr-rules-table td { padding: 6px; }
  .tr-learn-kpis { grid-template-columns: 1fr 1fr; }
  .tr-learn-kpi strong { font-size: 18px; }
}
/* One triage button per card for editors, styled the same whatever the status */
.qt-btn.qt-override, .qt-btn.qt-history { font-weight: 600; }
a.qt-btn { display: inline-flex; align-items: center; text-decoration: none; }

/* Home: "Critical and High this week" compact cards. Both actions on one row. */
.key-grid .card-actions { gap: 6px; margin-top: 10px; }
.key-grid .card-actions > .imp-toggle,
.key-grid .card-actions > .qt-btn {
  margin-top: 0;
  min-height: 28px;          /* above the 24px minimum (WCAG 2.2 SC 2.5.8) */
  padding: 3px 10px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}
.key-grid .card-actions > .imp-toggle { box-shadow: none; }
.key-grid .card-actions > .imp-toggle::before { content: none; }   /* drop the ⚡ here only: saves ~16px */
/* Phones: keep the 36px touch height from the existing 820px rule. */
@media (max-width: 820px) {
  .key-grid .card-actions > .imp-toggle,
  .key-grid .card-actions > .qt-btn { min-height: 36px; padding: 6px 10px; font-size: 12.5px; }
}

/* Home: "Critical and High this week" as slim rows in a tinted panel (3 shown, 2 on phones). */
.key { background: var(--brand-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 10px; margin-bottom: 22px; }
.key-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.key-head h2 { margin: 0; font-size: 16px; }
.key-head .n { color: var(--muted); font-weight: 600; font-size: 13px; }
.key-head .link, .key-more { font-size: 13px; font-weight: 600; color: var(--brand); background: none; border: 0; padding: 4px 0; min-height: 24px; cursor: pointer; white-space: nowrap; }
.key-grid { display: flex; flex-direction: column; gap: 6px; }
.key-grid .card { margin: 0; padding: 8px 12px; border-radius: 8px; box-shadow: none;
  display: grid; grid-template-columns: 196px minmax(0,1fr) auto; column-gap: 12px; row-gap: 2px; align-items: center;
  grid-template-areas: "pri title actions" "pri meta actions" "box box box"; }
.key-grid .card > .pri-line { grid-area: pri; margin: 0; }
.key-grid .card > .pri-line .pri-date { display: none; }
.key-grid .card > h3 { grid-area: title; margin: 0; font-size: 14.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.key-grid .card > .meta { grid-area: meta; font-size: 12px; gap: 6px; flex-wrap: nowrap; overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }   /* min-width 0: the grid cell may shrink, so the source ellipsises instead of running under Impact card */
.key-grid .card > .meta > * { white-space: nowrap; flex: none; margin-left: 0; }
.key-grid .card > .meta .tag, .key-grid .card > .meta .terr-badge { display: none; }
/* Attachments: the paperclip first, so a narrow row never clips it, and always in its short pending form. */
.key-grid .card > .meta .att-chip { order: -1; }
.key-grid .att-pend-long { display: none; }
.key-grid .att-pend-short { display: inline; }
@media (max-width: 820px) { .key-grid .card > .meta .where { display: none; } }
.key-grid .key-src-age { color: var(--muted); overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.key-grid .card > .card-actions { grid-area: actions; margin: 0; flex-wrap: nowrap; }
.key-grid .card > .impact-box { grid-area: box; }
.key-grid .card > .impact-box:empty { display: none; }
.key:not(.show-all) .key-grid .card:nth-child(n+4) { display: none; }
.key-more { display: block; margin-top: 6px; }
@media (max-width: 820px) {
  .key { padding: 10px 10px 8px; }
  .key:not(.show-all) .key-grid .card:nth-child(n+3) { display: none; }
  .key-grid .card { grid-template-columns: auto minmax(0,1fr); grid-template-areas: "pri meta" "title title" "actions actions" "box box"; column-gap: 8px; row-gap: 4px; padding: 10px 12px; }
  .key-grid .card > h3 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 15px; }
  .key-grid .card > .meta .badge { display: none; }
}

/* Home tabs over the Updates list (lanes.js). One row; on phones it sticks under the header and scrolls sideways.
   Full labels when all six fit, short labels for all six otherwise (app.js adds .short). */
.lane-tabs { display: flex; gap: 2px; margin: 18px 0 6px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.lane-tabs::-webkit-scrollbar { display: none; }
.lane-tab { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 10px 12px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer; scroll-snap-align: start; }
.lane-tab:hover { color: var(--brand); }
.lane-tab[aria-selected="true"] { color: var(--brand); font-weight: 700; border-bottom-color: var(--brand); }
.lane-tab:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.lane-tab .n { font-size: 13px; font-weight: 600; color: var(--ink); background: var(--brand-soft); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.lane-tab[aria-selected="true"] .n { color: var(--panel); background: var(--brand); }
.lane-tab .lane-short, .lane-tabs.short .lane-long { display: none; }
.lane-tabs.short .lane-short { display: inline; }
#listhead { scroll-margin-top: 116px; } /* sticky header (66) + tab row (48) + 2 */
.listhead { flex-wrap: nowrap; align-items: center; }
.listhead h2, .listhead #count { font-size: 16px; min-width: 0; }
.count-more { color: var(--muted); font-weight: 400; }
.sort-wrap { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; flex: none; }
.sort-wrap select { font-size: 16px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }
@media (pointer: coarse) { .sort-wrap select { min-height: 44px; } }
.cats .oos .oos-all { font-size: 12px; margin-left: 4px; }
/* Related reports: a quiet text disclosure in the card's footer, then one row per copy. */
.story-more { margin-left: auto; margin-top: 10px; border: 0; background: none; color: var(--brand); padding: 6px 2px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; min-height: 32px; }
.story-more:hover { text-decoration: underline; }
.story-more:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.story-rel { list-style: none; margin: 8px 0 0; padding: 4px 0 0; border-top: 1px dashed var(--line); }
.rel-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; min-width: 0; }
.rel-row + .rel-row { border-top: 1px solid var(--line); }
.rel-meta { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--muted); font-size: 12.5px; }
.rel-meta .pri-chip { min-height: 20px; padding: 0 7px; font-size: 11px; }
.rel-src { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .lane-tabs { position: sticky; top: 66px; z-index: 20; background: var(--bg); margin: 10px -16px 6px; padding: 0 16px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%); }
  .rel-row { flex-wrap: wrap; row-gap: 2px; }
  .rel-title { flex-basis: 100%; white-space: normal; }
  .rel-src { max-width: 140px; }
}
@media (max-width: 479px) { .lane-tab { padding: 10px 10px; } .sort-wrap label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@media (pointer: coarse) { .story-more { min-height: 44px; } }
/* Phones: a slimmer Critical and High panel (still two rows) so the tabs show on the first screen. */
@media (max-width: 820px) {
  .key { padding: 8px 10px 6px; margin-bottom: 12px; }
  .key-head { margin-bottom: 4px; }
  .key-grid { gap: 4px; }
  .key-grid .card { grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "pri meta actions" "title title title" "box box box"; padding: 6px 10px; row-gap: 2px; align-items: center; }
  .key-grid .card > h3 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
  .key-grid .card > .card-actions > .imp-toggle, .key-grid .card > .card-actions > .qt-btn { min-height: 32px; padding: 4px 9px; }
  .key-more { margin-top: 2px; }
}
/* Home tabs slice 2: "Search & filters" sits on the list heading row next to the sort (phones show it; desktop has the
   sidebar). Phones under 480px show the short label "Filters"; the accessible name stays "Search & filters". */
#listhead .sf-short { display: none; }
#filters { scroll-margin-top: 76px; }
@media (max-width: 820px) {
  #listhead .show-filters { margin: 0; min-height: 44px; padding: 6px 12px; font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; }
  #listhead .sort-wrap { gap: 8px; }
}
/* Narrow phones: Critical and High shows one row ("Show all N" opens the rest), so the tabs reach the first screen. */
@media (max-width: 430px) { .key:not(.show-all) .key-grid .card:nth-child(n+2) { display: none; } }
@media (max-width: 480px) {
  #listhead .sf-long { display: none; }
  #listhead .sf-short { display: inline; }
}
/* Narrow phones: the priority chip shrinks (ellipsis) so "Impact card" stays inside the row, and the panel count stays on the heading line. */
@media (max-width: 430px) {
  .key-head { flex-wrap: wrap; row-gap: 0; }
  .key-head h2 { white-space: nowrap; }
  .key-grid .card { grid-template-columns: minmax(0, max-content) minmax(0, 1fr) auto; column-gap: 4px; padding-right: 8px; }
  .key-grid .card > .pri-line { min-width: 0; overflow: hidden; }
  .key-grid .card > .pri-line .pri-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; padding: 0 7px; gap: 4px; }
  .key-grid .card > .pri-line .pri-suffix { display: none; }
  /* Editors: Set priority stays on the full card; in the one-line key row it would squeeze the chip to "Hig". */
  .key-grid .card > .card-actions > .qt-btn { display: none; }
  .key-grid .card > .pri-line { min-width: max-content; }
  .key-grid .card > .pri-line .pri-chip { flex-shrink: 0; max-width: none; }   /* "High · ✓ Reviewed": the panel heading already says priority; the mark stays */
  .key-grid .card > .card-actions > .imp-toggle { padding: 4px 8px; font-size: 12.5px; }
}
/* Narrow phones: no room for the source and age beside the chip and Impact card, so they are left out (the full card shows them); the paperclip stays. */
@media (max-width: 430px) { .key-grid .key-src-age { display: none; } }
/* Home search (Search updates box): how a card matched, the empty state, suggestions in groups, and on phones
   the box inline above the tabs with the active chips in one scrolling row. */
.match-why { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.search-empty { padding: 20px 0; }
.search-empty p { margin: 0 0 8px; max-width: 70ch; }
.search-empty .empty-head { color: var(--ink); font-weight: 600; }
.search-empty .empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.search-empty .empty-actions .btn, .search-empty .empty-page { min-height: 44px; display: inline-flex; align-items: center; }
.q-field .q-hint { margin: -2px 0 6px; }
#q { scroll-margin-top: 76px; }
/* The clear button takes no room while the box is empty, so the whole placeholder shows. */
#q:placeholder-shown::-webkit-search-cancel-button { display: none; }
.ta-opt[aria-selected="true"] { box-shadow: inset 3px 0 var(--brand); }
.ta-group { font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 8px 10px 4px; }
.ta-grouped .ta-last { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.ta-text .ta-badge { background: var(--brand-soft); color: var(--brand); }
.q-slot[hidden] { display: none; }
@media (max-width: 820px) {
  .q-slot { margin: 0 0 10px; }
  .q-slot .q-field { margin: 0; }
  .q-slot .q-field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .q-slot .q-hint { display: none; }
  .q-slot .active-filters { margin: 8px 0 0; }
  .active-filters .chip.on { min-height: 44px; }
  .q-slot input { width: 100%; min-height: 44px; font-size: 16px; }
  .active-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .active-filters::-webkit-scrollbar { display: none; }
  .active-filters > * { flex: none; white-space: nowrap; }
}
/* Flow gaps release 1: priority history is a plain read-only link, not a button. */
.fx1-pri-history p{margin:4px 0}
a.fx1-plain-link{background:none;border:0;padding:0;text-decoration:underline;font-weight:600}

/* Capability line under a page title: what this page offers, with its guide chapter. */
.page-capabilities{display:block;margin:8px 0 0;font-size:12px;line-height:16px;color:var(--muted)}
.page-capabilities ul{display:inline;margin:0;padding:0;list-style:none}
.page-capabilities li{display:inline;margin:0}
.page-capabilities li+li::before{content:" · ";color:var(--muted)}
body.ui-scale main .page-capabilities a.page-capabilities-help,body .page-capabilities a.page-capabilities-help{display:inline;margin:0 0 0 12px;padding:0;min-height:0;border:0;border-radius:0;background:none;box-shadow:none;font-size:12px;line-height:16px;font-weight:600;color:var(--brand,#0f4c5c);text-decoration:underline;text-underline-offset:2px;white-space:nowrap}
.doc-fingerprint{margin:4px 0 0;font-size:12px;line-height:16px;color:var(--muted)}
.doc-fingerprint code{font-family:ui-monospace,"SFMono-Regular",Menlo,Consolas,monospace;font-size:13px}
body.ui-scale main .page-capabilities :is(ul,li){font-size:12px;line-height:16px}
:is(p,.intro):has(+ .page-capabilities){margin-bottom:0}

/* My products and markets (my-scope.js): the line at the top of the Updates list (the set-up prompt is in the hero). */
.my-scope { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 14px; }
.my-scope p { margin: 0; flex: 1; min-width: 0; }
.my-scope { flex-wrap: wrap; }
.my-scope .my-scope-none { flex-basis: 100%; margin-top: 4px; font-size: 13px; }
.my-scope .link { font-size: inherit; padding: 0; }
.my-scope .act { white-space: nowrap; }
/* The set-up prompt in the hero (above the 90-day timeline): compact, one line on a phone, where it takes the tour
   line's place so the Updates tabs stay on the first screen. */
.my-scope-hero strong { font-weight: 650; }
.my-scope-hero .my-scope-close { background: none; border: 0; padding: 0 4px; margin: 0; font: inherit; font-size: 16px; line-height: 1; color: inherit; cursor: pointer; opacity: .8; vertical-align: baseline; }
.my-scope-hero .my-scope-close:hover, .my-scope-hero .my-scope-close:focus-visible { opacity: 1; }
@media (max-width: 820px) {
  .home-find:has(#my-scope-hero:not([hidden])) .hero-tour:not(.my-scope-hero) { display: none !important; }
  .my-scope-hero strong, .my-scope-hero .msh-long { display: none; }
}
/* Profile country picker (briefing.js countryPicker): search, common markets, then all by region. */
.pf-countries .pf-find { width: 100%; max-width: 360px; margin: 0 0 8px; }
.pf-countries .pf-all { margin-top: 8px; }
.pf-countries .pf-all > summary { cursor: pointer; font-size: 13px; margin-bottom: 6px; }
.pf-countries [hidden] { display: none !important; }
.tile.tile-setup { cursor: pointer; text-align: left; font: inherit; color: inherit; border-style: dashed; }
.tile.tile-setup b { font-size: 1rem; }
.tile .tile-zero { color: var(--muted); font-size: 11px; line-height: 1.3; }
.pf-define { margin: -4px 0 6px; font-size: 13px; }

/* Updates search (Updates and Archive merged, Nov 2026): parts read from the box, closest-match banner, coverage line,
   custom date range and historical block. Shown only while someone searches. */
.q-parts { margin-top: 8px; }
.q-parts .qp-label { display: block; font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 4px; }
.q-parts .qp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.qp-chip { display: inline-flex; align-items: center; min-height: 28px; border: 1px solid var(--line); border-radius: 999px; background: var(--brand-soft); font-size: 12.5px; line-height: 1.2; max-width: 100%; }
.qp-chip .qp-main { padding: 3px 4px 3px 10px; background: none; border: 0; font: inherit; color: var(--ink); text-align: left; overflow-wrap: anywhere; }
.qp-chip .qp-type { color: var(--muted); font-size: 11.5px; }
.qp-chip .qp-x { min-width: 24px; min-height: 24px; margin-right: 2px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.qp-chip .qp-x:hover, .qp-chip .qp-x:focus-visible { background: var(--panel); color: var(--ink); }
.qp-chip.qp-off { background: var(--panel); border-style: dashed; }
.qp-chip.qp-off .qp-main { cursor: pointer; color: var(--muted); }
.qp-chip .qp-na { font-size: 11px; font-weight: 650; color: #8a5a00; background: #fff4d6; border-radius: 4px; padding: 0 4px; }
.q-near { margin: 0 0 10px; padding: 9px 12px; border: 1px solid #f0d58a; border-radius: 8px; background: #fffaeb; font-size: 14px; color: var(--ink); }
.q-near .qn-head { margin: 0; }
.q-near .qn-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.q-near .chip .n { font-weight: 700; }
.q-coverage { margin: 0 0 10px; font-size: 12.5px; }
.days-custom { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; font-size: 13px; }
.days-custom input { font: inherit; }
#days-note { margin: 4px 0 0; }
#days-note .link { padding: 0; font-size: inherit; }
.card .badge.older { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 600; }
.hist-block { margin: 16px 0 0; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel); }
.hist-block h3 { margin: 0 0 4px; font-size: 14px; }
.hist-block .hint { margin: 0 0 6px; font-size: 12.5px; }
.hist-list { margin: 0; padding-left: 0; list-style: none; font-size: 13.5px; }
.hist-list li { padding: 4px 0; border-top: 1px solid var(--line); }
.hist-badge { font-size: 11px; }
:root:where([data-theme="dark"]) .q-near { background: #2a2410; border-color: #6b5a1d; }
:root:where([data-theme="dark"]) .qp-chip .qp-na { background: #4a3b0f; color: #ffd98a; }
.filters #filter-count-note + .q-field { margin-top: 12px; }
