:root {
  --bg: #f4f6f9;
  --paper: #ffffff;
  --ink: #0e1a2b;
  --muted: #455365;
  --line: #d6dde6;
  --accent: #1f3a5f;
  --accent-2: #5a6b80;
  --soft: #e8eef5;
  --warn: #fff5d8;
  --ok: #1f5e3a;
  --warning: #8a5a00;
  --danger: #8a1c1c;
  --max: 1120px;
}
* { 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;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #122742; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.nav { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand a { text-decoration: none; color: var(--ink); }
.brand-mark-link { display: inline-flex; align-items: center; transition: color 0.15s ease; }
.brand-mark-link:hover { color: var(--accent); }
.brand-mark { width: 30px; height: 30px; flex: 0 0 30px; }
.brand-text { display: inline-flex; flex-direction: column; gap: 0; }
.brand strong { font-size: 20px; letter-spacing: -0.02em; }
.brand span { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.hero { padding: 72px 0 60px; }
.eyebrow { color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; font-weight: 700; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.035em; }
h1 { font-size: clamp(42px, 7vw, 56px); max-width: 980px; margin: 14px 0 22px; }
h2 { font-size: clamp(28px, 4vw, 32px); margin: 48px 0 16px; }
h3 { font-size: 22px; margin: 28px 0 12px; }
p { margin: 0 0 18px; }
.lede { font-size: clamp(20px, 3vw, 26px); max-width: 880px; color: #2a3848; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .note, .table-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(14, 26, 43, 0.04);
}
.card { padding: 24px; }
.card h2, .card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.note { padding: 20px; background: var(--soft); }
.page { padding: 36px 0 72px; }
main ul, main ol { padding-left: 22px; }
main li { margin: 7px 0; }
.section-rule { border: none; border-top: 1px solid var(--line); margin: 44px 0; }
.footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 14px; background: var(--paper); }
.footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer p { margin: 0 0 6px; }
.footer .footer-links a { color: var(--ink); text-decoration: none; margin-left: 14px; }
.footer .footer-links a:first-child { margin-left: 0; }
.footer .footer-links a:hover { color: var(--accent); }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: background 0.15s ease, border-color 0.15s ease; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #122742; color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
form.contact-form, form.calc-form { display: grid; gap: 14px; }
form.contact-form label, form.calc-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
form.contact-form input, form.contact-form textarea,
form.calc-form input, form.calc-form select {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
form.contact-form input:focus, form.contact-form textarea:focus,
form.calc-form input:focus, form.calc-form select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
form.contact-form textarea { min-height: 140px; resize: vertical; }
form.contact-form button, form.calc-form button { justify-self: start; }
.form-status { font-size: 14px; color: var(--muted); margin-top: 10px; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }
.help-text { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: -2px; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.calc-output { background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.calc-output .figure { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--accent); }
.calc-output .figure-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.calc-output .figure-explain { font-size: 14px; color: #2a3848; margin-top: 8px; }
.metric-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.metric dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.metric dd { margin: 4px 0 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.category-pill { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid transparent; margin-top: 14px; }
.category-pill.cat-low { background: #e6f3ec; color: var(--ok); border-color: #c7e0d2; }
.category-pill.cat-moderate { background: #eaf0f7; color: var(--accent); border-color: #c8d4e3; }
.category-pill.cat-elevated { background: #fff5d8; color: var(--warning); border-color: #e8d79a; }
.category-pill.cat-high { background: #fbe6e6; color: var(--danger); border-color: #e7c1c1; }
.interpretation { font-size: 14px; color: #2a3848; margin-top: 14px; line-height: 1.55; }
.calc-error { color: var(--danger); font-size: 14px; margin-top: 6px; min-height: 1em; }
code { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: 0.94em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }
pre { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 14px; line-height: 1.55; margin: 14px 0 22px; }
pre code { background: none; padding: 0; }
.assumption-list { display: grid; grid-template-columns: 200px 1fr; gap: 10px 24px; margin: 14px 0 22px; }
.assumption-list dt { font-weight: 600; color: var(--ink); }
.assumption-list dd { margin: 0; color: #2a3848; }
.faq-list dt { font-size: 18px; font-weight: 700; margin-top: 28px; color: var(--accent); }
.faq-list dt:first-child { margin-top: 0; }
.faq-list dd { margin: 8px 0 0; color: #2a3848; }
.example-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 8px 24px rgba(14, 26, 43, 0.04); }
.example-card + .example-card { margin-top: 22px; }
.example-card h3 { margin-top: 0; }
.example-card .calc-line { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; background: var(--soft); padding: 10px 14px; border-radius: 8px; margin: 10px 0; }
.example-card .verdict { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.table-wrap { overflow-x: auto; margin: 20px 0 28px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; background: var(--paper); }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #eaf0f7; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: #3c4a5e; font-weight: 600; }
tr:last-child td { border-bottom: none; }
@media (max-width: 840px) {
  .nav { align-items: flex-start; flex-direction: column; }
  .grid-2, .grid-3, .calc-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 42px; }
  h1 { font-size: 38px; }
  .assumption-list { grid-template-columns: 1fr; gap: 4px 0; }
  .assumption-list dt { margin-top: 12px; }
}
