:root {
  --ink: #0a3044;
  --muted: #454f5e;
  --line: #d5e4e9;
  --paper: #ffffff;
  --canvas: #e9f8f9;
  --surface: #ffffff;
  --moss: #0a3044;
  --moss-deep: #062c3f;
  --moss-light: #e9f8f9;
  --signal: #1863dc;
  --signal-soft: #e8f0ff;
  --sun: #75d5dc;
  --mono: "DM Sans", sans-serif;
  --sans: "DM Sans", sans-serif;
  --heading: "Poppins", sans-serif;
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/dm-sans-400.ttf") format("truetype");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/dm-sans-500.ttf") format("truetype");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/dm-sans-600.ttf") format("truetype");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/dm-sans-700.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/poppins-500.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/poppins-600.ttf") format("truetype");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/poppins-700.ttf") format("truetype");
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--canvas);
  background-image: linear-gradient(rgba(10, 48, 68, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(10, 48, 68, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: var(--sans);
}

.landing-page {
  min-height: 100vh;
  color: var(--paper);
  background: var(--moss-deep);
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1320px, 100%);
  min-height: 100px;
  margin: 0 auto;
  padding: 0 44px;
}

.landing-brand,
.landing-logo {
  display: block;
}

.landing-logo {
  width: 206px;
  height: 74px;
  object-fit: contain;
  object-position: left center;
}

.landing-nav-note {
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: clamp(50px, 10vw, 150px);
  min-height: calc(100vh - 170px);
  padding: 72px max(44px, calc((100vw - 1232px) / 2)) 100px;
  background:
    linear-gradient(90deg, rgba(6, 44, 63, 0.96) 0%, rgba(6, 44, 63, 0.85) 46%, rgba(6, 44, 63, 0.72) 100%),
    url("assets/team-meeting.jpg") center / cover;
}

.landing-copy {
  max-width: 760px;
  animation: rise-in 600ms ease-out both;
}

.landing-eyebrow,
.access-label {
  margin: 0 0 16px;
  color: var(--sun);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.landing-eyebrow span {
  width: 28px;
  height: 1px;
  background: var(--sun);
}

.landing-hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(42px, 5.5vw, 76px);
  line-height: 1.05;
}

.landing-lead {
  max-width: 610px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  line-height: 1.65;
}

.landing-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 35px;
}

.landing-highlights span {
  padding: 8px 11px;
  border: 1px solid rgba(117, 213, 220, 0.42);
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--mono);
  font-size: 10px;
}

.access-card {
  position: relative;
  padding: 32px;
  border: 1px solid rgba(117, 213, 220, 0.48);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25);
  animation: rise-in 600ms 140ms ease-out both;
}

.access-card::before {
  position: absolute;
  top: 0;
  left: 32px;
  width: 55px;
  height: 3px;
  background: var(--signal);
  content: "";
}

.access-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.access-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--paper);
  background: var(--moss);
  font-size: 20px;
}

.access-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
}

.access-label {
  margin-bottom: 3px;
  color: var(--signal);
  font-size: 9px;
}

