/* /pricing: plans first, then the comparison table and the pricing FAQ.
   Uses the design tokens from css/style.css so light and dark themes both work. */

/* ---- Hero: H1, one line of value, the chooser, then the plan cards ---- */
.pricing-hero { padding-top: var(--space-xl); padding-bottom: var(--space-2xl); text-align: center; }
.pricing-hero h1 { max-width: none; margin: 0 auto var(--space-sm); font-size: clamp(1.7rem, 2.7vw, 2.5rem); letter-spacing: -0.03em; }
.pricing-hero__lede { max-width: none; margin: 0 auto var(--space-md); color: var(--color-text-secondary); font-size: 1.02rem; }
.pricing-hero__lede strong { color: var(--color-text); }
.pricing-hero .plan-picker { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: var(--space-xs) var(--space-md); margin-bottom: var(--space-lg); }
.pricing-hero .plan-picker__opts { padding: 4px; }
.pricing-hero .plan-picker__opts button { min-height: 40px; padding: 0 var(--space-md); font-size: 0.9rem; }

/* ---- Plan cards: price, who it is for, and the CTA sit above the list ---- */
.pricing-hero .plan-card { padding: var(--space-lg); gap: 0; }
.pricing-hero .pricing-card__price { margin-top: var(--space-xs); line-height: 1.1; }
.pricing-hero .pricing-card__period { margin-bottom: var(--space-sm); }
.plan-card__who { margin: 0 0 var(--space-md); color: var(--color-text-secondary); font-size: 0.95rem; }
.plan-card__who strong { color: var(--color-text); }
.pricing-hero .plan-card__cta,
.pricing-hero .plan-card .plan-details + .plan-card__cta { margin-top: 0; }
.plan-card__terms { margin: var(--space-xs) 0 0; color: var(--color-text-secondary); font-size: 0.88rem; text-align: center; }
.plan-card__list-title { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--color-border); color: var(--color-text); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.pricing-hero .plan-card ul { margin: var(--space-sm) 0 var(--space-md); }
.pricing-hero .plan-card li { margin-bottom: var(--space-xs); font-size: 0.95rem; }
.pricing-hero .plan-card > .disclosure { margin: auto 0 0; }
.pricing-hero .plan-details { margin-bottom: var(--space-md); }
.pricing-hero .inline-feedback { display: block; margin-top: var(--space-xs); text-align: center; }

/* The recommended plan reads as the default choice. */
.pricing-hero .pricing-card--featured { border-width: 2px; background: linear-gradient(180deg, var(--color-accent-soft), transparent 180px), var(--color-surface); }
.pricing-hero .pricing-card--featured .pricing-card__name { font-size: 1.15rem; }

/* On wide screens the three "who it is for" lines share a height so the CTAs line up. */
@media (min-width: 1025px) {
  .plan-card__who { min-height: 4.4em; }
}

/* ---- Sale: a compact offer line and an "Offer details" disclosure on the card ----
   The server paints .pricing-card__price-now only while the sale can be charged.
   Without it the offer block is hidden. A browser without :has() ignores this
   rule and leaves the terms visible, which is the safe direction. */
.plan-ladder:not(:has(.pricing-card__price-now)) .plan-offer { display: none; }
.plan-offer { margin: 0 0 var(--space-sm); padding: var(--space-xs) var(--space-sm); border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-warning-soft); font-size: 0.88rem; scroll-margin-top: calc(104px + var(--sale-banner-h, 0px)); }
.plan-offer .plan-offer__clock { margin: 0 0 4px; color: var(--color-text); font-family: inherit; font-size: 0.9rem; font-weight: 700; }
.plan-offer__details summary { display: flex; align-items: center; min-height: 32px; color: var(--color-accent); font-weight: 600; cursor: pointer; }
.plan-offer__details summary:focus-visible,
.plan-offer a:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }
.plan-offer .sale-terms { max-width: none; margin: 4px 0; color: var(--color-text-secondary); font-size: 0.86rem; text-align: left; }
.plan-offer--ref { color: var(--color-text-secondary); }
.plan-offer--ref a { color: var(--color-accent); font-weight: 600; white-space: nowrap; }

