:root {
  color-scheme: light;
  --ink: #14212a;
  --muted: #5f707a;
  --line: #d8e2df;
  --paper: #ffffff;
  --soft: #f7faf8;
  --mint: #e5f2ed;
  --cream: #fff7ec;
  --teal: #087b73;
  --navy: #173b59;
  --clay: #c85531;
  --amber: #d39a24;
  --danger: #a73535;
  --shadow: 0 20px 45px rgba(20, 33, 42, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--soft);
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 24px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 20px;
  background: rgba(247, 250, 248, 0.95);
  border-bottom: 1px solid rgba(216, 226, 223, 0.8);
  backdrop-filter: blur(10px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 1rem;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.top-nav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.top-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 12px;
  border-radius: 999px;
}

.top-nav a:hover {
  color: var(--ink);
  background: var(--mint);
}

main {
  max-width: 1220px;
  margin: 0 auto;
  padding: 26px 20px 56px;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 34px 0 24px;
}

.intro-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--clay);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 860px;
  margin-bottom: 14px;
  font-size: clamp(2.1rem, 4vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.22rem;
  line-height: 1.2;
}

.intro-text {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.trust-strip {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.trust-strip span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--navy);
}

.calculator-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.input-panel,
.result-panel,
.model-band {
  min-width: 0;
}

.panel-section,
.receipt,
.verdict-card,
.model-band,
.warning,
.assumption-box,
.alternative-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(20, 33, 42, 0.03);
}

.panel-section {
  padding: 18px;
  margin-bottom: 14px;
}

.section-heading {
  margin-bottom: 16px;
}

.url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
}

input,
select {
  width: 100%;
  min-height: 43px;
  border: 1px solid #cddbd6;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfdfc;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 123, 115, 0.14);
}

.field-note {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.route-section {
  background: var(--cream);
}

.route-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.route-toggle label {
  position: relative;
  display: block;
  color: var(--ink);
}

.route-toggle input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.route-toggle span {
  display: block;
  min-height: 86px;
  padding: 14px;
  border: 1px solid #e1cdb6;
  border-radius: 8px;
  background: var(--paper);
}

.route-toggle strong,
.route-toggle small {
  display: block;
}

.route-toggle small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.route-toggle input:checked + span {
  border-color: var(--teal);
  background: var(--mint);
  box-shadow: inset 0 0 0 2px rgba(8, 123, 115, 0.16);
}

.route-delta {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 8px;
  background: #182b35;
  color: #fff;
  font-weight: 800;
  line-height: 1.35;
}

.helper-label {
  position: relative;
}

.inline-btn {
  justify-self: start;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal);
  font-weight: 800;
  font-size: 0.76rem;
  padding: 5px 10px;
}

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 0;
  background: var(--soft);
}

.primary-btn,
.secondary-btn {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 900;
}

.primary-btn {
  color: #fff;
  background: var(--teal);
}

.primary-btn:hover {
  background: #066d66;
}

.secondary-btn {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--line);
}

.secondary-btn:hover {
  background: var(--mint);
}

.result-panel {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 14px;
}

.verdict-card {
  padding: 20px;
  border-left: 6px solid var(--navy);
}

.verdict-card.good {
  border-left-color: var(--teal);
}

.verdict-card.bad {
  border-left-color: var(--clay);
}

.verdict-card.neutral {
  border-left-color: var(--amber);
}

.verdict-card.danger {
  border-left-color: var(--danger);
}

.verdict-card h2 {
  margin-bottom: 8px;
  font-size: 1.8rem;
}

.verdict-card p {
  color: var(--muted);
  line-height: 1.5;
}

.verdict-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.verdict-meta span,
.estimate-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.receipt {
  overflow: hidden;
}

.receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: #182b35;
  color: #fff;
}

.receipt-head .eyebrow {
  color: #ffd6c7;
}

.receipt-head strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.estimate-pill {
  background: #fff;
  color: var(--ink);
}

.line-item {
  border-top: 1px solid var(--line);
}

.line-item summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  list-style: none;
  cursor: pointer;
  font-weight: 800;
}

.line-item summary::-webkit-details-marker {
  display: none;
}

.line-item summary span {
  min-width: 0;
}

.line-detail {
  display: grid;
  gap: 8px;
  padding: 0 16px 14px;
  color: var(--muted);
  line-height: 1.45;
}

