:root {
  --color-yellow-primary: #ffbe18;
  --color-yellow-light: #ffc531;
  --color-yellow-soft: #ffe4a1;
  --color-blue-night: #0c161b;
  --color-blue-deep: #0a1013;
  --color-white: #ffffff;
  --color-ice: #fafcfd;
  --color-ice-blue: #ebf3f7;
  --color-gray-100: #eff3f5;
  --color-blue-gray: #435965;
  --color-blue-gray-light: #688594;
  --color-blue-gray-subtle: #a8b3b9;
  --separator-light: rgba(12, 22, 27, 0.14);
  --separator-dark: rgba(255, 255, 255, 0.16);
  --yellow-bg-subtle: rgba(255, 190, 24, 0.12);
  --yellow-glow: rgba(255, 190, 24, 0.24);
  --danger: #b83232;
  --success: #176a45;
  --warning: #806000;
  --font-family: "SF Pro", -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-card: 12px;
  --radius-pill: 33px;
  --shadow-panel: 0 24px 80px rgba(5, 12, 16, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-blue-night);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--color-blue-night);
  background:
    radial-gradient(circle at 78% 4%, rgba(255, 190, 24, 0.24), transparent 28rem),
    linear-gradient(180deg, var(--color-blue-night) 0, #14242b 46rem, var(--color-ice) 46rem);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 112px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 34px;
  color: var(--color-white);
}

.brand {
  display: inline-flex;
  min-width: 150px;
  text-decoration: none;
}

.brand-logo {
  width: 210px;
  max-width: 48vw;
  height: auto;
}

.brand-logo:not([src]),
.brand-logo[src=""] {
  display: none;
}

.brand-logo:not([src]) + .brand-fallback,
.brand-logo[src=""] + .brand-fallback {
  display: inline-flex;
}

.brand-fallback {
  display: none;
  align-items: center;
  gap: 10px;
}

.brand-symbol {
  width: 32px;
  height: 32px;
  border: 8px solid var(--color-yellow-primary);
  border-right-color: transparent;
  border-radius: 50%;
  box-shadow: 0 0 42px var(--yellow-glow);
}

.brand-fallback strong {
  display: block;
  font-size: 22px;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.brand-fallback small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 8px;
  font-weight: 510;
  letter-spacing: 0.12em;
}

.eyebrow,
.kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 590;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  padding: 10px 14px;
  border: 1px solid var(--separator-dark);
  border-radius: var(--radius-pill);
  color: var(--color-yellow-light);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(320px, 0.28fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
  min-height: 420px;
  padding: 22px 0 64px;
  color: var(--color-white);
}

.hero-copy {
  min-width: 0;
  max-width: 720px;
}

.hero .kicker,
.section-heading .kicker,
.cta-band .kicker {
  color: var(--color-yellow-primary);
}

.hero h1 {
  max-width: 720px;
  margin: 16px 0 20px;
  font-size: clamp(54px, 6vw, 82px);
  font-weight: 870;
  line-height: 0.92;
  letter-spacing: -0.04em;
  overflow-wrap: break-word;
}

.hero p:not(.kicker),
.section-heading p,
.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 17px;
  line-height: 1.32;
}

.hero p:not(.kicker) {
  max-width: 690px;
}

.hero-result {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--separator-dark);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 43px rgba(255, 190, 24, 0.08);
}

