/* Ingress: shared stylesheet for the site build
   IBM Plex Sans throughout (SIL Open Font License 1.1); self-hosted from fonts/.
   8px baseline: every line height and every space is a multiple of 8.
   Rules: no icons, no shadows, no rounded corners, accent on one element per screen at most. */

/* Self-hosted IBM Plex Sans, latin subset (fonts/; licence in fonts/OFL-IBM-Plex-Sans.txt) */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/ibm-plex-sans-300.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-500.woff2") format("woff2"); }

:root {
  /* Colour */
  --ink: #1B242B;
  --ground: #F1F2EF;
  --accent: #3A5F7D;        /* one element per screen: the roof outline on the result page, and focus rings */
  --accent-rule: #7C93A6;   /* Instruction 45: the Reports page price box step marks (Design, 27 Nov 2026) */
  --grey-rule: #CBCDCC;     /* ink at 18% on ground: hairlines only, never text */
  --grey-caption: #5B6266;  /* ink at 70% on ground: captions and secondary text, 5.5:1 */
  --ground-muted: #AFB3B3;  /* secondary text on ink, footer only, 7.4:1 */

  /* Type */
  --font: "IBM Plex Sans", Arial, sans-serif;
  --display-size: 72px; --display-line: 80px;
  --heading-size: 40px; --heading-line: 48px;
  --title-size: 24px;   --title-line: 32px;
  --body-size: 18px;    --body-line: 32px;
  --caption-size: 14px; --caption-line: 24px;

  /* Space */
  --space-1: 8px;  --space-2: 16px; --space-3: 24px; --space-4: 32px;
  --space-5: 48px; --space-6: 64px; --space-7: 96px; --space-8: 128px; --space-9: 192px;

  /* Grid */
  --margin: 120px; --gutter: 24px; --content: 1200px;

  /* Controls */
  --control-height: 56px;
  --callbar-height: 56px;

  /* Motion: the only animation on the site */
  --outline-draw: 900ms cubic-bezier(0.4, 0, 0.2, 1) 200ms both;
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--body-size);
  line-height: var(--body-line);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.wrap { max-width: calc(var(--content) + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.screen { padding-top: var(--space-9); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
.t-display { margin: 0; font-weight: 300; font-size: var(--display-size); line-height: var(--display-line); letter-spacing: -0.015em; }
.t-heading { margin: 0; font-weight: 300; font-size: var(--heading-size); line-height: var(--heading-line); letter-spacing: -0.01em; }
.t-title   { margin: 0; font-weight: 400; font-size: var(--title-size); line-height: var(--title-line); }
.t-body    { margin: 0; font-size: var(--body-size); line-height: var(--body-line); }
.t-caption { margin: 0; font-size: var(--caption-size); line-height: var(--caption-line); color: var(--grey-caption); }
.t-label   { margin: 0; font-size: var(--caption-size); line-height: var(--caption-line); font-weight: 500; }
.muted { color: var(--grey-caption); }
.num { font-variant-numeric: tabular-nums; }
.measure { max-width: 66ch; }

/* Section head: label left, heading right, on an ink rule */
.section-head { padding-top: var(--space-2); border-top: 1px solid var(--ink); margin-bottom: var(--space-5); align-items: baseline; row-gap: var(--space-2); }
.section-head .t-label { grid-column: 1 / span 3; }
.section-head .t-heading { grid-column: 4 / span 9; }

/* Header */
.site-header .bar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); height: 96px; border-bottom: 1px solid var(--grey-rule); }
.site-header .brand img { display: block; height: 18px; width: auto; }
.site-header nav ul { display: flex; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.site-header nav a { font-size: var(--caption-size); line-height: var(--caption-line); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { text-decoration: underline; }
.header-call { display: flex; align-items: baseline; gap: var(--space-2); text-decoration: none; white-space: nowrap; }
.header-call .t-label { font-weight: 500; }
.header-call .number { font-size: 16px; line-height: 24px; }
.header-call:hover .number { text-decoration: underline; text-underline-offset: 4px; }
.menu-btn { display: none; min-height: 44px; padding: 0 var(--space-2); border: 1px solid var(--ink); background: var(--ground); color: var(--ink); font: inherit; font-size: var(--caption-size); font-weight: 500; border-radius: 0; cursor: pointer; }

/* Mobile Call and Message bar: fixed at the foot of the viewport, never over content, never animated */
.callbar { display: none; }

/* Route button set: three routes of equal weight */
.routes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.routes > li { display: flex; }
.routes > li + li { border-left: 1px solid var(--grey-rule); }
.route { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: var(--space-1); width: 100%; min-height: 144px; margin: 0; padding: var(--space-3) var(--space-3) var(--space-4); text-decoration: none; background: none; border: 0; border-radius: 0; color: var(--ink); font: inherit; letter-spacing: inherit; word-spacing: inherit; text-align: left; text-transform: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
.route > span { display: block; text-decoration: none; }
.route > .t-label { font-weight: 500; }
.route > .t-title { font-weight: 400; color: var(--ink); }
.route > .t-caption { color: var(--grey-caption); }
.routes > li:first-child .route { padding-left: 0; }
.route:hover .t-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* Company line */
.company-line { margin-top: var(--space-3); }
.company-line a { color: var(--grey-caption); }

/* Event and symptom link groups */
.link-groups { row-gap: var(--space-5); }
.link-group { grid-column: span 6; }
.link-group h3 { margin: 0 0 var(--space-2); }
.link-group ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.link-group li { border-bottom: 1px solid var(--grey-rule); }
.link-group a { display: block; padding: var(--space-2) 0; font-size: var(--title-size); line-height: var(--title-line); }

/* What we do: three columns, then one paragraph with a photograph beside it */
.wwd-cols { margin: 0; padding: 0; list-style: none; row-gap: var(--space-4); }
.wwd-cols li { grid-column: span 4; padding-top: var(--space-2); border-top: 1px solid var(--grey-rule); }
.wwd-cols .t-body { margin-top: var(--space-1); }
.wwd-body { margin-top: var(--space-7); align-items: end; row-gap: var(--space-4); }
.wwd-body .t-body { grid-column: 1 / span 6; }
.wwd-body figure { grid-column: 8 / span 5; margin: 0; }

/* Photographs: real, or a captioned ground panel */
.photo { position: relative; border: 1px solid var(--grey-rule); background: var(--ground); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.r-4-3 { aspect-ratio: 4 / 3; }
.r-3-2 { aspect-ratio: 3 / 2; }
.r-a4 { aspect-ratio: 210 / 297; }
figure figcaption, .photo + .t-caption { margin-top: var(--space-2); }

/* Measure my roof entry */
.measure-entry { align-items: end; row-gap: var(--space-5); }
.measure-entry .copy { grid-column: 1 / span 5; display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: var(--space-1); }
.measure-entry figure { grid-column: 7 / span 6; margin: 0; }

/* Dated project record card */
.records { margin: 0; padding: 0; list-style: none; row-gap: var(--space-6); }
.records > li { grid-column: span 4; }
.record { border-top: 1px solid var(--ink); padding-top: var(--space-2); }
.record h3 { margin-top: var(--space-2); }
.record dl { margin: var(--space-2) 0 0; border-top: 1px solid var(--grey-rule); }
.record dl div { display: flex; justify-content: space-between; gap: var(--space-2); padding: var(--space-1) 0; border-bottom: 1px solid var(--grey-rule); font-size: var(--caption-size); line-height: var(--caption-line); }
.record dt { color: var(--grey-caption); }
.record dd { margin: 0; text-align: right; }

/* Report list: a typographic list, no cards */
.report-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.report-list li { border-bottom: 1px solid var(--grey-rule); }
.report-list a { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: baseline; padding: var(--space-3) 0; text-decoration: none; }
.report-list .n { grid-column: 1 / span 1; }
.report-list .t-title { grid-column: 2 / span 4; }
.report-list .t-body { grid-column: 6 / span 6; color: var(--grey-caption); }
.report-list .go { grid-column: 12 / span 1; text-align: right; font-size: var(--caption-size); line-height: var(--caption-line); text-decoration: underline; text-underline-offset: 4px; }
.report-list a:hover .t-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* How we work: five short lines with hairlines between */
.how-lines { grid-column: 4 / span 9; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.how-lines li { display: grid; grid-template-columns: 48px 1fr; gap: var(--space-2); padding: var(--space-2) 0; border-bottom: 1px solid var(--grey-rule); }

/* Before we start */
.before .t-body { grid-column: 4 / span 7; }
.before .links { grid-column: 4 / span 9; display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-3); }

/* Forms */
.form { display: flex; flex-direction: column; gap: var(--space-3); }
.field { display: flex; flex-direction: column; gap: var(--space-1); }
.field label, .field .label { font-size: var(--caption-size); line-height: var(--caption-line); font-weight: 500; }
.field .opt { font-weight: 400; color: var(--grey-caption); }
.field .help { font-size: var(--caption-size); line-height: var(--caption-line); color: var(--grey-caption); margin: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; height: var(--control-height); padding: 0 var(--space-2);
  border: 1px solid var(--grey-caption); border-radius: 0; background: var(--ground); color: var(--ink);
  font: inherit; font-size: var(--body-size);
  -webkit-appearance: none; appearance: none;
}
.field select { background-image: none; }
.fields-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); align-items: end; }
.fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.upload { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.check { display: flex; gap: var(--space-2); align-items: flex-start; font-size: var(--caption-size); line-height: var(--caption-line); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.consent { margin: 0; font-size: var(--caption-size); line-height: var(--caption-line); color: var(--grey-caption); }

/* Buttons: square, no fills except the measure action */
.btn { display: inline-flex; align-items: center; justify-content: center; height: var(--control-height); padding: 0 var(--space-4); border: 1px solid var(--ink); border-radius: 0; font: inherit; font-size: 16px; line-height: 24px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-ink { background: var(--ink); color: var(--ground); }
.btn-ground { background: var(--ground); color: var(--ink); }
.btn-ground:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Leave a message block */
.message { align-items: start; row-gap: var(--space-4); }
.message .intro { grid-column: 1 / span 4; }
.message .form { grid-column: 5 / span 8; }
.message .fields-row { grid-template-columns: 3fr 3fr 5fr auto; }

/* Panel for an opened form */
.form-panel { margin-top: 0; padding: var(--space-5) 0; border-bottom: 1px solid var(--ink); }
.form-panel .grid > .intro { grid-column: 1 / span 4; }
.form-panel .grid > .form { grid-column: 5 / span 8; }

/* Form confirmation state: replaces the form in the same place */
.confirm { border-top: 1px solid var(--ink); padding-top: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); }
.confirm .t-title { margin-top: var(--space-1); }
.confirm .reply { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--grey-rule); }

/* Fee band table */
.fee-wrap { overflow-x: auto; }
.fee { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 16px; line-height: 24px; }
.fee caption { caption-side: bottom; text-align: left; padding-top: var(--space-2); font-size: var(--caption-size); line-height: var(--caption-line); color: var(--grey-caption); }
.fee th, .fee td { text-align: left; padding: var(--space-2) var(--space-3) var(--space-2) 0; border-bottom: 1px solid var(--grey-rule); font-weight: 400; vertical-align: baseline; }
.fee thead th { font-size: var(--caption-size); line-height: var(--caption-line); color: var(--grey-caption); border-bottom: 1px solid var(--ink); }
.fee tbody th { font-size: 20px; line-height: 32px; }
.fee td { font-variant-numeric: tabular-nums; }

/* Result page */
.context { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; padding-top: var(--space-5); }
.context strong { color: var(--ink); font-weight: 500; margin-right: var(--space-2); }
.result-head { margin-top: var(--space-4); align-items: end; row-gap: var(--space-4); }
.plan-figure { grid-column: 1 / span 7; margin: 0; }
.aerial { position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--grey-rule); background: var(--ground); }
.aerial img, .aerial svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.aerial img { object-fit: cover; }
.outline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: miter; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) { .outline { animation: outline-draw var(--outline-draw); } }
@keyframes outline-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.headline { grid-column: 8 / span 5; padding-bottom: 40px; }
.headline .t-display { margin-top: var(--space-1); }
.facts { margin: var(--space-3) 0 0; border-top: 1px solid var(--ink); }
.facts div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--grey-rule); }
.facts dt { font-size: var(--caption-size); line-height: var(--caption-line); color: var(--grey-caption); }
.facts dd { margin: 0; text-align: right; }
.headline .t-caption { margin-top: var(--space-2); }
.band-status { margin-top: var(--space-7); padding-top: var(--space-3); border-top: 1px solid var(--ink); row-gap: var(--space-3); }
.band { grid-column: 1 / span 4; }
.band .t-title, .band .t-caption { margin-top: var(--space-1); }
.status { grid-column: 5 / span 8; }
.benchmark { margin-top: var(--space-7); }
.benchmark h2 { grid-column: 1 / span 4; }
.benchmark .panel { grid-column: 5 / span 8; padding: var(--space-3) 0; border-top: 1px solid var(--grey-rule); border-bottom: 1px solid var(--grey-rule); }
.next { margin-top: var(--space-7); }
.next > h2 { margin-bottom: var(--space-3); }

