@font-face {
  font-family: "Geist";
  src: url("./fonts/Geist-Variable.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
}

@font-face {
  font-family: "Geist Mono";
  src: url("./fonts/GeistMono-Variable.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
}

:root {
  color-scheme: light;
  --canvas: #f3efe5;
  --paper: #faf7ef;
  --paper-deep: #ebe4d5;
  --ink: #162c26;
  --ink-soft: #53645e;
  --ink-faint: #79857f;
  --forest: #143f35;
  --forest-deep: #0d3028;
  --forest-soft: #23584a;
  --signal: #c1df70;
  --signal-soft: #e4efba;
  --rust: #b85c3f;
  --danger: #a43f34;
  --line: #c9c1b2;
  --line-dark: rgba(244, 238, 223, 0.2);
  --white: #fffdf7;
  --shadow-instrument: 0 28px 70px rgba(27, 42, 36, 0.18);
  --content: 1240px;
  --reading: 690px;
  --font-sans: "Geist", "Segoe UI", Arial, sans-serif;
  --font-mono: "Geist Mono", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 94px;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(20, 63, 53, 0.08) 0.55px, transparent 0.55px);
  background-size: 6px 6px;
  content: "";
  opacity: 0.24;
  pointer-events: none;
}

a {
  color: var(--forest-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

button,
select,
input[type="range"] {
  cursor: pointer;
}

button:active,
.button:active {
  transform: translateY(1px);
}

:focus-visible {
  outline: 3px solid rgba(184, 92, 63, 0.45);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--forest);
  color: var(--white);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(calc(100% - 48px), var(--content));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(87, 92, 83, 0.24);
  background: rgba(243, 239, 229, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 26px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.brand-mark::before {
  position: absolute;
  right: 1px;
  bottom: 5px;
  left: 1px;
  height: 2px;
  background: var(--forest);
  content: "";
}

.brand-mark::after {
  position: absolute;
  top: 2px;
  right: 5px;
  width: 18px;
  height: 18px;
  border-top: 3px solid var(--rust);
  border-left: 3px solid var(--rust);
  content: "";
}

.site-nav,
.site-nav__links {
  display: flex;
  align-items: center;
}

.site-nav {
  gap: 28px;
}

.site-nav__links {
  gap: 26px;
}

.site-nav a {
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.nav-cta,
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--forest);
  border-radius: 2px;
  background: var(--forest);
  color: var(--white) !important;
  font-size: 0.82rem;
  font-weight: 680;
  line-height: 1;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}

.nav-cta:hover,
.button:hover {
  background: var(--forest-deep);
  text-decoration: none;
}

.button--quiet {
  background: transparent;
  color: var(--ink) !important;
}

.calculator-hero {
  padding: 72px 0 112px;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.16fr) minmax(0, 1fr);
  column-gap: clamp(28px, 6vw, 88px);
  align-items: start;
  margin-bottom: 38px;
}

.eyebrow {
  margin: 8px 0 0;
  color: var(--rust);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 660;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 0.99;
}

h1 {
  max-width: 1000px;
  font-size: clamp(3.4rem, 6.8vw, 6.7rem);
}

h2 {
  font-size: clamp(2.5rem, 5vw, 5.1rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  letter-spacing: -0.035em;
}

.hero-copy h1,
.hero-copy > p:last-child {
  grid-column: 2;
}

.hero-copy h1 {
  max-width: 1100px;
  font-size: clamp(3rem, 4.4vw, 4.6rem);
}

.hero-copy > p:last-child {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.5;
}

.trust-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 46px;
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.trust-rail li {
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 10px 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 560;
}

.trust-rail li + li {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.trust-rail span {
  color: var(--rust);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.84fr) minmax(520px, 1.16fr);
  gap: clamp(34px, 5vw, 72px);
  align-items: start;
}

.input-panel {
  min-width: 0;
  padding: 4px 0 0;
  border-top: 3px solid var(--ink);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 28px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.panel-heading p {
  max-width: 48ch;
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.reset-button {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 650;
}

.reset-button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.field-group {
  display: grid;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

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

.field {
  display: grid;
  align-content: start;
  gap: 8px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 680;
}

.field-helper {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.7rem;
  line-height: 1.45;
}

.control-shell {
  position: relative;
}

.control-shell input,
.field select {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-bottom: 1px solid #8f9188;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 560;
}

.control-shell input {
  padding: 8px 40px 8px 4px;
}

.control-shell--currency input {
  padding-left: 24px;
}

.field select {
  padding: 8px 32px 8px 4px;
}

.control-shell input:focus,
.field select:focus {
  border-color: var(--forest);
  outline: none;
}

.control-prefix,
.control-suffix {
  position: absolute;
  top: 50%;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 620;
  transform: translateY(-50%);
  pointer-events: none;
}

.control-prefix {
  left: 4px;
}

.control-suffix {
  right: 4px;
}

input[aria-invalid="true"] {
  border-color: var(--danger);
  background: rgba(164, 63, 52, 0.05);
}

.field-error,
.form-error {
  min-height: 1em;
  margin: 0;
  color: var(--danger);
  font-size: 0.7rem;
  font-weight: 620;
  line-height: 1.4;
}

.range-control {
  width: 100%;
  height: 20px;
  margin: 1px 0 0;
  appearance: none;
  background: transparent;
}

.range-control::-webkit-slider-runnable-track {
  height: 2px;
  background: var(--line);
}

.range-control::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -6px;
  border: 2px solid var(--canvas);
  border-radius: 0;
  background: var(--rust);
  box-shadow: 0 0 0 1px var(--rust);
  appearance: none;
}

.range-control::-moz-range-track {
  height: 2px;
  background: var(--line);
}

.range-control::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid var(--canvas);
  border-radius: 0;
  background: var(--rust);
  box-shadow: 0 0 0 1px var(--rust);
}

.advanced-assumptions {
  border-bottom: 1px solid var(--line);
}

.advanced-assumptions summary {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 680;
  list-style: none;
  cursor: pointer;
}

.advanced-assumptions summary::-webkit-details-marker {
  display: none;
}

.advanced-assumptions summary::after {
  color: var(--rust);
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 400;
}

.advanced-assumptions[open] summary::after {
  content: "-";
}

.advanced-assumptions .field-group {
  padding-top: 8px;
  border-bottom: 0;
}

.result-stack {
  position: sticky;
  top: 96px;
  display: grid;
  min-width: 0;
  gap: 24px;
}

.result-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(13, 48, 40, 0.8);
  border-radius: 3px;
  background: var(--forest);
  color: var(--white);
  box-shadow: var(--shadow-instrument);
}

.result-panel__top {
  padding: 30px 32px 28px;
  border-bottom: 1px solid var(--line-dark);
}

.instrument-kicker,
.meter-heading,
.floor-scale__labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.result-label {
  margin: 0;
  color: rgba(255, 253, 247, 0.72);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 590;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 0.61rem;
  text-transform: uppercase;
}

.live-indicator i {
  width: 6px;
  height: 6px;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(193, 223, 112, 0.12);
}

.quote-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 30px;
  margin-top: 34px;
}

.quote-value {
  display: block;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 5.2vw, 4.9rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.9;
  white-space: nowrap;
  transition: color 180ms ease, transform 180ms ease;
}

.quote-grid > div:last-child .quote-value {
  color: var(--white);
  font-size: clamp(1.8rem, 3.1vw, 2.75rem);
}

.quote-note {
  max-width: 27ch;
  margin: 12px 0 0;
  color: rgba(255, 253, 247, 0.56);
  font-size: 0.69rem;
  line-height: 1.45;
}

.result-panel.is-updating .quote-value {
  animation: data-settle 240ms ease-out;
}

@keyframes data-settle {
  0% { opacity: 0.58; transform: translateY(3px); }
  100% { opacity: 1; transform: translateY(0); }
}

.floor-scale {
  --floor-position: 66%;
  margin-top: 34px;
}

.floor-scale__labels {
  color: rgba(255, 253, 247, 0.5);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  text-transform: uppercase;
}

.floor-scale__labels span:nth-child(2) {
  color: var(--signal);
}

.floor-scale__track {
  position: relative;
  height: 19px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 253, 247, 0.28);
  background: repeating-linear-gradient(90deg, transparent 0 31px, rgba(255, 253, 247, 0.16) 31px 32px);
}

.floor-scale__track::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: var(--floor-position);
  height: 2px;
  background: var(--signal);
  content: "";
  transition: width 240ms ease;
}

