/* uPVC Windows Guide design system
   From the logo: one blue, a navy ink, and the canopy colours used as section markers.
   Evidence marks keep their own meaning: green = verified, amber = claimed. */

:root {
  --paper: #fbfaf7;
  --paper-2: #f0eee8;
  --card: #ffffff;
  --ink: #123a5a;
  --ink-2: #35536d;
  --ink-3: #6a7f91;
  --rule: #cdd6de;
  --rule-soft: #e4e9ee;
  --blue: #1b8fd2;
  --blue-deep: #0f6fb5;
  --blue-soft: #e3f1fa;
  --green: #17855a;
  --green-soft: #dff1e8;
  --amber: #a8660d;
  --amber-soft: #fbecd2;
  --red: #c23b3f;
  --grid: rgba(27, 143, 210, 0.07);

  /* section colours, taken from the logo canopy */
  --c-orange: #ef6c2f;
  --c-blue: #1b8fd2;
  --c-teal: #14a38b;
  --c-amber: #f2a516;
  --c-magenta: #c8307e;

  --serif: 'Saira Semi Condensed', 'Arial Narrow', sans-serif;
  --sans: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1b27;
    --paper-2: #132636;
    --card: #11212f;
    --ink: #e8eef3;
    --ink-2: #bccad6;
    --ink-3: #8499aa;
    --rule: #2a3f51;
    --rule-soft: #1d3142;
    --blue: #4ab3e6;
    --blue-deep: #7cc8ee;
    --blue-soft: #12324a;
    --green: #5fcf98;
    --green-soft: #133626;
    --amber: #f0b45e;
    --amber-soft: #3a2a10;
    --red: #f07b72;
    --grid: rgba(74, 179, 230, 0.06);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }

/* ── Type ─────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -0.005em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.lede { font-family: var(--sans); font-size: clamp(1.12rem, 1.7vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 38em; }
.label {
  font: 500 .72rem/1.2 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label--green { color: var(--green); }
.num { font-family: var(--mono); font-feature-settings: 'tnum'; }

/* ── Masthead ─────────────────────────────────────────── */
.masthead { border-bottom: 1px solid var(--ink); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.masthead__inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin: 0; }
.wordmark__mark { display: grid; color: var(--ink); }
.wordmark__text { font: 600 1.25rem/1 var(--serif); letter-spacing: -0.01em; }
.wordmark__text em { font-style: italic; font-weight: 400; }
.wordmark__tag { font: 500 .65rem/1 var(--mono); letter-spacing: .1em; border: 1px solid var(--ink); padding: 3px 5px 2px; }
.wordmark--small .wordmark__text { font-size: 1.1rem; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  font: 600 .92rem/1 var(--sans); text-decoration: none; padding: 10px 12px; border-radius: var(--radius); color: var(--ink-2);
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--sec, var(--blue)); border-radius: 0; }
.nav-toggle { display: none; margin-left: auto; font: 600 .9rem var(--sans); background: none; border: 1px solid var(--ink); padding: 8px 12px; border-radius: var(--radius); color: var(--ink); }
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--ink); padding: 8px var(--gutter) 16px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 1rem/1 var(--sans); text-decoration: none;
  padding: 14px 20px; border-radius: var(--radius); border: 1.5px solid var(--ink);
  transition: transform .15s ease, background .15s ease;
}
.btn--solid { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--solid:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn--line { border-color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { font-family: var(--mono); transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--ink);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 72px); align-items: center; padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(36px, 6vw, 80px); }
.hero h1 { max-width: 11em; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__figure { position: relative; }
.hero__figure figcaption { margin-top: 10px; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } .hero__figure { max-width: 520px; } }

