/* ==========================================================================
   GateCodeDesk design system
   Facility utilitarian: galvanized grey, corrugated door orange, security blue.
   Motifs: corrugated slats, unit grid map, padlock hardware, rivet lines.
   ========================================================================== */

:root {
  /* ---- brief palette */
  --bg: #F2F3F4;
  --surface: #FFFFFF;
  --ink: #191C1E;
  --primary: #28506E;
  --accent: #E8720C;
  --muted: #646B70;

  /* ---- derived blues (security blue, galvanized shade) */
  --primary-900: #101F2C;
  --primary-800: #172F42;
  --primary-700: #1E3E56;
  --primary-600: #234764;
  --primary-400: #4A7396;
  --primary-200: #A9BFD2;
  --primary-100: #D9E3EC;
  --primary-050: #EDF2F6;

  /* ---- derived oranges (roll up door) */
  --accent-800: #8F4304;
  --accent-700: #B85706;
  --accent-600: #D2650A;
  --accent-300: #F2A45E;
  --accent-100: #FBE2C9;
  --accent-050: #FDF3E9;

  /* ---- galvanized greys */
  --steel-900: #2E3437;
  --steel-700: #4B5257;
  --steel-500: #7C8388;
  --steel-300: #B9BFC3;
  --steel-200: #D6DADD;
  --steel-100: #E6E9EB;
  --hairline: #D2D7DA;
  --ink-soft: #384146;

  /* ---- spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 44px;
  --s-8: 60px;
  --s-9: 84px;
  --s-10: 112px;

  /* ---- radii: hardware, not marshmallow */
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 8px;
  --r-4: 14px;
  --r-pill: 999px;

  /* ---- shadows */
  --shadow-hair: 0 1px 0 var(--hairline);
  --shadow-plate: 0 1px 2px rgba(25, 28, 30, .10), 0 10px 24px rgba(25, 28, 30, .07);
  --shadow-lift: 0 2px 4px rgba(25, 28, 30, .10), 0 22px 48px rgba(16, 31, 44, .16);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, .75);

  /* ---- type */
  --font-display: "Encode Sans", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Oxygen", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --fs-micro: 0.72rem;
  --fs-xs: 0.8rem;
  --fs-sm: 0.9rem;
  --fs-base: 1.02rem;
  --fs-md: 1.12rem;
  --fs-lg: 1.32rem;
  --fs-xl: clamp(1.45rem, 2.4vw, 1.8rem);
  --fs-2xl: clamp(1.75rem, 3.4vw, 2.5rem);
  --fs-3xl: clamp(2.1rem, 4.6vw, 3.15rem);
  --fs-hero: clamp(2.35rem, 5.2vw, 3.9rem);

  /* ---- layout */
  --wrap: 1180px;
  --wrap-narrow: 780px;
  --rail: clamp(16px, 4vw, 40px);

  /* ---- motion */
  --ease-door: cubic-bezier(.16, .84, .28, 1);
  --dur-1: .18s;
  --dur-2: .34s;
  --dur-3: .68s;
}

/* ==========================================================================
   1. Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  /* galvanized sheet: a faint vertical rib over a cool grey field */
  background-image:
    repeating-linear-gradient(90deg, rgba(25, 28, 30, .026) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #F6F7F8 0%, var(--bg) 320px);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.014em;
  margin: 0 0 var(--s-4);
  color: var(--ink);
}

h1 { font-size: var(--fs-hero); letter-spacing: -0.028em; }
h2 { font-size: var(--fs-2xl); letter-spacing: -0.02em; }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

p { margin: 0 0 var(--s-4); }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25rem; }
li { margin-bottom: var(--s-2); }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-700); }

strong { font-weight: 700; }
small { font-size: var(--fs-xs); }

hr {
  border: 0;
  height: 6px;
  margin: var(--s-7) 0;
  background-image: repeating-linear-gradient(90deg, var(--steel-200) 0 6px, transparent 6px 12px);
}

::selection { background: var(--accent-100); color: var(--ink); }

/* focus ring: a bolted, high visibility outline */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-1);
}
.skip-link:focus-visible,
.btn:focus-visible { outline-color: var(--primary-900); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -80px;
  z-index: 200;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--r-2);
  text-decoration: none;
  transition: top var(--dur-2) var(--ease-door);
}
.skip-link:focus { top: 14px; }

