/* Feynmanpedia — modern editorial reference, 2026 */

/* Self-hosted variable fonts — no external requests, EU-friendly */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/fraunces-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/source-serif-4-latin.woff2') format('woff2');
}

:root {
  /* Surface */
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-soft: #f5f5f0;

  /* Ink */
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --ink-4: #94a3b8;

  /* Rules */
  --rule: #e2e8f0;
  --rule-soft: #f1f5f9;

  /* Accent (clay) */
  --accent: #cc785c;
  --accent-deep: #a35a40;
  --accent-soft: #fbe9df;
  --accent-tint: #fdf5ef;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px -4px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px -12px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.04);

  /* Layout */
  --max-content: 720px;
  --max-page: 1200px;
  --radius: 10px;
  --radius-sm: 6px;
}

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

html { background: var(--bg); }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--accent-soft); color: var(--ink); }

a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-color: rgba(204, 120, 92, 0.4);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0;
}

p { margin: 0 0 1em; }

/* ===== Site header ===== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(250, 250, 247, 0.85);
}
.site-header-inner {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}
.site-brand-mark {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: var(--radius-sm);
}
.site-brand-text {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--ink);
}
.site-brand-text small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--ink-3);
  margin-top: 1px;
}
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ===== Site footer ===== */
.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 5rem;
  background: var(--bg);
}
.footer-inner {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.footer-copy { margin: 0; }
.footer-note { color: var(--ink-4); }
.footer-note a { color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--rule); }
.footer-note a:hover { color: var(--accent-deep); text-decoration-color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-links a { color: var(--ink-3); text-decoration: none; }
.footer-links a:hover { color: var(--accent-deep); text-decoration: underline; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin: 1.5rem 0 1rem;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-left: 0.4rem;
  color: var(--ink-4);
}
.breadcrumb a { color: var(--ink-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-deep); text-decoration: underline; }
.breadcrumb li[aria-current="page"] { color: var(--ink); }

/* ===== Article shell (article + sidebar) ===== */
.article-shell {
  max-width: var(--max-page);
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
}
@media (min-width: 1040px) {
  .article-shell {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 3.5rem;
  }
}
.article-main { min-width: 0; }
.article-sidebar { min-width: 0; }
@media (min-width: 1040px) {
  .article-sidebar {
    position: sticky;
    top: 5rem;
    align-self: start;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }
}

/* Article hero */
.article-hero { margin: 0 0 2rem; }
.article-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  box-shadow: var(--shadow-md);
  max-height: 360px;
}
.article-hero figcaption {
  font-size: 0.85rem;
  color: var(--ink-3);
  margin-top: 0.7rem;
  padding-left: 0.1rem;
  max-width: var(--max-content);
  font-style: italic;
}

/* Article header */
.article-header { max-width: var(--max-content); margin-bottom: 2rem; }
.article-kicker {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-deep);
  margin: 0 0 0.65rem;
  letter-spacing: 0.02em;
}
.article-kicker a { color: inherit; text-decoration: none; }
.article-kicker a:hover { text-decoration: underline; }
.article-header h1 {
  font-size: clamp(2rem, 4.4vw, 2.85rem);
  letter-spacing: -0.022em;
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 1rem;
  text-wrap: balance;
  font-weight: 500;
}
.byline {
  font-size: 0.9rem;
  color: var(--ink-3);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  align-items: center;
}
.byline::before { display: none; }

