/* mawarslotresmi.sa.com — regulatory reference interface.
 *
 * Design intent: this must read as consumer-protection guidance and standards
 * documentation. Deep navy carries the structural chrome (masthead, hero,
 * footer, data panels) so the site announces institutional seriousness; the
 * reading surface is a cool off-white document, because thirty pages of dense
 * regulatory prose, tables and checklists are read, not admired.
 *
 * Cyan is signal, never decoration. Semantic green/amber/red appear only where
 * a status genuinely means something, and never carry meaning alone — every
 * status chip also carries a word and a glyph.
 *
 * No external fonts, no framework, no trackers: system stacks only, so there is
 * no font request, no FOUT and no layout shift.
 */

/* ============================================================== tokens */

:root {
  /* structural navy */
  --navy: #07111f;
  --navy-2: #0d1828;
  --navy-3: #132338;
  --navy-line: #1d3149;
  --navy-line-2: #27405e;

  /* document surfaces */
  --paper: #f7fafc;
  --paper-2: #ffffff;
  --paper-3: #eef3f8;
  --paper-sunk: #e6edf4;

  /* text on paper */
  --ink: #0b1b2d;
  --ink-2: #334a61;
  --ink-3: #5a7186;

  /* text on navy */
  --on-navy: #ffffff;
  --on-navy-2: #b9cbdd;
  --on-navy-3: #8ba4bd;

  /* accent */
  --accent: #0e7490;          /* accessible cyan-teal for links on paper */
  --accent-hover: #0b5c73;
  --accent-bright: #22d3ee;   /* cyan on navy only */
  --accent-wash: #0e749010;
  --accent-edge: #0e749033;

  /* semantic status — meaning only */
  --ok: #15803d;
  --ok-wash: #15803d12;
  --ok-edge: #15803d33;
  --warn: #a16207;
  --warn-wash: #a1620712;
  --warn-edge: #a1620733;
  --risk: #b91c1c;
  --risk-wash: #b91c1c10;
  --risk-edge: #b91c1c33;
  --neutral: #475569;
  --neutral-wash: #47556910;
  --neutral-edge: #47556930;

  /* lines */
  --line: #d3dee8;
  --line-soft: #e2eaf1;
  --line-strong: #b6c6d5;

  /* type */
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* metrics */
  --measure: 70ch;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shell: 1180px;
  --shell-narrow: 860px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

/* ============================================================== base */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  line-height: 1.22;
  margin: 0 0 0.5em;
  font-weight: 650;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: clamp(1.85rem, 4.4vw, 2.6rem); letter-spacing: -0.022em; }
h2 { font-size: clamp(1.35rem, 2.8vw, 1.7rem); margin-top: 2.2em; }
h3 { font-size: clamp(1.08rem, 2.1vw, 1.22rem); margin-top: 1.9em; }
h4 { font-size: 1rem; margin-top: 1.6em; color: var(--ink-2); }

h2:first-child, h3:first-child, h4:first-child { margin-top: 0; }

p, ul, ol, dl { margin: 0 0 1.05em; }
li { margin-bottom: 0.4em; }
li > ul, li > ol { margin-top: 0.4em; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2.5px;
}
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 3px;
}

strong { font-weight: 640; color: var(--ink); }

code, kbd, samp {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  word-break: break-word;
}

abbr[title] { text-decoration: underline dotted; cursor: help; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

img, svg { max-width: 100%; height: auto; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--narrow { max-width: var(--shell-narrow); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent-bright);
  color: var(--navy);
  padding: 0.7rem 1.1rem;
  font-weight: 650;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

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

/* ============================================================== header */

.site-header {
  background: var(--navy-2);
  border-bottom: 1px solid var(--navy-line);
  color: var(--on-navy);
}
.site-header .shell {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 62px;
  padding-block: 0.55rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--on-navy);
  text-decoration: none;
  font-weight: 680;
  font-size: 1.035rem;
  letter-spacing: -0.02em;
  flex: none;
}
.brand:hover { color: var(--on-navy); }
.brand svg { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-text small {
  font-size: 0.63rem;
  font-weight: 560;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--accent-bright);
}

.nav-toggle {
  margin-left: auto;
  display: none;
  align-items: center;
  gap: 0.45rem;
  background: var(--navy-3);
  color: var(--on-navy);
  border: 1px solid var(--navy-line-2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.8rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.nav-toggle:hover { background: var(--navy-line); }

.site-nav { margin-left: auto; }
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--on-navy-2);
  text-decoration: none;
  font-size: 0.895rem;
  font-weight: 560;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--navy-3); color: var(--on-navy); }