/* Footer with registered details */
.site-footer { margin-top: var(--space-9); padding: var(--space-7) 0 var(--space-5); background: var(--ink); color: var(--ground); }
.site-footer a { color: var(--ground); }
.site-footer .grid { row-gap: 40px; }
.site-footer h2 { margin: 0 0 var(--space-2); font-size: var(--caption-size); line-height: var(--caption-line); font-weight: 400; color: var(--ground-muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); font-size: 16px; line-height: 24px; }
.site-footer .tagline { margin: 12px 0 0; font-size: 16px; line-height: 24px; }
.site-footer .reg { margin: 0; font-size: var(--caption-size); line-height: var(--caption-line); }
.f-brand { grid-column: 1 / span 3; }
.f-brand img { display: block; height: 18px; width: auto; }
.f-contact { grid-column: 4 / span 3; }
.f-nav { grid-column: 7 / span 2; }
.f-practice { grid-column: 9 / span 2; }
.f-registered { grid-column: 11 / span 2; }
.f-legal { margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--grey-caption); display: flex; gap: var(--space-3); flex-wrap: wrap; font-size: var(--caption-size); line-height: var(--caption-line); }

/* Tablet */
@media (max-width: 1023px) {
  :root { --margin: 48px; }
  .site-header nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .f-brand, .f-contact { grid-column: span 6; }
  .f-nav, .f-practice, .f-registered { grid-column: span 4; }
}

