:root {
  color-scheme: light;
  --paper: #f5f1e8;
  --paper-deep: #e9e2d5;
  --surface: #fffdf8;
  --ink: #14231f;
  --muted: #5f6c67;
  --line: #d8d1c5;
  --teal: #0d6a61;
  --teal-dark: #084b45;
  --orange: #c65a2c;
  --yellow: #f0c96c;
  --shadow: 0 24px 60px rgba(20, 35, 31, 0.09);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 6%, rgba(240, 201, 108, 0.22), transparent 27rem),
    var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}

a { color: var(--teal-dark); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--orange); }
img { max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
h1, h2 {
  font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
}
h1 { max-width: 18ch; margin-bottom: 1.4rem; font-size: clamp(2.55rem, 9vw, 5.7rem); }
h2 { margin-bottom: 1.1rem; font-size: clamp(1.75rem, 5vw, 3rem); }
h3 { margin-bottom: 0.7rem; font-size: 1.2rem; line-height: 1.3; }
p { margin-bottom: 1.2rem; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem 1rem;
  transform: translateY(-150%);
  border-radius: 10px;
  background: var(--ink);
  color: white;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(20, 35, 31, 0.1);
  background: rgba(245, 241, 232, 0.9);
  backdrop-filter: blur(18px);
}
.header-inner, .page-shell, .footer-grid, .footer-bottom {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}
.header-inner { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand span {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
}
.brand strong { font-size: 1.05rem; letter-spacing: -0.03em; }
.desktop-nav { display: none; align-items: center; gap: 1.5rem; }
.desktop-nav a, .mobile-nav a { color: var(--ink); font-size: 0.87rem; font-weight: 600; text-decoration: none; }
.desktop-nav a:hover, .mobile-nav a:hover { color: var(--orange); }
.mobile-nav { position: relative; }
.mobile-nav summary { min-width: 50px; padding: 0.65rem 0.8rem; cursor: pointer; list-style: none; font-size: 0.85rem; font-weight: 700; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav {
  position: absolute;
  right: 0;
  top: calc(100% + 0.7rem);
  width: min(280px, calc(100vw - 2rem));
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.mobile-nav nav a { display: block; min-height: 44px; padding: 0.75rem; border-radius: 10px; }
.mobile-nav nav a:hover { background: var(--paper); }

.page-shell { padding-block: 2rem 5rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; margin-bottom: 2.5rem; color: var(--muted); font-size: 0.78rem; }
.breadcrumbs a { color: var(--muted); }
.page-hero { padding: 2rem 0 3rem; border-bottom: 1px solid var(--line); }
.page-hero:not(.home-hero) h1 { font-size: clamp(2.4rem, 7vw, 4.8rem); }
.home-hero { padding-block: clamp(3rem, 9vw, 7.5rem); border-bottom: 0; }
.home-hero h1 { max-width: 15ch; }
.eyebrow, .section-kicker {
  margin-bottom: 0.9rem;
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lead { max-width: 760px; margin-bottom: 1.5rem; color: #34443e; font-size: clamp(1.08rem, 2.6vw, 1.35rem); line-height: 1.65; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; color: var(--muted); font-size: 0.78rem; }
.article-meta span + span::before { content: '•'; margin-right: 1.2rem; color: var(--line); }

.manifesto-grid { display: grid; gap: 1px; overflow: hidden; margin-bottom: 6rem; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--ink); box-shadow: var(--shadow); }
.manifesto-grid article { padding: 1.6rem; background: var(--surface); }
.manifesto-grid article > span { color: var(--orange); font-size: 0.72rem; font-weight: 700; }
.manifesto-grid h2 { margin: 1.2rem 0 0.8rem; font-size: 1.55rem; }
.manifesto-grid p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.home-section { margin-block: 6rem; }
.section-heading { display: grid; gap: 1.25rem; align-items: end; margin-bottom: 2rem; }
.section-heading h2 { margin-bottom: 0; }
.section-heading > p { max-width: 560px; margin-bottom: 0.4rem; color: var(--muted); }
.card-grid { display: grid; gap: 1rem; }
.story-card {
  position: relative;
  display: flex;
  min-height: 260px;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
  color: var(--ink);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.story-card:hover { transform: translateY(-3px); border-color: var(--teal); color: var(--ink); box-shadow: var(--shadow); }
.story-card > span { margin-bottom: 2rem; color: var(--orange); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.story-card strong { max-width: 18ch; margin-bottom: 0.85rem; font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; font-size: 1.45rem; font-weight: 400; line-height: 1.25; }
.story-card p { margin-bottom: 1.5rem; color: var(--muted); font-size: 0.9rem; }
.story-card em { margin-top: auto; color: var(--teal-dark); font-size: 0.84rem; font-style: normal; font-weight: 700; }
.story-card.featured { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.story-card.featured p { color: #cbd6d1; }
.story-card.featured em { color: var(--yellow); }

.split-section { display: grid; gap: 2rem; padding-block: 4rem; border-block: 1px solid var(--line); }
.large-copy { color: var(--muted); font-size: 1.05rem; }
.check-list { margin: 0; padding: 0; list-style: none; counter-reset: checks; }
.check-list li { position: relative; min-height: 96px; padding: 1.2rem 0 1.2rem 3.3rem; border-bottom: 1px solid var(--line); counter-increment: checks; }
.check-list li::before { content: counter(checks, decimal-leading-zero); position: absolute; left: 0; color: var(--orange); font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; font-size: 1.2rem; }
.check-list strong, .check-list span { display: block; }
.check-list strong { margin-bottom: 0.25rem; }
.check-list span { color: var(--muted); font-size: 0.9rem; }

.tool-note { display: grid; gap: 1.5rem; align-items: center; margin-block: 6rem; padding: clamp(1.6rem, 5vw, 3.5rem); border-radius: var(--radius); background: var(--teal-dark); color: white; box-shadow: var(--shadow); }
.tool-note h2 { max-width: 16ch; }
.tool-note p:not(.section-kicker) { max-width: 680px; color: #d6e4df; }
.tool-note .section-kicker { color: var(--yellow); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0.85rem 1.15rem; border: 1px solid transparent; border-radius: 999px; font-size: 0.84rem; font-weight: 700; text-decoration: none; }
.button.primary { background: var(--yellow); color: var(--ink); }
.button.primary:hover { background: white; color: var(--ink); }
.button.secondary { border-color: var(--teal); color: var(--teal-dark); }
.button.secondary:hover { border-color: var(--orange); color: var(--orange); }
.source-strip { display: grid; gap: 1.5rem; align-items: end; padding: 2rem 0; }
.source-strip h2 { max-width: 18ch; margin-bottom: 0; }
.source-strip > p { max-width: 620px; margin-bottom: 0; color: var(--muted); }
.source-strip > a { font-weight: 700; }

.article-layout { display: grid; gap: 2rem; padding-top: 3rem; }
.article-content { min-width: 0; }
.article-toc { display: none; }
.article-toc strong { display: block; margin-bottom: 1rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.article-toc ol { margin: 0; padding: 0; list-style: none; }
.article-toc li { margin-bottom: 0.65rem; }
.article-toc a { color: var(--muted); font-size: 0.78rem; line-height: 1.35; text-decoration: none; }
.article-toc a:hover { color: var(--orange); }
.content-section { margin-bottom: 4.5rem; scroll-margin-top: 100px; }
.content-section > p, .content-section > ul, .content-section > ol { max-width: 760px; }
.content-section p, .content-section li { color: #34443e; }
.answer-box { padding: 1.5rem; border-left: 4px solid var(--orange); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface); }
.answer-box p:last-child { margin-bottom: 0; color: var(--ink); font-size: 1.06rem; }
.formula { display: grid; gap: 0.45rem; max-width: 760px; margin: 1.8rem 0; padding: 1.5rem; border: 1px solid var(--ink); border-radius: 16px; background: var(--ink); color: white; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.formula span { color: var(--yellow); font-size: 0.8rem; }
.formula strong { font-size: clamp(0.9rem, 3vw, 1.15rem); }
.note { max-width: 760px; margin: 2rem 0; padding: 1.35rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 253, 248, 0.75); }
.note strong { display: block; margin-bottom: 0.5rem; }
.note p { margin-bottom: 0; color: var(--muted); }
.note.warning { border-color: #d09a42; background: #fff7df; }

.table-wrap, .table-scroll { max-width: 100%; overflow-x: auto; border-radius: 16px; }
.table-scroll { overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
.table-scroll:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
table { width: 100%; min-width: 610px; margin: 1.8rem 0; border-collapse: collapse; border: 1px solid var(--line); background: var(--surface); font-size: 0.86rem; }
th, td { padding: 0.85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--paper-deep); color: var(--ink); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }
td { color: #34443e; }
.number-grid, .concept-grid { display: grid; gap: 0.8rem; max-width: 900px; }
.number-grid article, .concept-grid article { min-height: 150px; padding: 1.15rem; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 253, 248, 0.75); }
.number-grid b { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; margin-bottom: 1rem; border-radius: 50%; background: var(--ink); color: white; }
.number-grid strong, .number-grid span, .concept-grid strong, .concept-grid span { display: block; }
.number-grid span, .concept-grid p { margin-top: 0.45rem; color: var(--muted); font-size: 0.82rem; line-height: 1.55; }
.concept-grid article > span { margin-bottom: 1.4rem; color: var(--orange); font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; font-size: 1.45rem; }
.concept-grid p { margin-bottom: 0; }
.matrix { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 520px; margin: 2rem 0; overflow: hidden; border: 2px solid var(--ink); border-radius: 18px; background: var(--ink); gap: 2px; }
.matrix div { min-height: 100px; padding: 0.8rem; background: var(--surface); }
.matrix b, .matrix span { display: block; }
.matrix b { color: var(--orange); font-size: 0.72rem; }
.matrix span { margin-top: 0.7rem; font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; font-size: 1.45rem; }
.steps { max-width: 760px; margin: 1.5rem 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 0.3rem 0 1.4rem 3.5rem; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border: 1px solid var(--teal); border-radius: 50%; color: var(--teal-dark); font-weight: 700; }
.steps strong { display: block; margin-bottom: 0.25rem; color: var(--ink); }
.steps p { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }
.bullet-list { padding-left: 1.2rem; }
.bullet-list li { margin-bottom: 0.75rem; padding-left: 0.35rem; }
.tool-inline { display: grid; gap: 1.25rem; align-items: center; padding: 1.5rem; border: 1px solid var(--teal); border-radius: var(--radius); }
.tool-inline h2 { margin-bottom: 0.7rem; font-size: 1.8rem; }
.tool-inline p:last-child { margin-bottom: 0; }

.disclosure {
  margin: -1.5rem 0 4.5rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid #d09a42;
  border-radius: 16px;
  background: #fff7df;
}
.disclosure strong { display: block; margin-bottom: 0.35rem; color: var(--ink); }
.disclosure p { margin: 0; color: #5d4a24; font-size: 0.9rem; }
.rating-podium { display: grid; gap: 0.9rem; }
.rating-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.rating-card.winner { border-color: var(--teal); box-shadow: var(--shadow); }
.rating-place { display: grid; width: 2.55rem; height: 2.55rem; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; font-size: 1.25rem; }
.rating-card.winner .rating-place { background: var(--orange); }
.rating-label { margin-bottom: 0.25rem; color: var(--orange) !important; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.rating-card h3 { margin-bottom: 0.45rem; font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; font-size: 1.55rem; font-weight: 400; }
.rating-card p { margin-bottom: 0.7rem; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.rating-card a { font-size: 0.82rem; font-weight: 700; }
.rating-score { grid-column: 2; color: var(--teal-dark); font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; font-size: 2.35rem; font-weight: 400; line-height: 1; }
.rating-score small { color: var(--muted); font-family: system-ui, sans-serif; font-size: 0.72rem; font-weight: 600; }
.service-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.service-list article { padding: 1.35rem; background: var(--surface); }
.service-list article div > span { color: var(--orange); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.service-list h3 { margin: 0.35rem 0 0.7rem; font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; font-size: 1.5rem; font-weight: 400; }
.service-list p { margin-bottom: 0.65rem; color: var(--muted); font-size: 0.9rem; }
.service-list a { font-size: 0.82rem; font-weight: 700; }
tfoot th { border-top: 2px solid var(--ink); }

.faq-list { max-width: 760px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 1.15rem 2.5rem 1.15rem 0; cursor: pointer; font-weight: 700; line-height: 1.45; }
.faq-list details p { padding: 0 0 1.3rem; color: var(--muted); }
.sources ol { max-width: 820px; margin: 0; padding: 0; list-style: none; counter-reset: sources; }
.sources li { position: relative; padding: 1rem 0 1rem 3rem; border-bottom: 1px solid var(--line); counter-increment: sources; }
.sources li::before { content: counter(sources, decimal-leading-zero); position: absolute; left: 0; color: var(--orange); font-family: 'Iowan Old Style', 'Palatino Linotype', Georgia, serif; }
.sources a, .sources span { display: block; }
.sources a { font-weight: 700; }
.sources span { margin-top: 0.25rem; color: var(--muted); font-size: 0.8rem; }
.related { margin-top: 5rem; padding-top: 3rem; border-top: 1px solid var(--line); }
.card-grid.compact { grid-template-columns: 1fr; }
.card-grid.compact .story-card { min-height: 220px; }
.contact-card { padding: clamp(1.5rem, 5vw, 3rem); border-radius: var(--radius); background: var(--ink); color: white; }
.contact-card h2 { font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: clamp(1.4rem, 5vw, 2.4rem); overflow-wrap: anywhere; }
.contact-card p { color: #d4dfda; }
.error-page { min-height: 65vh; padding-block: 8rem; }
.error-page h1 { max-width: 12ch; }

.site-footer { padding: 4rem 0 1.5rem; border-top: 1px solid var(--line); background: var(--paper-deep); }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-grid > div p { max-width: 370px; margin-top: 1rem; color: var(--muted); font-size: 0.85rem; }
.footer-grid nav { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-grid nav strong { margin-bottom: 0.35rem; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; }
.footer-grid nav a { color: var(--muted); font-size: 0.83rem; text-decoration: none; }
.footer-grid nav a:hover { color: var(--orange); }
.footer-bottom { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 3rem; padding-top: 1.3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.72rem; }

@media (min-width: 560px) {
  .number-grid { grid-template-columns: repeat(2, 1fr); }
  .concept-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid.compact { grid-template-columns: repeat(2, 1fr); }
  .manifesto-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
  .rating-card { grid-template-columns: auto minmax(0, 1fr) auto; padding: 1.45rem; }
  .rating-score { grid-column: 3; grid-row: 1; align-self: center; }
}

@media (min-width: 780px) {
  .desktop-nav { display: flex; }
  .mobile-nav { display: none; }
  .section-heading { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid .featured { grid-row: span 2; min-height: 540px; justify-content: flex-end; }
  .card-grid .featured > span { margin-bottom: auto; }
  .split-section { grid-template-columns: 0.85fr 1.15fr; gap: 5rem; }
  .tool-note { grid-template-columns: 1fr auto; }
  .source-strip { grid-template-columns: 0.8fr 1fr auto; }
  .tool-inline { grid-template-columns: 1fr auto; }
  .number-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid.compact { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1020px) {
  .article-layout { grid-template-columns: 230px minmax(0, 760px); gap: 4rem; justify-content: center; }
  .article-toc { position: sticky; top: 105px; display: block; align-self: start; max-height: calc(100vh - 130px); overflow: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .article-toc, .related, .button { display: none !important; }
  body { background: white; color: black; }
  .page-shell { width: 100%; }
  a { color: black; }
}
