/* ============================================================
   design-profiler · a journal for design developers
   Editorial print language, modern bones. One stylesheet,
   no frameworks, no build step, system fonts only.
   ============================================================ */

:root {
  --paper: #f7f5ef;
  --paper-deep: #efede4;
  --ink: #211f1a;
  --ink-soft: #4a463c;
  --ink-faint: #7a7568;
  --rule: #c9c4b4;
  --rule-dark: #8f8a79;
  --link: #1c3f94;
  --link-visited: #5a3d8a;
  --accent: #8a2b1d;            /* oxblood */
  --accent-deep: #6f2116;
  --accent-soft: #f3e9e0;
  --code-bg: #efece1;
  --ok: #2c5c34;

  --serif: Georgia, "Times New Roman", "Nimbus Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, "Courier New", monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --measure: 68ch;
}

/* ---------- Reset, lightly ---------- */
* { box-sizing: border-box; }
html { font-size: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent); text-decoration: none; }

h1, h2, h3, h4 {
  font-weight: normal;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

hr { border: none; border-top: 1px solid var(--rule); margin: 1.5em 0; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.875rem;
  padding: 8px 14px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Page frame ---------- */
.page {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Utility bar ---------- */
.utility-bar {
  background: var(--ink);
  color: #e8e4d8;
  font-family: var(--sans);
  font-size: 0.78125rem;
  padding: 6px 0;
}
.utility-bar .page {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
}
.utility-bar a { color: #e8e4d8; text-decoration: none; margin-right: 1.1em; }
.utility-bar a:hover { text-decoration: underline; color: #fff; }
.utility-bar .date-line { font-style: italic; font-family: var(--serif); }

/* ---------- Masthead ---------- */
.nameplate {
  border-bottom: 3px double var(--ink);
  padding: 26px 0 16px;
  text-align: center;
}
.nameplate .kicker {
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.6em;
}
.nameplate .kicker .mark { color: var(--accent); letter-spacing: 0; }
.nameplate h1,
.nameplate .nameplate-title {
  font-size: clamp(2rem, 4.6vw, 2.85rem);
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 16px);
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: clamp(38px, 5vw, 50px);
  height: clamp(38px, 5vw, 50px);
  flex: none;
  display: block;
}
.brand-mark--sm { width: 18px; height: 18px; }
.foot-brand { display: flex; align-items: center; gap: 8px; }
.nameplate h1 a,
.nameplate .nameplate-title a { color: var(--ink); text-decoration: none; }
.nameplate h1 em,
.nameplate .nameplate-title em { color: var(--accent); font-style: italic; }
.nameplate .tagline {
  font-style: italic;
  color: var(--ink-soft);
  margin: 0.45em 0 0;
}

/* ---------- Primary navigation (sticky) ---------- */
.primary-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  transition: box-shadow 200ms var(--ease-out);
}
.primary-nav.is-stuck { box-shadow: 0 6px 18px rgba(33, 31, 26, 0.12); }
.primary-nav .page {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}
.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.primary-nav li { margin: 0; }
.primary-nav ul a {
  display: block;
  padding: 11px 18px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.84375rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-left: 1px solid var(--rule);
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.primary-nav li:first-child a { border-left: none; }
.primary-nav ul a:hover { background: var(--ink); color: var(--paper); }
.primary-nav ul a[aria-current="page"] {
  background: var(--paper-deep);
  box-shadow: inset 0 2px 0 var(--accent);
}
.primary-nav .nav-cta {
  align-self: center;
  margin: 6px 0 6px 16px;
  padding: 7px 18px;
}
.primary-nav a.nav-cta,
.primary-nav a.nav-cta:hover {
  color: var(--paper);
}
.primary-nav a.nav-cta:hover { background: var(--accent-deep); }
.primary-nav a.nav-cta[aria-current="page"] {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

/* ---------- Buttons ---------- */
/* Shape rule: interactive controls get a 2px radius; everything else stays sharp. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  background: transparent;
  padding: 9px 19px;
  cursor: pointer;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out),
              border-color 160ms var(--ease-out), transform 100ms var(--ease-out),
              box-shadow 160ms var(--ease-out);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn--accent {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: var(--paper);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22);   /* letterpress bottom edge */
}
.btn--accent:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--paper);
}
.btn--accent:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.22); }
.btn .arrow { font-family: var(--serif); font-weight: normal; letter-spacing: 0; transition: transform 160ms var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Layout ---------- */
.content { padding: 30px 0 44px; }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 36px;
}
@media (max-width: 1024px) {
  .two-col { grid-template-columns: 1fr; }
  .sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 28px;
  }
  .sidebar .box { margin-bottom: 0; }
}

