/* Plans page — pricing cards + comparison matrix.
   Palette + type inherit from base.css (--sage, --gold, --ink, etc).
   Sits alongside the legacy subscription.css; safe to load both. */

:root {
  --plan-radius:      20px;
  --plan-border:      rgba(28,28,25,0.10);
  --plan-border-str:  rgba(28,28,25,0.18);
  --plan-sage-glow:   rgba(63,85,68,0.14);
  --plan-cream:       #faf8f2;
}

/* ── Plans section ───────────────────────────────────────────── */
.plans {
  padding: 72px 0 40px;
  background: linear-gradient(180deg, #ffffff 0%, var(--plan-cream) 100%);
}
.plans__head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}
.plans__kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--sage, #3f5544);
  margin-bottom: 12px;
}
.plans__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--ink, #1c1c19);
}
.plans__sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-70, #55554e);
  margin: 0;
}
.plans__inline-link {
  color: var(--sage, #3f5544);
  border-bottom: 1px solid rgba(63,85,68,0.35);
  text-decoration: none;
}
.plans__inline-link:hover { border-bottom-color: var(--sage, #3f5544); }
.plans__reassure {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-50, #7d7d75);
  margin: 32px 0 0;
  letter-spacing: 0.01em;
}

.plans__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
@media (max-width: 900px) {
  .plans__grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ── Plan card ───────────────────────────────────────────────── */
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--plan-border);
  border-radius: var(--plan-radius);
  padding: 28px 24px 24px;
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--plan-border-str);
  box-shadow: 0 12px 32px -20px rgba(28,28,25,0.20);
}
.plan-card--featured {
  border-color: var(--sage, #3f5544);
  box-shadow: 0 0 0 3px var(--plan-sage-glow),
              0 20px 44px -24px rgba(63,85,68,0.30);
  background: #ffffff;
  transform: translateY(-4px);
}
@media (max-width: 900px) { .plan-card--featured { transform: none; } }
.plan-card--current {
  border-color: var(--gold, #b8871f);
  box-shadow: 0 0 0 2px rgba(184,135,31,0.20);
}

.plan-card__badge {
  position: absolute;
  top: -12px;
  left: 24px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--sage, #3f5544);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.plan-card__badge--current {
  background: var(--gold, #b8871f);
  left: auto;
  right: 24px;
}

.plan-card__head {
  margin-bottom: 20px;
}
.plan-card__name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink, #1c1c19);
  margin: 0 0 6px;
  line-height: 1.1;
}
.plan-card__tagline {
  font-size: 13.5px;
  color: var(--ink-70, #55554e);
  margin: 0;
  line-height: 1.4;
}

.plan-card__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--plan-border);
}
.plan-card__price-amount {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 44px;
  font-weight: 700;
  color: var(--ink, #1c1c19);
  line-height: 1;
  letter-spacing: -0.02em;
}
.plan-card__price-period {
  font-size: 14px;
  color: var(--ink-50, #7d7d75);
  font-weight: 500;
}

.plan-card__highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
}
.plan-card__highlight {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-70, #55554e);
}
.plan-card__highlight-mark {
  color: var(--sage, #3f5544);
  font-weight: 700;
  flex-shrink: 0;
}

.plan-card__cta { margin-top: auto; }
.plan-card__btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease,
              border-color 0.15s ease, transform 0.08s ease;
  cursor: pointer;
  border: 1px solid transparent;
  box-sizing: border-box;
}
.plan-card__btn--primary {
  background: var(--sage, #3f5544);
  color: #ffffff;
}
.plan-card__btn--primary:hover { background: #2e402f; }
.plan-card__btn--primary:active { transform: translateY(1px); }
.plan-card__btn--ghost {
  background: transparent;
  color: var(--sage, #3f5544);
  border-color: rgba(63,85,68,0.30);
}
.plan-card__btn--ghost:hover {
  background: rgba(63,85,68,0.06);
  border-color: var(--sage, #3f5544);
}
.plan-card__btn--disabled {
  background: rgba(0,0,0,0.05);
  color: var(--ink-50, #7d7d75);
  cursor: default;
}

/* ── Comparison matrix ──────────────────────────────────────── */
.matrix {
  padding: 20px 0 72px;
  background: var(--plan-cream);
}
.matrix__details {
  max-width: 960px;
  margin: 0 auto;
  border: 1px solid var(--plan-border);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}
.matrix__summary {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  transition: background 0.15s ease;
}
.matrix__summary::-webkit-details-marker { display: none; }
.matrix__summary:hover { background: rgba(63,85,68,0.04); }
.matrix__summary-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink, #1c1c19);
  letter-spacing: 0.01em;
}
.matrix__summary-icon {
  color: var(--sage, #3f5544);
  font-size: 18px;
  transition: transform 0.2s ease;
}
.matrix__details[open] .matrix__summary-icon {
  transform: rotate(180deg);
}
.matrix__details[open] .matrix__summary {
  border-bottom: 1px solid var(--plan-border);
}

.matrix__wrap { overflow-x: auto; }
.matrix__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 560px;
}
.matrix__th {
  padding: 14px 12px;
  text-align: center;
  font-weight: 700;
  color: var(--ink, #1c1c19);
  background: #ffffff;
  border-bottom: 1px solid var(--plan-border);
  position: sticky; top: 0;
  z-index: 1;
}
.matrix__th--feature { text-align: left; }
.matrix__th--featured {
  background: var(--plan-sage-glow);
  color: var(--sage, #3f5544);
}
.matrix__th-name {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 16px;
}
.matrix__th-price {
  display: block;
  font-size: 11.5px;
  color: var(--ink-50, #7d7d75);
  font-weight: 500;
  margin-top: 2px;
}
.matrix__th--featured .matrix__th-price { color: var(--sage, #3f5544); }

.matrix__group {
  text-align: left;
  padding: 16px 20px 8px;
  background: var(--plan-cream);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-50, #7d7d75);
  font-weight: 700;
  border-top: 1px solid var(--plan-border);
  border-bottom: 1px solid var(--plan-border);
}
.matrix__row-label {
  padding: 12px 20px;
  text-align: left;
  font-weight: 500;
  color: var(--ink-70, #55554e);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.matrix__cell {
  padding: 12px;
  text-align: center;
  color: var(--ink, #1c1c19);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-variant-numeric: tabular-nums;
}
.matrix__cell--yes { color: var(--sage, #3f5544); font-weight: 700; }
.matrix__cell--no,
.matrix__cell--none { color: var(--ink-30, #a8a8a0); }
.matrix__cell--value { font-weight: 600; }

/* ── Checkout stub (holding page until Stripe lands) ────────── */
.checkout-stub {
  padding: 80px 0 120px;
}
.checkout-stub__inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.checkout-stub__kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--sage, #3f5544);
  margin-bottom: 12px;
}
.checkout-stub__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 36px;
  font-weight: 700;
  color: var(--ink, #1c1c19);
  margin: 0 0 8px;
}
.checkout-stub__sub {
  font-size: 15px;
  color: var(--ink-70, #55554e);
  margin: 0 0 32px;
}
.checkout-stub__notice {
  padding: 24px;
  background: #fdf7e8;
  border: 1px solid rgba(184,135,31,0.30);
  border-radius: 14px;
  text-align: left;
  color: var(--ink-70, #55554e);
  font-size: 14px;
  line-height: 1.5;
}
.checkout-stub__notice strong {
  display: block;
  color: var(--ink, #1c1c19);
  margin-bottom: 6px;
}
.checkout-stub__notice p { margin: 0; }
.checkout-stub__notice a {
  color: var(--sage, #3f5544);
  border-bottom: 1px solid rgba(63,85,68,0.35);
  text-decoration: none;
}
.checkout-stub__back {
  display: inline-block;
  margin-top: 32px;
  color: var(--sage, #3f5544);
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
}
.checkout-stub__back:hover { text-decoration: underline; }


/* ─────────────────────────────────────────────────────────────
   Profile subscription block — rendered on the Cub profile page
   by subscription/partials/_profile_subscription_block.html.
   ─────────────────────────────────────────────────────────── */
.sub-block {
  margin: 0 0 28px;
  padding: 22px 26px;
  background: var(--surface, #fff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.sub-block--warn     { border-color: rgba(184, 135,  31, 0.35); background: #fdf7e8; }
.sub-block--critical { border-color: rgba(138,  46,  10, 0.35); background: #fbeee8; }

.sub-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: 10px;
}
.sub-block__kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50, #7d7d75);
}
.sub-block__plan {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink, #1c1c19);
  margin: 0;
  line-height: 1.1;
  flex: 1 1 auto;
  min-width: 0;
}
.sub-block__price {
  font-family: inherit;
  font-size: 18px;
  color: var(--ink-70, #55554e);
  font-weight: 500;
  margin-left: 8px;
}
.sub-block__status {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink-70, #55554e);
}
.sub-block__status--ok       { background: rgba(63, 85, 68, 0.10);  color: #3f5544; }
.sub-block__status--warn     { background: #fdf1d6;                 color: #6b4a05; }
.sub-block__status--critical { background: #fbe1d6;                 color: #8a2e0a; }

.sub-block__body {
  margin: 8px 0 16px;
  color: var(--ink-70, #55554e);
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 62ch;
}

.sub-block__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.sub-block__cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink, #1c1c19);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease,
              color 0.15s ease, transform 0.08s ease;
}
.sub-block__cta:hover {
  background: rgba(63, 85, 68, 0.08);
  border-color: rgba(63, 85, 68, 0.30);
}
.sub-block__cta:active { transform: translateY(1px); }
.sub-block__cta--primary {
  background: var(--sage, #3f5544);
  color: #fff;
  border-color: var(--sage, #3f5544);
}
.sub-block__cta--primary:hover {
  background: #2e402f;
  border-color: #2e402f;
  color: #fff;
}
.sub-block__cta--ghost {
  background: transparent;
}

@media (max-width: 520px) {
  .sub-block { padding: 18px 20px; }
  .sub-block__plan { font-size: 22px; }
  .sub-block__cta { width: 100%; justify-content: center; }
}
