/* ==========================================================================
   ABlawg.ca — Homepage
   Vanilla CSS. No framework, no preprocessor, no build step.
   Source of truth: Figma Plugin Export "ABLawg.ca (Copy)" / Homepage
   (1920px canvas, 1440px container).

   Every design value below is measured from the export's section-specs.json
   or from its rendered screenshots. Where the two disagreed, the screenshot
   won. Where a design value failed WCAG 2.2 AA, it was shifted by the
   smallest amount that passes — each such case is flagged "AA:" inline.
   ========================================================================== */

/* ── 1. Fonts (self-hosted; no external font services) ──────────────────── */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  /* A single woff2 entry: the variable axis is declared by the font-weight
     RANGE below, which is the standard way. Listing the same file twice with
     a 'woff2-variations' hint made the browser treat the preload and the CSS
     request as different resources. */
  src: url('../fonts/manrope-var.woff2') format('woff2');
  font-weight: 200 800;               /* variable wght axis, covers 400/700/800 */
  font-style: normal;
  font-display: swap;
}

/* ── 2. Design system ───────────────────────────────────────────────────── */

:root {
  /* — Palette (from design-tokens.json) — */
  --clr-white:        #FFFFFF;
  --clr-ink:          #111111;
  --clr-black:        #000000;
  --clr-red:          #D42F48;   /* brand / link / accent */
  --clr-yellow:       #FCCF05;   /* CTA */
  --clr-border:       #DDDDDD;
  --clr-border-dark:  #414141;
  --clr-surface:      #F5F5F5;
  --clr-red-soft:     #F2E1E4;   /* #D42F48 @ 10% over --clr-surface */

  /* AA-corrected text colours. Design value in the comment. */
  --clr-muted:        #767676;   /* design #818181 (3.90:1) & #ABABAB (2.30:1) → 4.54:1 */
  --clr-red-on-dark:  #DA4C62;   /* design #D42F48 on #111111 was 3.87:1 → 4.67:1 */
  --clr-red-deep:     #BB293F;   /* design #D42F48 on #F2E1E4 was 3.88:1 → 4.76:1 */
  --clr-bsky:         #0A7EA4;   /* design #03A9F4 (2.63:1) → 4.63:1 */
  --clr-muted-on-surface: #6B6B6B; /* muted on #F5F5F5 was 4.17:1 → 4.89:1 */
  --clr-field-border: var(--clr-muted); /* 1.4.11: #DDDDDD on white was 1.36:1 → 4.54:1 */

  /* — Semantic — */
  --clr-text:         var(--clr-ink);
  --clr-text-invert:  var(--clr-white);
  --clr-link:         var(--clr-red);
  --clr-focus:        var(--clr-ink);
  --clr-focus-halo:   var(--clr-white);

  /* — Type families — */
  --ff-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ff-display: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;

  /* — Fluid type scale. Each token equals its Figma px value at the 1440px
       container and floors at 390px. Generated, not eyeballed. — */
  --fs-10: 0.625rem;
  --fs-12: 0.75rem;
  --fs-14: clamp(0.8125rem, 0.7893rem + 0.09524vw, 0.875rem);
  --fs-18: clamp(1rem,      0.9536rem + 0.1905vw,  1.125rem);
  --fs-20: clamp(1.0625rem, 0.99286rem + 0.28571vw, 1.25rem);
  --fs-26: clamp(1.375rem,  1.282rem  + 0.381vw,   1.625rem);
  --fs-30: clamp(1.5rem,    1.361rem  + 0.5714vw,  1.875rem);
  --fs-36: clamp(1.5rem,    1.221rem  + 1.143vw,   2.25rem);
  --fs-44: clamp(1.875rem,  1.55rem   + 1.333vw,   2.75rem);

  /* — Line heights (design: 44/53, 18/27) — */
  --lh-tight:  1.2;
  --lh-title:  1.2045;   /* 44px → 53px */
  --lh-body:   1.5;      /* 18px → 27px */
  --lh-label:  1.3;

  --ls-wide:   0.16em;   /* design: COMING SOON */

  /* — Fluid spacing scale, same method as the type scale — */
  --sp-10:  0.625rem;
  --sp-15:  0.9375rem;
  --sp-20:  clamp(1rem,     0.9071rem + 0.381vw,  1.25rem);
  --sp-25:  clamp(1.25rem,  1.134rem  + 0.4762vw, 1.5625rem);
  --sp-28:  clamp(1.375rem, 1.236rem  + 0.5714vw, 1.75rem);
  --sp-30:  clamp(1.5rem,   1.361rem  + 0.5714vw, 1.875rem);
  --sp-34:  clamp(1.625rem, 1.439rem  + 0.7619vw, 2.125rem);
  --sp-35:  clamp(1.75rem,  1.587rem  + 0.6667vw, 2.1875rem);
  --sp-40:  clamp(1.875rem, 1.643rem  + 0.9524vw, 2.5rem);
  --sp-44:  clamp(2rem,     1.721rem  + 1.143vw,  2.75rem);
  --sp-48:  clamp(2.125rem, 1.8rem    + 1.3333vw, 3rem);
  --sp-50:  clamp(2.25rem,  1.925rem  + 1.333vw,  3.125rem);
  --sp-60:  clamp(2.5rem,   2.036rem  + 1.905vw,  3.75rem);
  --sp-64:  clamp(2.75rem,  2.286rem  + 1.905vw,  4rem);
  --sp-70:  clamp(3rem,     2.489rem  + 2.095vw,  4.375rem);
  --sp-97:  clamp(3.5rem,   2.548rem  + 3.905vw,  6.0625rem);
  --sp-100: clamp(3.75rem,  2.821rem  + 3.81vw,   6.25rem);

  /* — Layout — */
  --container: 90rem;                               /* 1440px */
  --gutter:    clamp(1.25rem, 3vw, 2.5rem);
  --col-gap:   var(--sp-34);                        /* 34px main↔sidebar */

  /* — Components — */
  --btn-h:       3.75rem;    /* 60px — measured on every button in the design */
  --btn-pad-x:   1.875rem;   /* 30px */
  /* Button state pairs. Every button reads these, so the hover behaviour is
     defined once here rather than per component. Each pair is checked at the
     12px bold uppercase the buttons set their label in, which needs 4.5:1. */
  --btn-bg:         var(--clr-yellow);    /* #FCCF05 */
  --btn-fg:         var(--clr-ink);       /* #111111 — 12.65:1 */
  --btn-bg-hover:   var(--clr-red);       /* #D42F48 */
  --btn-fg-hover:   var(--clr-white);     /* #FFFFFF —  4.88:1 */
  --btn-bg-active:  var(--clr-red-deep);  /* #BB293F */
  --btn-fg-active:  var(--clr-white);     /* #FFFFFF —  6.00:1 */
  --card-pad-x:  clamp(1.25rem, 3.4vw, 3.125rem);   /* 50px at 1440 */
  --card-pad-y:  clamp(1.5rem, 4vw, 3.75rem);       /* 60px head at 1440 */
  --panel-pad:   var(--sp-40);                      /* 40px */
  --radius:      0;                                 /* design uses square corners */
  --hairline:    1px;

  /* Sticky sidebar offset. The design's header does not stick, so this is a
     breathing gap; raise it to the header height if the header is ever fixed. */
  --header-sticky-h: 0px;
  --sticky-top: calc(var(--header-sticky-h) + var(--sp-30));

  /* — Scrollbar. Square and full-bleed because the design has no rounded
       corner anywhere (--radius is 0) and states itself in flat colour
       blocks: the red nav bar, the yellow buttons. A tinted-glass, pill
       shaped bar would be the one rounded thing on the page. — */
  --sb-size:         0.5rem;               /* 8px */
  --sb-track:        var(--clr-surface);   /* #F5F5F5, the design's surface */
  --sb-track-edge:   var(--clr-border);    /* #DDDDDD, same hairline as cards */
  --sb-thumb:        var(--clr-red);       /* brand — 4.48:1 on the track */
  --sb-thumb-hover:  var(--clr-red-deep);  /* #BB293F — 5.50:1 */
  --sb-thumb-active: var(--clr-ink);       /* #111111 — 17.3:1 */

  --dur: 240ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 3. Reset & base ────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Styling ::-webkit-scrollbar below turns the page's scrollbar from an
     overlay into a classic one that occupies layout width. Reserving the
     gutter here is therefore part of that change, not an extra: without it
     the whole page would jump sideways by the bar's width every time the
     off-canvas menu locks body scrolling. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--fs-18);
  line-height: var(--lh-body);
  color: var(--clr-text);
  background: var(--clr-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;         /* belt-and-braces against stray overflow */
}

