/* ==========================================================================
   GavelMinutes design system
   Civic record: municipal navy, archival cream, flag red rule.
   Merriweather over PT Sans. Document column layout. Seal and ledger motifs.
   ========================================================================== */

:root {
  /* --- brief palette --- */
  --bg: #F7F7F4;
  --surface: #FFFFFF;
  --ink: #14192B;
  --primary: #1F3A6E;
  --accent: #A6212C;
  --muted: #5B6377;

  /* --- derived navy scale --- */
  --navy-950: #0C1330;
  --navy-900: #131E42;
  --navy-800: #182A55;
  --navy-700: #1F3A6E;
  --navy-500: #3D5A93;
  --navy-300: #8CA0C4;
  --navy-100: #DCE3F0;
  --navy-050: #EEF1F8;

  /* --- derived flag red scale --- */
  --red-800: #7C1720;
  --red-700: #8E1B25;
  --red-600: #A6212C;
  --red-200: #E8BFC3;
  --red-050: #F8ECED;

  /* --- archival paper scale --- */
  --paper-000: #FFFFFF;
  --paper-050: #FBFAF6;
  --paper-100: #F7F7F4;
  --paper-200: #EFEDE4;
  --paper-300: #E3E0D4;
  --rule: #D9D6CB;
  --rule-soft: #E8E5DB;

  /* --- ink tints --- */
  --ink-90: #232841;
  --ink-70: #3B4157;
  --ink-55: #5B6377;
  --ink-40: #838A9C;

  /* --- spacing scale --- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 2.75rem;
  --s-8: 3.5rem;
  --s-9: 5rem;
  --s-10: 7rem;

  /* --- radii: civic documents are square, corners barely softened --- */
  --r-xs: 1px;
  --r-sm: 2px;
  --r-md: 3px;
  --r-lg: 5px;
  --r-round: 50%;

  /* --- shadows --- */
  --sh-hairline: 0 1px 0 var(--rule);
  --sh-card: 0 1px 0 rgba(20, 25, 43, 0.05), 0 18px 34px -28px rgba(20, 25, 43, 0.55);
  --sh-lift: 0 2px 0 rgba(20, 25, 43, 0.06), 0 26px 46px -30px rgba(20, 25, 43, 0.6);
  --sh-bar: 0 1px 0 var(--rule), 0 10px 24px -22px rgba(20, 25, 43, 0.6);

  /* --- type --- */
  --font-display: "Merriweather", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: "PT Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.0625rem;
  --t-lg: 1.1875rem;
  --t-xl: 1.4rem;
  --t-2xl: 1.75rem;
  --t-3xl: 2.1rem;
  --t-4xl: 2.6rem;
  --t-5xl: 3.15rem;

  --maxw: 1180px;
  --maxw-read: 68ch;
  --margin-col: 12.5rem;

  /* --- the ledger ruling used across panels --- */
  --ledger: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      var(--rule-soft) 31px,
      var(--rule-soft) 32px);
}

/* ==========================================================================
   Reset and base
   ========================================================================== */

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

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

body {
  margin: 0;
  background-color: var(--paper-100);
  background-image:
    radial-gradient(circle at 12% 4%, rgba(31, 58, 110, 0.05), transparent 46%),
    radial-gradient(circle at 88% 0%, rgba(166, 33, 44, 0.04), transparent 40%),
    linear-gradient(to bottom, var(--paper-050), var(--paper-100) 340px);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-md);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-950);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.008em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}

h1 { font-size: clamp(2.05rem, 1.35rem + 2.9vw, var(--t-5xl)); letter-spacing: -0.016em; }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.7vw, var(--t-3xl)); }
h3 { font-size: var(--t-xl); }
h4 { font-size: var(--t-lg); }

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

a { color: var(--navy-700); }

a:not(.btn):not(.plain) {
  text-decoration: none;
  background-image: linear-gradient(var(--red-600), var(--red-600));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--navy-100);
  transition: background-size 220ms ease, color 180ms ease;
}

a:not(.btn):not(.plain):hover { background-size: 100% 1px; color: var(--navy-900); }

strong, b { font-weight: 700; color: var(--navy-900); }

:focus-visible {
  outline: 3px solid var(--red-600);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

::selection { background: var(--navy-100); color: var(--navy-950); }

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

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -4rem;
  z-index: 999;
  background: var(--navy-800);
  color: #fff;
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  border-bottom: 3px solid var(--red-600);
  transition: top 160ms ease;
}
.skip-link:focus { top: var(--s-4); }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(3.25rem, 6vw, var(--s-10)); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 4vw, 4rem); }

.section--paper { background: var(--paper-200); border-block: 1px solid var(--rule); }

.section--record {
  background: var(--surface);
  border-block: 1px solid var(--rule);
}

