:root {
  --bg: #f7f2ea;
  --panel: #fffaf2;
  --ink: #241b13;
  --muted: #6f6258;
  --line: #e3d5c6;
  --accent: #7c4a1e;
  --accent-2: #b87935;
  --ok: #146c43;
  --warn: #9a5b00;
  --tight: #a93226;
  --shadow: 0 18px 50px rgba(54, 38, 22, .10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #fff7ea 0, var(--bg) 42%, #efe4d6 100%);
  color: var(--ink);
  line-height: 1.65;
}
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--accent-2); }
.site-header, .site-footer { max-width: 1120px; margin: 0 auto; padding: 22px 20px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.nav { display: flex; gap: 16px; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--accent); }
main { max-width: 1120px; margin: 0 auto; padding: 12px 20px 56px; }
.hero { padding: 58px 0 32px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 32px; align-items: center; }
.eyebrow { color: var(--accent); font-size: .92rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 4.2rem); line-height: 1.05; letter-spacing: -.05em; margin: 10px 0 16px; }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); line-height: 1.2; letter-spacing: -.03em; margin: 42px 0 12px; }
h3 { font-size: 1.18rem; margin: 30px 0 8px; }
p { margin: 0 0 16px; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 780px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 26px 0; }
.card, .calculator, .quick-box, .toc, .disclaimer, .source-box {
  background: rgba(255, 250, 242, .86);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 16px; border-radius: 999px; background: var(--accent); color: white; text-decoration: none; font-weight: 700; border: 1px solid transparent; }
.button.secondary { background: transparent; color: var(--accent); border-color: var(--line); }
.button:hover { background: var(--accent-2); color: white; }
.quick-box ul, .toc ul { margin: 10px 0 0 18px; padding: 0; }
.quick-box li, .toc li { margin: 8px 0; }
.calculator { margin: 28px 0; }
.calculator h2, .calculator h3 { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 6px; color: var(--muted); font-weight: 650; font-size: .95rem; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; color: var(--ink); padding: 12px 13px; font: inherit; }
button.calc-btn { margin-top: 18px; border: 0; border-radius: 999px; padding: 12px 18px; background: var(--accent); color: white; font-weight: 800; cursor: pointer; }
.result { margin-top: 20px; padding: 18px; border-radius: 18px; background: #fff7e8; border: 1px dashed #d7b98d; }
.result strong { display: block; font-size: 1.25rem; margin-bottom: 6px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.metric { background: #fffdf8; border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.metric span { display: block; color: var(--muted); font-size: .86rem; }
.metric b { font-size: 1.25rem; }
table { width: 100%; border-collapse: collapse; margin: 22px 0; overflow: hidden; border-radius: 18px; }
th, td { border: 1px solid var(--line); padding: 12px; text-align: left; vertical-align: top; }
th { background: #f3e5d4; }
.faq details { background: #fffaf2; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin: 12px 0; }
.faq summary { cursor: pointer; font-weight: 750; }
.disclaimer, .source-box { color: var(--muted); font-size: .95rem; }
.breadcrumbs { color: var(--muted); font-size: .92rem; margin: 10px 0 0; }
.related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.related a { display: block; border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #fffaf2; text-decoration: none; font-weight: 700; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.site-footer .footer-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
@media (max-width: 820px) {
  .hero, .card-grid, .form-grid, .metric-grid, .related { grid-template-columns: 1fr; }
  .site-header { align-items: flex-start; flex-direction: column; }
  h1 { font-size: 2.5rem; }
}
