.costs {
  --line: var(--hairline);
  --line-soft: var(--hairline-soft);
  --dim: var(--muted-dim);
  --cosmos: #5a93ff;
  /* Cosmos blue is the only saturated colour in the chart; the rows you are
     paying for now stay cold so the cheap row is the one that lights up. */
  --win: #5a93ff;
  --lose: #ef6b80;
  --warn: #93a0c0;
  --ink: #05070a;

  padding-block: clamp(56px, 9vw, 104px);
  border-top: 1px solid var(--hairline-soft);
}

.costs .sec-head { margin-bottom: clamp(28px, 4vw, 40px); }
.costs h2 {
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: var(--heading);
  font-weight: 600;
}
.costs .sub {
  font-size: clamp(16px, 1.9vw, 18.5px);
  color: var(--muted);
  max-width: 58ch;
  margin: 0;
}

.costs .calc {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(176px, 0.85fr) minmax(196px, 0.9fr);
  gap: 26px 28px;
  align-items: start;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
@media (max-width: 780px) { .costs .calc { grid-template-columns: 1fr; } }
.costs .ctrl { display: flex; flex-direction: column; min-width: 0; }
.costs .ctrl-l {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}
.costs .ctrl-v {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 14px;
}

.costs .ctrl-v-edit {
  width: 100%;
  padding: 0 0 3px;
  margin-bottom: 11px;
  background: transparent;
  border: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 0;
  outline: none;
  cursor: text;
  -webkit-appearance: none;
  appearance: none;
  transition: 0.15s;
}
.costs .ctrl-v-edit:hover { border-bottom-color: rgba(255, 255, 255, 0.34); }
.costs .ctrl-v-edit:focus { border-bottom-color: var(--cosmos); color: #fff; }
.costs .ctrl-ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--dim);
  margin-top: 8px;
}
.costs input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--cosmos) var(--pct, 50%), rgba(255, 255, 255, 0.11) var(--pct, 50%));
  outline: none;
  cursor: pointer;
}
.costs input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--cosmos);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(90, 147, 255, 0.55);
}
.costs input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--cosmos);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(90, 147, 255, 0.55);
}
.costs .chips { display: flex; flex-direction: column; gap: 4px; }
.costs .chip-b {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  font-family: var(--sans);
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  transition: 0.13s;
  text-align: left;
  white-space: nowrap;
}
.costs .chip-b:hover { background: rgba(255, 255, 255, 0.04); color: var(--heading); }
.costs .chip-b[aria-pressed="true"] {
  background: rgba(90, 147, 255, 0.16);
  border-color: var(--cosmos);
  color: var(--heading);
  font-weight: 500;
}
.costs .chip-b .px { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-left: auto; }
.costs .chip-b[aria-pressed="true"] .px { color: var(--accent-soft); }