/* The document column: a narrow left margin holding the record number and a
   seal, then the body column. Mirrors a municipal minute book page. */
.doc {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}

@media (min-width: 62rem) {
  .doc {
    grid-template-columns: var(--margin-col) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
  }
  .doc__margin {
    border-right: 1px solid var(--rule);
    padding-right: var(--s-5);
    position: sticky;
    top: 6.5rem;
    align-self: start;
  }
}

.doc__margin { display: flex; flex-direction: column; gap: var(--s-3); }

.record-no {
  font-family: var(--font-display);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-700);
}

.record-note {
  font-size: var(--t-sm);
  color: var(--ink-55);
  line-height: 1.5;
  margin: 0;
}

/* ==========================================================================
   Civic rule: navy bar above a thin flag red line
   ========================================================================== */

.civic-rule {
  height: 6px;
  width: 88px;
  background:
    linear-gradient(var(--navy-700), var(--navy-700)) 0 0 / 100% 3px no-repeat,
    linear-gradient(var(--red-600), var(--red-600)) 0 5px / 100% 1px no-repeat;
  margin-bottom: var(--s-4);
}
.civic-rule--wide { width: 100%; }
.civic-rule--light {
  background:
    linear-gradient(#fff, #fff) 0 0 / 100% 3px no-repeat,
    linear-gradient(var(--red-600), var(--red-600)) 0 5px / 100% 1px no-repeat;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy-700);
  margin: 0 0 var(--s-3);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--red-600);
  flex: none;
}

.lede { font-size: var(--t-lg); color: var(--ink-70); max-width: var(--maxw-read); }

/* ==========================================================================
   Seal motif
   ========================================================================== */

.seal {
  --seal-size: 74px;
  width: var(--seal-size);
  height: var(--seal-size);
  border-radius: var(--r-round);
  display: grid;
  place-items: center;
  position: relative;
  flex: none;
  background:
    radial-gradient(circle at 50% 50%, var(--paper-050) 0 58%, transparent 58%),
    conic-gradient(from 0deg, var(--navy-700) 0 2deg, transparent 2deg 10deg);
  border: 2px solid var(--navy-700);
  box-shadow: inset 0 0 0 5px var(--paper-050), inset 0 0 0 6px var(--navy-100);
}

.seal::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: var(--r-round);
  border: 1px dashed var(--navy-300);
}

.seal__num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy-800);
  position: relative;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}

.seal--red { border-color: var(--red-600); }
.seal--red .seal__num { color: var(--red-700); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: var(--t-base);
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.82rem 1.5rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  position: relative;
}

.btn--primary {
  background: var(--navy-700);
  color: #fff;
  border-color: var(--navy-800);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 10px 20px -16px rgba(20, 25, 43, 0.9);
}
.btn--primary::after {
  content: "";
  position: absolute;
  left: 1.5rem; right: 1.5rem; bottom: 0.5rem;
  height: 2px;
  background: var(--red-600);
  opacity: 0;
  transition: opacity 180ms ease;
}
.btn--primary:hover { background: var(--navy-800); }
.btn--primary:hover::after { opacity: 1; }

.btn--ghost {
  background: var(--surface);
  color: var(--navy-800);
  border-color: var(--navy-100);
  box-shadow: var(--sh-hairline);
}
.btn--ghost:hover { border-color: var(--navy-500); background: var(--navy-050); }

.btn--flag {
  background: var(--red-600);
  color: #fff;
  border-color: var(--red-700);
}
.btn--flag:hover { background: var(--red-700); }

.btn--block { width: 100%; }
.btn--sm { padding: 0.55rem 1rem; font-size: var(--t-sm); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 250, 246, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow 200ms ease, border-color 200ms ease, background-color 200ms ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--red-600);
  box-shadow: var(--sh-bar);
  background: rgba(251, 250, 246, 0.985);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: 4.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  border: 0 !important;
  background: none !important;
  padding: 0;
  margin-right: auto;
}
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.22rem;
  color: var(--navy-950);
  letter-spacing: -0.015em;
}
.brand__name span { color: var(--red-600); }

.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav a {
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--ink-70);
  text-decoration: none;
  border: 0;
  padding-bottom: 3px;
  background-image: linear-gradient(var(--navy-700), var(--navy-700));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 220ms ease, color 180ms ease;
}
.nav a:hover, .nav a:focus-visible { color: var(--navy-900); background-size: 100% 2px; }

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--navy-100);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  color: var(--navy-800);
}
.nav-toggle svg { display: block; }

