/* Homepage pricing / offer / plan cards / footnotes / billing switch.
 * Linked after site.css from index.html (and brandkit demos).
 * Do not dump field-setup / legal / brandkit / booth / manage here.
 */

.plan h3,
.plan-price {
  font-family: var(--sans);
}

.plan-badge {
  margin: 0;
  min-height: 1.15em;
  font-family: var(--sans);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.15;
}

.plan-badge-spacer {
  visibility: hidden;
  user-select: none;
}

/* Features — ribbon chips (brandkit: accent-light + ink) */

.feature-ribbon {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 46rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
}

.feature-ribbon li {
  display: inline-block;
  margin: 0;
  padding: 0.55em 1.1em;
  /* Same surface as .plan-featured; body ink (not white-on-teal) */
  background: var(--accent-light);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.35;
  transform: skewX(-8deg);
  border-radius: 2px;
}

.section-head .billing-switch {
  margin: 0;
  flex: 0 0 auto;
}

/* Offer grid — rows aligned across cards via subgrid */

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 0;
  margin: 20px 0 16px;
}

.plan {
  /* Plan type: name md · price lg · features base · chrome sm — featured uses bg only */
  --plan-name: var(--text-md);
  --plan-price: var(--text-lg);
  --plan-body: var(--text-base);
  --plan-ui: var(--text-sm);
  display: grid;
  grid-template-rows: subgrid;
  /* badge · name · price · meta · 4 feature rows · CTA */
  grid-row: span 9;
  padding: 18px 18px 20px;
  border: none;
  border-radius: 12px;
  box-shadow: none;
  background: transparent;
  align-content: start;
  text-align: center;
}

.plan-featured {
  background: var(--accent-light);
}

.plan h3 {
  margin: 4px 0 0;
  font-size: var(--plan-name);
}

.plan-price {
  font-size: var(--plan-price);
  font-weight: var(--font-bold);
  color: var(--accent);
  margin: 10px 0 0;
}

.plan-price > .when-month,
.plan-price > .when-year {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.plan-price span span {
  font-size: var(--plan-ui);
  font-weight: 500;
  color: var(--muted);
}

.plan-meta {
  font-size: var(--plan-ui);
  color: var(--muted);
  margin: 4px 0 8px;
  min-height: 1.35em;
}

.plan-features {
  display: contents;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--plan-body);
}

.plan-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
}

.plan .btn {
  margin-top: 16px;
  width: 100%;
  box-sizing: border-box;
  justify-self: stretch;
  /* keep .btn font-size (base) — do not shrink to plan-ui */
}

@media (max-width: 700px) {
  .offer-grid {
    grid-template-columns: 1fr;
    row-gap: 28px;
  }

  .plan {
    display: flex;
    flex-direction: column;
    grid-row: auto;
  }

  .plan-features {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
  }
}

/* Bank-style pricing footnotes — rem size so marks stay small next to lg prices */

.fn-ref {
  font-family: var(--sans);
  font-size: 0.65rem; /* ~10.4px; not em (em scaled up with --text-lg price) */
  font-weight: 600;
  line-height: 0;
  margin-left: 0.15em;
  vertical-align: super;
  white-space: nowrap;
}

.fn-ref a {
  color: var(--muted);
  text-decoration: none;
}

.fn-ref a:hover,
.fn-ref a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.pricing-footnotes {
  list-style: none;
  margin: 0 auto;
  padding: 20px max(20px, env(safe-area-inset-left)) 28px max(20px, env(safe-area-inset-right));
  max-width: 46rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: var(--text-xs);
  line-height: 1.45;
  color: var(--muted);
  text-align: left;
  box-sizing: border-box;
}

.pricing-footnotes li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  column-gap: 0.35rem;
  margin: 0 0 0.45rem;
  padding: 0;
  scroll-margin-top: 1rem;
}

.pricing-footnotes li:last-child {
  margin-bottom: 0;
}

