/* ============================================================================
   `/schools` - the pricing calculator. Page-specific rules only; the tokens,
   shell, header, section heads, capability strip and footer are `site.css`.

   Wine is the price (slider fill, the total, the curve); teal is everything
   that saves money or is a choice (presets, billing, savings), matching the
   site's two-voice rule. Light only, like the rest of the apex.
   ========================================================================= */

.pc-intro {
  max-width: 62ch;
  margin-bottom: clamp(28px, 5vh, 44px);
}

.pc-intro h1 {
  text-wrap: balance;
}

.pc {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
}

@media (max-width: 900px) {
  .pc {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pc-panel {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(26, 35, 38, 0.04);
  padding: clamp(20px, 2.4vw, 28px);
}

.pc-controls {
  display: grid;
  gap: 26px;
}

.pc-label {
  margin: 0 0 10px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
}

/* ---------------------------------------------------------------- presets */

.pc-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pc-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fffdf9;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.pc-chip small {
  font-size: 12px;
  font-weight: 500;
  color: var(--faint);
}

.pc-chip:hover {
  border-color: var(--teal);
}

.pc-chip[aria-pressed="true"] {
  border-color: var(--teal);
  background: rgba(var(--teal-rgb), 0.08);
  color: var(--teal-deep);
}

/* ---------------------------------------------------------------- fields */

.pc-field {
  display: grid;
  gap: 10px;
}

.pc-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pc-field__head label {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.pc-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  background: #fffdf9;
}

.pc-stepper button {
  width: 36px;
  height: 38px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
}

.pc-stepper button:hover {
  color: var(--wine);
  background: rgba(var(--wine-rgb), 0.06);
}

.pc-stepper input {
  width: 80px;
  height: 38px;
  border: 0;
  border-inline: 1px solid var(--line);
  background: #ffffff;
  text-align: center;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  appearance: textfield;
}

.pc-stepper input::-webkit-inner-spin-button,
.pc-stepper input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* The slider: wine fill up to the thumb. `--p` is set from script, since
   WebKit has no progress pseudo-element. */
.pc-range {
  --p: 50%;
  width: 100%;
  height: 28px;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.pc-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--wine) var(--p), var(--line) var(--p));
}

.pc-range::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
}

.pc-range::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--wine);
}

.pc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--wine);
  box-shadow: 0 2px 8px rgba(var(--wine-rgb), 0.3);
  transition: transform 0.15s var(--ease);
}

.pc-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--wine);
  box-shadow: 0 2px 8px rgba(var(--wine-rgb), 0.3);
}

.pc-range:active::-webkit-slider-thumb {
  transform: scale(1.15);
}

.pc-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ ratio */

.pc-ratio {
  margin: -14px 0 0;
  font-size: 13px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- billing cards
   Each option is a card with its own live monthly price, a badge and a
   billed line, so Monthly reads as a real choice and not an empty slot. */

.pc-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 8px;
}