.access-card > p {
  margin: 25px 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.access-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.password-field {
  display: flex;
  height: 48px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.password-field:focus-within {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(24, 99, 220, 0.13);
}

.password-field input {
  min-width: 0;
  flex: 1;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.password-field button {
  padding: 0 12px;
  border: 0;
  color: var(--signal);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
}

.access-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 12px;
  padding: 15px 16px;
  border: 1px solid var(--signal);
  color: var(--paper);
  background: var(--signal);
  font-weight: 800;
  transition: background-color 160ms ease, transform 160ms ease;
}

.access-submit:hover {
  background: #0d4ead;
  transform: translateY(-1px);
}

.access-submit span {
  font-size: 18px;
}

.access-feedback {
  min-height: 18px;
  margin: 9px 0 0;
  color: #a33a24;
  font-size: 11px;
  line-height: 1.4;
}

.access-card .access-hint {
  margin: 11px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.landing-value {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 25px;
  min-height: 70px;
  padding: 14px max(44px, calc((100vw - 1232px) / 2));
  background: var(--paper);
}

.landing-value p,
.landing-value span {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.landing-value span {
  text-align: right;
}

.landing-value strong {
  color: var(--moss);
  font-family: var(--heading);
  font-size: 14px;
  font-weight: 600;
}

.logout-button {
  padding: 9px 4px;
  border: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.logout-button:hover {
  color: var(--sun);
}

button,
input,
select {
  font: inherit;
}

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

button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(24, 99, 220, 0.4);
  outline-offset: 3px;
}

.app-shell {
  max-width: 1540px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 80px rgba(10, 48, 68, 0.1);
}

.topbar {
  display: flex;
  align-items: center;
  min-height: 98px;
  padding: 0 4.8%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background: var(--moss);
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--paper);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 212px;
  height: 78px;
  object-fit: contain;
  object-position: left center;
}

.brand-context {
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.34);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.topbar-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.76);
  font-family: var(--mono);
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 4px rgba(117, 213, 220, 0.16);
}

.text-button,
.outline-button {
  border: 0;
  color: var(--ink);
  background: none;
  font-size: 12px;
  font-weight: 800;
}

.text-button {
  padding: 11px 20px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
}

.text-button:hover {
  color: var(--paper);
  background: var(--signal);
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 290px;
  padding: 58px 4.8% 44px;
  border-bottom: 0;
  background:
    linear-gradient(100deg, rgba(6, 44, 63, 0.92) 0%, rgba(10, 48, 68, 0.77) 52%, rgba(10, 48, 68, 0.5) 100%),
    url("assets/team-meeting.jpg") center / cover,
    var(--moss);
  overflow: hidden;
}

.hero-copy {
  max-width: 780px;
  animation: rise-in 600ms ease-out both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: var(--heading);
}

h1 {
  max-width: 740px;
  margin-bottom: 16px;
  font-size: clamp(32px, 4.1vw, 60px);
  color: var(--paper);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.08;
}

.hero-lead {
  max-width: 660px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.65;
}

.goal-chip {
  display: grid;
  gap: 4px;
  flex: 0 0 205px;
  margin-left: 30px;
  padding: 16px 0 15px 20px;
  border-left: 3px solid var(--sun);
  color: var(--paper);
  background: rgba(6, 44, 63, 0.34);
  animation: rise-in 600ms 120ms ease-out both;
}

.goal-chip-label {
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.goal-chip strong {
  font-size: 20px;
  line-height: 1.2;
}

.goal-chip span:last-child {
  color: var(--sun);
  font-family: var(--mono);
  font-size: 11px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(245px, 0.84fr) minmax(480px, 1.45fr) minmax(330px, 0.97fr);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.control-panel,
.calculator-panel,
.result-panel {
  min-width: 0;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 34px 28px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.panel-heading h2,
.section-heading h2,
.proof-intro h2 {
  margin-bottom: 0;
  font-size: 21px;
  letter-spacing: 0;
  line-height: 1.25;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.field-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.select-control,
.input-with-suffix {
  width: 100%;
  height: 45px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--paper);
}

.select-control {
  padding: 0 10px;
  font-size: 13px;
}

.input-with-suffix {
  display: flex;
  align-items: center;
}

.input-with-suffix input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 10px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}

.input-with-suffix span {
  padding-right: 11px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.stage-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -10px;
  padding: 10px 11px;
  border-left: 3px solid var(--signal);
  background: var(--moss-light);
  color: var(--moss-deep);
  font-size: 11px;
}

.stage-readout strong {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 13px;
}

.range-row,
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.range-row output {
  display: grid;
  width: 38px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--paper);
  background: var(--moss);
  font-family: var(--mono);
  font-size: 13px;
}

#recurring-term-value {
  width: 64px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.range-control {
  width: 100%;
  height: 4px;
  margin: -6px 0 0;
  accent-color: var(--signal);
}

.toggle-row {
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.switch {
  position: relative;
  width: 43px;
  height: 24px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: #bdc6c1;
  pointer-events: none;
  transition: background-color 180ms ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 33, 38, 0.24);
  content: "";
  transition: transform 180ms ease;
}

.switch input:checked + .switch-track {
  background: var(--moss);
}

.switch input:checked + .switch-track::after {
  transform: translateX(19px);
}

.data-note {
  margin: auto 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.calculator-panel {
  padding: 34px 30px 24px;
  background: var(--paper);
}

.compact-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.mix-count,
.method-label {
  flex: 0 0 auto;
  color: var(--moss);
  font-family: var(--mono);
  font-size: 11px;
}

.mix-list {
  display: grid;
  gap: 2px;
}

.mix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px 66px;
  align-items: center;
  min-height: 56px;
  padding: 8px 0 8px 12px;
  border-left: 3px solid var(--row-color, var(--line));
  background: rgba(255, 255, 255, 0.57);
  transition: background-color 160ms ease, transform 160ms ease;
}

.mix-row:hover {
  background: var(--surface);
  transform: translateX(2px);
}

.mix-row-main {
  min-width: 0;
}

.mix-row-title {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.mix-row-subtitle {
  display: block;
  max-width: 100%;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mix-row-value {
  display: grid;
  gap: 1px;
  color: var(--moss);
  font-family: var(--mono);
  font-size: 10px;
  text-align: right;
}

.mix-row-value strong {
  font-size: 10px;
  font-weight: 500;
}

.mix-row-value small {
  color: var(--muted);
  font-size: 8px;
}

.stepper {
  display: grid;
  grid-template-columns: 20px 20px 20px;
  align-items: center;
  justify-content: end;
  gap: 1px;
}

.stepper button {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1;
}

.stepper button:hover {
  border-color: var(--moss);
  color: var(--paper);
  background: var(--moss);
}

.stepper span {
  min-width: 20px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  text-align: center;
}

.mix-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.mix-footer strong {
  color: var(--ink);
  font-family: var(--mono);
}

.outline-button {
  padding: 7px 9px;
  border: 1px solid var(--moss);
  border-radius: 3px;
  color: var(--moss);
  font-size: 10px;
  white-space: nowrap;
}

.outline-button:hover {
  color: var(--paper);
  background: var(--moss);
}

.result-panel {
  display: flex;
  flex-direction: column;
  background: var(--moss-deep);
  color: var(--paper);
}

.result-image {
  position: relative;
  min-height: 190px;
  background-image: url("assets/porsche-911.jpg");
  background-position: center;
  background-size: cover;
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(10, 48, 68, 0.86));
}

.result-image-label {
  position: absolute;
  right: 17px;
  bottom: 13px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 10px;
}

.result-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 28px 27px 26px;
}

.result-panel .eyebrow {
  color: var(--sun);
}

.result-kicker,
.result-description {
  margin: 0;
  color: rgba(247, 248, 243, 0.73);
  font-size: 13px;
}

.time-to-goal {
  margin: 7px 0 4px;
  color: var(--paper);
  font-family: var(--mono);
  font-size: clamp(31px, 3vw, 43px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.progress-block {
  margin: 28px 0 24px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: rgba(247, 248, 243, 0.69);
  font-size: 10px;
}

.progress-labels strong {
  color: var(--sun);
  font-family: var(--mono);
  font-weight: 500;
}

.progress-track {
  display: block;
  height: 8px;
  overflow: hidden;
  background: rgba(247, 248, 243, 0.18);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--signal);
  transition: width 380ms ease;
}

.result-stats {
  display: grid;
  gap: 11px;
  margin: auto 0 0;
}

.result-stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(247, 248, 243, 0.18);
}

.result-stats dt {
  color: rgba(247, 248, 243, 0.7);
  font-size: 10px;
}

.result-stats dd {
  margin: 0;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-align: right;
}

.live-pulse {
  position: fixed;
  right: max(18px, calc((100vw - 1500px) / 2 + 18px));
  bottom: 20px;
  z-index: 30;
  width: 322px;
  padding: 14px 16px 12px;
  border: 1px solid rgba(117, 213, 220, 0.32);
  border-radius: 8px;
  color: var(--paper);
  background: rgba(6, 44, 63, 0.97);
  box-shadow: 0 14px 34px rgba(6, 44, 63, 0.24);
  backdrop-filter: blur(10px);
}

.live-pulse-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.live-pulse-heading strong {
  font-family: var(--heading);
  font-size: 13px;
  font-weight: 600;
}

.live-pulse-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.live-pulse-status span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 3px rgba(117, 213, 220, 0.14);
}

.live-pulse-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.live-pulse-stats div {
  min-width: 0;
}

.live-pulse-stats dt {
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 9px;
}

.live-pulse-stats dd {
  overflow: hidden;
  margin: 0;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-pulse #pulse-delta.positive-delta,
.live-pulse #pulse-delta.negative-delta,
.live-pulse #pulse-delta.neutral-delta {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.live-pulse #pulse-delta.positive-delta {
  color: var(--sun);
}

.live-pulse #pulse-delta.negative-delta {
  color: #ffb29e;
}

