:root {
  --text-primary: #0f172a;
  --text-muted: #475569;
  --surface: #ffffff;
  --background: #f8fafc;
  --border: #cbd5e1;
  --primary: #334155;
  --action: #c2410c;
  --action-hover: #9a3412;
  --focus: #2563eb;
  --success: #166534;
  --warning: #b45309;
  --danger: #b91c1c;
  --grid: rgba(51, 65, 85, 0.12);
  --font-display: "Lexend", "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Helvetica Neue", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text-primary);
  background: var(--background);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 10px 16px; color: #fff; background: var(--focus); }
.skip-link:focus { top: 16px; }
.page-grid { width: min(100% - 32px, 1120px); margin-inline: auto; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner { width: min(100% - 32px, 1120px); min-height: 76px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 750; text-decoration: none; letter-spacing: -0.025em; }
.brand__mark { width: 28px; height: 28px; border: 7px solid var(--action); border-right-color: var(--primary); }
.primary-nav { display: flex; align-items: center; gap: 28px; }
.primary-nav a { color: var(--primary); font-weight: 650; text-decoration: none; }
.primary-nav a:hover { color: var(--action); text-decoration: underline; }
.nav-toggle { display: none; min-width: 44px; min-height: 44px; color: var(--primary); background: var(--surface); border: 1px solid var(--border); }

.page-grid--intro { padding-top: 24px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; color: var(--text-muted); font-size: 0.9rem; }
.hero { min-height: 420px; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr); align-items: center; gap: clamp(32px, 6vw, 80px); padding-block: clamp(56px, 9vw, 110px); }
.eyebrow { margin: 0 0 18px; color: var(--action); font-family: var(--font-display); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.035em; }
h1 { max-width: 700px; margin-bottom: 24px; font-size: clamp(3rem, 7.2vw, 6.4rem); }
h2 { margin-bottom: 12px; font-size: clamp(2rem, 4vw, 3.7rem); }
h3 { margin-bottom: 12px; font-size: 1.2rem; letter-spacing: -0.015em; }
.hero__intro { max-width: 690px; margin: 0; color: var(--text-muted); font-size: clamp(1.08rem, 1.6vw, 1.28rem); }
.hero__diagram { padding: 24px 0; }
.hero__diagram svg { width: 100%; height: auto; overflow: visible; }
.diagram-grid, .diagram-measure { fill: none; stroke: var(--primary); stroke-width: 3; vector-effect: non-scaling-stroke; }
.diagram-top { fill: #e2e8f0; stroke: var(--primary); stroke-width: 3; vector-effect: non-scaling-stroke; }
.diagram-soil { fill: var(--action); stroke: var(--primary); stroke-width: 3; vector-effect: non-scaling-stroke; }
.hero__diagram text { fill: var(--primary); font: 750 14px var(--font-display); letter-spacing: 0.12em; }

.calculator-section { padding-block: 72px 88px; background: var(--surface); border-block: 1px solid var(--border); }
.section-heading { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 38px; }
.section-heading p:not(.section-number) { max-width: 720px; margin: 0; color: var(--text-muted); }
.section-number { margin: 4px 0 0; padding-top: 7px; color: var(--action); border-top: 4px solid var(--action); font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 58fr) minmax(330px, 42fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.calculator-form { min-width: 0; }
.field-group, .form-section { margin: 0; padding: 0 0 30px; border: 0; }
.form-section--ruled { padding-top: 30px; border-top: 1px solid var(--border); }
.field-group legend, .radio-cards legend, label { color: var(--text-primary); font-weight: 700; }
.field-help, .form-section__heading p { margin: 7px 0 0; color: var(--text-muted); font-size: 0.92rem; }
.segmented-control { display: inline-grid; grid-template-columns: 1fr 1fr; margin-top: 8px; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.segmented-control label { position: relative; min-width: 150px; }
.segmented-control input { position: absolute; opacity: 0; }
.segmented-control span { min-height: 48px; padding: 11px 18px; display: grid; place-items: center; color: var(--primary); background: var(--surface); cursor: pointer; }
.segmented-control label + label span { border-left: 1px solid var(--border); }
.segmented-control input:checked + span { color: #fff; background: var(--primary); }
.segmented-control input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }

.form-section__heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.form-section__heading h3, .form-section__heading p { margin-bottom: 0; }
.count-badge { flex: none; padding: 3px 10px; color: var(--primary); border: 1px solid var(--border); border-radius: 999px; font-size: 0.82rem; font-weight: 700; }
.zone-card { position: relative; margin-bottom: 16px; padding: 22px; background: var(--background); border: 1px solid var(--border); border-radius: 20px; }
.zone-card__header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.zone-card__title { margin: 0; font-size: 1rem; }
.remove-zone { min-height: 44px; padding: 6px 10px; color: var(--danger); background: transparent; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.remove-zone[disabled] { color: var(--text-muted); cursor: not-allowed; opacity: 0.55; }
.field-grid { display: grid; gap: 18px; }
.field-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 7px; }
input, select { width: 100%; min-height: 48px; padding: 10px 12px; color: var(--text-primary); background: var(--surface); border: 1px solid #94a3b8; border-radius: 10px; }
input:hover, select:hover { border-color: var(--primary); }
[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger); }
.input-with-unit, .input-with-prefix { display: grid; align-items: stretch; overflow: hidden; background: var(--surface); border: 1px solid #94a3b8; border-radius: 10px; }
.input-with-unit { grid-template-columns: minmax(0, 1fr) auto; }
.input-with-prefix { grid-template-columns: auto minmax(0, 1fr); }
.input-with-unit input, .input-with-prefix input { border: 0; border-radius: 0; }
.input-with-unit span, .input-with-prefix span { display: grid; place-items: center; min-width: 48px; padding: 0 12px; color: var(--primary); background: #e2e8f0; font-weight: 700; }
.field-error { min-height: 0; margin: 6px 0 0; color: var(--danger); font-size: 0.9rem; font-weight: 650; }
.field-error:empty { margin: 0; }
.shape-fields { display: contents; }
.zone-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.status-message { min-height: 1.5em; margin: 8px 0 0; color: var(--warning); }
.button { min-height: 48px; padding: 11px 18px; border-radius: 10px; font-weight: 750; cursor: pointer; }
.button--primary { color: #fff; background: var(--action); border: 2px solid var(--action); }
.button--primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.button--secondary { color: var(--primary); background: var(--surface); border: 1px solid var(--primary); }
.button--secondary:hover { background: #e2e8f0; }
.text-button { min-height: 44px; padding: 8px 0; color: var(--primary); background: transparent; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.quick-values { align-self: end; }
.quick-values > span { display: block; margin-bottom: 7px; color: var(--text-muted); font-size: 0.9rem; }
.quick-values > div { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-values button { min-width: 54px; min-height: 44px; color: var(--primary); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.quick-values button:hover { border-color: var(--action); }
.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 8px 0 0; border: 0; }
.radio-cards legend { margin-bottom: 8px; }
.radio-cards label { position: relative; }
.radio-cards input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.radio-cards span { min-height: 92px; display: flex; flex-direction: column; justify-content: center; padding: 14px; color: var(--primary); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.radio-cards input:checked + span { border: 2px solid var(--action); box-shadow: inset 0 0 0 2px var(--surface); background: #fff7ed; }
.radio-cards input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.radio-cards small { margin-top: 4px; color: var(--text-muted); font-weight: 400; line-height: 1.35; }
.conditional-panel { margin-top: 18px; padding: 20px; background: var(--background); border-left: 4px solid var(--primary); }
.form-actions { display: flex; gap: 12px; padding-top: 8px; }
.form-actions .button--primary { min-width: 160px; }
.error-summary { margin-bottom: 24px; padding: 16px 18px; color: var(--danger); background: #fef2f2; border: 2px solid var(--danger); border-radius: 12px; }
.error-summary h3 { margin-bottom: 8px; font-size: 1.05rem; }
.error-summary ul { margin: 0; padding-left: 22px; }

.result-column { position: sticky; top: 24px; }
.result-card { min-height: 430px; padding: clamp(24px, 4vw, 40px); color: #fff; background: var(--primary); border-radius: 24px; }
.result-card__empty { min-height: 350px; display: flex; flex-direction: column; justify-content: center; }
.result-card h2 { max-width: 360px; font-size: clamp(1.9rem, 3vw, 2.8rem); }
.result-card p { color: #e2e8f0; }
.result-label { margin: 0 0 20px; color: #fdba74 !important; font-family: var(--font-display); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.primary-result { padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.25); }
.primary-result__number { display: block; margin: 2px 0 6px; font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5.3rem); font-weight: 800; line-height: 1; letter-spacing: -0.055em; font-variant-numeric: tabular-nums; }
.primary-result__unit { color: #fdba74; font-weight: 750; }
.result-list { display: grid; gap: 0; margin: 18px 0 0; }
.result-row { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.16); }
.result-row span { color: #e2e8f0; }
.result-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.result-warning { margin-top: 18px; padding: 12px; color: #422006 !important; background: #ffedd5; border-left: 4px solid #fb923c; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.result-actions button { min-height: 44px; padding: 8px 12px; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,0.55); border-radius: 8px; cursor: pointer; }
.result-actions button:hover { background: rgba(255,255,255,0.1); }

.content-section { padding-block: 82px; background: var(--surface); border-bottom: 1px solid var(--border); }
.content-section--tinted { background-color: var(--background); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; }
.content-section--dark { color: #fff; background: var(--primary); }
.content-section--dark .section-heading p:not(.section-number) { color: #e2e8f0; }
.reading-grid > p, .reading-grid > ul { max-width: 760px; }
.formula-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.formula-grid article { padding: 24px; background: var(--surface); }
code { padding: 0.1em 0.25em; color: var(--primary); background: #e2e8f0; border-radius: 4px; font-size: 0.88em; white-space: normal; }
.conversion-strip { display: flex; flex-wrap: wrap; gap: 1px; margin-top: 24px; background: var(--primary); }
.conversion-strip span { flex: 1 1 210px; padding: 14px 18px; color: #fff; border: 1px solid #64748b; font-weight: 700; font-variant-numeric: tabular-nums; }
.worked-example { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 24px; border-block: 1px solid var(--border); }
.worked-example div { padding: 22px 18px; border-right: 1px solid var(--border); }
.worked-example div:last-child { border-right: 0; }
.worked-example span, .worked-example strong { display: block; }
.worked-example span { color: var(--text-muted); font-size: 0.9rem; }
.assumption-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; max-width: none !important; margin: 0; padding: 1px; list-style: none; background: #64748b; }
.assumption-list li { padding: 22px; background: var(--primary); }
.faq-list { border-top: 1px solid var(--border); }
.faq-list details { border-bottom: 1px solid var(--border); }
.faq-list summary { padding: 22px 44px 22px 0; font-family: var(--font-display); font-weight: 750; cursor: pointer; }
.faq-list details p { max-width: 760px; margin-top: -4px; padding: 0 0 22px; color: var(--text-muted); }
.related-tools { padding-block: 58px; }
.source-note { padding-block: 36px; background: #e2e8f0; }
.source-note__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.source-note p { margin: 5px 0 0; color: var(--text-muted); }
.source-links { display: flex; flex-wrap: wrap; align-content: start; justify-content: end; gap: 10px 18px; }
.source-links a { color: var(--primary); font-weight: 700; }
.site-footer { padding-block: 38px; color: #fff; background: #0f172a; }
.site-footer .page-grid { display: flex; justify-content: space-between; gap: 32px; }
.site-footer p { margin: 0; color: #cbd5e1; }
.site-footer__grid > div { max-width: 430px; }
.site-footer__grid nav { display: flex; flex-wrap: wrap; align-content: start; justify-content: end; gap: 8px 18px; }
.site-footer__grid nav a { color: #e2e8f0; font-size: 0.9rem; }
.site-footer__grid nav a:hover { color: #fff; }
.noscript-message { position: fixed; inset: auto 16px 16px; z-index: 50; padding: 16px; color: #fff; background: var(--danger); border-radius: 10px; }
.error-page { width: min(100% - 32px, 760px); min-height: 100vh; margin-inline: auto; display: flex; flex-direction: column; align-items: start; justify-content: center; }
.error-page h1 { margin-bottom: 18px; }
.error-page > p:not(.eyebrow) { max-width: 620px; margin: 0 0 28px; color: var(--text-muted); font-size: 1.1rem; }
.error-page .button { display: inline-flex; align-items: center; text-decoration: none; }

.details-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-bottom: 28px; background: var(--border); border: 1px solid var(--border); }
.details-summary div { padding: 18px; background: var(--background); }
.details-summary span, .details-summary strong { display: block; }
.details-summary span { color: var(--text-muted); font-size: 0.9rem; }
.details-table-wrap { overflow-x: auto; }
.details-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.details-table th, .details-table td { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.details-table th { color: var(--primary); background: var(--background); font-family: var(--font-display); font-size: 0.86rem; }

.homepage { background: var(--surface); }
.home-hero { position: relative; overflow: hidden; background-color: var(--background); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; border-bottom: 1px solid var(--border); }
.home-hero::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border: 76px solid rgba(194, 65, 12, 0.08); border-radius: 50%; pointer-events: none; }
.home-hero__grid { min-height: 690px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(350px, 0.9fr); align-items: center; gap: clamp(48px, 8vw, 100px); padding-block: 86px; }
.home-hero__copy { position: relative; z-index: 1; }
.home-hero h1 { max-width: 760px; margin-bottom: 28px; font-size: clamp(3.5rem, 7.6vw, 7.2rem); }
.home-hero__copy > p:not(.eyebrow) { max-width: 680px; margin: 0; color: var(--text-muted); font-size: clamp(1.1rem, 1.7vw, 1.35rem); }
.home-hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 34px; }
.home-hero__actions .button { display: inline-flex; align-items: center; text-decoration: none; }
.home-text-link { color: var(--primary); font-weight: 750; }
.home-hero__board { position: relative; z-index: 1; padding: 30px; color: #fff; background: var(--primary); border-radius: 24px; box-shadow: 18px 18px 0 #cbd5e1; }
.home-hero__board > p { margin: 0 0 18px; color: #fdba74; font-family: var(--font-display); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.home-hero__board ol { margin: 0; padding: 0; list-style: none; }
.home-hero__board li { display: grid; grid-template-columns: 48px 1fr; padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.2); }
.home-hero__board li > span { grid-row: span 2; color: #fdba74; font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.home-hero__board strong { font-family: var(--font-display); font-size: 1.1rem; }
.home-hero__board small { color: #cbd5e1; }
.board-ruler { height: 36px; display: grid; grid-template-columns: repeat(9, 1fr); align-items: end; margin-bottom: 28px; border-bottom: 2px solid #fdba74; }
.board-ruler span { height: 12px; border-left: 2px solid #fdba74; }
.board-ruler span:nth-child(odd) { height: 24px; }

.home-proof { background: var(--primary); }
.home-proof__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.home-proof__grid div { min-height: 120px; display: flex; flex-direction: column; justify-content: center; padding: 20px 28px; border-right: 1px solid #64748b; }
.home-proof__grid div:first-child { border-left: 1px solid #64748b; }
.home-proof strong { color: #fdba74; font-family: var(--font-display); font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; }
.home-proof span { margin-top: 7px; color: #e2e8f0; font-size: 0.9rem; }

.home-section { padding-block: 96px; border-bottom: 1px solid var(--border); }
.home-tools { background: var(--surface); }
.tool-feature { display: grid; grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr); color: var(--text-primary); background: var(--background); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; text-decoration: none; transition: border-color 180ms ease, transform 180ms ease; }
.tool-feature:hover { border-color: var(--action); transform: translateY(-3px); }
.tool-feature__visual { position: relative; min-height: 430px; overflow: hidden; background-color: #e2e8f0; background-image: linear-gradient(rgba(51, 65, 85, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(51, 65, 85, 0.12) 1px, transparent 1px); background-size: 32px 32px; }
.soil-layer { position: absolute; left: 12%; width: 76%; height: 82px; border: 3px solid var(--primary); transform: skewY(-9deg); }
.soil-layer--top { top: 24%; z-index: 3; background: #cbd5e1; }
.soil-layer--middle { top: 39%; z-index: 2; background: var(--action); }
.soil-layer--bottom { top: 54%; z-index: 1; background: var(--primary); }
.tool-feature__content { padding: clamp(30px, 5vw, 58px); }
.tool-status { margin: 0 0 15px; color: var(--success); font-family: var(--font-display); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.tool-feature h3 { margin-bottom: 18px; font-size: clamp(2rem, 4vw, 3.8rem); }
.tool-feature__content > p:not(.tool-status) { max-width: 650px; color: var(--text-muted); }
.tool-feature ul { margin: 24px 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.tool-feature li { padding: 10px 0 10px 26px; border-bottom: 1px solid var(--border); }
.tool-feature li::before { content: ""; width: 10px; height: 10px; display: inline-block; margin: 0 16px 0 -26px; background: var(--action); }
.tool-feature__link { display: inline-block; color: var(--action); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }

.home-method { background-color: var(--background); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.method-grid article { min-height: 280px; padding: 30px; background: var(--surface); }
.method-grid article > span { display: block; margin-bottom: 44px; color: var(--action); font-family: var(--font-display); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.method-grid h3 { font-size: 1.5rem; }
.method-grid p { color: var(--text-muted); }

.home-roadmap { color: #fff; background: var(--primary); }
.home-roadmap__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(48px, 8vw, 100px); align-items: start; }
.home-roadmap h2 { max-width: 650px; font-size: clamp(2.5rem, 5vw, 4.8rem); }
.home-roadmap__grid > div:last-child > p { margin-top: 4px; color: #e2e8f0; font-size: 1.1rem; }
.roadmap-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.roadmap-tags span { padding: 7px 12px; color: #fff; border: 1px solid #94a3b8; border-radius: 999px; font-size: 0.88rem; }

.home-about { background: var(--surface); }
.home-about__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 8vw, 100px); }
.home-about .section-heading { margin-bottom: 0; }
.about-principles { border-top: 1px solid var(--border); }
.about-principles article { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.about-principles h3, .about-principles p { margin: 0; }
.about-principles p { color: var(--text-muted); }

.home-cta { padding-block: 70px; background: #e2e8f0; }
.home-cta__inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.home-cta h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.8rem); }
.home-cta .button { flex: none; display: inline-flex; align-items: center; text-decoration: none; }

.standard-hero { padding-block: 24px 82px; background-color: var(--background); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; border-bottom: 1px solid var(--border); }
.standard-hero__grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr); align-items: end; gap: clamp(40px, 8vw, 100px); padding-top: 72px; }
.standard-hero h1 { max-width: 780px; margin: 0; font-size: clamp(3.2rem, 7vw, 6.8rem); }
.standard-hero__grid > p { max-width: 600px; margin: 0 0 10px; color: var(--text-muted); font-size: 1.15rem; }

.directory-section { padding-block: 88px; }
.directory-status { display: grid; grid-template-columns: 190px 1fr; gap: 38px; align-items: center; margin-bottom: 34px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.directory-status div { display: flex; flex-direction: column; }
.directory-status span { color: var(--text-muted); font-size: 0.9rem; }
.directory-status strong { color: var(--action); font-family: var(--font-display); font-size: 3.5rem; line-height: 1; }
.directory-status p { max-width: 720px; margin: 0; color: var(--text-muted); }
.directory-card { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 30px; align-items: start; padding: 38px; color: var(--text-primary); background: var(--background); border: 1px solid var(--border); border-radius: 22px; text-decoration: none; }
.directory-card:hover { border-color: var(--action); }
.directory-card__number { color: var(--action); font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; line-height: 1; }
.directory-card h2 { margin-bottom: 16px; font-size: clamp(2rem, 4vw, 3.6rem); }
.directory-card p { max-width: 740px; color: var(--text-muted); }
.directory-card ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.directory-card li { padding: 5px 10px; color: var(--primary); background: #e2e8f0; border-radius: 999px; font-size: 0.86rem; }
.directory-card__action { align-self: center; color: var(--action); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.directory-note { padding-block: 64px; color: #fff; background: var(--primary); }
.directory-note .page-grid { display: flex; justify-content: space-between; align-items: center; gap: 48px; }
.directory-note h2 { margin-bottom: 12px; font-size: 2rem; }
.directory-note p { max-width: 760px; margin: 0; color: #e2e8f0; }
.directory-note a { flex: none; color: #fff; font-weight: 800; }

.prose-section { padding-block: 84px; border-bottom: 1px solid var(--border); }
.prose-section--grid { background-color: var(--background); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; }
.prose-layout { display: grid; grid-template-columns: 180px minmax(0, 760px); gap: clamp(32px, 7vw, 90px); align-items: start; }
.prose-layout aside strong { display: block; margin-top: 8px; color: var(--primary); font-family: var(--font-display); }
.prose-layout article h2 { margin-bottom: 22px; font-size: clamp(2rem, 4vw, 3.3rem); }
.prose-layout article > p { color: var(--text-muted); }
.prose-layout article a { color: var(--action); font-weight: 700; }
.principle-list { border-top: 1px solid var(--border); }
.principle-list > div { display: grid; grid-template-columns: 54px 190px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.principle-list span { color: var(--action); font-family: var(--font-display); font-weight: 800; }
.principle-list h3, .principle-list p { margin: 0; }
.principle-list p { color: var(--text-muted); }

.method-timeline { padding-block: 86px; }
.method-timeline ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.method-timeline li { display: grid; grid-template-columns: 110px minmax(0, 760px); gap: 30px; padding: 34px 0; border-bottom: 1px solid var(--border); }
.method-timeline li > span { color: var(--action); font-family: var(--font-display); font-size: 1.4rem; font-weight: 800; }
.method-timeline h2 { margin-bottom: 10px; font-size: 1.8rem; }
.method-timeline p { margin: 0; color: var(--text-muted); }
.source-register { margin: 26px 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.source-register li { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.source-register span { color: var(--text-muted); }
.review-note { padding: 18px; background: #e2e8f0; border-left: 4px solid var(--action); }

.policy-hero { padding-block: 24px 82px; background: var(--primary); color: #fff; }
.policy-hero .breadcrumb { color: #cbd5e1; }
.policy-hero .eyebrow { margin-top: 72px; }
.policy-hero h1 { max-width: 940px; margin-bottom: 20px; font-size: clamp(3rem, 7vw, 6.4rem); }
.policy-hero > .page-grid > p:last-child { color: #cbd5e1; }
.policy-content { padding-block: 80px; }
.policy-layout { display: grid; grid-template-columns: 230px minmax(0, 760px); gap: clamp(40px, 8vw, 100px); align-items: start; }
.policy-layout > nav { position: sticky; top: 24px; display: grid; border-top: 1px solid var(--border); }
.policy-layout > nav a { padding: 10px 0; color: var(--primary); border-bottom: 1px solid var(--border); font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.policy-layout > nav a:hover { color: var(--action); }
.policy-layout article > section { padding: 0 0 34px; margin-bottom: 36px; border-bottom: 1px solid var(--border); scroll-margin-top: 24px; }
.policy-layout article > section:last-child { margin-bottom: 0; }
.policy-layout h2 { margin-bottom: 16px; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.policy-layout p { color: var(--text-muted); }

.disclaimer-grid { padding-block: 84px; }
.disclaimer-grid .page-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; padding: 1px; background: var(--border); }
.disclaimer-grid article { min-height: 290px; padding: 30px; background: var(--surface); }
.disclaimer-grid article > span, .policy-standards article > span { color: var(--action); font-family: var(--font-display); font-weight: 800; }
.disclaimer-grid h2 { margin: 42px 0 14px; font-size: 1.55rem; }
.disclaimer-grid p { color: var(--text-muted); }

.policy-standards { padding-block: 84px; }
.policy-standards .page-grid { border-top: 1px solid var(--border); }
.policy-standards article { display: grid; grid-template-columns: 90px minmax(0, 760px); gap: 30px; padding: 30px 0; border-bottom: 1px solid var(--border); }
.policy-standards h2 { margin-bottom: 10px; font-size: 1.8rem; }
.policy-standards p { margin: 0; color: var(--text-muted); }
.error-page__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.error-page__actions a:not(.button) { color: var(--primary); font-weight: 700; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero__diagram { max-width: 560px; }
  .calculator-layout { grid-template-columns: 1fr; }
  .result-column { position: static; }
  .result-card { min-height: 0; }
  .result-card__empty { min-height: 240px; }
  .formula-grid, .worked-example { grid-template-columns: 1fr 1fr; }
  .source-note__inner { grid-template-columns: 1fr; }
  .source-links { justify-content: start; }
  .home-hero__grid { grid-template-columns: 1fr; min-height: auto; }
  .home-hero__board { max-width: 650px; }
  .tool-feature { grid-template-columns: 1fr; }
  .tool-feature__visual { min-height: 330px; }
  .home-about__grid { grid-template-columns: 1fr; }
  .standard-hero__grid { grid-template-columns: 1fr; align-items: start; }
  .directory-card { grid-template-columns: 70px minmax(0, 1fr); }
  .directory-card__action { grid-column: 2; justify-self: start; }
  .home-roadmap__grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header__inner { position: relative; min-height: 66px; }
  .nav-toggle { display: block; }
  .primary-nav { position: absolute; top: calc(100% + 1px); right: 0; left: 0; z-index: 20; display: none; padding: 12px 16px 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .primary-nav[data-open="true"] { display: grid; gap: 0; }
  .primary-nav a { min-height: 48px; display: flex; align-items: center; border-bottom: 1px solid var(--border); }
  .hero { padding-block: 46px 58px; gap: 16px; }
  .hero__diagram { padding-top: 0; }
  .calculator-section, .content-section { padding-block: 56px; }
  .section-heading { grid-template-columns: 42px minmax(0, 1fr); gap: 16px; margin-bottom: 28px; }
  .field-grid--two, .radio-cards, .formula-grid, .worked-example, .assumption-list, .details-summary { grid-template-columns: 1fr; }
  .segmented-control { width: 100%; }
  .segmented-control label { min-width: 0; }
  .zone-card { padding: 18px 16px; }
  .quick-values { align-self: auto; }
  .worked-example div { border-right: 0; border-bottom: 1px solid var(--border); }
  .worked-example div:last-child { border-bottom: 0; }
  .site-footer .page-grid { display: block; }
  .site-footer p { margin-top: 8px; }
  .site-footer__grid nav { justify-content: start; margin-top: 24px; }
  .home-hero__grid { padding-block: 62px; gap: 52px; }
  .home-hero h1 { font-size: clamp(3.1rem, 16vw, 5.2rem); }
  .home-hero__board { padding: 24px 20px; box-shadow: 10px 10px 0 #cbd5e1; }
  .home-proof__grid { grid-template-columns: 1fr 1fr; }
  .home-proof__grid div { min-height: 105px; border-bottom: 1px solid #64748b; }
  .home-section { padding-block: 62px; }
  .method-grid, .home-roadmap__grid { grid-template-columns: 1fr; }
  .tool-feature__visual { min-height: 260px; }
  .about-principles article { grid-template-columns: 1fr; gap: 8px; }
  .home-cta__inner { align-items: start; flex-direction: column; }
  .standard-hero { padding-bottom: 58px; }
  .standard-hero__grid { padding-top: 48px; }
  .standard-hero h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .directory-status, .directory-card, .prose-layout, .policy-layout, .method-timeline li, .policy-standards article { grid-template-columns: 1fr; }
  .directory-card { padding: 26px 20px; }
  .directory-card__action { grid-column: 1; }
  .directory-note .page-grid { align-items: start; flex-direction: column; }
  .principle-list > div { grid-template-columns: 40px 1fr; }
  .principle-list p { grid-column: 2; }
  .source-register li { grid-template-columns: 1fr; gap: 5px; }
  .policy-layout > nav { position: static; margin-bottom: 20px; }
  .disclaimer-grid .page-grid { grid-template-columns: 1fr; }
  .disclaimer-grid article { min-height: auto; }
}

@media (max-width: 360px) {
  .page-grid, .site-header__inner { width: min(100% - 24px, 1120px); }
  .brand { font-size: 0.94rem; }
  .brand__mark { width: 24px; height: 24px; border-width: 6px; }
  .form-actions { display: grid; }
  .form-actions .button--primary { min-width: 0; }
}

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

@media print {
  .site-header, .breadcrumb, .hero__diagram, .calculator-form, .result-actions, .related-tools, .site-footer, .source-links, .skip-link { display: none !important; }
  body, .calculator-section, .content-section, .content-section--dark, .content-section--tinted { color: #000; background: #fff; }
  .hero { display: block; min-height: 0; padding: 0 0 24px; }
  .calculator-layout { display: block; }
  .result-card { color: #000; background: #fff; border: 2px solid #000; }
  .result-card p, .result-label, .primary-result__unit { color: #000 !important; }
  .result-row { border-color: #777; }
  #calculation-details { display: block !important; }
  .content-section { padding-block: 28px; page-break-inside: avoid; }
}