/* ==========================================================================
   2. Layout helpers
   ========================================================================== */

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--rail); }
.wrap-narrow { max-width: var(--wrap-narrow); }
.band { padding-block: clamp(56px, 8vw, 104px); position: relative; }
.band-surface { background: var(--surface); }
.band-tint { background: var(--primary-050); }
.band-deep { background: var(--primary-800); color: #EAF0F5; }
.band-deep h2, .band-deep h3 { color: #FFFFFF; }
.band-deep p { color: #C8D6E2; }

.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: var(--fs-md); margin-bottom: 0; }
.band-deep .section-head p { color: #BCCCDA; }

.lede { font-size: var(--fs-md); color: var(--ink-soft); }

/* eyebrow: a stencil style plate stamped on the section */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--primary-700);
  background: var(--primary-100);
  border-left: 4px solid var(--accent);
  padding: 6px 12px 6px 10px;
  border-radius: 0 var(--r-2) var(--r-2) 0;
  margin-bottom: var(--s-4);
}
.band-deep .eyebrow { background: rgba(255, 255, 255, .10); color: #F6D9BE; }
.eyebrow::before {
  content: "";
  width: 9px; height: 9px;
  border: 2px solid currentColor;
  border-radius: 1px;
  opacity: .8;
}

/* ==========================================================================
   3. Texture: corrugated rails, rivets, hatch
   ========================================================================== */

.corrugated {
  background-image: repeating-linear-gradient(
    90deg,
    var(--accent-600) 0 9px,
    var(--accent-800) 9px 11px,
    var(--accent-300) 11px 13px,
    var(--accent-600) 13px 14px
  );
}
.corrugated-steel {
  background-image: repeating-linear-gradient(
    90deg,
    var(--steel-200) 0 9px,
    var(--steel-300) 9px 11px,
    #FFFFFF 11px 13px,
    var(--steel-200) 13px 14px
  );
}
.rail-top { height: 7px; width: 100%; }
.rail-thin { height: 4px; }

.rivets {
  position: relative;
}
.rivets::before {
  content: "";
  position: absolute;
  inset-inline: 14px;
  top: 8px;
  height: 5px;
  background-image: radial-gradient(circle at 2.5px 2.5px, var(--steel-300) 0 2.2px, transparent 2.4px);
  background-size: 22px 5px;
  opacity: .9;
  pointer-events: none;
}

.hatch {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(40, 80, 110, .16) 0 3px,
    transparent 3px 8px
  );
}

/* ==========================================================================
   4. Buttons and pills
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 15px 24px;
  border-radius: var(--r-2);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease-door), background-color var(--dur-1), box-shadow var(--dur-1), color var(--dur-1);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #1A1207;
  border-color: var(--accent-800);
  box-shadow: 0 3px 0 var(--accent-800), 0 12px 22px rgba(184, 87, 6, .22);
}
.btn-primary:hover { background: var(--accent-600); color: #1A1207; box-shadow: 0 2px 0 var(--accent-800), 0 8px 16px rgba(184, 87, 6, .26); }

.btn-ghost {
  background: transparent;
  color: var(--primary-700);
  border-color: var(--primary-200);
}
.btn-ghost:hover { background: var(--primary-050); color: var(--primary-900); border-color: var(--primary-400); }

.btn-solid {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary-900);
  box-shadow: 0 3px 0 var(--primary-900);
}
.btn-solid:hover { background: var(--primary-700); color: #FFFFFF; }

.btn-quiet {
  background: rgba(255, 255, 255, .10);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, .38);
}
.btn-quiet:hover { background: rgba(255, 255, 255, .18); color: #FFFFFF; }

.btn-wide { width: 100%; }
.btn-sm { padding: 11px 16px; font-size: var(--fs-xs); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--steel-200);
  background: var(--surface);
  color: var(--primary-700);
}
.pill-live { border-color: #BFDCC6; background: #EEF7F0; color: #1F5B33; }
.pill-live::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2E8B4F;
  box-shadow: 0 0 0 3px rgba(46, 139, 79, .18);
}
.pill-accent { background: var(--accent-050); border-color: var(--accent-100); color: var(--accent-800); }

/* ==========================================================================
   5. Header and navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow var(--dur-2), background-color var(--dur-2);
}
.site-header .rail-top { display: block; }
.site-header.is-stuck {
  box-shadow: 0 10px 26px rgba(16, 31, 44, .12);
  background: rgba(255, 255, 255, .985);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  min-height: 70px;
  padding-block: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.16rem;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.brand-mark {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-2);
  background: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary-900), 0 2px 0 var(--primary-900);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-name .brand-half { color: var(--accent-700); }
.band-deep .brand, .site-footer .brand { color: #FFFFFF; }
.site-footer .brand-name .brand-half { color: var(--accent-300); }

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: var(--r-2);
  position: relative;
}
.nav-list a:hover { color: var(--primary-900); background: var(--primary-050); }
.nav-list a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-2) var(--ease-door);
}
.nav-list a:hover::after { transform: scaleX(1); }

.header-cta { margin-left: 6px; }

.nav-toggle {
  display: none;
  width: 46px; height: 42px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-2);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px; height: 2px;
  background: var(--ink);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ==========================================================================
   6. Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-block: clamp(40px, 6vw, 84px) clamp(48px, 7vw, 96px);
  overflow: hidden;
}
.hero::before {
  /* faint unit grid blueprint behind the whole hero */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(40, 80, 110, .07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(40, 80, 110, .07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 90% at 70% 0%, #000 20%, transparent 78%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero h1 { margin-bottom: var(--s-4); }
.hero h1 .hl {
  position: relative;
  white-space: nowrap;
  padding-inline: .08em;
  background-image: linear-gradient(180deg,
    transparent 0 58%,
    var(--accent-100) 58% 94%,
    var(--accent-300) 94% 100%);
}
.hero-sub { font-size: var(--fs-md); color: var(--ink-soft); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-6) 0 var(--s-5); }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--steel-200);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  overflow: hidden;
  margin-top: var(--s-5);
}
.trust-strip div {
  background: var(--surface);
  padding: 14px 16px;
}
.trust-strip dt, .trust-strip .t-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  color: var(--primary);
  line-height: 1.15;
}
.trust-strip dd, .trust-strip .t-lab {
  display: block;
  margin: 3px 0 0;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.4;
}

/* --- roll up door frame around the hero photograph */
.door-frame {
  position: relative;
  border: 3px solid var(--steel-300);
  border-radius: var(--r-3);
  background: var(--surface);
  padding: 10px;
  box-shadow: var(--shadow-lift);
}
.door-frame::before {
  content: "";
  position: absolute;
  top: -3px; left: -3px; right: -3px;
  height: 14px;
  border-radius: var(--r-3) var(--r-3) 0 0;
  background-image: repeating-linear-gradient(90deg, var(--steel-500) 0 10px, var(--steel-700) 10px 12px);
}
.door-frame::after {
  /* door handle plate at the bottom edge */
  content: "";
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px; height: 10px;
  border-radius: var(--r-pill);
  background: var(--steel-700);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .18);
}
.door-window {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-2);
  margin-top: 12px;
}
.door-window img { width: 100%; height: auto; }
.door-window::after {
  /* slat lines across the photograph, the roll up door read */
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(25, 28, 30, .13) 0 1px,
    rgba(255, 255, 255, .05) 1px 3px,
    transparent 3px 15px
  );
  pointer-events: none;
}