/* ---- Feature comparison table ---- */
.plan-compare-section .section-heading { margin-bottom: var(--space-lg); }
.plan-compare { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); text-align: left; }
.plan-compare th,
.plan-compare td { padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-border); vertical-align: top; }
.plan-compare thead th { position: sticky; top: calc(60px + var(--sale-banner-h, 0px)); z-index: 2; background: var(--color-bg); color: var(--color-text); font-size: 0.95rem; border-bottom: 2px solid var(--color-border-strong); }
.plan-compare thead th:first-child { border-top-left-radius: var(--radius-md); }
.plan-compare thead th:last-child { border-top-right-radius: var(--radius-md); }
.plan-compare thead th:nth-child(2) { color: var(--color-accent); }
.plan-compare tbody th[scope="row"] { width: 46%; color: var(--color-text); font-weight: 600; }
.plan-compare tbody th small { display: block; margin-top: 2px; color: var(--color-text-secondary); font-size: 0.86rem; font-weight: 400; line-height: 1.45; }
.plan-compare code { font-size: 0.82rem; white-space: nowrap; }
.plan-compare td { width: 27%; color: var(--color-text-secondary); font-size: 0.95rem; }
.plan-compare td:nth-child(2) { background: var(--color-accent-soft); }
.plan-compare__group th { background: var(--color-surface-alt); color: var(--color-text); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.plan-compare tbody:last-child tr:last-child > * { border-bottom: 0; }
.plan-compare tbody:last-child tr:last-child > :first-child { border-bottom-left-radius: var(--radius-md); }
.plan-compare tbody:last-child tr:last-child > :last-child { border-bottom-right-radius: var(--radius-md); }
.plan-compare__yes { color: var(--color-success); font-weight: 700; }
.plan-compare__yes::before { content: "\2713\00a0"; }
.plan-compare__no { color: var(--color-warning); font-weight: 700; }
.plan-compare a { color: var(--color-accent); }
.plan-compare__foot { max-width: 720px; margin: var(--space-lg) 0 0; }

/* Phones: each row stacks, and each value is labelled with its plan. */
@media (max-width: 760px) {
  .plan-compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .plan-compare,
  .plan-compare tbody,
  .plan-compare tr,
  .plan-compare th,
  .plan-compare td { display: block; width: auto; }
  .plan-compare tbody th[scope="row"] { width: auto; padding-bottom: var(--space-xs); border-bottom: 0; }
  .plan-compare td { padding-top: 4px; padding-bottom: 4px; border-bottom: 0; }
  .plan-compare td:nth-child(2) { background: transparent; }
  .plan-compare td::before { content: attr(data-label) ": "; color: var(--color-text); font-weight: 700; }
  .plan-compare tr:not(.plan-compare__group) { padding-bottom: var(--space-sm); border-bottom: 1px solid var(--color-border); }
  .plan-compare tbody:last-child tr:last-child { border-bottom: 0; }
  .plan-compare code { white-space: normal; overflow-wrap: anywhere; }
  .plan-offer--ref a { white-space: normal; }
}

/* ---- Pricing FAQ ---- */
.pricing-faq__title { margin-bottom: var(--space-xl); text-align: center; scroll-margin-top: calc(104px + var(--sale-banner-h, 0px)); }

@media (max-width: 1024px) {
  .pricing-hero { padding-top: var(--space-lg); }
  .pricing-hero .plan-picker { flex-direction: column; }
}

/* ---- 30-Day Scoped Pilot Timeline Planner ---- */
.pp-card {
  padding: var(--space-lg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.pp-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.pp-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pp-field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--color-text);
}

.pp-field select {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--color-input-border);
  border-radius: var(--radius-xs);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.84rem;
}

.pp-field select:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.pp-weeks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pp-week {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-elevated);
}

.pp-week__num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.pp-week strong {
  font-size: 0.96rem;
  color: var(--color-text);
}

.pp-week p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.pp-foot {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.pp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pp-status {
  font-size: 0.84rem;
  color: var(--color-success);
}

@media (max-width: 960px) {
  .pp-controls { grid-template-columns: 1fr; }
  .pp-weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .pp-weeks { grid-template-columns: 1fr; }
}