.floor-scale__track i {
  position: absolute;
  top: -7px;
  left: var(--floor-position);
  width: 2px;
  height: 15px;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(193, 223, 112, 0.12);
  transform: translateX(-1px);
  transition: left 240ms ease;
}

.result-message {
  margin: 18px 0 0;
  padding: 12px;
  border-left: 3px solid #ef9a89;
  background: rgba(164, 63, 52, 0.22);
  color: #ffe5df;
  font-size: 0.78rem;
}

.result-panel__body {
  display: grid;
  gap: 21px;
  padding: 26px 32px 30px;
  background: var(--forest-deep);
}

.result-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line-dark);
}

.result-item {
  min-width: 0;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line-dark);
}

.result-item:nth-child(even) {
  padding-left: 20px;
  border-left: 1px solid var(--line-dark);
}

.result-item dt {
  margin: 0 0 5px;
  color: rgba(255, 253, 247, 0.48);
  font-size: 0.64rem;
  line-height: 1.35;
}

.result-item dd {
  margin: 0;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 520;
}

.meter-heading {
  color: rgba(255, 253, 247, 0.5);
  font-size: 0.62rem;
}

.meter-heading strong {
  color: rgba(255, 253, 247, 0.8);
  font-family: var(--font-mono);
  font-weight: 500;
}