.live-pulse p {
  margin: 11px 0 0;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.66);
  font-size: 9px;
}

.comparison-section {
  padding: 68px 4.8%;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.comparison-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 42px;
  margin-bottom: 28px;
}

.comparison-heading h2 {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.2;
}

.comparison-heading > p {
  max-width: 445px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.comparison-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 2px;
  padding: 14px 17px;
  background: var(--moss-light);
}

.comparison-stage-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.comparison-stage-field span,
.comparison-toolbar p {
  color: var(--muted);
  font-size: 10px;
}

.comparison-stage-field select {
  width: 240px;
  height: 36px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #b9d6df;
  border-radius: 4px;
  color: var(--ink);
  background: var(--paper);
  font-size: 11px;
}

.comparison-toolbar p {
  margin: 0 0 0 auto;
}

.comparison-toolbar p strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
}

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

.comparison-card {
  display: flex;
  min-height: 230px;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border-top: 3px solid var(--line);
  background: #f8fbfc;
}

.comparison-card h3 {
  margin: 22px 0 9px;
  color: var(--ink);
  font-family: var(--heading);
  font-size: 16px;
  font-weight: 600;
}

.comparison-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.comparison-income {
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(21px, 2vw, 29px);
  font-weight: 600;
  line-height: 1.1;
}