.gate-tag {
  position: absolute;
  left: 18px;
  bottom: 42px;
  z-index: 3;
  background: var(--primary-900);
  color: #FFFFFF;
  border-radius: var(--r-2);
  padding: 10px 14px;
  box-shadow: var(--shadow-lift);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  line-height: 1.3;
  border-left: 4px solid var(--accent);
}
.gate-tag b { display: block; font-size: 1.05rem; letter-spacing: .12em; }
.gate-tag span { color: #B9CCDA; }

/* ==========================================================================
   7. Unit grid map (core motif)
   ========================================================================== */

.unitmap-card {
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-plate);
  overflow: hidden;
}
.unitmap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 12px 16px;
  border-bottom: 1px solid var(--steel-200);
  background: linear-gradient(180deg, #FFFFFF, var(--steel-100));
}
.unitmap-head h2 {
  margin: 0;
  font-size: var(--fs-sm);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--primary-800);
}
.unitmap-head .count { font-family: var(--font-display); font-size: var(--fs-xs); color: var(--muted); }
.unitmap-body { padding: 16px; }

.unitmap {
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 4px;
}
.unitmap .row-label {
  grid-column: 1 / -1;
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--steel-500);
  margin-top: 6px;
}
.unit {
  aspect-ratio: 1 / 1.15;
  border-radius: 1px;
  border: 1px solid var(--steel-200);
  background: var(--steel-100);
  position: relative;
  transform-origin: top center;
}
.unit::after {
  /* every unit reads as a tiny roll up door */
  content: "";
  position: absolute;
  inset: 2px;
  background-image: repeating-linear-gradient(180deg, rgba(0, 0, 0, .12) 0 1px, transparent 1px 3px);
  opacity: .5;
}
.u-occ { background: var(--primary); border-color: var(--primary-900); }
.u-open { background: var(--surface); border: 1px dashed var(--steel-500); }
.u-open::after { opacity: .18; }
.u-late { background: var(--accent); border-color: var(--accent-800); }
.u-lock { background: var(--accent-800); border-color: #57280A; }
.u-res { background: var(--primary-200); border-color: var(--primary-400); }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.map-legend li { display: flex; align-items: center; gap: 7px; margin: 0; }
.map-legend i {
  width: 12px; height: 13px;
  border-radius: 1px;
  border: 1px solid var(--steel-300);
  display: inline-block;
}
.map-legend .k-occ { background: var(--primary); border-color: var(--primary-900); }
.map-legend .k-open { background: var(--surface); border-style: dashed; border-color: var(--steel-500); }
.map-legend .k-late { background: var(--accent); border-color: var(--accent-800); }
.map-legend .k-lock { background: var(--accent-800); }

/* ==========================================================================
   8. Problem cards
   ========================================================================== */

.problem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
}
.problem-card {
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-top: 5px solid var(--accent);
  border-radius: 0 0 var(--r-3) var(--r-3);
  padding: var(--s-5) var(--s-5) var(--s-4);
  box-shadow: var(--shadow-plate);
  position: relative;
}
.problem-card h3 { font-size: var(--fs-md); margin-bottom: 10px; }
.problem-card p { color: var(--ink-soft); font-size: var(--fs-sm); margin-bottom: var(--s-3); }
.cost-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-top: 1px dashed var(--steel-300);
  padding-top: 12px;
  font-family: var(--font-display);
}
.cost-line b { font-size: 1.2rem; color: var(--accent-800); }
.cost-line span { font-size: var(--fs-xs); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

/* ==========================================================================
   9. Steps
   ========================================================================== */

.steps-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  gap: clamp(28px, 5vw, 60px);
  align-items: start;
}
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.step {
  position: relative;
  padding: 0 0 var(--s-6) 74px;
  margin: 0;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: #FFFFFF;
  background: var(--primary);
  border: 2px solid var(--primary-900);
  border-radius: var(--r-2);
  box-shadow: 0 3px 0 var(--primary-900);
}
.step::after {
  content: "";
  position: absolute;
  left: 26px; top: 60px; bottom: 8px;
  width: 2px;
  background-image: linear-gradient(180deg, var(--steel-300) 0 6px, transparent 6px 12px);
  background-size: 2px 12px;
}
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-soft); margin-bottom: 0; }
.step .step-note {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  color: var(--accent-800);
  background: var(--accent-050);
  border: 1px solid var(--accent-100);
  border-radius: var(--r-2);
  padding: 5px 10px;
}

.photo-plate {
  position: relative;
  border-radius: var(--r-3);
  overflow: hidden;
  border: 1px solid var(--steel-300);
  box-shadow: var(--shadow-lift);
}
.photo-plate img { width: 100%; }
.photo-plate figcaption {
  background: var(--primary-900);
  color: #C8D6E2;
  font-size: var(--fs-xs);
  padding: 12px 16px;
  border-top: 4px solid var(--accent);
}

/* ==========================================================================
   10. Feature cards
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: var(--s-4);
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  padding: var(--s-5);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease-door), box-shadow var(--dur-2), border-color var(--dur-2);
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background-image: repeating-linear-gradient(90deg, var(--steel-200) 0 8px, var(--steel-300) 8px 10px);
  transition: background-image var(--dur-2);
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-plate);
  border-color: var(--primary-200);
}
.feature-card:hover::before {
  background-image: repeating-linear-gradient(90deg, var(--accent-600) 0 8px, var(--accent-800) 8px 10px);
}
.feature-icon {
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--r-2);
  background: var(--primary-050);
  border: 1px solid var(--primary-100);
  margin-bottom: var(--s-4);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: var(--fs-md); margin-bottom: 8px; }
.feature-card p { color: var(--ink-soft); font-size: var(--fs-sm); margin-bottom: 0; }

/* ==========================================================================
   11. Outcomes
   ========================================================================== */

