/* CIGOS brand tokens — direction A "Ledger" (chosen, docs/website/BRAND-GUIDELINES.md).
   The only file of the site that may hold colour values. */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --ink-1: #111827;
  --ink-2: #374151;
  --ink-3: #566070;
  --border: #d6dae1;
  --border-strong: #8a93a3;
  --primary: #1e3fad;
  --primary-hover: #18328a;
  --on-primary: #ffffff;
  --focus: #1e3fad;
  --hero-bg: #ffffff;
  --hero-ink: #111827;
  --hero-ink-2: #374151;
  --hero-cta-bg: #1e3fad;
  --hero-cta-ink: #ffffff;
  --hero-link: #1e3fad;
  --panel-bg: #ffffff;
  --panel-border: #d6dae1;
  --state-ok-bg: #e6f4ea;
  --state-ok-ink: #14532d;
  --state-stale-bg: #fdf1d3;
  --state-stale-ink: #6b4a00;
  --state-missing-bg: #eceef2;
  --state-missing-ink: #374151;
  --preview-bg: #fdf1d3;
  --preview-ink: #4a3300;
  --radius-card: 12px;
  --radius-control: 8px;
  --shadow-panel: 0 1px 2px rgba(17, 24, 39, 0.06), 0 8px 24px rgba(17, 24, 39, 0.06);
}
/* CIGOS public website — layout and components. Colours come from brand tokens only
   (tests/website-build.test.js rejects a colour value in this file). 8 px grid. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.55; color: var(--ink-2); background: var(--surface); }
h1, h2, h3, p, ul, ol, figure, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { color: var(--ink-1); line-height: 1.2; }
h1 { font-size: 32px; font-weight: 750; letter-spacing: -0.01em; }
h2 { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
h3 { font-size: 18px; font-weight: 650; margin-bottom: 8px; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[id] { scroll-margin-top: 80px; }

.wrap { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 10; padding: 12px 16px; background: var(--surface); border: 2px solid var(--focus); border-radius: var(--radius-control); }
.skip:focus { top: 8px; }
.preview-bar { padding: 8px 16px; font-size: 14px; text-align: center; background: var(--preview-bg); color: var(--preview-ink); }
.pending { padding: 0 4px; border-radius: 4px; background: var(--preview-bg); color: var(--preview-ink); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 20px; font-weight: 750; letter-spacing: 0.02em; color: var(--ink-1); text-decoration: none; }
.logo:hover { color: var(--ink-1); }
.logo-mark-bg { fill: var(--primary); }
.logo-mark-fg { fill: none; stroke: var(--on-primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-list { display: flex; gap: 24px; }
.nav-list a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.nav-list a:hover { color: var(--primary); text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.lang-switch { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
.header-actions .btn { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 20px; font-size: 16px; font-weight: 600; border-radius: var(--radius-control); border: 2px solid transparent; text-decoration: none; }
.btn-primary { background: var(--hero-cta-bg); color: var(--hero-cta-ink); border-color: var(--hero-cta-bg); }
.btn-primary:hover { color: var(--hero-cta-ink); filter: brightness(0.92); }
.btn-outline { color: var(--primary); border-color: var(--primary); background: var(--surface); }
.btn-outline:hover { color: var(--primary-hover); border-color: var(--primary-hover); }

/* Hero */
.hero { background: var(--hero-bg); padding: 40px 0 48px; border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; gap: 32px; }
.hero h1 { color: var(--hero-ink); }
.lead { margin-top: 16px; font-size: 18px; color: var(--hero-ink-2); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 24px; }
.hero-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--hero-link); font-weight: 600; }
.hero-link:hover { color: var(--hero-link); text-decoration-thickness: 2px; }

