/* ============================================================
   POPR Newsroom — Main Stylesheet
   Premium editorial publication aesthetic
   No framework dependencies, no external assets
   ============================================================ */

/* ===== RESET & CUSTOM PROPERTIES ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== SELECTION ===== */
::selection {
  background: var(--navy);
  color: #fff;
  text-shadow: none;
}

:root {
  --font-serif: 'EB Garamond', Georgia, 'Times New Roman', Times, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --ink:          #1a1a1a;
  --ink-light:    #3d3d3d;
  --ink-muted:    #696969;   /* was #767676; darkened to 5.5:1 on --paper-warm (WCAG AA) */
  --paper:        #ffffff;
  --paper-warm:   #faf9f6;
  --rule:         #ddd9d2;
  --rule-strong:  #b0aaa0;
  --navy:         #1a3a5c;   /* POPR primary */
  --red:          #c0392b;   /* editorial accent */
  --link:         #1a3a5c;
  --link-visited: #5a2d7c;

  --wide:         70rem;
  --narrow:       44rem;
  --gutter:       1.5rem;
}

/* ===== DOCUMENT ===== */
html {
  font-size: 20px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 450;
  line-height: 1.78;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

img { max-width: 100%; display: block; }
abbr { text-decoration: underline dotted; cursor: help; }

/* ===== FOCUS INDICATORS (WCAG 2.2 §2.4.11 / §2.4.12) ===== */
/* Suppress the outline for mouse/touch users — keep it for keyboard */
:focus:not(:focus-visible) { outline: none; }

/* Default keyboard focus ring — navy 3 px, offset so it sits outside the element */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Inverted ring for elements rendered on dark / navy fill */
.btn:focus-visible,
.book-promo-cta:focus-visible {
  outline-color: #fff;
  outline-offset: 4px;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus { left: 1rem; }

/* ===== MASTHEAD ===== */
.masthead {
  border-bottom: 3px solid var(--ink);
  padding: 0 var(--gutter);
}
.masthead-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0 0;
}
.masthead-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}
.masthead-title {
  font-family: var(--font-serif);
  font-size: clamp(2.375rem, 6.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.04;
  color: var(--ink);
  text-decoration: none;
  display: block;
  font-feature-settings: "kern" 1, "liga" 1, "swsh" 1;
}
.masthead-title:hover { color: var(--navy); }
.masthead-tagline {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-top: 0.4rem;
  font-style: italic;
}
.masthead-nav {
  width: 100%;
  border-top: 1px solid var(--rule);
  margin-top: 1.25rem;
  padding: 0.6rem 0 0;
}
.masthead-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}
.masthead-nav a {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-light);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -3px;
}
.masthead-nav a:hover,
.masthead-nav a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--navy);
}
.masthead-nav .sep {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--rule-strong);
  padding: 0.4rem 0;
  user-select: none;
}