.outcome-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
}
.outcome {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-3);
  padding: var(--s-5);
}
.outcome .big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4vw, 2.9rem);
  line-height: 1;
  color: var(--accent-300);
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 8px;
}
.outcome h3 { font-size: var(--fs-md); margin-bottom: 8px; }
.outcome p { font-size: var(--fs-sm); margin-bottom: 0; }
.meter {
  height: 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16);
  overflow: hidden;
  margin: 14px 0 0;
}
.meter i {
  display: block;
  height: 100%;
  background-image: repeating-linear-gradient(90deg, var(--accent) 0 8px, var(--accent-600) 8px 10px);
  width: 0;
  transition: width 1.1s var(--ease-door);
}
.meter i.is-visible { width: var(--fill, 60%); }

/* ==========================================================================
   12. Testimonials and results
   ========================================================================== */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: var(--s-4);
}
.testimonial {
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  padding: var(--s-5);
  margin: 0;
  box-shadow: var(--shadow-plate);
  position: relative;
}
.testimonial::before {
  content: "";
  position: absolute;
  top: 0; left: var(--s-5); right: var(--s-5);
  height: 4px;
  border-radius: 0 0 var(--r-1) var(--r-1);
  background: var(--primary);
}
.testimonial blockquote { margin: 0 0 var(--s-4); }
.testimonial p { font-size: var(--fs-sm); color: var(--ink-soft); }
.testimonial p:first-of-type::before { content: "\201C"; color: var(--accent); font-weight: 700; }
.testimonial p:last-of-type::after { content: "\201D"; color: var(--accent); font-weight: 700; }
.attrib {
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px dashed var(--steel-300);
  padding-top: var(--s-4);
}
.attrib .badge {
  width: 42px; height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-2);
  background: var(--primary-050);
  border: 1px solid var(--primary-100);
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--primary-700);
  font-size: .95rem;
}
.attrib cite { font-style: normal; font-family: var(--font-display); font-weight: 700; display: block; font-size: var(--fs-sm); }
.attrib span { font-size: var(--fs-xs); color: var(--muted); display: block; line-height: 1.4; }

.results-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--primary-100);
  border: 1px solid var(--primary-100);
  border-radius: var(--r-3);
  overflow: hidden;
  margin-top: var(--s-6);
}
.results-strip div { background: var(--surface); padding: var(--s-5); text-align: center; }
.results-strip b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  color: var(--primary);
  line-height: 1.1;
}
.results-strip span { font-size: var(--fs-xs); color: var(--muted); }

/* ==========================================================================
   13. Pricing
   ========================================================================== */

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-5);
  align-items: start;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  padding: var(--s-6) var(--s-5) var(--s-5);
  position: relative;
  box-shadow: var(--shadow-plate);
}
.price-card.is-pick {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-lift);
  padding-top: var(--s-7);
}
.price-card.is-pick::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  border-radius: var(--r-3) var(--r-3) 0 0;
  background-image: repeating-linear-gradient(90deg, var(--accent-600) 0 9px, var(--accent-800) 9px 11px, var(--accent-300) 11px 13px);
}
.pick-flag {
  position: absolute;
  top: 18px; right: 18px;
  background: var(--primary);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--r-2);
}
.price-card h3 { font-size: var(--fs-lg); margin-bottom: 4px; }
.price-card .tier-for { font-size: var(--fs-xs); color: var(--muted); display: block; margin-bottom: var(--s-4); }
.price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-display);
  margin-bottom: var(--s-4);
}
.price .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.price .per { font-size: var(--fs-sm); color: var(--muted); }
.price-list { list-style: none; margin: 0 0 var(--s-5); padding: 0; }
.price-list li {
  position: relative;
  padding-left: 26px;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.price-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 14px; height: 12px;
  border: 2px solid var(--primary);
  border-top: 0;
  border-radius: 0 0 2px 2px;
}
.price-list li::after {
  content: "";
  position: absolute;
  left: 3px; top: 0;
  width: 8px; height: 8px;
  border: 2px solid var(--accent-700);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}
.billing-note {
  margin-top: var(--s-5);
  font-size: var(--fs-sm);
  color: var(--muted);
  text-align: center;
}

/* ==========================================================================
   14. FAQ
   ========================================================================== */

.faq-list {
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  overflow: hidden;
  background: var(--surface);
}
.faq-item + .faq-item { border-top: 1px solid var(--steel-200); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  background: transparent;
  border: 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--ink);
  padding: 20px var(--s-5);
  cursor: pointer;
}
.faq-q:hover { background: var(--primary-050); }
.faq-q .qmark {
  flex: none;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--r-1);
  border: 2px solid var(--primary-200);
  position: relative;
}
.faq-q .qmark::before,
.faq-q .qmark::after {
  content: "";
  position: absolute;
  background: var(--primary);
  transition: transform var(--dur-2) var(--ease-door), opacity var(--dur-2);
}
.faq-q .qmark::before { width: 12px; height: 2px; }
.faq-q .qmark::after { width: 2px; height: 12px; }
.faq-q[aria-expanded="true"] .qmark { border-color: var(--accent); background: var(--accent-050); }
.faq-q[aria-expanded="true"] .qmark::after { transform: scaleY(0); opacity: 0; }
.faq-a {
  padding: 0 var(--s-5) 22px 72px;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
}
.faq-a p:last-child { margin-bottom: 0; }
.faq-a[hidden] { display: none; }

/* ==========================================================================
   15. Contact form
   ========================================================================== */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.contact-aside .checklist { list-style: none; margin: var(--s-5) 0 0; padding: 0; }