/* ---------- Section headers ---------- */
.section-head {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  margin: 2.2em 0 1.1em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
}
.section-head h2 {
  font-size: 1.3125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}
.section-head .more {
  font-size: 0.8125rem;
  font-style: italic;
  white-space: nowrap;
}

/* ---------- Featured stories (front page) ---------- */
.feat { margin-top: 4px; }
.feat__label {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 7px 26px 7px 14px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  margin-bottom: 20px;
}
.feat__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 36px;
  align-items: start;
}
@media (max-width: 1024px) {
  .feat__grid { grid-template-columns: 1fr; gap: 26px; }
}

.feat-lead figure { margin: 0 0 14px; }
.feat-lead img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--rule-dark);
}
.feat-lead .kicker-row {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.45em;
}
.feat-lead .kicker-row .dept { color: var(--accent); font-weight: 600; }
.feat-lead h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.15; margin-bottom: 0.35em; }
.feat-lead h2 a { color: var(--ink); text-decoration: none; }
.feat-lead h2 a:hover { color: var(--accent); text-decoration: underline; }
.feat-lead .dek { font-size: 1.125rem; font-style: italic; color: var(--ink-soft); max-width: var(--measure); margin-bottom: 0.5em; }

.feat-list { list-style: none; margin: 0; padding: 0; }
.feat-list li {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.feat-list li:first-child { padding-top: 2px; }
.feat-list .thumb { overflow: hidden; border: 1px solid var(--rule-dark); }
.feat-list .thumb img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  transition: transform 220ms var(--ease-out);
}
.feat-list li:hover .thumb img { transform: scale(1.03); }
.feat-list h3 { font-size: 1.0625rem; line-height: 1.3; margin: 0 0 0.35em; }
.feat-list h3 a { color: var(--ink); text-decoration: none; }
.feat-list h3 a:hover { color: var(--accent); text-decoration: underline; }
.feat-list .meta {
  font-family: var(--sans);
  font-size: 0.71875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}
.feat-list .meta .dept { color: var(--accent); font-weight: 600; }
.feat__all { margin-top: 18px; }

/* ---------- Story rows with thumbnails ---------- */
.story-list { list-style: none; margin: 0; padding: 0; }
.story-list li {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 20px;
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  align-items: start;
}
.story-list .thumb { overflow: hidden; border: 1px solid var(--rule-dark); }
.story-list .thumb img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 220ms var(--ease-out);
}
.story-list li:hover .thumb img { transform: scale(1.03); }
.story-list .meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-faint);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.3em;
}
.story-list .meta .tag { color: var(--accent); font-weight: 600; }
.story-list h3 { font-size: 1.3125rem; margin-bottom: 0.25em; }
.story-list h3 a { color: var(--ink); text-decoration: none; }
.story-list h3 a:hover { color: var(--accent); text-decoration: underline; }
.story-list .summary { margin: 0; max-width: var(--measure); color: var(--ink-soft); }
@media (max-width: 640px) {
  .story-list li { grid-template-columns: 1fr; }
  .feat-list li { grid-template-columns: 104px 1fr; }
}

/* ---------- Department rail (scroll-snap slider) ---------- */
.rail { position: relative; }
.rail__controls { display: flex; gap: 6px; }
.rail__btn {
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  width: 32px;
  height: 32px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 160ms var(--ease-out), color 160ms var(--ease-out), opacity 160ms;
}
.rail__btn:hover { background: var(--ink); color: var(--paper); }
.rail__btn:active { transform: translateY(1px); }
.rail__btn[disabled] { opacity: 0.35; cursor: default; }
.rail__btn[disabled]:hover { background: var(--paper); color: var(--ink); }
.rail__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 262px;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-dark) transparent;
}
.rail-card {
  scroll-snap-align: start;
  border-top: 2px solid var(--ink);
  padding-top: 0.8em;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}
.rail-card .dept {
  font-family: var(--sans);
  font-size: 0.71875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.rail-card h3 { font-size: 1.1875rem; margin: 0; }
.rail-card h3 a { color: var(--ink); text-decoration: none; }
.rail-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.rail-card p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; flex: 1; }
.rail-card .go { font-size: 0.875rem; font-style: italic; }
@media (max-width: 640px) { .rail__track { grid-auto-columns: 78vw; } }