/* ===== TRUST STRIP ===== */
.trust-strip {
  background: var(--paper-warm);
  border-bottom: 1px solid var(--rule);
  padding: 0.6rem var(--gutter);
  text-align: center;
}
.trust-strip-inner {
  max-width: var(--wide);
  margin: 0 auto;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--ink-muted);
}
.trust-strip a {
  color: var(--navy);
  /* Persistent underline required: navy vs ink-muted is ~2.1:1 (WCAG 1.4.1) */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 600;
  margin: 0 0.5rem;
}
.trust-strip a:hover { text-decoration-thickness: 2px; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  border-bottom: 1px solid var(--rule);
  background: var(--paper-warm);
  padding: 0.6rem var(--gutter);
}
.breadcrumb-inner {
  max-width: var(--wide);
  margin: 0 auto;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--ink-muted);
}
.breadcrumb li + li::before {
  content: '›';
  margin-right: 0.25rem;
  color: var(--rule-strong);
}
.breadcrumb a {
  color: var(--link);
  /* Persistent underline required: navy vs ink-muted is ~2.1:1 (WCAG 1.4.1) */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.breadcrumb a:hover { text-decoration-thickness: 2px; }

/* ===== LAYOUT WRAPPERS ===== */
.page-wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.content-narrow {
  max-width: var(--narrow);
  margin-left: auto;
  margin-right: auto;
}

/* ===== SECTION HEADING ===== */
.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.section-label h2,
.section-label span {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.section-label-link {
  margin-left: auto;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.section-label-link:hover { text-decoration: underline; }

/* ===== HOMEPAGE ===== */
.homepage-hero {
  border-bottom: 1px solid var(--rule);
  padding: 3rem 0 2.5rem;
}
.homepage-hero-label {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.verified-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
}
.homepage-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 4.75vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.homepage-hero-title a {
  color: var(--ink);
  text-decoration: none;
}
.homepage-hero-title a:hover { color: var(--navy); }
.homepage-hero-dek {
  font-size: 1.0625rem;
  color: var(--ink-light);
  line-height: 1.55;
  max-width: 38rem;
  margin-bottom: 1.25rem;
}
.homepage-hero-meta {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.homepage-hero-meta a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}
.homepage-hero-meta a:hover { text-decoration: underline; }
.homepage-hero-meta .pipe { color: var(--rule-strong); }

/* ===== ARTICLE CARD GRID ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 0;
}
.article-card {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0 1.5rem;
  padding-right: 1.5rem;
}
.article-card:last-child { border-bottom: 1px solid var(--rule); }
.article-card-desk {
  font-family: var(--font-sans);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  display: block;
  margin-bottom: 0.4rem;
}
.article-card-desk:hover { color: var(--navy); }
.article-card-title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  text-wrap: balance;
}
.article-card-title a {
  color: var(--ink);
  text-decoration: none;
}
.article-card-title a:hover { color: var(--navy); }
.article-card-excerpt {
  font-size: 0.875rem;
  color: var(--ink-light);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}
.article-card-meta {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

/* ===== DESK DEPTH INDICATOR ===== */
.desk-depth {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.desk-depth-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rule);
  border: 1px solid var(--rule-strong);
  flex-shrink: 0;
}
.desk-depth-dot--filled {
  background: var(--navy);
  border-color: var(--navy);
}

/* ===== REPORTS ARCHIVE ===== */
.reports-archive {
  border-top: 1px solid var(--rule);
}
.archive-row {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0 1.5rem;
}
.archive-row-title {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  text-wrap: balance;
}
.archive-row-title a {
  color: var(--ink);
  text-decoration: none;
}
.archive-row-title a:hover { color: var(--navy); }

/* ===== DESK HEADER ===== */
.desk-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 2rem;
}
.desk-header-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.5rem;
}
.desk-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}
.desk-header-desc {
  font-size: 1rem;
  color: var(--ink-light);
  max-width: 40rem;
}
.desk-empty {
  padding: 4rem 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ===== ARTICLE PAGE ===== */
.article-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2rem;
}
.article-desk-tag {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.article-desk-tag:hover { color: var(--navy); }
.article-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 4.75vw, 3rem);
  font-weight: 700;
  line-height: 1.13;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.article-dek {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
  font-style: italic;
  margin-bottom: 1.5rem;
  max-width: 40rem;
}
.article-provenance {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--navy);
  padding: 1rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-light);
  line-height: 1.65;
  border-radius: 0 2px 2px 0;
  max-width: var(--narrow);
}
.article-provenance dt {
  display: inline;
  font-weight: 700;
  color: var(--ink);
}
.article-provenance dd {
  display: inline;
  margin-left: 0;
}
.article-provenance dd::after { content: '\A'; white-space: pre; }
.record-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--navy);
  font-style: normal;
}

/* ===== ARTICLE BYLINE ===== */
.article-byline {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-light);
  margin-top: 1rem;
  margin-bottom: 0;
  letter-spacing: 0.01em;
}
.article-byline-link {
  color: var(--navy);
  /* Persistent underline required: navy vs ink-muted is ~2.1:1 (WCAG 1.4.1 non-color cue) */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 600;
}
.article-byline-link:hover { text-decoration-thickness: 2px; }

/* ===== AUTHOR PAGE ===== */
.author-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 2.5rem;
  max-width: var(--narrow);
  margin-left: auto;
  margin-right: auto;
}
.author-header-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}
.author-header-name {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-bottom: 0.375rem;
  text-wrap: balance;
}
.author-header-title {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

/* ===== ARTICLE BODY ===== */
.article-body {
  padding: 2rem 0 1rem;
  hyphens: auto;
  overflow-wrap: break-word;
}
.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.22;
  margin: 2.75rem 0 0.875rem;
  letter-spacing: -0.005em;
  color: var(--ink);
  scroll-margin-top: 5rem;
  text-wrap: balance;
}
.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  margin: 2rem 0 0.625rem;
  color: var(--ink);
  scroll-margin-top: 4rem;
  text-wrap: balance;
}
.article-body p {
  margin-bottom: 1.3rem;
  text-wrap: pretty;
  hanging-punctuation: first;
  border-radius: 3px;
  transition: background 0.3s ease;
}