.contact-aside .checklist li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
  font-size: var(--fs-sm);
  color: #C8D6E2;
}
.contact-aside .checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 5px;
  width: 16px; height: 16px;
  border-radius: var(--r-1);
  background: var(--accent);
}
.contact-aside .checklist li::after {
  content: "";
  position: absolute;
  left: 5px; top: 8px;
  width: 5px; height: 9px;
  border: 2px solid #241505;
  border-top: 0; border-left: 0;
  transform: rotate(42deg);
}

.form-plate {
  background: var(--surface);
  border-radius: var(--r-3);
  border: 1px solid var(--steel-200);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.form-plate .rail-top { display: block; }
.form-body { padding: clamp(20px, 3vw, 32px); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); }
.field { margin-bottom: var(--s-4); }
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-bottom: 6px;
  color: var(--ink);
}
.field .hint { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); }
.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--ink);
  background: #FBFCFC;
  border: 1px solid var(--steel-300);
  border-radius: var(--r-2);
  padding: 12px 14px;
  transition: border-color var(--dur-1), box-shadow var(--dur-1), background-color var(--dur-1);
}
.field textarea { min-height: 132px; resize: vertical; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--primary) 50%), linear-gradient(135deg, var(--primary) 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 2px), calc(100% - 13px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-100);
  outline: none;
}
.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #A32B12;
  background: #FDF4F2;
}
.error-msg {
  display: block;
  margin-top: 6px;
  font-size: var(--fs-xs);
  color: #8E2410;
  font-family: var(--font-display);
  font-weight: 600;
}
.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--primary-050);
  border: 1px solid var(--primary-100);
  border-radius: var(--r-2);
  padding: 14px;
  margin-bottom: var(--s-5);
}
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.consent label { font-size: var(--fs-xs); color: var(--ink-soft); line-height: 1.55; }
.form-foot { font-size: var(--fs-xs); color: var(--muted); margin: var(--s-4) 0 0; }

/* ==========================================================================
   16. Footer
   ========================================================================== */

.site-footer {
  background: var(--primary-900);
  color: #C2D2DE;
  padding-top: 0;
  margin-top: 0;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: clamp(24px, 4vw, 48px);
  padding-block: clamp(44px, 6vw, 72px);
}
.site-footer h2, .site-footer h3 {
  font-size: var(--fs-xs);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: var(--s-4);
}
.site-footer p { font-size: var(--fs-sm); color: #A9BDCC; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #C2D2DE; text-decoration: none; font-size: var(--fs-sm); }
.site-footer a:hover { color: var(--accent-300); text-decoration: underline; }
.footer-brand-line { max-width: 34ch; }
.social-row { display: flex; gap: 10px; margin-top: var(--s-4); }
.social-row a {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-2);
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .05);
}
.social-row a:hover { background: var(--accent); border-color: var(--accent-800); }
.social-row svg { width: 18px; height: 18px; fill: #FFFFFF; }
.footer-base {
  border-top: 1px solid rgba(255, 255, 255, .14);
  padding-block: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: #93A9B9;
}
.footer-base a { font-size: var(--fs-xs); }

.author-byline {
  display: flex;
  gap: var(--s-4);
  align-items: center;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-left: 5px solid var(--primary);
  border-radius: var(--r-2);
  padding: var(--s-4) var(--s-5);
  margin-top: var(--s-7);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}
.author-byline strong { font-family: var(--font-display); }

/* ==========================================================================
   17. Interior pages
   ========================================================================== */

.page-head {
  background: var(--primary-800);
  color: #FFFFFF;
  padding-block: clamp(44px, 6vw, 76px);
  position: relative;
  overflow: hidden;
}
.page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 16px);
  pointer-events: none;
}
.page-head h1 { color: #FFFFFF; font-size: var(--fs-3xl); position: relative; z-index: 1; }
.page-head p { color: #BCCCDA; max-width: 62ch; position: relative; z-index: 1; margin-bottom: 0; }
.crumbs { position: relative; z-index: 1; font-size: var(--fs-xs); color: #9DB4C6; margin-bottom: var(--s-4); }
.crumbs a { color: #DCE7EF; }

.prose { max-width: 74ch; }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--s-7); }
.prose h3 { font-size: var(--fs-md); margin-top: var(--s-5); }
.prose p, .prose li { color: var(--ink-soft); }
.prose .updated {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  background: var(--primary-050);
  border: 1px solid var(--primary-100);
  border-radius: var(--r-2);
  padding: 6px 12px;
  color: var(--primary-800);
}
.fact-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--s-5);
  font-size: var(--fs-sm);
}
.fact-table th, .fact-table td {
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--steel-200);
  vertical-align: top;
}
.fact-table th {
  width: 34%;
  background: var(--primary-050);
  font-family: var(--font-display);
  color: var(--primary-800);
}

.author-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}
.author-card {
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: var(--shadow-plate);
  position: sticky;
  top: 100px;
}
.author-card img { width: 100%; }
.author-card .card-body { padding: var(--s-5); }
.author-card ul { list-style: none; margin: var(--s-4) 0 0; padding: 0; }
.author-card li { margin-bottom: 8px; font-size: var(--fs-sm); }

.map-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-5);
}
.map-block {
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-top: 4px solid var(--primary);
  border-radius: 0 0 var(--r-3) var(--r-3);
  padding: var(--s-5);
}
.map-block h2 { font-size: var(--fs-md); }
.map-block ul { list-style: none; margin: 0; padding: 0; }
.map-block li { margin-bottom: 14px; font-size: var(--fs-sm); }
.map-block a { font-family: var(--font-display); font-weight: 700; }
.map-block span { display: block; color: var(--muted); font-size: var(--fs-xs); }