/* Profile cross-section drawing */
.xsection { width: 100%; height: auto; color: var(--ink); }
.xsection .body { fill: var(--card); stroke: currentColor; stroke-width: 2; }
.xsection .wall { fill: none; stroke: currentColor; stroke-width: 1.3; }
.xsection .steel { fill: var(--ink-3); opacity: .35; stroke: currentColor; stroke-width: 1.2; }
.xsection .glass { fill: none; stroke: var(--blue); stroke-width: 2.4; }
.xsection .gas { fill: var(--blue-soft); }
.xsection .gasket { fill: var(--ink); }
.xsection .lead { stroke: var(--ink-3); stroke-width: 1; fill: none; stroke-dasharray: 3 3; }
.xsection .dot { fill: var(--blue); }
.xsection text { font: 500 11px var(--mono); fill: var(--ink-2); letter-spacing: .04em; }
.xsection .draw { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.8s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.xsection .fade { opacity: 0; animation: fade .6s ease forwards; }
@keyframes fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .xsection .draw, .xsection .fade { animation: none; stroke-dashoffset: 0; opacity: 1; } }

/* Data strip */
.datastrip { border-bottom: 1px solid var(--rule); background: var(--card); }
.datastrip__row { display: grid; grid-template-columns: repeat(4, 1fr); }
.datastrip__item { padding: 22px 20px; border-left: 1px solid var(--rule-soft); }
.datastrip__item:first-child { border-left: 0; padding-left: 0; }
.datastrip__value { font: 500 clamp(1.6rem, 3vw, 2.2rem)/1 var(--serif); display: block; margin-bottom: 6px; }
@media (max-width: 720px) {
  .datastrip__row { grid-template-columns: 1fr 1fr; }
  .datastrip__item:nth-child(3) { border-left: 0; padding-left: 0; }
  .datastrip__item { border-top: 1px solid var(--rule-soft); }
}

/* ── Sections ─────────────────────────────────────────── */
.section { padding: clamp(48px, 8vw, 96px) 0; border-bottom: 1px solid var(--rule); }
.section__head { display: grid; grid-template-columns: 200px 1fr; gap: 24px; margin-bottom: 36px; align-items: baseline; }
.section__head h2 { max-width: 20em; }
@media (max-width: 720px) { .section__head { grid-template-columns: 1fr; gap: 8px; } }

/* Entry cards */
.entries { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1.5px solid var(--ink); }
.entry { padding: 22px 22px 28px 0; border-right: 1px solid var(--rule); text-decoration: none; display: flex; flex-direction: column; gap: 10px; min-height: 230px; }
.entry + .entry { padding-left: 22px; }
.entry:last-child { border-right: 0; }
.entry h3 { font-size: 1.45rem; margin: 6px 0 0; }
.entry p { color: var(--ink-2); font-size: .98rem; margin: 0; }
.entry .more { margin-top: auto; font: 500 .8rem var(--mono); color: var(--sec, var(--blue)); letter-spacing: .04em; }
.entry:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
@media (max-width: 900px) {
  .entries { grid-template-columns: 1fr 1fr; }
  .entry:nth-child(2) { border-right: 0; }
  .entry:nth-child(3) { padding-left: 0; }
  .entry:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 560px) {
  .entries { grid-template-columns: 1fr; }
  .entry, .entry + .entry { padding: 20px 0; border-right: 0; min-height: 0; border-top: 1px solid var(--rule); }
}