body.is-locked { overflow: hidden; }
/* `overflow: hidden` makes scrollbar-gutter void, so the reserved gutter
   collapses and the whole page re-centres by half the bar's width the moment
   the menu opens. Padding the root by the bar's measured width (main.js sets
   --sb-lock-pad) holds it exactly still, and tinting that strip the track
   colour means the swap is invisible rather than a flash of white. */
html.is-locked {
  padding-right: var(--sb-lock-pad, 0px);
  background: var(--sb-track);
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul[role='list'], ol[role='list'] { list-style: none; padding: 0; }

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--clr-link); text-decoration-thickness: from-font; text-underline-offset: 0.18em; }

button, input { font: inherit; color: inherit; }
button, input[type='button'], input[type='submit'], input[type='checkbox'], input[type='radio'] { cursor: pointer; }

/* The design wraps greedily; `balance` would shorten heading lines and
   `pretty` would shift body-copy breaks, so neither is used on either. */
:where(h1, h2, h3, p) { text-wrap: normal; }

/* Focus: always visible, never colour-alone, >=3:1 against its backdrop.

   The ring colour is carried by an INHERITED custom property rather than by
   context selectors, because a selector-based override is fragile: an equally
   specific component rule written later in the file silently wins, which is
   how the yellow hero button ended up with a #111111 ring on the #111111
   hero — a ring nobody could see. Inheritance makes the section the single
   source of truth, and a component cannot accidentally out-rank it.

   A second, inverted halo sits outside the ring so the indicator holds up
   whichever way the local contrast runs. */
:focus-visible {
  outline: 3px solid var(--clr-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--clr-focus-halo);
}
/* Dark surfaces flip the pair for everything inside them. */
.hero,
.navbar,
.site-footer,
.offcanvas {
  --clr-focus: var(--clr-white);
  --clr-focus-halo: var(--clr-ink);
}

/* Anything the sticky sidebar or a jump link scrolls to stays clear of the top. */
:target { scroll-margin-top: var(--sp-30); }

/* ── 4. Utilities ───────────────────────────────────────────────────────── */

.u-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
[data-ablawg-fallback-pagination] .nav-links { display: flex; flex-wrap: wrap; gap: var(--sp-10) var(--sp-20); }
[data-ablawg-fallback-pagination] .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; min-height: 1.5rem; }
/* WCAG 2.4.7: sr-only blocks holding links show on keyboard focus. */
.u-sr-only--focusable:focus-within {
  position: static;
  width: auto; height: auto;
  margin: var(--sp-20) 0 0;
  overflow: visible;
  clip-path: none;
  white-space: normal;
}

.skip-link {
  position: absolute;
  top: 0; left: var(--gutter);
  z-index: 100;
  transform: translateY(-120%);
  padding: 0.75rem 1.25rem;
  background: var(--clr-ink);
  color: var(--clr-white);
  font-size: var(--fs-14);
  font-weight: 700;
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus-visible {
  transform: translateY(0);
  --clr-focus: var(--clr-yellow);
  --clr-focus-halo: var(--clr-ink);
}

.container {
  width: min(100% - (var(--gutter) * 2), var(--container));
  margin-inline: auto;
}

/* ── 5. Primitives: buttons, pills, links, meta, stats ──────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-10);
  /* Every button in the design measures 60px tall, with or without an icon,
     so the height is set rather than derived from padding — otherwise the
     20px send icon makes the icon buttons 4px taller than the text ones. */
  min-height: var(--btn-h);
  padding: 0 var(--btn-pad-x);
  border: 0;
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-size: var(--fs-12);
  font-weight: 700;
  line-height: var(--lh-label);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}

/* Both variants share ONE hover: brand red with white text. Only the resting
   state differs, so the two never diverge again. Sizing, type, padding and
   radius are untouched — `.btn` above owns all of those. */
.btn--cta { background: var(--btn-bg); color: var(--btn-fg); }
.btn--cta:hover  { background: var(--btn-bg-hover);  color: var(--btn-fg-hover); }
.btn--cta:active { background: var(--btn-bg-active); color: var(--btn-fg-active); }

.btn--ghost {
  background: var(--clr-white);
  color: var(--clr-ink);
  border: var(--hairline) solid var(--clr-border);
}
.btn--ghost:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-fg-hover);
  border-color: var(--btn-bg-hover);
}
.btn--ghost:active {
  background: var(--btn-bg-active);
  color: var(--btn-fg-active);
  border-color: var(--btn-bg-active);
}

.btn__icon { flex: none; background-repeat: no-repeat; background-size: contain; }
.btn__icon--send { width: 1.25rem; height: 1.25rem; background-image: url('../images/button-icon.svg'); }

/* The exported send glyph is a flat #111111 fill, which would stay dark on
   the red hover while its label turned white. Painting it through a mask
   instead makes it `currentColor`, so it follows the label in every state
   and crossfades on the same transition. The background-image above stays as
   the fallback for anything without mask support. */
@supports ((-webkit-mask-image: url('../images/button-icon.svg')) or (mask-image: url('../images/button-icon.svg'))) {
  .btn__icon--send {
    background-image: none;
    background-color: currentColor;
    -webkit-mask: url('../images/button-icon.svg') no-repeat center / contain;
            mask: url('../images/button-icon.svg') no-repeat center / contain;
    transition: background-color var(--dur) var(--ease);
  }
}

/* Pills */
.pill {
  display: flex;
  font-family: var(--ff-body);
  font-size: var(--fs-12);
  font-weight: 400;
  line-height: var(--lh-label);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.pill > a { text-decoration: none; }
.pill > a,
.pill--soft {
  display: inline-block;
  padding: 0.3125rem 0.625rem;   /* design: 5px 10px */
}
.pill--red > a     { background: var(--clr-red);    color: var(--clr-white); }
.pill--red > a:hover { background: #BB293F; }
.pill--yellow > a  { background: var(--clr-yellow); color: var(--clr-ink); font-weight: 700; }
.pill--yellow > a:hover { background: #E8BE04; }
.pill--soft {
  background: var(--clr-red-soft);
  color: var(--clr-red-deep);            /* AA */
  font-family: var(--ff-display);
  font-size: var(--fs-10);
  font-weight: 700;
  letter-spacing: var(--ls-wide);
}

/* Arrow link ("View all articles →") */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-10);
  min-height: 1.5rem;                     /* WCAG 2.5.8 target size */
  font-family: var(--ff-display);
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: var(--lh-label);
  text-transform: uppercase;
  color: var(--clr-link);
  text-decoration: underline;             /* never colour alone */
  white-space: nowrap;
}
.link-arrow__icon {
  flex: none;
  width: 0.6875rem; height: 0.5rem;       /* 11×8 */
  background: url('../images/arrow-1-stroke.svg') no-repeat center / contain;
  transition: transform var(--dur) var(--ease);
}
.link-arrow:hover .link-arrow__icon { transform: translateX(3px); }

.link-inline { color: var(--clr-link); text-decoration: underline; }
.link-inline:hover { text-decoration-thickness: 2px; }

/* Meta row (author · date · topics) */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-10) var(--sp-28);
  font-size: var(--fs-12);
  line-height: var(--lh-label);
  text-transform: uppercase;
  color: var(--clr-muted);                /* AA: design #818181 */
}
.meta__item { display: flex; align-items: center; gap: var(--sp-10); }
.meta__icon { flex: none; background-repeat: no-repeat; background-position: center; background-size: contain; }
.meta__icon--author { width: 0.875rem; height: 1rem; background-image: url('../images/person-icon-2.svg'); }
.meta__icon--date   { width: 1rem;     height: 1rem; background-image: url('../images/date-icon-2.svg'); }
.meta__icon--tag    { width: 1.0625rem; height: 1.0625rem; background-image: url('../images/category-icon.svg'); }
.meta--invert { color: var(--clr-text-invert); }
.meta--invert .meta__icon--author { background-image: url('../images/person-icon.svg'); }
.meta--invert .meta__icon--date   { background-image: url('../images/date-icon.svg'); }

