/* ==========================================================================
   iWebServe — Accessible Design System
   WCAG 2.1 AAA compliant | Dark-first | Atkinson Hyperlegible
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. FONT FACE — Atkinson Hyperlegible
      Designed by the Braille Institute for maximum legibility at all sizes
      Download from: https://brailleinstitute.org/freefont
      Place files in /fonts/ directory
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('fonts/AtkinsonHyperlegible-Regular.woff2') format('woff2'),
       url('fonts/AtkinsonHyperlegible-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('fonts/AtkinsonHyperlegible-Bold.woff2') format('woff2'),
       url('fonts/AtkinsonHyperlegible-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('fonts/AtkinsonHyperlegible-Italic.woff2') format('woff2'),
       url('fonts/AtkinsonHyperlegible-Italic.woff') format('woff');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible';
  src: url('fonts/AtkinsonHyperlegible-BoldItalic.woff2') format('woff2'),
       url('fonts/AtkinsonHyperlegible-BoldItalic.woff') format('woff');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. DESIGN TOKENS — Dark theme (default)
      All contrast ratios verified against WCAG AAA (7:1 for normal text)
   -------------------------------------------------------------------------- */

:root {
  /* Backgrounds */
  --bg:           #0D1117;   /* Page background */
  --bg-surface:   #161B22;   /* Card / panel surface */
  --bg-raised:    #1C2128;   /* Raised element (nav, code block) */
  --bg-hover:     #21262D;   /* Hover state */

  /* Borders */
  --bdr:          #30363D;   /* Default border */
  --bdr-focus:    #58A6FF;   /* Focus ring — bright blue, AAA on dark */

  /* Text — all AAA contrast on --bg */
  --text-1:       #F0F6FC;   /* Primary: 16.3:1 on #0D1117 */
  --text-2:       #C9D1D9;   /* Secondary: 11.0:1 on #0D1117 */
  --text-3:       #8B949E;   /* Tertiary/meta: 5.2:1 — AA only; used only for large text ≥18px */

  /* Accent — electric blue */
  --accent:       #58A6FF;   /* Links / CTAs: 5.9:1 on #0D1117 — AA+ */
  --accent-hover: #79B8FF;   /* Hover: 7.8:1 — AAA */
  --accent-bg:    #1F3450;   /* Accent tinted surface */

  /* Pillar colours — for category tags, all AAA on --bg-surface */
  --tag-hosting:   #3FB950;  /* Green — Hosting */
  --tag-design:    #58A6FF;  /* Blue — Web Design */
  --tag-access:    #D2A8FF;  /* Purple — Accessibility */
  --tag-law:       #FFA657;  /* Amber — Canadian Law */
  --tag-dev:       #79C0FF;  /* Sky — Development */

  /* Tag backgrounds (low opacity tints) */
  --tag-hosting-bg: rgba(63,185,80,0.12);
  --tag-design-bg:  rgba(88,166,255,0.12);
  --tag-access-bg:  rgba(210,168,255,0.12);
  --tag-law-bg:     rgba(255,166,87,0.12);
  --tag-dev-bg:     rgba(121,192,255,0.12);

  /* UI */
  --radius:       8px;
  --radius-lg:    12px;
  --shadow:       0 1px 3px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg:    0 4px 16px rgba(0,0,0,0.5);

  /* Typography scale — rem from 20px base */
  --text-xs:    0.8125rem;  /* 13px */
  --text-sm:    0.9375rem;  /* 15px */
  --text-base:  1.125rem;   /* 18px */
  --text-lg:    1.3125rem;  /* 21px */
  --text-xl:    1.5rem;     /* 24px */
  --text-2xl:   1.875rem;   /* 30px */
  --text-3xl:   2.25rem;    /* 36px */
  --text-4xl:   2.75rem;    /* 44px */

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --wrap:     740px;   /* Optimal reading width ~65-70 chars */
  --wrap-wide: 1100px; /* Wide container for grids */
}

/* --------------------------------------------------------------------------
   3. LIGHT THEME — applied when user toggles or prefers-color-scheme: light
   -------------------------------------------------------------------------- */