/* ---------- By the numbers ---------- */
.numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 840px) { .numbers { grid-template-columns: 1fr; } }
.stat {
  border: 1px solid var(--rule-dark);
  background: var(--paper-deep);
  padding: 16px 18px;
}
.stat .num {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.3em;
}
.stat p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0 0 0.5em; }
.stat cite {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* ---------- Sidebar ---------- */
.sidebar .box {
  border: 1px solid var(--rule-dark);
  background: var(--paper-deep);
  padding: 14px 16px;
  margin-bottom: 24px;
}
.sidebar .box h3 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: 6px;
  margin-bottom: 0.75em;
}
.sidebar .box ul { list-style: none; margin: 0; padding: 0; }
.sidebar .box li { padding: 0.35em 0; border-bottom: 1px dotted var(--rule-dark); font-size: 0.9375rem; }
.sidebar .box li:last-child { border-bottom: none; }
.sidebar .box .rank { display: inline-block; width: 1.6em; color: var(--accent); font-weight: bold; }
.sidebar .note { font-size: 0.875rem; font-style: italic; color: var(--ink-soft); }
.sidebar .box .btn { margin-top: 4px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-family: var(--sans);
  font-size: 0.78125rem;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin: 0 0 0.9em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}
.breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Page head (hub + legal pages) ---------- */
.page-hero { padding: 6px 0 4px; }
.page-hero .hero__glow { display: none; }
.page-hero__inner { max-width: none; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.12; margin: 0.1em 0 0.35em; }
.page-hero p.lead {
  font-size: 1.1875rem;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 78ch;
  margin-bottom: 0.6em;
}
.legal-updated {
  font-family: var(--sans);
  font-size: 0.78125rem;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ---------- Page banner ---------- */
.page-banner {
  margin: 14px 0 26px;
  border: 1px solid var(--rule-dark);
}
.page-banner img {
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
}
@media (max-width: 720px) { .page-banner img { aspect-ratio: 16 / 9; } }

/* ---------- Tags & meta ---------- */
.tag, .tag-row .tag {
  font-family: var(--sans);
  font-size: 0.71875rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}
.tag-row { display: flex; gap: 0.9em; align-items: baseline; flex-wrap: wrap; }
.tag-row .meta, .article-meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6em;
  align-items: baseline;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.9em;
  margin-bottom: 1.2em;
}

/* ---------- Article layout with sticky TOC ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
.article-body { min-width: 0; }

.article-hero-img { margin: 0 0 1.4em; border: 1px solid var(--rule-dark); }
.article-hero-img img { width: 100%; aspect-ratio: 21 / 10; object-fit: cover; }
.article-hero-img figcaption {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--ink-faint);
  padding: 8px 12px;
  border-top: 1px solid var(--rule);
}

.toc {
  position: sticky;
  top: 66px;
  font-family: var(--sans);
  font-size: 0.84375rem;
}
.toc__title {
  font-size: 0.71875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.75rem;
}
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule-dark); }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 0.4rem 0 0.4rem 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1.5px;
  line-height: 1.35;
  transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc {
    position: static;
    order: -1;
    border: 1px solid var(--rule-dark);
    background: var(--paper-deep);
    padding: 14px 16px;
  }
  .toc ol { border-left: 0; column-count: 2; column-gap: 2rem; }
  .toc a { border-left: 0; padding-left: 0; margin-left: 0; }
}
@media (max-width: 620px) { .toc ol { column-count: 1; } }

/* ---------- Prose ---------- */
.prose { font-size: 1.0625rem; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  font-size: 1.5rem;
  margin-top: 1.6em;
  border-top: 1px solid var(--rule);
  padding-top: 0.9em;
}
.prose h3 { font-size: 1.1875rem; margin-top: 1.4em; font-style: italic; }
.prose blockquote {
  margin: 1.4em 0;
  padding: 0 0 0 1.25em;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--ink-soft);
}
.prose code, .article-body code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--code-bg);
  border: 1px solid var(--rule);
  padding: 0 4px;
}
.prose pre, .article-body pre {
  font-family: var(--mono);
  font-size: 0.84375rem;
  line-height: 1.55;
  background: var(--code-bg);
  border: 1px solid var(--rule-dark);
  border-left: 3px solid var(--accent);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 1.4em 0;
}
.prose pre code { background: none; border: none; padding: 0; font-size: inherit; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin-bottom: 0.4em; }
.prose h2[id], .prose section, .sources h2[id] { scroll-margin-top: 70px; }
.prose section + section { margin-top: 1.6em; }