.capacity-meter {
  --utilization: 70%;
  --working-ratio: 92.3%;
}

.capacity-meter__track {
  position: relative;
  height: 9px;
  margin-top: 10px;
  border: 1px solid var(--line-dark);
}

.capacity-meter__track::before {
  position: absolute;
  inset: 1px auto 1px 1px;
  width: var(--working-ratio);
  background: rgba(255, 253, 247, 0.12);
  content: "";
  transition: width 240ms ease;
}

.capacity-meter__track span {
  position: absolute;
  inset: 1px auto 1px 1px;
  width: var(--utilization);
  background: var(--signal);
  transition: width 240ms ease;
}

.revenue-closure {
  --take-home: 60%;
  --tax: 28%;
  --overhead: 12%;
  --fixed: 0%;
}

.revenue-closure__bar {
  display: flex;
  height: 13px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
}

.revenue-segment {
  display: block;
  min-width: 0;
  transition: flex-basis 240ms ease;
}

.revenue-segment--take-home { flex-basis: var(--take-home); background: var(--signal); }
.revenue-segment--tax { flex-basis: var(--tax); background: #5d8b7e; }
.revenue-segment--overhead { flex-basis: var(--overhead); background: var(--rust); }
.revenue-segment--fixed { flex-basis: var(--fixed); background: var(--white); }

.revenue-closure__legend {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
  color: rgba(255, 253, 247, 0.42);
  font-size: 0.54rem;
}

.revenue-closure__legend span::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  background: var(--signal);
  content: "";
}