[data-theme="light"] {
  --bg:           #FFFFFF;
  --bg-surface:   #F6F8FA;
  --bg-raised:    #EAEEF2;
  --bg-hover:     #DDE2E8;
  --bdr:          #D0D7DE;
  --bdr-focus:    #0969DA;
  --text-1:       #0D1117;   /* 21:1 on white */
  --text-2:       #24292F;   /* 17:1 on white */
  --text-3:       #57606A;   /* 7.1:1 on white — AAA for large text */
  --accent:       #0550AE;   /* 7.59:1 on white, 6.51:1 on bg-raised — AA everywhere */
  --accent-hover: #043D87;   /* darker hover */
  --accent-bg:    #DDF4FF;
  --tag-hosting:   #135820;  /* 7.50:1 on tag-hosting-bg/white — AAA */
  --tag-design:    #0550AE;  /* 6.44:1 on tag-design-bg/white — AA */
  --tag-access:    #7B36D6;  /* 5.35:1 on tag-access-bg/white — AA */
  --tag-law:       #8A3000;  /* 7.28:1 on tag-law-bg/white — AAA */
  --tag-dev:       #0066C8;  /* 4.86:1 on tag-dev-bg/white — AA */
  --tag-hosting-bg: rgba(26,127,55,0.10);
  --tag-design-bg:  rgba(5,80,174,0.10);
  --tag-access-bg:  rgba(123,54,214,0.10);
  --tag-law-bg:     rgba(188,76,0,0.10);
  --tag-dev-bg:     rgba(0,105,204,0.10);
  --shadow:       0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg:    0 4px 16px rgba(0,0,0,0.12);
}

/* System preference — applied before JS loads */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:           #FFFFFF;
    --bg-surface:   #F6F8FA;
    --bg-raised:    #EAEEF2;
    --bg-hover:     #DDE2E8;
    --bdr:          #D0D7DE;
    --bdr-focus:    #0969DA;
    --text-1:       #0D1117;
    --text-2:       #24292F;
    --text-3:       #57606A;
    --accent:       #0550AE;
    --accent-hover: #043D87;
    --accent-bg:    #DDF4FF;
    --tag-hosting:   #135820;
    --tag-design:    #0550AE;
    --tag-access:    #7B36D6;
    --tag-law:       #8A3000;
    --tag-dev:       #0066C8;
    --tag-hosting-bg: rgba(26,127,55,0.10);
    --tag-design-bg:  rgba(5,80,174,0.10);
    --tag-access-bg:  rgba(123,54,214,0.10);
    --tag-law-bg:     rgba(188,76,0,0.10);
    --tag-dev-bg:     rgba(0,105,204,0.10);
    --shadow:       0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg:    0 4px 16px rgba(0,0,0,0.12);
  }
}

/* --------------------------------------------------------------------------
   4. RESET & BASE
   -------------------------------------------------------------------------- */

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

html {
  font-size: 20px; /* Base for all rem calculations — generous for low vision */
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  font-family: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--text-1);
  background-color: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   5. SKIP NAVIGATION — WCAG 2.4.1 requirement
      Must be the very first focusable element on every page
   -------------------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  background: var(--accent);
  color: var(--bg);
  font-size: var(--text-base);
  font-weight: 700;
  padding: var(--space-3) var(--space-6);
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  transition: top 0.15s ease;
  white-space: nowrap;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--text-1);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   6. FOCUS INDICATORS — WCAG 2.4.7, 2.4.11 (AAA)
      Highly visible focus rings for keyboard navigation
   -------------------------------------------------------------------------- */

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

/* Remove default outline only when custom is applied */
:focus:not(:focus-visible) {
  outline: none;
}

/* --------------------------------------------------------------------------
   7. TYPOGRAPHY
   -------------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--text-2);
  max-width: 68ch; /* Optimal line length for readability */
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

strong, b { font-weight: 700; color: var(--text-1); }
em, i { font-style: italic; }

small {
  font-size: var(--text-xs);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   8. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.wrap-wide {
  width: 100%;
  max-width: var(--wrap-wide);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* --------------------------------------------------------------------------
   9. NAVIGATION
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--bdr);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .wrap-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: var(--space-6);
}

.site-logo {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-1);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.site-logo span {
  color: var(--accent);
}

.site-logo:hover {
  color: var(--accent-hover);
}

.site-logo:focus-visible {
  border-radius: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  flex-wrap: wrap;
}

.site-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text-1);
  background: var(--bg-hover);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* Theme toggle button */