/* Summary box */
.summary-box {
  max-width: var(--max-content);
  margin: 0 0 2.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.summary-box p {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
  line-height: 1.55;
}

/* Article body */
.article-body { max-width: var(--max-content); font-size: 1.05rem; color: var(--ink-2); }
.article-body p { color: var(--ink-2); }
.article-body h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 0.85rem;
  color: var(--ink);
  font-weight: 500;
}
.article-body h3 {
  font-size: 1.25rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--ink);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.01em;
}
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body em { color: var(--ink); }
.article-body blockquote {
  margin: 1.75em 0;
  padding: 0.5em 1.25em;
  border-left: 3px solid var(--accent);
  background: var(--accent-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--ink);
}
.article-body ul, .article-body ol { padding-left: 1.5em; margin: 0.5em 0 1.25em; }
.article-body li { margin: 0.35em 0; color: var(--ink-2); }
.article-body li::marker { color: var(--ink-4); }
.article-body code {
  background: var(--surface-soft);
  border: 1px solid var(--rule);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: var(--ink);
}
.article-body a { font-weight: 500; }
.article-body img {
  max-width: 100%;
  height: auto;
  margin: 1.5em auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.article-body hr {
  border: 0;
  margin: 2.5em 0;
  text-align: center;
}
.article-body hr::before {
  content: '· · ·';
  letter-spacing: 0.5em;
  color: var(--ink-4);
}

/* FAQ */
.faq { max-width: var(--max-content); margin: 3rem 0 0; }
.faq h2 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
  font-weight: 500;
}
.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
}
.faq-item:last-child { border-bottom: 0; }
.faq-item summary {
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 1.5em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: -2px;
  color: var(--accent-deep);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 200ms ease;
}
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding-top: 0.7rem; color: var(--ink-2); }
.faq-answer p { margin: 0.3em 0; }
.faq-answer p:last-child { margin-bottom: 0; }

/* See also */
.see-also {
  max-width: var(--max-content);
  margin: 3rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
}
.see-also h2 {
  font-size: 1.35rem;
  margin: 0 0 0.85rem;
  font-weight: 500;
}
.see-also ul { list-style: none; padding: 0; margin: 0; }
.see-also li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.see-also li:last-child { border-bottom: 0; }
.see-also li a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
}
.see-also li a:hover { color: var(--accent-deep); }
.see-also-desc {
  display: block;
  margin-top: 0.15rem;
  color: var(--ink-3);
  font-size: 0.92rem;
  font-weight: 400;
}

/* Resources — editorial "Where to go next" list */
.resources {
  max-width: var(--max-content);
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.resources h2 {
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
  font-weight: 500;
}
.resources-lead {
  font-size: 0.92rem;
  color: var(--ink-3);
  margin: 0 0 1rem;
  font-style: italic;
}
.resources ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.resources li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.97rem;
  line-height: 1.5;
}
.resources li:last-child { border-bottom: 0; }
.resources li a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.resources li a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-color: var(--accent);
}
.resource-blurb { color: var(--ink-3); }

/* Sidebar (TOC + meta) */
.toc {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 0.88rem;
  margin: 0 0 1.5rem;
}
.toc-header {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc ol ol { padding-left: 0.85rem; margin-top: 0.25rem; counter-reset: toc-sub; }
.toc li { margin: 0.35rem 0; line-height: 1.45; }
.toc ol > li { counter-increment: toc; }
.toc ol > li > a::before {
  content: counter(toc) ".";
  color: var(--ink-4);
  margin-right: 0.4rem;
  font-variant-numeric: tabular-nums;
}
.toc ol ol > li { counter-increment: toc-sub; }
.toc ol ol > li > a::before {
  content: counter(toc) "." counter(toc-sub);
  color: var(--ink-4);
  margin-right: 0.4rem;
}
.toc a {
  color: var(--ink-2);
  text-decoration: none;
  display: inline-block;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color 120ms, border-color 120ms;
}
.toc a:hover { color: var(--accent-deep); border-bottom-color: var(--accent); }

.sidebar-meta {
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
}
.sidebar-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.55rem;
}
.sidebar-meta-row span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-4);
}
.sidebar-meta-row a { color: var(--ink); text-decoration: none; }
.sidebar-meta-row a:hover { color: var(--accent-deep); }

/* ===== Subject (pillar) page ===== */
.page-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
}
.subject-header { margin: 1rem 0 2rem; }
.subject-kicker {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-deep);
  margin: 0 0 0.55rem;
  letter-spacing: 0.02em;
}
.subject-header h1 {
  font-size: clamp(2.1rem, 4.6vw, 2.85rem);
  letter-spacing: -0.022em;
  line-height: 1.08;
  margin: 0 0 0.75rem;
  text-wrap: balance;
  font-weight: 500;
}
.subject-intro {
  font-size: 1.15rem;
  color: var(--ink-3);
  margin: 0;
  font-weight: 400;
  max-width: var(--max-content);
}
.subject-body {
  max-width: var(--max-content);
  font-size: 1.04rem;
  color: var(--ink-2);
}
.subject-body h2 {
  font-size: 1.6rem;
  margin: 2.25rem 0 0.75rem;
  font-weight: 500;
  color: var(--ink);
}
.subject-body p { margin: 0 0 1em; }
.subject-body p strong { color: var(--ink); }