.comparison-detail {
  min-height: 32px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.comparison-delta {
  display: inline-flex;
  margin-top: auto;
  padding: 7px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.25;
}

.positive-delta {
  color: #075d69;
  background: #d9f4f4;
}

.negative-delta {
  color: #9a381f;
  background: #fff0eb;
}

.neutral-delta {
  color: var(--muted);
  background: #edf2f4;
}

.current-card {
  border-top-color: #9eb7c1;
  background: #eef5f7;
}

.kvk-card {
  border-top-color: var(--signal);
  background: var(--paper);
}

.featured-comparison {
  background: var(--moss);
}

.featured-comparison h3,
.featured-comparison .comparison-income {
  color: var(--paper);
}

.featured-comparison .comparison-label,
.featured-comparison .comparison-detail {
  color: rgba(255, 255, 255, 0.72);
}

.comparison-live {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2px;
  background: #215f7a;
}

.comparison-live div {
  display: grid;
  min-height: 84px;
  align-content: center;
  gap: 8px;
  padding: 14px 17px;
  background: var(--moss);
}

.comparison-live span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
}

.comparison-live strong {
  width: fit-content;
  margin: 0;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
}

.comparison-live strong.positive-delta,
.comparison-live strong.negative-delta,
.comparison-live strong.neutral-delta {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.comparison-live strong.positive-delta {
  color: var(--sun);
}

.comparison-live strong.negative-delta {
  color: #ffb29e;
}

.comparison-note {
  max-width: 780px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.team-section {
  padding: 66px 4.8%;
  border-bottom: 1px solid var(--line);
  background: var(--moss-light);
}

.team-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 42px;
  margin-bottom: 32px;
}

.team-heading h2 {
  max-width: 570px;
  margin-bottom: 0;
  font-size: 28px;
  letter-spacing: 0;
  line-height: 1.2;
}

.team-heading > p {
  max-width: 435px;
  margin: 0;
  color: var(--moss);
  font-size: 12px;
  line-height: 1.65;
}

.team-control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  margin-bottom: 26px;
}