.status-panel {
  max-width: 660px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  box-shadow: var(--shadow-plate);
  overflow: hidden;
  text-align: center;
}
.status-panel .panel-body { padding: clamp(28px, 5vw, 52px); }
.status-panel .keypad {
  display: grid;
  grid-template-columns: repeat(3, 46px);
  gap: 8px;
  justify-content: center;
  margin-bottom: var(--s-5);
}
.status-panel .keypad i {
  height: 40px;
  border-radius: var(--r-1);
  background: var(--steel-100);
  border: 1px solid var(--steel-300);
  box-shadow: var(--shadow-inset);
}
.status-panel .keypad i.on { background: var(--accent); border-color: var(--accent-800); }
.status-panel .keypad i.blue { background: var(--primary); border-color: var(--primary-900); }
.status-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; }

.err-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 12vw, 6.4rem);
  letter-spacing: -0.05em;
  line-height: .9;
  color: var(--primary);
  margin-bottom: var(--s-4);
}

/* ==========================================================================
   18. Motion: roll up door reveal and unit fill
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  clip-path: inset(0 0 100% 0);
  transition:
    opacity var(--dur-3) var(--ease-door),
    transform var(--dur-3) var(--ease-door),
    clip-path var(--dur-3) var(--ease-door);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
}

.unitmap.is-visible .unit {
  animation: unitfill .5s var(--ease-door) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}
@keyframes unitfill {
  from { opacity: 0; transform: scaleY(.15); }
  to { opacity: 1; transform: scaleY(1); }
}

@keyframes codeblink {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
.gate-tag b { animation: codeblink 2.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; clip-path: none; }
  .unitmap.is-visible .unit { animation: none; }
}

/* ==========================================================================
   19. Responsive
   ========================================================================== */

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .steps-layout { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .author-layout { grid-template-columns: 1fr; }
  .author-card { position: static; max-width: 340px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .site-nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow-plate);
    padding: var(--s-4) var(--rail) var(--s-5);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a { padding: 13px 10px; border-bottom: 1px solid var(--steel-100); font-size: var(--fs-md); }
  .nav-list a::after { display: none; }
  .nav-list .nav-cta { margin-top: var(--s-3); }
  .nav-list .nav-cta a {
    background: var(--accent);
    color: #1A1207;
    text-align: center;
    border-radius: var(--r-2);
    border-bottom: 0;
    font-family: var(--font-display);
    font-weight: 700;
  }
}

@media (max-width: 720px) {
  .trust-strip { grid-template-columns: 1fr; }
  .unitmap { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: 1fr; }
  .step { padding-left: 60px; }
  .step::before { width: 44px; height: 44px; font-size: .95rem; }
  .step::after { left: 22px; top: 52px; }
  .faq-a { padding-left: var(--s-5); }
  .gate-tag { left: 12px; bottom: 34px; }
}

@media (max-width: 420px) {
  .unitmap { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .btn { width: 100%; }
  .hero-actions { gap: 10px; }
  .status-panel .keypad { grid-template-columns: repeat(3, 40px); }
}

@media (min-width: 1400px) {
  :root { --wrap: 1240px; }
}

@media print {
  .site-header, .site-footer, .hero-actions, .form-plate { display: none; }
  body { background: #FFFFFF; }
}

/* ==========================================================================
   20. The Overlock: magazine index, article pages, related cards
   Built from the same plate, rivet and corrugated vocabulary as the product
   pages. No new palette: every value below resolves to an existing token.
   ========================================================================== */

/* ---- 20.1 Magazine masthead ------------------------------------------- */

.mag-head {
  background: var(--primary-900);
  color: #FFFFFF;
  padding-block: clamp(40px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}
.mag-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 2px, transparent 2px 16px);
  pointer-events: none;
}
.mag-head > * { position: relative; z-index: 1; }
.mag-head h1 {
  color: #FFFFFF;
  font-size: var(--fs-3xl);
  max-width: 20ch;
}
.mag-head .mag-standfirst {
  color: #C8D6E2;
  font-size: var(--fs-md);
  max-width: 62ch;
  margin-bottom: 0;
}
.mag-head .crumbs { color: #9DB4C6; }
.mag-head .crumbs a { color: #DCE7EF; }
.mag-head .eyebrow { background: rgba(255, 255, 255, .10); color: #F6D9BE; }

.mag-count {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #A9BDCC;
}
.mag-count b { color: var(--accent-300); font-weight: 800; }

/* ---- 20.2 Index grid and cards ---------------------------------------- */

.mag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(286px, 1fr));
  gap: var(--s-5);
  align-items: start;
}

.mag-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  overflow: hidden;
  position: relative;
  transition: transform var(--dur-2) var(--ease-door), box-shadow var(--dur-2), border-color var(--dur-2);
}
.mag-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  z-index: 2;
  background-image: repeating-linear-gradient(90deg, var(--steel-200) 0 8px, var(--steel-300) 8px 10px);
  transition: background-image var(--dur-2);
}
.mag-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-plate);
  border-color: var(--primary-200);
}
.mag-card:hover::before {
  background-image: repeating-linear-gradient(90deg, var(--accent-600) 0 8px, var(--accent-800) 8px 10px);
}
.mag-card:focus-within {
  border-color: var(--primary-400);
  box-shadow: var(--shadow-plate);
}

.mag-shot {
  margin: 0;
  background: var(--steel-100);
  border-bottom: 1px solid var(--steel-200);
  position: relative;
  overflow: hidden;
}
.mag-shot img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease-door);
}
.mag-card:hover .mag-shot img { transform: scale(1.03); }

.mag-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: var(--r-1);
  background: var(--primary-900);
  color: #F6D9BE;
  border-left: 3px solid var(--accent);
}