/* Narration highlight — active paragraph during Listen playback */
.article-body p.narrating {
  background: color-mix(in srgb, var(--navy) 8%, transparent);
  /* Small side padding so the tint doesn't clip the text */
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  /* Space above when auto-scrolled into view: clears the listen bar */
  scroll-margin-top: 6rem;
}

@media (prefers-reduced-motion: reduce) {
  .article-body p { transition: none; }
}
.article-body a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
  transition: color 0.12s, text-decoration-color 0.12s;
}
.article-body a:visited { color: var(--link-visited); }
.article-body a:hover {
  color: var(--red);
  text-decoration-color: var(--red);
}
.article-body blockquote {
  border-left: 3px solid var(--navy);
  margin: 2.25rem 0;
  padding: 0.375rem 1.5rem;
  color: var(--ink-light);
  font-style: italic;
  font-weight: 500;
  font-size: 1.0625rem;
}
.article-body ul,
.article-body ol {
  margin: 0.875rem 0 1.25rem 1.625rem;
}
.article-body li { margin-bottom: 0.375rem; }
.article-body pre {
  background: var(--bg-offset, #f5f5f3);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}
.article-body pre code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink);
  background: none;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}
.article-body hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}
.article-body strong { font-weight: 700; color: var(--ink); }

/* Drop cap on opening paragraph */
.article-body > p:first-of-type::first-letter {
  font-size: 3.75em;
  font-weight: 700;
  float: left;
  line-height: 0.82;
  margin: 0.06em 0.12em 0 0;
  color: var(--ink);
  font-feature-settings: "kern" 1, "liga" 1;
}

/* Pull quote */
.pull-quote {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.42;
  color: var(--navy);
  border-top: 2px solid var(--navy);
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0 1.5rem;
  margin: 2.75rem 0;
  text-wrap: balance;
}

/* Figure caption */
.article-body figure { margin: 2rem 0; }
.article-body figcaption {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--ink-muted);
  font-style: italic;
  margin-top: 0.5rem;
  text-align: center;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

/* ===== SOURCES ===== */
.article-sources {
  border-top: 2px solid var(--rule);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
}
.article-sources-heading {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}
.article-sources ol {
  margin-left: 1.375rem;
  font-size: 0.875rem;
  color: var(--ink-light);
  line-height: 1.6;
}
.article-sources li { margin-bottom: 0.625rem; }
.article-sources a {
  color: var(--link);
  word-break: break-all;
}
.article-sources a:visited { color: var(--link-visited); }
.article-sources a:hover { text-decoration: none; }

/* ===== RELATED ===== */
.article-related {
  border-top: 2px solid var(--ink);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  margin-bottom: 3rem;
}
.article-related-heading {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}
.related-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.25rem;
}
.related-list li {
  border-top: 1px solid var(--rule);
  padding-top: 0.875rem;
}
.related-list a {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
  display: block;
  text-wrap: balance;
}
.related-list a:hover { color: var(--navy); }
.related-list .related-desk {
  font-family: var(--font-sans);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  display: block;
  margin-bottom: 0.25rem;
}

/* ===== TRUST PAGES ===== */
.trust-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 3px solid var(--ink);
  margin-bottom: 2.5rem;
}
.trust-header-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.5rem;
}
.trust-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.625rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.008em;
  line-height: 1.15;
  text-wrap: balance;
}
.trust-body {
  max-width: var(--narrow);
  margin: 0 auto;
  padding-bottom: 4rem;
}
.trust-body h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: var(--ink);
}
.trust-body h3 {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 1.5rem 0 0.5rem;
}
.trust-body p {
  margin-bottom: 1.1rem;
  color: var(--ink-light);
}
.trust-body a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}
.trust-body a:hover { color: var(--red); }
.trust-body ul,
.trust-body ol {
  margin: 0.75rem 0 1.1rem 1.5rem;
  color: var(--ink-light);
}
.trust-body li { margin-bottom: 0.375rem; }
.trust-body strong { color: var(--ink); }