@media (max-width: 60rem) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper-050);
    border-bottom: 3px solid var(--red-600);
    box-shadow: var(--sh-card);
    padding: var(--s-3) clamp(1rem, 4vw, 2.5rem) var(--s-5);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
    background-size: 0% 2px;
  }
  .nav .btn { margin-top: var(--s-4); }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding-block: clamp(2.75rem, 5vw, 4.75rem) clamp(3rem, 5vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--ledger);
  opacity: 0.55;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: clamp(1rem, 4vw, 2.5rem);
  width: 1px;
  background: var(--red-200);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: clamp(2rem, 4vw, 3.25rem);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 64rem) {
  .hero__grid { grid-template-columns: 1.06fr 0.94fr; }
}

.hero__stamp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-700);
  border: 1px solid var(--red-200);
  background: var(--red-050);
  padding: 0.4rem 0.75rem;
  border-radius: var(--r-sm);
  margin-bottom: var(--s-5);
}
.hero__stamp::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: var(--r-round);
  background: var(--red-600);
}

.hero p.hero__sub { font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.24rem); color: var(--ink-70); max-width: 40rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }

.trust {
  list-style: none;
  padding: 0;
  margin: var(--s-7) 0 0;
  display: grid;
  gap: var(--s-3);
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule);
  padding-top: var(--s-5);
}
@media (min-width: 40rem) { .trust { grid-template-columns: repeat(3, 1fr); gap: var(--s-4); } }

.trust li {
  margin: 0;
  font-size: var(--t-sm);
  color: var(--ink-70);
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  line-height: 1.45;
}
.trust li strong { display: block; font-family: var(--font-display); font-size: var(--t-base); color: var(--navy-900); }
.trust svg { flex: none; margin-top: 2px; color: var(--navy-700); }

/* Hero photograph framed like an archived plate */
.plate {
  position: relative;
  background: var(--surface);
  padding: 10px;
  border: 1px solid var(--rule);
  box-shadow: var(--sh-card);
}
.plate::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--navy-100);
  pointer-events: none;
}
.plate img { border-radius: var(--r-xs); }
.plate__caption {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-40);
  padding: 0.65rem 0.2rem 0.15rem;
  font-weight: 700;
}
.plate__caption span:last-child { color: var(--red-700); }

/* ==========================================================================
   Card systems
   ========================================================================== */

.grid { display: grid; gap: var(--s-5); grid-template-columns: 1fr; }
@media (min-width: 48rem) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 48rem) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 68rem) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 48rem) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 74rem) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: var(--s-5) var(--s-5) var(--s-5);
  position: relative;
  box-shadow: var(--sh-hairline);
  transition: box-shadow 220ms ease, transform 220ms ease, border-color 220ms ease;
}
.card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: var(--navy-700);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.card::after {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  height: 3px; width: 46px;
  background: var(--red-600);
  border-radius: var(--r-sm) 0 0 0;
}
.card:hover { box-shadow: var(--sh-lift); border-color: var(--navy-100); transform: translateY(-2px); }

.card h3 { margin-bottom: var(--s-2); }
.card p { color: var(--ink-70); font-size: var(--t-base); margin-bottom: 0; }

.card__cost {
  display: inline-block;
  margin-top: var(--s-4);
  font-family: var(--font-display);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--red-700);
  border-top: 1px solid var(--rule);
  padding-top: var(--s-3);
  width: 100%;
}

/* Feature card with icon */
.feature__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid var(--navy-100);
  background: var(--navy-050);
  border-radius: var(--r-sm);
  color: var(--navy-700);
  margin-bottom: var(--s-4);
}
.feature__icon svg { width: 26px; height: 26px; display: block; }

/* ==========================================================================
   Steps (how it works)
   ========================================================================== */

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-5); }

.step {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: var(--s-4);
  align-items: start;
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
.step:last-child { border-bottom: 0; padding-bottom: 0; }
.step h3 { margin-bottom: var(--s-2); }
.step p { color: var(--ink-70); margin-bottom: 0; }

/* ==========================================================================
   Outcome blocks
   ========================================================================== */

.outcome {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--red-600);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: var(--s-5);
  box-shadow: var(--sh-hairline);
}
.outcome__num {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 1.6rem + 1.8vw, 2.85rem);
  font-weight: 900;
  line-height: 1;
  color: var(--navy-700);
  display: block;
  margin-bottom: var(--s-3);
  font-variant-numeric: tabular-nums;
}
.outcome h3 { font-size: var(--t-lg); margin-bottom: var(--s-2); }
.outcome p { color: var(--ink-70); font-size: var(--t-base); margin: 0; }

/* ==========================================================================
   Testimonials and results strip
   ========================================================================== */

