:root {
  --navy: #071f49;
  --navy-2: #0b356b;
  --blue: #087af5;
  --blue-2: #2596ff;
  --cyan: #8ed6ff;
  --ink: #0b1838;
  --muted: #66799d;
  --paper: #f3f7fc;
  --card: #ffffff;
  --line: #dfe8f5;
  --soft-blue: #edf5ff;
  --success: #1bc59a;
  --shadow: 0 18px 48px rgba(26, 65, 121, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: radial-gradient(circle at 80% 4%, rgba(37,150,255,.11), transparent 30rem), var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(8,122,245,.28); outline-offset: 2px; }
.hidden { display: none !important; }
.page-shell { max-width: 1760px; margin: 0 auto; padding: 0 38px 52px; }

.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(35,75,132,.10); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; width: 96px; height: auto; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.private-chip { display: inline-flex; align-items: center; padding: 8px 12px; color: #5f7396; background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.private-chip i { width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(27,197,154,.12); }
.ghost-button { min-height: 40px; padding: 8px 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.ghost-button:hover { transform: translateY(-1px); border-color: #b9cce5; box-shadow: 0 8px 22px rgba(20,62,121,.10); }
.ghost-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.intro { padding: 34px 0 24px; display: grid; grid-template-columns: minmax(360px,.85fr) minmax(620px,1.15fr); gap: 48px; align-items: center; }
.eyebrow, .step-kicker { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .12em; }
h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(39px,4.4vw,62px); line-height: 1; letter-spacing: -.05em; }
h1 span { color: var(--blue); }
.intro-copy > p:last-child { max-width: 640px; margin: 13px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.workflow { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3,1fr); list-style: none; }
.workflow li { position: relative; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 8px 28px 8px 0; }
.workflow li:not(:last-child)::after { content: ""; position: absolute; right: 9px; top: 50%; width: 18px; height: 2px; background: #bdd8f8; }
.workflow b { width: 36px; height: 36px; flex: none; display: grid; place-items: center; color: white; background: linear-gradient(145deg,var(--blue),var(--blue-2)); border-radius: 50%; box-shadow: 0 7px 18px rgba(8,122,245,.2); font-size: 14px; }
.workflow strong, .workflow small { display: block; }
.workflow strong { font-size: 13px; line-height: 1.25; }
.workflow small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.25; }

.scope-bar { margin-bottom: 15px; padding: 13px 16px; display: grid; grid-template-columns: auto auto 1fr; gap: 16px; align-items: center; background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 8px 28px rgba(26,65,121,.05); }
.scope-label { display: block; margin-bottom: 7px; color: #6c7e9a; font-size: 10px; font-weight: 800; letter-spacing: .11em; }
.segmented { width: 270px; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; background: #eaf1fa; border-radius: 10px; }
.segmented button, .scenario-tabs button { border: 0; border-radius: 8px; background: transparent; color: #657794; font-weight: 750; cursor: pointer; }
.segmented button { padding: 8px 10px; font-size: 12px; }
.segmented button.active, .scenario-tabs button.active { color: #075fbf; background: #fff; box-shadow: 0 3px 10px rgba(21,68,127,.1); }
.network-size { display: grid; grid-template-columns: auto 78px; gap: 9px; align-items: center; font-size: 12px; color: #556b8d; }
.network-size input { width: 78px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; text-align: right; font-weight: 750; }
.scope-bar > p { margin: 0; justify-self: end; max-width: 570px; color: #7888a3; font-size: 12px; line-height: 1.45; text-align: right; }

.simulator-workspace { display: grid; grid-template-columns: minmax(300px,.92fr) minmax(390px,1.16fr) minmax(335px,.92fr); gap: 15px; align-items: start; }
.step-card, .comparison-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.step-card { padding: 20px; }
.card-heading { min-height: 82px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.step-kicker { font-size: 10px; }
h2 { font-size: 24px; line-height: 1.12; letter-spacing: -.035em; }
.card-heading p:not(.step-kicker) { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.icon-button { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #f8fbff; cursor: pointer; }
.icon-button svg { width: 18px; fill: none; stroke: #60799d; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.metric-section { margin-top: 15px; }
.metric-section h3 { height: 36px; padding: 0 10px; display: flex; align-items: center; gap: 8px; color: #056ddd; background: linear-gradient(90deg,#eef6ff,#f7fbff); border-radius: 9px; font-size: 13px; letter-spacing: -.01em; }
.section-disclaimer { margin: 7px 7px 1px; color: #788aa5; font-size: 12px; line-height: 1.4; }
.section-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: #fff; box-shadow: 0 3px 10px rgba(20,97,180,.08); }
.section-icon svg { width: 16px; height: 16px; fill: none; stroke: var(--blue); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.actual-field { min-height: 47px; padding: 5px 4px 5px 7px; display: grid; grid-template-columns: minmax(0,1fr) 137px; gap: 10px; align-items: center; border-bottom: 1px solid #edf1f7; }
.actual-field > span:first-child { color: #314b73; font-size: 13px; font-weight: 650; line-height: 1.25; }
.actual-field small, .target-label small { display: block; margin-top: 2px; color: #8492a8; font-size: 10px; font-weight: 500; }
.featured-field { margin-top: 4px; padding-left: 9px; padding-right: 6px; background: #f5faff; border: 1px solid #d8eaff; border-radius: 10px; }
.number-box { min-width: 0; height: 35px; padding: 0 8px; display: flex; align-items: center; gap: 5px; border: 1px solid #d7e2f0; border-radius: 8px; background: #fbfdff; transition: .2s ease; }
.number-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8,122,245,.10); }
.number-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #10264d; font-size: 13px; font-weight: 800; text-align: right; }
.number-box b { color: #657c9e; font-size: 12px; font-weight: 650; }
.number-box em { color: #8290a7; font-size: 9px; font-style: normal; white-space: nowrap; }
.money-box input { text-align: left; }
.derived-summary { margin-top: 8px; padding: 9px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; background: linear-gradient(135deg,#edf6ff,#f7fbff); border: 1px solid #cfe4fb; border-radius: 10px; }
.derived-title { grid-column: 1 / -1; color: #3470af; font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.derived-summary > div { min-width: 0; padding: 8px; background: rgba(255,255,255,.8); border-radius: 8px; }
.derived-summary > div span, .derived-summary > div strong { display: block; }
.derived-summary > div span { color: #7185a2; font-size: 10px; }
.derived-summary > div strong { margin-top: 3px; overflow: hidden; color: #075fbf; font-size: 16px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.commission-field { background: #f8fcff; }
.commission-summary { background: linear-gradient(135deg,#e9f9f5,#f6fcff); border-color: #bee8df; }
.commission-summary .derived-title, .commission-summary > div strong { color: #087a70; }

.scenario-tabs { margin: 11px 0 14px; padding: 4px; display: grid; grid-template-columns: repeat(4,1fr); gap: 3px; background: #edf3fb; border-radius: 10px; }
.scenario-tabs button { min-width: 0; padding: 8px 3px; font-size: 10px; }
.target-section { margin-top: 13px; }
.target-row { padding: 8px 4px 9px 7px; border-bottom: 1px solid #edf1f7; }
.target-label { margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.target-label > span { color: #314b73; font-size: 13px; font-weight: 650; line-height: 1.2; }
.target-label output { min-width: 50px; padding: 3px 7px; color: #0872e6; background: #e9f3ff; border-radius: 7px; font-size: 10px; font-weight: 850; text-align: center; white-space: nowrap; }
.target-label output.negative { color: #a8484b; background: #fff0f1; }
.target-label output.neutral { color: #64748b; background: #eef2f7; }
.target-control { display: grid; grid-template-columns: minmax(100px,1fr) 139px; gap: 10px; align-items: center; }
.target-control > input[type="range"] { --fill: 0%; width: 100%; height: 5px; appearance: none; border-radius: 999px; outline: none; cursor: pointer; background: linear-gradient(90deg,var(--blue) 0 var(--fill),#dce6f2 var(--fill) 100%); }
.target-control > input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; appearance: none; border: 3px solid white; border-radius: 50%; background: #ddebff; box-shadow: 0 1px 7px rgba(20,67,130,.28); }
.target-control > input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border: 3px solid white; border-radius: 50%; background: #ddebff; box-shadow: 0 1px 7px rgba(20,67,130,.28); }
.featured-target { margin-top: 4px; padding: 9px; background: #f5faff; border: 1px solid #d8eaff; border-radius: 10px; }

.results-pane { min-width: 0; position: sticky; top: 14px; }
.impact-card { position: relative; overflow: hidden; padding: 22px; color: white; background: radial-gradient(circle at 98% 2%,rgba(29,137,255,.55),transparent 38%),linear-gradient(150deg,#0c285d,#07366f 65%,#061d43); border: 1px solid rgba(33,144,255,.48); border-radius: 19px; box-shadow: 0 24px 55px rgba(4,35,79,.25); }
.impact-card::before { content: ""; position: absolute; width: 220px; height: 220px; right: -115px; top: 100px; border: 1px solid rgba(141,211,255,.13); border-radius: 50%; pointer-events: none; }
.impact-topline { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.scenario-kicker { display: block; color: #b7e2ff; font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.impact-topline p { margin: 5px 0 0; color: #c5d8f2; font-size: 12px; }
.model-chip { padding: 7px 9px; color: #cae4ff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 999px; font-size: 9px; white-space: nowrap; }
.main-result { position: relative; padding: 28px 0 25px; }
.main-result > span { display: block; color: #c9ddf5; font-size: 13px; }
.main-result strong { display: block; margin-top: 7px; color: #fff; font-size: clamp(43px,4.2vw,68px); line-height: .98; letter-spacing: -.06em; }
.main-result p { margin: 9px 0 0; color: #c1d7f0; font-size: 12px; line-height: 1.4; }
.main-result .volume-baseline { margin-top: 10px; color: #e0edfb; font-weight: 700; }
.main-result .volume-baseline + p { margin-top: 3px; }
.metric-grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.result-metric { min-height: 105px; padding: 13px; border: 1px solid rgba(148,204,255,.18); border-radius: 11px; background: rgba(1,25,60,.25); box-shadow: inset 0 1px rgba(255,255,255,.03); }
.result-metric span { display: block; color: #cae0f7; font-size: 11px; line-height: 1.25; }
.result-metric strong { display: block; margin: 6px 0 2px; color: #fff; font-size: 23px; line-height: 1.1; letter-spacing: -.035em; }
.result-metric small { display: block; color: #90acd0; font-size: 9px; line-height: 1.35; }
.impact-explanation { position: relative; margin-top: 13px; padding: 10px 11px; display: flex; align-items: flex-start; gap: 8px; color: #cfe9ff; background: rgba(34,151,255,.12); border: 1px solid rgba(108,194,255,.18); border-radius: 10px; }
.impact-explanation > span { color: #64caff; }
.impact-explanation p { margin: 0; font-size: 10px; line-height: 1.45; }
.impact-actions { position: relative; margin-top: 14px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.primary-button, .secondary-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border-radius: 10px; font-size: 11px; font-weight: 800; cursor: pointer; transition: .2s ease; }
.primary-button { padding: 10px 13px; color: white; border: 1px solid #39a8ff; background: linear-gradient(135deg,#198fff,#0673e4); box-shadow: 0 9px 22px rgba(4,115,231,.28); }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.secondary-button { padding: 9px 11px; color: #d8ebff; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.07); }
.secondary-button:hover { background: rgba(255,255,255,.13); }
.primary-button svg, .secondary-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.projection-note { position: relative; margin: 13px 0 0; color: #a7beda; font-size: 12px; line-height: 1.45; }

.comparison-card { margin-top: 15px; padding: 22px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-heading h2 { font-size: 21px; }
.section-heading p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.weekly-chip { padding: 8px 11px; color: #47668e; background: #edf5ff; border: 1px solid #d9e9fb; border-radius: 999px; font-size: 10px; }
.scenario-comparison { margin-top: 17px; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.scenario-row { padding: 13px; display: grid; grid-template-columns: 87px minmax(70px,1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fbfdff; cursor: pointer; transition: .2s ease; }
.scenario-row:hover, .scenario-row.active { border-color: #8ec5ff; background: #f1f8ff; transform: translateY(-1px); }
.scenario-row > span { color: #264a78; font-size: 12px; font-weight: 800; }
.scenario-row .bar { height: 22px; overflow: hidden; background: #e7edf5; border-radius: 6px; }
.scenario-row .bar i { display: block; height: 100%; min-width: 3px; border-radius: 6px; transition: width .35s ease; }
.scenario-row strong { color: #173861; font-size: 12px; text-align: right; }
.scenario-row small { display: block; margin-top: 2px; color: #7889a1; font-size: 9px; font-weight: 500; }

.calculation-dialog { width: min(720px,calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 25px; overflow-y: auto; color: var(--ink); background: white; border: 0; border-radius: 18px; box-shadow: 0 34px 100px rgba(3,28,66,.32); }
.calculation-dialog::backdrop { background: rgba(3,19,48,.58); backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; }
.dialog-heading h2 { font-size: 27px; }
.dialog-heading p:not(.step-kicker) { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.dialog-close { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #f7faff; color: #61718a; font-size: 25px; line-height: 1; cursor: pointer; }
.calculation-table { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.calculation-row { min-height: 46px; padding: 10px 13px; display: grid; grid-template-columns: minmax(180px,1.4fr) 1fr 1fr; gap: 12px; align-items: center; border-top: 1px solid var(--line); }
.calculation-row:first-child { border-top: 0; }
.calculation-row strong, .calculation-row span { font-size: 12px; }
.calculation-row span { text-align: right; color: #51698b; }
.calculation-head { background: #f1f7ff; color: #31557f; font-weight: 800; }
.formula-note { margin-top: 14px; padding: 13px; display: grid; gap: 4px; background: #f4f8fd; border-radius: 10px; }
.formula-note b { color: #245482; font-size: 12px; }
.formula-note span { color: #697c98; font-size: 11px; line-height: 1.4; }
.commission-note { background: #eefaf7; }
.dialog-done { width: 100%; margin-top: 16px; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; padding: 11px 16px; color: white; background: #071d42; border-radius: 10px; box-shadow: 0 16px 40px rgba(4,30,68,.25); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%,16px); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.mobile-result-bar { display: none; }

body.presentation .intro { padding: 24px 0 18px; grid-template-columns: 1fr; }
body.presentation .intro h1 { font-size: 38px; }
body.presentation .intro-copy > p:last-child, body.presentation .workflow, body.presentation .reality-card, body.presentation .comparison-card { display: none; }
body.presentation .simulator-workspace { grid-template-columns: minmax(520px,1.2fr) minmax(370px,.8fr); }
body.presentation .target-card { grid-column: 1; }
body.presentation .results-pane { grid-column: 2; }
body.presentation #presentationToggle { color: white; background: var(--navy); border-color: var(--navy); }

@media (max-width: 1120px) {
  .page-shell { padding-left: 22px; padding-right: 22px; }
  .intro { grid-template-columns: .8fr 1.2fr; gap: 30px; }
  .simulator-workspace { grid-template-columns: minmax(290px,.9fr) minmax(370px,1.1fr); }
  .results-pane { grid-column: 1 / -1; position: static; }
  .impact-card { display: grid; grid-template-columns: .9fr 1.1fr; gap: 0 24px; }
  .impact-topline, .impact-actions, .projection-note { grid-column: 1 / -1; }
  .main-result { align-self: center; }
  .metric-grid { align-self: center; }
  .impact-explanation { align-self: end; }
}

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 22px; }
  .scope-bar { grid-template-columns: 1fr auto; }
  .scope-bar > p { grid-column: 1 / -1; justify-self: start; text-align: left; }
  .simulator-workspace, body.presentation .simulator-workspace { grid-template-columns: 1fr; }
  .reality-card, .target-card, body.presentation .target-card, body.presentation .results-pane { grid-column: 1; }
  body.presentation .reality-card { display: none; }
  .impact-card { display: block; }
  .scenario-comparison { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { padding-bottom: 68px; }
  .page-shell { padding: 0 12px 30px; }
  .topbar { height: 67px; }
  .brand-logo { width: 85px; }
  .private-chip { display: none; }
  .ghost-button { padding: 8px 10px; font-size: 11px; }
  .intro { padding: 26px 2px 20px; }
  h1 { font-size: 39px; }
  .intro-copy > p:last-child { font-size: 14px; }
  .workflow { grid-template-columns: 1fr; gap: 7px; }
  .workflow li { padding: 3px 0; }
  .workflow li:not(:last-child)::after { display: none; }
  .workflow b { width: 30px; height: 30px; font-size: 12px; }
  .workflow strong { font-size: 12px; }
  .workflow small { font-size: 10px; }
  .scope-bar { grid-template-columns: 1fr; padding: 13px; }
  .segmented { width: 100%; }
  .network-size { grid-template-columns: 1fr 82px; }
  .step-card { padding: 16px; border-radius: 16px; }
  .card-heading { min-height: 75px; }
  h2 { font-size: 22px; }
  .actual-field { grid-template-columns: minmax(0,1fr) 125px; }
  .target-control { grid-template-columns: minmax(80px,1fr) 128px; }
  .scenario-tabs { grid-template-columns: 1fr 1fr; }
  .impact-card { padding: 18px; }
  .model-chip { display: none; }
  .main-result strong { font-size: 46px; }
  .metric-grid { grid-template-columns: 1fr; }
  .result-metric { min-height: 88px; }
  .impact-actions { grid-template-columns: 1fr; }
  .comparison-card { padding: 17px; }
  .section-heading { display: block; }
  .weekly-chip { display: inline-flex; margin-top: 11px; }
  .scenario-row { grid-template-columns: 82px minmax(60px,1fr) auto; padding: 11px 9px; }
  .mobile-result-bar { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: 9px; min-height: 55px; padding: 8px 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; color: white; background: linear-gradient(125deg,#0b2b60,#0878ef); border: 1px solid rgba(129,204,255,.5); border-radius: 14px; box-shadow: 0 16px 38px rgba(4,33,77,.34); cursor: pointer; }
  .mobile-result-bar span { color: #c9e3ff; font-size: 9px; text-align: left; }
  .mobile-result-bar strong { grid-row: 2; font-size: 20px; text-align: left; }
  .mobile-result-bar em { grid-column: 2; grid-row: 1 / 3; color: #e8f5ff; font-size: 10px; font-style: normal; }
  .calculation-dialog { padding: 18px; }
  .calculation-row { grid-template-columns: 1.3fr .8fr .8fr; gap: 7px; padding: 9px; }
  .calculation-row strong, .calculation-row span { font-size: 10px; }
}

@media print {
  body { background: white; padding: 0; }
  .page-shell { max-width: none; padding: 0; }
  .top-actions, .workflow, .scope-bar, .reality-card, .comparison-card, .impact-actions, .projection-note, .mobile-result-bar { display: none !important; }
  .intro { padding: 15px 0; grid-template-columns: 1fr; }
  .intro-copy > p:last-child { display: none; }
  .simulator-workspace { grid-template-columns: 1fr 1fr; }
  .target-card { grid-column: 1; }
  .results-pane { grid-column: 2; }
  .impact-card { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
