:root {
  --paper: #F2F1EC;
  --paper-raised: #F8F7F2;
  --ink: #12140F;
  --muted: #5A5F55;
  --accent: #E4F53C;
  --steel: #2F4A57;
  --grid: rgba(47, 74, 87, .10);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Archivo", "Arial Narrow", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure, ul, ol, dl, dd { margin-top: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
select:disabled, input:disabled { cursor: not-allowed; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.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;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--accent);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip-link:focus { left: 12px; outline: 2px solid var(--ink); outline-offset: 2px; }

.site-header {
  background: rgba(242, 241, 236, .96);
  border-bottom: 1px solid var(--ink);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  background: var(--accent);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--mono);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .06em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.brand-text small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .56rem;
  font-weight: 500;
  letter-spacing: .18em;
}

.header-tag {
  margin: 0;
  max-width: 300px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .6rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .1em;
  text-align: right;
  text-transform: uppercase;
}

.hazard {
  height: 7px;
  border-bottom: 1px solid var(--ink);
  background: repeating-linear-gradient(45deg, var(--accent) 0, var(--accent) 12px, var(--ink) 12px, var(--ink) 24px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 48px;
  align-items: end;
  padding-top: 54px;
  padding-bottom: 42px;
}

.hero-copy { min-width: 0; }

.kicker, .section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--steel);
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.kicker::before, .section-label::before {
  content: "";
  width: 26px;
  height: 2px;
  flex: 0 0 auto;
  background: var(--ink);
}

h1 {
  max-width: 20ch;
  margin-bottom: 20px;
  font-family: var(--sans);
  font-size: clamp(2.25rem, 5.4vw, 3.8rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.025em;
}

.mark {
  padding: 0 .08em;
  background: var(--accent);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.lede {
  max-width: 67ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 22px 0 0;
  padding: 0;
  color: var(--steel);
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .11em;
  list-style: none;
  text-transform: uppercase;
}

.meta-strip li::before { content: "+"; margin-right: 7px; color: var(--ink); }

.hero-spec {
  position: relative;
  min-width: 0;
  margin: 0 5px 5px 0;
  padding: 17px;
  background: var(--paper-raised);
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 5px 5px 0 var(--ink);
}

.hero-spec::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 14px;
  width: 54px;
  height: 7px;
  background: var(--accent);
  border: 1px solid var(--ink);
}

.spec-title {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: .58rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.hero-spec dl { margin: 0; }
.hero-spec dl div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; }
.hero-spec dt, .hero-spec dd { font-family: var(--mono); font-size: .62rem; }
.hero-spec dt { color: var(--muted); text-transform: uppercase; }
.hero-spec dd { margin: 0; font-weight: 600; }

.calc { padding-bottom: 56px; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 28px; align-items: start; }

.card {
  min-width: 0;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 5px 5px 0 var(--ink);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
}

.step {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  padding: 4px 6px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .08em;
}

.card-head h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.field { min-width: 0; margin-bottom: 18px; }
.field-last { margin-bottom: 0; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }

.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.field-idx { color: var(--muted); font-weight: 500; }

.input-shell {
  display: flex;
  align-items: stretch;
  min-width: 0;
  background: var(--paper-raised);
  border: 1px solid var(--ink);
}

.input-shell:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.input-shell .affix {
  display: grid;
  place-items: center;
  min-width: 36px;
  flex: 0 0 auto;
  padding: 0 8px;
  background: #E8E6DD;
  border-right: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
}

.input-shell input, .input-shell select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .9rem;
  font-weight: 600;
}

.input-shell input { font-size: 1.02rem; -moz-appearance: textfield; }
.input-shell input::-webkit-outer-spin-button, .input-shell input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.input-shell input:focus, .input-shell select:focus { outline: none; }
.input-shell:has(:disabled) { background: #E4E3DC; opacity: .62; }

.hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .66rem;
  line-height: 1.45;
}

.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.calculate-button {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  background: var(--accent);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.calculate-button:hover { background: var(--ink); color: var(--accent); }
.calculate-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.calculate-button:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; }

.form-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.5;
  text-transform: uppercase;
}