.site-nav a[aria-current] {
  color: var(--on-navy);
  background: var(--navy-3);
  box-shadow: inset 0 -2px 0 var(--accent-bright);
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    margin-left: 0;
    border-top: 1px solid var(--navy-line);
    padding-top: 0.5rem;
    margin-top: 0.15rem;
  }
  .site-header .shell { flex-wrap: wrap; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 0.72rem 0.6rem; font-size: 0.95rem; }
}

/* ============================================================== breadcrumbs */

.breadcrumbs { font-size: 0.83rem; }
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
  padding: 0;
  color: var(--ink-3);
}
.breadcrumbs li { margin: 0; display: flex; align-items: center; gap: 0.28rem; }
.breadcrumbs li + li::before {
  content: "/";
  color: var(--line-strong);
}
.breadcrumbs a { color: var(--ink-2); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink-3); }

.breadcrumbs--onnavy ol { color: var(--on-navy-3); }
.breadcrumbs--onnavy a { color: var(--on-navy-2); }
.breadcrumbs--onnavy a:hover { color: var(--accent-bright); }
.breadcrumbs--onnavy li + li::before { color: var(--navy-line-2); }
.breadcrumbs--onnavy [aria-current] { color: var(--on-navy-3); }

/* ============================================================== hero */

.hero {
  background:
    radial-gradient(1100px 420px at 78% -12%, #123049 0%, transparent 62%),
    var(--navy);
  color: var(--on-navy);
  border-bottom: 1px solid var(--navy-line);
  padding-block: clamp(2rem, 5.5vw, 3.6rem);
}
.hero .shell { display: grid; gap: 1.1rem; }
.hero .breadcrumbs { margin-bottom: 0.2rem; }
.hero h1 { color: var(--on-navy); max-width: 22ch; }
.hero--wide h1 { max-width: 28ch; }
.eyebrow {
  font-size: 0.715rem;
  font-weight: 660;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::after {
  content: "";
  height: 1px;
  flex: 1;
  max-width: 120px;
  background: linear-gradient(90deg, var(--accent-bright), transparent);
}
.hero .lede {
  font-size: clamp(1.02rem, 2.2vw, 1.16rem);
  color: var(--on-navy-2);
  max-width: 64ch;
  margin: 0;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

/* Page-level hero on interior pages: quieter. */
.hero--page { padding-block: clamp(1.6rem, 4vw, 2.6rem); }
.hero--page h1 { max-width: 26ch; }

/* ============================================================== buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.925rem;
  font-weight: 620;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.btn svg { flex: none; }

.btn--primary { background: var(--accent-bright); color: #04222c; border-color: var(--accent-bright); }
.btn--primary:hover { background: #67e3f5; color: #04222c; }

.btn--ghost { background: transparent; color: var(--on-navy); border-color: var(--navy-line-2); }
.btn--ghost:hover { background: var(--navy-3); color: var(--on-navy); border-color: var(--accent-bright); }

.btn--solid { background: var(--navy-2); color: var(--on-navy); border-color: var(--navy-2); }
.btn--solid:hover { background: var(--navy); color: var(--on-navy); }

.btn--outline { background: var(--paper-2); color: var(--ink); border-color: var(--line-strong); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }

.btn--sm { min-height: 38px; padding: 0.42rem 0.8rem; font-size: 0.85rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }

/* ============================================================== page body */

.page-body { padding-block: clamp(1.8rem, 4.5vw, 3rem); }
.prose { max-width: var(--measure); }
.prose > * + h2 { margin-top: 2.4em; }

/* Article layout with a sticky contents rail on wide screens. */
.layout-rail { display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
@media (min-width: 1040px) {
  .layout-rail {
    grid-template-columns: minmax(0, 1fr) 246px;
    align-items: start;
  }
  .layout-rail > .rail { position: sticky; top: 1.4rem; }
}

.rail {
  font-size: 0.86rem;
  border-left: 2px solid var(--line);
  padding-left: 1rem;
}
.rail h2 {
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.6rem;
  font-weight: 660;
}
.rail ol, .rail ul { list-style: none; margin: 0; padding: 0; }
.rail li { margin-bottom: 0.32rem; }
.rail a { color: var(--ink-2); text-decoration: none; display: block; line-height: 1.4; }
.rail a:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 1039px) {
  .rail {
    border-left: 0;
    border: 1px solid var(--line);
    background: var(--paper-2);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
  }
}

/* ============================================================== page meta */

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  align-items: center;
  font-size: 0.8rem;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 0.7rem;
  margin-bottom: 1.8rem;
}
.page-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.page-meta svg { color: var(--ink-3); flex: none; }
.page-meta b { font-weight: 620; color: var(--ink-2); }

/* ============================================================== quick answer */

.quick-answer {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: clamp(1rem, 2.6vw, 1.35rem);
  margin-bottom: 1.9rem;
}
.quick-answer h2 {
  margin: 0 0 0.5rem;
  font-size: 0.715rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 680;
}
.quick-answer > :last-child { margin-bottom: 0; }
.quick-answer p { font-size: 1.035rem; line-height: 1.6; }

/* ============================================================== callouts */

.callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--neutral);
  background: var(--neutral-wash);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin: 1.6rem 0;
  font-size: 0.945rem;
}
.callout > :last-child { margin-bottom: 0; }
.callout h3, .callout h4 {
  margin: 0 0 0.4rem;
  font-size: 0.945rem;
  font-weight: 660;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.callout h3 svg, .callout h4 svg { flex: none; }

.callout--warn { border-left-color: var(--warn); background: var(--warn-wash); border-color: var(--warn-edge); }
.callout--warn h3, .callout--warn h4 { color: #7c4a06; }
.callout--risk { border-left-color: var(--risk); background: var(--risk-wash); border-color: var(--risk-edge); }
.callout--risk h3, .callout--risk h4 { color: #8c1414; }
.callout--note { border-left-color: var(--accent); background: var(--accent-wash); border-color: var(--accent-edge); }
.callout--note h3, .callout--note h4 { color: var(--accent-hover); }
.callout--limit { border-left-color: var(--neutral); background: var(--paper-3); }

/* ============================================================== status chips */

/* Status is never colour alone: every chip carries a glyph and a word. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.775rem;
  font-weight: 620;
  line-height: 1.3;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--neutral-edge);
  background: var(--neutral-wash);
  color: var(--neutral);
  white-space: nowrap;
}
.chip svg { flex: none; }
.chip--ok { border-color: var(--ok-edge); background: var(--ok-wash); color: var(--ok); }
.chip--warn { border-color: var(--warn-edge); background: var(--warn-wash); color: var(--warn); }
.chip--risk { border-color: var(--risk-edge); background: var(--risk-wash); color: var(--risk); }
.chip--info { border-color: var(--accent-edge); background: var(--accent-wash); color: var(--accent-hover); }
.chip--square { border-radius: var(--radius-sm); }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }

/* ============================================================== cards */

.card-grid {
  display: grid;
  gap: 1rem;
  /* 290px rather than 255px so a six-card section lands 3+3 at desktop instead
   * of 4+2. A row of four followed by an orphaned pair reads as a mistake, and
   * every card grid on this site holds three, four or six items. */
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  margin: 1.4rem 0 2rem;
  padding: 0;
  list-style: none;
}
.card-grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card-grid li { margin: 0; }

.card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
a.card:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent);
  color: inherit;
}
.card h3, .card h2 {
  margin: 0;
  font-size: 1.015rem;
  font-weight: 645;
  line-height: 1.3;
  color: var(--ink);
}
a.card:hover h3, a.card:hover h2 { color: var(--accent-hover); }
.card p { margin: 0; font-size: 0.895rem; color: var(--ink-2); line-height: 1.55; }
.card .card-kicker {
  font-size: 0.675rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 660;
  color: var(--ink-3);
  margin: 0;
}
.card .card-foot {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 620;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.card--icon { display: grid; grid-template-columns: 34px 1fr; gap: 0.4rem 0.8rem; align-items: start; }
.card--icon .card-ico {
  grid-row: span 3;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent-wash);
  border: 1px solid var(--accent-edge);
  color: var(--accent);
}

/* ============================================================== jurisdiction cards */

.jur-card {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  height: 100%;
}
.jur-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.jur-card h3 { margin: 0; font-size: 1.04rem; }
.jur-card h3 a { text-decoration: none; }
.jur-card h3 a:hover { text-decoration: underline; }
.jur-flag {
  font-size: 0.675rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 680;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.12rem 0.4rem;
  background: var(--paper-3);
  white-space: nowrap;
}
.jur-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.8rem;
  font-size: 0.855rem;
}
.jur-card dt { color: var(--ink-3); font-weight: 600; }
.jur-card dd { margin: 0; color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }

/* ============================================================== tables */

.table-wrap {
  overflow-x: auto;
  margin: 1.4rem 0 1.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  -webkit-overflow-scrolling: touch;
}
.table-wrap:focus-visible { outline: 3px solid var(--accent-bright); }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.89rem;
  min-width: 480px;
}
table.data caption {
  caption-side: top;
  text-align: left;
  padding: 0.85rem 1rem 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-3);
  line-height: 1.5;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.62rem 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
table.data thead th {
  background: var(--paper-3);
  font-size: 0.755rem;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  font-weight: 680;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--paper); }
table.data th[scope="row"] { font-weight: 640; color: var(--ink); }

.table-note {
  font-size: 0.8rem;
  color: var(--ink-3);
  margin: -1.4rem 0 1.9rem;
  line-height: 1.5;
}

/* ============================================================== steps */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 1.5rem 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.steps > li {
  counter-increment: step;
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem 1rem 3.4rem;
  margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-2);
  color: var(--on-navy);
  font-size: 0.8rem;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}
.steps h3, .steps h4 { margin: 0 0 0.3rem; font-size: 0.99rem; font-weight: 645; }
.steps > li > :last-child { margin-bottom: 0; }
.steps p { font-size: 0.92rem; color: var(--ink-2); }

/* Compact numbered flow, used in the homepage workflow strip. */
.flow {
  list-style: none;
  counter-reset: flow;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
}
.flow > li {
  counter-increment: flow;
  margin: 0;
  padding: 0.9rem 0.95rem;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-sm);
  background: #0b1728;
}
.flow > li::before {
  content: counter(flow);
  display: inline-grid;
  place-items: center;
  width: 1.4rem; height: 1.4rem;
  border-radius: 50%;
  background: var(--accent-bright);
  color: #04222c;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.flow h3 { margin: 0 0 0.2rem; font-size: 0.9rem; color: var(--on-navy); font-weight: 640; }
.flow p { margin: 0; font-size: 0.815rem; color: var(--on-navy-3); line-height: 1.5; }

/* ============================================================== source box */

.source-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: 1rem 1.15rem;
  margin: 1.3rem 0;
  display: grid;
  gap: 0.42rem;
}
.source-box .src-label {
  font-size: 0.665rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 690;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}
