/* Pricing grid — scoped under .pricing-section so marketing .top header matches home (academiq.css). */
.pricing-section {
  --pp-text: rgba(255, 255, 255, 0.92);
  --pp-muted: rgba(255, 255, 255, 0.62);
  --pp-border: rgba(255, 255, 255, 0.1);
  --pp-accent: #2f80ed;
  --pp-accent-hover: #2563c7;
  --pp-accent-light: rgba(47, 128, 237, 0.12);
  --pp-grid-bg: rgba(255, 255, 255, 0.03);
  position: relative;
  padding: 1rem 0.1rem 4rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* Signed-in /plans: no locale picker overlay — sit tiles closer to header */
body.pricing-page--auth .pricing-section {
  padding-top: 0.65rem;
}

html[data-theme='light'] .pricing-section {
  --pp-text: #111827;
  --pp-muted: rgba(17, 24, 39, 0.62);
  --pp-border: rgba(0, 0, 0, 0.1);
  --pp-accent: #1e3a8a;
  --pp-accent-hover: #172554;
  --pp-accent-light: #dbeafe;
  --pp-grid-bg: #ffffff;
}

body.pricing-page--auth .shell {
  padding-bottom: 4rem;
}

.pricing-page-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0.5rem 0 1.5rem;
}

.pricing-page-actions--footer {
  justify-content: center;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--pp-border);
}

.pricing-skip {
  font-size: 0.875rem;
  color: var(--pp-muted);
  text-decoration: none;
}
.pricing-skip:hover {
  color: var(--pp-accent);
}

.pricing-hero {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2rem;
}
.pricing-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
html[data-theme='light'] .pricing-section .pricing-hero h1 {
  color: #1e3a8a;
}
.pricing-hero .lead {
  color: var(--pp-muted);
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
html[data-theme='light'] .pricing-section .pricing-hero .lead {
  color: #1e3a8a;
}
.plan-col-billing {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 auto 1rem;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  align-self: center;
}
html[data-theme='light'] .plan-col-billing {
  background: #e5e7eb;
}
.plan-col-billing__opt {
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--pp-muted);
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.plan-col-billing__opt:has(input:checked) {
  background: var(--pp-grid-bg);
  color: var(--pp-text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.plan-col-billing__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.plan-col-billing__save {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--pp-accent);
}
.plan-price-strike {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--pp-muted);
  text-decoration: line-through;
  line-height: 1.2;
}
.plan-price-strike[hidden] {
  display: none !important;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  border: 1px solid var(--pp-border);
  border-radius: 4px;
  background: var(--pp-grid-bg);
}
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .plan-col:nth-child(2) {
    border-right: none;
  }
  .plan-col:nth-child(1),
  .plan-col:nth-child(2) {
    border-bottom: 1px solid var(--pp-border);
  }
}
@media (max-width: 640px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .plan-col {
    border-right: none !important;
    border-bottom: 1px solid var(--pp-border);
  }
  .plan-col:last-child {
    border-bottom: none;
  }
}

.plan-col {
  display: flex;
  flex-direction: column;
  padding: 3.5rem 1.75rem 2.25rem;
  border-right: 1px solid var(--pp-border);
  position: relative;
  min-width: 0;
}
.plan-col:last-child {
  border-right: none;
}
.plan-col--featured {
  padding-top: 0;
  box-shadow: inset 0 0 0 1px var(--pp-accent);
}
.plan-popular {
  background: var(--pp-accent);
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  margin: 0 -1.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.plan-col--featured .plan-popular {
  margin-left: calc(-1.75rem - 1px);
  margin-right: calc(-1.75rem - 1px);
  margin-top: -1px;
}

/* New header block (icon + name + subtitle + badge) */
.plan-col__header {
  text-align: center;
  margin-bottom: 1.25rem;
}
.plan-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
}
.plan-icon svg {
  width: 28px;
  height: 28px;
}
.plan-icon--free {
  background: rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}