/* Illustration panel */
.panel { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: var(--radius-card); box-shadow: var(--shadow-panel); padding: 16px; min-width: 0; }
.panel-label { display: inline-block; margin-bottom: 12px; padding: 2px 8px; font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 999px; }
.check-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.check-table caption { text-align: left; font-weight: 650; color: var(--ink-1); padding-bottom: 8px; }
.check-table th, .check-table td { text-align: left; padding: 8px 8px 8px 0; border-top: 1px solid var(--border); font-weight: 400; color: var(--ink-2); }
.check-table thead th { border-top: 0; font-size: 13px; color: var(--ink-3); }
.check-table tbody th { color: var(--ink-1); font-weight: 600; }
.chip { display: inline-block; padding: 2px 8px; font-size: 13px; font-weight: 600; border-radius: 999px; white-space: nowrap; }
.chip-ok { background: var(--state-ok-bg); color: var(--state-ok-ink); }
.chip-stale { background: var(--state-stale-bg); color: var(--state-stale-ink); }
.chip-missing { background: var(--state-missing-bg); color: var(--state-missing-ink); border: 1px dashed var(--border-strong); }
.proposal { margin-top: 16px; padding: 16px; font-size: 14px; background: var(--surface-2); border-radius: var(--radius-control); }
.proposal-title { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.proposal p + p { margin-top: 4px; }
.proposal > p:nth-child(2) { color: var(--ink-1); font-weight: 600; }
.mock-actions { display: flex; gap: 8px; margin-top: 12px; }
.mock-btn { padding: 4px 12px; font-size: 13px; font-weight: 600; border: 1px solid var(--border-strong); border-radius: var(--radius-control); color: var(--ink-2); background: var(--surface); }
.mock-btn-primary { border-color: var(--primary); color: var(--primary); }

/* Sections */
.section { padding: 48px 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cols-3 { display: grid; gap: 24px; }
.ruled > li { padding-top: 16px; border-top: 2px solid var(--ink-1); }
.steps { display: grid; gap: 24px; counter-reset: step; }
.steps > li { counter-increment: step; padding-top: 16px; border-top: 1px solid var(--border-strong); }
.steps > li::before { content: counter(step); display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-top: 1px solid var(--border); font-weight: 400; }
.data-table thead th { border-top: 0; font-size: 13px; color: var(--ink-3); }
.data-table tbody th { color: var(--ink-1); font-weight: 600; }
.note { margin-top: 16px; font-size: 14px; color: var(--ink-3); max-width: 80ch; }
.status-group ul { display: grid; gap: 8px; }
.status-group li { padding-left: 16px; position: relative; }
.status-group li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.access p { max-width: 60ch; }
.access p + p { margin-top: 8px; }

/* Footer */
.site-footer { padding: 32px 0; font-size: 14px; color: var(--ink-3); border-top: 1px solid var(--border); }
.footer-row { display: grid; gap: 8px; }

@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
  .header-actions .btn { display: inline-flex; }
  .cols-3 { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .section { padding: 64px 0; }
  .footer-row { grid-template-columns: repeat(3, auto); justify-content: space-between; }
}
@media (min-width: 1040px) {
  h1 { font-size: 48px; }
  .nav-list { display: flex; }
  .hero { padding: 72px 0 80px; }
  .hero-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
  .lead { font-size: 20px; }
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* Article pages and footer links (WEB-M2.1) */
.nav-list a[aria-current="page"] { color: var(--ink-1); font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; }
.prose { padding-top: 40px; padding-bottom: 64px; }
.prose > .lead { color: var(--ink-2); max-width: 70ch; }
.prose-section { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.prose-section h2 { margin-bottom: 16px; }
.prose-section p { max-width: 75ch; }
.prose-section p + p, .prose-section p + ul, .prose-section ul + p, .prose-section p + .table-scroll, .prose-section .table-scroll + p { margin-top: 12px; }
.bullets { display: grid; gap: 8px; max-width: 75ch; }
.bullets li { padding-left: 16px; position: relative; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); }
@media (max-width: 1039px) {
  .site-header nav { order: 3; width: 100%; border-top: 1px solid var(--border); }
}

/* Draft legal pages (WEB-M2.2) */
.draft-bar { margin-bottom: 24px; padding: 12px 16px; font-size: 15px; font-weight: 600; background: var(--preview-bg); color: var(--preview-ink); border: 1px dashed var(--border-strong); border-radius: var(--radius-control); max-width: 75ch; }