.revenue-closure__legend span:nth-child(2)::before { background: #5d8b7e; }
.revenue-closure__legend span:nth-child(3)::before { background: var(--rust); }
.revenue-closure__legend span:nth-child(4)::before { background: var(--white); }

.closure-equation {
  margin: 0;
  padding-top: 4px;
  color: rgba(255, 253, 247, 0.42);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.6;
}

.result-panel.is-unavailable .quote-value,
.result-panel.is-unavailable .result-item dd {
  color: rgba(255, 253, 247, 0.42);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0;
  white-space: normal;
}

.benchmark-panel {
  min-width: 0;
  padding: 22px 0 0;
  border-top: 3px solid var(--ink);
}

.benchmark-panel h3 {
  font-size: 1.05rem;
}

.benchmark-panel .field {
  margin-top: 16px;
}

.benchmark-panel .field select {
  background-color: transparent;
}

.benchmark-status {
  margin: 15px 0 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.benchmark-content {
  margin-top: 20px;
}

.benchmark-band {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 680;
}

.benchmark-delta,
.benchmark-mapping,
.benchmark-source {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
  line-height: 1.5;
}

.benchmark-cells {
  --benchmark-position: 70%;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin: 22px 0 18px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.benchmark-cells::before {
  position: absolute;
  top: -8px;
  left: var(--benchmark-position);
  width: 2px;
  height: 17px;
  background: var(--rust);
  content: "";
  transform: translateX(-1px);
  transition: left 240ms ease;
}

.benchmark-cells::after {
  position: absolute;
  top: -27px;
  left: var(--benchmark-position);
  color: var(--rust);
  content: "FLOOR";
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  transform: translateX(-50%);
  transition: left 240ms ease;
}

.benchmark-cells li {
  min-height: 34px;
  padding: 7px 6px 0;
  border-left: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.53rem;
  line-height: 1.25;
  text-align: center;
}

.benchmark-cells li:last-child {
  border-right: 1px solid var(--line);
}

.benchmark-cells li.is-current {
  color: var(--forest);
  font-weight: 700;
}

.content-section {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}

.section-intro {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  max-width: none;
  gap: clamp(30px, 8vw, 120px);
  align-items: start;
  margin-bottom: 70px;
}

.section-intro .eyebrow {
  grid-column: 1;
}

.section-intro h2,
.section-intro > p:last-child {
  grid-column: 2;
}

.section-intro > p:last-child {
  max-width: 62ch;
  margin: 20px 0 0;
}

.section-intro p,
.article-copy p,
.legal-copy p,
.legal-copy li {
  color: var(--ink-soft);
}

.section-intro p,
.article-copy p {
  font-size: 1rem;
}

.method-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(54px, 9vw, 134px);
  align-items: start;
}

.article-copy {
  display: grid;
  gap: 22px;
}

.article-copy p {
  margin: 0;
}

.article-copy h3 {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.formula-stack {
  position: sticky;
  top: 104px;
  display: grid;
  border-top: 3px solid var(--ink);
}

.formula-block {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 14px 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.formula-block strong {
  font-size: 0.73rem;
}

.formula {
  overflow-wrap: anywhere;
  color: var(--forest);
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 1.25vw, 0.96rem);
  font-weight: 590;
  line-height: 1.65;
}

.formula-block p {
  grid-column: 2;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.example-ledger {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: clamp(42px, 8vw, 110px);
  align-items: start;
  padding: clamp(34px, 5vw, 68px);
  background: var(--forest);
  color: var(--white);
  box-shadow: var(--shadow-instrument);
}

.example-summary h2 {
  max-width: 710px;
  color: var(--white);
}

.example-summary > p {
  max-width: 62ch;
  margin: 22px 0 0;
  color: rgba(255, 253, 247, 0.66);
}

.example-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 38px;
  border-top: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}

.example-metric {
  min-height: 100px;
  padding: 16px;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.example-metric span {
  display: block;
  color: rgba(255, 253, 247, 0.46);
  font-size: 0.64rem;
}

.example-metric strong {
  display: block;
  margin-top: 7px;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 530;
}

.example-explanation {
  display: grid;
  gap: 19px;
  padding-top: 8px;
}

.example-explanation h3 {
  color: var(--signal);
}

.example-explanation p {
  margin: 0;
  color: rgba(255, 253, 247, 0.65);
  font-size: 0.9rem;
}

.cost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 3px solid var(--ink);
  border-left: 1px solid var(--line);
}

.cost-item {
  min-height: 250px;
  padding: 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cost-item:nth-child(4) {
  grid-column: 1 / -1;
  min-height: 0;
}

.cost-item p {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--ink-soft);
}

.reference-note {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(54px, 9vw, 134px);
  align-items: start;
}

.reference-note__copy {
  display: grid;
  gap: 22px;
}

.reference-note__copy > p {
  margin: 0;
  color: var(--ink-soft);
}

.reference-note__aside {
  margin-top: 12px;
  padding: 24px 26px;
  border-left: 4px solid var(--signal);
  background: var(--forest);
}

.reference-note__aside p {
  margin: 0;
  color: rgba(255, 253, 247, 0.76);
}

.faq-list {
  border-top: 3px solid var(--ink);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 0;
  font-size: 1.05rem;
  font-weight: 620;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  flex: 0 0 auto;
  color: var(--rust);
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 400;
  transition: transform 180ms ease;
}

.faq-list details[open] summary::after {
  content: "+";
  transform: rotate(45deg);
}

.faq-list details p {
  max-width: 780px;
  margin: 0;
  padding: 0 0 26px;
  color: var(--ink-soft);
}

.source-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.source-strip p {
  margin: 0;
}

.site-footer {
  padding: 62px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, minmax(150px, 0.5fr));
  gap: 50px;
}

.footer-brand p {
  max-width: 46ch;
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.footer-column strong {
  display: block;
  margin-bottom: 12px;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.footer-column a {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 46px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.63rem;
}

.footer-bottom p {
  margin: 0;
}

.mobile-result-bar {
  display: none;
}

.legal-hero {
  display: grid;
  grid-template-columns: minmax(120px, 0.25fr) minmax(0, 1fr);
  gap: clamp(34px, 7vw, 110px);
  padding: 70px 0 54px;
}

.legal-hero .eyebrow {
  grid-column: 1;
}

.legal-hero h1,
.legal-hero > p:last-child {
  grid-column: 2;
}

.legal-hero h1 {
  max-width: 980px;
  font-size: clamp(2.8rem, 4vw, 4rem);
}

.legal-hero > p:last-child {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.legal-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, var(--reading));
  justify-content: space-between;
  gap: clamp(48px, 10vw, 160px);
  margin-bottom: 120px;
  padding-top: 32px;
  border-top: 3px solid var(--ink);
}

.legal-meta {
  position: sticky;
  top: 108px;
  align-self: start;
  padding-top: 5px;
}

.legal-meta p {
  margin: 0 0 18px;
  color: var(--rust);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.legal-meta a {
  display: block;
  margin-top: 11px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-decoration: none;
}

.legal-meta a:hover {
  color: var(--ink);
}

.legal-copy {
  display: grid;
  max-width: var(--reading);
  gap: 22px;
}

.legal-copy section {
  display: grid;
  gap: 15px;
  scroll-margin-top: 100px;
}

.legal-copy section + section {
  margin-top: 18px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.legal-copy section:first-child {
  padding: 28px;
  border-left: 5px solid var(--signal);
  background: var(--forest);
}

.legal-copy section:first-child h2 {
  color: var(--signal);
}

.legal-copy section:first-child p,
.legal-copy section:first-child li {
  color: rgba(255, 253, 247, 0.74);
}

.legal-copy h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  letter-spacing: -0.045em;
}

.legal-copy p,
.legal-copy ul {
  margin: 0;
}

.legal-copy ul {
  padding-left: 22px;
}

.service-list,
.contact-options {
  display: grid;
  gap: 0;
  padding: 0 !important;
  border-top: 1px solid var(--line);
  list-style: none;
}

.service-list li,
.contact-option {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.service-list strong,
.contact-option strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.contact-option p {
  margin: 8px 0 14px;
}

.contact-option .button {
  min-height: 38px;
}

.legal-copy section:first-child .contact-options {
  border-color: var(--line-dark);
}

.legal-copy section:first-child .contact-option {
  border-color: var(--line-dark);
}

.legal-copy section:first-child .contact-option strong {
  color: var(--white);
}

.legal-copy section:first-child .button {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--forest-deep) !important;
}

@media (max-width: 1050px) {
  .calculator-grid {
    grid-template-columns: minmax(320px, 0.8fr) minmax(450px, 1.2fr);
    gap: 34px;
  }

  .quote-grid {
    grid-template-columns: 1fr;
  }

  .quote-grid > div:last-child {
    padding-top: 18px;
    border-top: 1px solid var(--line-dark);
  }

  .example-ledger {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .calculator-grid,
  .method-layout,
  .reference-note,
  .legal-shell {
    grid-template-columns: 1fr;
  }

  .result-stack {
    position: static;
    order: -1;
  }

  .formula-stack,
  .legal-meta {
    position: static;
  }

  .legal-meta {
    display: none;
  }

  .legal-shell {
    justify-content: stretch;
  }

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

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

  .trust-rail li:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .trust-rail li:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 76px;
  }

  body:has(.mobile-result-bar) {
    padding-bottom: 66px;
  }

  .container {
    width: min(calc(100% - 28px), var(--content));
  }

  .site-header__inner {
    min-height: 62px;
  }

  .site-nav__links {
    display: none;
  }

  .nav-cta {
    min-height: 36px;
    padding-inline: 13px;
  }

  .calculator-hero {
    padding: 42px 0 76px;
  }

  .hero-copy,
  .section-intro,
  .legal-hero {
    display: block;
  }

  .hero-copy .eyebrow,
  .legal-hero .eyebrow {
    margin-bottom: 18px;
  }

  h1 {
    font-size: clamp(3.2rem, 15vw, 5rem);
  }

  h2 {
    font-size: clamp(2.35rem, 12vw, 3.8rem);
  }

  .hero-copy > p:last-child {
    margin-top: 20px;
  }

  .trust-rail {
    margin-bottom: 34px;
  }

  .trust-rail li {
    min-height: 52px;
    padding-right: 8px;
    font-size: 0.68rem;
  }

  .trust-rail li + li {
    padding-left: 10px;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .result-panel__top,
  .result-panel__body {
    padding-right: 20px;
    padding-left: 20px;
  }

  .quote-value {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  .quote-grid > div:last-child .quote-value {
    font-size: 2rem;
  }

  .result-group,
  .field-group--two,
  .cost-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .result-item:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .field--wide,
  .cost-item:nth-child(4) {
    grid-column: auto;
  }

  .revenue-closure__legend {
    grid-template-columns: repeat(2, 1fr);
  }

  .benchmark-cells {
    grid-template-columns: repeat(5, 82px);
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .content-section {
    padding: 82px 0;
  }

  .section-intro {
    margin-bottom: 42px;
  }

  .section-intro .eyebrow {
    margin-bottom: 18px;
  }

  .formula-block {
    grid-template-columns: 1fr;
  }

  .formula-block p {
    grid-column: 1;
  }

  .example-ledger {
    width: 100%;
    padding: 28px 20px;
  }

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

  .cost-item {
    min-height: 0;
    padding: 25px 20px;
  }

  .source-strip,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-grid {
    gap: 30px;
  }

  .legal-hero {
    padding: 46px 0 38px;
  }

  .legal-hero h1 {
    font-size: clamp(2.65rem, 11vw, 3rem);
  }

  .legal-shell {
    margin-bottom: 80px;
    padding-top: 22px;
  }

  .legal-copy section:first-child {
    padding: 22px 20px;
  }

  .mobile-result-bar {
    position: fixed;
    right: 8px;
    bottom: 8px;
    left: 8px;
    z-index: 40;
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto;
    min-height: 58px;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 253, 247, 0.18);
    background: var(--forest-deep);
    color: var(--white);
    box-shadow: 0 12px 36px rgba(13, 48, 40, 0.36);
  }

  .mobile-result-bar > span {
    color: rgba(255, 253, 247, 0.5);
    font-size: 0.57rem;
    text-transform: uppercase;
  }

  .mobile-result-bar strong {
    color: var(--signal);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 560;
    text-align: right;
  }

  .mobile-result-bar i {
    width: 1px;
    height: 20px;
    background: var(--line-dark);
  }

  .mobile-result-bar strong:nth-of-type(2) {
    color: var(--white);
  }

  .mobile-result-bar a {
    color: var(--signal);
    font-size: 0.65rem;
    text-decoration: none;
  }
}

@media (max-width: 430px) {
  .trust-rail {
    grid-template-columns: 1fr;
  }

  .trust-rail li,
  .trust-rail li + li,
  .trust-rail li:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .trust-rail li:first-child {
    border-top: 0;
  }

  .example-metrics {
    grid-template-columns: 1fr;
  }

  .mobile-result-bar {
    grid-template-columns: auto 1fr auto auto;
  }

  .mobile-result-bar > span {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .mobile-result-bar,
  .reset-button,
  .range-control {
    display: none !important;
  }

  body {
    padding: 0;
    background: #fff;
    color: #111;
  }

  .result-stack,
  .formula-stack,
  .legal-meta {
    position: static;
  }

  .result-panel,
  .example-ledger {
    box-shadow: none;
  }
}