.testimonial {
  margin: 0;
  background: var(--paper-050);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: var(--s-6) var(--s-5) var(--s-5);
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-hairline);
}
.testimonial::before {
  content: "";
  position: absolute;
  top: -34px; right: -34px;
  width: 128px; height: 128px;
  border-radius: var(--r-round);
  border: 10px solid var(--navy-100);
  box-shadow: inset 0 0 0 3px var(--paper-050), inset 0 0 0 5px var(--navy-100);
  opacity: 0.85;
  pointer-events: none;
}
.testimonial__mark {
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 0.6;
  color: var(--red-600);
  display: block;
  margin-bottom: var(--s-3);
}
.testimonial p {
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink-90);
  position: relative;
  z-index: 1;
}
.testimonial figcaption {
  border-top: 1px solid var(--rule);
  padding-top: var(--s-3);
  font-size: var(--t-sm);
  color: var(--ink-55);
  position: relative;
  z-index: 1;
}
.testimonial figcaption strong { display: block; color: var(--navy-900); font-size: var(--t-base); }

.results {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-top: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 46rem) { .results { grid-template-columns: repeat(3, 1fr); } }
.results div { background: var(--surface); padding: var(--s-5); text-align: center; }
.results dt { font-size: var(--t-sm); color: var(--ink-55); order: 2; }
.results dd {
  margin: 0 0 var(--s-2);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem);
  font-weight: 900;
  color: var(--navy-700);
  font-variant-numeric: tabular-nums;
}
.results div { display: flex; flex-direction: column; }

/* ==========================================================================
   Pricing
   ========================================================================== */

.tiers { display: grid; gap: var(--s-5); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 60rem) { .tiers { grid-template-columns: repeat(3, 1fr); gap: var(--s-4); } }

.tier {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  box-shadow: var(--sh-hairline);
  position: relative;
}
.tier__head { border-bottom: 1px solid var(--rule); padding-bottom: var(--s-4); margin-bottom: var(--s-4); }
.tier__name {
  font-family: var(--font-display);
  font-size: var(--t-xl);
  margin: 0 0 var(--s-1);
  color: var(--navy-950);
}
.tier__for { font-size: var(--t-sm); color: var(--ink-55); margin: 0 0 var(--s-4); }
.tier__price {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--navy-800);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tier__per { font-size: var(--t-sm); color: var(--ink-55); font-weight: 400; font-family: var(--font-body); }
.tier ul { list-style: none; padding: 0; margin: 0 0 var(--s-5); flex: 1; }
.tier li {
  position: relative;
  padding-left: 1.7rem;
  font-size: var(--t-base);
  color: var(--ink-70);
  margin-bottom: 0.6rem;
}
.tier li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 10px; height: 2px;
  background: var(--red-600);
}

.tier--recommended {
  border-color: var(--navy-700);
  border-width: 2px;
  box-shadow: var(--sh-card);
}
.tier--recommended .tier__head {
  margin-top: var(--s-4);
}
.tier__ribbon {
  position: absolute;
  top: -1px; right: -1px;
  background: var(--red-600);
  color: #fff;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 0 var(--r-sm) 0 var(--r-sm);
}

.billing-note {
  margin-top: var(--s-5);
  font-size: var(--t-sm);
  color: var(--ink-55);
  border-top: 1px solid var(--rule);
  padding-top: var(--s-4);
  max-width: var(--maxw-read);
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */

.faq { border-top: 1px solid var(--rule); max-width: 54rem; }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  text-align: left;
  background: none;
  border: 0;
  padding: 1.15rem 0;
  font-family: var(--font-display);
  font-size: var(--t-lg);
  font-weight: 700;
  color: var(--navy-950);
  cursor: pointer;
  transition: color 160ms ease;
}
.faq__q:hover { color: var(--red-700); }
.faq__sign {
  flex: none;
  width: 24px; height: 24px;
  border: 1px solid var(--navy-100);
  border-radius: var(--r-sm);
  position: relative;
  margin-top: 4px;
  background: var(--paper-050);
}
.faq__sign::before, .faq__sign::after {
  content: "";
  position: absolute;
  background: var(--navy-700);
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
}
.faq__sign::before { width: 11px; height: 2px; }
.faq__sign::after { width: 2px; height: 11px; transition: opacity 200ms ease; }
.faq__q[aria-expanded="true"] .faq__sign::after { opacity: 0; }
.faq__q[aria-expanded="true"] .faq__sign { border-color: var(--red-600); }
.faq__a { padding: 0 0 1.3rem; color: var(--ink-70); max-width: var(--maxw-read); }
.faq__a p:last-child { margin-bottom: 0; }
.faq__a[hidden] { display: none; }

/* ==========================================================================
   Contact form
   ========================================================================== */

.form-shell {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--navy-700);
  border-radius: var(--r-sm);
  padding: clamp(1.35rem, 3vw, var(--s-7));
  box-shadow: var(--sh-card);
  position: relative;
}
.form-shell::before {
  content: "";
  position: absolute;
  top: -4px; left: 0;
  width: 96px; height: 4px;
  background: var(--red-600);
}

