/* ==========================================================================
   /pricing/ — plan cards and the full storefront table.
   Loaded only on the pricing route (inc/enqueue.php); shares .tool-head,
   .tool-faq and the buttons with tools.css.
   ========================================================================== */

.pricing-page {
  padding-bottom: 72px;
}

/* Which storefront the prices belong to — stated, never guessed at silently. */
.pricing-store {
  margin: 14px 0 0;
  font-size: 0.95rem;
  color: var(--ink-2);
}
.pricing-store strong {
  color: var(--ink);
}
.pricing-store a {
  margin-left: 10px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── plan cards ─────────────────────────────────────────────────────────── */

.pricing-group {
  margin: 40px 0 0;
}
.pricing-group__title {
  margin: 0 0 4px;
  font-size: 1.1rem;
}
.pricing-group__dek {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: var(--ink-3);
}

.pricing-grid {
  display: grid;
  gap: 16px;
  /* The badge on the recommended card is positioned above the card edge, so the row
     needs headroom or it clips against the heading above. */
  margin: 22px 0 0;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
}

/* Two family plans should read as a pair, not stretch to fill a three-wide track. */
@media (min-width: 860px) {
  .pricing-group--family .pricing-grid {
    grid-template-columns: repeat(2, minmax(232px, 1fr));
    max-width: 62%;
  }
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.pricing-card.is-best {
  border-color: var(--accent);
  /* Two rings rather than a thicker border, so the card does not shift by 1px
     against its neighbours. */
  box-shadow: var(--shadow-card), 0 0 0 1px var(--accent);
}

.pricing-card__badge {
  position: absolute;
  top: -11px;
  left: 22px;
  padding: 3px 11px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: var(--shadow-pill);
}

.pricing-card__name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-2);
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
}

.pricing-card__amount {
  font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
  /* Prices are compared down a column; tabular figures keep the digits aligned
     and stop the amount jittering between currencies. */
  font-variant-numeric: tabular-nums;
}

.pricing-card__cadence {
  font-size: 0.9rem;
  color: var(--ink-3);
}

.pricing-card__equiv {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-3);
}

.pricing-card__save {
  padding: 2px 8px;
  font-weight: 700;
  color: var(--band-dark);
  background: var(--amber);
  border-radius: 999px;
}

.pricing-card__note {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-2);
}

.pricing-card.is-family {
  background: var(--surface-2);
}

/* ── call to action ─────────────────────────────────────────────────────── */

.pricing-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 0;
}
.pricing-cta__note {
  font-size: 0.9rem;
  color: var(--ink-3);
}

/* ── the disclaimer ─────────────────────────────────────────────────────── */

.pricing-note {
  margin: 40px 0 0;
  padding: 22px 24px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}
.pricing-note h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}
.pricing-note p {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.pricing-note p:last-child {
  margin-bottom: 0;
  color: var(--ink-3);
}

/* ── the full country table ─────────────────────────────────────────────── */

.pricing-all {
  margin: 48px 0 0;
}
.pricing-all h2 {
  margin: 0 0 6px;
}
.pricing-all__dek {
  margin: 0 0 18px;
  color: var(--ink-3);
}

.pricing-filter input {
  width: 100%;
  max-width: 340px;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
}
.pricing-filter input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* The table is wider than a phone; it scrolls inside its own box so the page
   itself never scrolls sideways. */
.pricing-table-scroll {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  -webkit-overflow-scrolling: touch;
}

.pricing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pricing-table th,
.pricing-table td {
  padding: 11px 14px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

.pricing-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  background: var(--surface-2);
}

.pricing-table tbody th {
  position: sticky;
  left: 0;
  text-align: left;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
}

.pricing-table td {
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}

.pricing-table tbody tr:last-child th,
.pricing-table tbody tr:last-child td {
  border-bottom: 0;
}

.pricing-table__cur {
  margin-left: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-3);
}

/* The reader's own storefront, so it is findable in a 175-row table. */
.pricing-table tr.is-yours th,
.pricing-table tr.is-yours td {
  background: var(--accent-soft);
}
.pricing-table tr.is-yours th {
  box-shadow: inset 3px 0 0 var(--accent);
}

.pricing-all__empty {
  margin: 14px 0 0;
  color: var(--ink-3);
}

/* Restate the attribute, or the display above wins over [hidden] and the row
   shows as an empty strip. */
.pricing-all__empty[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .pricing-table th,
  .pricing-table td {
    padding: 9px 11px;
  }
  .pricing-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}
