:root {
  --bg: #f7f4ed;
  --surface: #ffffff;
  --surface-strong: #ebe4d7;
  --text: #1e2528;
  --text-muted: #5f686d;
  --border: #d8cec0;
  --accent: #8b5e34;
  --accent-strong: #57351c;
  --success: #2f6f53;
  --danger: #9a3a2e;
  --shadow-soft: 0 18px 45px rgba(56, 39, 23, 0.12);
  --content-width: 760px;
  --wide-width: 1120px;
  --section-gap: clamp(3rem, 7vw, 6rem);
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.6rem;
  --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;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.35vw + 0.95rem, 1.13rem);
  line-height: 1.68;
}

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

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

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

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

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

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.6vw, 5.25rem);
  letter-spacing: -0.04em;
  max-width: 980px;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.2rem, 1.5vw, 1.45rem);
}

p {
  margin: 0 0 1.1rem;
}

ul, ol {
  margin: 0;
  padding-left: 1.25rem;
}

.site-header {
  background: rgba(247, 244, 237, 0.95);
  border-bottom: 1px solid var(--border);
}

.header-inner,
.footer-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}

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

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

.top-nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.top-nav a,
.site-footer nav a,
.hero-actions a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  background: var(--surface);
}

main {
  overflow-x: hidden;
  overflow-y: visible;
}

article {
  width: 100%;
}

.hero {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 3vw, 2rem) 2rem;
  display: grid;
  gap: 2rem;
}

.hero-copy {
  max-width: 980px;
}

.eyebrow {
  margin-bottom: 0.8rem;
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hero-lede {
  max-width: 850px;
  font-size: clamp(1.12rem, 1.1vw, 1.35rem);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.hero-actions a {
  background: var(--accent-strong);
  color: #fffaf2;
  border-color: var(--accent-strong);
}

.hero-figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(0.5rem, 1.5vw, 1rem);
  box-shadow: var(--shadow-soft);
}

.hero-figure img,
.content-section figure img {
  border-radius: calc(var(--radius-lg) - 0.35rem);
}

figcaption {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.75rem;
}

.toc,
.content-section {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: var(--section-gap) clamp(1rem, 3vw, 2rem) 0;
}

.toc {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
}

.toc ol {
  display: grid;
  gap: 0.45rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.4rem 1.4rem 2.6rem;
}

.content-section > p,
.content-section > h2,
.content-section > h3,
.content-section > details,
.content-section > .key-takeaway,
.content-section > .comparison-card,
.content-section > .source-note,
.content-section > .table-wrap,
.content-section > .checklist-layout {
  max-width: var(--content-width);
}

.content-section figure {
  max-width: 980px;
  margin: 2rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(0.5rem, 1.5vw, 1rem);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, var(--content-width)) minmax(260px, 320px);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.tldr,
.key-takeaway,
.comparison-card,
.source-note,
.check-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 2.5vw, 1.5rem);
  box-shadow: 0 10px 28px rgba(56, 39, 23, 0.06);
}

.tldr {
  border-left: 0.45rem solid var(--accent);
}

.key-takeaway {
  margin: 1.5rem 0;
  background: #fff8ea;
}

.comparison-card {
  margin: 1.5rem 0;
  background: #eef4f1;
}

.source-note {
  margin-top: 1.5rem;
  background: #f5eee2;
}

dl {
  margin: 0;
}

dt {
  font-weight: 800;
  margin-top: 1rem;
}

dt:first-child {
  margin-top: 0;
}

dd {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

.table-wrap {
  margin: 1.5rem 0;
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

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

th {
  background: var(--surface-strong);
  color: var(--accent-strong);
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.checklist-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.check-card {
  background: var(--surface);
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 0 0 0.9rem;
  padding: 1rem 1.1rem;
}

summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--accent-strong);
}

summary + p {
  margin-top: 0.8rem;
}

.site-footer {
  margin-top: var(--section-gap);
  background: var(--text);
  color: #fff8ea;
}

.site-footer p {
  margin: 0;
  max-width: 620px;
}

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

.site-footer a {
  color: #fff8ea;
}

.site-footer nav a {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

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

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

@media (max-width: 780px) {
  .header-inner,
  .footer-inner,
  .toc,
  .section-grid,
  .checklist-layout {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .toc {
    gap: 0.6rem;
  }

  .top-nav a,
  .site-footer nav a,
  .hero-actions a {
    padding: 0.42rem 0.65rem;
  }

  table {
    min-width: 640px;
  }
}

/* Post-hero reading column adjustments */
.toc,
.content-section {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.toc {
  display: block;
}

.toc h2,
.toc ol,
.content-section > p,
.content-section > h2,
.content-section > h3,
.content-section > details,
.content-section > .key-takeaway,
.content-section > .comparison-card,
.content-section > .source-note,
.content-section > .table-wrap,
.content-section > .checklist-layout,
.content-section > dl,
.content-section > ul,
.content-section > ol,
.content-section > blockquote {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.section-grid {
  display: block;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.section-grid .tldr {
  margin-top: 1.25rem;
}

.content-section figure {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}



/* Mobile hero safety adjustments */
h1 {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: balance;
}

.hero,
.hero-copy,
.hero-figure {
  min-width: 0;
}

.hero {
  overflow: visible;
}

.hero-figure {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.hero-figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 780px) {
  .hero {
    width: 100%;
    max-width: 100%;
    padding: clamp(1.8rem, 9vw, 3rem) clamp(1rem, 5vw, 1.25rem) 1.25rem;
    gap: 1.25rem;
  }

  .hero-copy,
  .hero-lede {
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(2rem, 9.2vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
  }

  .hero-lede {
    font-size: clamp(1rem, 4vw, 1.12rem);
  }

  .hero-figure {
    margin-left: auto;
    margin-right: auto;
    padding: 0.45rem;
    border-radius: var(--radius-md);
  }

  .hero-figure img {
    border-radius: calc(var(--radius-md) - 0.25rem);
  }

  .hero-figure figcaption {
    font-size: 0.9rem;
  }
}

@media (max-width: 420px) {
  .hero {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 10vw, 2.35rem);
    line-height: 1.08;
  }

  .hero-figure {
    padding: 0.35rem;
  }
}