.source-box h3, .source-box h4 { margin: 0; font-size: 1rem; font-weight: 645; }
.source-box p { margin: 0; font-size: 0.885rem; color: var(--ink-2); }
.source-box .src-meta {
  font-size: 0.775rem;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
}
.source-box .src-link {
  font-size: 0.885rem;
  font-weight: 620;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  overflow-wrap: anywhere;
}

/* Compact source list used in the "Primary sources" section. */
.source-list { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 0.8rem; }
.source-list > li {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-edge);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  font-size: 0.89rem;
  line-height: 1.55;
}
.source-list .src-auth {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 680;
  color: var(--ink-3);
  margin-bottom: 0.15rem;
}
.source-list a { font-weight: 600; overflow-wrap: anywhere; }
.source-list .src-when { display: block; font-size: 0.775rem; color: var(--ink-3); margin-top: 0.25rem; }

.ext-note {
  font-size: 0.72rem;
  color: var(--ink-3);
  font-weight: 560;
}

/* ============================================================== checklist */

.checklist { list-style: none; margin: 1.4rem 0 2rem; padding: 0; display: grid; gap: 0.6rem; }
.checklist > li {
  margin: 0;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.75rem;
  align-items: start;
}
.checklist input[type="checkbox"] {
  /* 24px clears the WCAG 2.5.8 minimum on the control alone. The real target is
   * larger still: each box has a <label for>, so the whole label toggles it. */
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.05rem 0 0;
  accent-color: var(--accent);
  flex: none;
  cursor: pointer;
}
.checklist label { font-weight: 620; cursor: pointer; line-height: 1.45; }
.checklist .ck-why {
  grid-column: 2;
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.checklist-score {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-3);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
}
.checklist-score p { margin: 0 0 0.4rem; }
.checklist-score p:last-child { margin-bottom: 0; }
.checklist-score .score-n { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.15rem; }