/* Page one hero: top space and the gap between tagline and routes (reduced on mobile) */
.hero { padding-top: var(--space-8); }
.hero-routes { margin-top: var(--space-7); }

/* Page head for every other template */
.page-head { padding-top: var(--space-8); }
.page-head .crumb { display: block; margin-bottom: var(--space-2); }
.page-head .crumb a { color: var(--grey-caption); }
.page-head h1 { grid-column: 1 / span 10; }
.page-head .lead { grid-column: 1 / span 8; margin-top: var(--space-3); }
.page-head .meta { grid-column: 1 / span 8; margin-top: var(--space-2); }

/* Section with a label column and content in columns 4 to 12 */
.split { row-gap: var(--space-3); }
.split > h2 { grid-column: 1 / span 3; }
.split > .content { grid-column: 4 / span 9; }
.how-lines.plain li { display: block; }

/* Paragraph panel: a rule above and below */
.para-panel { grid-column: 4 / span 9; padding: var(--space-3) 0; border-top: 1px solid var(--grey-rule); border-bottom: 1px solid var(--grey-rule); }

/* Form block: intro in columns 1 to 4, form or confirmation in 5 to 12 */
.form-block { row-gap: var(--space-4); padding-top: var(--space-2); border-top: 1px solid var(--ink); }
.form-block > .intro { grid-column: 1 / span 4; }
.form-block > .state-box { grid-column: 5 / span 8; }
.form-block .confirm { border-top: 0; padding-top: 0; }
.field textarea { height: auto; min-height: 128px; padding: var(--space-2); line-height: var(--body-line); resize: vertical; }