.field-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 44rem) { .field-grid { grid-template-columns: repeat(2, 1fr); } }
.field--full { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--navy-800);
  margin-bottom: 0.4rem;
}

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--t-base);
  color: var(--ink);
  background: var(--paper-050);
  border: 1px solid var(--navy-100);
  border-radius: var(--r-sm);
  padding: 0.72rem 0.85rem;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--navy-700) 50%), linear-gradient(135deg, var(--navy-700) 50%, transparent 50%); background-position: calc(100% - 19px) 1.25rem, calc(100% - 13px) 1.25rem; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 2.4rem; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--navy-300); }
.field input:focus, .field select:focus, .field textarea:focus {
  background: var(--surface);
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px var(--navy-050);
  outline: none;
}
.field :focus-visible { outline: 3px solid var(--red-600); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--red-600); background: var(--red-050); }

.err {
  display: block;
  font-size: var(--t-sm);
  color: var(--red-700);
  font-weight: 700;
  margin-top: 0.35rem;
  min-height: 0;
}

.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  background: var(--paper-100);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: var(--s-4);
}
.consent input { margin-top: 0.28rem; width: 18px; height: 18px; accent-color: var(--navy-700); flex: none; }
.consent label {
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--t-sm);
  font-weight: 400;
  color: var(--ink-70);
  margin: 0;
  line-height: 1.55;
}

.form-note { font-size: var(--t-sm); color: var(--ink-55); margin-top: var(--s-4); }

/* ==========================================================================
   Byline
   ========================================================================== */

.byline {
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--s-5) 0;
  margin-top: var(--s-8);
  font-size: var(--t-sm);
  color: var(--ink-55);
}
.byline p { margin: 0; }
.byline strong { display: block; font-family: var(--font-display); color: var(--navy-900); font-size: var(--t-base); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--navy-950);
  color: var(--navy-100);
  border-top: 5px solid var(--red-600);
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 33px, rgba(255, 255, 255, 0.035) 33px, rgba(255, 255, 255, 0.035) 34px);
  pointer-events: none;
}
.footer-grid {
  position: relative;
  display: grid;
  gap: var(--s-6);
  padding-block: clamp(2.5rem, 5vw, var(--s-9)) var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 44rem) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--s-7); } }

.site-footer h2 {
  font-family: var(--font-body);
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--s-4);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}
.site-footer p { color: var(--navy-300); font-size: var(--t-sm); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a {
  color: var(--navy-100);
  font-size: var(--t-sm);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  background-image: linear-gradient(#fff, #fff);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 200ms ease, color 180ms ease;
}
.site-footer a:hover { color: #fff; background-size: 100% 1px; }

.footer-brand { display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: var(--s-4); }
.footer-brand .brand__name { color: #fff; }
.footer-brand .brand__name span { color: var(--red-600); }

.social { display: flex; gap: 0.6rem; margin-top: var(--s-4); }
.social a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-sm);
  color: var(--navy-100);
  background: rgba(255, 255, 255, 0.03);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.social a:hover { background: var(--red-600); border-color: var(--red-600); color: #fff; }
.social svg { width: 18px; height: 18px; display: block; }

.footer-base {
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-block: var(--s-4) var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: space-between;
  font-size: var(--t-xs);
  color: var(--navy-300);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Long form document pages
   ========================================================================== */

.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2.25rem, 4vw, 3.75rem);
  position: relative;
}
.page-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(to right, var(--red-600) 0 132px, transparent 132px);
}

.prose { max-width: 72ch; }
.prose h2 { margin-top: var(--s-7); }
.prose h3 { margin-top: var(--s-6); font-size: var(--t-lg); }
.prose ul { padding-left: 1.25rem; }
.prose li { color: var(--ink-70); }
.prose p { color: var(--ink-70); }

.factsheet {
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--surface);
  padding: var(--s-5);
  margin-bottom: var(--s-6);
}
.factsheet dl { margin: 0; display: grid; gap: 0.35rem var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 40rem) { .factsheet dl { grid-template-columns: 15rem minmax(0, 1fr); } }
.factsheet dt { font-weight: 700; color: var(--navy-800); font-size: var(--t-sm); letter-spacing: 0.04em; }
.factsheet dd { margin: 0 0 var(--s-3); color: var(--ink-70); font-size: var(--t-base); }

.map-group {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  padding: var(--s-5);
  box-shadow: var(--sh-hairline);
}
.map-group h2 { font-size: var(--t-xl); margin-bottom: var(--s-3); }
.map-group ul { list-style: none; padding: 0; margin: 0; }
.map-group li { border-top: 1px solid var(--rule-soft); padding: 0.7rem 0; margin: 0; }
.map-group li:first-child { border-top: 0; }
.map-group span { display: block; font-size: var(--t-sm); color: var(--ink-55); }

.author-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 60rem) { .author-grid { grid-template-columns: 17rem minmax(0, 1fr); gap: var(--s-8); } }
.author-portrait {
  border: 1px solid var(--rule);
  background: var(--surface);
  padding: 9px;
  box-shadow: var(--sh-card);
}
.author-portrait img { width: 100%; }
.profile-links { list-style: none; padding: 0; margin: var(--s-4) 0 0; }
.profile-links li { margin-bottom: 0.5rem; font-size: var(--t-sm); }