.team-control {
  display: flex;
  min-height: 135px;
  flex-direction: column;
  padding: 17px 15px 14px;
  border-top: 3px solid var(--moss);
  background: var(--paper);
}

.team-control:nth-child(2) {
  border-top-color: #517a70;
}

.team-control:nth-child(3) {
  border-top-color: #7a7151;
}

.team-control:nth-child(4) {
  border-top-color: var(--signal);
}

.team-control:nth-child(5) {
  border-top-color: #936b46;
}

.team-control .range-row {
  align-items: start;
}

.team-control .field-label {
  max-width: 125px;
  font-size: 11px;
  line-height: 1.35;
}

.team-control .range-row output {
  min-width: 35px;
  width: auto;
  padding: 0 6px;
}

.team-control .range-control {
  margin: 8px 0 0;
}

.team-control .field-note {
  margin-top: auto;
  padding-top: 12px;
  font-size: 9px;
}

.team-projection {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(420px, 1fr);
  gap: 2px;
}

.structure-map {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 28px minmax(110px, 1fr) 28px minmax(110px, 1fr);
  align-items: center;
  padding: 22px 20px;
  background: var(--moss-deep);
}

.structure-node {
  display: grid;
  min-height: 85px;
  align-content: center;
  gap: 7px;
  padding: 10px;
  border-left: 2px solid rgba(247, 248, 243, 0.34);
  color: var(--paper);
}

.structure-node span {
  color: rgba(247, 248, 243, 0.64);
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.structure-node strong {
  font-size: 13px;
  line-height: 1.32;
}

.root-node {
  border-left-color: var(--sun);
}

.structure-connector {
  height: 2px;
  background: rgba(247, 248, 243, 0.44);
}

.team-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
}

.team-metrics div {
  min-height: 64px;
  padding: 13px 15px;
  background: var(--paper);
}

.team-metrics dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
}