/* Sample report thumbnail */
.sample { display: block; grid-column: 1 / span 3; text-decoration: none; }
.sample .open { margin: 4px 0 0; font-size: 16px; line-height: 24px; text-decoration: underline; text-underline-offset: 4px; }

/* Filter line: plain text links */
.filters { display: flex; flex-direction: column; gap: var(--space-1); margin-bottom: var(--space-5); }
.filters p { margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); font-size: 16px; line-height: 24px; }
.filters .t-label { min-width: 64px; }
.filters a[aria-current="true"] { text-decoration: none; font-weight: 500; }

/* Two photograph panels side by side */
.photo-pair { margin: 0; padding: 0; list-style: none; row-gap: var(--space-4); }
.photo-pair > li { grid-column: span 6; }
.photo-pair figure { margin: 0; }

/* Registered details block */
.reg-block { grid-column: 4 / span 6; margin: 0; border-top: 1px solid var(--ink); }
.reg-block div { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--grey-rule); font-size: 16px; line-height: 24px; }
.reg-block dt { color: var(--grey-caption); }
.reg-block dd { margin: 0; text-align: right; }

/* Reading column: 8 grid columns */
.reading { grid-column: 1 / span 8; }
.reading > * + * { margin-top: var(--space-3); }
.reading h2 { margin-top: var(--space-6); font-size: var(--title-size); line-height: var(--title-line); font-weight: 400; }
.reading h3 { margin-top: var(--space-4); font-size: var(--body-size); line-height: var(--body-line); font-weight: 500; }
.reading p { margin-bottom: 0; }