.mini-cta {
  background: var(--navy-950);
  color: #fff;
  border-radius: var(--r-sm);
  padding: clamp(1.5rem, 3vw, var(--s-7));
  border-left: 5px solid var(--red-600);
}
.mini-cta h2 { color: #fff; }
.mini-cta p { color: var(--navy-100); }
.mini-cta a:not(.btn) { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.4); }

.notice-404 {
  font-family: var(--font-display);
  font-size: clamp(4rem, 3rem + 8vw, 8rem);
  font-weight: 900;
  color: var(--navy-100);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 var(--s-4);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Reveal motion: quiet fades only
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(10px); }
.js .reveal { transition: opacity 640ms ease, transform 640ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

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

@media print {
  .site-header, .site-footer, .cta-row, .form-shell { display: none; }
  body { background: #fff; }
}

/* ==========================================================================
   The Minute Book: the magazine
   Same ledger, same seal, same navy and flag red. A minute book page opened
   flat: a ruled margin column on the left, the record set in the body column.
   ========================================================================== */

/* --- breadcrumb: the docket line above the record ---------------------- */
.mag-crumb {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding-block: var(--s-3);
}
.mag-crumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  font-size: var(--t-sm);
  color: var(--ink-55);
}
.mag-crumb li { margin: 0; display: flex; align-items: baseline; gap: 0.55rem; }
.mag-crumb li + li::before {
  content: "/";
  color: var(--navy-300);
  font-family: var(--font-display);
}
.mag-crumb a { color: var(--navy-700); }
.mag-crumb li:last-child span {
  color: var(--ink-70);
  font-weight: 700;
}

/* --- article masthead --------------------------------------------------- */
.mag-head {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2rem, 4vw, 3.5rem) clamp(1.75rem, 3vw, 2.75rem);
  position: relative;
}
.mag-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(to right, var(--red-600) 0 132px, transparent 132px);
}
.mag-head h1 { max-width: 22ch; }
.mag-head--index h1 { max-width: 16ch; }

.mag-standfirst {
  font-family: var(--font-display);
  font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.32rem);
  line-height: 1.55;
  color: var(--ink-70);
  max-width: 46ch;
  margin: 0 0 var(--s-5);
}
.mag-head__note {
  font-size: var(--t-base);
  color: var(--ink-55);
  max-width: var(--maxw-read);
  margin: 0;
}

/* --- byline row: set like a certification block ------------------------- */
.mag-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-3) var(--s-5);
  border-top: 1px solid var(--rule);
  padding-top: var(--s-4);
  max-width: var(--maxw-read);
}
.mag-byline__who {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy-900);
  font-size: var(--t-base);
}
.mag-byline__meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  font-size: var(--t-sm);
  color: var(--ink-55);
  letter-spacing: 0.02em;
}
.mag-byline__meta li { margin: 0; display: flex; align-items: baseline; gap: 0.4rem; }
.mag-byline__meta li + li::before {
  content: "";
  width: 3px; height: 3px;
  border-radius: var(--r-round);
  background: var(--red-600);
  transform: translateY(-0.2em);
}
.mag-byline__meta time { color: var(--ink-70); font-weight: 700; }

/* --- featured photograph: mounted like a filed exhibit ------------------ */
.mag-figure-wrap { margin-top: clamp(1.5rem, 3vw, var(--s-6)); }
.mag-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 9px;
  box-shadow: var(--sh-card);
  position: relative;
}
.mag-figure::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 74px; height: 3px;
  background: var(--red-600);
}
.mag-figure img { width: 100%; border-radius: var(--r-xs); }
.mag-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  padding: 0.7rem 2px 2px;
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.mag-figure figcaption span:last-child { color: var(--red-700); }

/* --- the record column -------------------------------------------------- */
.mag-shell { padding-block: clamp(2.25rem, 4vw, var(--s-8)); }
.mag-column { min-width: 0; }

