:root {
  --calculator-max-width: min(1120px, 94vw);
}

html.calculator-embed .site-header,
html.calculator-embed .site-footer {
  display: none !important;
}

html.calculator-embed .calculator-hero {
  display: none;
}

html.calculator-embed main.calculator-page {
  padding-top: clamp(20px, 5vw, 36px);
}

html.calculator-embed main.calculator-page section {
  scroll-margin-top: 12px;
}

main.calculator-page {
  max-width: var(--calculator-max-width);
  margin: 0 auto;
  padding: clamp(28px, 7vw, 52px) clamp(18px, 6vw, 28px) clamp(48px, 12vw, 80px);
  display: grid;
  gap: clamp(24px, 6vw, 40px);
  justify-items: center;
}

main.calculator-page section {
  padding: 0;
  scroll-margin-top: calc(var(--nav-height) + 12px);
}

.calculator-hero {
  position: relative;
  display: grid;
  gap: clamp(16px, 5vw, 22px);
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(28px, 7vw, 44px);
  border-radius: 28px;
  background: linear-gradient(130deg, rgba(0, 114, 255, 0.3), rgba(3, 8, 20, 0.95)), radial-gradient(circle at 22% 20%, rgba(120, 203, 255, 0.18), transparent 45%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px rgba(2, 10, 24, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  text-align: center;
}

.calculator-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 35%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.calculator-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.8rem);
  letter-spacing: -0.02em;
}

.calculator-hero .eyebrow {
  color: #f4f8ff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.4), rgba(6, 14, 30, 0.45));
  border: 1px solid rgba(0, 160, 255, 0.45);
  box-shadow: 0 12px 28px rgba(0, 102, 255, 0.25);
  margin: 0 0 0.6rem;
}

.calculator-hero .lede {
  margin: 0;
  color: rgba(228, 235, 255, 0.82);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 640px;
}

.calculator-hero .hero-actions {
  margin-top: 4px;
  gap: 10px;
  justify-content: center;
}

.calculator-hero .hero-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: clamp(18px, 5vw, 26px);
  box-shadow: 0 16px 44px rgba(2, 8, 20, 0.4);
  display: grid;
  gap: 12px;
  justify-items: center;
  width: min(var(--calculator-max-width), 100%);
}

.calc-grid {
  display: grid;
  gap: clamp(20px, 5vw, 32px);
  grid-template-columns: 1fr;
  align-items: start;
  justify-items: center;
  width: 100%;
}

.calc-card {
  background: rgba(6, 14, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: clamp(18px, 5vw, 26px);
  box-shadow: 0 24px 70px rgba(2, 8, 20, 0.45);
  display: grid;
  gap: clamp(16px, 4vw, 22px);
  text-align: center;
  width: min(var(--calculator-max-width), 100%);
}

.calc-card .eyebrow {
  color: #f4f8ff;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.28), rgba(12, 24, 48, 0.35));
  border: 1px solid rgba(0, 140, 255, 0.35);
  box-shadow: 0 10px 24px rgba(0, 102, 255, 0.18);
  margin: 0 auto 0.4rem;
}

.calc-card.step {
  position: relative;
  overflow: hidden;
  order: 1;
  width: min(calc(var(--calculator-max-width) * 0.68), 100%);
}

.calc-card.step::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 10%, rgba(0, 122, 255, 0.16), transparent 40%);
  pointer-events: none;
}

.calc-card.step h2 {
  display: block;
}

.calc-card.step-two {
  order: 2;
  position: relative;
  overflow: hidden;
  width: min(calc(var(--calculator-max-width) * 0.68), 100%);
}

.calc-card.step-two::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(0, 122, 255, 0.12), transparent 42%);
  pointer-events: none;
}

.calc-card h2,
.calc-card h3 {
  margin: 0;
  font-family: var(--font-display);
}

.input-grid {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.input-group {
  display: grid;
  gap: 8px;
  width: min(420px, 100%);
}

.input-group label {
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.98rem;
}

.input-group input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1rem;
  padding: 14px 14px 14px 16px;
}

.input-group input:focus-visible {
  outline: 2px solid rgba(0, 132, 255, 0.6);
  border-color: rgba(0, 132, 255, 0.9);
}

.input-hint {
  color: rgba(228, 235, 255, 0.7);
  font-size: 0.92rem;
  margin-top: 0;
}