/* Guides grouped under event headings */
.guide-group + .guide-group { margin-top: var(--space-6); }
.guide-group > h2 { margin-bottom: var(--space-2); }

/* Choose the building: candidate outlines on the aerial, each selectable */
.choose-head { margin-top: var(--space-4); row-gap: var(--space-4); align-items: stretch; }
.choose-head .plan-figure { grid-column: 1 / span 7; }
.choose-side { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: var(--space-3); }
.cand-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.cand-row { display: grid; grid-template-columns: 32px 1fr; column-gap: var(--space-2); align-items: start; padding: var(--space-2) 0 15px; border-bottom: 1px solid var(--grey-rule); cursor: pointer; }
.cand-row .mk-n { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--ink); font-size: var(--caption-size); line-height: var(--caption-line); font-weight: 500; }
.cand-row .cr-text { display: flex; flex-direction: column; }
.cand-row:hover .t-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
/* Selected row: the same heavier treatment as the selected outline (filled marker, heavier rule) */
.choose-form:has(#b1:checked) .cand-row[for="b1"],
.choose-form:has(#b2:checked) .cand-row[for="b2"],
.choose-form:has(#b3:checked) .cand-row[for="b3"],
.choose-form:has(#b4:checked) .cand-row[for="b4"],
.choose-form:has(#b5:checked) .cand-row[for="b5"] { padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.choose-form:has(#b1:checked) .cand-row[for="b1"] .mk-n,
.choose-form:has(#b2:checked) .cand-row[for="b2"] .mk-n,
.choose-form:has(#b3:checked) .cand-row[for="b3"] .mk-n,
.choose-form:has(#b4:checked) .cand-row[for="b4"] .mk-n,
.choose-form:has(#b5:checked) .cand-row[for="b5"] .mk-n { background: var(--ink); color: var(--ground); }
.choose-form:has(#b1:checked) .cand-row[for="b1"] .t-title,
.choose-form:has(#b2:checked) .cand-row[for="b2"] .t-title,
.choose-form:has(#b3:checked) .cand-row[for="b3"] .t-title,
.choose-form:has(#b4:checked) .cand-row[for="b4"] .t-title,
.choose-form:has(#b5:checked) .cand-row[for="b5"] .t-title { font-weight: 500; }
.choose-form:has(#b1:focus-visible) .cand-row[for="b1"],
.choose-form:has(#b2:focus-visible) .cand-row[for="b2"],
.choose-form:has(#b3:focus-visible) .cand-row[for="b3"],
.choose-form:has(#b4:focus-visible) .cand-row[for="b4"],
.choose-form:has(#b5:focus-visible) .cand-row[for="b5"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.cand-action { margin-top: var(--space-4); }
.btn:disabled { color: var(--grey-caption); border-color: var(--grey-rule); cursor: not-allowed; text-decoration: none; }
.choose-head fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.cand { position: absolute; inset: 0; pointer-events: none; }
.cand svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cand path { fill: transparent; stroke: var(--accent); stroke-width: 2; stroke-linejoin: miter; vector-effect: non-scaling-stroke; pointer-events: visiblePainted; cursor: pointer; }
.cand rect { fill: var(--ground); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: visiblePainted; cursor: pointer; }
.cand text { fill: var(--ink); font-family: var(--font); font-size: 22px; font-weight: 500; pointer-events: none; }
.choose input:checked + .cand path { stroke-width: 4; }
.choose input:checked + .cand rect { fill: var(--ink); }
.choose input:checked + .cand text { fill: var(--ground); }
.choose input:focus-visible + .cand rect { stroke: var(--ink); stroke-width: 3; }
.choose-note { grid-column: 1 / span 7; }

/* Invalid field: ink border and a caption line beneath; no red, no icon */
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--ink); }

/* Mobile menu: open state below 1024px */
.mobile-menu { position: fixed; top: 97px; left: 0; right: 0; bottom: 0; z-index: 9; overflow-y: auto; padding: 0 var(--margin) var(--space-4); background: var(--ground); }
.mobile-menu ul { margin: 0; padding: 0; list-style: none; }
.mobile-menu li { border-bottom: 1px solid var(--grey-rule); }
.mobile-menu nav a { display: block; padding: var(--space-2) 0; font-size: var(--title-size); line-height: var(--title-line); text-decoration: none; }
.mobile-menu nav a:hover, .mobile-menu nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.mobile-menu .menu-call { margin-top: var(--space-3); }
.mobile-menu .menu-call a { color: var(--ink); }
body.menu-open { overflow: hidden; }
@media (min-width: 1024px) { .mobile-menu { display: none !important; } }

/* Mobile */
@media (max-width: 639px) {
  :root {
    --margin: 20px; --gutter: 16px;
    --display-size: 40px; --display-line: 48px;
    --heading-size: 28px; --heading-line: 36px;
    --title-size: 20px;   --title-line: 28px;
    --body-size: 17px;    --body-line: 28px;
    --caption-size: 13px; --caption-line: 20px;
  }
  body { padding-bottom: var(--callbar-height); }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid > * { grid-column: 1 / -1 !important; }
  .screen { padding-top: var(--space-7); }
  .section-head { margin-bottom: var(--space-4); }
  .site-header .bar { height: 72px; }
  .site-header .brand img { height: 16px; }
  .header-call { display: none; }

  .callbar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    height: var(--callbar-height);
    background: var(--ground); border-top: 1px solid var(--grey-rule);
  }
  .callbar a { display: flex; align-items: center; justify-content: center; font-size: 16px; line-height: 24px; font-weight: 500; text-decoration: none; color: var(--ink); }
  .callbar a + a { border-left: 1px solid var(--grey-rule); }

  .routes { grid-template-columns: 1fr; }
  .routes > li + li { border-left: 0; border-top: 1px solid var(--grey-rule); }
  .route, .routes > li:first-child .route { min-height: 0; padding: var(--space-3) 0; }

  .link-group a { padding: 12px 0; }
  .wwd-body { margin-top: var(--space-5); }

  .report-list a { grid-template-columns: 32px 1fr; column-gap: var(--space-2); row-gap: 4px; }
  .report-list .n { grid-column: 1; grid-row: 1 / span 3; }
  .report-list .t-title, .report-list .t-body, .report-list .go { grid-column: 2; text-align: left; }

  .how-lines li { grid-template-columns: 32px 1fr; }
  .fields-row, .message .fields-row, .fields-2 { grid-template-columns: 1fr; }
  .btn { width: 100%; }

  .context { padding-top: var(--space-4); }
  .result-head { margin-top: var(--space-3); row-gap: var(--space-3); }
  .headline { padding-bottom: 0; }
  .band-status { margin-top: var(--space-5); row-gap: 0; }
  .status { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--ink); }
  .benchmark, .next { margin-top: var(--space-5); }

  .site-footer { margin-top: var(--space-7); padding: var(--space-6) 0 var(--space-4); }

  .hero { padding-top: var(--space-5); }
  .hero-routes { margin-top: var(--space-4); }
  .page-head { padding-top: var(--space-5); }
  .choose-side { display: contents; }
  .mobile-menu { top: 73px; padding-bottom: calc(var(--callbar-height) + var(--space-4)); }
  .choose-side > * { grid-column: 1 / -1; }
  .choose-side h1 { order: -1; }
  .cand .mk { transform-box: fill-box; transform-origin: center; transform: scale(1.8); }
  .guide-group + .guide-group { margin-top: var(--space-5); }
}

/* Print: Guide article and Report detail (body class print-doc). Footer and mobile bar hidden, body at 11pt, links shown as text. */
@media print {
  .print-doc .site-footer, .print-doc .callbar { display: none !important; }
  .print-doc, .print-doc .t-body { font-size: 11pt; line-height: 16pt; }
  .print-doc a { color: inherit; text-decoration: none; }
}