/* ============================================================== checker */

.checker {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.6rem 0 2rem;
}
.checker-head {
  background: var(--navy-2);
  color: var(--on-navy);
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid var(--navy-line);
}
.checker-head h2, .checker-head h3 { margin: 0 0 0.25rem; color: var(--on-navy); font-size: 1.08rem; }
.checker-head p { margin: 0; font-size: 0.86rem; color: var(--on-navy-3); }

.checker-body { padding: clamp(1rem, 3vw, 1.4rem); display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.35rem; }
.field > label { font-weight: 620; font-size: 0.9rem; }
.field .hint { font-size: 0.815rem; color: var(--ink-3); margin: 0; line-height: 1.5; }

.field select,
.field input[type="text"],
.field input[type="search"] {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.62rem 0.75rem;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  color: var(--ink);
  width: 100%;
  max-width: 100%;
}
.field select:focus-visible,
.field input:focus-visible { border-color: var(--accent); }

.field-row { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.checker-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.checker-out {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(1rem, 3vw, 1.4rem);
  display: grid;
  gap: 1rem;
}
.checker-out[hidden] { display: none; }
.checker-out h3 { margin: 0; font-size: 1.02rem; }

.route-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  display: grid;
  gap: 0.6rem;
}
.route-card h4 { margin: 0; font-size: 0.97rem; }
.route-card dl { margin: 0; display: grid; gap: 0.3rem 0.85rem; grid-template-columns: auto 1fr; font-size: 0.87rem; }
.route-card dt { color: var(--ink-3); font-weight: 620; }
.route-card dd { margin: 0; color: var(--ink-2); overflow-wrap: anywhere; }
.route-card ol, .route-card ul { margin: 0; padding-left: 1.15rem; font-size: 0.89rem; color: var(--ink-2); }

.copy-box {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.copy-box .copy-val { flex: 1 1 12ch; min-width: 0; overflow-wrap: anywhere; }

.privacy-note {
  font-size: 0.8rem;
  color: var(--ink-3);
  border-top: 1px dashed var(--line);
  padding-top: 0.75rem;
  margin: 0;
  line-height: 1.55;
}

/* Status legend on the checker page. */
.status-legend { display: grid; gap: 0.7rem; margin: 1.4rem 0 2rem; padding: 0; list-style: none; }
.status-legend > li {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 210px) 1fr;
  gap: 0.3rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.status-legend > li:last-child { border-bottom: 0; }
.status-legend p { margin: 0; font-size: 0.89rem; color: var(--ink-2); }
@media (max-width: 560px) {
  .status-legend > li { grid-template-columns: 1fr; }
}

/* ============================================================== directory filter */

.filter-bar {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.4rem 0;
}
.filter-count { font-size: 0.85rem; color: var(--ink-3); margin: 0 0 1rem; }

/* ============================================================== section band */

.band { padding-block: clamp(2rem, 5vw, 3.2rem); }
.band--sunk { background: var(--paper-3); border-block: 1px solid var(--line); }
.band--navy {
  background: var(--navy);
  color: var(--on-navy);
  border-block: 1px solid var(--navy-line);
}
.band--navy h2, .band--navy h3 { color: var(--on-navy); }
.band--navy p { color: var(--on-navy-2); }
.band--navy a { color: var(--accent-bright); }

.band-head { margin-bottom: 1.4rem; max-width: 64ch; }
.band-head h2 { margin-top: 0; }
.band-head p { margin-bottom: 0; color: var(--ink-2); }
.band--navy .band-head p { color: var(--on-navy-2); }

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 620;
  font-size: 0.9rem;
  text-decoration: none;
}
.section-link:hover { text-decoration: underline; }