.theme-toggle {
  background: var(--bg-hover);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  color: var(--text-2);
  cursor: pointer;
  font-size: var(--text-sm);
  font-family: inherit;
  font-weight: 700;
  padding: var(--space-2) var(--space-4);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--bg-surface);
  color: var(--text-1);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   10. HERO / PAGE HEADER
   -------------------------------------------------------------------------- */

.page-hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--bdr);
  padding: var(--space-16) 0 var(--space-12);
}

.page-hero .eyebrow {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
  display: block;
}

.page-hero h1 {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl));
  color: var(--text-1);
  margin-bottom: var(--space-5);
  max-width: 18ch;
}

.page-hero .lead {
  font-size: var(--text-lg);
  color: var(--text-2);
  line-height: 1.7;
  max-width: 55ch;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   11. CATEGORY TAGS / PILLS
   -------------------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.tag:hover { opacity: 0.85; }

.tag-hosting    { color: var(--tag-hosting);  background: var(--tag-hosting-bg); }
.tag-design     { color: var(--tag-design);   background: var(--tag-design-bg);  }
.tag-access     { color: var(--tag-access);   background: var(--tag-access-bg);  }
.tag-law        { color: var(--tag-law);      background: var(--tag-law-bg);     }
.tag-dev        { color: var(--tag-dev);      background: var(--tag-dev-bg);     }

/* --------------------------------------------------------------------------
   12. ARTICLE CARDS
   -------------------------------------------------------------------------- */

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--bdr);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
  color: inherit;
}

.article-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  background: var(--bg-hover);
}

.article-card:focus-visible {
  outline: 3px solid var(--bdr-focus);
  outline-offset: 3px;
}

.article-card .card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.article-card .card-date {
  font-size: var(--text-xs);
  color: var(--text-3);
  font-weight: 700;
}

.article-card h3 {
  font-size: var(--text-lg);
  color: var(--text-1);
  line-height: 1.3;
  margin: 0;
}

.article-card .card-excerpt {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.75;
  margin: 0;
  max-width: none;
  flex-grow: 1;
}

.article-card .card-read-more {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px solid var(--bdr);
}

/* --------------------------------------------------------------------------
   13. ARTICLE BODY — WCAG compliant reading experience
   -------------------------------------------------------------------------- */

.article-body {
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--text-2);
  max-width: 68ch;
}

.article-body h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-5);
  padding-top: var(--space-8);
  border-top: 1px solid var(--bdr);
  color: var(--text-1);
}

.article-body h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
  color: var(--text-1);
}

.article-body h4 {
  font-size: var(--text-lg);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--text-1);
}

.article-body p {
  margin-bottom: var(--space-6);
  max-width: none;
}

.article-body a:not(.btn) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  font-weight: 700;
}

.article-body a:not(.btn):hover {
  color: var(--accent-hover);
}

.article-body ul,
.article-body ol {
  padding-left: var(--space-8);
  margin-bottom: var(--space-6);
}

.article-body li {
  margin-bottom: var(--space-3);
  line-height: 1.8;
  color: var(--text-2);
}

.article-body li::marker {
  color: var(--accent);
}

.article-body blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-5) var(--space-6);
  border-left: 4px solid var(--accent);
  background: var(--bg-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-1);
  font-size: var(--text-lg);
}

.article-body code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--tag-access);
}

.article-body pre {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--radius);
  padding: var(--space-5);
  overflow-x: auto;
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-2);
}

.article-body hr {
  border: none;
  border-top: 1px solid var(--bdr);
  margin: var(--space-10) 0;
}

/* Callout / aside boxes */
.callout {
  background: var(--accent-bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-8) 0;
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.callout-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--accent);
  margin-top: 2px;
}

.callout-body p {
  margin: 0;
  color: var(--text-1);
  font-size: var(--text-sm);
  line-height: 1.75;
  max-width: none;
}

.callout-body p + p {
  margin-top: var(--space-3);
}

.callout-body strong { color: var(--text-1); }

/* --------------------------------------------------------------------------
   14. ARTICLE PAGE LAYOUT
   -------------------------------------------------------------------------- */

.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  padding: var(--space-12) 0 var(--space-20);
}

.article-header {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--bdr);
}

.article-header .article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.article-header h1 {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
  color: var(--text-1);
  margin-bottom: var(--space-5);
  line-height: 1.2;
}