.preset-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.preset-title {
  margin: 0 0 4px;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 0.98rem;
  color: #f4f8ff;
  text-align: center;
}

.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.preset-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.preset-button.is-active {
  border-color: rgba(0, 132, 255, 0.7);
  background: rgba(0, 132, 255, 0.18);
  box-shadow: 0 12px 26px rgba(0, 102, 255, 0.24);
}

.preset-button:hover,
.preset-button:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 132, 255, 0.6);
  outline: none;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.summary-row:first-of-type {
  border-top: none;
}

.summary-label {
  color: rgba(228, 235, 255, 0.7);
  font-size: 0.95rem;
}

.summary-value {
  font-size: 1.2rem;
  font-weight: 700;
}

.provider-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.provider-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
  text-align: center;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

.provider-card.highlight {
  border-color: rgba(0, 132, 255, 0.45);
  box-shadow: 0 16px 36px rgba(0, 102, 255, 0.24);
  background: radial-gradient(circle at 15% 15%, rgba(0, 132, 255, 0.18), transparent 42%),
    radial-gradient(circle at 80% 10%, rgba(0, 224, 170, 0.12), transparent 40%),
    rgba(5, 14, 34, 0.85);
  padding: 18px 16px;
}

.provider-card.highlight::before {
  content: 'Recommended';
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 132, 255, 0.16);
  border: 1px solid rgba(0, 132, 255, 0.35);
  color: #e8f4ff;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  pointer-events: none;
  max-width: calc(100% - 20px);
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.provider-card.highlight .provider-fee {
  font-size: 1.5rem;
}

.provider-card.highlight .loss-row.best {
  margin-top: 6px;
  width: 100%;
  justify-content: center;
  flex-wrap: nowrap;
}

.provider-card.highlight .loss-pill.best-pill {
  width: auto;
  justify-content: center;
  white-space: nowrap;
}

.provider-top {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
}

.provider-name {
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.2rem;
}

.provider-rate {
  color: rgba(228, 235, 255, 0.75);
  font-size: 0.95rem;
}

.provider-fee {
  font-size: 1.3rem;
  font-weight: 700;
}

.progress-rail {
  display: none;
}

.progress-bar {
  display: none;
}

.loss-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  color: rgba(228, 235, 255, 0.82);
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.loss-row.best {
  color: #dff3ff;
}

.loss-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 132, 255, 0.25);
  color: #f4f8ff;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: normal;
  text-align: center;
}

.loss-pill.best-pill {
  background: rgba(0, 204, 140, 0.14);
  border-color: rgba(0, 204, 140, 0.45);
  color: #c3ffe8;
  box-shadow: 0 12px 28px rgba(0, 204, 140, 0.25);
}

.loss-pill.is-loss {
  background: rgba(255, 82, 82, 0.12);
  border-color: rgba(255, 82, 82, 0.42);
  color: #ffb8b8;
}