.line-detail code {
  white-space: normal;
  padding: 8px 10px;
  border-radius: 8px;
  background: #edf3ef;
  color: var(--ink);
}

.line-detail a {
  color: var(--teal);
  font-weight: 800;
}

.sensitivity-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sensitivity-strip div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.sensitivity-strip span,
.sensitivity-strip small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.sensitivity-strip strong {
  display: block;
  margin: 4px 0;
}

.warning {
  padding: 13px;
  margin-bottom: 10px;
  border-left: 5px solid var(--amber);
}

.warning.danger {
  border-left-color: var(--danger);
}

.warning strong,
.assumption-box strong,
.alternative-box strong {
  display: block;
  margin-bottom: 5px;
}

.warning p,
.assumption-box p,
.alternative-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.warning + .warning {
  margin-top: 8px;
}

.assumption-box,
.alternative-box {
  padding: 13px;
}

.alternative-box {
  margin: 10px;
  background: var(--cream);
}

.alternative-box p + p,
.assumption-box p + p {
  margin-top: 6px;
}

.disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.model-band {
  margin-top: 28px;
  padding: 20px;
}

.model-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-links a {
  text-decoration: none;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--navy);
  font-weight: 800;
  font-size: 0.88rem;
}

.footer {
  max-width: 1220px;
  margin: 0 auto;
  padding: 22px 20px 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer a {
  font-weight: 800;
  color: var(--navy);
}

.seo-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 58px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--navy);
  font-weight: 900;
  text-decoration: none;
}

.seo-hero {
  padding: 28px 0 20px;
}

.seo-hero h1 {
  max-width: 940px;
  margin-bottom: 16px;
}

.seo-hero p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1.05rem;
}

.seo-hero .primary-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.seo-grid article,
.faq-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 20px;
}

.seo-grid p {
  color: var(--muted);
  line-height: 1.58;
}

.seo-grid table {
  width: 100%;
  border-collapse: collapse;
}

.seo-grid th,
.seo-grid td {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.seo-grid th {
  color: var(--muted);
  font-size: 0.86rem;
}

.seo-grid td {
  font-weight: 900;
}

.faq-block {
  margin-top: 16px;
}

.faq-block details {
  border-top: 1px solid var(--line);
  padding: 13px 0;
}

.faq-block details:first-of-type {
  border-top: 0;
}

.faq-block summary {
  cursor: pointer;
  font-weight: 900;
}

.faq-block p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .site-header,
  .intro-band,
  .calculator-shell,
  .seo-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    justify-self: start;
    overflow-x: auto;
    max-width: 100%;
  }

  .result-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  main {
    padding-inline: 14px;
  }

  .site-header {
    padding-inline: 14px;
  }

  .url-row,
  .grid.two,
  .grid.three,
  .route-toggle,
  .sensitivity-strip {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.25rem;
    line-height: 1.03;
  }

  .intro-band {
    padding-top: 22px;
  }

  .form-actions {
    position: static;
  }

  .primary-btn,
  .secondary-btn {
    width: 100%;
  }
}

/* v2 paper-form and receipt treatment, adapted to the live calculator DOM. */
:root {
  --ink: #18271e;
  --muted: #5a6b5f;
  --line: #d5dcd2;
  --paper: #fdfdfb;
  --soft: #f4f6f1;
  --mint: #ebefe7;
  --cream: #fbf4ee;
  --teal: #1e6b45;
  --navy: #18271e;
  --clay: #a8521d;
  --amber: #a8521d;
  --danger: #9d2f2f;
  --stamp: #4a3fd1;
  --shadow: 0 2px 0 var(--line);
  --radius: 0;
  font-family: Archivo, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--soft);
}

.site-header {
  border-bottom: 2px solid var(--ink);
  background: rgba(244, 246, 241, 0.96);
}

.brand-mark {
  border-radius: 0;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.78rem;
  background: var(--teal);
}

.brand strong,
h1,
h2,
.primary-btn,
.secondary-btn,
.verdict-card h2 {
  font-family: "Bricolage Grotesque", Inter, ui-sans-serif, system-ui, sans-serif;
}

.top-nav {
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.top-nav a {
  border-radius: 0;
}

.intro-band {
  align-items: start;
  padding-top: 36px;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.35rem, 4.2vw, 4.15rem);
  line-height: 1.05;
}

