/* Fowler Metal Industries – redesign prototype
   Target: WCAG 2.2 Level AA (exceeds AODA's WCAG 2.0 AA requirement).
   All text/background pairs below are ≥ 4.5:1; UI component boundaries ≥ 3:1. */

:root {
  --ink: #0d0f12;          /* dark surface */
  --steel: #171a1f;        /* raised dark surface */
  --steel-2: #20252c;
  --line-dark: #6b7480;    /* 3.9:1 on --ink – component borders */
  --on-dark: #f2f3f5;      /* 17:1 on --ink */
  --muted-dark: #b8bec7;   /* 10:1 on --ink */
  --brand: #192474;        /* FMI navy – 13.6:1 with white text */
  --brand-hover: #2b3a9e;
  --accent: #aab4f5;       /* light tint of --brand for use ON DARK surfaces – 9.6:1 on --ink (navy itself is only ~1.5:1 there) */
  --paper: #f5f5f3;
  --white: #ffffff;
  --text: #16181c;         /* 16:1 on --paper */
  --muted: #4a515b;        /* 7.6:1 on --paper */
  --line: #8a919b;         /* 3.1:1 on --white – input borders */
  --accent-dark: #192474;  /* brand navy on light surfaces – 13.6:1 on white, 12.4:1 on --paper */
  --error: #b3261e;        /* 6.5:1 on white */
  --success: #1f6f3a;      /* 6.4:1 on white */
  --focus: #aab4f5;
  --radius: 6px;
  --max: 1200px;
  --header-h: 76px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px); /* WCAG 2.4.11 – focus not hidden by sticky header */
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
}

img, video { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.5em; letter-spacing: 0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 700; text-transform: uppercase; }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 700; text-transform: uppercase; }
h3 { font-size: 1.5rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 70ch; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--ink);
  border-radius: 2px;
}
.on-light :focus-visible, .section--light :focus-visible, .section--white :focus-visible, main.on-light :focus-visible {
  outline-color: var(--accent-dark);
  box-shadow: 0 0 0 6px var(--white);
}

.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: 16px; top: -100px; z-index: 1000;
  background: var(--accent); color: var(--ink); font-weight: 700;
  padding: 12px 18px; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .container { padding: 0 32px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13, 15, 18, 0.97);
  border-bottom: 1px solid #2a2f36;
  color: var(--on-dark);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }
.brand { display: inline-flex; align-items: center; color: var(--on-dark); text-decoration: none; }
.brand img { height: 52px; width: auto; }
.brand img,
.site-footer .footer-grid > div:first-child > img,
.admin-bar img { filter: brightness(0) invert(1); }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--on-dark);
  border: 2px solid var(--line-dark); border-radius: var(--radius);
  padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px;
}
.nav-toggle-bars { width: 20px; height: 2px; background: currentColor; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.primary-nav { display: none; }
.primary-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ink); border-bottom: 1px solid #2a2f36; padding: 8px 16px 20px;
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.primary-nav ul { list-style: none; margin: 0; padding: 0; }
.primary-nav a {
  display: block; padding: 12px 8px; color: var(--on-dark); text-decoration: none;
  font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid #262b31;
}
.primary-nav a:hover { color: var(--accent); }
.primary-nav a[aria-current="page"] { color: var(--accent); }
.primary-nav .nav-cta a {
  margin-top: 12px; border: 2px solid var(--accent); background: var(--brand); color: var(--white); border-radius: var(--radius); text-align: center;
}
.primary-nav .nav-cta a:hover { background: var(--brand-hover); color: var(--white); }
.primary-nav .nav-login a {
  margin-top: 16px; border: 2px solid var(--on-dark); border-radius: var(--radius); text-align: center; color: var(--on-dark);
}
.primary-nav .nav-login a:hover { background: var(--on-dark); color: var(--ink); }