.total-block { padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.metric-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.total-number {
  display: inline;
  max-width: 100%;
  margin: 0;
  padding: 0 .08em;
  background: var(--accent);
  font-family: var(--mono);
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}

.range-line { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 15px 0 0; font-family: var(--mono); font-size: .72rem; line-height: 1.5; }
.range-line span { color: var(--steel); text-transform: uppercase; letter-spacing: .05em; }
.range-line strong { min-width: 0; overflow-wrap: anywhere; }
.metric-sub { margin: 8px 0 0; color: var(--muted); font-family: var(--mono); font-size: .66rem; line-height: 1.5; }

.cost-list { margin: 8px 0 0; }
.cost-list div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; min-width: 0; padding: 10px 0; border-bottom: 1px dashed rgba(18, 20, 15, .35); }
.cost-list dt { min-width: 0; color: var(--steel); font-size: .82rem; line-height: 1.4; }
.cost-list dd { flex: 0 1 auto; min-width: 0; margin: 0; font-family: var(--mono); font-size: .78rem; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.result-note { margin: 16px 0 0; color: var(--muted); font-family: var(--mono); font-size: .62rem; line-height: 1.6; }

.content-section { padding-top: 46px; padding-bottom: 46px; border-top: 1px solid var(--ink); }
.content-section h2 { margin-bottom: 14px; font-size: clamp(1.55rem, 3.2vw, 2.15rem); font-weight: 900; line-height: 1.1; letter-spacing: -.02em; }
.section-label { margin-bottom: 10px; }
.section-lede { max-width: 74ch; margin-bottom: 20px; color: var(--muted); font-size: .98rem; }

.formula-list { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.formula-list li { min-width: 0; padding: 11px 0 11px 16px; border-left: 4px solid var(--accent); background: rgba(255, 255, 255, .32); }
.formula-list span { display: block; margin-bottom: 5px; color: var(--steel); font-family: var(--mono); font-size: .6rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
code { display: inline-block; max-width: 100%; padding: 2px 5px; background: #E7E5DC; border: 1px solid rgba(18, 20, 15, .18); font-family: var(--mono); font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.method-note { max-width: 78ch; margin-bottom: 0; color: var(--muted); font-size: .92rem; }

.table-card { margin: 0; padding: 0; overflow: hidden; }
.table-card table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.table-card caption { padding: 14px 16px; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: .63rem; line-height: 1.5; letter-spacing: .04em; text-align: left; caption-side: top; }
.table-card th, .table-card td { padding: 11px 10px; border-bottom: 1px solid rgba(18, 20, 15, .28); font-family: var(--mono); font-size: .68rem; line-height: 1.45; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.table-card thead th { background: #E8E6DD; font-size: .6rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.table-card tbody th { width: 27%; font-weight: 600; }
.table-card tbody td:nth-child(2) { width: 29%; font-weight: 600; }
.table-card tbody tr:last-child th, .table-card tbody tr:last-child td { border-bottom: 0; }
.table-card figcaption { padding: 12px 16px 14px; border-top: 1px solid var(--ink); color: var(--muted); font-family: var(--mono); font-size: .6rem; line-height: 1.55; }

.risk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.risk-item { min-width: 0; padding-top: 14px; border-top: 4px solid var(--ink); }
.risk-number { display: inline-block; margin-bottom: 14px; padding: 3px 7px; background: var(--accent); border: 1px solid var(--ink); font-family: var(--mono); font-size: .62rem; font-weight: 600; }
.risk-item h3 { margin-bottom: 9px; font-size: 1.05rem; font-weight: 800; line-height: 1.25; }
.risk-item p { margin-bottom: 0; color: var(--muted); font-size: .9rem; line-height: 1.65; }

.faq details { background: rgba(255, 255, 255, .32); border: 1px solid var(--ink); border-bottom: 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--ink); }
.faq summary { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; font-size: .92rem; font-weight: 800; line-height: 1.45; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; background: var(--accent); border: 1px solid var(--ink); font-family: var(--mono); font-size: .82rem; font-weight: 600; }
.faq details[open] summary::before { content: "\2212"; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.faq details p { margin: 0; padding: 0 18px 15px 49px; color: var(--muted); font-size: .9rem; line-height: 1.65; }

.site-footer { margin-top: 10px; padding: 28px 0 38px; border-top: 1px solid var(--ink); background: rgba(18, 20, 15, .03); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 20px 40px; }
.footer-mark { margin-bottom: 8px; font-size: .82rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.footer-note { max-width: 68ch; margin: 0; color: var(--muted); font-family: var(--mono); font-size: .62rem; line-height: 1.7; }
.footer-meta { max-width: 230px; text-align: right; }

.footer-tools { display: flex; flex-direction: column; gap: 7px; max-width: 250px; }
.footer-tools__label { margin: 0 0 4px; font-family: var(--mono); font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.footer-tools a { width: fit-content; color: var(--ink); font-family: var(--mono); font-size: .68rem; line-height: 1.6; text-decoration: none; border-bottom: 1px solid rgba(18, 20, 15, .25); }
.footer-tools a:hover { border-bottom-color: var(--ink); }

@media (min-width: 661px) {
  .table-card table { min-width: 620px; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) 185px; gap: 28px; }
  .calc-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (max-width: 680px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .header-tag { display: none; }
  .hero { display: block; padding-top: 38px; padding-bottom: 30px; }
  h1 { max-width: 100%; }
  .lede { font-size: 1rem; }
  .hero-spec { display: none; }
  .card { padding: 17px; }
  .field-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .total-number { font-size: clamp(2rem, 9vw, 3.2rem); }
  .cost-list dt { font-size: .78rem; }
  .cost-list dd { font-size: .72rem; }
  .risk-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .content-section { padding-top: 34px; padding-bottom: 34px; }
  .table-card th, .table-card td { padding: 9px 6px; font-size: .61rem; }
  .table-card thead th { font-size: .55rem; }
  .faq details p { padding-left: 18px; }
  .footer-inner { display: block; }
  .footer-meta { max-width: none; margin-top: 16px; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---- legal page links ---- */
.legal-links {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  margin: 0 0 16px;
}
.legal-links a {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted, #5A5F55); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.legal-links a:hover { border-bottom-color: currentColor; }
