/* =========================================================
   Country Regulatory Profiles — app.css  (see SETUP.md §3)
   ---------------------------------------------------------
   THIS FILE is the shared foundation, loaded on EVERY page:
     • the design TOKENS (CSS custom properties on :root) — the single source
       of truth for colour + typography (design-build-brief.md §A);
     • the base reset;
     • ALL admin styling (the admin layout loads ONLY this file — it has no
       `body.v5` class).

   The current PUBLIC design lives in v5.css, scoped under `body.v5`, loaded
   AFTER this file. For a shared class (.card, .module, .enforcement-table),
   the `body.v5 .x` rule in v5.css wins on public pages; the plain `.x` rule
   here applies on admin pages. Edit public look in v5.css, admin look here.
   Design tokens below are consumed by BOTH files and by Settings::cssOverrides().
   ========================================================= */

/* ---- Self-hosted fonts (woff2, no Google Fonts CDN) — brand-alignment-brief §B.
   Cormorant Garamond (display) + Josefin Sans (labels/nav) are variable woff2;
   Spectral (body) ships as static weights; JetBrains Mono (data) is kept. ---- */
@font-face { font-family:"Cormorant Garamond"; src:url("/assets/fonts/cormorant-garamond-var.woff2") format("woff2"); font-weight:300 700; font-style:normal; font-display:swap; }
@font-face { font-family:"Cormorant Garamond"; src:url("/assets/fonts/cormorant-garamond-italic-var.woff2") format("woff2"); font-weight:300 700; font-style:italic; font-display:swap; }
@font-face { font-family:"Josefin Sans"; src:url("/assets/fonts/josefin-sans-var.woff2") format("woff2"); font-weight:300 700; font-style:normal; font-display:swap; }
@font-face { font-family:"Spectral"; src:url("/assets/fonts/spectral-300.woff2") format("woff2"); font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:"Spectral"; src:url("/assets/fonts/spectral-400.woff2") format("woff2"); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"Spectral"; src:url("/assets/fonts/spectral-400-italic.woff2") format("woff2"); font-weight:400; font-style:italic; font-display:swap; }
@font-face { font-family:"Spectral"; src:url("/assets/fonts/spectral-600.woff2") format("woff2"); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:"JetBrains Mono"; src:url("/assets/fonts/jetbrainsmono-var.woff2") format("woff2"); font-weight:100 900; font-display:swap; font-style:normal; }