.savings-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 132, 255, 0.16);
  border: 1px solid rgba(0, 132, 255, 0.35);
  color: #dff1ff;
  font-weight: 600;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.footnote {
  color: rgba(228, 235, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.5;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 720px) {
  main.calculator-page {
    padding: clamp(22px, 7vw, 32px) clamp(14px, 6vw, 22px) clamp(40px, 10vw, 56px);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .calculator-hero {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: left;
    align-items: flex-start;
  }

  .calculator-hero .hero-panel {
    width: 100%;
    padding: clamp(16px, 6vw, 22px);
  }

  .provider-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .provider-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .calc-grid {
    gap: 18px;
    width: 100%;
    max-width: 100%;
  }

  .calc-card,
  .calc-card.step,
  .calc-card.step-two {
    width: 100%;
    max-width: 100%;
    text-align: left;
    padding: clamp(16px, 6vw, 22px);
    box-sizing: border-box;
    margin: 0 auto;
  }

  .preset-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }

  .preset-button {
    width: 100%;
    text-align: center;
  }

  .summary-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .provider-grid {
    gap: 12px;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .provider-card {
    text-align: left;
    padding: 16px 14px 16px 14px;
    width: 100%;
    max-width: 100%;
    border-radius: 14px;
    background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.04), transparent 40%),
      rgba(8, 16, 34, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
  }

  .provider-card.highlight {
    padding: 18px 16px 18px 16px;
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(0, 102, 255, 0.26);
    background: radial-gradient(circle at 15% 15%, rgba(0, 132, 255, 0.18), transparent 42%),
      radial-gradient(circle at 80% 10%, rgba(0, 224, 170, 0.12), transparent 40%),
      rgba(5, 14, 34, 0.9);
    border-color: rgba(0, 132, 255, 0.35);
  }

  .provider-card.highlight::before {
    right: 12px;
    top: 12px;
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .provider-card.highlight .loss-row.best {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .provider-card.highlight .loss-pill.best-pill {
    width: 100%;
    white-space: normal;
  }

  .provider-card .loss-row {
    margin-top: 6px;
  }

  .provider-card .loss-pill,
  .provider-card .savings-pill {
    font-size: 0.95rem;
  }

  .loss-row {
    justify-content: flex-start;
  }

  .cta-row {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
  }

  .cta-row .primary-button,
  .cta-row .secondary-button {
    width: 100%;
    text-align: center;
  }

  .cta-row .app-store-badge {
    width: 100%;
    max-width: 180px;
    border-radius: 8px;
    margin: 0 auto;
  }
}


/* ====================================================================
   Pricing page (ported from TABL Mobile landing).
   Adds a fresh hero + summary cards + side-by-side calculator UI on top
   of Portal's design tokens. Brand name rendered as "TABL Portal" in the
   accompanying HTML markup.
   ==================================================================== */

/* Aliases: map the tokens the ported CSS expects onto Portal's existing :root */
.calculator-page.pricing-page {
  --blue: var(--accent-dark);
  --blue-strong: var(--accent);
  --blue-soft: #7b9cff;
  --ink: var(--text);
  --ink-muted: var(--muted);
  --ink-faint: rgba(199, 213, 230, 0.62);
  --border-subtle: rgba(251, 254, 255, 0.08);
  --border-strong: rgba(251, 254, 255, 0.22);
  --border-accent: rgba(123, 156, 255, 0.45);
  --page: var(--bg);
  --green: var(--accent-2);
  --radius-xl: clamp(20px, 2.6vw, 30px);
  --radius-pill: 999px;
  --shadow-card:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 48px -16px rgba(0, 0, 0, 0.5);
  --dur-fast: 0.16s;
  --dur-base: 0.24s;
  --dur-slow: 0.4s;
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: ease-in-out;
}

.calculator-page.pricing-page { overflow: hidden; }

/* Section-badge eyebrow with glowing vertical accent bar */
.calculator-page.pricing-page .eyebrow--badge {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 2px 0 2px 16px;
  color: var(--blue-soft);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  background: transparent;
  border: 0;
  margin: 0;
}

.calculator-page.pricing-page .eyebrow--badge::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: linear-gradient(180deg, #8fb0ff 0%, #2a69ff 100%);
  box-shadow: 0 0 12px rgba(42, 105, 255, 0.7);
}

.calculator-page.pricing-page .eyebrow__pulse {
  display: none;
}

/* ---------- Pricing hero ---------- */
.pricing-hero {
  position: relative;
  padding: clamp(24px, 3.5vw, 48px) 0 clamp(18px, 2.4vw, 28px);
  isolation: isolate;
  overflow: hidden;
}

.pricing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 620px at 20% 16%, rgba(42, 105, 255, 0.30), transparent 65%),
    radial-gradient(700px 500px at 82% 8%, rgba(123, 156, 255, 0.16), transparent 65%);
  pointer-events: none;
}

.pricing-hero__inner {
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  max-width: 760px;
  margin-bottom: clamp(28px, 3.4vw, 44px);
}

.pricing-hero__title {
  margin: 0;
  font-size: clamp(2.25rem, 5.4vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.02;
  text-wrap: balance;
  background: linear-gradient(120deg, #fbfeff 30%, #7b9cff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pricing-hero__title .line {
  display: block;
}

.pricing-hero__lede {
  margin: 0;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: #e8eeff;
  max-width: 620px;
}

/* ---------- Pricing summary cards ---------- */
.pricing-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pricing-summary-card {
  display: grid;
  gap: 8px;
  padding: 22px clamp(20px, 2.5vw, 28px);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition:
    transform var(--dur-base) var(--ease-out-cubic),
    border-color var(--dur-base) ease,
    box-shadow var(--dur-base) ease;
}

.pricing-summary-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.pricing-summary-card--highlight {
  background:
    radial-gradient(500px 220px at 0% 0%, rgba(42, 105, 255, 0.22), transparent 60%),
    linear-gradient(160deg, #0a1f49 0%, #050d20 100%);
  border-color: rgba(123, 156, 255, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 48px -20px rgba(0, 65, 217, 0.4);
}

.pricing-summary-card--note {
  background:
    linear-gradient(160deg, rgba(115, 142, 117, 0.10) 0%, rgba(15, 24, 40, 0.4) 100%);
  border-color: rgba(115, 142, 117, 0.32);
}

.pricing-summary-card__eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-soft);
}

.pricing-summary-card__eyebrow--alt {
  color: #a3e9b8;
}

.pricing-summary-card__value {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.05;
  color: var(--ink);
}

.pricing-summary-card__unit {
  font-size: 0.5em;
  font-weight: 500;
  color: var(--ink-muted);
  margin-left: 4px;
}

.pricing-summary-card__note {
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* ---------- Calculator section ---------- */
.calculator-section {
  position: relative;
  padding: 0 0 clamp(40px, 6vw, 80px);
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.calculator-card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(26px, 3vw, 38px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    var(--shadow-card);
  display: grid;
  gap: clamp(20px, 2.4vw, 28px);
}

.calculator-card--results {
  background:
    radial-gradient(700px 320px at 100% 0%, rgba(42, 105, 255, 0.16), transparent 60%),
    var(--surface);
  border-color: rgba(123, 156, 255, 0.22);
}

.calculator-card__head {
  display: grid;
  gap: 6px;
}

.calculator-step {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  padding: 4px 10px;
  background: rgba(42, 105, 255, 0.14);
  border: 1px solid rgba(123, 156, 255, 0.32);
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 4px;
  width: max-content;
}

.calculator-card__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.15;
  color: var(--ink);
}

.calculator-card__sub {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Preset pills */
.calculator-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preset-pill {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(42, 105, 255, 0.04), rgba(0, 65, 217, 0.02)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    border-color var(--dur-base) ease,
    background var(--dur-base) ease,
    transform var(--dur-base) var(--ease-out-cubic);
  font-family: inherit;
  color: inherit;
}

.preset-pill:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background:
    linear-gradient(135deg, rgba(42, 105, 255, 0.12), rgba(0, 65, 217, 0.04)),
    rgba(255, 255, 255, 0.03);
}

.preset-pill:focus-visible {
  outline: 2px solid var(--blue-soft);
  outline-offset: 2px;
}

.preset-pill.is-active {
  border-color: rgba(123, 156, 255, 0.62);
  background:
    linear-gradient(135deg, rgba(42, 105, 255, 0.28), rgba(0, 65, 217, 0.12)),
    rgba(10, 31, 73, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 10px 20px -10px rgba(0, 65, 217, 0.45);
}

.preset-pill__label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.preset-pill__meta {
  font-size: 0.75rem;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

/* Input fields */
.calculator-inputs {
  display: grid;
  gap: 16px;
}

.calculator-field {
  display: grid;
  gap: 8px;
}

.calculator-field__label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.calculator-field__control {
  position: relative;
}

.calculator-field__control--prefix::before {
  content: attr(data-prefix);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

.calculator-field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(4, 14, 19, 0.5);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition:
    border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease,
    background var(--dur-fast) ease;
}

.calculator-field__control--prefix input {
  padding-left: 30px;
}

.calculator-field input:focus-visible {
  outline: none;
  border-color: var(--border-accent);
  box-shadow:
    0 0 0 3px rgba(42, 105, 255, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  background: rgba(4, 14, 19, 0.65);
}

.calculator-field__hint {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  line-height: 1.4;
}

/* Results summary stats */
.results-summary {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 32px);
  padding: 22px clamp(20px, 2.5vw, 26px);
  background: rgba(4, 14, 19, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.results-summary__stat {
  display: grid;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.results-summary__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.results-summary__value {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.05;
  color: var(--ink);
}

.results-summary__divider {
  width: 1px;
  align-self: stretch;
  background: var(--border-subtle);
}

/* Provider list */
.provider-list__heading {
  margin: 4px 0 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.provider-list__sub {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--ink-faint);
}

.calculator-page.pricing-page .provider-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.calculator-page.pricing-page .provider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(4, 14, 19, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  order: 0;
  transition:
    border-color var(--dur-base) ease,
    background var(--dur-base) ease,
    transform var(--dur-base) var(--ease-out-cubic);
}

.calculator-page.pricing-page .provider-row:hover {
  border-color: var(--border);
  background: rgba(4, 14, 19, 0.65);
}

.calculator-page.pricing-page .provider-row--highlight {
  background:
    radial-gradient(400px 160px at 0% 50%, rgba(74, 222, 128, 0.18), transparent 65%),
    rgba(10, 31, 73, 0.6);
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px -14px rgba(74, 222, 128, 0.35);
}

.calculator-page.pricing-page .provider-row--highlight:hover {
  border-color: rgba(74, 222, 128, 0.55);
}

.provider-row__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.provider-row__badge {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.calculator-page.pricing-page .brand-mark--inline {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  box-shadow: none;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.calculator-page.pricing-page .brand-mark--inline img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.provider-row__badge--text {
  font-size: 0.875rem;
  font-weight: 800;
  color: var(--ink-muted);
  letter-spacing: -0.01em;
}

.provider-row__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.provider-row__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.008em;
}

.provider-row__rate {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.provider-row__cost {
  display: grid;
  gap: 2px;
  text-align: right;
  flex-shrink: 0;
}

.provider-row__total {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.012em;
  white-space: nowrap;
}

.calculator-page.pricing-page .provider-row--highlight .provider-row__total {
  background: linear-gradient(135deg, #a3e9b8 0%, #4ade80 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.25rem;
}

.provider-row__delta {
  font-size: 0.7rem;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}

.calculator-page.pricing-page .provider-row--highlight .provider-row__delta {
  color: #a3e9b8;
  font-weight: 600;
}

.results-footnote {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink-faint);
}

/* Pricing page responsive */
@media (max-width: 880px) {
  .pricing-summary-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .calculator-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .results-summary {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .results-summary__divider {
    width: 100%;
    height: 1px;
  }

  .results-summary__stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
  }

  .results-summary__label {
    white-space: nowrap;
  }
}

@media (max-width: 540px) {
  .calculator-presets {
    grid-template-columns: 1fr;
  }

  /* Compact horizontal provider rows on mobile (no wrap) */
  .calculator-page.pricing-page .provider-row {
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
  }

  .calculator-page.pricing-page .provider-row__brand {
    gap: 10px;
    min-width: 0;
    flex: 1 1 0;
  }

  .calculator-page.pricing-page .provider-row__badge {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
  }

  .calculator-page.pricing-page .provider-row__name {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .calculator-page.pricing-page .provider-row__rate {
    font-size: 0.6875rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .calculator-page.pricing-page .provider-row__cost {
    flex-shrink: 0;
    text-align: right;
  }

  .calculator-page.pricing-page .provider-row__total {
    font-size: 1rem;
  }

  .calculator-page.pricing-page .provider-row--highlight .provider-row__total {
    font-size: 1.125rem;
  }

  .calculator-page.pricing-page .provider-row__delta {
    font-size: 0.6875rem;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .calculator-card {
    padding: 22px;
  }

  .pricing-hero__title {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }
}


/* ====================================================================
   Pricing-page chrome reset.
   Portal's legacy calculator.html used a centered max-width "card" layout
   (max-width: 1120px, grid, justify-items:center, section padding:0).
   The new pricing-page layout is a full-bleed sequence of sections, so
   we reset those constraints when .pricing-page is also on <main>.
   ==================================================================== */
main.calculator-page.pricing-page {
  max-width: none;
  margin: 0;
  padding: 0;
  display: block;
  gap: 0;
  justify-items: stretch;
}

main.calculator-page.pricing-page > section {
  padding: 0;
  scroll-margin-top: calc(var(--nav-height, 64px) + 12px);
}

/* Restore the section padding the new layout actually needs (these win on
   specificity over `main.calculator-page section { padding: 0 }`). */
.calculator-page.pricing-page .pricing-hero {
  padding: clamp(28px, 4vw, 56px) 0 clamp(20px, 2.6vw, 32px);
}

.calculator-page.pricing-page .calculator-section {
  padding: 0 0 clamp(48px, 6vw, 88px);
}

/* Soften the hero ambient glow so it reads as page atmosphere rather than
   a hard "card" edge now that the hero is full-bleed. */
.calculator-page.pricing-page .pricing-hero::before {
  background:
    radial-gradient(1200px 720px at 18% 12%, rgba(42, 105, 255, 0.22), transparent 70%),
    radial-gradient(900px 540px at 88% 6%, rgba(123, 156, 255, 0.10), transparent 70%);
}