/* Evidence marks */
.mark { display: inline-flex; align-items: center; gap: 6px; font: 500 .78rem/1 var(--mono); white-space: nowrap; }
.mark::before { content: ''; width: 14px; height: 14px; border-radius: 50%; flex: none; }
.mark--yes::before { background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='1.8'/%3E%3C/svg%3E") center/14px no-repeat; }
.mark--claimed::before { border: 1.8px solid var(--amber); }
.mark--no::before { background: linear-gradient(var(--ink-3), var(--ink-3)) center/8px 1.8px no-repeat; border: 1.5px solid var(--rule); }
.mark--yes { color: var(--green); }
.mark--claimed { color: var(--amber); }
.mark--no { color: var(--ink-3); }

.legend { display: flex; flex-wrap: wrap; gap: 18px 28px; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 24px; }
.legend .mark { font-size: .8rem; }
.legend small { color: var(--ink-3); font: 400 .85rem var(--sans); margin-left: 4px; }

.evidence { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.evidence__list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.evidence__list li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: center; }
.evidence__list li span:first-child { font-weight: 600; }
.evidence__list small { display: block; font-weight: 400; color: var(--ink-3); font-size: .88rem; }
@media (max-width: 820px) { .evidence { grid-template-columns: 1fr; } }

/* ── Data table ───────────────────────────────────────── */
.table-tools { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 14px; }
.table-tools label { display: inline-flex; gap: 8px; align-items: center; font-size: .95rem; cursor: pointer; }
.table-tools input[type="search"] { font: inherit; padding: 9px 12px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); border-radius: var(--radius); min-width: 220px; }
.table-tools .count { margin-left: auto; }
.table-scroll { overflow-x: auto; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 820px; }
table.data th, table.data td { text-align: left; padding: 13px 14px 13px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
table.data thead th { font: 500 .7rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border-bottom: 1px solid var(--ink); white-space: nowrap; position: sticky; top: 0; background: var(--paper); }
table.data th[data-sort] { cursor: pointer; user-select: none; }
table.data th[data-sort]::after { content: ' ↕'; opacity: .35; }
table.data th[aria-sort="ascending"]::after { content: ' ↑'; opacity: 1; color: var(--blue); }
table.data th[aria-sort="descending"]::after { content: ' ↓'; opacity: 1; color: var(--blue); }
table.data tbody tr:hover { background: var(--card); }
table.data td:first-child a { font: 600 1.05rem var(--serif); text-decoration: none; }
table.data td:first-child a:hover { text-decoration: underline; }
table.data td small { display: block; color: var(--ink-3); font-size: .83rem; }
table.data .num { white-space: nowrap; }
.uw-bar { display: block; position: relative; height: 6px; background: var(--rule-soft); margin-top: 7px; width: 120px; border-radius: 3px; }
.uw-bar i { position: absolute; top: 0; bottom: 0; background: var(--blue); border-radius: 3px; }
.table-note { font-size: .88rem; color: var(--ink-3); margin-top: 12px; max-width: 60em; }

/* ── Myths ────────────────────────────────────────────── */
.myths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1.5px solid var(--ink); }
.myth { padding: 24px 24px 28px 0; border-right: 1px solid var(--rule); }
.myth + .myth { padding-left: 24px; }
.myth:last-child { border-right: 0; }
.myth h3 { font-size: 1.25rem; font-style: italic; font-weight: 400; }
.verdict { display: inline-block; font: 600 .72rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 5px 7px; margin-bottom: 12px; border-radius: 2px; }
.verdict--false { background: var(--green-soft); color: var(--green); }
.verdict--depends { background: var(--amber-soft); color: var(--amber); }
.myth p { color: var(--ink-2); font-size: .98rem; }
@media (max-width: 900px) {
  .myths { grid-template-columns: 1fr; }
  .myth, .myth + .myth { padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--rule); }
}

/* Checklist teaser */
.checklist { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.checklist ol { margin: 0; padding: 0; list-style: none; counter-reset: q; border-top: 1.5px solid var(--ink); }
.checklist li { counter-increment: q; display: grid; grid-template-columns: 44px 1fr; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.checklist li::before { content: counter(q, decimal-leading-zero); font: 600 1rem var(--serif); color: var(--blue); padding-top: 3px; }
@media (max-width: 820px) { .checklist { grid-template-columns: 1fr; } }

/* ── Page header (inner pages) ────────────────────────── */
.pagehead { border-bottom: 1px solid var(--ink); padding: clamp(32px, 6vw, 64px) 0 clamp(28px, 4vw, 44px); }
.crumbs { font: 500 .75rem var(--mono); letter-spacing: .06em; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin: 0 8px; }
.pagehead h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); max-width: 16em; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; font: 500 .78rem var(--mono); color: var(--ink-3); letter-spacing: .03em; }