.mag-card-body {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
.mag-card h2, .mag-card h3 {
  font-size: var(--fs-md);
  line-height: 1.22;
  margin-bottom: 10px;
}
.mag-card h2 a, .mag-card h3 a {
  color: var(--ink);
  text-decoration: none;
}
.mag-card h2 a:hover, .mag-card h3 a:hover { color: var(--primary-700); text-decoration: underline; }
.mag-card p {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  margin-bottom: var(--s-4);
}

.mag-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px dashed var(--steel-300);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.mag-meta .dot {
  width: 5px; height: 5px;
  border-radius: 1px;
  background: var(--accent);
  display: inline-block;
}

/* the lead card: a wider plate for the newest piece */
.mag-card.lead {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
}
.mag-card.lead .mag-shot {
  flex: 1 1 54%;
  border-bottom: 0;
  border-right: 1px solid var(--steel-200);
}
.mag-card.lead .mag-shot img { height: 100%; aspect-ratio: auto; min-height: 320px; }
.mag-card.lead .mag-card-body {
  flex: 1 1 46%;
  justify-content: center;
  padding: clamp(24px, 3.4vw, 44px);
}
.mag-card.lead h2 { font-size: var(--fs-xl); }
.mag-card.lead p { font-size: var(--fs-md); }
.mag-card.lead::before {
  background-image: repeating-linear-gradient(90deg, var(--accent-600) 0 8px, var(--accent-800) 8px 10px);
}

/* ---- 20.3 Article header ---------------------------------------------- */

.article-head {
  background: var(--primary-800);
  color: #FFFFFF;
  padding-block: clamp(38px, 5.4vw, 68px);
  position: relative;
  overflow: hidden;
}
.article-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 16px);
  pointer-events: none;
}
.article-head > * { position: relative; z-index: 1; }
.article-head h1 {
  color: #FFFFFF;
  font-size: clamp(1.95rem, 4vw, 2.85rem);
  max-width: 20ch;
  margin-bottom: var(--s-4);
}
.article-head .crumbs { color: #9DB4C6; }
.article-head .crumbs a { color: #DCE7EF; }
.article-head .eyebrow { background: rgba(255, 255, 255, .10); color: #F6D9BE; }

.standfirst {
  font-size: var(--fs-md);
  line-height: 1.55;
  color: #C8D6E2;
  max-width: 60ch;
  margin-bottom: var(--s-5);
}

.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255, 255, 255, .16);
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  color: #A9BDCC;
  max-width: 74ch;
}
.byline a { color: #FFFFFF; text-decoration-color: var(--accent); }
.byline a:hover { color: var(--accent-300); }
.byline strong { color: #FFFFFF; font-weight: 700; }
.byline .sep {
  width: 5px; height: 5px;
  border-radius: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ---- 20.4 Featured photograph ----------------------------------------- */

.article-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: var(--shadow-plate);
}
.article-figure .rail-thin { display: block; }
.article-figure img { width: 100%; }
.article-figure figcaption {
  padding: 12px var(--s-5);
  font-size: var(--fs-xs);
  color: var(--muted);
  border-top: 1px solid var(--steel-200);
  background: var(--steel-100);
}

/* ---- 20.5 Article body typography -------------------------------------- */

.article-body {
  max-width: 68ch;
  font-size: var(--fs-md);
  line-height: 1.72;
  color: var(--ink-soft);
}
.article-body > p { margin-bottom: var(--s-5); }
.article-body h2 {
  font-size: var(--fs-xl);
  color: var(--ink);
  margin-top: var(--s-8);
  margin-bottom: var(--s-4);
  padding-top: var(--s-4);
  border-top: 3px solid var(--steel-200);
  position: relative;
}
.article-body h2::before {
  content: "";
  position: absolute;
  top: -3px; left: 0;
  width: 68px; height: 3px;
  background: var(--accent);
}
.article-body h3 {
  font-size: var(--fs-lg);
  color: var(--ink);
  margin-top: var(--s-6);
  margin-bottom: var(--s-3);
}
.article-body ul, .article-body ol {
  margin-bottom: var(--s-5);
  padding-left: 1.15rem;
}
.article-body li { margin-bottom: 10px; }
.article-body ul { list-style: none; padding-left: 0; }
.article-body ul > li {
  position: relative;
  padding-left: 26px;
}
.article-body ul > li::before {
  content: "";
  position: absolute;
  left: 2px; top: .62em;
  width: 10px; height: 8px;
  border-radius: 1px;
  background-image: repeating-linear-gradient(90deg, var(--accent) 0 3px, var(--accent-800) 3px 4px);
}
.article-body blockquote {
  margin: var(--s-6) 0;
  padding: var(--s-5);
  background: var(--primary-050);
  border: 1px solid var(--primary-100);
  border-left: 5px solid var(--primary);
  border-radius: 0 var(--r-3) var(--r-3) 0;
  color: var(--primary-900);
  font-size: var(--fs-md);
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--s-5) 0 var(--s-6);
  font-size: var(--fs-sm);
  display: block;
  overflow-x: auto;
}
.article-body th, .article-body td {
  text-align: left;
  padding: 11px 14px;
  border: 1px solid var(--steel-200);
  vertical-align: top;
}
.article-body th {
  background: var(--primary-050);
  font-family: var(--font-display);
  color: var(--primary-800);
}
.article-body a { color: var(--primary-700); }
.article-body a:hover { color: var(--accent-800); }

/* the contextual read on plate dropped between sections */
.inline-read {
  display: block;
  margin: var(--s-5) 0;
  padding: 13px var(--s-4) 13px var(--s-5);
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-left: 5px solid var(--accent);
  border-radius: 0 var(--r-2) var(--r-2) 0;
  box-shadow: var(--shadow-hair);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--muted);
}
.inline-read a { font-weight: 700; color: var(--primary-800); }
.inline-read a:hover { color: var(--accent-800); }

/* ---- 20.6 Call to action plate ----------------------------------------- */

.mag-cta {
  max-width: 68ch;
  margin-top: var(--s-8);
  background: var(--primary-800);
  color: #FFFFFF;
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.mag-cta .rail-top { display: block; }
.mag-cta .cta-body { padding: clamp(24px, 4vw, 40px); }
.mag-cta h2 {
  color: #FFFFFF;
  font-size: var(--fs-xl);
  margin-bottom: var(--s-3);
}
.mag-cta p {
  color: #C8D6E2;
  font-size: var(--fs-base);
  margin-bottom: var(--s-5);
  max-width: 54ch;
}
.mag-cta .cta-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---- 20.7 Author box ---------------------------------------------------- */

.author-box {
  max-width: 68ch;
  margin-top: var(--s-7);
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: var(--s-5);
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-top: 4px solid var(--primary);
  border-radius: 0 0 var(--r-3) var(--r-3);
  padding: var(--s-5);
}
.author-box img {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: var(--r-2);
  border: 1px solid var(--steel-200);
  box-shadow: var(--shadow-inset);
}
.author-box h2 {
  font-size: var(--fs-md);
  margin-bottom: 4px;
}
.author-box .role {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-800);
  margin-bottom: var(--s-3);
}
.author-box p { font-size: var(--fs-sm); color: var(--ink-soft); margin-bottom: var(--s-3); }
.author-box p:last-child { margin-bottom: 0; }

/* ---- 20.8 Read also ----------------------------------------------------- */

.read-also { margin-top: var(--s-8); }
.read-also > h2 {
  font-size: var(--fs-lg);
  margin-bottom: var(--s-5);
  padding-bottom: var(--s-3);
  border-bottom: 6px solid transparent;
  border-image: repeating-linear-gradient(90deg, var(--steel-200) 0 6px, transparent 6px 12px) 6;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s-4);
}
.related-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--steel-200);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: transform var(--dur-2) var(--ease-door), box-shadow var(--dur-2), border-color var(--dur-2);
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-plate);
  border-color: var(--primary-200);
}
.related-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--steel-200);
}
.related-card .related-body { padding: var(--s-4); display: flex; flex-direction: column; flex: 1 1 auto; }
.related-card h3 { font-size: var(--fs-base); line-height: 1.25; margin-bottom: 8px; }
.related-card h3 a { color: var(--ink); text-decoration: none; }
.related-card h3 a:hover { color: var(--primary-700); text-decoration: underline; }
.related-card p { font-size: var(--fs-xs); color: var(--muted); margin-bottom: var(--s-3); }
.related-card time {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: var(--fs-micro);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- 20.9 Home page magazine teaser ------------------------------------ */

.mag-teaser-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px dashed var(--steel-300);
}
.mag-teaser-foot p { margin-bottom: 0; color: var(--muted); font-size: var(--fs-sm); }

