:root {
  --paper: #F2F1EC;
  --paper-raised: #F8F7F2;
  --ink: #12140F;
  --muted: #5A5F55;
  --accent: #E4F53C;
  --steel: #2F4A57;
  --grid: rgba(18, 20, 15, 0.05);
  --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: 28px 28px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
figure,
ul,
ol {
  margin-top: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.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: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.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, 0.95);
  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;
  text-decoration: none;
  min-width: 0;
}

.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: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

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

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

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

.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 {
  padding-top: 54px;
  padding-bottom: 38px;
}

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

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

h1 {
  max-width: 21ch;
  margin-bottom: 18px;
  font-family: var(--sans);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

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

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

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

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

.calc {
  padding-bottom: 56px;
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 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: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

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

.field {
  min-width: 0;
  margin-bottom: 18px;
}

.field-last {
  margin-bottom: 0;
}

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

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

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

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

.input-shell:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.input-shell input {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1.02rem;
  font-weight: 600;
  -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 {
  outline: none;
}

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

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

.card-results {
  padding-bottom: 24px;
}

.metric {
  padding: 15px 0;
  border-bottom: 1px dashed rgba(18, 20, 15, 0.35);
}

.metric:first-child {
  padding-top: 0;
}

.metric-label {
  margin: 0 0 5px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
}

.num {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.metric-highlight .num {
  display: inline;
  padding: 0 0.08em;
  background: var(--accent);
}

.metric-sub {
  margin: 7px 0 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.45;
  color: var(--muted);
}

.break-even {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: 1px dashed rgba(18, 20, 15, 0.35);
}

.be-cell {
  min-width: 0;
  padding: 15px 0;
}

.be-cell + .be-cell {
  padding-left: 16px;
  border-left: 1px dashed rgba(18, 20, 15, 0.35);
}

.verdict {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--accent);
  border: 1px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.6;
}

.verdict-label {
  display: inline-block;
  margin-bottom: 7px;
  padding: 3px 6px;
  background: var(--ink);
  color: var(--accent);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.verdict[data-state="negative"] {
  background: var(--steel);
  color: #F8F7F2;
}

.verdict[data-state="negative"] .verdict-label {
  background: var(--accent);
  color: var(--ink);
}

.verdict[data-state="neutral"] {
  background: var(--paper-raised);
}

.verdict[data-state="neutral"] .verdict-label {
  background: var(--steel);
  color: var(--paper);
}

.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: -0.02em;
}

.section-label {
  margin-bottom: 10px;
}

.section-lede {
  max-width: 72ch;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.98rem;
}

.formula-list {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.formula-list li {
  min-width: 0;
  padding: 11px 0 11px 16px;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.32);
}

.formula-list span {
  display: block;
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--steel);
}

code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 5px;
  background: #E7E5DC;
  border: 1px solid rgba(18, 20, 15, 0.18);
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.method-note {
  max-width: 78ch;
  margin-bottom: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.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;
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.63rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: left;
  caption-side: top;
}

.table-card th,
.table-card td {
  padding: 10px 9px;
  border-bottom: 1px solid rgba(18, 20, 15, 0.28);
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.table-card thead th {
  background: #E8E6DD;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-card tbody th {
  width: 34%;
  font-weight: 600;
}

.table-card tbody td:nth-child(2) {
  width: 27%;
  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);
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.55;
  color: var(--muted);
}

.faq details {
  background: rgba(255, 255, 255, 0.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: 0.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;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  background: var(--accent);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.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;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
}

.site-footer {
  margin-top: 10px;
  padding: 28px 0 38px;
  border-top: 1px solid var(--ink);
  background: rgba(18, 20, 15, 0.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: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-note {
  margin: 0;
  max-width: 68ch;
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.7;
  color: var(--muted);
}

.footer-meta {
  text-align: right;
  max-width: 230px;
}

.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 (max-width: 900px) {
  .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 {
    padding-top: 38px;
    padding-bottom: 28px;
  }

  h1 {
    max-width: 100%;
  }

  .lede {
    font-size: 1rem;
  }

  .card {
    padding: 17px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .be-cell + .be-cell {
    padding-left: 12px;
  }

  .verdict {
    font-size: 0.7rem;
  }

  .content-section {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .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: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.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; }