.hero-result strong {
  color: var(--color-yellow-primary);
  font-size: clamp(38px, 5vw, 58px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.hero-result small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.status-badge {
  width: fit-content;
  padding: 9px 13px;
  border-radius: var(--radius-pill);
  background: var(--yellow-bg-subtle);
  color: var(--color-yellow-primary);
  font-size: 12px;
  font-weight: 590;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-badge.is-profit {
  background: rgba(27, 119, 78, 0.14);
  color: #6ee0a7;
}

.status-badge.is-zero {
  background: rgba(255, 190, 24, 0.16);
  color: var(--color-yellow-primary);
}

.status-badge.is-loss {
  background: rgba(184, 50, 50, 0.14);
  color: #ff9b9b;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  min-width: 0;
  gap: 18px;
  align-items: stretch;
  margin-top: 0;
}

.panel {
  min-width: 0;
  border: 1px solid var(--separator-light);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-panel);
}

.inputs-panel,
.diagnosis-panel,
.levers-panel {
  padding: 24px;
}

.workspace > .panel {
  height: 100%;
}

.diagnosis-panel {
  display: flex;
  flex-direction: column;
}

.diagnosis-panel .break-even {
  margin-top: auto;
}

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

.section-heading h2,
.cta-band h2 {
  margin: 9px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 650;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

.section-heading p:not(.kicker) {
  color: rgba(12, 22, 27, 0.62);
  font-size: 15px;
  overflow-wrap: anywhere;
}

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

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field span,
.slider-field span,
.metric span,
.metric-hero span,
.break-even span,
.lever-effects > span,
.equivalent span {
  color: var(--color-blue-gray);
  font-size: 12px;
  font-weight: 590;
  line-height: 1.1;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(12, 22, 27, 0.18);
  border-radius: 10px;
  outline: none;
  background: var(--color-ice);
  color: var(--color-blue-night);
  font-size: 20px;
  font-weight: 590;
  letter-spacing: -0.01em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  border-color: var(--color-yellow-primary);
  box-shadow: 0 0 0 4px rgba(255, 190, 24, 0.18);
}

.field input.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(184, 50, 50, 0.08);
}

.field small {
  color: rgba(12, 22, 27, 0.54);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.metric-hero {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: var(--color-blue-night);
  color: var(--color-white);
}

.metric-hero strong {
  color: var(--color-yellow-primary);
  font-size: clamp(38px, 5vw, 56px);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

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

.metric {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--separator-light);
  border-radius: var(--radius-card);
  background: var(--color-ice);
}

.metric strong {
  overflow-wrap: anywhere;
  font-size: 24px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.03em;
}

.break-even {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 17px;
  border-radius: var(--radius-card);
  background: var(--yellow-bg-subtle);
}

.break-even strong {
  font-size: 17px;
  line-height: 1.22;
}

.levers-panel {
  margin-top: 18px;
}

.simulator-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
}

.slider-stack {
  display: grid;
  gap: 14px;
}

.slider-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--separator-light);
  border-radius: var(--radius-card);
  background: var(--color-ice);
}

.slider-field strong {
  color: var(--color-blue-night);
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.slider-field small {
  grid-column: 1 / -1;
  color: rgba(12, 22, 27, 0.58);
  font-size: 14px;
  line-height: 1.2;
}

.slider-field input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--color-yellow-primary);
}

.slider-field .target-input {
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid rgba(12, 22, 27, 0.18);
  border-radius: 10px;
  outline: none;
  background: var(--color-white);
  color: var(--color-blue-night);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.slider-field .target-input:focus {
  border-color: var(--color-yellow-primary);
  box-shadow: 0 0 0 4px rgba(255, 190, 24, 0.18);
}

.simulation-results {
  display: grid;
  gap: 12px;
}

.equivalent {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-card);
  background: linear-gradient(226deg, var(--color-yellow-light) 10%, var(--color-yellow-primary) 97%);
}

.equivalent strong {
  color: var(--color-blue-night);
  font-size: clamp(40px, 6vw, 64px);
  line-height: 0.9;
  letter-spacing: -0.05em;
}

.equivalent small {
  color: rgba(12, 22, 27, 0.78);
  font-size: 14px;
  line-height: 1.25;
}

.metric-grid.compact {
  margin-top: 0;
}

.lever-effects {
  padding: 16px;
  border: 1px solid var(--separator-light);
  border-radius: var(--radius-card);
  background: var(--color-white);
}

.lever-effects dl {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.lever-effects div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--separator-light);
}

.lever-effects div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.lever-effects dt,
.lever-effects dd {
  margin: 0;
}