/* ---------- Data table ---------- */
.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--rule-dark); }
.data-table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.data-table th {
  font-family: var(--sans);
  font-size: 0.71875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  background: var(--paper-deep);
  border-bottom: 2px solid var(--ink);
  padding: 9px 12px;
}
.data-table td { border-bottom: 1px solid var(--rule); padding: 9px 12px; vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.pill {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--ink);
  white-space: nowrap;
}
.pill--ok { background: var(--ink); color: var(--paper); }
.pill--warn { border-color: var(--accent); color: var(--accent); }

/* ---------- Sources / further reading ---------- */
.sources {
  border-top: 3px double var(--ink);
  margin-top: 2.4em;
  padding-top: 1em;
}
.sources h2 { font-size: 1.1875rem; letter-spacing: 0.05em; text-transform: uppercase; }
.sources ul { list-style: none; margin: 0; padding: 0; }
.sources li { padding: 0.35em 0; border-bottom: 1px dotted var(--rule-dark); font-size: 0.9375rem; }
.sources li:last-child { border-bottom: none; }

/* ---------- Mini features ("more from the journal") ---------- */
.featured-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 840px) { .featured-list { grid-template-columns: 1fr; } }
.mini-feature {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  border-top: 2px solid var(--ink);
  padding-top: 0.9em;
  align-items: start;
}
.mini-feature__art { overflow: hidden; border: 1px solid var(--rule-dark); }
.mini-feature__art img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 220ms var(--ease-out);
}
.mini-feature:hover .mini-feature__art img { transform: scale(1.03); }
.mini-feature h3 { font-size: 1.125rem; margin: 0.25em 0; }
.mini-feature h3 a { color: var(--ink); text-decoration: none; }
.mini-feature h3 a:hover { color: var(--accent); text-decoration: underline; }
.mini-feature p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 480px) { .mini-feature { grid-template-columns: 1fr; } }

/* ---------- Section head aliases (ported markup) ---------- */
.section__head {
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  margin: 2.2em 0 1.1em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  flex-wrap: wrap;
}
.section__title { font-size: 1.3125rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0; }
.section__more { font-size: 0.8125rem; font-style: italic; white-space: nowrap; }
.section { padding: 0; }

/* ---------- Topic sections ---------- */
.topic-section { border-top: 2px solid var(--ink); padding-top: 1em; margin-top: 2.2em; }
.topic-section:first-of-type { margin-top: 1.4em; }
.topic-section h2 { font-size: 1.5rem; margin-bottom: 0.3em; }
.topic-section h2 .num { color: var(--accent); font-size: 0.9em; margin-right: 0.4em; }
.topic-section > p { color: var(--ink-soft); max-width: 76ch; }
.topic-section .start-here {
  font-size: 0.9375rem;
  font-style: italic;
  margin-top: 0.9em;
}
.topic-section .start-here .lbl {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.71875rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-right: 0.6em;
}

/* ---------- Fact cards ---------- */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin: 1.2em 0 0.4em;
}
.fact-card {
  border: 1px solid var(--rule-dark);
  background: var(--paper-deep);
  padding: 14px 16px;
}
.fact-card .fact-num,
.fact-card strong.fact-num {
  display: block;
  font-size: 2.1rem;
  font-weight: normal;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.35em;
}
.fact-card p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0 0 0.45em; }
.fact-card cite { font-family: var(--sans); font-style: normal; font-size: 0.75rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 0; max-width: 860px; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer;
  padding: 0.85em 0;
  font-size: 1.0625rem;
  list-style: none;
  position: relative;
  padding-right: 2em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2em;
  top: 0.7em;
  color: var(--accent);
  font-size: 1.2em;
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ink-soft); margin: 0 0 1em; max-width: 76ch; }