/* ---- 20.10 Author page article list ------------------------------------ */

.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li {
  padding: 14px 0 14px var(--s-5);
  border-bottom: 1px solid var(--steel-200);
  position: relative;
}
.article-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 22px;
  width: 12px; height: 9px;
  border-radius: 1px;
  background-image: repeating-linear-gradient(90deg, var(--accent) 0 3px, var(--accent-800) 3px 4px);
}
.article-list a { font-family: var(--font-display); font-weight: 700; }
.article-list span {
  display: block;
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-top: 3px;
}

/* ---- 20.11 Magazine responsive ------------------------------------------ */

@media (max-width: 900px) {
  .mag-card.lead { flex-direction: column; }
  .mag-card.lead .mag-shot {
    border-right: 0;
    border-bottom: 1px solid var(--steel-200);
  }
  .mag-card.lead .mag-shot img { aspect-ratio: 3 / 2; min-height: 0; }
}

@media (max-width: 620px) {
  .mag-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .related-grid { grid-template-columns: 1fr; }
  .article-body { font-size: var(--fs-base); }
  .article-body h2 { margin-top: var(--s-7); }
  .author-box {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
  .author-box img { width: 96px; height: 96px; }
  .mag-cta .cta-actions .btn { width: 100%; }
}

@media (max-width: 400px) {
  .mag-card-body { padding: var(--s-4); }
  .mag-tag { left: 8px; bottom: 8px; letter-spacing: .08em; }
  .byline { gap: 6px 12px; }
  .article-figure { border-radius: var(--r-2); }
}



/* Network strip: five sibling products, rotated so every site is linked the same
   number of times. Spans the full footer grid rather than adding a fifth column,
   because each footer declares a fixed column count and a fifth item would wrap. */
.site-network { grid-column: 1 / -1; flex-basis: 100%; width: 100%;
  margin-top: 1.6rem; padding-top: 1.2rem;
  border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
.site-network h2 { font: inherit; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase; margin: 0 0 0.7rem; opacity: 0.72; }
.site-network ul { list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-network li + li { margin-top: 0; }
.site-network a { font-size: 0.86rem; text-decoration: none; opacity: 0.9;
  border-bottom: 1px solid transparent; }
.site-network a:hover, .site-network a:focus-visible { opacity: 1; border-bottom-color: currentColor; }
@media (max-width: 620px) { .site-network ul { gap: 0.45rem 1.1rem; } }


/* Decorative bleed guard. Several sections intentionally hang a rotated or offset
   pseudo element past the viewport edge. overflow-x: clip contains them without
   creating a scroll container, so position: sticky keeps working, unlike overflow
   hidden. Genuine content overflow is still reported by the element level check in
   the browser pass. */
html { overflow-x: clip; }
body { overflow-x: clip; }


/* Wide content on phones. Class names for the prose wrapper differ from site to site,
   so this targets tables and pre blocks directly: they scroll inside their own box
   rather than pushing cells past the right edge, per the build contract. */
@media (max-width: 700px) {
  table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { overflow-wrap: anywhere; }
  pre { overflow-x: auto; max-width: 100%; }
}