:root {
  /* Brand — aligned to crcgs.academy (brand-alignment-brief §A) */
  --navy:      #1d3461;   /* primary: header, headings, active states */
  --navy-2:    #243a6e;   /* = --navy-mid */
  --navy-mid:  #243a6e;
  --navy-deep: #111f3d;   /* dark accent panels (footer, pulse, enforcement) */
  --gold:       #d4a84a;  /* accent / regulatory activity — BACKGROUNDS & rules on light */
  --gold-light: #e8c97a;
  --gold-pale:  #f5e8c4;
  --gold-text:  #896d30;  /* accent used as TEXT on light — darkened for WCAG AA (4.9:1) */
  --orange:      #c4572d; /* enforcement ONLY — backgrounds/borders/bars */
  --orange-text: #a5431f; /* enforcement TEXT/badges on light — darkened for WCAG AA (5.9:1) */
  --green:  #1F7A4C;      /* verified / success */

  /* Surfaces & tint — warm neutrals (main site uses cream, NOT pure white) */
  --paper:  #fdfaf5;   /* page background — warm white */
  --pearl:  #fafaf7;   /* card / surface alt */
  --cream:  #f5ede0;   /* alternating warm band */
  --off-white: #f3efe6;
  --wash:   #f3efe6;   /* subtle warm inset / table-head band */
  --tint:   #f3ead9;   /* warm tint: stat blocks / icon chips / soft cards */
  --tint-2: #e6d9bf;   /* tint border */

  /* Text & lines */
  --ink:    #1a1a2e;   /* = --text */
  --text:   #1a1a2e;
  --slate:  #63697a;   /* = --dim (secondary text) — darkened for AA on warm bands */
  --dim:    #63697a;
  --muted:  #63697a;
  --dim2:   #5c6474;   /* muted micro-labels — AA (>=4.9:1 on warm surfaces) */
  --border:       #ddd0b8;  /* warm hairline */
  --border-light: #ece5d5;
  --line:   #ece5d5;   /* = --border-light */
  --line-2: #ddd0b8;   /* = --border */
  --chip:   #f3efe6;

  /* Typography — Cormorant Garamond display, Spectral body, Josefin Sans
     labels/nav/buttons, JetBrains Mono data (brand-alignment-brief §B). */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Spectral", Georgia, "Times New Roman", serif;
  --font-label: "Josefin Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, "Courier New", monospace;

  /* Shape + elevation */
  --radius: 10px;      /* cards */
  --radius-lg: 14px;   /* feature blocks / dark panels */
  --shadow: 0 4px 16px rgba(17, 31, 61, .08), 0 1px 3px rgba(17, 31, 61, .06);
  --dur: 150ms;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Never scroll sideways: off-canvas drawers / stray wide elements are clipped
   (testing feedback FB1 #20, FB3 Bug 10). `clip` keeps vertical scroll + sticky
   working, unlike `hidden`. Individual tables/diagrams keep their own scrollers. */
html { overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; color: var(--navy); }
h1 { font-size: 2.3rem; margin: 0 0 .5rem; }
h2 { font-size: 1.55rem; margin: 0 0 .5rem; }
/* Signature device (brand-alignment-brief §B): italic serif emphasis in headings.
   Italic everywhere (inherits the heading colour — safe on light); the GOLD tint
   is applied only on dark backgrounds (hero, dark panels) where gold passes AA —
   gold text on the light page background fails WCAG and is never used. */
h1 em, h2 em, h3 em { font-style: italic; }
a { color: var(--navy); }
a:hover { color: var(--navy-2); text-decoration: underline; }
.mono { font-family: var(--font-mono); font-size: .9em; }
.muted { color: var(--slate); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* Accessibility: visible focus rings + skip link (WCAG AA floor).
   S5: navy outline (>=4.5:1 on white/paper) with a gold halo so the ring also
   stays visible on the navy header/footer — gold alone on white was too faint. */
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; box-shadow: 0 0 0 5px rgba(212, 168, 74, .6); }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: .5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Header / nav ---------- */
.site-header { background: var(--navy); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: .5rem; padding-top: .8rem; padding-bottom: .8rem;
}
.brand {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  color: #fff; text-decoration: none;
}
.brand:hover { color: var(--gold); }
.brand-suffix { color: var(--gold); font-family: var(--font-label); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav a { color: #fff; text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.inline-form { display: inline; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cdd4de; margin-top: 3rem; padding: 1.5rem 0 2rem; }
.footer-org { color: #fff; font-weight: 600; margin: 0 0 .4rem; }
.footer-disclaimer { font-size: .85rem; margin: 0; max-width: 60rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: var(--font-label); font-size: .82rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .09em;
  padding: .7rem 1.5rem; border-radius: var(--radius); text-decoration: none;
  transition: background var(--dur), transform var(--dur), box-shadow var(--dur);
}
.btn:hover { text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #c2963a; color: var(--navy); box-shadow: 0 3px 10px rgba(17,31,61,.18); }
.btn-ghost { background: transparent; color: #fff; padding: .3rem .6rem; font-weight: 400; letter-spacing: .04em; }
.btn-ghost:hover { color: var(--gold); }
.btn-block { width: 100%; margin-top: 1rem; }

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.25rem;
}


/* ---------- Breadcrumb ---------- */
.breadcrumb { color: var(--slate); font-size: .9rem; margin: 1.25rem 0; }
.breadcrumb a { color: var(--slate); }

/* ---------- Countries index ---------- */
.page-intro { color: var(--slate); max-width: 46rem; }
.region-block { margin-top: 2rem; }
.region-title { border-bottom: 2px solid var(--gold); padding-bottom: .35rem; }
.region-count { color: var(--slate); font-family: var(--font-body); font-size: 1rem; font-weight: 400; }
.country-grid {
  list-style: none; margin: 1rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem;
}
/* Grid items fill their cell so every card in a row is the same height, and the
   card fills its item — fixes the uneven country boxes (testing feedback FB1 #21). */
.country-grid > li { display: flex; }
.country-card {
  display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 66px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .55rem .8rem; text-decoration: none;
}
.country-card:hover { border-color: var(--gold); }
.country-flag { font-size: 1.15rem; }
.country-name { flex: 1; }
.tier-badge {
  font-family: var(--font-label);
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: .15rem .5rem; border-radius: 999px; white-space: nowrap;
}
.tier-1 { background: var(--gold); color: var(--navy); }
.tier-2 { background: var(--navy); color: #fff; }
.tier-3 { background: var(--border); color: var(--slate); }

/* ---------- Country page ---------- */
.country-header { display: flex; align-items: center; gap: 1rem; margin: .5rem 0 1.5rem; }
.country-header-flag { font-size: 3rem; line-height: 1; }
.country-meta { color: var(--slate); margin: .3rem 0 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--border); }
th { color: var(--navy); font-family: var(--font-label); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin: 1rem 0 .3rem; }
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%; padding: .55rem .7rem; font-size: 1rem; font-family: var(--font-body);
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--ink);
}
input:focus-visible { border-color: var(--gold); }

/* Admin password show/hide control, injected by password-toggle.js.
   (Public account pages use the .pw-field/.pw-toggle pattern below via app.js.) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 2.75rem; }
.pw-eye {
  position: absolute; top: 0; right: 0; height: 100%; width: 2.75rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted);
}
.pw-eye:hover, .pw-eye:focus-visible { color: var(--navy); }
.field-hint { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; margin: .3rem 0 0; }

.alert { padding: .7rem 1rem; border-radius: var(--radius); }
.alert-error { background: #faeae1; border: 1px solid var(--orange); color: #7c3812; }
.alert-success { background: #e7f2ec; border: 1px solid var(--green); color: #1d5236; }
.alert-warning { background: #fbf1d8; border: 1px solid var(--gold); color: #6b531a; }
.alert-warn { background: #fdf5e3; border: 1px solid #d8b24a; color: #7a5a12; }
.warn { color: #a5591a; font-weight: 600; text-decoration: none; }
.warn:hover { text-decoration: underline; }

/* ---------- Auth extras (§5.2): password toggle, forgot link, resend ---------- */
.pw-field { display: flex; align-items: stretch; gap: .4rem; }
.pw-field input { flex: 1 1 auto; }
.pw-toggle {
  flex: 0 0 auto; border: 1px solid var(--border); background: #fff; color: var(--navy);
  border-radius: var(--radius); padding: 0 .8rem; font-size: .85rem; cursor: pointer;
}
.pw-toggle:hover { border-color: var(--navy); }
.form-aside { margin: .5rem 0 0; font-size: .9rem; }
.resend-form { margin: 1rem 0; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.resend-form .btn { margin-top: .3rem; }

/* ---------- Admin ---------- */
.admin-main { padding-top: 1.5rem; padding-bottom: 3rem; }
.auth-card { max-width: 420px; margin: 3rem auto; }
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem; margin: 1.25rem 0 1.5rem;
}
.stat-card { text-align: center; }
.stat-number { display: block; font-size: 2rem; font-weight: 600; color: var(--navy); }
.stat-label { color: var(--slate); font-family: var(--font-label); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; }

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding: 4rem 1rem; }
.error-eyebrow { font-family: var(--font-label); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--slate); margin: 0 0 .3rem; }
.error-search { display: flex; gap: .5rem; justify-content: center; max-width: 30rem; margin: 1.5rem auto; }
.error-search input { flex: 1 1 auto; }
.error-actions { margin: 1.25rem 0; }
.error-links { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

/* ---------- Country page layout (§3.2): main + At-a-Glance rail ---------- */
.country-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.5rem; align-items: start; }
.country-layout.no-rail { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .country-layout { grid-template-columns: minmax(0, 1fr); } } /* rail stacks below (§1.3) */
.module { margin: 1.75rem 0; }
.module h2 { border-bottom: 2px solid var(--gold); padding-bottom: .3rem; }
.verified-badge { color: var(--green); font-weight: 600; }

/* In-country subnav: sidebar feel on desktop, horizontal scroll tabs on mobile (§1.3) */
.country-subnav { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin: 1rem 0 1.5rem; overflow-x: auto; white-space: nowrap; }
.country-subnav a { padding: .5rem .9rem; text-decoration: none; color: var(--slate); border-bottom: 3px solid transparent; }
.country-subnav a:hover { color: var(--navy); }
.country-subnav a.active { color: var(--navy); font-weight: 600; border-bottom-color: var(--gold); }

/* At-a-Glance rail */
.glance-card h2 { font-size: 1.05rem; border-bottom: 2px solid var(--gold); padding-bottom: .3rem; }
.glance-list { margin: 0; }
.glance-list dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--slate); margin-top: .7rem; }
.glance-list dd { margin: .1rem 0 0; }

/* Regulator + industry grids */
.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .6rem; }
.reg-card { text-decoration: none; text-align: center; }
.reg-card strong { display: block; font-size: 1.1rem; color: var(--navy); }
.reg-fullname { font-size: .8rem; color: var(--slate); }
.reg-list { display: grid; gap: .6rem; }
.reg-row { text-decoration: none; }
.industry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.industry-card { display: flex; flex-direction: column; gap: .15rem; text-decoration: none; }
.industry-icon { font-size: 1.3rem; }