.mag-body {
  max-width: var(--maxw-read);
  font-size: var(--t-lg);
  line-height: 1.72;
  color: var(--ink-70);
}
.mag-body > :first-child { margin-top: 0; }
.mag-body p { margin: 0 0 1.15em; }
.mag-body h2 {
  font-size: clamp(1.42rem, 1.15rem + 1vw, var(--t-2xl));
  margin: 2.35em 0 0.65em;
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
  position: relative;
}
.mag-body h2::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 46px; height: 2px;
  background: var(--red-600);
}
.mag-body h2:first-child { margin-top: 0; }
.mag-body h3 {
  font-size: var(--t-lg);
  color: var(--navy-800);
  margin: 1.9em 0 0.5em;
}
.mag-body ul, .mag-body ol { margin: 0 0 1.3em; padding-left: 1.3rem; }
.mag-body li { margin-bottom: 0.5rem; }
.mag-body li::marker { color: var(--red-600); }
.mag-body strong { color: var(--navy-900); }

.mag-body blockquote {
  margin: 1.8em 0;
  padding: var(--s-4) var(--s-5);
  background: var(--paper-050);
  border-left: 4px solid var(--red-600);
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  font-family: var(--font-display);
  font-size: var(--t-base);
  color: var(--navy-900);
}
.mag-body blockquote p:last-child { margin-bottom: 0; }

.mag-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: var(--t-base);
  background: var(--surface);
  border: 1px solid var(--rule);
}
.mag-body caption {
  caption-side: top;
  text-align: left;
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-55);
  padding-bottom: var(--s-2);
}
.mag-body th, .mag-body td {
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.mag-body thead th {
  font-family: var(--font-display);
  font-size: var(--t-sm);
  color: var(--navy-900);
  background: var(--navy-050);
  border-bottom: 2px solid var(--navy-700);
}
.mag-body tbody tr:last-child td { border-bottom: 0; }
.mag-body .table-scroll { overflow-x: auto; }

/* --- the contextual reading link inside the body ------------------------ */
.mag-body .inline-read,
.inline-read {
  margin: 1.7em 0;
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  background: var(--navy-050);
  border-left: 3px solid var(--navy-700);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--navy-800);
}
.inline-read a { color: var(--navy-800); font-weight: 700; }
.inline-read::before {
  content: "";
  display: inline-block;
  width: 18px; height: 2px;
  background: var(--red-600);
  vertical-align: middle;
  margin-right: 0.6rem;
}

/* --- call to action after the conclusion -------------------------------- */
.mag-cta {
  margin-top: var(--s-7);
  max-width: var(--maxw-read);
  background: var(--navy-950);
  color: #fff;
  border-left: 5px solid var(--red-600);
  border-radius: var(--r-sm);
  padding: clamp(1.4rem, 3vw, var(--s-6));
  background-image: var(--ledger);
  background-blend-mode: soft-light;
}
.mag-cta h2 { color: #fff; font-size: var(--t-xl); margin-bottom: var(--s-3); }
.mag-cta p { color: var(--navy-100); margin-bottom: var(--s-4); font-size: var(--t-base); }
.mag-cta__act { margin-bottom: 0; }
.mag-cta .btn { text-align: center; }

/* --- author box --------------------------------------------------------- */
.mag-author {
  margin-top: var(--s-6);
  max-width: var(--maxw-read);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--navy-700);
  border-radius: var(--r-sm);
  padding: var(--s-5);
  box-shadow: var(--sh-hairline);
}
.mag-author > img {
  width: 96px; height: 96px;
  object-fit: cover;
  border: 1px solid var(--rule);
  background: var(--paper-050);
  padding: 5px;
  border-radius: var(--r-xs);
}
.mag-author__name {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--navy-900);
  font-size: var(--t-lg);
  margin: 0 0 var(--s-2);
}
.mag-author p { font-size: var(--t-base); color: var(--ink-70); margin-bottom: var(--s-3); }
.mag-author__link { margin-bottom: 0; font-size: var(--t-sm); }

/* --- Read also ---------------------------------------------------------- */
.mag-related__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin-top: var(--s-5);
}
.mag-rel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-hairline);
  transition: box-shadow 220ms ease, transform 220ms ease, border-color 220ms ease;
  position: relative;
  overflow: hidden;
}
.mag-rel::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 46px; height: 3px;
  background: var(--red-600);
  z-index: 1;
}
.mag-rel:hover { box-shadow: var(--sh-lift); border-color: var(--navy-100); transform: translateY(-2px); }
.mag-rel__link { display: block; color: inherit; height: 100%; }
.mag-rel__media { display: block; background: var(--paper-200); }
.mag-rel__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-rel__text { display: block; padding: var(--s-4); }
.mag-rel__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-base);
  line-height: 1.35;
  color: var(--navy-900);
  margin-bottom: var(--s-2);
}
.mag-rel__dek {
  display: block;
  font-size: var(--t-sm);
  line-height: 1.55;
  color: var(--ink-55);
  margin-bottom: var(--s-3);
}
.mag-rel__date {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red-700);
}
.mag-rel__link:hover .mag-rel__title { color: var(--navy-700); text-decoration: underline; text-underline-offset: 3px; }
.mag-related__all { margin: var(--s-5) 0 0; font-size: var(--t-base); }

