.cost-advantage {
  --cost-cyan: #51d7f4;
  --cost-mint: #62e2ae;
  --cost-lime: #b7f06b;
  --cost-coral: #f28c7c;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(760px 520px at 92% 0%, rgba(0, 191, 255, 0.1), transparent 70%),
    radial-gradient(680px 520px at 4% 12%, rgba(33, 79, 198, 0.18), transparent 72%),
    #07101c;
  color: #eef7fb;
}

.cost-advantage::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 74%);
  content: "";
  pointer-events: none;
}

.cost-advantage > .wrap { position: relative; }
.cost-advantage .eyebrow { color: var(--cost-cyan); }

.cost-advantage-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: end;
  gap: clamp(48px, 7vw, 110px);
}

.cost-advantage-copy { max-width: 820px; }
.cost-advantage-copy h2 { max-width: 780px; color: #f6fbfd; }
.cost-advantage-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 26px 0 0;
  color: #a8bdca;
  font-size: 18px;
  line-height: 1.65;
}

.cost-advantage-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.cost-advantage-pill-row span {
  border: 1px solid rgba(134, 194, 217, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  padding: 9px 12px;
  color: #b8ccd6;
  font-size: 11px;
  font-weight: 600;
}

.cost-advantage-hero-result {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 330px;
  align-content: center;
  border: 1px solid rgba(98, 226, 174, .36);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(12, 42, 43, .98), rgba(7, 25, 35, .98));
  padding: clamp(30px, 4vw, 50px);
  box-shadow: 0 32px 84px rgba(0, 0, 0, .32);
}

.cost-advantage-hero-result::after {
  position: absolute;
  top: -150px;
  right: -150px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(104, 241, 186, .14);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(98, 226, 174, .11), transparent 67%);
  content: "";
}

.cost-advantage-hero-result > span,
.cost-advantage-hero-result > strong,
.cost-advantage-hero-result > p,
.cost-advantage-hero-metrics { position: relative; z-index: 1; }

.cost-advantage-hero-result > span,
.cost-advantage-hero-metrics span {
  color: #83aaa3;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cost-advantage-hero-result > strong {
  margin-top: 14px;
  color: var(--cost-lime);
  font-family: var(--display);
  font-size: clamp(46px, 5vw, 72px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1;
}

.cost-advantage-hero-result > p {
  margin: 9px 0 28px;
  color: #b7d5cc;
  font-size: 13px;
}

.cost-advantage-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(165, 222, 205, .14);
  padding-top: 22px;
}

.cost-advantage-hero-metrics div { display: grid; gap: 7px; }
.cost-advantage-hero-metrics div + div { border-left: 1px solid rgba(165, 222, 205, .12); padding-left: 22px; }
.cost-advantage-hero-metrics strong { color: #e5f7f1; font-family: var(--display); font-size: 19px; font-weight: 550; }

.cost-simulator {
  margin-top: 58px;
  border: 1px solid rgba(137, 185, 207, .18);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(10, 28, 43, .96), rgba(6, 20, 32, .97));
  box-shadow: 0 32px 90px rgba(0, 0, 0, .28);
}

.cost-simulator-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 160px;
  align-items: end;
  gap: 16px;
  border-bottom: 1px solid rgba(137, 185, 207, .14);
  padding: 16px;
}