/* Engagement counts */
.feed__list .feed-post .stats {
  display: flex;
  align-items: center;
  gap: var(--sp-20);
  font-family: var(--ff-display);
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--clr-muted);                /* AA: design #ABABAB */
}
.stats__item { display: flex; align-items: center; gap: 0.5rem; }
.stats__icon { flex: none; background-repeat: no-repeat; background-size: contain; }
.stats__icon--like  { width: 0.9375rem; height: 0.8125rem; background-image: url('../images/may-10-2026-button-icon.svg'); }
.stats__icon--share { width: 1.125rem;  height: 0.9375rem; background-image: url('../images/may-10-2026-button-icon-2.svg'); }

/* Social icons — one exported sprite (155×19), four real links.
   The visible icon keeps the design's exact geometry; an invisible 40×40
   ::after grows the hit area to satisfy WCAG 2.2 SC 2.5.8 without moving
   anything. */
.social { display: flex; align-items: center; }
.social__link { position: relative; display: block; }
.social__link::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -50%;
  width: 2.5rem; height: 2.5rem;
}
.social__icon {
  display: block;
  height: 1.1875rem;                      /* 19px */
  background-repeat: no-repeat;
  background-size: 9.6875rem 1.1875rem;   /* 155×19 */
  transition: opacity var(--dur) var(--ease);
}
.social__link:hover .social__icon { opacity: 0.7; }
.social__icon--fb { width: 0.6875rem; background-position:    0    0; }
.social__icon--ig { width: 1.125rem;  background-position: -2.5rem 0; }   /* -40px */
.social__icon--tw { width: 1.125rem;  background-position: -5.5rem 0; }   /* -88px */
.social__icon--in { width: 1.1875rem; background-position: -8.5rem 0; }   /* -136px */
.social--brand  .social__icon { background-image: url('../images/content-frame-2.svg'); }
.social--invert .social__icon { background-image: url('../images/content-frame.svg'); }
/* Design gaps between icon origins: 40 / 48 / 48px within the 155px sprite. */
.social--brand  li + li,
.social--invert li + li { margin-left: 1.8125rem; }

/* ── 6. Section heading (red corner bracket + rule) ─────────────────────── */

.section-head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-10) var(--sp-20);
  padding: 0.625rem 0.625rem 1.25rem;     /* design: 10px 10px 20px */
  border-bottom: var(--hairline) solid var(--clr-border);
}
.section-head::before {                   /* heading-icon.svg — 12×12 red bracket */
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0.75rem; height: 0.75rem;
  background: url('../images/heading-icon.svg') no-repeat left top / contain;
}
.section-head__title {
  font-family: var(--ff-body);
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: var(--lh-tight);
  text-transform: uppercase;
  color: var(--clr-red);
}
.section-head__badge { flex: none; width: 2.4375rem; height: auto; }
.section-head--side { align-items: flex-end; }
.section-head--dark { border-bottom-color: var(--clr-border-dark); }
.section-head--dark .section-head__title { color: var(--clr-red-on-dark); }  /* AA */

/* ── 7. Header: top bar ─────────────────────────────────────────────────── */

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-20);
  min-height: 6.25rem;                    /* design: 100px */
  padding-block: var(--sp-20);
}
.topbar__logo { display: block; flex: none; }
.topbar__logo img { width: 14.5rem; height: auto; }   /* design: 232px */
.topbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-20) var(--sp-35);
}

/* ── 8. Header: navigation bar ──────────────────────────────────────────── */

.navbar { background: var(--clr-red); }
.navbar__inner {
  display: flex;
  align-items: stretch;                   /* menu items fill the bar's full height */
  justify-content: space-between;
  gap: var(--sp-20);
  min-height: 5rem;                       /* design: 80px */
}

.nav-toggle {
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  align-self: center;
  margin-left: -0.75rem;                  /* keeps the glyph on the design's x */
  padding: 0;
  background: none;
  border: 0;
}
.nav-toggle__bars {
  width: 1.75rem; height: 1.25rem;        /* design: 28×20 */
  background: url('../images/container-icon.svg') no-repeat center / contain;
}

.primary-nav { display: flex; }
.primary-nav > ul { display: flex; align-items: stretch; }
.primary-nav > ul > li { display: flex; }
/* Hover and active backgrounds run the full height of the 80px bar. */
.primary-nav a {
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 3rem;
  padding: var(--sp-10) var(--sp-25);     /* design: 25px inline */
  font-size: var(--fs-12);
  font-weight: 400;
  line-height: var(--lh-label);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--clr-white);                /* screenshot-verified (spec said #111111) */
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.primary-nav a:hover { background: rgba(0, 0, 0, 0.14); }
.primary-nav a.is-current {
  background: var(--clr-yellow);
  color: var(--clr-ink);
  font-weight: 700;
  padding-block: var(--sp-20);
}
.primary-nav a.is-current:hover { background: #E8BE04; }

/* ── 9. Off-canvas menu ─────────────────────────────────────────────────── */

.offcanvas { position: fixed; inset: 0; z-index: 90; }
.offcanvas[hidden] { display: none; }

.offcanvas__overlay {
  position: absolute; inset: 0;
  background: rgba(17, 17, 17, 0.6);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.offcanvas__panel {
  position: absolute;
  inset-block: 0; left: 0;
  width: min(22rem, 86vw);
  display: flex;
  flex-direction: column;
  gap: var(--sp-30);
  padding: var(--sp-30) var(--sp-30) var(--sp-40);
  background: var(--clr-ink);
  overflow-y: auto;
  overscroll-behavior: contain;
  translate: -100% 0;
  transition: translate var(--dur) var(--ease);
}
.offcanvas.is-open .offcanvas__overlay { opacity: 1; }
.offcanvas.is-open .offcanvas__panel { translate: 0 0; }

.offcanvas__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-20);
  padding-bottom: var(--sp-20);
  border-bottom: var(--hairline) solid var(--clr-border-dark);
}
.offcanvas__title {
  font-family: var(--ff-body);
  font-size: var(--fs-18);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--clr-red-on-dark);          /* AA */
}
.offcanvas__close {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  background: none;
  border: var(--hairline) solid var(--clr-border-dark);
}
.offcanvas__close-x { position: relative; width: 1rem; height: 1rem; }
.offcanvas__close-x::before,
.offcanvas__close-x::after {
  content: '';
  position: absolute;
  top: 50%; left: 0;
  width: 100%; height: 2px;
  background: var(--clr-white);
}
.offcanvas__close-x::before { rotate: 45deg; }
.offcanvas__close-x::after  { rotate: -45deg; }
.offcanvas__close:hover { background: rgba(255, 255, 255, 0.08); }

.offcanvas__nav ul { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.offcanvas__nav a {
  display: block;
  padding: 0.875rem 0;
  font-size: var(--fs-14);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--clr-white);
  border-bottom: var(--hairline) solid rgba(255, 255, 255, 0.12);
}
.offcanvas__nav a:hover { color: var(--clr-yellow); }
.offcanvas__nav a[aria-current='page'] { color: var(--clr-yellow); font-weight: 700; }

.offcanvas__foot { margin-top: auto; display: grid; gap: var(--sp-30); justify-items: start; }
.offcanvas__cta { width: 100%; }

/* ── 9b. Newsletter popup ───────────────────────────────────────────────────
   Opened by the header Subscribe button. The dialog reuses .panel, so the
   heading and the Gravity Forms output look exactly like the sidebar widget.
   Sits above the off-canvas menu (90) so it can open from inside it.        */

.newsletter-modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--sp-20);
}
.newsletter-modal[hidden] { display: none; }