.plan-icon--basic {
  background: rgba(47, 128, 237, 0.16);
  color: #2f80ed;
}
.plan-icon--pro {
  background: rgba(139, 92, 246, 0.16);
  color: #8b5cf6;
}
.plan-icon--enterprise {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
}
html[data-theme='light'] .plan-icon--free {
  background: #e5e7eb;
  color: #6b7280;
}
html[data-theme='light'] .plan-icon--basic {
  background: #dbeafe;
  color: #1d4ed8;
}
html[data-theme='light'] .plan-icon--pro {
  background: #ede9fe;
  color: #7c3aed;
}
html[data-theme='light'] .plan-icon--enterprise {
  background: #d1fae5;
  color: #059669;
}

.plan-audience {
  font-size: 0.8rem;
  color: var(--pp-muted);
  margin: 0 0 0.75rem;
}
.plan-name {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  line-height: 1.15;
  text-align: center;
}
.plan-subtitle {
  font-size: 0.85rem;
  color: var(--pp-muted);
  margin: 0 0 0.9rem;
  font-weight: 500;
  text-align: center;
}
.plan-col--basic .plan-subtitle {
  color: var(--pp-accent);
}
.plan-col--pro .plan-subtitle {
  color: #a78bfa;
}
html[data-theme='light'] .plan-col--basic .plan-subtitle {
  color: #1d4ed8;
}
html[data-theme='light'] .plan-col--pro .plan-subtitle {
  color: #7c3aed;
}
.plan-col--enterprise .plan-subtitle {
  color: #10b981;
}
html[data-theme='light'] .plan-col--enterprise .plan-subtitle {
  color: #059669;
}

.plan-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}
.plan-badge--free {
  background: rgba(47, 128, 237, 0.16);
  color: var(--pp-accent);
}
.plan-badge--basic {
  background: rgba(47, 128, 237, 0.16);
  color: var(--pp-accent);
}
html[data-theme='light'] .plan-badge--free,
html[data-theme='light'] .plan-badge--basic {
  background: #dbeafe;
  color: #1d4ed8;
}

.plan-desc {
  font-size: 0.9rem;
  color: var(--pp-text);
  margin: 0 0 1.5rem;
  line-height: 1.45;
  min-height: 2.9em;
}
.plan-price-wrap {
  margin-bottom: 0.85rem;
  text-align: center;
}
.plan-price {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}
.plan-price .currency {
  font-size: 1rem;
  font-weight: 600;
  vertical-align: super;
  margin-right: 0.1rem;
}
.plan-period {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--pp-muted);
  margin-top: 0.15rem;
}
.plan-trial-link {
  font-size: 0.875rem;
  color: var(--pp-accent);
  text-decoration: underline;
  font-weight: 500;
  margin: 0.5rem 0 0.25rem;
  display: inline-block;
}
.plan-trial-note {
  font-size: 0.75rem;
  color: var(--pp-muted);
  margin: 0 0 1.25rem;
  line-height: 1.4;
  min-height: 2.8em;
}
.plan-col form,
.plan-col .plan-cta-wrap {
  margin-top: 10px;
  margin-bottom: 1.75rem;
}
.plan-cta {
  display: block;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
  box-sizing: border-box;
}
.plan-cta--outline {
  background: transparent;
  color: var(--pp-accent);
  border: 2px solid var(--pp-accent);
}
html[data-theme='light'] .plan-cta--outline {
  background: #fff;
}
.plan-cta--outline:hover {
  background: var(--pp-accent-light);
}
.plan-cta--solid {
  background: var(--pp-accent);
  color: #fff;
  border: 2px solid var(--pp-accent);
}
.plan-cta--solid:hover {
  background: var(--pp-accent-hover);
  border-color: var(--pp-accent-hover);
}
.plan-features-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 1rem;
}
.plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.plan-features li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.45;
  margin-bottom: 0.85rem;
  color: var(--pp-text);
}
.plan-features li:last-child {
  margin-bottom: 0;
}
.plan-check {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
  color: var(--pp-accent);
}
.pricing-alert {
  max-width: 36rem;
  margin: 0 auto 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--pp-accent-light);
  border: 1px solid color-mix(in srgb, var(--pp-accent) 25%, transparent);
  border-radius: 8px;
  font-size: 0.875rem;
  text-align: center;
  color: var(--pp-text);
}
.plan-free-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pp-accent);
  margin-bottom: 0.5rem;
}