.pricing-footnotes .fn-num {
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

/*
 * Graduated-hour face (P7-F). Type uses the 7-step scale only (brandkit).
 * Benefit chips reuse .feature-ribbon.
 */

.pricing-proposed {
  /* Shared air: promise → ribbon, ribbon → CTA, CTA → hour ladders */
  --pricing-disc-block-gap: calc(var(--section-gap) * 0.7);
}

.pricing-proposed .section-head {
  margin-bottom: 0;
}

.pricing-disc {
  max-width: 920px;
  margin: 0 auto;
  font-family: var(--sans);
  text-align: center;
}

.pricing-disc-hero {
  /* Heading → price */
  padding: 24px 24px 0;
}

.pricing-disc-price {
  margin: 0;
  /* Brandkit: plan prices = --text-lg */
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.25;
  text-wrap: balance;
}

/* Unit line: “/ month or $590 / year” — brandkit units = --text-sm, weight 500 */

.pricing-disc-price span {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: normal;
}

.pricing-disc-promise {
  margin: 8px auto 0;
  max-width: 30rem;
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--muted);
}

/* Promise → benefits; three forced rows */

.pricing-disc-ribbon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: var(--pricing-disc-block-gap);
}

.pricing-disc-ribbon .feature-ribbon {
  margin: 0;
}

/* Standard .btn chrome (8px radius, 10×18 pad); only spacing overrides */

.pricing-disc-cta {
  display: inline-block;
  box-sizing: border-box;
  margin-top: var(--pricing-disc-block-gap);
  min-width: 200px;
  text-align: center;
}

.pricing-disc-details {
  /* Benefits → ladders (same air as former ribbon → CTA) */
  margin-top: var(--pricing-disc-block-gap);
}

.pricing-disc-rate-panels {
  display: grid;
  grid-template-columns: minmax(0, 30%) minmax(0, 30%);
  justify-content: center;
  gap: 24px 96px;
  padding: 0;
  text-align: left;
}

.pricing-disc-rate-panel h3 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border: none;
  padding: 0;
}

.pricing-disc-rate-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--ink);
}

.pricing-disc-rate-panel th,
.pricing-disc-rate-panel td {
  border: none;
  border-bottom: 1px solid var(--line);
  padding: 9px 4px;
  text-align: left;
  vertical-align: baseline;
}

.pricing-disc-rate-panel tr:last-child td {
  border-bottom: none;
}

.pricing-disc-rate-panel td:last-child {
  text-align: right;
  white-space: nowrap;
}

.pricing-disc-rate-panel td.rate-included {
  font-weight: var(--font-bold);
  color: var(--accent);
}

.pricing-disc-addon {
  display: grid;
  grid-template-columns: minmax(0, 30%) minmax(0, 30%);
  justify-content: center;
  gap: 24px 96px;
  margin-top: 24px;
}

.pricing-disc-addon .pricing-disc-rate-panel {
  grid-column: 1 / -1;
}

.pricing-disc-payg {
  margin: var(--pricing-disc-block-gap) 0 0;
  text-align: center;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--muted);
}

.pricing-disc-payg-em {
  color: var(--accent);
  font-weight: var(--font-bold);
}

@media (max-width: 700px) {
  .pricing-disc-hero {
    padding: 24px 0 0;
  }

  .pricing-disc-rate-panels,
  .pricing-disc-addon {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .pricing-disc-addon {
    margin-top: 22px;
  }
}

/* Monthly / Yearly billing switch */

.billing-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  margin: 4px 0 8px;
  font-family: var(--sans);
  gap: 2px;
}

.billing-switch-opt {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.2;
  text-align: center;
}

.billing-switch-opt:hover {
  color: var(--ink);
}

.billing-switch-opt.is-active {
  background: var(--accent);
  color: #fff;
}

.billing-switch-opt.is-active:hover {
  color: #fff;
}

.billing-switch-opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[data-billing="month"] .when-year {
  display: none !important; 
}

[data-billing="year"] .when-month {
  display: none !important; 
}

.plan-meta .when-year {
  color: var(--ok);
  font-weight: 500;
}