/* ============================================================== faq / details */

details.qa {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  margin-bottom: 0.7rem;
}
details.qa > summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 620;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
}
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary::after {
  content: "";
  flex: none;
  width: 0.55rem; height: 0.55rem;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
details.qa[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
details.qa .qa-body { padding: 0 1rem 1rem; font-size: 0.93rem; color: var(--ink-2); }
details.qa .qa-body > :last-child { margin-bottom: 0; }

/* ============================================================== definition list */

dl.defs { display: grid; gap: 0.9rem; margin: 1.3rem 0 1.9rem; }
dl.defs > div { border-left: 2px solid var(--line-strong); padding-left: 0.95rem; }
dl.defs dt { font-weight: 645; color: var(--ink); margin-bottom: 0.15rem; }
dl.defs dd { margin: 0; font-size: 0.93rem; color: var(--ink-2); }

/* ============================================================== key-value strip */

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.4rem 0 1.9rem;
}
.kv > div { background: var(--paper-2); padding: 0.9rem 1rem; }
.kv dt {
  font-size: 0.675rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 680;
  color: var(--ink-3);
  margin-bottom: 0.2rem;
}
.kv dd { margin: 0; font-size: 0.93rem; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.kv dd a { font-weight: 600; }

/* ============================================================== footer */

.site-footer {
  background: var(--navy);
  color: var(--on-navy-2);
  border-top: 1px solid var(--navy-line);
  padding-block: clamp(2rem, 5vw, 3rem) 1.6rem;
  font-size: 0.89rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  padding-bottom: 1.7rem;
  border-bottom: 1px solid var(--navy-line);
}
.footer-grid h2 {
  font-size: 0.685rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 0.65rem;
  font-weight: 680;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-grid a { color: var(--on-navy-2); text-decoration: none; }
.footer-grid a:hover { color: var(--accent-bright); text-decoration: underline; }

.footer-note { padding-top: 1.4rem; display: grid; gap: 0.8rem; }
.footer-note p { margin: 0; font-size: 0.815rem; line-height: 1.6; color: var(--on-navy-3); max-width: 96ch; }
.footer-note strong { color: var(--on-navy); }
.footer-note a { color: var(--on-navy-2); }
.footer-note a:hover { color: var(--accent-bright); }


.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  padding-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--on-navy-3);
}

/* ============================================================== misc */

.lead-out {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: 1.15rem 1.25rem;
  margin: 2.2rem 0 0;
}
.lead-out h2 { margin: 0 0 0.5rem; font-size: 1.02rem; }
.lead-out ul { margin: 0; padding-left: 1.1rem; font-size: 0.92rem; }
.lead-out li { margin-bottom: 0.3rem; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 0.86rem; }

@media print {
  .site-header, .site-footer, .rail, .hero-actions, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .hero { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .hero h1, .eyebrow, .hero .lede { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; word-break: break-all; }
}

/* ============================================================== cited phrases */

/* A phrase the page quotes as an example of language it refuses to publish.
 * Marking these is not decoration: the leak scanner strips .cited spans before
 * matching, so the marker is what lets an editorial policy name the thing it
 * bans without failing its own build. */
.cited {
  font-style: italic;
  color: var(--ink-2);
  white-space: nowrap;
}
.cited::before { content: "\201C"; }
.cited::after { content: "\201D"; }

/* ============================================================== overflow guards */

/* Grid and flex items default to min-width:auto, so a child with a large
 * min-content width — a data table with a min-width, a long regulator URL —
 * pushes the track wider than the viewport instead of letting its own
 * overflow-x container do its job. This is the fix for that, applied at every
 * level where we nest a scrollable region inside a track. */
.layout-rail > *,
.card-grid > li,
.kv > div,
.checklist > li,
.status-legend > li { min-width: 0; }

/* ============================================================== tap targets */

/* The brand is a primary control, not a run of inline text, so it carries the
 * full 44px target height even though its label is one line tall. */
.brand { min-height: 44px; }

/* Footer links are navigation in a dense block. They take the WCAG 2.5.8 inline
 * standard rather than the 44px control standard — forcing 44px on every link in
 * a six-item footer column would triple the footer's height for no gain — but
 * they still need to clear it, which one line of text alone does not. */
.footer-grid a,
.footer-legal a,
.rail a { display: inline-block; padding-block: 0.3rem; }
.footer-grid li { margin-bottom: 0.15rem; }
.rail li { margin-bottom: 0.05rem; }

/* Main navigation is a primary control: 44px minimum target height. The header
 * shell already reserves 62px, so this costs nothing above the fold. */
.site-nav a { padding-block: 0.66rem; }

/* ============================================================== external links */

/* The outbound-link glyph, drawn once in CSS instead of once per link.
 * The sources page carries nearly five hundred external links; an inline SVG on
 * each was 200 kB of identical markup on a single page. A mask over currentColor
 * keeps it inheriting the link's colour, and it is decorative — every external
 * link already carries visible wording or a labelled context. */
a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 0.66em;
  height: 0.66em;
  margin-left: 0.3em;
  vertical-align: -0.01em;
  background-color: currentColor;
  -webkit-mask: var(--ext-ico) center / contain no-repeat;
  mask: var(--ext-ico) center / contain no-repeat;
}
/* Buttons carry their own label and framing; a glyph inside one is noise. */
a.btn[target="_blank"]::after { margin-left: 0.15em; }

:root {
  --ext-ico: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4 11 13'/%3E%3Cpath d='M18 14.5V19a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 4 19V8a1.5 1.5 0 0 1 1.5-1.5H10'/%3E%3C/svg%3E");
}

@media print {
  a[target="_blank"]::after { display: none; }
}

/* Grid children default to min-width:auto, so one long unbreakable token — a
 * regulator URL, a Dutch compound noun — sets the track's min-content width and
 * pushes the card wider than its parent. These cards carry both. */
.jur-card > *,
.route-card > *,
.source-list > li > * { min-width: 0; }
.jur-card, .route-card { overflow-wrap: anywhere; }
.jur-card-head h3 { overflow-wrap: anywhere; }

/* Grow the checklist label's hit area to 44px without moving anything: the
 * padding enlarges the box the browser tests for a click, the equal negative
 * margin takes the space back out of the layout. Clicking the label toggles the
 * checkbox, so this is the real target, not the 24px box beside it. */
.checklist label {
  padding-block: 0.72rem;
  margin-block: -0.72rem;
}

/* ============================================================== homepage hero */

/*
 * The homepage hero carries a background figure. Three layers, bottom to top:
 * the navy base on .hero, the figure on ::before, and a readability gradient on
 * ::after. The text sits above all three on flat colour.
 *
 * The figure is an SVG (~6 kB) rather than a photograph, so it adds effectively
 * nothing to page weight, stays sharp at any width, and could be composed with
 * its subject weighted right and its left third empty — which is what lets the
 * headline sit on undisturbed navy instead of on detail.
 */
.hero--home {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3rem, 8.5vw, 5.75rem);
}