@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .primary-nav, .primary-nav.is-open { display: block; position: static; padding: 0; background: none; border: 0; max-height: none; overflow: visible; }
  .primary-nav ul { display: flex; align-items: center; gap: 4px; }
  .primary-nav a { border: 0; padding: 10px 14px; position: relative; }
  .primary-nav a[aria-current="page"]::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px; background: var(--accent);
  }
  .primary-nav .nav-cta a, .primary-nav .nav-login a { margin: 0 0 0 10px; padding: 8px 16px; }
  .primary-nav .nav-login a { margin-left: 16px; }
  .primary-nav .nav-cta a::after, .primary-nav .nav-login a::after { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; line-height: 1.2;
}
.btn--primary { background: var(--brand); color: var(--white); border-color: var(--brand); }
.btn--primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
/* On dark surfaces the navy fill needs a light edge to stand out (WCAG 1.4.11) */
.hero .btn--primary, .page-hero .btn--primary, .section--dark .btn--primary, .section--steel .btn--primary { border-color: var(--accent); }
.btn--ghost { background: transparent; color: var(--on-dark); border-color: var(--on-dark); }
.btn--ghost:hover { background: var(--on-dark); color: var(--ink); }
.btn--dark { background: var(--ink); color: var(--on-dark); }
.btn--dark:hover { background: #2a2f36; }
.btn--outline { background: transparent; color: var(--text); border-color: var(--text); }
.btn--outline:hover { background: var(--text); color: var(--white); }
.btn--danger { background: transparent; color: var(--error); border-color: var(--error); }
.btn--danger:hover { background: var(--error); color: var(--white); }
.btn--small { min-height: 40px; padding: 8px 14px; font-size: 0.95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 104px 0; } }
.section--dark { background: var(--ink); color: var(--on-dark); }
.section--steel { background: var(--steel); color: var(--on-dark); }
.section--light { background: var(--paper); color: var(--text); }
.section--white { background: var(--white); color: var(--text); }
.section--dark a:not(.btn), .section--steel a:not(.btn), .site-footer a:not(.btn) { color: var(--on-dark); }
.section--dark a:not(.btn):hover, .section--steel a:not(.btn):hover { color: var(--accent); }

.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.95rem; color: var(--accent-dark); margin-bottom: 12px;
}
.section--dark .eyebrow, .section--steel .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--accent); }
.lead { font-size: 1.2rem; color: var(--muted); }
.section--dark .lead, .section--steel .lead, .hero .lead, .page-hero .lead { color: var(--muted-dark); }
.section-head { max-width: 760px; margin-bottom: 48px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--on-dark); background: var(--ink);
  min-height: min(88vh, 820px); display: flex; align-items: flex-end; overflow: hidden;
}
.hero video, .hero .hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  /* scrim guarantees text contrast regardless of video frame */
  /* Mobile: text spans the full width, so the whole frame gets ≥ 0.65 black (white text ≥ 6:1 over any frame) */
  background: rgba(13,15,18,0.65);
}
@media (min-width: 1200px) {
  /* Wide screens: the text column ends before 50% of the width, so darken only that (≥ 0.72 black)
     and let the footage show on the right */
  .hero::after {
    background: linear-gradient(90deg, rgba(13,15,18,0.88) 0%, rgba(13,15,18,0.72) 52%, rgba(13,15,18,0.25) 75%, rgba(13,15,18,0.1) 100%);
  }
}
.hero .container { position: relative; z-index: 1; padding-top: 96px; padding-bottom: 72px; }
.hero h1 { max-width: 14ch; }
.hero .lead { font-size: 1.3rem; max-width: 44ch; margin-bottom: 28px; }

.media-toggle {
  position: absolute; z-index: 2; right: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(13,15,18,0.85); color: var(--on-dark);
  border: 2px solid var(--on-dark); border-radius: 999px;
  padding: 8px 14px; font: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer; min-height: 44px;
}
.media-toggle:hover { background: var(--on-dark); color: var(--ink); }
.media-toggle svg { width: 16px; height: 16px; fill: currentColor; }