/* Series list (Articles in this subject) */
.series-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.75rem;
  max-width: var(--max-content);
}
.series-list li {
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.series-list li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}
.series-list li a {
  display: block;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
}
.series-list li a > span:first-child {
  display: block;
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.series-desc {
  display: block;
  color: var(--ink-3);
  font-size: 0.92rem;
  line-height: 1.5;
}

.forthcoming {
  max-width: var(--max-content);
  margin: 2.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.forthcoming h3 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin: 0 0 0.75rem;
  font-family: 'Inter', sans-serif;
}
.forthcoming-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.forthcoming-list li {
  font-size: 0.85rem;
  color: var(--ink-3);
  text-transform: capitalize;
  padding: 0.3rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
}

/* ===== Home page ===== */
.home-page { max-width: var(--max-page); margin: 0 auto; padding: 1rem 1.5rem; }
.home-banner {
  padding: 5rem 0 3.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
  display: grid;
  gap: 0.5rem;
  max-width: 760px;
  position: relative;
}
.home-banner::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: -1rem;
  width: 2px;
  height: calc(100% - 5rem);
  background: var(--accent);
  opacity: 0.7;
  border-radius: 1px;
}
.home-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-deep);
  margin: 0;
}
.home-banner h1 {
  font-size: clamp(3rem, 7.5vw, 5.25rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0.5rem 0 0.85rem;
  font-weight: 500;
  text-wrap: balance;
}
.home-banner .home-tagline {
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0;
  font-weight: 400;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  letter-spacing: -0.005em;
}
.home-banner .home-lead {
  font-size: 1.02rem;
  color: var(--ink-3);
  margin: 0.85rem 0 0;
  max-width: 640px;
  line-height: 1.55;
}

.home-section { margin-top: 3rem; }
.home-section > h2 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin: 0 0 1.25rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--rule);
  font-family: 'Inter', sans-serif;
}

/* Subject cards on home page */
.subjects-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.subjects-list > li {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  position: relative;
}
.subject-meta-pill {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  padding: 0.18rem 0.5rem;
  background: var(--surface-soft);
  border-radius: 999px;
  border: 1px solid var(--rule);
  white-space: nowrap;
}
.subject-meta-pill.is-empty {
  background: transparent;
  color: var(--accent-deep);
  border-color: var(--accent-soft);
}
.subjects-list > li.is-empty {
  background: var(--surface);
  border-style: dashed;
  border-color: var(--rule);
}
.subjects-list > li.is-empty h3 a { color: var(--ink-2); }
.subject-suggested {
  list-style: none !important;
  padding: 0 !important;
  margin: 0.75rem 0 0 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.subject-suggested li {
  padding: 0.18rem 0.55rem !important;
  background: var(--surface-soft);
  border: 1px dashed var(--rule);
  border-radius: 999px;
  border-top: 1px dashed var(--rule) !important;
  font-size: 0.78rem;
  color: var(--ink-3);
  text-transform: capitalize;
}
.subjects-list > li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}
.subjects-list h3 {
  font-size: 1.3rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
  letter-spacing: -0.015em;
  padding-right: 0;
  line-height: 1.2;
}
.subjects-list > li {
  padding-top: 3.25rem;
}
.subjects-list > li .subject-meta-pill {
  top: 1.25rem;
  left: 1.5rem;
  right: auto;
}
.subjects-list h3 a { color: var(--ink); text-decoration: none; }
.subjects-list h3 a:hover { color: var(--accent-deep); }
.subjects-list .subject-desc {
  font-size: 0.95rem;
  color: var(--ink-3);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.subjects-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.92rem;
}
.subjects-list ul li {
  padding: 0.35rem 0;
  border-top: 1px solid var(--rule-soft);
}
.subjects-list ul li:first-child { border-top: 0; }
.subjects-list ul li a {
  color: var(--ink-2);
  text-decoration: none;
  display: block;
}
.subjects-list ul li a:hover { color: var(--accent-deep); }