/* ---------- Subscribe / contact panels ---------- */
.subscribe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 1.2em;
}
@media (max-width: 840px) { .subscribe-grid { grid-template-columns: 1fr; } }
.panel {
  border: 1px solid var(--rule-dark);
  background: var(--paper-deep);
  padding: 20px 22px;
}
.panel h2 {
  font-size: 1.3125rem;
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: 0.4em;
  margin-bottom: 0.7em;
}
.panel h3 {
  font-family: var(--sans);
  font-size: 0.78125rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  margin: 1.3em 0 0.4em;
}
.panel ul { padding-left: 1.2em; margin: 0 0 1em; }
.panel li { margin-bottom: 0.5em; font-size: 0.9843rem; }
.panel a { color: var(--link); }
.contact-line code {
  font-family: var(--mono);
  font-size: 0.9375rem;
  background: var(--code-bg);
  border: 1px solid var(--rule);
  padding: 4px 9px;
  display: inline-block;
}

.subscribe-form { display: grid; gap: 8px; margin: 0.4em 0 1.4em; }
.subscribe-form label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.subscribe-form input {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 10px 12px;
}
.subscribe-form input:focus-visible { outline-offset: 0; }
.subscribe-form .btn { justify-self: start; }
.form-note { font-family: var(--sans); font-size: 0.84375rem; margin: 0; min-height: 1.2em; }
.form-note.is-ok { color: var(--ok); }
.form-note.is-err { color: var(--accent); }

/* ---------- Filter bar (articles page) ---------- */
.filter-bar {
  border: 1px solid var(--rule-dark);
  background: var(--paper-deep);
  padding: 10px 14px;
  margin: 0;
  font-size: 0.9375rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
}
.filter-bar .label { font-variant: small-caps; letter-spacing: 0.06em; margin-right: 0.4em; }
.filter-bar .chip {
  font-family: var(--sans);
  font-size: 0.78125rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--paper);
  border: 1px solid var(--rule-dark);
  padding: 3px 12px;
  border-radius: 2px;
  cursor: pointer;
  color: var(--ink);
  transition: background 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms;
}
.filter-bar .chip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter-bar .chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ---------- Article index rows ---------- */
.article-grid { display: block; }
.article-card {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 22px;
  border-bottom: 1px solid var(--rule);
  padding: 20px 0;
  align-items: start;
  scroll-margin-top: 70px;
}
.article-card.is-filtered-out { display: none; }
.article-card__thumb { overflow: hidden; border: 1px solid var(--rule-dark); }
.article-card__thumb img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 220ms var(--ease-out);
}
.article-card:hover .article-card__thumb img { transform: scale(1.03); }
.article-card h3 { font-size: 1.375rem; margin: 0.25em 0 0.3em; }
.article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.article-card p { margin: 0 0 0.5em; max-width: var(--measure); color: var(--ink-soft); }
.article-card__sources {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--ink-faint);
}
@media (max-width: 640px) { .article-card { grid-template-columns: 1fr; } }

/* ---------- Subscribe strip ---------- */
.newsletter {
  border-top: 3px double var(--ink);
  border-bottom: 3px double var(--ink);
  text-align: center;
  padding: 2em 1em;
  margin-top: 2.4em;
}
.newsletter h2 { font-size: 1.5rem; margin-bottom: 0.3em; }
.newsletter p { color: var(--ink-soft); font-style: italic; max-width: 56ch; margin: 0 auto 1.1em; }
.newsletter .newsletter__glow { display: none; }
.newsletter__cta { display: flex; justify-content: center; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Footer ---------- */
.colophon-strip {
  border-top: 1px solid var(--rule);
  background: var(--paper-deep);
  padding: 30px 0;
  font-size: 0.9375rem;
  margin-top: 44px;
}
.colophon-strip .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 26px;
}
@media (max-width: 840px) { .colophon-strip .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .colophon-strip .cols { grid-template-columns: 1fr; } }
.colophon-strip h4 {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: 5px;
  margin-bottom: 0.6em;
}
.colophon-strip ul { list-style: none; margin: 0; padding: 0; }
.colophon-strip li { margin-bottom: 0.35em; }
.colophon-strip .about-blurb { font-style: italic; color: var(--ink-soft); margin: 0 0 0.6em; }
.colophon-strip .webring {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
}

.legal-bar {
  background: var(--ink);
  color: #b9b4a4;
  font-family: var(--sans);
  font-size: 0.78125rem;
  padding: 10px 0;
}
.legal-bar .page { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5em; }
.legal-bar a { color: #d8d3c3; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .nameplate h1,
.nameplate .nameplate-title { font-size: 1.9rem; }
  .primary-nav a { padding: 9px 12px; font-size: 0.78125rem; }
  .feat-lead h2 { font-size: 1.4rem; }
}