.page-hero {
  position: relative; background: var(--ink); color: var(--on-dark); overflow: hidden;
  padding: 120px 0 64px;
}
.page-hero .hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,15,18,0.94), rgba(13,15,18,0.7)); }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: #2a2f36; border: 1px solid #2a2f36; margin: 0; padding: 0; }
@media (min-width: 480px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats > div { background: var(--steel); padding: 28px 24px; }
.stats dt { color: var(--muted-dark); font-size: 0.98rem; order: 2; }
.stats dd { margin: 0 0 4px; font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--on-dark); line-height: 1; }
.stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
@media (min-width: 700px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.cap-card {
  position: relative; display: flex; flex-direction: column; background: var(--steel-2); color: var(--on-dark);
  border-radius: var(--radius); overflow: hidden; border: 1px solid #343a42;
}
/* Product renders are shown whole (no cropping); height:auto stops the HTML height attribute overriding the frame */
.cap-card img { aspect-ratio: 4 / 3; object-fit: contain; width: 100%; height: auto; padding: 16px; }
.cap-card .cap-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cap-card h3 { margin: 0; font-size: 1.6rem; }
.cap-card p { color: var(--muted-dark); margin: 0; }
.cap-card a.stretched { color: var(--accent) !important; font-weight: 700; text-decoration: none; margin-top: auto; padding-top: 8px; }
.cap-card a.stretched::after { content: ""; position: absolute; inset: 0; }
.cap-card:hover { border-color: var(--accent); }
.cap-card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.cap-card a.stretched:focus-visible { outline: none; box-shadow: none; }

.card {
  background: var(--white); border: 1px solid #d5d8dc; border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 8px;
}
.card h3 { margin-bottom: 4px; }
.card p { margin: 0; color: var(--muted); }
.icon-badge {
  width: 48px; height: 48px; border-radius: var(--radius); background: var(--ink); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 8px;
}
.icon-badge svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- Split feature ---------- */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split--reverse > :first-child { order: 2; } }
.media-frame { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; }
.media-frame video, .media-frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.check-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; }
.check-list li { padding-left: 32px; position: relative; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 10px;
  border-left: 3px solid var(--accent-dark); border-bottom: 3px solid var(--accent-dark); transform: rotate(-45deg);
}
.section--dark .check-list li::before, .section--steel .check-list li::before { border-color: var(--accent); }

/* ---------- Industries strip ---------- */
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.tag-list li { border: 1px solid var(--line-dark); border-radius: 999px; padding: 8px 16px; color: var(--on-dark); }

/* ---------- Partner CTA ---------- */
.engage { display: grid; gap: 20px; }
@media (min-width: 900px) { .engage { grid-template-columns: repeat(3, 1fr); } }
.engage-option {
  border: 2px solid #343a42; border-radius: var(--radius); padding: 28px; background: var(--steel);
  display: flex; flex-direction: column; gap: 10px;
}
.engage-option h3 { margin: 0; }
.engage-option p { color: var(--muted-dark); margin: 0 0 12px; }
.engage-option .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: #3a4048; }
.timeline li { position: relative; padding: 0 0 36px 44px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--accent);
}
.timeline .year { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; color: var(--accent); line-height: 1.1; }
.timeline h3 { font-size: 1.3rem; margin: 4px 0 6px; color: var(--on-dark); }
.timeline p { color: var(--muted-dark); margin: 0; }
.timeline li.is-key::before { background: var(--accent); }
@media (min-width: 900px) {
  .timeline { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; }
  .timeline::before { left: 50%; }
  .timeline li:nth-child(odd) { grid-column: 1; text-align: right; padding: 0 44px 36px 0; }
  .timeline li:nth-child(even) { grid-column: 2; padding: 0 0 36px 44px; margin-top: 90px; }
  .timeline li:nth-child(odd)::before { left: auto; right: -40px; }
  .timeline li:nth-child(even)::before { left: -40px; }
  .timeline li:nth-child(odd) p { margin-left: auto; }
}