/* Recent articles grid */
.recent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .recent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .recent-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .recent-grid { grid-template-columns: repeat(4, 1fr); } }
.recent-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.recent-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-soft);
}
.recent-card .recent-card-image {
  position: relative;
  background: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.recent-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  opacity: 0.95;
}
.recent-card-body { padding: 0.85rem 1rem 1rem; }
.recent-card-cat {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  margin-bottom: 0.25rem;
}
.recent-card h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.22;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.recent-card:hover h4 { color: var(--accent-deep); }

/* Featured article */
.featured-article {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 720px) {
  .featured-article {
    grid-template-columns: 360px 1fr;
  }
}
.featured-article > a:first-child {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.featured-article > a:first-child:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.featured-article img {
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}
.featured-article-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  margin: 0 0 0.5rem;
  font-family: 'Inter', sans-serif;
}
.featured-article h3 {
  font-size: 1.65rem;
  margin: 0 0 0.5rem;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.018em;
}
.featured-article h3 a { color: var(--ink); text-decoration: none; }
.featured-article h3 a:hover { color: var(--accent-deep); }
.featured-article p {
  color: var(--ink-3);
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}

/* Subjects index page */
.subjects-index { max-width: var(--max-page); margin: 0 auto; padding: 0 1.5rem 1rem; }
.subjects-index h1 {
  font-size: clamp(2.2rem, 4.6vw, 3rem);
  letter-spacing: -0.022em;
  margin: 1rem 0 0.5rem;
  font-weight: 500;
}

/* ===== Legal pages ===== */
.legal-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
}
.legal-page h1 {
  font-size: 2rem;
  margin: 1.5rem 0 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.legal-section { margin: 1.75rem 0; }
.legal-section h2 {
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
  font-weight: 500;
}
.legal-section h3 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.3rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}
.legal-meta { color: var(--ink-3); font-size: 0.88rem; font-style: italic; }
.reset-consent-btn {
  background: var(--surface);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.reset-consent-btn:hover { background: var(--accent-tint); border-color: var(--accent-soft); }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  max-width: 340px;
  width: calc(100% - 2rem);
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  font-size: 0.85rem;
}
.cookie-banner-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}
.cookie-banner p { margin: 0; flex: 1; min-width: 200px; color: rgba(255,255,255,0.85); }
.cookie-banner a { color: var(--accent-soft); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 0.4rem; }
.cookie-banner button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.cookie-banner button[data-action="accept"] {
  background: var(--accent);
  border-color: var(--accent);
}
.cookie-banner button[data-action="accept"]:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.cookie-banner button[data-action="decline"]:hover { background: rgba(255,255,255,0.08); }

/* ===== Responsive ===== */
@media (max-width: 1039px) {
  .article-sidebar { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header-inner { padding: 0.75rem 1rem; }
  .site-brand-text { font-size: 1rem; }
  .site-brand-text small { display: none; }
  .site-nav { gap: 1rem; font-size: 0.88rem; }
  .article-shell, .page-shell, .home-page, .subjects-index { padding: 0 1rem 1rem; }
  .article-header h1 { font-size: 1.85rem; hyphens: none; word-break: normal; overflow-wrap: normal; }
  .home-banner { padding: 2.5rem 0 2rem; }
  .home-banner h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
  .article-body { font-size: 1rem; }
  .home-banner { padding: 1.5rem 0 1.5rem; margin-bottom: 1.75rem; }
  .home-banner h1 { font-size: 2.3rem; }
  .home-banner .home-tagline { font-size: 1rem; }
  .recommendation { font-size: 0.9rem; flex-direction: column; align-items: flex-start; }
  .recommendation a { margin-left: 0; }
  .cookie-banner { font-size: 0.85rem; padding: 0.85rem 1rem; }
}