.trust-strip span,
.model-links a,
.verdict-meta span,
.estimate-pill {
  border-color: var(--ink);
  border-radius: 0;
  box-shadow: 0 1px 0 var(--line);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calculator-shell {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.78fr);
  gap: 32px;
}

.panel-section {
  position: relative;
  padding: 0;
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.section-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--mint);
}

.section-heading .eyebrow {
  margin: 0;
  color: var(--teal);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.section-heading h2 {
  font-size: 1rem;
  font-weight: 700;
}

.panel-section > :not(.section-heading) {
  margin-left: 18px;
  margin-right: 18px;
}

.panel-section > .url-row,
.panel-section > .grid,
.panel-section > .route-toggle {
  margin-top: 16px;
}

.panel-section > .field-note,
.route-delta {
  margin-bottom: 16px;
}

.grid {
  padding: 16px 0;
}

label {
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

input,
select {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.88rem;
}

input:focus,
select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--teal);
}

.route-section {
  background: var(--paper);
}

.route-toggle {
  border: 2px solid var(--ink);
  gap: 0;
  background: var(--ink);
}

.route-toggle label {
  min-width: 0;
}

.route-toggle span {
  min-height: 92px;
  border: 0;
  border-radius: 0;
  background: var(--paper);
}

.route-toggle label + label span {
  border-left: 2px solid var(--ink);
}

.route-toggle input:checked + span {
  border-color: transparent;
  background: var(--teal);
  color: #fff;
  box-shadow: none;
}

.route-toggle input:checked + span small {
  color: #d7ebdf;
}

.route-delta {
  border-radius: 0;
  background: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
}

.inline-btn,
.primary-btn,
.secondary-btn {
  border-radius: 0;
  border: 2px solid var(--ink);
  box-shadow: 0 2px 0 var(--line);
}

.inline-btn {
  background: var(--mint);
  color: var(--teal);
}

.primary-btn {
  border-color: var(--teal);
}

.secondary-btn {
  background: var(--paper);
}

.result-panel {
  top: 82px;
}

.verdict-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--paper);
}

.verdict-card h2 {
  display: inline-block;
  max-width: 100%;
  margin: 4px 0 10px;
  padding: 10px 16px;
  border: 3px double currentColor;
  color: var(--stamp);
  transform: rotate(-1.5deg);
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  line-height: 1.18;
  text-transform: uppercase;
}

.verdict-card.good h2 {
  color: var(--teal);
}

.verdict-card.bad h2 {
  color: var(--clay);
}

.verdict-card.neutral h2 {
  color: var(--stamp);
}

.verdict-card.danger h2 {
  color: var(--danger);
}

.receipt {
  position: relative;
  overflow: hidden;
  border-color: var(--line);
  box-shadow: var(--shadow);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

.receipt::before {
  content: "";
  display: block;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--teal) 0 14px, transparent 14px 22px);
}

.receipt-head {
  align-items: end;
  padding: 16px 18px 14px;
  border-bottom: 1px dashed var(--line);
  background: var(--paper);
  color: var(--ink);
}

.receipt-head .eyebrow {
  color: var(--teal);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

.receipt-head strong {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  letter-spacing: 0;
}

.line-item {
  border-top: 0;
}

.line-item summary {
  border-bottom: 1px dotted var(--line);
  padding: 10px 18px;
  font-size: 0.82rem;
}

.line-detail {
  padding: 0 18px 13px;
  font-family: Archivo, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.82rem;
}

.line-detail code {
  border-radius: 0;
  background: var(--mint);
}

.alternative-box,
.assumption-box,
.warning {
  border-radius: 0;
  box-shadow: var(--shadow);
}

.sensitivity-strip div {
  border-radius: 0;
  box-shadow: var(--shadow);
}

.seo-grid article,
.faq-block,
.model-band {
  border-radius: 0;
  box-shadow: var(--shadow);
}

@media (max-width: 680px) {
  .calculator-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .route-toggle label + label span {
    border-left: 0;
    border-top: 2px solid var(--ink);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media print {
  .site-header,
  .intro-band,
  .input-panel,
  .model-band,
  .footer,
  .form-actions,
  .top-nav {
    display: none !important;
  }

  body {
    background: #fff;
  }

  main {
    max-width: none;
    padding: 0;
  }

  .calculator-shell {
    display: block;
  }

  .result-panel {
    position: static;
  }

  .receipt,
  .verdict-card,
  .warning,
  .assumption-box {
    box-shadow: none;
    break-inside: avoid;
  }
}