.lever-effects dt {
  color: rgba(12, 22, 27, 0.62);
}

.lever-effects dd {
  font-weight: 650;
  text-align: right;
}

.discount-cost {
  margin: 0;
  padding: 15px;
  border-radius: var(--radius-card);
  background: var(--color-blue-night);
  color: var(--color-white);
  font-size: 15px;
  line-height: 1.3;
}

.cta-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: 18px;
  padding: clamp(36px, 5vw, 52px);
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 190, 24, 0.32);
  background:
    radial-gradient(circle at 82% 0, rgba(255, 190, 24, 0.08), transparent 28rem),
    var(--color-blue-night);
  color: var(--color-white);
  box-shadow: var(--shadow-panel);
}

.cta-copy {
  max-width: 720px;
}

.cta-band h2 {
  max-width: 760px;
  margin-top: 15px;
  font-size: clamp(34px, 4.3vw, 52px);
  font-weight: 870;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.cta-band p:not(.kicker) {
  max-width: 650px;
  color: rgba(235, 243, 247, 0.84);
  font-size: 18px;
  line-height: 1.55;
}

.cta-actions {
  display: grid;
  grid-template-columns: minmax(240px, 420px);
  gap: 10px;
  align-items: center;
  width: min(100%, 650px);
}

.cta-actions small {
  grid-column: 1 / -1;
  color: rgba(168, 179, 185, 0.58);
  font-size: 13px;
}

.cta-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  background: var(--color-yellow-primary);
  color: var(--color-blue-night);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.mobile-sticky {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: none;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--separator-light);
  background: rgba(250, 252, 253, 0.92);
  backdrop-filter: blur(18px);
}

.mobile-sticky .cta-button {
  width: 100%;
}

@media (max-width: 900px) {
  body {
    background:
      radial-gradient(circle at 78% 4%, rgba(255, 190, 24, 0.22), transparent 24rem),
      linear-gradient(180deg, var(--color-blue-night) 0, #14242b 58rem, var(--color-ice) 58rem);
  }

  .app-shell {
    width: calc(100% - 24px);
    max-width: 680px;
    padding-bottom: 104px;
  }

  .topbar {
    align-items: flex-start;
    padding-bottom: 18px;
  }

  .eyebrow {
    display: none;
  }

  .hero,
  .workspace,
  .simulator-layout {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero {
    gap: 18px;
    min-height: auto;
    padding: 18px 0 34px;
  }

  .hero-copy,
  .hero p:not(.kicker),
  .section-heading,
  .section-heading p:not(.kicker) {
    max-width: 100%;
  }

  .hero h1 {
    margin-top: 14px;
  }

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

  .inputs-panel,
  .diagnosis-panel,
  .levers-panel {
    padding: 18px;
  }

  .cta-band {
    align-items: flex-start;
    padding: 22px;
  }

  .cta-actions {
    grid-template-columns: 1fr;
  }

  .cta-band .cta-button {
    display: inline-flex;
    width: 100%;
  }

  .mobile-sticky {
    display: block;
  }
}

@media (max-width: 520px) {
  body {
    background:
      radial-gradient(circle at 84% 0, rgba(255, 190, 24, 0.2), transparent 18rem),
      linear-gradient(180deg, var(--color-blue-night) 0, #14242b 52rem, var(--color-ice) 52rem);
  }

  .app-shell {
    width: calc(100% - 18px);
    max-width: none;
  }

  .brand-logo {
    width: 172px;
  }

  .hero h1 {
    max-width: 10ch;
    font-size: 42px;
    line-height: 0.92;
    letter-spacing: -0.03em;
  }

  .hero p:not(.kicker),
  .cta-band p {
    max-width: 100%;
    font-size: 15px;
  }

  .metric strong {
    font-size: 22px;
  }

  .cta-band {
    display: block;
  }

  .cta-actions {
    margin-top: 22px;
  }

  .cta-band h2 {
    font-size: 31px;
  }
}
