/* Built by scripts/build-css.mjs; do not edit. */
/*
 * Assize design tokens.
 *
 * One neutral palette shared by every brand; each brand overrides only
 * --accent and --accent-ink via [data-brand] on <html>. Colours were picked
 * for WCAG 2.2 AA: body text and links clear 7:1 on --paper in both schemes.
 */

:root {
  color-scheme: light dark;

  --font-serif: "Source Serif 4 Variable", "Source Serif Pro", Georgia, Cambria, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans Variable", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --paper: #fbfaf7;
  --paper-raised: #ffffff;
  --panel: #f3f1ec;
  --ink: #17191c;
  --ink-muted: #4a4f57;
  --rule: #dcd8cf;
  --rule-strong: #b9b3a6;
  --focus: #1a5fb4;

  --accent: #7b2331;        /* Assize Data — claret, after legal red tape */
  --accent-ink: #ffffff;    /* text on an --accent background */
  --accent-soft: #f4e8ea;

  --measure: 40rem;
  --page: 70rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;
  --radius: 4px;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.4rem);
  --step-4: clamp(2.15rem, 1.6rem + 2.6vw, 3.4rem);
}

[data-brand="news"] { --accent: #1d4e89; --accent-soft: #e6edf6; }
[data-brand="careers"] { --accent: #2a6448; --accent-soft: #e5f0ea; }
[data-brand="cases"] { --accent: #6b470d; --accent-soft: #f5ecdc; }
[data-brand="books"] { --accent: #5a2f6e; --accent-soft: #f1e9f5; }
[data-brand="prosecutions"] { --accent: #8a3510; --accent-soft: #f7e9e1; }
[data-brand="privacy"] { --accent: #0d5c63; --accent-soft: #e3f1f2; }
[data-brand="compliance"] { --accent: #3a4a5e; --accent-soft: #e8edf3; }
[data-brand="research"] { --accent: #485212; --accent-soft: #eef0dc; }
[data-brand="custody"] { --accent: #3a3f7a; --accent-soft: #e9eaf5; }
[data-brand="enforcement"] { --accent: #1f5d52; --accent-soft: #e4f1ee; }
[data-brand="civil"] { --accent: #7a2843; --accent-soft: #f6e8ed; }

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121416;
    --paper-raised: #1a1d20;
    --panel: #1a1d20;
    --ink: #ecebe7;
    --ink-muted: #a9adb3;
    --rule: #2e3236;
    --rule-strong: #4a4f55;
    --focus: #8ab4f8;

    --accent: #e8a3ad;
    --accent-ink: #121416;
    --accent-soft: #2a1b1e;
  }

  [data-brand="news"] { --accent: #9cc2f0; --accent-soft: #17222f; }
  [data-brand="careers"] { --accent: #93d1b0; --accent-soft: #15241c; }
  [data-brand="cases"] { --accent: #e3c07f; --accent-soft: #2a2214; }
  [data-brand="books"] { --accent: #d4b5e8; --accent-soft: #241a2b; }
  [data-brand="prosecutions"] { --accent: #f0a982; --accent-soft: #2c1a12; }
  [data-brand="privacy"] { --accent: #86d2d9; --accent-soft: #13272a; }
  [data-brand="compliance"] { --accent: #b8c6d8; --accent-soft: #1c2129; }
  [data-brand="research"] { --accent: #c5d184; --accent-soft: #20240f; }
  [data-brand="custody"] { --accent: #b7bbf0; --accent-soft: #1c1d2e; }
  [data-brand="enforcement"] { --accent: #8fd3c4; --accent-soft: #142824; }
  [data-brand="civil"] { --accent: #f2a7c0; --accent-soft: #2b1820; }
}

/* Base element styles and layout primitives shared by every Assize site. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--space-6);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
  padding-bottom: var(--space-9);
}

/* A page that ends on a full-bleed panel runs straight into the footer. */
main:has(> .section--panel:last-child) {
  padding-bottom: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

h1 { font-size: var(--step-4); letter-spacing: -0.02em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p,
ul,
ol,
dl,
address,
table {
  margin: 0 0 var(--space-4);
}

p { text-wrap: pretty; }

address { font-style: normal; }

ul,
ol { padding-left: 1.25em; }

li + li { margin-top: var(--space-2); }

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

a:hover { text-decoration-thickness: 2px; }

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

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: var(--space-7) 0;
}

strong { font-weight: 600; }

small { font-size: var(--step--1); }

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-3) var(--space-3) var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
}

th { font-weight: 600; }

/* ---------- Layout primitives ---------- */

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

.measure { max-width: var(--measure); }

.section { padding-block: var(--space-8); }
.section + .section { border-top: 1px solid var(--rule); }
.section--panel { background: var(--panel); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--space-3);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 36rem;
}

.muted { color: var(--ink-muted); }

.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;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  font-weight: 600;
}

.skip-link:focus { top: var(--space-4); }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.button--quiet {
  background: transparent;
  color: var(--accent);
}

/* ---------- Prose (legal pages, long copy) ---------- */

.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin-top: var(--space-7); }
.prose h3 { font-size: var(--step-1); margin-top: var(--space-6); }
.prose > :first-child { margin-top: 0; }

.updated {
  font-size: var(--step--1);
  color: var(--ink-muted);
}

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

@media print {
  .site-header nav,
  .skip-link,
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: inherit; }
}

/* Civil Cases by Assize Data, on the shared tokens and base styles (packages/theme). Built into public/site.css. No
   inline styles anywhere (the CSP allows none without adverts): charts are coloured by class from here. Plain and
   readable: nothing that looks like a court or HMCTS. */

/* The brand's accent: a deep claret that clears 7:1 on paper; a soft rose in dark mode. */
[data-brand="civil"] { --accent: #7a2843; --accent-ink: #ffffff; --accent-soft: #f6e8ed; }
/* Chart series: the dataviz reference palette's first three slots, validated as a set in light and dark. */
:root { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; }
@media (prefers-color-scheme: dark) {
  [data-brand="civil"] { --accent: #f2a7c0; --accent-ink: #121416; --accent-soft: #2b1820; }
  :root { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--space-4); top: var(--space-4); background: var(--paper-raised); padding: var(--space-2); z-index: 2; }
.preview { background: var(--accent); color: var(--accent-ink); font: 600 var(--step--1) var(--font-sans); padding: var(--space-2) var(--gutter); }

header.site { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); padding: var(--space-4) var(--gutter);
  border-bottom: 1px solid var(--rule); font-family: var(--font-sans); }
header.site .brand { font: 700 var(--step-1) var(--font-serif); color: var(--ink); text-decoration: none; }
header.site nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: var(--step--1); }
header.site nav a { color: var(--ink-muted); text-decoration: none; }
header.site nav a[aria-current="page"], header.site nav a:hover { color: var(--accent); text-decoration: underline; }
header.site .search { margin-left: auto; }
header.site .search input { min-width: 16rem; }
header.site .search, header.site .search input { max-width: 100%; }
@media (max-width: 40rem) { header.site .search { margin-left: 0; width: 100%; } header.site .search input { min-width: 0; width: 100%; } }

/* body is a flex column (theme): min-width 0 lets a wide table scroll inside its wrapper instead of widening the page. */
main { width: 100%; min-width: 0; max-width: var(--page); margin: 0 auto; padding: var(--space-5) var(--gutter) var(--space-8); }
main section { margin-top: var(--space-6); }
h1 .h1-sub { display: block; font-size: var(--step-1); color: var(--ink-muted); font-weight: 400; margin-top: var(--space-2); }
.small { font-size: var(--step--1); }
.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: var(--space-3) var(--space-4); max-width: var(--measure); }
.draft { border: 2px dashed var(--accent); padding: var(--space-2) var(--space-3); border-radius: var(--radius); max-width: var(--measure); font-family: var(--font-sans); }
.crumbs { font: var(--step--1) var(--font-sans); }

input, select, textarea, button { font: inherit; }
input, select { border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: var(--space-2); background: var(--paper-raised); color: var(--ink); }
button { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius); padding: var(--space-2) var(--space-4); cursor: pointer; }
.big-search { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: end; margin: var(--space-5) 0; }
.big-search label { flex-basis: 100%; font-weight: 600; }
.big-search input { flex: 1; min-width: 14rem; font-size: var(--step-1); }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: end; margin: var(--space-4) 0; font-family: var(--font-sans); font-size: var(--step--1); }
.filters label { display: grid; gap: var(--space-1); }
.filters select, .filters input { max-width: 16rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--step--1); font-family: var(--font-sans); }
caption { text-align: left; font-weight: 600; padding: var(--space-2) 0; }
th, td { text-align: left; vertical-align: top; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--rule); }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: var(--space-3); margin: var(--space-4) 0; }
.stat { border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--space-3); background: var(--paper-raised); }
.stat-value { font: 600 var(--step-2) var(--font-sans); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--ink-muted); font-size: var(--step--1); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-5); font-family: var(--font-sans); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }
@media (max-width: 40rem) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: var(--space-2); } }

.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--space-3); }
.cards li { border: 1px solid var(--rule); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: var(--space-3) var(--space-4);
  background: var(--paper-raised); display: grid; gap: var(--space-1); }
.cards span { color: var(--ink-muted); font-size: var(--step--1); }
.reports li { margin: var(--space-2) 0; }

.crisis { border: 2px solid var(--accent); border-radius: var(--radius); padding: var(--space-3) var(--space-4); margin: var(--space-5) 0;
  background: var(--accent-soft); max-width: var(--measure); }
.crisis h2 { margin-top: 0; font-size: var(--step-1); }
.crisis ul { padding-left: var(--space-5); }
.help { border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: var(--space-3) var(--space-4); max-width: var(--measure); margin: var(--space-5) 0; }
.help h2 { margin-top: 0; font-size: var(--step-1); }
ol.steps { max-width: var(--measure); padding-left: var(--space-5); }
ol.steps li { margin: var(--space-3) 0; padding-left: var(--space-1); }

/* Charts: plain SVG, scrolled sideways inside their own box on a phone rather than shrunk past reading. */
.figure { margin: var(--space-4) 0; }
.chart-wrap { overflow-x: auto; }
.chart { display: block; width: 100%; min-width: 30rem; height: auto; font-family: var(--font-sans); }
.chart .grid line { stroke: var(--rule); stroke-width: 1; }
.chart text { fill: var(--ink-muted); font-size: 12px; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.dashed { stroke-dasharray: 6 4; }
.chart .hit { fill: transparent; stroke: none; }
.chart .hit:hover { fill: var(--ink-muted); fill-opacity: 0.35; }
.chart .s1 { stroke: var(--series-1); } .chart .bar.s1, .chart .dot.s1 { fill: var(--series-1); stroke: none; }
.chart .s2 { stroke: var(--series-2); } .chart .bar.s2, .chart .dot.s2 { fill: var(--series-2); stroke: none; }
.chart .s3 { stroke: var(--series-3); } .chart .bar.s3, .chart .dot.s3 { fill: var(--series-3); stroke: none; }
.legend { list-style: none; padding: 0; margin: 0 0 var(--space-2); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5);
  font: var(--step--1) var(--font-sans); color: var(--ink); }
.legend .key { display: inline-block; width: 1.2rem; height: 0; border-top: 3px solid; vertical-align: middle; margin-right: var(--space-2); }
.legend .key.dashed { border-top-style: dashed; }
.legend .key.s1 { border-color: var(--series-1); } .legend .key.s2 { border-color: var(--series-2); } .legend .key.s3 { border-color: var(--series-3); }

.page-sources { border-top: 1px solid var(--rule); margin-top: var(--space-7); padding-top: var(--space-4); font-size: var(--step--1); }
.page-sources h2 { font-size: var(--step-0); }
footer.site { border-top: 1px solid var(--rule); padding: var(--space-5) var(--gutter); font-size: var(--step--1); color: var(--ink-muted); max-width: var(--page); margin: 0 auto; }

/* Printing a guide (plan 6.4: families post them in): the steps, who can help and the sources; not the site's furniture. */
@media print {
  header.site, footer.site, .preview, .skip, .no-print, .big-search, .filters { display: none !important; }
  main { max-width: none; padding: 0; }
  .crisis, .help, .note, .draft { background: none; border-color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  .chart-wrap { overflow: visible; }
}

header.site .brand .strap { display: block; font: 400 var(--step--1) var(--font-sans); color: var(--ink-muted); }
.independent { margin: 0; padding: var(--space-2) var(--gutter); border-bottom: 1px solid var(--rule); background: var(--paper-raised);
  font: var(--step--1) var(--font-sans); }
.support { border: 2px solid var(--accent); border-radius: var(--radius); padding: var(--space-3) var(--space-4); margin: var(--space-6) 0;
  background: var(--accent-soft); max-width: var(--measure); }
.support h2 { margin-top: 0; font-size: var(--step-1); }
.special { border: 1px solid var(--rule-strong); border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: var(--space-3) var(--space-4); margin: var(--space-5) 0; max-width: var(--measure); }
.special h2 { margin-top: 0; font-size: var(--step-0); }
.next { max-width: var(--measure); }
.tags { display: inline-flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); vertical-align: middle; }
.tag { display: inline-block; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 0 var(--space-2);
  font: 600 var(--step--1) var(--font-sans); white-space: nowrap; }
.tag.on { border-color: var(--accent); color: var(--accent); }
.tag.off { color: var(--ink-muted); font-weight: 400; }
.verify { display: inline-block; border: 1px dashed var(--ink-muted); border-radius: var(--radius); padding: 0 var(--space-1);
  font: 600 var(--step--1) var(--font-sans); color: var(--ink-muted); }
.doors { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-3); margin: var(--space-5) 0; }
.doors a { display: grid; gap: var(--space-1); height: 100%; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: var(--space-4); text-decoration: none; color: var(--ink); background: var(--paper-raised); }
.doors a:hover, .doors a:focus { border-color: var(--accent); }
.doors strong { font: 600 var(--step-1) var(--font-serif); color: var(--accent); }
.doors span { color: var(--ink-muted); font-size: var(--step--1); }
.results { list-style: none; padding: 0; display: grid; gap: var(--space-3); }
.results li { border-bottom: 1px solid var(--rule); padding-bottom: var(--space-2); display: grid; gap: var(--space-1); }
.results span { color: var(--ink-muted); font-size: var(--step--1); }
.calc { display: grid; gap: var(--space-3); max-width: var(--measure); margin: var(--space-4) 0; font-family: var(--font-sans); }
.calc .field { display: grid; gap: var(--space-1); }
.calc .field label { font-weight: 600; }
.calc .field.check { display: flex; gap: var(--space-2); align-items: start; }
.calc .field.check label { font-weight: 400; }
.calc button { justify-self: start; }
.result { border: 1px solid var(--accent); border-radius: var(--radius); padding: var(--space-3) var(--space-4); max-width: var(--measure); }
.result h2 { margin-top: 0; }
.h2-sub { font: 400 var(--step--1) var(--font-sans); color: var(--ink-muted); }
.columns { columns: 16rem; font-size: var(--step--1); }
details summary { cursor: pointer; font-family: var(--font-sans); }
@media print { .independent, .doors, .calc { display: none !important; } .support, .special { background: none; border-color: #000; } }

/* Civil Cases' own pieces. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lede { font-size: var(--step-1); max-width: var(--measure); color: var(--ink); }
.muted { color: var(--ink-muted); }
.pager { display: flex; gap: var(--space-4); align-items: center; margin: var(--space-4) 0; font-family: var(--font-sans); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.errors { border: 2px solid var(--accent); border-radius: var(--radius); padding: var(--space-2) var(--space-4); max-width: var(--measure); }
.glossary dt { font: 600 var(--step-0) var(--font-sans); margin-top: var(--space-4); }
.glossary dd { margin: var(--space-1) 0 0; max-width: var(--measure); }
.letters { font: 600 var(--step-0) var(--font-sans); display: flex; flex-wrap: wrap; gap: var(--space-2); }
a.button { display: inline-block; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius);
  padding: var(--space-2) var(--space-4); text-decoration: none; font-family: var(--font-sans); margin-right: var(--space-3); }
a.button:hover, a.button:focus { text-decoration: underline; }
textarea { font: inherit; border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: var(--space-2);
  background: var(--paper-raised); color: var(--ink); width: 100%; }
.calc input:not([type=checkbox]), .calc select { width: 100%; max-width: 30rem; }
.request { border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: var(--space-3) var(--space-4); margin: var(--space-4) 0; }
.request h3 { margin-top: 0; font-size: var(--step-0); font-family: var(--font-sans); }
header.site .search { display: flex; gap: var(--space-2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-4) 0; font: var(--step--1) var(--font-sans); }
.chips a { border: 1px solid var(--rule-strong); border-radius: 999px; padding: var(--space-1) var(--space-3); text-decoration: none; color: var(--ink); }
.chips a span { color: var(--ink-muted); }
.chips a[aria-current="page"], .chips a:hover { border-color: var(--accent); color: var(--accent); }
.acct { font: 600 var(--step--1) var(--font-sans); }
form.follow { margin: var(--space-3) 0; font-family: var(--font-sans); }
form.inline { display: inline; }
button.quiet { background: none; color: var(--accent); border: 1px solid var(--rule-strong); }