/* ---------- Print ---------- */
@media print {
  .utility-bar, .primary-nav, .sidebar, .colophon-strip, .legal-bar,
  .filter-bar, .rail__controls, .toc, .skip-link { display: none; }
  body { background: #fff; font-size: 12pt; }
  .two-col, .article-layout, .feat__grid { grid-template-columns: 1fr; }
  a { color: #000; }
}


/* ---------- Ported-markup aliases ---------- */
.container { max-width: 1140px; margin-inline: auto; padding-inline: 20px; }
.prose blockquote cite {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.6em;
}

/* Ported mains carry their own bottom padding; give them the top gap */
main:not(.content) { display: block; padding-top: 26px; }

/* ============================================================
   Responsive hardening layer
   Later rules win; everything below makes narrow viewports
   first-class on every page.
   ============================================================ */

/* No layout may ever force a horizontal scrollbar. */
html, body { overflow-x: hidden; overflow-x: clip; }

/* Grid children shrink instead of overflowing. */
.two-col > *,
.feat__grid > *,
.article-layout > *,
.subscribe-grid > *,
.story-list li > *,
.feat-list li > *,
.article-card > *,
.mini-feature > * { min-width: 0; }
.rail, .rail__track, .table-wrap, pre { max-width: 100%; }

/* Wide data tables scroll inside their frame instead of crushing. */
.data-table { min-width: 560px; }

/* Section headers wrap when a heading meets controls or chips. */
.section-head, .section__head { flex-wrap: wrap; row-gap: 8px; }

/* ---------- ≤ 860px: utility bar & masthead ---------- */
@media (max-width: 860px) {
  .utility-bar .page { flex-wrap: wrap; justify-content: center; row-gap: 2px; }
  .utility-bar a { margin: 0 0.55em; }
}
@media (max-width: 560px) {
  .utility-bar .date-line { display: none; }
  .nameplate { padding: 20px 0 14px; }
  .nameplate .kicker { letter-spacing: 0.22em; font-size: 0.625rem; }
  .nameplate .tagline { font-size: 0.9375rem; }
}

/* ---------- ≤ 720px: navigation ---------- */
@media (max-width: 720px) {
  .primary-nav { position: static; }   /* two-row nav shouldn't eat the viewport */
  .primary-nav .page {
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 2px;
    padding-bottom: 8px;
    row-gap: 4px;
  }
  .primary-nav ul { width: 100%; }
  .primary-nav ul a { border-left: none; padding: 9px 13px; }
  .primary-nav .nav-cta { margin: 2px 0 0; }
}

/* ---------- ≤ 640px: content rhythm ---------- */
@media (max-width: 640px) {
  .page, .container { padding-inline: 16px; }
  body { font-size: 1rem; }
  .content, main:not(.content) { padding-top: 20px; }

  .feat__label { margin-bottom: 14px; }
  .feat-lead img { aspect-ratio: 16 / 11; }
  .feat-lead .dek { font-size: 1.0625rem; }
  .feat__all { text-align: center; }

  .story-list li { gap: 12px; padding: 14px 0; }
  .story-list .thumb img { aspect-ratio: 16 / 9; }
  .story-list h3 { font-size: 1.1875rem; }

  .article-card { gap: 14px; }
  .article-card__thumb img { aspect-ratio: 16 / 9; }
  .article-card h3 { font-size: 1.25rem; }

  .article-hero-img img { aspect-ratio: 16 / 10; }
  .page-hero h1 { font-size: 1.6rem; }
  .page-hero p.lead { font-size: 1.0625rem; }
  .prose h2 { font-size: 1.3125rem; }

  .filter-bar .chip { padding: 7px 14px; }   /* comfortable tap targets */
  .rail__btn { width: 38px; height: 38px; }
  .stat .num { font-size: 2rem; }
  .panel { padding: 16px; }
  .newsletter { padding: 1.6em 0.8em; }

  .colophon-strip { padding: 22px 0; margin-top: 30px; }
  .legal-bar .page { justify-content: center; text-align: center; }
}

/* ---------- ≤ 400px: the smallest phones ---------- */
@media (max-width: 400px) {
  .nameplate h1, .nameplate .nameplate-title { font-size: 1.7rem; }
  .brand-mark { width: 34px; height: 34px; }
  .primary-nav ul a { padding: 9px 10px; font-size: 0.75rem; }
  .feat-list li { grid-template-columns: 88px 1fr; gap: 12px; }
  .toc ol { column-count: 1; }
}