/* Marketing topnav: pricing link */
.topnav-pricing {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  margin-right: 0.25rem;
}
.topnav-pricing:hover {
  color: #fff;
}
html[data-theme='light'] .topnav-pricing {
  color: rgba(17, 24, 39, 0.72);
}
html[data-theme='light'] .topnav-pricing:hover,
html[data-theme='light'] .topnav-pricing--active {
  color: #1e3a8a;
}
.topnav-pricing--active {
  color: #fff;
  font-weight: 600;
}

.plan-price-usd {
  font-size: 1rem;
  font-weight: 600;
}
.plan-price-amt--custom {
  font-size: 1.65rem;
}
html[data-theme='light'] body.home-page .shell a.btn.btn-blue,
html[data-theme='light'] body.home-page .shell button.btn.btn-blue {
  background: #1e3a8a !important;
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(30, 58, 138, 0.35);
}
html[data-theme='light'] body.home-page .shell a.btn.btn-blue:hover,
html[data-theme='light'] body.home-page .shell button.btn.btn-blue:hover {
  background: #172554 !important;
}

.plan-col--current {
  box-shadow: inset 0 0 0 2px var(--pp-accent);
}
.plan-col--current .plan-cta[disabled],
.plan-col--current button.plan-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.plan-col--current a.plan-cta-register.plan-cta--disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

/* Feature list — sub-text under bold label */
.plan-features li strong {
  font-weight: 600;
  color: var(--pp-text);
}
.plan-feat-sub {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--pp-muted);
  line-height: 1.4;
}
.plan-feat-sub em {
  font-style: normal;
  color: var(--pp-accent);
  font-weight: 600;
}
.plan-col--pro .plan-feat-sub em {
  color: #a78bfa;
}
html[data-theme='light'] .plan-col--pro .plan-feat-sub em {
  color: #7c3aed;
}

/* Not Included section (Free column) */
.plan-not-included {
  margin: 1rem 0 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--pp-border);
}
.plan-not-included__title {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0 0 0.65rem;
  color: var(--pp-muted);
}
.plan-not-included__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.85rem;
}
.plan-not-included__list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--pp-muted);
}
.plan-x {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  color: #ef4444;
}

/* Tier-specific CTA colors */
.plan-cta--basic {
  background: var(--pp-accent);
  border-color: var(--pp-accent);
}
.plan-cta--basic:hover {
  background: var(--pp-accent-hover);
  border-color: var(--pp-accent-hover);
}
.plan-cta--pro {
  background: #8b5cf6;
  border-color: #8b5cf6;
}
.plan-cta--pro:hover {
  background: #7c3aed;
  border-color: #7c3aed;
}
.plan-cta--enterprise {
  color: #10b981;
  border-color: #10b981;
}
.plan-cta--enterprise:hover {
  background: rgba(16, 185, 129, 0.12);
}
html[data-theme='light'] .plan-cta--enterprise {
  color: #059669;
  border-color: #059669;
}
html[data-theme='light'] .plan-cta--enterprise:hover {
  background: #d1fae5;
}

/* Highlight column borders by tier accent on hover (subtle) */
.plan-col--basic {
  box-shadow: inset 0 0 0 1px var(--pp-accent);
}
.plan-col--pro {
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.5);
}
html[data-theme='light'] .plan-col--pro {
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.6);
}
.plan-col--enterprise {
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.45);
}
html[data-theme='light'] .plan-col--enterprise {
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.55);
}