@media (max-width: 560px) {
  .pc-plans {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pc-plan {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px 14px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fffdf9;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.pc-plan:hover {
  border-color: rgba(var(--teal-rgb), 0.5);
}

.pc-plan input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.pc-plan:has(input:checked) {
  border-color: var(--teal);
  background: rgba(var(--teal-rgb), 0.05);
  box-shadow: 0 0 0 3px rgba(var(--teal-rgb), 0.12);
}

.pc-plan:has(input:focus-visible) {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.pc-plan__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pc-plan__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.pc-plan__dot {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: #ffffff;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.pc-plan:has(input:checked) .pc-plan__dot {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: inset 0 0 0 3px #ffffff;
}

.pc-plan__badge {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(var(--teal-rgb), 0.1);
  color: var(--teal-deep);
  font-size: 11.5px;
  font-weight: 600;
}

.pc-plan__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.pc-plan__price b {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.pc-plan__price small {
  font-size: 12px;
  color: var(--faint);
}

.pc-plan__note {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pc-plan__ribbon {
  position: absolute;
  top: -10px;
  right: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--wine-bright) 0%, var(--wine) 100%);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

/* ----------------------------------------------------------------- extras */

.pc-addons {
  display: grid;
  gap: 10px;
}

.pc-addon {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.pc-addon:has(input:checked) {
  border-color: rgba(var(--teal-rgb), 0.5);
  background: rgba(var(--teal-rgb), 0.05);
}

.pc-addon input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

.pc-addon b {
  display: block;
  font-size: 14.5px;
  color: var(--ink);
}

.pc-addon span {
  font-size: 13px;
  color: var(--muted);
}

.pc-addon .pc-addon__price {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ quote */

.pc-quote {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 18px;
  box-shadow:
    0 18px 40px -16px rgba(26, 35, 38, 0.18),
    0 4px 12px rgba(26, 35, 38, 0.04);
}

@media (max-width: 900px) {
  .pc-quote {
    position: static;
  }
}

.pc-quote__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pc-tier {
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(var(--wine-rgb), 0.08);
  color: var(--wine-deep);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pc-quote__summary {
  font-size: 13px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.pc-big {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.pc-big__price {
  font-size: clamp(2.4rem, 4.6vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--wine-deep);
  font-variant-numeric: tabular-nums;
}

.pc-big__per {
  font-weight: 600;
  color: var(--faint);
}

.pc-billed {
  margin: -8px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.pc-billed strong {
  color: var(--ink);
}

.pc-save {
  font-weight: 600;
  color: var(--teal);
}

/* One full-width strip: what a student costs each day. */
.pc-unit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid rgba(var(--teal-rgb), 0.18);
  border-radius: 12px;
  background: rgba(var(--teal-rgb), 0.06);
}

.pc-unit__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pc-unit__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.pc-unit__note {
  font-size: 12.5px;
  color: var(--faint);
}

.pc-unit__value {
  flex: none;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.pc-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.pc-breakdown li {
  display: grid;
  gap: 5px;
}

.pc-breakdown .row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  color: var(--ink);
}

.pc-breakdown .row > span:first-child {
  min-width: 0;
}

.pc-breakdown .row > span:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.pc-breakdown .sub {
  font-size: 12.5px;
  color: var(--faint);
}

.pc-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.pc-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--wine);
  transition: width 0.35s var(--ease);
}

.pc-breakdown li.discount .row {
  color: var(--teal);
}

.pc-setup {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.pc-setup > span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pc-setup s {
  opacity: 0.6;
}

.pc-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--wine-deep);
  background: linear-gradient(180deg, var(--wine-bright) 0%, var(--wine) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 6px 16px -6px rgba(var(--wine-rgb), 0.55);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.pc-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, var(--wine) 0%, var(--wine-deep) 100%);
}

/* Download button: icon, label and (while the PDF is being made) the shared
   spinner from pending.js, all on one line at a fixed height. */
.pc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.pc-btn svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.pc-btn.is-pending,
.pc-btn.is-pending:hover {
  transform: none;
  cursor: progress;
}

/* Optional name printed on the downloaded quote. */
.pc-name {
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}

.pc-name input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fffdf9;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}

.pc-name input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.pc-btn__hint {
  margin: -4px 0 0;
  font-size: 12px;
  color: var(--faint);
  text-align: center;
}

/* ------------------------------------------------------------------ perks
   Value points that hold for every school, whatever its size. */

.pc-perks {
  list-style: none;
  margin: clamp(28px, 4vh, 40px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.pc-perks li {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
}

.pc-perks b {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--ink);
}

.pc-perks b::before {
  content: "\2713";
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(var(--teal-rgb), 0.12);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.pc-perks span {
  font-size: 13.5px;
  color: var(--muted);
}

.pc-foot {
  margin: clamp(36px, 6vh, 56px) 0 0;
  max-width: 75ch;
  font-size: 13px;
  color: var(--faint);
}

/* ------------------------------------------------------------------ focus */

.pc-chip:focus-visible,
.pc-stepper button:focus-visible,
.pc-stepper input:focus-visible,
.pc-range:focus-visible,
.pc-addon input:focus-visible,
.pc-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .pc-bar i,
  .pc-range::-webkit-slider-thumb {
    transition: none;
  }
}

/* Six "included" items read best as two rows of three. */
@media (min-width: 760px) {
  .pc-caps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