.team-metrics dd {
  margin: 0;
  color: var(--moss);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

.team-top-controls {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(260px, 1fr) minmax(190px, 0.52fr);
  gap: 2px;
  margin-bottom: 2px;
}

.team-top-controls .team-control {
  min-height: 128px;
}

.team-callout {
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 17px 18px;
  color: var(--paper);
  background: var(--moss-deep);
}

.team-callout span,
.team-callout small {
  color: rgba(247, 248, 243, 0.67);
  font-size: 10px;
}

.team-callout strong {
  color: var(--sun);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
}

.add-team-button {
  min-height: 128px;
  padding: 14px;
  border-color: var(--moss-deep);
  background: var(--paper);
  white-space: normal;
}

.downline-groups {
  display: grid;
  gap: 2px;
  margin-bottom: 26px;
}

.downline-row {
  display: grid;
  grid-template-columns: 84px minmax(200px, 1.4fr) minmax(118px, 0.55fr) minmax(100px, 0.48fr) minmax(150px, 0.66fr) 32px;
  align-items: end;
  gap: 14px;
  padding: 15px;
  border-left: 3px solid var(--signal);
  background: var(--paper);
}

.downline-index {
  align-self: center;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.group-field,
.group-difference,
.group-income {
  display: grid;
  gap: 7px;
}

.group-field span,
.group-difference span,
.group-income span {
  color: var(--muted);
  font-size: 9px;
}

.group-field select,
.group-field input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  background: var(--paper);
  font-size: 11px;
}

.group-difference strong,
.group-income strong {
  color: var(--moss);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 36px;
}

.remove-group {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 15px;
}

.remove-group:hover {
  border-color: var(--signal);
  color: var(--paper);
  background: var(--signal);
}

.stage-section {
  padding: 70px 4.8%;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.stage-model {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
}

.stage-card {
  display: grid;
  min-height: 120px;
  align-content: space-between;
  gap: 8px;
  padding: 15px;
  border: 1px solid transparent;
  border-top: 3px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper);
  text-align: left;
}

.stage-card span,
.stage-card small {
  color: var(--muted);
  font-size: 10px;
}

.stage-card strong {
  color: var(--moss);
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
}

.stage-card:hover {
  border-color: var(--moss);
  background: var(--moss-light);
}

.stage-card.selected-stage {
  border-color: var(--signal);
  border-top-color: var(--signal);
  background: var(--signal-soft);
}

.stage-card.selected-stage strong {
  color: var(--signal);
}

.proof-section,
.details-section {
  padding: 70px 4.8%;
}

.proof-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(480px, 1.6fr);
  gap: 70px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.proof-intro p:last-child {
  max-width: 380px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.formula-card {
  min-height: 188px;
  padding: 19px;
  border-top: 3px solid var(--moss);
  background: var(--paper);
}

.formula-number {
  color: var(--signal);
  font-family: var(--mono);
  font-size: 12px;
}

.formula-card h3 {
  margin: 30px 0 9px;
  font-size: 14px;
}

.formula-card p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.65;
}

.accent-card {
  border-top-color: var(--signal);
  background: var(--signal-soft);
}

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

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.table-wrap {
  overflow-x: auto;
  border-top: 2px solid var(--ink);
}

table {
  width: 100%;
  min-width: 740px;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

td {
  color: var(--ink);
}

td:first-child {
  min-width: 190px;
  font-weight: 800;
}

td:nth-child(2) {
  max-width: 290px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

td:nth-child(3),
td:nth-child(4),
td:nth-child(5) {
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}

.table-count {
  display: inline-grid;
  min-width: 25px;
  min-height: 25px;
  place-items: center;
  color: var(--paper);
  background: var(--moss);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: minmax(245px, 0.82fr) minmax(420px, 1.28fr);
  }

  .result-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 0.7fr 1fr;
  }

  .result-image {
    min-height: 100%;
  }

  .result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 12px;
  }

  .result-stats div {
    display: block;
  }

  .result-stats dd {
    margin-top: 5px;
    text-align: left;
  }

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

  .team-projection {
    grid-template-columns: 1fr;
  }

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

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

  .comparison-toolbar {
    flex-wrap: wrap;
  }

  .comparison-toolbar p {
    width: 100%;
    margin-left: 0;
  }

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

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

  .add-team-button {
    grid-column: span 2;
    min-height: 58px;
  }

  .downline-row {
    grid-template-columns: 72px minmax(170px, 1.2fr) minmax(104px, 0.45fr) minmax(92px, 0.42fr) minmax(130px, 0.56fr) 32px;
    gap: 10px;
  }
}