.hero--home::before,
.hero--home::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero--home::before {
  z-index: -2;
  background-image: url("/assets/img/hero-regulatory.svg");
  background-repeat: no-repeat;
  background-position: 88% 22%;
  background-size: cover;
  opacity: 0.5;
}

/* Narrow screens get an overall wash; wide screens get a left-to-right one, so
 * the figure survives on the right where there is no type over it. */
.hero--home::after {
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(7, 17, 31, 0.5) 0%,
    rgba(7, 17, 31, 0.78) 46%,
    rgba(7, 17, 31, 0.93) 100%
  );
}

.hero--home .shell { gap: 1.15rem; }
.hero--home h1 { max-width: 19ch; }
.hero--home .lede { max-width: 52ch; }
.hero--home .hero-actions { margin-top: 0.6rem; }

@media (min-width: 900px) {
  .hero--home::before {
    background-position: right -40px center;
    background-size: auto 112%;
    opacity: 0.72;
  }
  .hero--home::after {
    background: linear-gradient(
      90deg,
      var(--navy) 0%,
      rgba(7, 17, 31, 0.96) 30%,
      rgba(7, 17, 31, 0.84) 54%,
      rgba(7, 17, 31, 0.45) 78%,
      rgba(7, 17, 31, 0.26) 100%
    );
  }
  .hero--home h1 { max-width: 22ch; }
  .hero--home .lede { max-width: 44ch; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero--home::before { transition: opacity 0.3s ease; }
}

/* ============================================================== section rhythm */

/* More air between bands. The page lost roughly a third of its copy in the
 * composition pass; without wider gutters the removals just read as gaps. */
.band { padding-block: clamp(2.6rem, 6vw, 4.5rem); }
.band-head { margin-bottom: clamp(1.4rem, 3vw, 2.1rem); }
.band .card-grid:last-child,
.band .flow:last-child { margin-bottom: 0; }

/* The numbered workflow was built for navy bands. On a light band it needs the
 * paper treatment, or it reads as a hole punched in the section. */
.band:not(.band--navy) .flow > li {
  background: var(--paper-2);
  border-color: var(--line);
}
.band:not(.band--navy) .flow h3 { color: var(--ink); }
.band:not(.band--navy) .flow p { color: var(--ink-2); }

/* ============================================================== faq */

/*
 * Built on <details>/<summary>: keyboard-operable and state-announcing without
 * script, and the answers are in the HTML whether or not JavaScript runs.
 * site.js layers aria-expanded on top as enhancement.
 */
.faq {
  display: grid;
  gap: 0.6rem;
  max-width: 62rem;
  margin-inline: auto;
}

.faq-item {
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  background: #0b1728;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.faq-item:hover { border-color: var(--navy-line-2); }
.faq-item[open] {
  border-color: rgba(34, 211, 238, 0.42);
  background: #0c1c2f;
}

.faq-item > summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 1.2rem;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}
.faq-item > summary::-webkit-details-marker { display: none; }

.faq-n {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--accent-bright);
  opacity: 0.72;
}