/* ============================================================== */
/* Compare Plans at a Glance — comparison table                   */
/* ============================================================== */
.plan-compare {
  margin-top: 2rem;
  border: 1px solid var(--pp-border);
  border-radius: 4px;
  background: var(--pp-grid-bg);
  overflow-x: auto;
}
.plan-compare__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: var(--pp-text);
  min-width: 760px;
}
.plan-compare__table thead th {
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--pp-border);
  color: #fff;
}
.plan-compare__feature-col {
  text-align: left !important;
  background: transparent !important;
  color: var(--pp-text) !important;
  width: 40%;
}
.plan-compare__title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.plan-compare__title-ico {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--pp-accent);
}
.plan-compare__col--free {
  background: #6b7280;
}
.plan-compare__col--basic {
  background: var(--pp-accent);
}
.plan-compare__col--pro {
  background: #8b5cf6;
}
.plan-compare__col--enterprise {
  background: #10b981;
}
html[data-theme='light'] .plan-compare__col--free {
  background: #6b7280;
}
html[data-theme='light'] .plan-compare__col--basic {
  background: #2563eb;
}
html[data-theme='light'] .plan-compare__col--pro {
  background: #7c3aed;
}
html[data-theme='light'] .plan-compare__col--enterprise {
  background: #059669;
}

.plan-compare__table tbody tr {
  border-bottom: 1px solid var(--pp-border);
}
.plan-compare__table tbody tr:last-child {
  border-bottom: none;
}
.plan-compare__table tbody th {
  text-align: left;
  padding: 0.85rem 1rem;
  font-weight: 600;
  vertical-align: top;
  color: var(--pp-text);
}
.plan-compare__table tbody td {
  text-align: center;
  padding: 0.85rem 1rem;
  vertical-align: middle;
  color: var(--pp-text);
}
.plan-compare__feature {
  display: block;
  font-weight: 600;
}
.plan-compare__feature-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--pp-muted);
  font-weight: 400;
  margin-top: 0.2rem;
}
.plan-compare__feature-sub--inline {
  display: inline;
  margin-top: 0;
  color: var(--pp-accent);
}
.plan-col--pro .plan-compare__feature-sub--inline {
  color: #a78bfa;
}
.plan-compare__cell-no {
  color: var(--pp-muted);
}
.plan-compare__cell-yes svg {
  width: 1.25rem;
  height: 1.25rem;
  color: #10b981;
  vertical-align: middle;
}
html[data-theme='light'] .plan-compare__cell-yes svg {
  color: #059669;
}

@media (max-width: 640px) {
  .plan-compare {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* Downgrade confirmation modal (authenticated /plans) */
.plans-modal-overlay {
  --pp-text: rgba(255, 255, 255, 0.92);
  --pp-muted: rgba(255, 255, 255, 0.62);
  --pp-border: rgba(255, 255, 255, 0.1);
  --pp-accent: #2f80ed;
  --pp-accent-hover: #2563c7;
}
html[data-theme='light'] .plans-modal-overlay {
  --pp-text: #111827;
  --pp-muted: rgba(17, 24, 39, 0.62);
  --pp-border: rgba(0, 0, 0, 0.1);
  --pp-accent: #1e3a8a;
  --pp-accent-hover: #172554;
}
.plans-modal-overlay[hidden] {
  display: none !important;
}
.plans-modal-overlay:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.plans-modal-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.plans-modal-overlay__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--pp-border);
  background: rgba(22, 28, 36, 0.98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
html[data-theme='light'] .plans-modal-overlay__panel {
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
}
.plans-modal-overlay__title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--pp-text);
}
.plans-modal-overlay__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.plans-modal-overlay__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--pp-muted);
}
.plans-modal-overlay__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.15rem;
}
.plans-modal-overlay__btn {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}
.plans-modal-overlay__btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--pp-border);
  color: var(--pp-text);
}
.plans-modal-overlay__btn--secondary:hover {
  filter: brightness(1.08);
}
.plans-modal-overlay__btn--confirm {
  background: var(--pp-accent, #2f80ed);
  color: #fff;
}
.plans-modal-overlay__btn--confirm:hover {
  background: var(--pp-accent-hover, #2563c7);
}
.plans-modal-overlay__btn--confirm:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
html[data-theme='light'] .plans-modal-overlay__btn--secondary {
  background: #f3f4f6;
  color: #111827;
}
html[data-theme='light'] .plans-modal-overlay__btn--confirm {
  background: var(--pp-accent);
  color: #fff;
}
