/*
Theme Name: LAODH Facts
Theme URI: https://fact.laodh.com
Author: LAODH
Author URI: https://laodh.com
Description: A lightweight, fast, editorial theme built for LAODH Facts — a general-knowledge education publisher. Mobile-first, accessible, no page-builder dependencies.
Version: 1.0.1
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: laodh-facts
Tags: editorial, blog, education, custom-colors, accessibility-ready
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
  --ink: #16181d;
  --ink-soft: #2c3038;
  --ink-muted: #5c636e;
  --ink-faint: #8b929c;
  --paper: #fbfaf7;
  --paper-raised: #ffffff;
  --paper-sunk: #f2efe9;
  --rule: #e3ded4;
  --rule-strong: #cfc8ba;
  --accent: #b4401a;
  --accent-ink: #8f3011;
  --accent-wash: #fdf1ec;
  --teal: #0f6b63;
  --teal-wash: #eaf5f3;
  --gold: #a97a1f;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --wrap-narrow: 720px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 3px;
  --radius-lg: 6px;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.35rem);
  --step-2: clamp(1.35rem, 1.22rem + 0.65vw, 1.75rem);
  --step-3: clamp(1.6rem, 1.36rem + 1.2vw, 2.3rem);
  --step-4: clamp(2rem, 1.55rem + 2.2vw, 3.2rem);
  --step-5: clamp(2.5rem, 1.7rem + 4vw, 4.4rem);

  --shadow-sm: 0 1px 2px rgba(22, 24, 29, 0.06);
  --shadow-md: 0 4px 16px -4px rgba(22, 24, 29, 0.12);
  --shadow-lg: 0 18px 40px -18px rgba(22, 24, 29, 0.28);
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
img { background: var(--paper-sunk); }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
p { margin: 0 0 1.15em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
blockquote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-style: italic;
  color: var(--ink-soft);
}
code, pre, kbd { font-family: var(--font-mono); font-size: 0.9em; }
pre { background: var(--paper-sunk); padding: 1rem; overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: var(--step--1); }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; background: var(--paper-sunk); }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 0.75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ==========================================================================
   3. Layout primitives
   ========================================================================== */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: var(--wrap-narrow); }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--sunk { background: var(--paper-sunk); }
.section--tight { padding-block: clamp(1.75rem, 4vw, 2.75rem); }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem;
  border-bottom: 2px solid var(--ink); padding-bottom: 0.65rem;
}
.section-head h2 { margin: 0; font-size: var(--step-2); }
.section-head .section-link {
  font-size: var(--step--1); font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; text-decoration: none; color: var(--accent-ink);
  white-space: nowrap;
}
.section-head .section-link:hover { text-decoration: underline; }

.eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink);
  margin-bottom: 0.6rem;
}