.newsletter-modal__overlay {
  position: absolute; inset: 0;
  background: rgba(17, 17, 17, 0.6);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.newsletter-modal__dialog {
  position: relative;
  width: min(32rem, 100%);
  max-height: calc(100dvh - 2 * var(--sp-20));
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  scale: 0.96;
  transition: opacity var(--dur) var(--ease), scale var(--dur) var(--ease);
}
/* .panel is declared later at equal specificity; this keeps room for the X. */
.newsletter-modal__dialog.panel { padding-top: calc(var(--panel-pad) + var(--sp-20)); }
.newsletter-modal__dialog:focus { outline: none; }
.newsletter-modal.is-open .newsletter-modal__overlay { opacity: 1; }
.newsletter-modal.is-open .newsletter-modal__dialog { opacity: 1; scale: 1; }

.newsletter-modal__title.panel__title { max-width: none; }   /* the X sits in the top padding, above it */
/* The sidebar design breaks after "Subscribe"; the popup keeps the heading on
   one line and lets it wrap naturally when the dialog is too narrow. The extra
   class beats .panel__title, which is declared later at equal specificity. */
.newsletter-modal__title.panel__title > span { display: inline; }
.newsletter-modal__form { width: 100%; }
/* Popup only: a gap between the email field and the button. The sidebar keeps
   them flush (wp.css, .subscribe--gf .gform_wrapper .gform_footer { margin: 0 }),
   so this needs one more class of specificity to win. */
.newsletter-modal .subscribe--gf .gform_wrapper .gform_footer { margin-top: var(--sp-20); }

.newsletter-modal__close {
  position: absolute;
  top: var(--sp-10); right: var(--sp-10);
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;          /* 44px target */
  background: none;
  border: var(--hairline) solid transparent;
  cursor: pointer;
}
.newsletter-modal__close:hover { border-color: var(--clr-ink); }
.newsletter-modal__close-x { position: relative; width: 1rem; height: 1rem; }
.newsletter-modal__close-x::before,
.newsletter-modal__close-x::after {
  content: '';
  position: absolute;
  top: 50%; left: 0;
  width: 100%; height: 2px;
  background: var(--clr-ink);
}
.newsletter-modal__close-x::before { rotate: 45deg; }
.newsletter-modal__close-x::after  { rotate: -45deg; }

/* ── 10. Hero ───────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46.8125rem;                 /* design: 749px */
  padding-block: var(--sp-60);
  background: var(--clr-ink);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('../images/hero-section.webp') no-repeat right center / auto 100%;
  opacity: 0.1;                           /* measured: rendered max 40 on bg 17 */
}
.hero__inner { width: min(100% - (var(--gutter) * 2), var(--container)); }
.hero__article { display: grid; justify-items: start; gap: var(--sp-20); }
.hero__title {
  max-width: 44.25rem;                    /* design: 708px */
  font-size: var(--fs-44);
  font-weight: 700;
  line-height: var(--lh-title);
  color: var(--clr-text-invert);
}
.hero__title a { color: inherit; text-decoration: none; }
.hero__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.hero__article .meta { margin-top: 0.0625rem; }
.hero__excerpt {
  max-width: 43.25rem;                    /* design: 692px */
  margin-top: var(--sp-10);
  color: var(--clr-text-invert);          /* screenshot-verified (spec said #111111) */
}
.hero__article > .btn { margin-top: var(--sp-10); }

/* ── 11. Page shell & search ────────────────────────────────────────────── */

.page-layout {
  display: grid;
  gap: var(--sp-70);                      /* design: 70px hero→search→content */
  padding-block: var(--sp-70) var(--sp-100);
}

.searchbar {
  display: flex;
  align-items: stretch;
  min-height: 5.4375rem;                  /* design: 87px */
  background: var(--clr-white);
  border: var(--hairline) solid var(--clr-field-border);   /* WCAG 1.4.11 */
  /* A white control: keep an ink ring even inside dark bands (404, hero). */
  --clr-focus: var(--clr-ink);
  --clr-focus-halo: var(--clr-white);
}
.searchbar__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--sp-20) var(--sp-30);
  border: 0;
  background: transparent;
  font-size: var(--fs-18);
  line-height: var(--lh-body);
  color: var(--clr-text);
  -webkit-appearance: none;
  appearance: none;
}
.searchbar__input::placeholder { color: var(--clr-muted); opacity: 1; }  /* AA: design #ABABAB */
.searchbar__input:focus-visible { outline-offset: -3px; }
.searchbar__submit { flex: none; min-width: 10.75rem; }   /* design: 172px */

/* ── 12. Two-column layout + sticky sidebar ─────────────────────────────── */

.layout {
  display: grid;
  gap: var(--col-gap);
  grid-template-columns: 940fr 466fr;      /* design: 940 / 34 / 466 within 1440 */
  align-items: start;
}
.layout__main { min-width: 0; display: grid; gap: var(--sp-64); }   /* design: 64px */
.layout__side { min-width: 0; align-self: stretch; }

.sidebar {
  position: sticky;
  /* A sidebar taller than the viewport cannot simply stick to the top — it
     would pin with its lower half permanently out of reach. main.js measures
     it and, when it is the taller one, sets --sidebar-top to a negative
     offset so the column scrolls with the page until its bottom edge meets
     the viewport bottom, then pins there. Nothing is clipped and no nested
     scrollbar is introduced, so the layout still matches the design. */
  top: var(--sidebar-top, var(--sticky-top));
  display: grid;
  gap: var(--sp-50);                       /* design: 50px */
}

.block { display: grid; gap: var(--sp-34); }   /* design: 34px head→content */

/* ── 13. Article cards ──────────────────────────────────────────────────── */

.cards { display: grid; gap: var(--sp-34); }   /* design: 34px */

.search-no-results .card{
  width: 100%;
}

.card {
  border: var(--hairline) solid var(--clr-border);
  background: var(--clr-white);
}
.card__head {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-30);
  padding: var(--card-pad-y) var(--card-pad-x);
  background: var(--clr-surface);
}
.card__icon { flex: none; background-repeat: no-repeat; background-position: left top; background-size: contain; }
.card__icon--scales { width: 4.1875rem; height: 4.9375rem; background-image: url('../images/heading-icon-2.svg'); }
.card__icon--doc    { width: 4.1875rem; height: 4.25rem;   background-image: url('../images/heading-icon-3.svg'); }
.card__icon--shield { width: 3.4375rem; height: 4.1875rem; background-image: url('../images/heading-icon-4.svg'); }
.card__title {
  font-family: var(--ff-display);
  font-size: var(--fs-36);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--clr-ink);
}
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

.card__body {
  display: grid;
  gap: var(--sp-30);
  justify-items: stretch;
  padding: var(--sp-40) var(--card-pad-x);
}
.card__body > .btn { justify-self: start; }
.card__excerpt { color: var(--clr-ink); }

.loadmore { display: flex; justify-content: center; }
.loadmore .btn { min-width: 10.5rem; }    /* design: 168px */

/* ── 14. Browse by topic ────────────────────────────────────────────────── */