/* ── Article layout ───────────────────────────────────── */
.article { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.toc { position: sticky; top: 88px; align-self: start; font-size: .92rem; }
.toc ol { list-style: none; margin: 10px 0 0; padding: 0; border-left: 1px solid var(--rule); }
.toc a { display: block; padding: 6px 0 6px 14px; text-decoration: none; color: var(--ink-3); margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover, .toc a.is-active { color: var(--ink); border-left-color: var(--blue); }
.prose { max-width: 42em; }
.prose h2 { margin-top: 2.2em; padding-top: .6em; border-top: 1px solid var(--rule); font-size: clamp(1.5rem, 2.6vw, 1.95rem); scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose table.data { min-width: 0; margin: 1.2em 0 1.6em; font-size: .93rem; }
.prose .table-scroll { margin: 1.2em 0 1.6em; }
.prose .table-scroll table.data { margin: 0; min-width: 560px; }
@media (max-width: 900px) { .article { grid-template-columns: 1fr; } .toc { position: static; border: 1px solid var(--rule); padding: 14px 16px; background: var(--card); } }

.answer { background: var(--blue-soft); border: 0; border-left: 4px solid var(--blue); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 0 0 2em; }
.answer p:last-child { margin: 0; }
.callout { border: 1px solid var(--amber); background: var(--amber-soft); padding: 16px 20px; margin: 1.4em 0; border-radius: var(--radius); }
.callout p:last-child { margin: 0; }
.callout strong { color: var(--amber); }

.sources { margin-top: 3em; padding-top: 1.2em; border-top: 1.5px solid var(--ink); font-size: .9rem; color: var(--ink-2); }
.sources ol { padding-left: 1.3em; }
.sources li { margin-bottom: .5em; word-break: break-word; }

/* BAL scale */
.balscale { display: grid; grid-template-columns: repeat(6, 1fr); margin: 1.4em 0 .6em; border: 1px solid var(--ink); }
.balscale div { padding: 12px 10px; border-right: 1px solid var(--ink); font: 500 .78rem/1.3 var(--mono); }
.balscale div:last-child { border-right: 0; }
.balscale b { display: block; font: 600 1.05rem var(--serif); margin-bottom: 4px; }
.balscale .ok { background: var(--green-soft); }
.balscale .test { background: var(--amber-soft); }
.balscale .none { background: var(--paper-2); }
@media (max-width: 640px) { .balscale { grid-template-columns: repeat(3, 1fr); } .balscale div:nth-child(3) { border-right: 0; } .balscale div:nth-child(-n+3) { border-bottom: 1px solid var(--ink); } }

/* ── Brand profile ────────────────────────────────────── */
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(24px, 5vw, 64px); padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(56px, 8vw, 96px); }
.factsheet { border: 1.5px solid var(--blue); border-radius: var(--radius); overflow: hidden; background: var(--card); align-self: start; position: sticky; top: 88px; }
.factsheet h2 { font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; margin: 0; padding: 12px 16px; background: var(--blue); color: #fff; }
.factsheet dl { margin: 0; }
.factsheet dl div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--rule-soft); font-size: .93rem; }
.factsheet dt { font: 500 .7rem/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.factsheet dd { margin: 0; }
.factsheet .checks { padding: 14px 16px; display: grid; gap: 10px; }
.factsheet footer { padding: 12px 16px; border-top: 1px solid var(--ink); font-size: .85rem; color: var(--ink-3); }
@media (max-width: 900px) { .profile { grid-template-columns: 1fr; } .factsheet { position: static; order: -1; } }

.fab-list { columns: 2; column-gap: 32px; list-style: none; padding: 0; margin: 0 0 1.4em; }
.fab-list li { break-inside: avoid; padding: 9px 0; border-bottom: 1px solid var(--rule-soft); display: flex; justify-content: space-between; gap: 12px; }
.fab-list .state { font: 500 .75rem var(--mono); color: var(--ink-3); }
@media (max-width: 560px) { .fab-list { columns: 1; } }

/* Template-preview banner (remove before launch) */
.preview-banner { background: var(--amber-soft); color: var(--ink); border-bottom: 1px solid var(--amber); font: 500 .8rem var(--mono); padding: 8px 0; text-align: center; }

/* ── Footer ───────────────────────────────────────────── */
.footer { background: #0e2c45; color: #f4f7fa; padding: 56px 0 24px; }
.footer a { color: var(--paper); text-decoration-color: rgba(255,255,255,.3); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer__about p { color: rgba(244,241,234,.75); max-width: 34em; font-size: .95rem; }
.footer__about .wordmark { color: var(--paper); }
.footer__disclosure { border-left: 3px solid var(--c-teal); padding-left: 14px; }
.footer__col { display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
.footer__col h2 { font: 500 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(244,241,234,.55); margin: 0 0 6px; }
.footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 44px; padding-top: 18px; border-top: 1px solid rgba(244,241,234,.18); font: 400 .8rem var(--mono); color: rgba(244,241,234,.55); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer { background: #0b0c0d; border-top: 1px solid var(--rule); }
  :root:not([data-theme="light"]) .footer, :root:not([data-theme="light"]) .footer a, :root:not([data-theme="light"]) .footer__about .wordmark { color: var(--ink); }
}
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__about { grid-column: 1 / -1; } }

/* Load-in */
.rise { opacity: 0; transform: translateY(10px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
.rise:nth-child(2) { animation-delay: .08s; } .rise:nth-child(3) { animation-delay: .16s; } .rise:nth-child(4) { animation-delay: .24s; }
@keyframes rise { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; opacity: 1; transform: none; } }
.legend__item { display: inline-flex; align-items: baseline; gap: 8px; }
.legend__item small { margin-left: 0; }
.hero__figure .xsection { transform: scale(1.12); transform-origin: center left; }
@media (max-width: 900px) { .hero__figure .xsection { transform: none; } }
@media (max-width: 900px) {
  .profile, .article { grid-template-columns: minmax(0, 1fr); }
}
.prose table.data td:first-child strong { white-space: nowrap; }

/* ── Brand block (header / footer) ────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin: 0; color: var(--blue); }
.brand__icon { display: block; height: 40px; width: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text small { font: 700 .56rem/1 var(--serif); letter-spacing: .22em; text-transform: uppercase; color: var(--ink); margin-bottom: 3px; }
.brand__text span { font: 300 1.7rem/0.95 var(--serif); letter-spacing: -0.01em; }
.brand__text b { font-weight: 700; }
.brand--footer, .brand--footer .brand__text small { color: #fff; }
.brand--footer .brand__icon { height: 34px; }
.masthead { border-bottom: 1px solid var(--rule); box-shadow: 0 1px 0 rgba(18,58,90,.04); }
.masthead__inner { min-height: 70px; }
@media (max-width: 820px) { .nav { top: 70px; } }

/* ── Section colour system ────────────────────────────── */
[data-c="orange"]  { --sec: var(--c-orange); }
[data-c="blue"]    { --sec: var(--c-blue); }
[data-c="teal"]    { --sec: var(--c-teal); }
[data-c="amber"]   { --sec: var(--c-amber); }
[data-c="magenta"] { --sec: var(--c-magenta); }
.nav a[data-c]::before { content: ''; display: inline-block; width: 8px; height: 10px; border-radius: 4px 4px 1px 1px; background: var(--sec); margin-right: 7px; vertical-align: 0; }

.entries { border-top: 0; gap: 16px; grid-template-columns: repeat(4, 1fr); }
.entry, .entry + .entry { padding: 22px; border: 1px solid var(--rule); border-top: 5px solid var(--sec); border-radius: var(--radius); background: var(--card); transition: transform .18s ease, box-shadow .18s ease; }
.entry:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -14px rgba(18,58,90,.35); }
.entry .label { color: var(--sec); font-weight: 600; }
.entry__glyph { width: 34px; height: 34px; }
@media (max-width: 900px) { .entries { grid-template-columns: 1fr 1fr; } .entry:nth-child(n) { border-right: 1px solid var(--rule); padding-left: 22px; } }
@media (max-width: 560px) { .entries { grid-template-columns: 1fr; } .entry, .entry + .entry { padding: 20px; } }

/* Canopy motif in the hero */
.hero { background-color: var(--paper); }
.hero__canopy { position: absolute; right: -60px; top: -40px; width: 420px; opacity: .10; pointer-events: none; }
@media (max-width: 900px) { .hero__canopy { display: none; } }

.datastrip { background: var(--blue); color: #fff; border: 0; }
.datastrip .label { color: rgba(255,255,255,.8); }
.datastrip__item { border-left-color: rgba(255,255,255,.25); }
.datastrip__value { font-family: var(--serif); font-weight: 600; }
@media (max-width: 720px) { .datastrip__item { border-top-color: rgba(255,255,255,.25); } }

.myths { gap: 16px; border-top: 0; }
.myth, .myth + .myth { padding: 24px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.myth h3 { font-style: normal; font-weight: 500; }
@media (max-width: 900px) { .myth, .myth + .myth { border: 1px solid var(--rule); padding: 22px; } }

.pagehead { background: linear-gradient(var(--grid) 1px, transparent 1px) 0 0/24px 24px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0/24px 24px; border-bottom: 1px solid var(--rule); border-top: 5px solid var(--sec, var(--blue)); }
.evidence__list, .checklist ol, .table-scroll { border-top-color: var(--blue); }
.label--blue { color: var(--blue); font-weight: 600; }

/* ── Generated system pages ───────────────────────────── */
a.src { font: 500 .7rem var(--mono); letter-spacing: .04em; color: var(--ink-3); text-transform: uppercase; margin-left: 4px; white-space: nowrap; }
a.src:hover { color: var(--blue); }
.kv { margin: 0 0 1.4em; border-top: 1.5px solid var(--blue); }
.kv div { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--rule-soft); }
.kv dt { font: 500 .72rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.kv dd { margin: 0; }
@media (max-width: 560px) { .kv div { grid-template-columns: 1fr; gap: 2px; } }
.timeline { list-style: none; padding: 0; margin: .4em 0 .6em; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--rule); }
.timeline .num { color: var(--blue); font-weight: 600; }
.table-tools select { font: inherit; padding: 8px 10px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); border-radius: var(--radius); margin-left: 6px; }
.fab-list small { display: block; color: var(--ink-3); font-size: .82rem; }
.factsheet dl + dl { border-top: 1px solid var(--blue); }
.factsheet dd .mark { white-space: normal; }
table.data td .mark { white-space: normal; line-height: 1.3; }
.prose table.data td.num { white-space: normal; }
.prose table.data td:first-child { min-width: 130px; }
.muted { color: var(--ink-3); }

.hero__figure .profile-detail { transform: none; }
.profile-detail { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 8px; box-shadow: 0 18px 45px #203e5010; }
.profile-detail text { font-size: 11px; letter-spacing: 0; }
.profile-detail .lead { stroke-dasharray: none; }
.enquiry-banner { display:flex; align-items:center; justify-content:space-between; gap:28px; }
.contact-layout { display:grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px,5vw,70px); }
.enquiry-form { display:grid; gap:18px; padding:clamp(20px,3vw,36px); background:var(--card); border:1px solid var(--rule); border-radius:var(--radius); }
.enquiry-form label { display:grid; gap:7px; font-weight:600; }
.enquiry-form input:not([type=checkbox]), .enquiry-form select, .enquiry-form textarea { width:100%; padding:12px; font:inherit; color:var(--ink); background:var(--paper); border:1px solid var(--rule); border-radius:4px; box-sizing:border-box; }
.enquiry-form textarea { resize:vertical; }
.enquiry-form .form-consent { display:flex; align-items:flex-start; gap:10px; font-weight:400; font-size:.93rem; }
.form-consent input { margin-top:6px; }
.form-trap { position:absolute; left:-10000px; }
.enquiry-form button:disabled { opacity:.6; cursor:wait; }
@media(max-width:720px) { .contact-layout { grid-template-columns:1fr; } .enquiry-banner { flex-direction:column; align-items:flex-start; } }
