:root {
  --bg: #f7f3ea;
  --surface: #ffffff;
  --surface-strong: #fff8e8;
  --text: #18202a;
  --text-muted: #5c6673;
  --border: #d9cdb8;
  --accent: #9a5b22;
  --accent-strong: #5f3516;
  --warning: #7a4213;
  --success: #2f6f5e;
  --danger: #9b2f2f;
  --shadow-soft: 0 18px 50px rgba(52, 42, 28, 0.12);
  --content-width: 760px;
  --wide-width: 1160px;
  --section-gap: clamp(2.5rem, 5vw, 5rem);
  --radius-sm: 0.65rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.7;
  color: var(--text);
  background: radial-gradient(circle at top left, #fff1c7 0, rgba(255, 241, 199, 0) 32rem), var(--bg);
}

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

a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--accent);
}

p, li, td, th, dd, figcaption {
  text-align: left;
}

h1, h2, h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  line-height: 1.12;
  color: var(--text);
}

h1 {
  font-size: clamp(2.45rem, 6vw, 5rem);
  letter-spacing: -0.04em;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.18rem, 2vw, 1.45rem);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 243, 234, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.header-inner,
.hero,
.toc,
.article-section,
.site-footer {
  width: min(var(--wide-width), calc(100% - 2rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  min-width: max-content;
}

.brand-kicker {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.top-nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.top-nav a,
.site-footer nav a,
.route-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 650;
}

.hero {
  padding: clamp(2rem, 5vw, 4.5rem) 0 1.5rem;
}

.hero-grid {
  display: block;
}

.eyebrow,
.section-label {
  margin: 0 0 0.75rem;
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.lead {
  font-size: clamp(1.12rem, 2vw, 1.35rem);
  line-height: 1.62;
  color: var(--text);
}

.hero-panel,
.callout,
.help-box,
.toc,
.check-card,
.numbered-cards li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-panel {
  padding: clamp(1rem, 3vw, 1.5rem);
}

.hero-panel h2 {
  font-size: 1.35rem;
}

.hero-panel ul {
  padding-left: 1.15rem;
  margin: 0;
}

.hero-panel li + li {
  margin-top: 0.65rem;
}

.hero-figure,
.wide-figure {
  margin: clamp(1.5rem, 4vw, 2.5rem) auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

figure {
  margin: 0;
}

figcaption {
  padding: 0.85rem 1rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.toc {
  margin-top: var(--section-gap);
  padding: 1.25rem;
}

.toc ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding-left: 1.25rem;
}

.article-section {
  margin-top: var(--section-gap);
}

.article-section > p,
.article-section > h2,
.article-section > h3,
.article-section > ul,
.article-section > ol,
.article-section > details,
.article-section > .callout,
.article-section > .check-grid,
.article-section > .evidence-table-wrap {
  max-width: var(--content-width);
}

.article-section > p,
.split-section p,
.help-box p,
.numbered-cards p {
  color: var(--text-muted);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.split-section.reverse {
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
}

.split-section.reverse > div {
  order: 2;
}

.split-section.reverse > figure {
  order: 1;
}

.split-section figure,
.split-section img {
  border-radius: var(--radius-lg);
}

.split-section figure {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.evidence-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.evidence-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.evidence-table th,
.evidence-table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.evidence-table th {
  background: var(--surface-strong);
  font-weight: 800;
}

.evidence-table tr:last-child td {
  border-bottom: 0;
}

.callout {
  padding: 1.2rem;
  border-left: 0.35rem solid var(--accent);
}

.check-grid,
.route-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.check-card {
  padding: 1rem;
}

.compact-links {
  padding: 1.25rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.help-box {
  max-width: var(--wide-width);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-color: rgba(47, 111, 94, 0.35);
  background: linear-gradient(135deg, #ffffff, #eef8f4);
}

.decision-path {
  max-width: var(--wide-width);
}

.numbered-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.numbered-cards li {
  padding: 1.1rem;
  counter-increment: step;
  position: relative;
}

.numbered-cards li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #ffffff;
  font-weight: 800;
}

.route-map {
  padding: clamp(1.25rem, 3vw, 2rem);
  background: #211b17;
  color: #fffaf0;
  border-radius: var(--radius-lg);
}

.route-map h2,
.route-map p {
  color: #fffaf0;
}

.route-grid a {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fffaf0;
}

.faq-block details {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 30px rgba(52, 42, 28, 0.08);
}

.faq-block details + details {
  margin-top: 0.8rem;
}

.faq-block summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}

.site-footer {
  margin-top: var(--section-gap);
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
  max-width: 75%;
  margin: 0 auto;
}

.footer-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.site-footer p {
  max-width: 680px;
  margin-top: 0;
  color: var(--text-muted);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 920px) {
  .hero-grid,
  .split-section,
  .split-section.reverse,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split-section.reverse > div,
  .split-section.reverse > figure {
    order: initial;
  }

  .toc ol,
  .numbered-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav,
  .site-footer nav {
    justify-content: flex-start;
  }

  .top-nav a,
  .site-footer nav a,
  .route-grid a {
    width: 100%;
    justify-content: center;
  }

  .toc ol,
  .check-grid,
  .route-grid,
  .numbered-cards {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .hero,
  .toc,
  .article-section,
  .site-footer {
    width: min(100% - 1rem, var(--wide-width));
  }
}

/* Requested hub layout refinement: after the table of contents, keep text centered in a readable column with left-aligned copy, and stack images below their text rather than beside it. */
.toc ~ .article-section {
  width: min(var(--content-width), calc(100% - 2rem));
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.toc ~ .article-section > p,
.toc ~ .article-section > h2,
.toc ~ .article-section > h3,
.toc ~ .article-section > ul,
.toc ~ .article-section > ol,
.toc ~ .article-section > details,
.toc ~ .article-section > .callout,
.toc ~ .article-section > .check-grid,
.toc ~ .article-section > .numbered-cards,
.toc ~ .article-section > .evidence-table-wrap,
.toc ~ .article-section > .route-grid,
.toc ~ .article-section > table {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.toc ~ .split-section,
.toc ~ .split-section.reverse {
  display: block;
}

.toc ~ .split-section > div,
.toc ~ .split-section.reverse > div {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.toc ~ .split-section > figure,
.toc ~ .split-section.reverse > figure,
.toc ~ .article-section > figure,
.toc ~ .article-section .wide-figure {
  width: min(100%, 920px);
  margin: 1.5rem auto 0;
}

.toc ~ .split-section.reverse > div,
.toc ~ .split-section.reverse > figure {
  order: initial;
}

.toc ~ .article-section img {
  display: block;
  width: 100%;
  height: auto;
}

.toc ~ .article-section .evidence-table-wrap {
  overflow-x: auto;
}