.topics {
  display: grid;
  /* 13.5rem is the design's own tile width (216px). Flooring there means a
     tile never gets less label room than the design gives it, and at the
     940px main column it resolves to exactly 4 columns of 216.25px as drawn.
     It steps down to 3, 2 and 1 by itself as the column narrows. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13.5rem), 1fr));
  gap: var(--sp-25);                       /* design: 25px */
}
.topic {
  display: flex;
  align-items: center;
  gap: var(--sp-15);                       /* design: 15px */
  height: 100%;
  min-height: 5rem;                        /* measured: 80px */
  padding: 0.9375rem 1.25rem;              /* measured: 15px 20px */
  background: var(--clr-white);
  border: var(--hairline) solid var(--clr-border);
  text-decoration: none;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.topic:hover { border-color: var(--clr-red); background: var(--clr-surface); }
.topic__icon { flex: none; background-repeat: no-repeat; background-position: center; background-size: contain; }
.topic__label {
  font-family: var(--ff-display);
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: 1.3889;                     /* measured: 18px → 25px */
  color: var(--clr-black);
  /* Three of the eight labels are a few px wider than the room the 216px tile
     leaves them ("Administrative" needs 129 in 123). Figma lets them overflow
     the label frame rather than wrap, and the tile's 20px padding absorbs it,
     so the same is done here — otherwise each of those tiles gains a third
     line and grows from the measured 80px to 107px. */
  white-space: nowrap;
  min-width: 0;
}
/* Every topic label breaks before its final word in the design. */
.topic__label > span { display: block; }
.topic__icon--constitutional { width: 2.0625rem; height: 1.875rem;  background-image: url('../images/homepage-icon.svg'); }
.topic__icon--energy         { width: 1.25rem;   height: 2.125rem;  background-image: url('../images/14-power.svg'); }
.topic__icon--environment    { width: 1.8125rem; height: 1.9375rem; background-image: url('../images/homepage-icon-2.svg'); }
.topic__icon--administrative { width: 2.375rem;  height: 2.375rem;  background-image: url('../images/homepage-icon-3.svg'); }
.topic__icon--indigenous     { width: 1.6875rem; height: 2.4375rem; background-image: url('../images/homepage-icon-4.svg'); }
.topic__icon--criminal       { width: 2.75rem;   height: 1.9375rem; background-image: url('../images/homepage-icon-5.svg'); }
.topic__icon--human-rights   { width: 1.8125rem; height: 2.4375rem; background-image: url('../images/homepage-icon-6.svg'); }
.topic__icon--privacy        { width: 2.375rem;  height: 2.3125rem; background-image: url('../images/homepage-icon-7.svg'); }

/* ── 15. About ──────────────────────────────────────────────────────────── */

.about { display: grid; gap: var(--sp-30); }
.about__lede {
  display: grid;
  /* Design: 459 / 30 / 450 within the 940px main column. Expressed as an
     auto-fit floor so the pair collapses to one column when the main column
     is too narrow for two, whatever the viewport is doing. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: var(--sp-30);
  align-items: start;
}
.about__text { display: grid; gap: var(--sp-20); }
.about__image { width: 100%; height: auto; aspect-ratio: 450 / 300; object-fit: cover; }
.about__legal { display: grid; gap: var(--sp-20); }

/* ── 16. Sidebar: feeds & panels ────────────────────────────────────────── */

.feed { display: grid; gap: var(--sp-20); justify-items: stretch; }
.feed > .link-arrow { justify-self: start; }
.feed__list { display: grid; }
.feed-post {
  display: grid;
  gap: var(--sp-20);
  padding-block: var(--sp-10) var(--sp-30);   /* design: 10px / 30px */
  border-bottom: var(--hairline) solid var(--clr-border);
}
.feed-post__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.375rem;
  font-family: var(--ff-display);
  font-size: var(--fs-18);
  font-weight: 400;
  line-height: var(--lh-tight);
  color: var(--clr-ink);
}
.feed-post__author { font-weight: 700; }
.feed-post__author--bsky { color: var(--clr-bsky); font-weight: 400; }   /* AA: design #03A9F4 */
.feed-post__time { margin-left: auto; color: var(--clr-muted); }         /* AA: design #ABABAB */
.feed-post__text {
  font-family: var(--ff-display);
  font-size: var(--fs-18);
  font-weight: 400;
  line-height: 1.35;
}
.feed-post__text a { color: var(--clr-ink); text-decoration: none; }
.feed-post__text a:hover { color: var(--clr-red); text-decoration: underline; }

.panel {
  display: grid;
  gap: var(--sp-30);
  justify-items: start;
  padding: var(--panel-pad);
  background: var(--clr-surface);
}
.panel__stack { display: grid; gap: var(--sp-10); }
.panel__text { color: var(--clr-ink); }
.panel__title {
  max-width: 18rem;
  font-family: var(--ff-display);
  font-size: var(--fs-30);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--clr-ink);
}
/* The design breaks this heading after "Subscribe". */
.panel__title > span { display: block; }

.podcast__head { display: flex; align-items: center; gap: var(--sp-10); flex-wrap: wrap; font: inherit; }
.podcast__icon {
  flex: none;
  width: 1.5rem; height: 2.375rem;         /* design: 24×38 */
  background: url('../images/ads-section-icon.svg') no-repeat center / contain;
}
.podcast__title {
  font-family: var(--ff-display);
  font-size: var(--fs-26);
  font-weight: 800;
  line-height: var(--lh-tight);
  color: var(--clr-red);
}

.subscribe { display: grid; width: 100%; }
.subscribe__input {
  padding: var(--sp-20) 1.4375rem;         /* design: 20px 23px */
  border: 0;
  background: var(--clr-white);
  font-size: var(--fs-14);
  color: var(--clr-text);
}
.subscribe__input::placeholder { color: var(--clr-muted); opacity: 1; }
.subscribe__submit { width: 100%; }

/* ── 17. Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  position: relative;
  padding-block: var(--sp-60);
  background: var(--clr-ink);
  color: var(--clr-text-invert);
  overflow: hidden;
  isolation: isolate;
}
/* Two barely-there crest watermarks (measured at ~2–4% effective opacity). */
.site-footer__crest {
  position: absolute;
  z-index: -1;
  background: url('../images/image-11.webp') no-repeat center / contain;
  pointer-events: none;
}
.site-footer__crest--left  { top: -6%;  left: -9rem;  width: 22rem; height: 120%; opacity: 0.022; }
.site-footer__crest--right { bottom: 0; right: -6rem; width: 34rem; height: 66%;  opacity: 0.035; }

.site-footer__inner { display: grid; gap: var(--sp-30); }

.footer-grid {
  display: grid;
  grid-template-columns: 404fr 186fr 186fr 373fr;   /* design columns within 1440 */
  gap: var(--sp-97);                                /* design: 97px */
  padding-bottom: var(--sp-60);
}

.footer-brand { display: grid; gap: var(--sp-30); justify-items: start; }
.footer-brand__logo { width: 14.875rem; height: auto; }   /* design: 238px */
.footer-brand__text { color: var(--clr-text-invert); }

.awards { display: flex; flex-wrap: wrap; gap: var(--sp-10); }
.awards img { width: 6.6875rem; height: auto; }           /* design: 107px */

.footer-col { display: grid; gap: var(--sp-30); align-content: start; }
.footer-links { display: grid; gap: var(--sp-35); }        /* design: 35px */
.footer-links a {
  font-family: var(--ff-display);
  font-size: var(--fs-14);
  font-weight: 400;
  line-height: var(--lh-label);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--clr-text-invert);
  display: inline-block;
  min-height: 1.5rem;                                     /* WCAG 2.5.8 */
}
.footer-links a:hover { color: var(--clr-yellow); text-decoration: underline; }

.popular { display: grid; gap: var(--sp-20); }
.popular__item { display: grid; gap: var(--sp-10); justify-items: start; }
.popular__title {
  font-family: var(--ff-display);
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: var(--lh-tight);
}
/* WCAG 1.4.10/1.4.12: titles wrap, never clipped to one line. */
.popular__title a { color: var(--clr-text-invert); text-decoration: none; display: block; }
.popular__title a:hover { color: var(--clr-yellow); text-decoration: underline; }
.popular__date {
  display: flex;
  align-items: center;
  gap: var(--sp-10);
  font-size: var(--fs-12);
  line-height: var(--lh-label);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #C9C9C9;
}
.popular__icon {
  flex: none;
  width: 1rem; height: 1rem;
  background: url('../images/may-14-2026-button-icon.svg') no-repeat center / contain;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-20);
  padding-top: var(--sp-30);
  border-top: var(--hairline) solid var(--clr-border-dark);
}
.footer-bottom__copy {
  font-family: var(--ff-display);
  font-size: var(--fs-14);
  color: var(--clr-text-invert);
}
.footer-bottom__mark { width: 8.5625rem; height: auto; }   /* design: 137px */

/* ── 18. Scrollbars ─────────────────────────────────────────────────────── */

/* Two mechanisms, and the order matters. Chrome 121+ IGNORES the
   ::-webkit-scrollbar pseudo-elements on any scroller that also sets
   scrollbar-color or scrollbar-width — so declaring the standard properties
   globally would silently throw away the track hairline and the hover and
   active states in the majority browser. Feature-detecting the pseudo-element
   hands Chrome and Safari the detailed version and Firefox, which has no
   pseudo-element, the two-colour one. */

@supports not selector(::-webkit-scrollbar) {
  html {
    scrollbar-width: thin;                               /* ~8px, matches --sb-size */
    scrollbar-color: var(--sb-thumb) var(--sb-track);
  }
  .offcanvas__panel {
    scrollbar-color: var(--clr-red-on-dark) rgba(255, 255, 255, 0.08);
  }
}

::-webkit-scrollbar {
  width: var(--sb-size);
  height: var(--sb-size);
}
::-webkit-scrollbar-track {
  background: var(--sb-track);
  /* Echoes the 1px #DDDDDD edge on the cards, search bar and topic tiles. */
  border-left: var(--hairline) solid var(--sb-track-edge);
}
::-webkit-scrollbar-track:horizontal {
  border-left: 0;
  border-top: var(--hairline) solid var(--sb-track-edge);
}
::-webkit-scrollbar-thumb {
  background: var(--sb-thumb);
  border-radius: var(--radius);                           /* 0 — square, like everything else */
}
::-webkit-scrollbar-thumb:hover  { background: var(--sb-thumb-hover); }
::-webkit-scrollbar-thumb:active { background: var(--sb-thumb-active); }
::-webkit-scrollbar-corner       { background: var(--sb-track); }
/* The stepper arrows are chrome the flat design has no vocabulary for. */
::-webkit-scrollbar-button       { display: none; }

