:root {
  --ink: #172126;
  --muted: #617078;
  --paper: #f7f4ee;
  --panel: #ffffff;
  --line: #d9ded8;
  --green: #237a57;
  --gold: #d9a441;
  --coral: #c95d4b;
  --teal: #1d7893;
  --shadow: 0 18px 40px rgba(30, 40, 45, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(247, 244, 238, 0.92);
  border-bottom: 1px solid rgba(23, 33, 38, 0.08);
  backdrop-filter: blur(12px);
}

.brand,
nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
}

nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

main {
  overflow: hidden;
}

.tool-shell,
.data-band,
.scenarios,
.launch,
.disclosure {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.tool-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(340px, 1.12fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: 44px 0;
}

.tool-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.tool-copy p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.proof-strip span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: #344147;
  font-weight: 750;
}

.calculator-card {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(23, 33, 38, 0.12);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.card-heading,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  line-height: 1.08;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.35rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: #405057;
  font-size: 0.88rem;
  font-weight: 760;
}

input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--ink);
  font: inherit;
  font-weight: 760;
  outline: none;
  padding: 0 12px;
}

input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29, 120, 147, 0.15);
}

.input-wrap {
  display: flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfa;
  overflow: hidden;
}

.input-wrap span {
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.input-wrap input {
  min-height: 44px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0 4px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.result-grid article {
  min-height: 94px;
  padding: 13px;
  border-radius: 8px;
  background: #f1f5f0;
}

.result-grid span {
  display: block;
  min-height: 32px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.result-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(1.1rem, 3vw, 1.55rem);
  line-height: 1;
}

.verdict {
  margin-top: 16px;
  padding: 13px 14px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #eef7f1;
  color: #214332;
  font-weight: 760;
}

.primary-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 16px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 850;
  text-decoration: none;
}

.data-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  padding: 72px 0;
}

.data-band p:not(.eyebrow),
.disclosure p {
  color: var(--muted);
}

.visual-panel {
  min-height: 280px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(35, 122, 87, 0.9), rgba(29, 120, 147, 0.84)),
    #237a57;
  padding: 26px;
}

.funnel-visual {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  height: 228px;
}

.funnel-visual span {
  display: block;
  height: var(--h);
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #fff7d9, #d9a441);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.section-heading {
  max-width: 680px;
}

.scenarios,
.launch,
.disclosure {
  padding: 58px 0;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.scenario {
  display: block;
  min-height: 144px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.tool-link {
  text-decoration: none;
}

.scenario:hover,
.icon-button:hover,
.primary-cta:hover {
  transform: translateY(-1px);
}

.scenario strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.scenario span,
li {
  color: var(--muted);
}

.launch {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 26px;
  border-top: 1px solid var(--line);
}

ol {
  margin: 0;
  padding-left: 20px;
}

li + li {
  margin-top: 10px;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #e9eee9;
}

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

.disclosure h2 {
  font-size: 1.15rem;
}

footer {
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 880px) {
  .tool-shell,
  .data-band,
  .launch {
    grid-template-columns: 1fr;
  }

  .tool-shell {
    min-height: auto;
  }

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

@media (max-width: 620px) {
  .topbar,
  nav {
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }

  .field-grid,
  .result-grid,
  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .tool-shell,
  .data-band,
  .scenarios,
  .launch,
  .disclosure {
    width: min(100% - 28px, 1120px);
  }

  .calculator-card {
    padding: 16px;
  }

  .result-grid article {
    min-height: 78px;
  }
}