.faq-q {
  font-size: clamp(0.99rem, 1.5vw, 1.09rem);
  font-weight: 625;
  line-height: 1.38;
  color: var(--on-navy);
  text-wrap: pretty;
}

.faq-ico {
  width: 0.62rem;
  height: 0.62rem;
  border-right: 2px solid var(--accent-bright);
  border-bottom: 2px solid var(--accent-bright);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.18s ease;
  opacity: 0.85;
}
.faq-item[open] .faq-ico { transform: rotate(-135deg) translate(-2px, -2px); }

.faq-a {
  padding: 0 1.2rem 1.15rem;
  color: var(--on-navy-2);
  font-size: 0.945rem;
  line-height: 1.68;
}
.faq-a p { margin: 0 0 0.75rem; max-width: 70ch; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a a { color: var(--accent-bright); }
.faq-a a:hover { color: #67e3f5; }

/* Indent the answer under the question on wider screens, so the number column
 * reads as a spine rather than as a stray character. */
@media (min-width: 560px) {
  .faq-a { padding-left: calc(1.2rem + 2.05rem); }
}

/* The six-step flow needs explicit column counts, not auto-fit. Left to itself
 * it packs five across at 1024 and orphans the sixth, which reads as a bug.
 * Six items divide cleanly by 2, 3 and 6, so those are the only widths used. */
.flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .flow { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