/* ==========================================================================
   4. Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem);
  min-height: 66px;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex-shrink: 0; }
.brand__mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display); font-size: 1.22rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink);
}
.brand__name em { font-style: normal; color: var(--accent); }
.brand__tag {
  font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); margin-top: 3px; font-weight: 600;
}

.nav { margin-left: auto; }
.nav ul { display: flex; align-items: center; gap: clamp(0.5rem, 1.6vw, 1.4rem); list-style: none; margin: 0; padding: 0; }
.nav a {
  font-size: 0.9rem; font-weight: 500; color: var(--ink-soft);
  text-decoration: none; padding: 0.35rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav .current-menu-item > a { color: var(--ink); border-bottom-color: var(--accent); }
.nav .menu-item-has-children { position: relative; }
.nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 5px; }
.nav .sub-menu {
  position: absolute; top: 100%; left: -1rem; min-width: 220px; padding: 0.5rem;
  background: var(--paper-raised); border: 1px solid var(--rule);
  box-shadow: var(--shadow-lg); border-radius: var(--radius);
  display: none; flex-direction: column; gap: 0.1rem;
}
.nav .menu-item-has-children:hover .sub-menu,
.nav .menu-item-has-children:focus-within .sub-menu { display: flex; }
.nav .sub-menu a { display: block; padding: 0.45rem 0.7rem; border-radius: 2px; border: 0; font-size: 0.86rem; }
.nav .sub-menu a:hover { background: var(--paper-sunk); }

.header-tools { display: flex; align-items: center; gap: 0.35rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid transparent; background: none;
  color: var(--ink-soft); cursor: pointer; border-radius: 50%; padding: 0;
}
.icon-btn:hover { background: var(--paper-sunk); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.nav-toggle { display: none; }

.search-drawer {
  display: none; border-top: 1px solid var(--rule); background: var(--paper-raised);
}
.search-drawer.is-open { display: block; }
.search-drawer .wrap { padding-block: 1rem; }

@media (max-width: 900px) {
  .nav {
    position: fixed; inset: 66px 0 auto 0; background: var(--paper-raised);
    border-bottom: 1px solid var(--rule); box-shadow: var(--shadow-lg);
    padding: 0.75rem var(--gutter) 1.25rem; display: none; margin: 0;
    max-height: calc(100vh - 66px); overflow-y: auto;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav li { border-bottom: 1px solid var(--rule); }
  .nav a { display: block; padding: 0.75rem 0; font-size: 1rem; }
  .nav .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding: 0 0 0.5rem 0.75rem; }
  .nav .sub-menu a { padding: 0.5rem 0; }
  .nav-toggle { display: inline-flex; }
}

/* ==========================================================================
   5. Cards
   ========================================================================== */
.grid { display: grid; gap: clamp(1.1rem, 2.5vw, 1.9rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; }
.card__media {
  position: relative; display: block; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16 / 10; background: var(--paper-sunk);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card__media img { transform: scale(1.03); }
.card__cat {
  position: absolute; left: 0.6rem; bottom: 0.6rem;
  background: rgba(251, 250, 247, 0.95); color: var(--accent-ink);
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.28rem 0.55rem; border-radius: 2px; text-decoration: none;
}
.card__body { padding-top: 0.85rem; }
.card__title { font-size: var(--step-1); margin: 0 0 0.4rem; line-height: 1.22; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--accent-ink); }
.card__excerpt { font-size: var(--step--1); color: var(--ink-muted); margin: 0; }
.card__meta { font-size: 0.72rem; color: var(--ink-faint); margin-top: 0.5rem; text-transform: uppercase; letter-spacing: 0.07em; }

/* Featured hero card */
.hero { border-bottom: 1px solid var(--rule); background: var(--paper); }
.hero__inner {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; padding-block: clamp(2rem, 5vw, 3.75rem);
}
@media (max-width: 860px) { .hero__inner { grid-template-columns: 1fr; } }
.hero__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__kicker {
	font-family: var(--font-display);
	font-size: var(--step-0);
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--accent-ink);
	margin: 0 0 0.6rem;
	text-transform: none;
}
.hero__title { font-size: var(--step-5); margin: 0.4rem 0 0.75rem; letter-spacing: -0.03em; }
.hero__title a { color: var(--ink); text-decoration: none; }
.hero__title a:hover { color: var(--accent-ink); }
.hero__lede { font-size: var(--step-1); color: var(--ink-muted); margin-bottom: 1.25rem; max-width: 46ch; }
.hero__meta { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-faint); }

/* ==========================================================================
   6. Buttons & pills
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.3rem; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font-size: 0.88rem; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background 0.18s, color 0.18s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill {
  display: inline-block; padding: 0.35rem 0.8rem; border: 1px solid var(--rule-strong);
  border-radius: 999px; font-size: 0.8rem; color: var(--ink-soft); text-decoration: none;
  background: var(--paper-raised);
}
.pill:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-wash); }

/* ==========================================================================
   7. Did You Know strip
   ========================================================================== */