/* ---------- Spec lists (capabilities) ---------- */
.spec-group { margin-bottom: 28px; }
.spec-group h3 { font-size: 1.35rem; border-bottom: 2px solid var(--accent); padding-bottom: 6px; display: inline-block; }
.spec-list { list-style: none; margin: 0; padding: 0; }
.spec-list li { padding: 10px 0; border-bottom: 1px solid #343a42; color: var(--muted-dark); }
.spec-list li strong { color: var(--on-dark); font-weight: 600; }
.section--white .spec-list li, .section--light .spec-list li { border-color: #d5d8dc; color: var(--muted); }
.section--white .spec-list li strong, .section--light .spec-list li strong { color: var(--text); }

.subnav { background: var(--steel); border-bottom: 1px solid #2a2f36; position: sticky; top: var(--header-h); z-index: 50; }
.subnav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 8px 0; overflow-x: auto; }
.subnav a { display: block; white-space: nowrap; padding: 10px 14px; color: var(--on-dark); text-decoration: none; font-weight: 600; border-radius: var(--radius); }
.subnav a:hover { background: var(--steel-2); color: var(--accent); }

/* ---------- Jobs ---------- */
.job-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.job {
  background: var(--white); border: 1px solid #d5d8dc; border-left: 6px solid var(--accent-dark);
  border-radius: var(--radius); padding: 24px; display: grid; gap: 12px;
}
@media (min-width: 800px) { .job { grid-template-columns: 1fr auto; align-items: center; } }
.job h3 { margin: 0; font-size: 1.6rem; }
.job-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 6px 0 8px; padding: 0; color: var(--muted); font-size: 0.98rem; }
.job p { margin: 0; color: var(--muted); }
.badge {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; background: #fff4c2; color: #3b2f00; vertical-align: middle;
}
.badge--live { background: #dff3e5; color: var(--success); }
.badge--archived { background: #e7e9ec; color: #3d434b; }
.badge--closed { background: #fbe3e1; color: var(--error); }

.empty-state { background: var(--white); border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; }

/* ---------- Posts (Life at FMI) ---------- */
.post-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; }
@media (min-width: 700px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }
.post {
  background: var(--white); border: 1px solid #d5d8dc; border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; height: 100%;
}
.post img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: #e7e9ec; }
.post-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.post-body h3 { margin: 0; font-size: 1.45rem; }
.post-meta { color: var(--muted); font-size: 0.95rem; margin: 0; }
.post-body p { color: var(--text); margin: 0; }
.cat { font-weight: 700; color: var(--accent-dark); }
.archive-list { list-style: none; margin: 0; padding: 0; }
.archive-list li { padding: 14px 0; border-bottom: 1px solid #d5d8dc; }
.archive-list .post-meta { margin-top: 2px; }

details.disclosure { border: 1px solid #d5d8dc; border-radius: var(--radius); background: var(--white); }
details.disclosure > summary {
  cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 1.1rem; list-style-position: inside; min-height: 44px;
}
details.disclosure > div { padding: 0 22px 22px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 22px; }
.form-row { display: grid; gap: 22px; }
@media (min-width: 700px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label, .field legend, fieldset legend { font-weight: 700; color: var(--text); }
.req { color: var(--error); font-weight: 700; }
.field-label { font-weight: 700; color: var(--text); margin: 0; }
.cf-turnstile { min-height: 65px; }
.cf-turnstile[aria-invalid="true"] { outline: 3px solid var(--error); outline-offset: 4px; border-radius: var(--radius); width: max-content; max-width: 100%; }
/* Spam trap: removed from view and from the accessibility tree; people never see or reach it */
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.hint { color: var(--muted); font-size: 0.95rem; margin: 0; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="url"], input[type="password"], select, textarea, input[type="file"] {
  width: 100%; font: inherit; color: var(--text); background: var(--white);
  border: 2px solid var(--line); border-radius: var(--radius); padding: 11px 12px; min-height: 48px;
}
input[type="file"] { padding: 9px; }
textarea { min-height: 140px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; box-shadow: none; border-color: var(--text); }
[aria-invalid="true"] { border-color: var(--error) !important; background: #fff8f7; }
.field-error { color: var(--error); font-weight: 600; margin: 0; display: flex; gap: 6px; align-items: flex-start; }
.field-error::before { content: "⚠"; speak: never; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset legend { margin-bottom: 10px; padding: 0; }
.choice-group { display: grid; gap: 10px; }
@media (min-width: 700px) { .choice-group--3 { grid-template-columns: repeat(3, 1fr); } }
.choice {
  display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--line); border-radius: var(--radius);
  padding: 14px; background: var(--white); cursor: pointer;
}
.choice input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent-dark); flex: none; }
.choice:has(input:checked) { border-color: var(--accent-dark); background: #eef0fb; }
.choice span { display: grid; }
.choice small { color: var(--muted); font-size: 0.93rem; }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--accent-dark); flex: none; }

.error-summary {
  border: 3px solid var(--error); border-radius: var(--radius); padding: 20px 24px; background: #fff8f7;
}
.error-summary h2 { font-size: 1.5rem; color: var(--error); text-transform: none; margin-bottom: 8px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--error); font-weight: 600; }
.success-panel {
  border: 3px solid var(--success); border-radius: var(--radius); padding: 24px; background: #f1faf3;
}
.success-panel h2 { color: var(--success); font-size: 1.7rem; text-transform: none; }

.form-card { background: var(--white); border: 1px solid #d5d8dc; border-radius: var(--radius); padding: 28px; }
@media (min-width: 700px) { .form-card { padding: 40px; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: 1fr 1.6fr; gap: 64px; } }
.facility { padding: 18px 0; border-bottom: 1px solid #d5d8dc; }
.facility h3 { font-size: 1.25rem; margin: 0 0 4px; }
.facility p, address { margin: 0; font-style: normal; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: #08090b; color: var(--muted-dark); padding: 64px 0 28px; font-size: 0.98rem; }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer h2 { font-size: 1.1rem; color: var(--on-dark); letter-spacing: 0.1em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer ul a { display: inline-block; padding: 4px 0; text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; color: var(--accent) !important; }
.site-footer address { color: var(--muted-dark); }
.footer-base { margin-top: 48px; padding-top: 20px; border-top: 1px solid #2a2f36; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.footer-base p { margin: 0; }
.cert-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.cert { border: 1px solid var(--line-dark); border-radius: 4px; padding: 4px 10px; font-weight: 700; color: var(--on-dark); font-size: 0.9rem; }

/* ---------- Admin ---------- */
.admin-shell { background: var(--paper); min-height: 100vh; }
.admin-bar { background: var(--ink); color: var(--on-dark); }
.admin-bar .container { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; flex-wrap: wrap; }
.admin-bar a { color: var(--on-dark); }
.admin-bar img { height: 40px; width: auto; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid #d5d8dc; margin-bottom: 28px; flex-wrap: wrap; }
.tabs [role="tab"] {
  font: inherit; font-weight: 700; background: none; border: 0; border-bottom: 4px solid transparent;
  padding: 12px 18px; margin-bottom: -2px; cursor: pointer; color: var(--muted); min-height: 48px;
}
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent-dark); }
.tabs [role="tab"]:hover { color: var(--text); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid #d5d8dc; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid #e3e5e8; vertical-align: top; }
.admin-table th { background: #eceeef; font-size: 0.95rem; }
.admin-table caption { text-align: left; font-weight: 700; padding: 0 0 10px; font-size: 1.1rem; }
.table-wrap { overflow-x: auto; }
.admin-panel { display: grid; gap: 32px; }
@media (min-width: 1100px) { .admin-panel { grid-template-columns: 420px 1fr; align-items: start; } }
.status-msg { padding: 12px 16px; border-radius: var(--radius); background: #f1faf3; border: 2px solid var(--success); color: var(--success); font-weight: 600; }
.status-msg:empty { display: none; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 24px; }
.mt-3 { margin-top: 40px; }
.center { text-align: center; }
.max-narrow { max-width: 820px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose h2 { font-size: 1.9rem; margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }

/* Windows High Contrast / forced colours */
@media (forced-colors: active) {
  .btn, .choice, .media-toggle, .nav-toggle { border: 2px solid ButtonText; }
  .hero::after, .page-hero::after { display: none; }
  .timeline li::before { forced-color-adjust: none; background: CanvasText; }
}
@media print {
  .site-header, .site-footer, .media-toggle, video { display: none !important; }
}