/* --- magazine index grid ------------------------------------------------ */
.mag-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
.mag-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-hairline);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: box-shadow 220ms ease, transform 220ms ease, border-color 220ms ease;
}
.mag-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--navy-700);
  z-index: 2;
}
.mag-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 3px; width: 46px;
  background: var(--red-600);
  z-index: 3;
}
.mag-card:hover { box-shadow: var(--sh-lift); border-color: var(--navy-100); transform: translateY(-2px); }
.mag-card__media { display: block; background: var(--paper-200); }
.mag-card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.mag-card__text {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.mag-card__angle {
  font-family: var(--font-body);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-700);
  margin: 0 0 var(--s-3);
}
.mag-card__title {
  font-size: var(--t-lg);
  line-height: 1.3;
  margin: 0 0 var(--s-3);
}
.mag-card__title a {
  color: var(--navy-950);
  background-image: linear-gradient(var(--red-600), var(--red-600));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 2px;
  text-decoration: none;
  transition: background-size 220ms ease, color 180ms ease;
}
.mag-card__title a:hover { background-size: 100% 2px; color: var(--navy-700); }
.mag-card__dek {
  font-size: var(--t-base);
  color: var(--ink-70);
  margin: 0 0 var(--s-4);
  flex: 1;
}
.mag-card__meta {
  margin: 0;
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-55);
}
.mag-card__meta time { color: var(--red-700); font-weight: 700; }
.mag-card__meta span { color: var(--navy-300); }

/* the lead card: article one, given the full width of the ledger */
.mag-card.lead .mag-card__title { font-size: clamp(1.5rem, 1.15rem + 1.3vw, var(--t-3xl)); }
.mag-card.lead .mag-card__dek { font-size: var(--t-lg); }
.mag-card.lead .mag-card__text { padding: clamp(1.25rem, 3vw, var(--s-6)); }
.mag-card.lead::before { height: 5px; }
.mag-card.lead::after { height: 5px; width: 74px; }

.mag-index__cta {
  margin-top: var(--s-7);
  background: var(--navy-950);
  color: #fff;
  border-left: 5px solid var(--red-600);
  border-radius: var(--r-sm);
  padding: clamp(1.5rem, 3vw, var(--s-7));
}
.mag-index__cta h2 { color: #fff; font-size: var(--t-xl); }
.mag-index__cta p { color: var(--navy-100); max-width: 58ch; }
.mag-index__cta p:last-child { margin-bottom: 0; }

/* --- home page teaser --------------------------------------------------- */
.mag-grid--three .mag-card__title { font-size: var(--t-base); }
.mag-grid--three .mag-card__dek { font-size: var(--t-sm); }
.mag-home__more { margin: var(--s-6) 0 0; }

/* --- author page article list ------------------------------------------- */
.mag-list { list-style: none; padding: 0; margin: var(--s-4) 0 0; }
.mag-list li {
  border-top: 1px solid var(--rule-soft);
  padding: 0.8rem 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.3rem var(--s-4);
}
.mag-list li:first-child { border-top: 0; }
.mag-list a { font-family: var(--font-display); font-weight: 700; color: var(--navy-900); }
.mag-list time {
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red-700);
  white-space: nowrap;
}

/* --- magazine breakpoints ---------------------------------------------- */
@media (min-width: 40rem) {
  .mag-author { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-5); align-items: start; }
  .mag-figure { padding: 12px; }
}
@media (min-width: 48rem) {
  .mag-related__grid { grid-template-columns: repeat(3, 1fr); }
  .mag-grid { grid-template-columns: repeat(2, 1fr); }
  .mag-card.lead { grid-column: 1 / -1; }
  .mag-card.lead .mag-card__media img { aspect-ratio: 21 / 9; }
}
@media (min-width: 68rem) {
  .mag-grid { grid-template-columns: repeat(3, 1fr); }
  .mag-card.lead { flex-direction: row; align-items: stretch; }
  .mag-card.lead .mag-card__media { flex: 0 0 55%; }
  .mag-card.lead .mag-card__media img { height: 100%; aspect-ratio: auto; min-height: 22rem; }
  .mag-card.lead .mag-card__text { justify-content: center; }
  .mag-grid--three { grid-template-columns: repeat(3, 1fr); }
}

/* 360px and narrower: the ledger column collapses, nothing overflows */
@media (max-width: 26rem) {
  .mag-body { font-size: var(--t-md); }
  .mag-body h2 { font-size: 1.32rem; }
  .mag-card__text, .mag-author, .mag-cta { padding: var(--s-4); }
  .mag-figure { padding: 6px; }
  .mag-byline { gap: var(--s-2); }
  .mag-body table { display: block; overflow-x: auto; }
}



/* 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%; }
}
