/* ClearMath Academy — pricing view (Phase 2 Stage 3).
   Free-vs-paid comparison chart, plan cards, member banner, and toast.
   Uses the global design tokens from styles.css (--ink, --teal, etc.). */

.pricing-page {
  max-width: 960px;
  margin: 40px auto 64px;
  padding: 0 20px;
  color: var(--ink);
}

.pricing-head {
  max-width: 760px;
}
.pricing-head h1 {
  font-size: 32px;
  line-height: 1.18;
  margin: 8px 0 14px;
}
.pricing-head .lede {
  margin: 0;
}

/* ---- member banner (shown when already subscribed) ---------------- */
.pricing-member {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  justify-content: space-between;
  margin: 28px 0 8px;
  padding: 18px 22px;
  border: 1px solid rgba(23, 143, 134, 0.35);
  border-radius: 12px;
  background: rgba(23, 143, 134, 0.08);
}
.pricing-member-text strong {
  display: block;
  font-size: 18px;
  color: var(--focus);
}
.pricing-member-text span {
  font-size: 14px;
  color: var(--muted);
}

/* ---- comparison chart -------------------------------------------- */
.compare-wrap {
  margin: 32px 0 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.compare-table th,
.compare-table td {
  padding: 13px 16px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.compare-table thead th {
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}
.compare-table .compare-feature-col {
  text-align: left;
  width: 46%;
}
.compare-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--ink);
}
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}
/* Highlight the Full Access column top to bottom. */
.compare-table .compare-paid-col,
.compare-table td.compare-paid {
  background: rgba(23, 143, 134, 0.07);
}
.compare-table thead .compare-paid-col {
  color: var(--focus);
  background: rgba(23, 143, 134, 0.14);
}
.compare-table .compare-paid {
  font-weight: 600;
}
.ck-yes { color: var(--teal); font-weight: 800; font-size: 17px; }
.ck-no { color: var(--muted); }
.compare-cell-text { font-size: 14px; color: var(--ink); }
.compare-free td { color: var(--muted); }
.compare-foot {
  margin: 10px 2px 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---- plan cards --------------------------------------------------- */
.plan-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0 12px;
}
.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px 22px;
  background: var(--white);
}
.plan-card-featured {
  border: 2px solid var(--teal);
  box-shadow: 0 10px 30px rgba(23, 143, 134, 0.12);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 22px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.plan-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 4px 0 10px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.plan-price .amount { font-size: 38px; font-weight: 800; color: var(--ink); }
.plan-price .per { font-size: 15px; color: var(--muted); }
.plan-price .was {
  font-size: 16px;
  color: var(--muted);
  text-decoration: line-through;
}
.plan-sub {
  margin: 8px 0 18px;
  font-size: 14px;
  color: var(--muted);
  min-height: 20px;
}
.plan-card .primary-button,
.plan-card .secondary-button {
  width: 100%;
}
.plan-note {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.pricing-guarantee {
  margin: 22px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.pricing-signin-note {
  margin-top: 6px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .pricing-head h1 { font-size: 26px; }
  .plan-cards { grid-template-columns: 1fr; }
  .compare-table th, .compare-table td { padding: 11px 10px; font-size: 14px; }
  .compare-table .compare-feature-col { width: 52%; }
}

/* ---- nav upgrade link -------------------------------------------- */
.topnav .topnav-upgrade {
  color: var(--teal);
  font-weight: 700;
}

/* ---- toast -------------------------------------------------------- */
.cm-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  max-width: min(92vw, 460px);
  padding: 13px 20px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--white);
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.cm-toast.cm-toast-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