.dyk { background: var(--ink); color: #f4f1ea; }
.dyk .wrap { padding-block: clamp(1.75rem, 4vw, 2.75rem); }
.dyk__label {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: #d99a6c; font-weight: 700; margin-bottom: 0.75rem;
}
.dyk__text {
  font-family: var(--font-display); font-size: var(--step-2); line-height: 1.3;
  margin: 0; max-width: 60ch; color: #fbfaf7;
}
.dyk__text a { color: #fbfaf7; text-decoration-color: #d99a6c; }
.dyk__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem; }
.dyk__source { font-size: 0.78rem; color: #a9a49a; }
.dyk__shuffle {
  background: none; border: 1px solid #4a4d55; color: #f4f1ea; border-radius: 999px;
  padding: 0.4rem 0.95rem; font-size: 0.8rem; cursor: pointer; font-family: inherit;
}
.dyk__shuffle:hover { background: #262a31; border-color: #6b6f78; }

/* ==========================================================================
   8. Category tiles
   ========================================================================== */
.cat-tile {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.1rem 1.15rem; min-height: 118px;
  background: var(--paper-raised); border: 1px solid var(--rule);
  border-radius: var(--radius); text-decoration: none; color: var(--ink);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.cat-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--ink); }
.cat-tile__name { font-family: var(--font-display); font-size: 1.06rem; font-weight: 600; line-height: 1.2; }
.cat-tile__count { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin-top: 0.6rem; }

/* ==========================================================================
   9. Article (single)
   ========================================================================== */
.article-head { padding-block: clamp(1.75rem, 4vw, 3rem) 1.25rem; }
.article-head__cat {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); text-decoration: none;
}
.article-title { font-size: var(--step-4); margin: 0.5rem 0 0.85rem; letter-spacing: -0.025em; }
.article-lede { font-size: var(--step-1); color: var(--ink-muted); max-width: 62ch; margin-bottom: 1.25rem; }
.article-byline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem;
  font-size: 0.8rem; color: var(--ink-faint);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding-block: 0.7rem;
}
.article-byline strong { color: var(--ink-soft); font-weight: 600; }

.article-figure { margin: 1.75rem 0; }
.article-figure img { width: 100%; border-radius: var(--radius-lg); }
.article-figure figcaption { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.55rem; line-height: 1.5; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 980px) { .article-layout { grid-template-columns: 1fr; } }

.prose { font-size: 1.075rem; line-height: 1.75; color: var(--ink-soft); max-width: 68ch; }
.prose > p:first-of-type::first-letter {
  font-family: var(--font-display); float: left; font-size: 3.6em; line-height: 0.82;
  padding: 0.06em 0.1em 0 0; color: var(--accent); font-weight: 600;
}
.prose h2 { font-size: var(--step-2); margin-top: 2.2rem; margin-bottom: 0.6rem; color: var(--ink); }
.prose h3 { font-size: var(--step-1); margin-top: 1.7rem; margin-bottom: 0.5rem; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose a { color: var(--accent-ink); }
.prose strong { color: var(--ink); font-weight: 650; }
.prose figure { margin: 1.75rem 0; }
.prose img { border-radius: var(--radius); }
.prose blockquote p:last-child { margin-bottom: 0; }

/* Key facts box */
.keyfacts {
  background: var(--teal-wash); border-left: 3px solid var(--teal);
  padding: 1.1rem 1.35rem; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.75rem 0;
}
.keyfacts h2, .keyfacts h3 { font-size: 1rem; margin: 0 0 0.6rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--teal); font-family: var(--font-body); font-weight: 700; }
.keyfacts ul { margin: 0; padding-left: 1.1rem; font-size: 0.95rem; }
.keyfacts li { margin-bottom: 0.4rem; }

/* Sources */
.sources { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); font-size: 0.88rem; color: var(--ink-muted); }
.sources h2 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--font-body); font-weight: 700; color: var(--ink); margin-bottom: 0.7rem; }
.sources ol { padding-left: 1.2rem; margin: 0; }
.sources li { margin-bottom: 0.5rem; }
.sources a { word-break: break-word; }