.cost-control { display: grid; gap: 8px; min-width: 0; }
.cost-control > span {
  color: #7894a3;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cost-segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.cost-segments button,
.cost-horizon button,
.cost-control select,
.cost-editor-heading button {
  border: 1px solid rgba(137, 185, 207, .2);
  border-radius: 7px;
  background: rgba(255, 255, 255, .025);
  color: #b8cbd4;
}

.cost-segments button {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  text-align: left;
}

.cost-segments button strong { overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cost-segments button small { color: #718b99; font-size: 9px; }
.cost-segments button.is-active { border-color: rgba(81, 215, 244, .48); background: rgba(81, 215, 244, .1); color: #edfbff; }
.cost-segments button.is-active small { color: #91d7e9; }

.cost-control select {
  width: 100%;
  min-height: 45px;
  background-color: #0a1a28;
  padding: 0 12px;
  font-size: 12px;
}

.cost-horizon {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  min-height: 45px;
  border: 1px solid rgba(137, 185, 207, .2);
  border-radius: 7px;
}

.cost-horizon button { border: 0; border-right: 1px solid rgba(137, 185, 207, .2); border-radius: 0; font-size: 11px; font-weight: 650; }
.cost-horizon button:last-child { border-right: 0; }
.cost-horizon button.is-active { background: #2858ce; color: #fff; }

.cost-simulator-main {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .45fr);
  gap: 12px;
  padding: 16px;
}

.cost-comparison,
.cost-outcomes > article,
.cost-outcome-pair article {
  border: 1px solid rgba(137, 185, 207, .14);
  border-radius: 12px;
  background: rgba(3, 13, 22, .34);
}

.cost-comparison { padding: clamp(20px, 3vw, 32px); }
.cost-panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.cost-panel-heading > div > span,
.cost-outcomes article > span,
.cost-one-recurring > span,
.cost-editor-heading > div > span {
  color: #6ebbd4;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cost-panel-heading h3,
.cost-editor-heading h3,
.cost-one-editor h3 { color: #eef8fb; }
.cost-panel-heading h3 { margin-top: 8px; font-size: clamp(26px, 2.3vw, 37px); }
.cost-panel-heading > p { max-width: 410px; margin: 0; color: #718997; font-size: 10px; line-height: 1.55; text-align: right; }

.cost-bars {
  display: grid;
  gap: 22px;
  margin-top: 32px;
  border: 1px solid rgba(137, 185, 207, .12);
  border-radius: 10px;
  background: rgba(1, 8, 14, .3);
  padding: 22px;
}

.cost-bar-row { display: grid; gap: 8px; }
.cost-bar-row > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.cost-bar-row > div span { color: #a9bec8; font-size: 11px; font-weight: 550; }
.cost-bar-row > div strong { color: #eef8fb; font-family: var(--display); font-size: 20px; font-weight: 550; }
.cost-bar-track { overflow: hidden; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .055); }
.cost-bar-track i { display: block; height: 100%; border-radius: inherit; transition: width .24s ease; }
.cost-bar-stack .cost-bar-track i { width: 100%; background: linear-gradient(90deg, #677c91, #bb737e); }
.cost-bar-one .cost-bar-track i { width: 52.5%; background: linear-gradient(90deg, #2858ce, #51d7f4 66%, #62e2ae); box-shadow: 0 0 22px rgba(81, 215, 244, .28); }
.cost-bar-row small { color: #657f8d; font-size: 9px; }

.cost-category-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.cost-category-strip > div {
  display: grid;
  min-width: 0;
  gap: 7px;
  border: 1px solid rgba(137, 185, 207, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .018);
  padding: 10px;
}

.cost-category-strip span { overflow: hidden; color: #7892a0; font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.cost-category-strip strong { color: #dcebf1; font-family: var(--display); font-size: 14px; font-weight: 550; }
.cost-category-strip .cost-category-overhead { border-color: rgba(242, 140, 124, .2); background: rgba(242, 140, 124, .04); }
.cost-category-strip .cost-category-overhead strong { color: #edb1a8; }

.cost-outcomes { display: grid; align-content: start; gap: 12px; }
.cost-outcomes > article { display: grid; min-height: 230px; align-content: center; padding: 26px; }
.cost-outcome-primary { border-color: rgba(98, 226, 174, .24) !important; background: linear-gradient(145deg, rgba(31, 86, 69, .16), rgba(3, 13, 22, .4)) !important; }
.cost-outcome-primary > strong { margin-top: 12px; color: #aceccb; font-family: var(--display); font-size: clamp(34px, 3.4vw, 51px); font-weight: 580; letter-spacing: -.035em; line-height: 1; }
.cost-outcome-primary > p { margin: 10px 0 0; color: #749188; font-size: 10px; line-height: 1.5; }
.cost-outcome-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cost-outcome-pair article { display: grid; min-height: 102px; align-content: center; gap: 8px; padding: 16px; }
.cost-outcome-pair strong { color: #dceaf0; font-family: var(--display); font-size: 18px; font-weight: 540; }
.cost-outcomes .button { margin-top: 2px; }

.cost-assumptions { border-top: 1px solid rgba(137, 185, 207, .14); }
.cost-assumptions > summary {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.cost-assumptions > summary::-webkit-details-marker { display: none; }
.cost-assumptions > summary > span { display: grid; gap: 4px; }
.cost-assumptions > summary strong { color: #e8f3f7; font-family: var(--display); font-size: 16px; font-weight: 520; }
.cost-assumptions > summary small { color: #708a98; font-size: 10px; }
.cost-assumptions > summary i { position: relative; width: 18px; height: 18px; }
.cost-assumptions > summary i::before,
.cost-assumptions > summary i::after { position: absolute; top: 8px; left: 1px; width: 16px; height: 1px; background: var(--cost-cyan); content: ""; transition: transform .2s ease; }
.cost-assumptions > summary i::after { transform: rotate(90deg); }
.cost-assumptions[open] > summary i::after { transform: rotate(0); }

.cost-assumptions-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.cost-stack-editor,
.cost-one-editor { overflow: hidden; border: 1px solid rgba(137, 185, 207, .14); border-radius: 11px; background: rgba(2, 11, 19, .34); }

.cost-editor-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 18px; }
.cost-editor-heading h3 { margin-top: 6px; font-size: 23px; }
.cost-editor-heading button { padding: 8px 10px; font-size: 9px; }
.cost-editor-columns,
.cost-editor-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) repeat(4, minmax(74px, .58fr));
  gap: 9px;
  align-items: center;
}

.cost-editor-columns { border-block: 1px solid rgba(137, 185, 207, .12); background: rgba(255, 255, 255, .02); padding: 9px 12px; }
.cost-editor-columns span { color: #637c89; font-size: 7.5px; font-weight: 650; letter-spacing: .05em; text-align: right; text-transform: uppercase; }
.cost-editor-columns span:first-child { text-align: left; }
.cost-editor-row { min-height: 62px; border-bottom: 1px solid rgba(137, 185, 207, .09); padding: 9px 12px; }
.cost-editor-row > div { display: grid; gap: 3px; min-width: 0; }
.cost-editor-row > div strong,
.cost-overhead-input strong { color: #cbdce4; font-size: 10px; font-weight: 580; }
.cost-editor-row > div small,
.cost-overhead-input small { overflow: hidden; color: #647c89; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.cost-editor-row label,
.cost-one-inputs label { display: grid; gap: 4px; }
.cost-editor-row label > span,
.cost-one-inputs label > span { color: #6f8794; font-size: 8px; font-weight: 550; }

.cost-editor-row input,
.cost-overhead-input input,
.cost-one-inputs input {
  width: 100%;
  min-width: 0;
  height: 35px;
  border: 1px solid rgba(137, 185, 207, .2);
  border-radius: 6px;
  outline: 0;
  background: #071722;
  color: #edf7fa;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 550;
  text-align: right;
}

.cost-editor-row input:focus,
.cost-overhead-input input:focus,
.cost-one-inputs input:focus { border-color: rgba(81, 215, 244, .68); box-shadow: 0 0 0 2px rgba(81, 215, 244, .1); }

.cost-overhead-input { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(160px, .4fr); align-items: center; gap: 16px; padding: 12px; }
.cost-overhead-input > span { display: grid; gap: 3px; }

.cost-one-editor { align-self: start; border-color: rgba(81, 215, 244, .2); background: linear-gradient(145deg, rgba(19, 54, 70, .72), rgba(3, 16, 26, .88)); padding: 22px; }
.cost-one-mark { color: var(--cost-cyan); font-size: 9px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.cost-one-editor h3 { margin: 15px 0 8px; font-size: 26px; }
.cost-one-editor > p:not(.cost-one-mark) { color: #748e9a; font-size: 10px; line-height: 1.5; }
.cost-one-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.cost-one-inputs label:last-child { grid-column: 1 / -1; }
.cost-one-recurring { display: grid; gap: 7px; margin-top: 20px; border-top: 1px solid rgba(137, 185, 207, .15); padding-top: 17px; }
.cost-one-recurring strong { color: var(--cost-mint); font-family: var(--display); font-size: 28px; font-weight: 570; }

.cost-simulator-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid rgba(137, 185, 207, .14);
  padding: 18px 22px;
}

.cost-simulator-note p { max-width: 900px; margin: 0; color: #718995; font-size: 9px; line-height: 1.55; }
.cost-simulator-note p strong { color: #a9bdc7; }
.cost-simulator-note a { flex: 0 0 auto; color: #8adff4; font-family: var(--display); font-size: 11px; font-weight: 550; }

.cost-advantage.is-negative .cost-advantage-hero-result { border-color: rgba(242, 140, 124, .36); background: linear-gradient(145deg, rgba(55, 29, 30, .98), rgba(15, 23, 33, .98)); }
.cost-advantage.is-negative .cost-advantage-hero-result > strong,
.cost-advantage.is-negative .cost-outcome-primary > strong { color: #ffb1a4; }

@media (max-width: 1120px) {
  .cost-advantage-intro { grid-template-columns: minmax(0, 1fr) minmax(330px, .7fr); gap: 44px; }
  .cost-category-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cost-assumptions-layout { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .cost-advantage-intro,
  .cost-simulator-main { grid-template-columns: 1fr; }
  .cost-advantage-hero-result { min-height: 280px; }
  .cost-simulator-toolbar { grid-template-columns: 1fr 1fr; }
  .cost-control-profile { grid-column: 1 / -1; }
  .cost-outcomes { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .cost-outcomes > article { min-height: 170px; }
  .cost-outcomes .button { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .cost-advantage-copy > p:not(.eyebrow) { font-size: 15px; }
  .cost-advantage-intro { gap: 30px; }
  .cost-advantage-hero-result { min-height: 300px; border-radius: 14px; padding: 25px 20px; }
  .cost-advantage-hero-result > strong { font-size: 46px; }
  .cost-simulator { margin-top: 30px; border-radius: 13px; }
  .cost-simulator-toolbar { grid-template-columns: 1fr; }
  .cost-control-profile { grid-column: auto; }
  .cost-segments { grid-template-columns: 1fr; }
  .cost-simulator-main { padding: 10px; }
  .cost-comparison { padding: 18px 12px; }
  .cost-panel-heading { align-items: start; flex-direction: column; gap: 10px; }
  .cost-panel-heading > p { text-align: left; }
  .cost-bars { padding: 16px 12px; }
  .cost-bar-row > div strong { font-size: 16px; }
  .cost-category-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-outcomes { grid-template-columns: 1fr; }
  .cost-outcomes .button { grid-column: auto; }
  .cost-assumptions > summary { padding: 17px 14px; }
  .cost-assumptions-layout { padding: 0 10px 10px; }
  .cost-editor-heading { align-items: start; flex-direction: column; }
  .cost-editor-columns { display: none; }
  .cost-editor-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 13px 11px; }
  .cost-editor-row > div { grid-column: 1 / -1; }
  .cost-overhead-input { grid-template-columns: 1fr; }
  .cost-one-inputs { grid-template-columns: 1fr; }
  .cost-one-inputs label:last-child { grid-column: auto; }
  .cost-simulator-note { align-items: start; flex-direction: column; gap: 12px; padding: 16px 14px; }
}

@media (max-width: 420px) {
  .cost-advantage-hero-metrics { grid-template-columns: 1fr; gap: 13px; }
  .cost-advantage-hero-metrics div + div { border-top: 1px solid rgba(165, 222, 205, .12); border-left: 0; padding: 13px 0 0; }
  .cost-category-strip,
  .cost-outcome-pair,
  .cost-editor-row { grid-template-columns: 1fr; }
  .cost-editor-row > div { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .cost-bar-track i { transition: none; }
}