/* Dark surface: the off-canvas panel scrolls on a short viewport, where a
   #F5F5F5 track would be a bright slab against the #111111 panel. */
.offcanvas__panel::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-left-color: var(--clr-border-dark);
}
.offcanvas__panel::-webkit-scrollbar-thumb {
  background: var(--clr-red-on-dark);                     /* 3.84:1 on the track */
}
.offcanvas__panel::-webkit-scrollbar-thumb:hover  { background: var(--clr-white); }
.offcanvas__panel::-webkit-scrollbar-thumb:active { background: var(--clr-yellow); }

/* ── 19. Responsive ─────────────────────────────────────────────────────── */

/* Laptop — the design's 1440 container stops being full-bleed; everything
   below is proportional, so only the widest columns need easing. */
@media (max-width: 1200px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-50) var(--sp-40); }
  .footer-brand { grid-column: 1 / -1; }
}

/* Tablet — single column, sidebar drops below, off-canvas takes over nav. */
@media (max-width: 1023px) {
  .primary-nav { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: var(--sp-64); }
  .sidebar {
    position: static;
    top: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .panel, .feed { min-width: 0; }
  .hero { min-height: 0; }
}

/* Tablet portrait */
@media (max-width: 860px) {
  .sidebar { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 767px) {
  .topbar__inner { flex-wrap: wrap; row-gap: var(--sp-20); justify-content: center;}
  .card__head { flex-direction: column; gap: var(--sp-20); }
  .topbar__actions { width: 100%; justify-content: center; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-40); }
  .searchbar { flex-wrap: wrap; min-height: 0; }
  .searchbar__input { flex-basis: 100%; }
  .searchbar__submit { width: 100%; }
  .site-footer__crest--left{display:none;}
}

/* Mobile */
@media (max-width: 520px) {
  .meta { gap: var(--sp-10) var(--sp-20); }
  .about__image { aspect-ratio: 16 / 9; }
  .awards img { width: 5.5rem; }
  .footer-bottom { justify-content: flex-start; }
  .topbar__logo img { width: 11.5rem; }
  /* Once the CTA has wrapped onto its own row, full width reads as intended
     rather than as an orphan. */
  .topbar__cta { flex: 1 1 100%; }
}

/* ── 20. Motion & print ─────────────────────────────────────────────────── */

@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;
    scroll-behavior: auto !important;
  }
  .offcanvas__panel { transition: none; }
  .newsletter-modal__dialog { transition: none; scale: 1; }
}

@media (forced-colors: active) {
  /* A forced palette must win over the brand colours, whichever of the two
     mechanisms the browser ended up using. */
  html, .offcanvas__panel { scrollbar-color: auto; }
  ::-webkit-scrollbar-track { background: Canvas; border-color: CanvasText; }
  ::-webkit-scrollbar-thumb { background: CanvasText; }
  .card, .topic, .searchbar, .panel { border: 1px solid CanvasText; }
  .section-head { border-bottom: 1px solid CanvasText; }
  :focus-visible { outline: 3px solid Highlight; }
}

@media print {
  .site-header, .offcanvas, .newsletter-modal, .searchbar, .loadmore, .site-footer__crest { display: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; top: auto; }
  body { color: #000; background: #fff; }
}

/* ==========================================================================
   21. Inner pages — Article, Archive & Category (both states), Author
   Added for the four inner pages. Everything above this line is the approved
   homepage and is left untouched; nothing below changes a homepage selector.
   Sources: figma-export/pages/{article-page,archive-and-category-page,
   archive-and-category-page-1,author-page}/figma/. Same rules as above —
   design values measured from section-specs.json, screenshots win on
   disagreement, and any value that failed WCAG 2.2 AA is shifted by the
   smallest amount that passes and flagged "AA:".
   ========================================================================== */

/* ── 21.1 Inner page shell ──────────────────────────────────────────────
   The homepage wraps its columns in `.page-layout` (a 70px-gapped grid with its own
   block padding). The inner pages have no hero and no search band: their
   content starts 50px under the nav and ends 50px above the footer, which is
   what the export's section padding says. */

.page-layout--inner {
  gap: 0;
  padding-block: var(--sp-50);
}

/* The author page's banner sits above the two-column layout, 48px clear of
   it (export: Frame 3 paddingTop 48px). The archive pages use the same gap
   below the categories control. */
.page-layout--inner > * + * { margin-top: var(--sp-48); }

/* ── 21.2 Page banner (author page) ─────────────────────────────────────
   Full container width, black, with the same 12px red corner bracket the
   section headings use. The export types the body copy #111111 on #000000 —
   unreadable, and the screenshot shows white, so the screenshot wins (this
   is the same spec/screenshot disagreement the homepage hero had). */

.pagehead {
  position: relative;
  display: grid;
  gap: var(--sp-10);
  padding: 0.625rem 0.625rem 1.25rem;    /* design: 10px 10px 20px */
  background: var(--clr-black);
  color: var(--clr-text-invert);
  /* Dark surface: flip the focus pair, same mechanism as .hero / .site-footer. */
  --clr-focus: var(--clr-white);
  --clr-focus-halo: var(--clr-ink);
}
.pagehead::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0.75rem; height: 0.75rem;
  background: url('../images/heading-icon.svg') no-repeat left top / contain;
}
.pagehead__title {
  font-family: var(--ff-body);
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: var(--lh-tight);
  text-transform: uppercase;
  color: var(--clr-text-invert);
}
.pagehead__text { color: var(--clr-text-invert); }
.pagehead__text a { color: var(--clr-text-invert); text-decoration: underline; }
.pagehead__text a:hover { text-decoration-thickness: 2px; }

/* ── 21.3 Sidebar heading block ─────────────────────────────────────────
   The inner-page sidebar starts each widget with the bracket but no rule
   under it, unlike `.section-head`. Content is inset 10px from the left and
   runs to the sidebar's right edge (export: Heading padding 20px 10px 0,
   control widthMode fixed 458 inside a 468 column). */

.side-head {
  position: relative;
  display: grid;
  /* minmax(0,…) rather than the implicit `auto`: the search bar's 152px
     submit and the <select>'s longest option would otherwise set a
     min-content floor the column cannot narrow past. */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-10);
  padding: var(--sp-20) 0 0 0.625rem;
}
.side-head::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0.75rem; height: 0.75rem;
  background: url('../images/heading-icon.svg') no-repeat left top / contain;
}

/* ── 21.4 Sidebar search ────────────────────────────────────────────────
   The homepage `.searchbar` with the inner pages' measurements: 60px tall
   instead of 87, 30px inline padding, 152px submit instead of 172. */

.searchbar--side { min-height: 3.75rem; min-width: 0; }
.searchbar--side .searchbar__input { padding: var(--sp-10) var(--sp-30); }
.searchbar--side .searchbar__submit { min-width: 9.5rem; }   /* design: 152px */

/* ── 21.5 Select (Categories) ───────────────────────────────────────────
   A real <select>: it is keyboard- and AT-native, needs no script, and
   renders the design's closed state exactly. The arrow is the export's own
   15×9 red chevron. */

.select { position: relative; display: block; }
.select__input {
  width: 100%;
  min-height: 3.75rem;                    /* design: 60px */
  padding: 0.75rem 2.75rem 0.75rem 1rem;  /* design: 12px 16px + room for the caret */
  background: var(--clr-white);
  border: var(--hairline) solid var(--clr-field-border);   /* WCAG 1.4.11 */
  border-radius: var(--radius);
  font-family: var(--ff-display);
  font-size: var(--fs-14);
  line-height: var(--lh-label);
  color: var(--clr-muted);                /* AA: design #ABABAB (2.30:1) */
  -webkit-appearance: none;
  appearance: none;
}
.select__input:hover { border-color: var(--clr-ink); }
/* The Go button sits under the field (WCAG 3.2.2). */
.select { display: grid; gap: var(--sp-10); }
.select__go { width: 100%; }
.select::after {
  content: '';
  position: absolute;
  top: 1.875rem; right: 1rem;             /* mid-field: field is 3.75rem */
  translate: 0 -50%;
  width: 0.9375rem; height: 0.5rem;       /* design: 15×9 */
  background: url('../images/arrow-1-stroke-5.svg') no-repeat center / contain;
  pointer-events: none;
}
/* Forced-colors mode paints over the background image, so fall back to the
   system caret rather than showing an empty box. */