/* FAQ */
.faq { margin-top: 2.5rem; }
.faq h2 { font-size: var(--step-2); }
.faq details { border-bottom: 1px solid var(--rule); padding: 0.85rem 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); flex-shrink: 0; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0.7rem 0 0; font-size: 0.97rem; color: var(--ink-muted); }

/* Sidebar */
.sidebar { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 1.75rem; }
@media (max-width: 980px) { .sidebar { position: static; } }
.widget { border-top: 2px solid var(--ink); padding-top: 0.85rem; }
.widget__title { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--font-body); font-weight: 700; margin-bottom: 0.9rem; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); font-size: 0.9rem; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--ink-soft); text-decoration: none; }
.widget a:hover { color: var(--accent-ink); text-decoration: underline; }
.widget .mini-item { display: flex; gap: 0.7rem; align-items: flex-start; }
.widget .mini-item img { width: 62px; height: 48px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
.widget .mini-item span { font-size: 0.88rem; line-height: 1.35; }

/* Related */
.related { border-top: 1px solid var(--rule); }

/* ==========================================================================
   10. Archive / category
   ========================================================================== */
.archive-head { padding-block: clamp(2rem, 5vw, 3.25rem) 1.5rem; border-bottom: 1px solid var(--rule); }
.archive-head h1 { font-size: var(--step-4); margin-bottom: 0.6rem; }
.archive-intro { max-width: 66ch; color: var(--ink-muted); font-size: var(--step-1); }
.archive-count { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin-top: 1rem; }

.breadcrumbs { font-size: 0.78rem; color: var(--ink-faint); padding-block: 0.9rem; }
.breadcrumbs a { color: var(--ink-muted); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { margin-inline: 0.45rem; color: var(--rule-strong); }

.pagination { margin-top: 3rem; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 0.7rem; border: 1px solid var(--rule);
  border-radius: var(--radius); text-decoration: none; color: var(--ink-soft);
  font-size: 0.88rem; background: var(--paper-raised);
}
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent-ink); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ==========================================================================
   11. Search
   ========================================================================== */
.searchform { display: flex; gap: 0.5rem; width: 100%; }
.searchform input[type="search"] {
  flex: 1; min-width: 0; padding: 0.7rem 1rem; border: 1px solid var(--rule-strong);
  border-radius: 999px; font-family: inherit; font-size: 0.95rem; background: var(--paper-raised);
  color: var(--ink);
}
.searchform input[type="search"]:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(15, 107, 99, 0.12); }
.searchform button {
  padding: 0.7rem 1.35rem; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font-family: inherit; font-size: 0.9rem;
  font-weight: 600; cursor: pointer;
}
.searchform button:hover { background: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   12. Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: #c9c5bc; margin-top: clamp(3rem, 7vw, 5rem); }
.site-footer a { color: #e8e4db; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 5vw, 3.75rem);
}
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand .brand__name { color: #fbfaf7; }
.footer-brand .brand__tag { color: #8b8880; }
.footer-about { font-size: 0.88rem; line-height: 1.65; margin-top: 1rem; max-width: 34ch; color: #a9a49a; }
.footer-col h3 {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.13em;
  color: #8b8880; font-family: var(--font-body); font-weight: 700; margin-bottom: 0.9rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; font-size: 0.88rem; }
.footer-bottom {
  border-top: 1px solid #2c3038; padding-block: 1.25rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.78rem; color: #8b8880;
}

/* ==========================================================================
   13. Page (policy) styling
   ========================================================================== */
.page-head { padding-block: clamp(2rem, 5vw, 3rem) 1rem; border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: var(--step-3); margin-bottom: 0.4rem; }
.page-updated { font-size: 0.8rem; color: var(--ink-faint); }
.page-body { padding-block: 2rem 3rem; }
.page-body .prose { max-width: 74ch; }
.page-body .prose h2 { font-size: var(--step-2); margin-top: 2rem; }
.page-body .prose h3 { font-size: var(--step-1); margin-top: 1.5rem; }

/* ==========================================================================
   14. Misc
   ========================================================================== */
.notice {
  background: var(--accent-wash); border: 1px solid #f0d3c7; border-radius: var(--radius);
  padding: 0.9rem 1.1rem; font-size: 0.9rem; color: var(--accent-ink); margin: 1.5rem 0;
}
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  min-height: 90px; border: 1px dashed var(--rule-strong); border-radius: var(--radius);
  color: var(--ink-faint); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--paper-sunk); margin-block: 2rem;
}
.ad-slot--sidebar { min-height: 250px; }
.empty-state { text-align: center; padding-block: 4rem; color: var(--ink-muted); }

/* ==========================================================================
   15. Late additions & fixes
   ========================================================================== */

/* Footer column headings use h2 for document outline; match the h3 styling. */
.footer-col h2,
.footer-col .widget__title {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.13em;
  color: #8b8880; font-family: var(--font-body); font-weight: 700;
  margin: 0 0 0.9rem;
}

/* A configured, live ad slot should not look like a placeholder box. */
.ad-slot--live {
  border: 0; background: none; min-height: 0; padding: 0;
  display: block; color: inherit; font-size: inherit; letter-spacing: normal; text-transform: none;
}
.ad-slot__label {
  display: block; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 0.35rem;
}

/* Related block spacing. */
.related { margin-top: 3rem; padding-top: 1.75rem; }
.related h2 { font-size: var(--step-2); margin-bottom: 1.5rem; }

/* Key facts heading already styled via .keyfacts h2. */

/* Article prose: headings, lists, links, tables, images. */
.prose h2 { font-size: var(--step-2); margin: 2.25rem 0 0.75rem; }
.prose h3 { font-size: var(--step-1); margin: 1.85rem 0 0.6rem; }
.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1.25rem; }
.prose li { margin-bottom: 0.45rem; }
.prose a { text-decoration: underline; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose figure { margin: 1.75rem 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose > p:first-of-type::first-letter {
  float: left; font-family: var(--font-display); font-size: 3.4em; line-height: 0.82;
  padding: 0.06em 0.1em 0 0; color: var(--accent);
}

/* Details-based FAQ blocks authored in article content. */
.prose details { border-bottom: 1px solid var(--rule); padding: 0.85rem 0; }
.prose summary { cursor: pointer; font-weight: 600; color: var(--ink); }

/* Pagination. */
.pagination { display: flex; justify-content: center; gap: 0.4rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 0.7rem;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  text-decoration: none; font-size: 0.88rem; color: var(--ink-soft);
}
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent-ink); }
.pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Search form. */
.searchform { display: flex; gap: 0.5rem; align-items: stretch; }
.searchform input[type="search"] {
  flex: 1; min-width: 0; padding: 0.65rem 0.9rem; font: inherit; font-size: 0.95rem;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  background: var(--paper-raised); color: var(--ink);
}
.searchform input[type="search"]:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }

/* Archive intro paragraph. */
.archive-intro { max-width: 66ch; color: var(--ink-muted); font-size: var(--step-0); margin: 0.75rem 0 0.9rem; }
.archive-count { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); margin: 0; }

/* Make sure the hero image never overflows on small screens. */
@media (max-width: 860px) {
  .hero__media { aspect-ratio: 16 / 10; }
  .hero__title { font-size: var(--step-4); }
}

/* Editorial note under the sources list: honest about AI assistance and
   about the absence of named external review. */
.editorial-note {
	margin: 1.75rem 0 0;
	padding: 1rem 1.15rem;
	border-left: 3px solid var(--rule);
	background: var(--paper-sunk);
	font-size: var(--step--1);
	line-height: 1.6;
	color: var(--ink-soft, #4a4d55);
}
.editorial-note a { color: var(--accent-ink); }