/* ===== FOOTER ===== */
footer {
  background: var(--paper-warm);
  border-top: 3px solid var(--ink);
  padding: 2.5rem var(--gutter) 2rem;
}
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}
.footer-brand-name:hover { color: var(--navy); }
.footer-brand-tagline {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.footer-brand-standard {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--ink-muted);
  line-height: 1.65;
  font-style: italic;
  max-width: 28rem;
}
.footer-col-title {
  font-family: var(--font-sans);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.875rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-light);
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--navy);
  text-decoration: underline;
}
.footer-bottom {
  max-width: var(--wide);
  margin: 2rem auto 0;
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  letter-spacing: 0.04em;
}
.footer-bottom a {
  color: var(--ink-muted);
  text-decoration: none;
}
.footer-bottom a:hover { text-decoration: underline; }

/* ===== 404 ===== */
.error-page {
  padding: 6rem 2rem;
  text-align: center;
}
.error-page-code {
  font-family: var(--font-serif);
  font-size: 7rem;
  font-weight: 700;
  color: var(--rule);
  line-height: 1;
  margin-bottom: 1rem;
}
.error-page h1 {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.error-page p {
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  padding: 0.7rem 1.75rem;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s;
}
.btn:hover { background: var(--ink); }

/* ===== BOOK PROMO BLOCK ===== */
.article-book-promo {
  margin: 2.5rem auto;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--navy);
  padding: 1.5rem 1.75rem;
  background: var(--paper-warm);
}
.book-promo-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.book-promo-label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0;
}
.book-promo-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 0;
}
.book-promo-description {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-light);
  line-height: 1.6;
  margin: 0.25rem 0 0.5rem;
}
.book-promo-cta {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  background: var(--navy);
  padding: 0.55rem 1.25rem;
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s;
}
.book-promo-cta:hover { background: var(--ink); }

/* ===== HOMEPAGE H1 ===== */
.homepage-h1 {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 1.5rem;
}

/* ===== FAQ SHARED ===== */
.faq-list { margin: 0; }
.faq-item {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--rule); }
.faq-item h3 {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.005em;
}
.faq-item p {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-light);
  line-height: 1.65;
}
.faq-item p a { color: var(--navy); }
.faq-item p a:hover { text-decoration: underline; }

/* Article FAQ override — questions use H2 in article context */
.faq-item--article h2 {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 0.5rem;
  letter-spacing: -0.005em;
}

/* ===== HOMEPAGE FAQ SECTION ===== */
.homepage-faq { padding: 3rem 0 2rem; }