.article-header .article-intro {
  font-size: var(--text-lg);
  color: var(--text-2);
  line-height: 1.75;
  margin: 0;
  max-width: 60ch;
}

.article-date {
  font-size: var(--text-sm);
  color: var(--text-3);
  font-weight: 700;
}

.reading-time {
  font-size: var(--text-sm);
  color: var(--text-3);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   15. TABLE OF CONTENTS
   -------------------------------------------------------------------------- */

.toc {
  background: var(--bg-surface);
  border: 1px solid var(--bdr);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-8);
}

.toc-title {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: var(--space-4);
  display: block;
}

.toc ol {
  padding-left: var(--space-5);
  margin: 0;
}

.toc li {
  margin-bottom: var(--space-2);
  line-height: 1.5;
  font-size: var(--text-sm);
}

.toc a {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 700;
}

.toc a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   16. BUTTONS
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  padding: 14px var(--space-6);
  min-height: 48px;  /* WCAG 2.5.5 — minimum 44px, we exceed it */
  min-width: 48px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent-bg);
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--bdr);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-1);
  border-color: var(--text-2);
}

/* --------------------------------------------------------------------------
   17. CROSS-PROMO CARDS
   -------------------------------------------------------------------------- */

.promo-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--bdr);
  border-bottom: 1px solid var(--bdr);
  padding: var(--space-10) 0;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

.promo-card {
  background: var(--bg-raised);
  border: 1px solid var(--bdr);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.promo-card .promo-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.promo-card h3 {
  font-size: var(--text-lg);
  color: var(--text-1);
  margin: 0;
}

.promo-card p {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.75;
  margin: 0;
  max-width: none;
}

/* --------------------------------------------------------------------------
   18. PILLAR SECTIONS (homepage)
   -------------------------------------------------------------------------- */

.pillar-section {
  padding: var(--space-16) 0;
}

.pillar-section + .pillar-section {
  border-top: 1px solid var(--bdr);
}

.section-header {
  margin-bottom: var(--space-8);
}

.section-header h2 {
  font-size: var(--text-2xl);
  color: var(--text-1);
  margin-bottom: var(--space-3);
}

.section-header p {
  font-size: var(--text-base);
  color: var(--text-3);
  margin: 0;
  max-width: 55ch;
}

/* --------------------------------------------------------------------------
   19. BREADCRUMBS — accessible navigation
   -------------------------------------------------------------------------- */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  list-style: none;
  padding: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-3);
}

.breadcrumb li + li::before {
  content: '›';
  color: var(--text-3);
  font-size: 1.1em;
}

.breadcrumb a {
  color: var(--text-3);
  font-weight: 700;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--text-2);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   20. FOOTER
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-raised);
  border-top: 1px solid var(--bdr);
  padding: var(--space-12) 0 var(--space-8);
  margin-top: var(--space-20);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

.footer-col h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--text-2);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  line-height: 44px;
}

.footer-col a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--text-3);
  line-height: 1.7;
  margin-top: var(--space-3);
  max-width: 30ch;
}

.footer-bottom {
  border-top: 1px solid var(--bdr);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--text-3);
  margin: 0;
  max-width: none;
  line-height: 1.5;
}

.footer-bottom a {
  color: var(--text-3);
  font-weight: 700;
}

.footer-bottom a:hover {
  color: var(--accent-hover);
}

/* --------------------------------------------------------------------------
   21. UTILITY CLASSES
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-3); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   22. SECTION SPACING
   -------------------------------------------------------------------------- */

section { padding: var(--space-16) 0; }

/* --------------------------------------------------------------------------
   23. RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  html { font-size: 18px; }

  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  h3 { font-size: var(--text-lg); }

  .site-header .wrap-wide {
    flex-wrap: wrap;
    height: auto;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    gap: var(--space-3);
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: var(--space-1);
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .promo-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-hero {
    padding: var(--space-10) 0 var(--space-8);
  }
}

@media (max-width: 480px) {
  html { font-size: 17px; }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .wrap, .wrap-wide {
    padding: 0 var(--space-4);
  }
}

/* --------------------------------------------------------------------------
   24. PRINT STYLES
   -------------------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .theme-toggle,
  .promo-strip,
  .btn { display: none !important; }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
  h1, h2, h3 { page-break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
}