@media (forced-colors: active) {
  .select__input { -webkit-appearance: menulist; appearance: menulist; padding-right: 1rem; }
  .select::after { display: none; }
}

/* ── 21.6 Post card, inner-page variant ─────────────────────────────────
   Same `.card` as the homepage. Three differences the design draws:
   the head has no icon and 50px (not 60px) of vertical padding, it carries a
   1px rule under it, and the 36px title sets on 49px rather than 43. */

.card__head--plain {
  display: block;
  padding: var(--sp-50) var(--card-pad-x);
  border-bottom: var(--hairline) solid var(--clr-border);
}
.card__head--plain .card__title { line-height: 1.3611; }   /* design: 36px → 49px */

/* The article page's single card carries the red bracket on its own corner,
   sitting on the border rather than inside it. The list cards do not. */
.card--article { position: relative; }
.card--article::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 0.75rem; height: 0.75rem;
  background: url('../images/heading-icon.svg') no-repeat left top / contain;
}

/* Meta row: on the inner pages every item is a link and the whole row is
   brand red (#D42F48 on white is 4.88:1 — passes AA at this 12px size).
   The icons are already red in the export, so only the text changes. */
.meta--link { color: var(--clr-link); }
.meta--link a { color: inherit; text-decoration: underline; }
.meta--link a:hover { text-decoration-thickness: 2px; }

/* "Case Commented On: …", "PDF Version: …" */
.card__note { color: var(--clr-ink); }
.card__note a { color: var(--clr-link); text-decoration: underline; }
.card__note a:hover { text-decoration-thickness: 2px; }

/* ── 21.7 Post list ─────────────────────────────────────────────────────
   Export: Frame 15 gap 34 between cards, Frame 14 gap 44 to Load more. */

.postlist { display: grid; gap: var(--sp-44); justify-items: center; }
.postlist > .cards { width: 100%; }

/* ── 21.8 Long-form article body ────────────────────────────────────────
   The export's own rhythm: 30px between blocks (heading, paragraph run,
   grey aside) and one blank line — 1.5em, i.e. 27px at the 18px body size —
   between the paragraphs inside a run. */

.prose { display: grid; gap: var(--sp-30); }
.prose__run { display: grid; gap: 1.5em; }
.prose__run p { color: var(--clr-ink); }
.prose a { color: var(--clr-link); text-decoration: underline; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose__title {
  font-family: var(--ff-display);
  font-size: var(--fs-20);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--clr-ink);
}
.prose__aside {
  display: grid;
  gap: var(--sp-30);
  padding: var(--sp-50);                   /* design: 50px */
  background: var(--clr-surface);
}
/* AA: the brand red is 4.88:1 on white but only 4.48:1 on the aside's
   #F5F5F5 — the same shortfall the homepage fixed on its pink pill. */
.prose__aside a { color: var(--clr-red-deep); }   /* 5.50:1 */

/* Citation / subscribe note under the article. */
.cite { display: grid; gap: 1.5em; }
.cite a { color: var(--clr-link); text-decoration: underline; }

/* ── 21.9 Categories dropdown (archive & category pages) ────────────────
   Closed: an 87px bar showing the active category. Open: a bordered white
   panel of four columns that OVERLAYS the bar and the content beneath it,
   exactly as the "Archive and Category page" frame draws it — the page does
   not reflow when it opens. */

.catbox { position: relative; }

.catbox__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-20);
  width: 100%;
  min-height: 5.4375rem;                   /* design: 87px */
  padding: var(--sp-20) var(--sp-30);
  background: var(--clr-white);
  border: var(--hairline) solid var(--clr-border);
  border-radius: var(--radius);
  font-family: var(--ff-display);
  font-size: var(--fs-18);
  font-weight: 700;
  line-height: var(--lh-tight);
  text-align: left;
  color: var(--clr-ink);
  transition: border-color var(--dur) var(--ease);
}
.catbox__trigger:hover { border-color: var(--clr-muted); }
.catbox__caret {
  flex: none;
  width: 1.4375rem; height: 0.8125rem;     /* design: 23×13 */
  background: url('../images/arrow-1-stroke-6.svg') no-repeat center / contain;
  transition: rotate var(--dur) var(--ease);
}
.catbox__trigger[aria-expanded='true'] .catbox__caret { rotate: 180deg; }

.catbox__panel {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: grid;
  /* 313px is the design's own column width; flooring there keeps four
     columns at the 1440 container and steps down to 3, 2 and 1 by itself. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19.5rem), 1fr));
  gap: var(--sp-30);
  padding: var(--sp-50);                   /* design: 50px */
  background: var(--clr-white);
  border: var(--hairline) solid var(--clr-border);
  border-radius: var(--radius);
}
.catbox__panel[hidden] { display: none; }

.catcol { display: grid; align-content: start; }
.catcol a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-20);
  padding: 0.625rem 0;                     /* design: 10px block */
  border-bottom: var(--hairline) solid var(--clr-border);
  font-size: var(--fs-18);
  line-height: var(--lh-body);
  color: var(--clr-ink);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.catcol a:hover { color: var(--clr-red); text-decoration: underline; }
/* The first row in every column has no top padding and 20px under it. */
.catcol li:first-child a { padding-top: 0; padding-bottom: 1.25rem; }
.catcol a[aria-current='page'] {
  font-family: var(--ff-display);
  font-weight: 700;
  line-height: 1.3889;                     /* design: 18px → 25px */
}
/* The check is redundant with aria-current and with the bold weight, so it
   is decorative — never the only signal. */
.catcol__check {
  flex: none;
  width: 1.375rem; height: 1.375rem;       /* design: 22×22 */
  background: url('../images/archive-and-category-page-icon.svg') no-repeat center / contain;
}

/* ── 21.10 Inner-page responsive ────────────────────────────────────────
   These sit after §19 deliberately, so they layer on top of the homepage's
   breakpoints rather than fighting them. */

/* Below the 4-column point the panel can grow taller than the document, so
   it gets its own scroll rather than becoming unreachable. The 1440 design
   needs none — its page is longer than the panel. */