/* ===== ARTICLE FAQ SECTION ===== */
.article-faq { padding: 2rem 0 1rem; }
.article-faq-label {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

/* ===== OLDSTYLE NUMERALS ===== */
time,
.article-card-meta,
.homepage-hero-meta,
.article-provenance-line,
.footer-bottom,
.desk-depth + p {
  font-variant-numeric: oldstyle-nums;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-inner .footer-brand {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1.5rem;
  }
}

@media (max-width: 680px) {
  :root { --gutter: 1rem; }
  html { font-size: 17px; }

  .masthead-nav a { padding: 0.375rem 0.55rem; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card { padding-right: 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .article-provenance { font-size: 0.75rem; }
}

@media (max-width: 420px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* ===== ARTICLE HERO IMAGE ===== */
.article-hero-image {
  max-width: var(--wide);
  margin: 0 auto 2.5rem;
  padding: 0 var(--gutter);
}
.article-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

/* ===== ARTICLE PROVENANCE (updated) ===== */
.article-provenance-line {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
  margin-bottom: 0.35rem;
}
.article-provenance-line a {
  color: var(--ink-muted);
  /* Persistent underline required: link matches surrounding text color (WCAG 1.4.1) */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 600;
}
.article-provenance-line a:hover {
  color: var(--navy);
}
.article-provenance-line .record-id {
  font-weight: 700;
  color: var(--ink-light);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.article-provenance-founder {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.25rem;
}
.article-provenance-note {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-style: italic;
  line-height: 1.55;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
}

/* Reading time */
.article-reading-time {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ===== EVIDENCE STATUS BLOCK ===== */
.article-evidence-status {
  margin: 2.5rem auto;
  padding: 1.25rem 1.5rem;
  background: var(--paper-warm);
  border-left: 3px solid var(--rule-strong);
}
.evidence-status-heading {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}
.article-evidence-status p {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-light);
  line-height: 1.65;
}

/* ===== HTML SITEMAP PAGE ===== */
.sitemap-intro {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--ink-light);
  line-height: 1.65;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.sitemap-section {
  margin-bottom: 3rem;
}

.sitemap-section-title {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rule);
}

.sitemap-desk-group {
  margin-bottom: 1.75rem;
}

.sitemap-desk-label {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.sitemap-desk-label a {
  color: var(--ink-muted);
  text-decoration: none;
}

.sitemap-desk-label a:hover {
  color: var(--navy);
}

.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-list--desks .sitemap-list-item {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.sitemap-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.sitemap-list-item:last-child {
  border-bottom: none;
}

.sitemap-item-title {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  line-height: 1.4;
}

.sitemap-item-title:hover {
  text-decoration: underline;
}

.sitemap-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sitemap-item-date {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.sitemap-item-record {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--ink-light);
  letter-spacing: 0.05em;
  background: var(--paper-warm);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.sitemap-item-description {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-light);
  line-height: 1.55;
  width: 100%;
  margin-top: 0.1rem;
}

/* ===== FLUID RESPONSIVE TYPOGRAPHY ===== */
@media screen {
  /* Scale base font smoothly from 17 px on small phones up to 20 px on
     any viewport wider than ~445 px. Uses clamp() so no breakpoint jump. */
  html { font-size: clamp(17px, 4.5vw, 20px); }
  body { font-size: 1rem; } /* follow html instead of locking at 20 px */
}

/* ===== DARK MODE (system preference — no button required) ===== */
/* Overrides every CSS custom property so all components inherit
   the dark palette automatically. No template changes needed. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:          #e2ddd6;   /* warm off-white body text */
    --ink-light:    #c4beb5;
    --ink-muted:    #8c847a;
    --paper:        #111110;   /* near-black, warm undertone */
    --paper-warm:   #191815;
    --rule:         #2a2824;
    --rule-strong:  #3d3a34;
    --navy:         #6b9ec4;   /* lightened POPR primary for dark bg */
    --red:          #e05c4b;   /* editorial accent, slightly brighter */
    --link:         #6b9ec4;
    --link-visited: #a07dc5;
  }

  ::selection { background: #6b9ec4; color: #111; }
}

/* ===== READER TOOLBAR ===== */
/* ===== READER TOOLBAR — Premium card ===== */
.reader-toolbar {
  margin: 2rem auto 2.25rem;
  padding: 1.625rem 1.875rem;
  background: var(--paper-warm);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.055);
}

/* Card header: label + reading-time estimate */
.reader-toolbar-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.125rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--rule);
}

.reader-toolbar-label {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.reader-toolbar-meta {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

/* Listen section */
.listen-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.listen-controls {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

/* Primary action button — large, navy, distinct from secondary controls */
.listen-play-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  border: 2px solid var(--navy);
  border-radius: 3px;
  padding: 0.625rem 1.375rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.listen-play-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.listen-play-btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

/* Thin rule between listen row and secondary controls */
.reader-toolbar-divider {
  height: 1px;
  background: var(--rule);
  margin: 1.125rem 0;
}

/* Secondary controls row */
.reader-secondary-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Secondary reader buttons */
.reader-btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-light);
  background: var(--paper);
  border: 1.5px solid var(--rule-strong);
  border-radius: 3px;
  padding: 0.5rem 0.9375rem;
  cursor: pointer;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  white-space: nowrap;
  line-height: 1;
}

.reader-btn:hover {
  color: var(--navy);
  border-color: var(--navy);
  background: var(--paper);
}

.reader-btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* Active / pressed state */
.reader-btn[aria-pressed="true"] {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
}

.reader-btn[aria-pressed="true"]:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Save: saved-state green */
.save-article-btn--saved {
  color: #fff !important;
  background: #2a6e3f !important;
  border-color: #2a6e3f !important;
}
.save-article-btn--saved:hover {
  background: #1f5430 !important;
  border-color: #1f5430 !important;
}

/* Speed button group */
.listen-speed-group {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}

.listen-speed--active {
  color: var(--navy);
  border-color: var(--navy);
  background: var(--paper);
}

/* Font-size group — pushed to the far right */
.font-size-controls {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  margin-left: auto;
}

.font-size-btn--active {
  color: var(--navy);
  border-color: var(--navy);
}

/* Listen status (Playing / Paused) */
.listen-status {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  min-width: 3.5rem;
}

/* Unsupported fallback message */
.listen-unsupported {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* Reader-mode body state */
.reader-mode-active .content-narrow {
  max-width: 40rem;
}

/* Hide toolbar in print */

/* ===== SAVED ARTICLES PAGE ===== */
.saved-articles-body {
  padding-bottom: 4rem;
}

.saved-intro {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.saved-empty {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--ink-muted);
  padding: 3rem 0;
  text-align: center;
}

.saved-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.saved-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}

.saved-item:first-child {
  border-top: 1px solid var(--rule);
}

.saved-item-title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
  flex: 1 1 60%;
}

.saved-item-title:hover { color: var(--navy); }
.saved-item-title:visited { color: var(--link-visited); }

.saved-item-meta {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  color: var(--ink-muted);
  flex: 0 0 auto;
}

.saved-remove-btn {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  flex: 0 0 auto;
}

.saved-remove-btn:hover {
  color: var(--red);
  border-color: var(--red);
}

.saved-remove-btn:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .reader-toolbar {
    padding: 1.25rem 1.25rem;
  }

  .font-size-controls {
    margin-left: 0;
  }

  .saved-item {
    flex-direction: column;
    gap: 0.35rem;
  }

  .saved-item-title {
    flex: 1 1 100%;
  }
}

/* ===== REDUCED MOTION (WCAG 2.3.3) ===== */
/* Honor the OS "Reduce Motion" preference. Suppresses smooth scrolling
   and CSS transitions so users with vestibular disorders are not harmed.
   Visual design (colors, borders, layout) is unchanged for these users. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  /* Nav link underline slide */
  .masthead-nav a {
    transition: none;
  }

  /* Masthead wordmark hover — color still changes, just instantly */
  .masthead-title {
    transition: none;
  }

  /* CTA buttons */
  .btn,
  .book-promo-cta {
    transition: none;
  }

  /* Reader toolbar buttons */
  .listen-play-btn,
  .reader-btn,
  .saved-remove-btn {
    transition: none;
  }

  /* In-article link color / underline colour shifts */
  .article-body a {
    transition: none;
  }
}