@media (max-width: 760px) {
  .landing-nav {
    min-height: 72px;
    padding: 0 20px;
  }

  .landing-logo {
    width: 138px;
    height: 50px;
  }

  .landing-nav-note {
    max-width: 132px;
    font-size: 9px;
    line-height: 1.45;
    text-align: right;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    gap: 44px;
    min-height: calc(100vh - 138px);
    padding: 58px 20px 64px;
  }

  .landing-hero h1 {
    font-size: clamp(38px, 11vw, 54px);
  }

  .landing-lead {
    font-size: 15px;
  }

  .access-card {
    padding: 26px 20px;
  }

  .access-card::before {
    left: 20px;
  }

  .landing-value {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 17px 20px;
    text-align: left;
  }

  .landing-value span {
    text-align: left;
  }

  .topbar {
    min-height: 62px;
    padding: 0 20px;
    gap: 12px;
  }

  .brand-logo {
    width: 132px;
    height: 50px;
  }

  .brand-context {
    display: none;
  }

  .topbar-status {
    display: none;
  }

  .text-button {
    margin-left: auto;
    padding: 9px 13px;
  }

  .logout-button {
    padding: 9px 0;
    font-size: 10px;
  }

  .live-pulse {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    padding: 10px 12px 9px;
  }

  .live-pulse-heading {
    margin-bottom: 8px;
  }

  .live-pulse-stats {
    gap: 7px;
  }

  .live-pulse-stats dd {
    font-size: 11px;
  }

  .live-pulse p {
    margin-top: 8px;
    padding-top: 7px;
  }

  .hero {
    display: block;
    min-height: 0;
    padding: 42px 20px 32px;
  }

  .hero-lead {
    font-size: 14px;
  }

  .goal-chip {
    margin: 30px 0 0;
  }

  .workspace,
  .proof-section {
    display: block;
  }

  .control-panel,
  .calculator-panel,
  .proof-section,
  .details-section,
  .team-section,
  .stage-section {
    padding-right: 20px;
    padding-left: 20px;
  }

  .control-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .calculator-panel {
    padding-top: 30px;
  }

  .result-panel {
    display: flex;
  }

  .result-image {
    min-height: 210px;
  }

  .result-content {
    min-height: 330px;
    padding: 26px 20px;
  }

  .result-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .result-stats div {
    display: flex;
  }

  .result-stats dd {
    margin-top: 0;
    text-align: right;
  }

  .proof-section,
  .details-section,
  .team-section,
  .stage-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .details-section {
    padding-bottom: 150px;
  }

  .team-heading {
    display: block;
    margin-bottom: 25px;
  }

  .comparison-heading {
    display: block;
    margin-bottom: 24px;
  }

  .comparison-heading h2 {
    font-size: 23px;
  }

  .comparison-heading > p {
    margin-top: 16px;
  }

  .comparison-toolbar {
    display: grid;
    gap: 12px;
  }

  .comparison-stage-field {
    display: grid;
    gap: 7px;
  }

  .comparison-stage-field select {
    width: 100%;
  }

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

  .comparison-live {
    grid-template-columns: 1fr;
  }

  .comparison-live div {
    min-height: 70px;
  }

  .comparison-card {
    min-height: 196px;
  }

  .team-heading h2 {
    font-size: 23px;
  }

  .team-heading > p {
    margin-top: 16px;
  }

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

  .team-control:last-child {
    grid-column: span 2;
  }

  .team-top-controls {
    grid-template-columns: 1fr;
  }

  .add-team-button {
    grid-column: auto;
    min-height: 56px;
  }

  .team-control {
    min-height: 122px;
  }

  .team-projection {
    grid-template-columns: 1fr;
  }

  .structure-map {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 18px;
  }

  .structure-node {
    min-height: 55px;
  }

  .structure-connector {
    width: 2px;
    height: 15px;
    margin-left: 10px;
  }

  .downline-row {
    grid-template-columns: 1fr 32px;
    align-items: center;
    gap: 13px;
  }

  .downline-index {
    grid-column: 1;
  }

  .group-field,
  .group-difference,
  .group-income {
    grid-column: 1 / -1;
  }

  .remove-group {
    grid-column: 2;
    grid-row: 1;
  }

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

  .stage-card {
    min-height: 108px;
  }

  .proof-intro p:last-child {
    margin-bottom: 30px;
  }

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

  .formula-card {
    min-height: 0;
  }

  .formula-card h3 {
    margin-top: 18px;
  }

  .section-heading {
    display: block;
  }

  .method-label {
    display: block;
    margin-top: 14px;
  }
}

@media (max-width: 430px) {
  h1 {
    font-size: 32px;
  }

  .calculator-panel {
    padding-right: 14px;
    padding-left: 14px;
  }

  .compact-heading {
    padding: 0 6px;
  }

  .mix-row {
    grid-template-columns: minmax(0, 1fr) 64px 66px;
    padding-left: 9px;
  }

  .mix-row-value {
    font-size: 8px;
  }

  .mix-row-value strong {
    font-size: 8px;
  }

  .mix-footer {
    margin-right: 6px;
    margin-left: 6px;
  }
}