@media (max-width: 1200px) {
  .catbox__panel {
    max-height: min(70vh, 34rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Between 1024 and the design width the sidebar column is narrower than the
   468px it was drawn at, and a 152px submit leaves the search field too
   short to show its placeholder. The button gives the width back. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .searchbar--side .searchbar__submit { min-width: 6.5rem; }
}

@media (max-width: 1023px) {
  /* The sidebar is already two-up from §19; its search and select widgets
     need to fill their cells rather than keep the 458px design width. */
  .side-head { padding-right: 0.625rem; }
}

@media (max-width: 767px) {
  .searchbar--side { min-height: 0; }
  .searchbar--side .searchbar__submit { width: 100%; }
  .card__head--plain { padding: var(--sp-30) var(--card-pad-x); }
  .prose__aside { padding: var(--sp-30); }
  .catbox__trigger { min-height: 4rem; padding: var(--sp-20); }
}

/* A section heading with the bracket and the title but no rule under it —
   the inner pages' "CATEGORIES" label. */
.section-head--bare { border-bottom: 0; }

/* The author page leaves 100px between its last card and the footer
   (export: Frame 3 paddingBottom 50 inside Frame 31 paddingBottom 50). */
.page-layout--author { padding-bottom: var(--sp-100); }

/* ── 21.11 Intrinsic-width guards ───────────────────────────────────────
   Three places where content would otherwise set a floor under the grid
   track and push the page sideways on a narrow viewport. */

/* `fr` tracks take an automatic min-content minimum, so a sidebar widget
   that cannot shrink (a <select> whose longest option is 47 characters, a
   152px submit button) widens the whole two-column layout. Scoped to the
   inner pages so the approved homepage's own track sizing is untouched. */
@media (min-width: 1024px) {
  .page-layout--inner .layout { grid-template-columns: minmax(0, 940fr) minmax(0, 466fr); }
  /* Same story one level down: the sidebar's own auto track takes a
     min-content floor from the widgets inside it, so the column would not
     narrow with the layout between 1024 and 1440. The homepage releases
     these below 1024 only; the inner pages need them above it too, because
     their widgets (a 152px submit, a 47-character <select> option) are
     wider than the homepage's. */
  .page-layout--inner .sidebar { grid-template-columns: minmax(0, 1fr); }
  .page-layout--inner .sidebar > *,
  .page-layout--inner .panel__stack,
  .page-layout--inner .panel__title,
  .page-layout--inner .subscribe,
  .page-layout--inner .subscribe__input,
  .page-layout--inner .select__input { min-width: 0; }
}

/* A topic list is one wrapping run of text, not one flex item per link. */
.meta--link .meta__item { min-width: 0; }
.meta__topics { min-width: 0; }

/* Case citations and the PDF URL in the citation block are long unbroken
   runs; `anywhere` (not `break-word`) is what actually lowers min-content. */
.card__note,
.cite p { overflow-wrap: anywhere; }
.prose__run p,
.catcol a,
.catbox__trigger { overflow-wrap: break-word; }

/* ==========================================================================
   22. Select2 — sidebar category picker (article + author pages)

   The vendor sheet loads before this one, so these rules simply out-cascade
   it and no `!important` is needed — but the specificity has to MATCH the
   vendor's, which mostly writes `.select2-container--default X Y` (0,3,0).
   Every rule is therefore anchored on the two classes main.js passes as
   selectionCssClass / dropdownCssClass, so the skin cannot leak onto any
   other Select2 added later.

   4.1.0-rc.0 note: `selectionCssClass` lands on .select2-selection itself
   (the old `containerCssClass` is gone), so the hook is a compound selector
   on the selection rather than an ancestor.

   Target: the control the design draws — 60px tall, white, one #DDDDDD
   hairline, square, 14px Manrope, with the export's own red chevron.
   ========================================================================== */

/* The native chevron on .select would sit on top of Select2's own. */
.select:has(.select2-container)::after { display: none; }

/* ── 22.1 Closed control ────────────────────────────────────────────────── */

.select2-container .select2-selection--single.ablawg-select2 {
  position: relative;                      /* anchor for the chevron */
  display: flex;
  align-items: center;
  height: 3.75rem;                         /* design: 60px, as the <select> */
  padding: 0.75rem 2.75rem 0.75rem 1rem;   /* design: 12px / 16px + caret room */
  background: var(--clr-white);
  border: var(--hairline) solid var(--clr-field-border);   /* WCAG 1.4.11 */
  border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease);
}
.select2-container .select2-selection--single.ablawg-select2:hover {
  border-color: var(--clr-ink);
}

.select2-container .select2-selection--single.ablawg-select2 .select2-selection__rendered {
  min-width: 0;                            /* let the ellipsis work in flex */
  padding: 0;
  font-family: var(--ff-display);
  font-size: var(--fs-14);
  line-height: var(--lh-label);
  color: var(--clr-text);
}
.select2-container .select2-selection--single.ablawg-select2 .select2-selection__placeholder {
  color: var(--clr-muted);                 /* AA: design #ABABAB (2.30:1) */
}

/* Select2 draws its arrow as a CSS triangle; swap in the export's chevron. */
.select2-container .select2-selection--single.ablawg-select2 .select2-selection__arrow {
  top: 50%;
  right: 1rem;
  left: auto;
  translate: 0 -50%;
  width: 0.9375rem; height: 0.5rem;        /* design: 15×8 */
  background: url('../images/arrow-1-stroke-5.svg') no-repeat center / contain;
  transition: rotate var(--dur) var(--ease);
}
.select2-container .select2-selection--single.ablawg-select2 .select2-selection__arrow b { display: none; }
.select2-container--open .select2-selection--single.ablawg-select2 .select2-selection__arrow { rotate: 180deg; }

/* Focus. The --default theme does not clear the outline (only --classic
   does), so the site's own inherited ring already lands here; it is restated
   on :focus as well because Select2 moves focus to this span programmatically
   when the list closes, which does not always satisfy :focus-visible. */
.select2-container .select2-selection--single.ablawg-select2:focus,
.select2-container .select2-selection--single.ablawg-select2:focus-visible {
  outline: 3px solid var(--clr-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--clr-focus-halo);
}
/* The control stays focused while the list is open, so the open state reads
   as active rather than as a plain resting field. */
.select2-container--open .select2-selection--single.ablawg-select2 { border-color: var(--clr-red); }

/* ── 22.2 Dropdown panel ────────────────────────────────────────────────── */

/* Select2 appends the panel to <body>, so it is scoped by dropdownCssClass
   rather than by a parent selector. */
.select2-dropdown.ablawg-select2-dropdown {
  background: var(--clr-white);
  border: var(--hairline) solid var(--clr-border);
  border-radius: var(--radius);
  /* The one shadow in the design system: without it the panel and the
     content behind it share a hairline and read as a single box. */
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.12);
}
/* The vendor drops the joining border so the panel reads as one piece with
   the control; keep that, but pull it back over the control's own hairline. */
.select2-container--open .select2-dropdown--below.ablawg-select2-dropdown { margin-top: -1px; }
.select2-container--open .select2-dropdown--above.ablawg-select2-dropdown { margin-bottom: -1px; }

/* Search field — 98 categories are the reason for the upgrade. */
.ablawg-select2-dropdown .select2-search--dropdown { padding: 0.625rem; }
.ablawg-select2-dropdown .select2-search--dropdown .select2-search__field {
  padding: 0.625rem 0.75rem;
  background: var(--clr-white);
  border: var(--hairline) solid var(--clr-border);
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-size: var(--fs-14);
  color: var(--clr-text);
}
.ablawg-select2-dropdown .select2-search--dropdown .select2-search__field::placeholder {
  color: var(--clr-muted); opacity: 1;
}
.ablawg-select2-dropdown .select2-search--dropdown .select2-search__field:focus-visible {
  outline-offset: -3px;
}

/* Vendor caps this with a child combinator, so match its specificity. */
.ablawg-select2-dropdown .select2-results > .select2-results__options { max-height: 17.5rem; }

.ablawg-select2-dropdown .select2-results__option {
  /* 0.6875rem block padding puts the row at ~45px — clear of WCAG 2.2
     SC 2.5.8's 24px target minimum, with room for a fingertip. */
  padding: 0.6875rem 1rem;
  border-bottom: var(--hairline) solid var(--clr-border);
  font-family: var(--ff-body);
  font-size: var(--fs-14);
  line-height: var(--lh-label);
  color: var(--clr-text);
}
.ablawg-select2-dropdown .select2-results__option:last-child { border-bottom: 0; }

/* Hover and keyboard highlight are one state in Select2. */
.ablawg-select2-dropdown .select2-results__option--highlighted.select2-results__option--selectable {
  background: var(--clr-red);              /* white on #D42F48 — 4.88:1 */
  color: var(--clr-text-invert);
}
/* Selected is never colour-alone: it is also the only bold row. */
.ablawg-select2-dropdown .select2-results__option--selected {
  background: var(--clr-surface);
  color: var(--clr-text);
  font-weight: 700;
}
.ablawg-select2-dropdown .select2-results__option--selected.select2-results__option--highlighted {
  background: var(--clr-red);
  color: var(--clr-text-invert);
}
.ablawg-select2-dropdown .select2-results__message {
  padding: 0.6875rem 1rem;
  font-family: var(--ff-body);
  font-size: var(--fs-14);
  color: var(--clr-muted);
}

/* ── 22.3 Responsive & motion ───────────────────────────────────────────── */

@media (max-width: 767px) {
  /* Thumb-sized rows and a shorter list, so the panel never fills the screen. */
  .ablawg-select2-dropdown .select2-results > .select2-results__options { max-height: 15rem; }
  .ablawg-select2-dropdown .select2-results__option { padding-block: 0.8125rem; }
}

@media (prefers-reduced-motion: reduce) {
  .select2-container .select2-selection--single.ablawg-select2 .select2-selection__arrow { transition: none; }
}

@media (forced-colors: active) {
  .select2-container .select2-selection--single.ablawg-select2,
  .select2-dropdown.ablawg-select2-dropdown { border: 1px solid CanvasText; }
  .ablawg-select2-dropdown .select2-results__option--highlighted.select2-results__option--selectable {
    background: Highlight; color: HighlightText;
  }
  /* The chevron is a background image, which forced-colors paints over, so
     hand the vendor's own triangle back. */
  .select2-container .select2-selection--single.ablawg-select2 .select2-selection__arrow { background: none; }
  .select2-container .select2-selection--single.ablawg-select2 .select2-selection__arrow b { display: block; }
}
