:root {
  --bg: #f3ecdf;
  --bg-deep: #132421;
  --ink: #1c1915;
  --muted: #5c564c;
  --line: #ddd2c0;
  --card: #fffaf3;
  --teal: #1f6f62;
  --teal-dark: #0f3d36;
  --copper: #b85c38;
  --copper-dark: #8d4324;
  --ok: #145c38;
  --ok-soft: #e7f5ee;
  --danger: #8d2f2f;
  --danger-soft: #fbeceb;
  --warn: #8a4b12;
  --warn-soft: #fbf3e4;
  --info-soft: #e7f2ef;
  --shadow: 0 16px 40px rgba(28, 25, 21, 0.08);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(200, 107, 60, 0.16), transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img, svg { max-width: 100%; }

a { color: var(--teal-dark); }

a:hover { color: var(--copper-dark); }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  z-index: 50;
}

.skip:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.sticky-head {
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar {
  margin: 0;
  background: var(--bg-deep);
  color: #efe6d6;
  text-align: center;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  padding: 8px 16px;
}

.site-header {
  background: rgba(255, 250, 243, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand svg { width: 40px; height: 40px; flex: none; }

.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.menu-button {
  display: none;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0 16px;
  font: inherit;
}

.site-nav {
  display: flex;
  gap: 6px;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.98rem;
}

.site-nav a[aria-current="page"] {
  background: var(--bg-deep);
  color: #f3ecdf;
}

.page-hero {
  padding: 36px 0 12px;
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
  color: var(--muted);
  font-size: 0.92rem;
}

.crumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: #a89880;
}

.kicker {
  margin: 0 0 8px;
  color: var(--copper-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; line-height: 1.12; }

h1 { margin: 0; font-size: clamp(2.3rem, 5vw, 4.3rem); max-width: 16ch; }

.lede {
  max-width: 68ch;
  font-size: 1.22rem;
  color: var(--muted);
  margin: 16px 0 0;
}

.updated, .fine { color: var(--muted); font-size: 0.92rem; }

.guide-wrap {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
  padding-bottom: 72px;
}

.guide-wrap > * { min-width: 0; }

.toc {
  position: sticky;
  top: 118px;
  padding-top: 8px;
}

.toc p {
  margin: 0 0 8px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol { list-style: none; padding: 0; margin: 0; }

.toc a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding: 6px 0;
  border-top: 1px solid transparent;
  font-size: 0.95rem;
}

.toc a:hover { color: var(--copper-dark); }

.prose section + section {
  margin-top: 2.8rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.prose h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); margin: 0 0 0.8rem; }

.prose h3 { font-size: 1.3rem; margin: 1.4rem 0 0.4rem; }

.prose p { margin: 0.8rem 0; }

.prose ul, .prose ol { margin: 0.8rem 0; padding-left: 1.2rem; }

.prose li + li { margin-top: 0.35rem; }

.home { padding-bottom: 72px; }

.home h1 { max-width: 14ch; }

.fact-row, .card-grid, .town-grid {
  display: grid;
  gap: 14px;
}

.fact-row { grid-template-columns: repeat(3, 1fr); margin-top: 26px; }

.fact, .guide-card, .town-card, .verify-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.fact span, .guide-card span {
  display: block;
  color: var(--copper-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.fact p, .guide-card p, .town-card p, .verify-card p { margin: 0; }

.card-grid { grid-template-columns: repeat(3, 1fr); margin: 22px 0 8px; }

.guide-card { color: inherit; text-decoration: none; min-height: 180px; display: flex; flex-direction: column; }

.guide-card strong {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.guide-card:hover { border-color: var(--copper); }

.section-block { margin-top: 48px; }

.section-block h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 8px; }

.callout {
  border-left: 4px solid var(--teal);
  background: var(--info-soft);
  padding: 14px 16px;
  margin: 1rem 0;
  border-radius: 0 12px 12px 0;
}

.callout-warn { border-color: var(--copper); background: var(--warn-soft); }

.callout-danger { border-color: var(--danger); background: var(--danger-soft); }

.callout-title { margin: 0 0 0.35rem; font-weight: 700; }

.callout-body p:first-child { margin-top: 0; }

.callout-body p:last-child { margin-bottom: 0; }

.pipeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0;
  margin: 1.2rem 0;
}

.pipeline li {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 16px;
  padding: 14px;
  min-height: 180px;
}

.pipeline span {
  display: block;
  color: var(--copper-dark);
  font-family: var(--serif);
  font-size: 1.2rem;
}

.pipeline strong { display: block; margin: 6px 0; }

.pipeline p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.matrix-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  margin: 1rem 0;
}

.matrix { width: 100%; border-collapse: collapse; min-width: 680px; }

.matrix caption {
  caption-side: bottom;
  text-align: left;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 10px 14px 12px;
}

.matrix th, .matrix td {
  text-align: left;
  vertical-align: top;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.matrix thead th { font-size: 0.92rem; }

.matrix thead th:nth-child(2), .matrix td:nth-child(2) { background: #f3faf6; }

.matrix thead th:nth-child(3), .matrix td:nth-child(3) { background: #fdf6f4; }

.matrix th[scope="row"] {
  position: sticky;
  left: 0;
  background: var(--card);
  min-width: 148px;
  z-index: 1;
}

.verify-grid, .town-grid { grid-template-columns: 1fr 1fr; }

.verify-grid { display: grid; gap: 14px; margin: 1rem 0; }

.decision, .price-tool {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.decision fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.decision legend {
  font-family: var(--serif);
  font-size: 1.3rem;
  padding: 0;
  margin-bottom: 12px;
}

.choice-grid, .method-grid, .price-fields { display: grid; gap: 10px; }

.choice-grid { grid-template-columns: 1fr 1fr; }

.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
}

.choice.is-selected { border-color: var(--teal); background: var(--info-soft); }

.choice strong, .choice small { display: block; }

.choice small { color: var(--muted); font-size: 0.9rem; }

.choice input { margin-top: 4px; accent-color: var(--teal-dark); }

.decision-result { margin-top: 16px; }

.decision-empty { margin: 0; padding: 16px; background: var(--bg); border-radius: 12px; }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0;
}

.result-grid > div, .method-grid article {
  background: var(--bg);
  border-radius: 14px;
  padding: 12px 14px;
}

.result-span { grid-column: 1 / -1; }

.result-grid dt, .method-grid article p:first-child {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}

.result-grid dd { margin: 0; }

.best-line { margin: 0 0 10px; font-family: var(--serif); font-size: 1.25rem; letter-spacing: -0.02em; }

.method-grid { grid-template-columns: 1fr 1fr; }

.method-grid article p:last-child { margin: 0; }

.risk, .fit {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.risk { margin-bottom: 6px; }

.risk-note { display: block; }

.risk-low, .fit-recommended { background: var(--ok-soft); color: var(--ok); }

.risk-high, .fit-conditional, .fit-poor-fit { background: var(--warn-soft); color: var(--warn); }

.risk-prohibited, .fit-do-not-use { background: var(--danger-soft); color: var(--danger); }

.examples { color: var(--muted); font-size: 0.95rem; }

.faq details { border-top: 1px solid var(--line); }

.faq details:last-child { border-bottom: 1px solid var(--line); }

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-weight: 650;
  padding: 14px 0;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--copper-dark);
}

.faq details[open] summary::after { content: "–"; }

.faq-body { padding: 0 0 8px; }

.phrase-table, .split-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
}

.phrase-table th, .phrase-table td, .split-table th, .split-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.phrase-table th { width: 42%; }

.sources { padding-left: 1.1rem; }

.sources li { margin: 0.3rem 0; }

.price-fields { grid-template-columns: repeat(5, 1fr); }

.price-tool label, .price-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 650;
}

.price-tool input, .decision input[type="text"] {
  font: inherit;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

.price-result {
  margin-top: 14px;
  background: var(--bg-deep);
  color: #f3ecdf;
  border-radius: 14px;
  padding: 14px 16px;
}

.price-result p { margin: 0.35rem 0; }

.site-footer {
  background: var(--bg-deep);
  color: #e7dece;
  padding: 36px 0 18px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 28px;
}

.footer-brand {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 0 0 8px;
}

.footer-grid p, .footer-grid ul { margin: 0; }

.footer-grid ul { list-style: none; padding: 0; }

.footer-grid li { margin: 6px 0; }

.footer-grid nav p, .footer-end p { color: #cbbba6; }

.footer-end {
  margin-top: 28px;
  border-top: 1px solid rgba(243, 236, 223, 0.16);
  padding-top: 14px;
}

.rule-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0; list-style: none; }

.rule-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}

.rule-list strong { display: block; font-family: var(--serif); font-size: 1.2rem; margin-bottom: 4px; }

@media (max-width: 900px) {
  .menu-button { display: inline-flex; align-items: center; }

  .toc ol {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .toc a {
    white-space: nowrap;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 999px;
    padding: 6px 12px;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fffaf3;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 8px 16px 16px;
  }

  .site-nav.is-open { display: flex; }

  .header-row { position: relative; }

  .guide-wrap, .fact-row, .card-grid, .footer-grid, .pipeline, .choice-grid, .result-grid, .method-grid, .verify-grid, .town-grid, .price-fields, .rule-list {
    grid-template-columns: 1fr;
  }

  .toc { position: static; }

  .result-span { grid-column: auto; }

  h1 { max-width: none; }
}

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

@media print {
  .sticky-head, .toc, .site-footer, .menu-button { display: none; }
  .guide-wrap { display: block; }
  body { background: #fff; }
}