/* ===== PRINT ===== */
@media print {
  /* ── Hide chrome, navigation, and supplemental modules ── */
  .skip-link,
  .masthead-nav,
  .trust-strip,
  .breadcrumb,
  .reader-toolbar,
  .article-related,
  .article-book-promo,
  footer { display: none; }

  /* ── White page, black ink throughout ── */
  body    { background: #fff; color: #000; font-size: 11pt; line-height: 1.55; }
  main    { background: #fff; }
  article { background: #fff; }
  section, aside, header { background: transparent; }

  /* ── Masthead: keep wordmark for publication identity ── */
  .masthead            { border-bottom: 2pt solid #000; background: #fff; padding-bottom: 0.5rem; }
  .masthead-eyebrow    { color: #000; font-size: 7pt; letter-spacing: 0.12em; }
  .masthead-title      { color: #000; font-size: 18pt; }
  .masthead-tagline    { color: #555; font-size: 8pt; }

  /* ── Article header ── */
  .article-desk-tag  { color: #555; }
  .article-headline  { color: #000; font-size: 22pt; line-height: 1.2; }
  .article-dek       { color: #333; font-size: 13pt; line-height: 1.4; }

  /* ── Provenance strip ── */
  .article-provenance { background: none; border-left-color: #000; }
  .article-provenance,
  .article-provenance * { color: #555; }

  /* ── Body text and links ── */
  a { color: #000; text-decoration: underline; }
  .article-body a::after {
    content: ' (' attr(href) ')';
    font-size: 8pt;
    color: #555;
  }

  /* ── Hero image: keep for document identity, cap print height ── */
  .article-hero-image img { max-height: 3in; width: auto; }

  /* ── Evidence status aside ── */
  .article-evidence-status {
    border: 1pt solid #000;
    background: none;
    padding: 8pt;
  }
  .article-evidence-status * { color: #000; }

  /* ── FAQ section ── */
  .article-faq { border-top: 1pt solid #000; }
  .faq-item { page-break-inside: avoid; }

  /* ── Sources ── */
  .article-sources { border-top: 1pt solid #000; }

  /* ── Page break rules ── */
  h2, h3         { page-break-after: avoid; }
  figure         { page-break-inside: avoid; }

  /* ── Full-width layout (remove narrow content columns) ── */
  .content-narrow,
  .page-wrap { max-width: 100%; }
}