.costs .verdict {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 0;
  flex-wrap: wrap;
  margin: 20px 0 0;
  padding: 22px 28px;
  border-radius: 16px;
  border: 1px solid rgba(90, 147, 255, 0.38);
  background: linear-gradient(120deg, rgba(90, 147, 255, 0.14), rgba(255, 255, 255, 0.014));
}
.costs .verdict.neutral {
  border-color: rgba(251, 191, 36, 0.4);
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.11), rgba(255, 255, 255, 0.014));
}
.costs .v-stat { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 0 32px; }
.costs .v-stat:first-child { padding-left: 0; }
.costs .v-stat + .v-stat { border-left: 1px solid rgba(255, 255, 255, 0.08); }
.costs .v-stat-end { align-items: flex-end; text-align: right; padding-right: 0; }
.costs .v-num {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(40px, 5.6vw, 60px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--cosmos);
}
.costs .verdict.neutral .v-num { color: var(--warn); }
.costs .v-swap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(22px, 2.8vw, 28px);
  color: var(--heading);
}
.costs .v-swap s { color: var(--lose); opacity: 0.9; text-decoration-thickness: 2px; }
.costs .v-swap .v-arr { font-size: 0.7em; color: var(--dim); font-weight: 500; }
.costs .v-swap .v-to { color: var(--accent-soft); }
.costs .verdict.neutral .v-swap .v-to { color: var(--warn); }
.costs .v-num-sm {
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--heading);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.costs .v-cap {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
@media (max-width: 640px) {
  /* Flex-wrap let the first two stats share a row and then drew a divider
     across the middle of it. One column per stat, one rule between each. */
  .costs .verdict {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }
  .costs .v-stat,
  .costs .v-stat:first-child,
  .costs .v-stat-end { padding: 0; align-items: flex-start; text-align: left; }
  .costs .v-stat + .v-stat {
    border-left: none;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .costs .v-num { font-size: clamp(34px, 10vw, 44px); }
  .costs .v-swap { font-size: 22px; gap: 8px; }
}

.costs .bars { display: flex; flex-direction: column; gap: 11px; margin-top: 20px; }
.costs .bar-row {
  display: grid;
  grid-template-columns: minmax(118px, 168px) 1fr minmax(74px, auto);
  gap: 14px;
  align-items: center;
}
.costs .bar-label { font-size: 13.5px; color: var(--muted); min-width: 0; }
.costs .bar-label b { color: var(--heading); font-weight: 500; display: block; }
.costs .bar-label span { font-size: 12px; color: var(--dim); }
.costs .bar-track { position: relative; height: 34px; background: rgba(255, 255, 255, 0.03); border-radius: 5px; }
.costs .bar-fill { height: 100%; border-radius: 5px; transition: width 0.18s ease; }
.costs .bar-fill.lose { background: linear-gradient(90deg, #d8566d, #8e2c44); }
.costs .bar-fill.mid { background: linear-gradient(90deg, #4b5573, #333b52); }
.costs .bar-fill.win {
  background: linear-gradient(90deg, #86adff, #3b6ef6);
  box-shadow: 0 0 24px rgba(90, 147, 255, 0.32);
}
.costs .bar-cap {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  transition: left 0.18s ease, color 0.18s;
}
.costs .bar-cap.inside { color: var(--ink); font-weight: 700; }
/* Only the win fill is light enough to carry the dark caption. */
.costs .bar-fill.lose + .bar-cap.inside,
.costs .bar-fill.mid + .bar-cap.inside { color: rgba(255, 255, 255, 0.94); }
.costs .bar-cap.outside { color: var(--muted); font-weight: 500; }
.costs .bar-val { font-family: var(--mono); font-size: 17px; text-align: right; font-weight: 500; }
.costs .c-lose { color: var(--lose); }
.costs .c-win { color: var(--win); }
.costs .c-warn { color: var(--warn); }
.costs .note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--dim);
  opacity: 0.8;
  max-width: 80ch;
  margin: 22px 0 0;
}

.costs .figrow {
  display: grid;
  grid-template-columns: minmax(0, 500px) 1fr;
  align-items: center;
  gap: clamp(22px, 4vw, 48px);
  margin: clamp(30px, 4vw, 44px) 0 0;
}
@media (max-width: 720px) { .costs .figrow { grid-template-columns: 1fr; } }
.costs .figrow img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 26px 64px -32px rgba(0, 0, 0, 0.95);
}
/* The provider list is a tall panel of small type, so it needs more of the row
 * than the cost card does — at 500px the plan names stop being readable, which
 * is the whole reason the shot is here. Declared after the stacking breakpoint
 * above, so it carries its own. */
.costs .figrow-tall { grid-template-columns: minmax(0, 660px) 1fr; }
@media (max-width: 860px) { .costs .figrow-tall { grid-template-columns: 1fr; } }

.costs .figrow figcaption { font-size: 15.5px; line-height: 1.55; color: var(--muted); max-width: 34ch; }
.costs .figrow .r-lab {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}

.costs .strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(26px, 3.4vw, 42px) clamp(24px, 3vw, 44px);
  margin-top: clamp(44px, 6vw, 68px);
}
@media (max-width: 860px) { .costs .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.costs .strip div {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.5;
}
.costs .strip p { margin: 0; }
.costs .strip .ico {
  display: block;
  width: 22px;
  height: 22px;
  margin-bottom: 13px;
  color: var(--cosmos);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.costs .strip b {
  display: block;
  color: var(--heading);
  font-weight: 500;
  margin-bottom: 3px;
}

.costs .cta-card {
  margin-top: clamp(38px, 5vw, 56px);
  border: 1px solid rgba(90, 147, 255, 0.34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(90, 147, 255, 0.09), rgba(255, 255, 255, 0.014));
  padding: clamp(22px, 3vw, 32px);
}
.costs .cta-card h3 {
  font-size: 20px;
  margin: 0 0 6px;
  color: var(--heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.costs .cta-card p.hint { font-size: 13.5px; color: var(--muted); margin: 0 0 20px; }
.costs .cta-alt {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
}
.costs .btn-x {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: var(--heading);
  border: 1px solid var(--line);
  padding: 11px 18px;
  font-size: 14.5px;
  text-decoration: none;
  font-weight: 500;
  transition: 0.15s;
}
.costs .btn-x:hover { background: var(--card-hover); border-color: rgba(255, 255, 255, 0.2); }
.costs .btn-x svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- phones ----------
 *
 * The calculator's chips are the only thing on this page a visitor taps
 * repeatedly, and at 35px they were the smallest targets on the site against a
 * 44px guideline. Everything else here already reflowed; only the hit areas
 * were wrong. Padding rather than a fixed height, so a chip that wraps its
 * label onto a second line still grows instead of clipping it. */
@media (max-width: 700px) {
  .costs { padding-block: 56px; }
  .costs h2 { font-size: clamp(28px, 8vw, 36px); }
  .costs .sub { font-size: 15.5px; }
  .costs .calc { padding: 20px 18px; gap: 22px; border-radius: 14px; }

  /* A borderless chip in a stacked list reads as a paragraph, not a control.
   * Eight models become a two-up grid of bordered pills — a quarter of the
   * scroll, and every one of them looks like something you can press. */
  .costs .chip-b {
    min-height: 46px;
    padding: 11px 13px;
    font-size: 14px;
    border-color: var(--line-soft);
    background: rgba(255, 255, 255, 0.022);
  }
  .costs .chips { gap: 8px; }
  .costs #modelChips {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .costs .chip-b .px { font-size: 12px; }

  /* The bar rows put a 118px minimum label beside a track and a cap; at 390px
   * that leaves the track too narrow to read a proportion off. The number
   * moves up beside its own label and the bar takes the full width. */
  .costs .bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px;
  }
  .costs .bar-label { display: flex; align-items: baseline; gap: 8px; grid-area: 1 / 1; }
  .costs .bar-label b { display: inline; }
  .costs .bar-val { grid-area: 1 / 2; }
  .costs .bar-track { grid-area: 2 / 1 / 3 / -1; height: 30px; }
  .costs .bar-cap { font-size: 11px; }
  .costs .bars { gap: 16px; }

  .costs .figrow figcaption { max-width: none; font-size: 15px; }
  .costs .strip { gap: 26px; margin-top: 40px; }
  .costs .strip .ico { margin-bottom: 10px; }
  .costs .cta-card { border-radius: 14px; }
  .costs .cta-alt { justify-content: space-between; }
}

/* Below 560px the strip is one item per row, and an icon stacked on its own
 * line above its sentence reads as a column of orphans. Beside the text it
 * reads the way a phone list does: mark on the left, copy in a single column
 * that stays aligned when it wraps. Placed after the 700px block so it wins
 * the tie on .ico's stacked margin. */
@media (max-width: 560px) {
  .costs .strip {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .costs .strip div {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    column-gap: 13px;
    align-items: start;
  }
  .costs .strip .ico { margin-bottom: 0; margin-top: 1px; }
}

/* A 20px thumb on a 5px rail is a mouse target. Fingers get a fatter rail,
 * a bigger thumb and room to grab it without hitting the card behind. */
@media (pointer: coarse) {
  .costs input[type="range"] {
    height: 8px;
    margin-block: 6px;
  }
  .costs input[type="range"]::-webkit-slider-thumb { width: 28px; height: 28px; }
  .costs input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; }
  .costs .btn-x { min-height: 46px; }
}