/* Instruments */
.instrument-list, .obligation-strip, .deadline-list, .plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.instrument-item { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.instrument-body { flex: 1; min-width: 220px; }
.type-badge { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .12rem .5rem; border-radius: 999px; background: var(--navy); color: #fff; white-space: nowrap; }
.type-badge.type-act { background: var(--navy); }
.type-badge.type-regulation, .type-badge.type-rule { background: #2E5E8C; }
.type-badge.type-direction, .type-badge.type-guideline { background: var(--gold); color: var(--navy); }
.type-badge.type-circular, .type-badge.type-notification { background: var(--orange-text); }
.status-badge { color: var(--orange-text); font-weight: 600; text-transform: uppercase; font-size: .75rem; }
.tag { display: inline-block; font-size: .75rem; background: var(--chip); border: 1px solid var(--border); border-radius: 999px; padding: .05rem .55rem; }
.tag-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); font-weight: 700; }
.tag-link { text-decoration: none; }
.item-head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }

/* Deadlines */
.deadline-item { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; }
.deadline-date { color: var(--orange-text); font-weight: 600; white-space: nowrap; }

/* Enforcement table → stacked cards under 768px (§1.3) */
.penalty { color: var(--orange-text); font-weight: 600; }
@media (max-width: 767px) {
  .enforcement-table thead { display: none; }
  .enforcement-table, .enforcement-table tbody, .enforcement-table tr, .enforcement-table td { display: block; width: 100%; }
  .enforcement-table tr { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: .6rem; padding: .5rem .8rem; }
  .enforcement-table td { border: 0; padding: .15rem 0; }
  .enforcement-table td::before { content: attr(data-label) ': '; font-size: .72rem; text-transform: uppercase; color: var(--slate); }
}

/* Tier 3 request form + spam honeypot (§11) */
.request-form { max-width: 26rem; }
.request-form .btn { margin-top: 1rem; }
.hp-field { position: absolute !important; left: -9999px !important; height: 0; overflow: hidden; }

/* ---------- Admin: nav, lists, forms ---------- */
.admin-nav { flex-wrap: wrap; gap: .7rem; font-size: .92rem; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.list-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.list-filters select, .list-filters input { padding: .45rem .6rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .95rem; background: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #1a3a63; color: #fff; }
/* Bulk publish/unpublish bar + row selection column (admin list views) */
.bulk-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 0 0 1rem;
  padding: .55rem .8rem; background: var(--wash, #f6f2ea); border: 1px solid var(--border); border-radius: var(--radius); }
.bulk-bar .bulk-count { color: var(--slate, #666); font-size: .9rem; margin-right: auto; font-variant-numeric: tabular-nums; }
.col-check { width: 2.4rem; text-align: center; }
.col-check input { width: 1.05rem; height: 1.05rem; }
.row-actions { display: inline-flex; gap: .6rem; align-items: baseline; white-space: nowrap; }
.link-button { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font-size: inherit; font-family: inherit; }
.link-button.danger { color: var(--orange-text); }
.ok { color: var(--green); font-weight: 600; }
.err { color: var(--orange-text); font-weight: 600; }
.row-error { background: #faf3ef; }
/* Import preview: the value each field will be stored as (review S12). */
.import-stored { margin: 0; font-size: .82rem; line-height: 1.35; }
.import-stored div { display: flex; gap: .4rem; flex-wrap: wrap; }
.import-stored dt { color: var(--slate); }
.import-stored dd { margin: 0; overflow-wrap: anywhere; }
/* News queue: the drafting run's tag suggestions, shown but never pre-selected (review B2). */
.suggest-line { margin: .35rem 0; font-size: .85rem; }
.stat-total { font-size: 1rem; color: var(--slate); font-weight: 400; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin: 1rem 0; }

.admin-form { max-width: 60rem; margin-bottom: 1.5rem; }
.admin-form .btn { margin-top: 1.25rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
.admin-form textarea, .admin-form select, .admin-form input[type="file"], .admin-form input[type="number"], .admin-form input[type="date"] {
  width: 100%; padding: .55rem .7rem; font-size: 1rem; font-family: var(--font-body);
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--ink);
}
.admin-form textarea.mono { font-family: var(--font-mono); font-size: .85rem; }
/* Searchable combobox (admin-combobox.js) — rendered over a hidden native <select>. */
.combobox { position: relative; }
.combobox-input { width: 100%; padding: .55rem .7rem; font-size: 1rem; font-family: var(--font-body);
  border: 1px solid var(--border); border-radius: var(--radius); background: #fff; color: var(--ink); }
.combobox-input:focus-visible { border-color: var(--gold); outline: none; }
.combobox-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px); margin: 0; padding: 4px;
  list-style: none; max-height: 260px; overflow-y: auto; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(26,26,46,.12); }
.combobox-option { padding: .4rem .6rem; border-radius: 6px; cursor: pointer; font-size: .95rem; }
.combobox-option:hover, .combobox-option.on { background: var(--gold-pale, #f5e8c4); }
.combobox-option[aria-selected="true"] { font-weight: 600; }
.combobox-empty { padding: .4rem .6rem; color: var(--slate, #666); font-size: .9rem; }
.check-group { border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .25rem; }
.check-group legend { font-weight: 600; padding: 0 .3rem; }
.check-group-tall { max-height: 260px; overflow-y: auto; }
.check-label { display: flex; gap: .45rem; align-items: baseline; font-weight: 400; margin: .3rem 0; }
.verify-form { display: flex; align-items: center; gap: .8rem; margin-bottom: 2rem; }
form[inert] { opacity: .55; pointer-events: none; }

/* Utility */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- News (public) ---------- */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.news-item .news-title { font-weight: 600; text-decoration: none; }
.news-item .news-title:hover { text-decoration: underline; }
.news-date { margin-left: .5rem; font-size: .85rem; }
.news-article h1 { max-width: 46rem; }
.why-matters { border-left: 4px solid var(--gold); max-width: 46rem; margin: 1.5rem 0; }
.news-tags { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ---------- Newsletter ---------- */
.newsletter-block { margin: 2rem 0; }
.newsletter-form { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 30rem; }
.newsletter-form input[type="email"] { flex: 1 1 220px; }

/* ---------- Review queue (admin, §8.4) ---------- */
.queue-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin: 1rem 0; }
.queue-tabs a { padding: .5rem .9rem; text-decoration: none; color: var(--slate); border-bottom: 3px solid transparent; }
.queue-tabs a.active { color: var(--navy); font-weight: 600; border-bottom-color: var(--gold); }
.queue { display: grid; gap: .8rem; margin-top: 1rem; }
.queue-item:focus, .queue-item.queue-focused { outline: 3px solid var(--navy); outline-offset: 1px; box-shadow: 0 0 0 4px rgba(212, 168, 74, .5); }
.queue-head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.queue-original { font-weight: 600; text-decoration: none; flex: 1; min-width: 200px; }
.queue-original:hover { text-decoration: underline; }
.bulk-check { margin-left: auto; }
.queue-form label { margin-top: .6rem; font-size: .85rem; }
.queue-form select[multiple] { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); font-size: .9rem; }
.queue-actions { display: flex; gap: .8rem; align-items: center; margin-top: .9rem; }
/* ---------- Admin sidebar (§3.1) ---------- */
.admin-shell { background: #F7F8FA; overflow-x: clip; }
.admin-topbar { display: flex; align-items: center; gap: .75rem; background: var(--navy); color: #fff; padding: .6rem 1rem; position: sticky; top: 0; z-index: 50; }
.admin-topbar .brand { color: #fff; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; min-width: 0; }
.admin-topbar-right a { color: #cdd4de; text-decoration: none; }
.admin-topbar-right a:hover { color: var(--gold); }
.admin-whoami { font-size: .85rem; }
.admin-menu-toggle { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: .2rem; }
.admin-body { display: flex; align-items: flex-start; min-height: calc(100vh - 52px); }
.admin-sidebar { flex: 0 0 240px; width: 240px; background: #fff; border-right: 1px solid var(--border); padding: .75rem 0; align-self: stretch; }
.admin-nav-item { display: block; padding: .45rem 1.25rem; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; font-size: .93rem; }
.admin-nav-item:hover { background: var(--chip); }
.admin-nav-item.active { background: #EEF2F8; border-left-color: var(--gold); color: var(--navy); font-weight: 600; }
.admin-dashboard-link { font-weight: 600; }
.admin-nav-group { border-top: 1px solid #eef0f3; margin-top: .4rem; padding-top: .4rem; }
.admin-nav-grouphead { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; cursor: pointer;
  padding: .4rem 1.25rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate); font-weight: 700; font-family: var(--font-label); }
.admin-nav-caret { transition: transform .15s; }
.admin-nav-group.open .admin-nav-caret { transform: rotate(180deg); }
.admin-nav-items { display: none; }
.admin-nav-group.open .admin-nav-items { display: block; }
.admin-main { flex: 1 1 auto; min-width: 0; padding: 1.5rem 1.75rem 3rem; }
.admin-sidebar-backdrop { display: none; }
@media (max-width: 860px) {
  .admin-menu-toggle { display: inline-flex; }
  .admin-sidebar { position: fixed; top: 52px; bottom: 0; left: 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; overflow-y: auto; box-shadow: 0 0 30px rgba(15,35,64,.2); }
  body.admin-drawer-open .admin-sidebar { transform: translateX(0); }
  body.admin-drawer-open .admin-sidebar-backdrop { display: block; position: fixed; inset: 52px 0 0 0; background: rgba(15,35,64,.4); z-index: 55; }
  .admin-main { padding: 1rem; }
  /* Keep the topbar within a phone width (testing feedback FB3 Bug 10): the email
     is non-essential and the long brand truncates instead of forcing a sideways scroll. */
  .admin-whoami { display: none; }
  .admin-topbar { gap: .5rem; }
  .admin-topbar-right { gap: .85rem; }
  .admin-topbar .brand { font-size: 1rem; }
}
@media (max-width: 420px) {
  .admin-topbar .brand-suffix { display: none; }
}

/* ---------- Search autocomplete (§3.4) ---------- */
.header-search { position: relative; }
.search-ico { position: absolute; left: .6rem; top: 50%; transform: translateY(-50%); color: var(--slate); pointer-events: none; display: inline-flex; }
.header-search input { width: 100%; padding: .45rem .7rem .45rem 2.1rem; border: 0; border-radius: var(--radius); font-size: .92rem; }
.search-suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 8px 24px rgba(15,35,64,.18); z-index: 80; max-height: 70vh; overflow-y: auto; }
.search-suggest .ss-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); padding: .5rem .8rem .2rem; font-weight: 700; }
.search-suggest .ss-item { display: block; padding: .4rem .8rem; text-decoration: none; color: var(--ink); }
.search-suggest .ss-item:hover, .search-suggest .ss-item.active { background: #EEF2F8; }
.search-suggest .ss-label { display: block; font-weight: 600; color: var(--navy); font-size: .92rem; }
.search-suggest .ss-sub { display: block; font-size: .78rem; color: var(--slate); }

/* ---------- Empty state (§5.1) ---------- */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--slate); border: 1px dashed var(--border); border-radius: var(--radius); background: #fff; }
.empty-state svg { color: var(--border); }
.empty-state p { margin: .6rem 0; }
.empty-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Faceted filters (enforcement / news, §3.6) ---------- */
.enforcement-filters { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end; margin: 1rem 0 1.5rem; padding: 1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.filter-field { display: flex; flex-direction: column; gap: .3rem; }
.filter-field > label { font-size: .8rem; font-weight: 600; color: var(--navy); }
.filter-field select, .filter-field input { padding: .45rem .6rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .92rem; background: #fff; min-width: 160px; }
.filter-field select[multiple] { min-height: 92px; }
.filter-actions { display: flex; gap: .5rem; align-items: center; }
.btn-ghost-navy { background: transparent; color: var(--navy); border: 1px solid var(--border); }
.btn-ghost-navy:hover { background: var(--chip); }

/* ---------- Developing/unverified news banner (§8.2) ---------- */
.developing-banner { background: #FEF3E7; border: 1px solid var(--orange); border-left: 4px solid var(--orange);
  color: #7c3812; padding: .8rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; }

/* ---------- News sources batch-fetch toolbar (§8.1) ---------- */
.sources-toolbar { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }

/* ---------- Review-mode banner ---------- */
.review-banner { background: var(--orange-text); color: #fff; text-align: center; padding: .5rem 1rem; font-size: .9rem; }

/* ---------- Phase 3: meter overlays (§9.2) ---------- */
.meter-overlay { position: fixed; inset: 0; background: rgba(15, 35, 64, .55); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 1rem; }
.meter-gate { align-items: flex-end; background: linear-gradient(to bottom, rgba(255,255,255,0) 0, rgba(255,255,255,.85) 220px, rgba(255,255,255,.97) 380px); }
.meter-card { max-width: 430px; text-align: center; box-shadow: 0 8px 30px rgba(15,35,64,.25); }
.meter-gate .meter-card { margin-bottom: 8vh; }
.meter-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.meter-dismiss { margin-top: .5rem; color: var(--slate); }
.meter-gated-body { max-height: 60vh; overflow: hidden; }

/* ---------- Phase 3: Regulatory Pulse strip (§3.3) ---------- */
.pulse-strip { margin: .25rem 0 1rem; }
.pulse-strip svg { width: 100%; height: 26px; display: block; }
.pulse-legend { font-size: .78rem; }
.pulse-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 .25rem 0 .6rem; vertical-align: middle; }

/* ---------- Phase 3: header search + footer nav + static pages ---------- */
.header-search { flex: 1 1 220px; max-width: 340px; }
/* NB: input width/padding/border are set once above (.header-search input, ~line 343).
   Do not re-declare padding here — it clobbers the 2.1rem left padding that keeps
   typed text clear of the search icon. */
.footer-nav { margin: 0 0 .6rem; }
.footer-nav a { color: #cdd4de; }
.static-page { max-width: 52rem; }
.glossary-list dt { font-weight: 700; color: var(--navy); margin-top: 1rem; font-size: 1.05rem; }
.glossary-list dd { margin: .2rem 0 0; }
.sso-row { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- Phase 3: diff review + info alerts (§7.3) ---------- */
.alert-info { background: #EAF2FB; border: 1px solid #93C5FD; color: #1D4ED8; padding: .7rem 1rem; border-radius: var(--radius); }
.diff-table td { vertical-align: top; max-width: 380px; overflow-wrap: anywhere; }
.diff-changed { background: #FEF9C3; }
.diff-changed td:first-child { font-weight: 700; }

.status-chip.status-fetched { background: var(--chip); }
.status-chip.status-drafted, .status-chip.status-in_review { background: #DBEAFE; border-color: #93C5FD; }
.status-chip.status-published { background: #DCFCE7; border-color: #86EFAC; }
.status-chip.status-rejected { background: #FEE2E2; border-color: #FCA5A5; }
.relevance-high { background: #DCFCE7; }
.relevance-low { background: #FEF9C3; }
.relevance-noise { background: #FEE2E2; }

/* ---------- Stat card icons (dashboard style) ---------- */
.stat-card { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; }
.stat-icon-blue   { background: #DBEAFE; color: #1D4ED8; }
.stat-icon-green  { background: #DCFCE7; color: #15803D; }
.stat-icon-orange { background: #FFEDD5; color: #C2410C; }
.stat-icon-purple { background: #F3E8FF; color: #7E22CE; }

/* ---------- Key Regulators: exactly one row, never wraps (scrolls if tight) ---------- */
.reg-row { display: flex; flex-wrap: nowrap; gap: .6rem; overflow-x: auto; padding-bottom: .25rem; }
.reg-row .reg-card { flex: 1 1 0; min-width: 132px; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-decoration: none; text-align: center; }
.reg-logo { width: var(--logo-size, 64px); height: var(--logo-size, 64px); object-fit: contain; border-radius: 8px; }
.reg-logo-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--chip); color: var(--navy); font-weight: 700; font-size: calc(var(--logo-size, 64px) * .28); border-radius: 8px; }
.reg-view-all { border-style: dashed; }
.reg-view-all .reg-logo-fallback { background: var(--navy); color: #fff; }
.reg-identity-logo { float: right; margin-left: 1rem; }

/* ---------- Country summary clamp + Read more ---------- */
.clamp-4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { background: none; border: 0; padding: .2rem 0; color: var(--navy); font-weight: 600; text-decoration: underline; cursor: pointer; font-size: .95rem; font-family: var(--font-body); }
.read-more:hover { color: var(--orange-text); }

/* ---------- Country hero image ---------- */
.country-header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.country-header-text { flex: 1 1 260px; }
.country-hero { width: 280px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); margin-left: auto; }
@media (max-width: 700px) { .country-hero { width: 100%; margin-left: 0; } }

/* ---------- At-a-Glance icons ---------- */
.glance-list dt { display: flex; align-items: center; gap: .4rem; }
.glance-icon { color: var(--gold-text); flex: 0 0 auto; }

/* ---------- Rich text content (sanitized WYSIWYG output) ---------- */
.rich-text p { margin: 0 0 .8rem; }
.rich-text p:last-child { margin-bottom: 0; }
.rich-text h2, .rich-text h3, .rich-text h4 { margin: 1.2rem 0 .4rem; }
.rich-text ul, .rich-text ol { margin: 0 0 .8rem; padding-left: 1.4rem; }
.rich-text img { max-width: 100%; height: auto; border-radius: var(--radius); }
.rich-text mark { background: #FFE79E; padding: 0 .15em; }
.rich-text table { border-collapse: collapse; margin: 0 0 .8rem; width: 100%; }
.rich-text th, .rich-text td { border: 1px solid var(--border); padding: .4rem .6rem; text-align: left; }
.rich-text a { color: var(--navy); }

/* ---------- Admin: editor + upload previews + settings ---------- */
.rich-editor { background: #fff; }
.rich-editor .ql-editor, .ql-container { min-height: 140px; font-family: var(--font-body); font-size: 1rem; }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--border); }
.reg-logo-preview { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; vertical-align: middle; }
.icon-setting label { display: flex; align-items: center; gap: .4rem; }
input[type="color"] { width: 100%; height: 42px; padding: .2rem; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }

/* Admin list flags (self-hosted SVG) */
.admin-flag{display:inline-block;width:22px;height:15px;vertical-align:middle;border-radius:2px;overflow:hidden;border:1px solid var(--line-2);margin-right:4px}
.admin-flag img{width:100%;height:100%;object-fit:cover;display:block}
.admin-flag.flag-fallback{display:inline-grid;place-items:center;font-size:8px;font-weight:600;color:var(--navy);background:var(--tint)}

/* ---------- Admin: user role filter + role chips ---------- */
.role-filter { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 1rem 0 1.25rem; }
.role-filter .lab { font-size: .85rem; color: var(--slate); margin-right: .1rem; }
.role-filter a { font-family: var(--font-label); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; padding: .32rem .75rem; border: 1px solid var(--border); border-radius: 999px; color: var(--slate); }
.role-filter a:hover { border-color: var(--navy); color: var(--navy); }
.role-filter a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.role-chip { font-family: var(--font-label); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: .14rem .55rem; border-radius: 999px; white-space: nowrap; display: inline-block; }
.role-chip.role-admin { background: var(--navy); color: #fff; }
.role-chip.role-editor { background: var(--gold); color: var(--navy); }
.role-chip.role-contributor { background: var(--tint); color: var(--navy); border: 1px solid var(--tint-2); }
.role-chip.role-member { background: var(--chip); color: var(--slate); border: 1px solid var(--border); }

/* =========================================================================
   Comparison engine (brief C1) — ADMIN styling: type manager, coverage grid,
   the obligation-form value fieldset, and the proposal cell in the inbox.
   ========================================================================= */
.btn-xs { padding: .1rem .4rem; font-size: .8rem; line-height: 1.1; }
.link-button.link-danger { color: var(--orange-text, #a5431f); }
tr.muted-row td { opacity: .6; }

/* Obligation-form comparison-value fieldset */
.cmp-fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1.1rem; margin: 1.2rem 0; background: var(--paper, #fff); }
.cmp-fieldset legend { padding: 0 .4rem; font-weight: 600; }
.cmp-note { border-left: 3px solid var(--gold); background: var(--gold-pale, #f5e8c4); padding: .6rem .8rem; border-radius: 0 6px 6px 0; margin: .6rem 0 .9rem; }
.cmp-note-rule { margin: 0 0 .3rem; }
.cmp-note-unit { margin: 0; font-size: .85rem; }
.cmp-value-fields { margin-top: .4rem; }
/* Value · Cell display · Source URL · Verified date on one row; Conditions on the next.
   url/date/search inputs miss the shared padding rule, so normalise every field here to
   one height (box-sizing + min-height) and top-align the cells so the inputs line up. */
.cmp-value-row { align-items: start; gap: .3rem 1rem; }
.cmp-value-row > div { min-width: 0; }
.cmp-value-row label { margin-top: 0; }
.cmp-widget .cmp-value-row input,
.cmp-widget .cmp-value-row select,
.cmp-widget .cmp-cond-row input {
  width: 100%; box-sizing: border-box; min-height: 42px;
  padding: .55rem .7rem; font-size: 1rem; font-family: var(--font-body);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #fff; color: var(--ink);
}
.cmp-cond-row { margin-top: .75rem; }

/* Coverage grid */
.coverage-wrap { max-width: 100%; }
table.coverage-grid { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.coverage-grid th, .coverage-grid td { border-bottom: 1px solid var(--line, #ece5d5); }
.coverage-grid .cov-rowhead { text-align: left; padding: .45rem .7rem; white-space: nowrap; position: sticky; left: 0; background: #fff; z-index: 2; }
.coverage-grid thead .cov-rowhead { z-index: 3; }
.coverage-grid .cov-colhead { padding: .4rem .5rem; text-align: center; font-family: var(--font-label); font-size: 11px; color: var(--dim2, #5c6474); }
.coverage-grid .cov-cell { text-align: center; padding: .4rem .5rem; font-weight: 700; }
.coverage-grid .cov-verified { color: var(--green, #1F7A4C); background: rgba(31,122,76,.08); }
.coverage-grid .cov-unverified { color: #8a6d1f; background: rgba(212,168,74,.14); }
.coverage-grid .cov-empty { color: var(--dim, #63697a); }
.cov-launch { margin-left: .35rem; font-size: .65rem; }

/* Proposed-value row in the suggestions inbox */
.proposal-cell { line-height: 1.5; }
.proposal-flag { display: inline-block; font-family: var(--font-label); font-size: 10px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: #8a6d1f; background: rgba(212,168,74,.18); border: 1px solid var(--gold); border-radius: 999px;
  padding: .1rem .5rem; margin-bottom: .25rem; }

.admin-filters { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: end; margin: .4rem 0 1rem; }
.admin-filters label { display: block; font-size: .78rem; color: var(--dim2, #5c6474); }

/* ===== Comparison — attribute model (migration 025 batch), ADMIN ===== */
/* Type-ahead search + fixed-type label */
.cmp-ta-search { margin-bottom: .4rem; }
.cmp-fixed-type { margin: 0 0 .5rem; }
.cmp-widget .cmp-note { border-left: 3px solid var(--gold); background: var(--gold-pale, #f5e8c4); padding: .55rem .8rem; border-radius: 0 6px 6px 0; margin: .5rem 0 .8rem; }
.cmp-widget .cmp-note-rule { margin: 0 0 .3rem; }
.cmp-widget .cmp-note-unit { margin: 0; font-size: .85rem; }

/* Country-anchored comparable-values panel on the country form */
.cav-panel { margin-top: 1.4rem; }
.cav-item { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; margin: .6rem 0; }
.cav-item .cav-row { flex: 1 1 auto; min-width: 0; }
.cav-actions { margin-top: .6rem; }
.cav-del { flex: 0 0 auto; }
.cav-add { border: 1px dashed var(--border); border-radius: 8px; padding: 1rem; margin-top: .6rem; }

/* Coverage: status filter bar */
.cov-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 1rem; }
.cov-fbtn { font-size: .78rem; padding: .22rem .6rem; border-radius: 999px; border: 1px solid var(--border); color: var(--slate); text-decoration: none; white-space: nowrap; }
.cov-fbtn:hover { border-color: var(--navy); }
.cov-fbtn.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.cov-anchor { font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; color: var(--dim2, #5c6474); border: 1px solid var(--line); border-radius: 999px; padding: 0 .35rem; margin-left: .35rem; }

/* Coverage grid: frozen header + first column, and status colours */
.coverage-wrap { overflow: auto; max-height: 72vh; }
.coverage-grid thead th { position: sticky; top: 0; z-index: 4; background: var(--wash, #f6f2ea); }
.coverage-grid thead th.cov-corner { left: 0; z-index: 6; }
.coverage-grid .cov-cell a { text-decoration: none; color: inherit; display: block; }
.coverage-grid .cov-stale { color: #8a6d1f; background: rgba(212,168,74,.10); }
.coverage-grid .cov-missing_source { color: var(--orange-text, #a5431f); background: rgba(196,87,45,.08); }
.coverage-grid td.cov-outlier { box-shadow: inset 0 0 0 2px var(--orange, #c4572d); border-radius: 4px; }
.coverage-wrap.cov-filtering .cov-cell { opacity: .28; }
.coverage-wrap.cov-filtering .cov-cell.cov-hit { opacity: 1; font-weight: 700; }

/* ===== Form validation: repopulate + inline error + focus (data-loss fix) ===== */
.has-error { outline: 2px solid var(--orange, #c4572d); outline-offset: 1px; }
.inline-err { color: var(--orange-text, #a5431f); font-size: .85rem; margin: .25rem 0 .2rem; font-weight: 600; }
/* Cascading dropdowns: a stored value invalid for the new country is flagged, not cleared */
.cascade-flag { color: var(--orange-text, #a5431f); font-size: .82rem; margin: .25rem 0 0; font-weight: 600; }
select.has-invalid-selection { outline: 2px solid var(--gold, #d4a84a); outline-offset: 1px; }

/* Inherited/overridden tag on comparable-value source + date (item 2) */
.cmp-inherit-tag{display:inline-block;font-size:.62rem;letter-spacing:.04em;text-transform:uppercase;color:#1F7A4C;background:rgba(31,122,76,.12);border-radius:999px;padding:0 .4rem;margin-left:.35rem;vertical-align:middle}
.cmp-inherit-tag.overridden{color:#8a6d1f;background:rgba(212,168,74,.16)}

/* ===== Obligation Types panel (item 3): visible arrows, filter, frozen header ===== */
.types-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 0 0 1rem; }
.types-filter input[type="search"] { min-width: 14rem; }
.types-filter-count { color: var(--dim2, #5c6474); font-size: .82rem; margin-left: auto; }
.ord-form { display: inline-flex; gap: 4px; }
.ord-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 28px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--navy); cursor: pointer;
  font-size: 13px; line-height: 1; }
.ord-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.ord-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.types-wrap { overflow: auto; max-height: 72vh; }
table.types-table { border-collapse: separate; border-spacing: 0; }
.types-table thead th { position: sticky; top: 0; z-index: 4; background: var(--wash, #f6f2ea); }
.types-table th, .types-table td { border-bottom: 1px solid var(--line, #ece5d5); }
/* Mobile: horizontal scroll with the first column (Order) frozen */
@media (max-width: 768px) {
  .types-table th:first-child, .types-table td:first-child { position: sticky; left: 0; z-index: 2; background: #fff; }
  .types-table thead th:first-child { z-index: 5; background: var(--wash, #f6f2ea); }
}

/* ===== Frozen table header (generic) + enforcement source references (feedback 2026-09-27) ===== */
.frozen-wrap { overflow: auto; max-height: 72vh; }
table.frozen-table { border-collapse: separate; border-spacing: 0; }
.frozen-table thead th { position: sticky; top: 0; z-index: 4; background: var(--wash, #f6f2ea); }
.frozen-table th, .frozen-table td { border-bottom: 1px solid var(--line, #ece5d5); }
.sort-switch { font-size: .9rem; margin: 0 0 .75rem; }
td.nowrap { white-space: nowrap; }
.list-head-actions { display: inline-flex; gap: .5rem; flex-wrap: wrap; }

/* ===== Batch B (feedback 2026-09-27): news → enforcement, account delete, sign-up notes ===== */
.news-enf { margin: .9rem 0; padding: .6rem .85rem; border: 1px dashed var(--border); border-radius: var(--radius); background: #fff; }
.news-enf-actions { margin: 0; display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; }
.news-enf-list { margin: .5rem 0 0; padding-left: 1.2rem; }
.news-enf-list[hidden] { display: none; }
.news-enf-new { font-weight: 600; }
.news-enf-done p { margin: 0 0 .5rem; }
.news-enf-done p:last-child { margin-bottom: 0; }
.danger-zone { margin-top: 1.5rem; border-color: #e6b8a2; }
.danger-zone h2 { font-size: 1.1rem; margin: 0 0 .4rem; }
.btn-danger { background: #a8420f; color: #fff; }
.btn-danger:hover { background: #8a3509; color: #fff; }
.small-note { font-size: .8rem; }

/* ===== Batch C (feedback 2026-09-27): newsletter issue + LinkedIn post ===== */
.nl-issue { margin: 1rem 0 1.5rem; }
.nl-issue h2 { margin-top: 0; }
.nl-status .tag { margin-right: .35rem; }
.nl-section { margin: .9rem 0; }
.nl-section .check-label { display: block; margin: .25rem 0; }
.social-form textarea { font-family: var(--font-mono, Consolas, monospace); font-size: .9rem; line-height: 1.5; }
.social-sources { margin: 1rem 0; }
.social-sources h3 { font-size: 1rem; margin: .9rem 0 .3rem; }
pre.social-text { white-space: pre-wrap; font-size: .85rem; margin: .5rem 0 0; }
/* Enforcement form: the chosen regulator's bookmarked enforcement pages */
.where-to-look { margin: .4rem 0 0; font-size: .88rem; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; }
.where-to-look[hidden], .where-to-look a[hidden] { display: none; }

/* ===== Country comparable-values panel — data-first, compact (item A) ===== */
/* Normalisation rule = small inline hint, not a full-width banner */
.cmp-widget .cmp-note { background: none; border: 0; border-left: 2px solid var(--gold); border-radius: 0;
  padding: .1rem 0 .1rem .6rem; margin: .35rem 0 .55rem; font-size: .82rem; color: var(--slate, #555); }
.cmp-widget .cmp-note-rule { margin: 0; }
.cmp-widget .cmp-note-unit { margin: .1rem 0 0; font-size: .76rem; }
/* Recorded values: compact list styled as a table */
.cav-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin: .4rem 0 1rem; }
.cav-list-head, .cav-sumrow { display: grid; grid-template-columns: 2.2fr 1fr 0.8fr 1fr auto; gap: 10px; align-items: center; padding: .5rem .8rem; }
.cav-list-head { background: var(--wash, #f6f2ea); font-family: var(--font-label); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; color: var(--dim2, #5c6474); }
.cav-vrow { border-top: 1px solid var(--line, #ece5d5); }
.cav-vrow:first-of-type { border-top: 0; }
.cav-sumrow { cursor: pointer; list-style: none; }
.cav-sumrow::-webkit-details-marker { display: none; }
.cav-vrow[open] > .cav-sumrow { background: var(--wash, #f6f2ea); }
.cav-attr-name { font-weight: 600; }
.cav-c-act { text-align: right; font-family: var(--font-label); font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--navy); }
.cav-vrow[open] .cav-c-act::after { content: " ▲"; }
.cav-vrow:not([open]) .cav-c-act::after { content: " ▼"; }
.cav-editwrap { padding: .8rem 1rem 1rem; background: #fff; border-top: 1px dashed var(--border); }
.cav-del { margin-top: .6rem; }
/* Add form behind a button */
.cav-add-wrap { margin-top: .4rem; }
.cav-add-btn { display: inline-block; cursor: pointer; list-style: none; background: var(--gold); color: var(--navy);
  font-family: var(--font-label); font-size: .8rem; font-weight: 700; letter-spacing: .02em; border-radius: 8px; padding: .55rem 1rem; }
.cav-add-btn::-webkit-details-marker { display: none; }
.cav-add-wrap[open] .cav-add-btn { border-radius: 8px 8px 0 0; }
.cav-add-wrap[open] .cav-add { border: 1px solid var(--gold); border-top: 0; border-radius: 0 0 8px 8px; padding: 1rem; }
.cav-add { margin-top: 0; }
@media (max-width: 768px) {
  .cav-list-head { display: none; }
  .cav-sumrow { grid-template-columns: 1fr; gap: 3px; }
  .cav-sumrow > span[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--dim2, #5c6474); }
  .cav-c-act { text-align: left; }
}

/* Suggestions inbox — reviewer comment form + stored note (trust layer A4.1, 2026-09-20) */
.sug-review { min-width: 210px; margin: 0; }
.sug-review textarea { width: 100%; box-sizing: border-box; font-size: .85rem; }
.sug-review-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 5px; }
.sug-review-row .btn { padding: .35rem .8rem; font-size: .82rem; }
.sug-note { font-size: .82rem; color: var(--ink); margin-top: 5px; max-width: 220px; line-height: 1.35; }

/* Reviewer public-profile fieldset on the admin user form (trust-layer /reviewers, 2026-09-20) */
.reviewer-profile { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; }
.reviewer-profile legend { font-weight: 600; color: var(--navy); padding: 0 6px; }

/* Reviewer profile workflow (trust layer, 2026-09-20) */
.rp-state { border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius); padding: 12px 16px; margin: 0 0 18px; }
.rp-state-draft { border-left-color: var(--muted); }
.rp-state-submitted { border-left-color: var(--gold); }
.rp-state-published { border-left-color: #2f8a4e; }
.rp-state strong { color: var(--navy); }
.rp-photo-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.rp-photo { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex: none; background: var(--chip); display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.rp-photo img { width: 100%; height: 100%; object-fit: cover; }
.rp-initials { font-size: 34px; font-weight: 600; color: var(--navy); }
.rp-juris-ro { margin: 12px 0; }
.rp-juris-chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rp-juris-chips li { background: var(--chip); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.rp-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.rp-state-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.rp-cell { display: flex; align-items: center; gap: 10px; }
.rp-cell-photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.rp-decline { margin-top: 6px; }
.rp-decline summary { cursor: pointer; color: var(--navy); font-size: .9em; }
.rp-decline textarea { width: 100%; box-sizing: border-box; margin: 4px 0; }

/* News source health states (2026-09-21) */
td.warn, .warn { color: #8a5a00; }
.src-badge { display: inline-block; font-family: var(--font-label); font-size: 10px; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.src-badge-blocked { background: #fbeceb; border: 1px solid #e3b7b3; color: #8a2b22; }
.src-badge-needsurl { background: #fdf3d8; border: 1px solid #e6cf94; color: #8a5a00; }

/* ---------- News pipeline admin: keyword table + review-queue triage (2026-09) ---------- */
/* Shared bulk toolbar */
.bulk-bar { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin: .8rem 0 .3rem; }
.row-actions { display: inline-flex; gap: .8rem; align-items: center; flex-wrap: wrap; }

/* Keyword Discovery */
.kw-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.kw-toolbar-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.kw-filter { display: flex; align-items: center; gap: .5rem; }
.kw-inline-label { display: inline; margin: 0; font-weight: 600; font-size: .85rem; }
.kw-filter select { width: auto; min-width: 12rem; }
.kw-addform { border: 1px solid var(--border); border-radius: var(--radius); background: var(--wash, #f6f2ea); padding: .8rem 1rem; margin: .6rem 0 1rem; max-width: 34rem; }
.kw-addform label { margin-top: .5rem; }
.kw-phrase-btn { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; text-align: left; cursor: pointer; }
.kw-phrase-btn:hover { text-decoration: underline; }
.kw-table td { vertical-align: middle; padding-top: .3rem; padding-bottom: .3rem; }
.kw-table th { padding-top: .35rem; padding-bottom: .35rem; }
.kw-actions { white-space: nowrap; text-align: right; }
.kw-actions .link-button { font-size: .9rem; }
.kw-sep { color: var(--muted); margin: 0 .35rem; }
.kw-edit-row > td { background: var(--wash, #f6f2ea); }
.kw-editform { max-width: 34rem; }
.kw-set { border-top: 1px solid var(--border); padding-top: .5rem; margin-top: 1rem; }
.kw-set:first-of-type { border-top: 0; margin-top: .3rem; }
.kw-droprow { margin: .2rem 0 .5rem; }
.kw-setform textarea { width: 100%; box-sizing: border-box; font-family: var(--font-body); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .6rem; }

/* Review-queue triage table */
.q-table td { vertical-align: top; }
.q-row { cursor: pointer; }
.q-row:focus, .q-row.q-focused { outline: 3px solid var(--navy); outline-offset: -3px; }
.q-row.q-open { background: var(--wash, #f6f2ea); }
.q-title-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--navy); text-align: left; cursor: pointer; }
.q-title-btn:hover { text-decoration: underline; }
.q-chips { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .25rem; }
.q-actions-cell { white-space: nowrap; }
.q-detail > td { background: var(--wash, #f6f2ea); border-top: 0; }
.q-detail .queue-form { max-width: 60rem; }
.q-detail textarea { width: 100%; box-sizing: border-box; font-family: var(--font-body); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .6rem; }
.q-prune { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .3rem 0 .6rem; }
.q-days { width: 5rem; }
/* news-workflow-brief §3/§4 — an undrafted item must LOOK undrafted, and the source
   originals are reference material, visibly not the editable fields. */
.q-title-btn.q-undrafted { font-style: italic; font-weight: 500; color: var(--dim2, #646E80); }
.publish-blocked { cursor: not-allowed; text-decoration: underline dotted; }
.q-detail .btn[disabled] { opacity: .5; cursor: not-allowed; }
.source-original { max-width: 60rem; margin: .8rem 0 0; padding: .6rem .8rem;
  background: #fff; border: 1px dashed var(--border); border-radius: var(--radius); }
.source-original p { margin: .2rem 0; }
.source-original > p:first-child { text-transform: uppercase; font-size: .75rem; letter-spacing: .04em; }
/* News pipeline v2 — story clusters (copies folded under a primary) and named
   unverified states. Copy rows are indented and washed so they read as "part of the
   row above", never as stories of their own. */
.q-row.q-dup td.q-headline { padding-left: 1.75rem; }
.q-row.q-dup { background: var(--wash, #f6f2ea); color: var(--slate); }
.q-cluster-toggle { cursor: pointer; }
.tag.suggested { background: #fdf3d8; border-color: #e6cf94; color: #8a5a00; }
.tag.developing { background: #FEF3E7; border-color: var(--orange); color: var(--orange-text, #8a3a1a); }
.basis-form { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.suggest-label { font-size: .85em; color: #8a5a00; }
/* Sources admin — authority-tier badges (official / regulator-domain hint). */
.src-badge-official { background: #e6f4ec; border: 1px solid #9fd1b3; color: #1F7A4C; }
.src-badge-regdomain { background: #fdf3d8; border: 1px solid #e6cf94; color: #8a5a00; }

@media (max-width: 767px) {
  .kw-toolbar { align-items: stretch; }
  .kw-filter select { flex: 1; }
}
