@layer pages {
  body[data-page="pricing"] {
    /* Codivium shared design tokens (use across pages) */
    /* premium gold */

    /* Page variable mappings */
    /* Accent lights (kept for ambient background) */
    --font: "Cinzel", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  }

  body[data-page="pricing"] * {
    box-sizing: border-box;
  }

  body[data-page="pricing"] {
    height: 100%;
  }

  body[data-page="pricing"] {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
  }

  /* Premium ambient lighting (not glassmorphic) */
  body[data-page="pricing"] .ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(900px 520px at 15% 18%, rgba(124, 58, 237, 0.22), transparent 60%),
      radial-gradient(820px 520px at 85% 22%, rgba(34, 211, 238, 0.18), transparent 62%),
      radial-gradient(900px 560px at 55% 95%, rgba(255, 200, 110, 0.12), transparent 65%);
  }

  body[data-page="pricing"] .wrap {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: calc(64px + var(--topbar-h)) 18px;
    position: relative;
    z-index: 2;
  }

  body[data-page="pricing"] .container {
    width: min(1344px, 100%);
    display: grid;
    gap: 18px;
  }

  body[data-page="pricing"] .top {
    text-align: center;
    display: grid;
    gap: 10px;
    margin-bottom: 8px;
  }

  body[data-page="pricing"] .kicker {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.70);
  }

  body[data-page="pricing"] h1 {
    margin: 0;
    font-size: clamp(28px, 3.2vw, 42px) !important;
    letter-spacing: -0.6px;
    font-weight: 950 !important;
  }

  body[data-page="pricing"] .sub {
    margin: 0 auto;
    max-width: 65ch;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
  }

  body[data-page="pricing"] .grid {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 18px;
  }


  body[data-page="pricing"] .card {
    position: relative;
    border-radius: var(--radius);
    /* rounded corners */
    padding: 18px 18px 16px;


    width: min(621px, 100%);
    justify-self: center;
    /* Solid premium card surface (no glass / no blur) */
    background: var(--cv-card-bg);
    border: 1px solid rgba(15, 23, 42, 0.10);

    box-shadow: var(--shadow);
    overflow: hidden;
    /* Extra vertical space so we can add a CTA button at the bottom later
         without compressing the feature list. */
    min-height: 620px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateY(-4px);
    color: rgba(15, 23, 42, 0.92);
  }

  /* subtle lift under each card */
  body[data-page="pricing"] .card::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    bottom: -22px;
    height: 26px;
    background: rgba(0, 0, 0, 0.35);
    filter: blur(22px);
    border-radius: 999px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.28;
  }

  body[data-page="pricing"] .card>* {
    position: relative;
    z-index: 1;
  }

  body[data-page="pricing"] .plan {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.10);
  }

  body[data-page="pricing"] .plan h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 920;
    letter-spacing: -0.2px;
  }

  body[data-page="pricing"] .tag {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.05);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
    font-weight: 700;
  }

  body[data-page="pricing"] .price {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 2px;
  }

  body[data-page="pricing"] .amount {
    font-size: 42px;
    font-weight: 980;
    letter-spacing: -1px;
    line-height: 1;
    color: rgba(15, 23, 42, 0.92);
  }

  body[data-page="pricing"] .per {
    color: rgba(15, 23, 42, 0.62);
    font-size: 13px;
    padding-bottom: 6px;
  }

  body[data-page="pricing"] .per.is-hidden {
    display: none;
  }

  body[data-page="pricing"] .note {
    color: rgba(15, 23, 42, 0.70);
    font-size: 12px;
    line-height: 1.55;
    margin-top: -4px;
  }

  body[data-page="pricing"] .fineprint {
    color: rgba(15, 23, 42, 0.62);
    font-size: 12px;
    line-height: 1.45;
    margin-top: -2px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  body[data-page="pricing"] .fineprint .sep {
    opacity: 0.75;
  }


  body[data-page="pricing"] .billing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.05);
    margin-top: 6px;
  }

  body[data-page="pricing"] .bill-pill {
    position: relative;
    display: block;
    cursor: pointer;
    user-select: none;
  }

  body[data-page="pricing"] .bill-pill input {
    position: absolute;
    opacity: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
  }

  body[data-page="pricing"] .bill-pill span {
    display: grid;
    place-items: center;
    padding: 10px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: rgba(15, 23, 42, 0.78);
    transition: transform 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
  }

  body[data-page="pricing"] .bill-pill input:checked+span {
    background: rgba(7, 7, 10, 0.94);
    color: rgba(250, 245, 245, 0.98);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.20);
    transform: translateY(-1px);
  }

  body[data-page="pricing"] .bill-pill input:focus-visible+span {
    outline: 2px solid rgba(246, 213, 138, 0.88);
    outline-offset: 2px;
  }

  body[data-page="pricing"] .features {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 16px;
    /* more vertical spacing */
  }

  body[data-page="pricing"] .features li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: rgba(15, 23, 42, 0.78);
    font-size: 13px;
    line-height: 1.55;
  }

  body[data-page="pricing"] .check {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.12);
    margin-top: 1px;
    flex: 0 0 auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  body[data-page="pricing"] .check svg {
    width: 12px;
    height: 12px;
    color: rgba(15, 23, 42, 0.82);
  }

  body[data-page="pricing"] .spacer {
    flex: 1 1 auto;
  }

  body[data-page="pricing"] .cta {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
  }


  body[data-page="pricing"] .select-btn {
    appearance: none;
    /* Premium CTA: beige body, Cinzel, raised with press animation */
    border: 0;
    /* remove orange border */
    background: rgba(242, 232, 214, 0.98);
    color: rgba(10, 14, 24, 0.92);
    padding: 12px 28px;
    border-radius: 0;
    /* sharp corners */
    cursor: pointer;
    font-family: "Cinzel", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    font-weight: 900;
    letter-spacing: 0.06em;
    user-select: none;
    text-align: center;
    /* ~2x wider than the prior compact button while staying responsive */
    width: min(240px, 100%);
    white-space: nowrap;
    box-shadow:
      0 18px 46px rgba(0, 0, 0, 0.28),
      0 2px 0 rgba(255, 255, 255, 0.20) inset,
      0 0 0 1px rgba(0, 0, 0, 0.10) inset;
    transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
  }

  body[data-page="pricing"] .select-btn:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
    box-shadow:
      0 22px 56px rgba(0, 0, 0, 0.26),
      0 2px 0 rgba(255, 255, 255, 0.22) inset,
      0 0 0 1px rgba(0, 0, 0, 0.10) inset;
  }

  body[data-page="pricing"] .select-btn:active {
    filter: brightness(0.995);
    transform: translateY(1px);
    box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.26),
      0 2px 10px rgba(0, 0, 0, 0.22) inset,
      0 0 0 1px rgba(0, 0, 0, 0.12) inset;
  }

  /* Responsive */
  @media (max-width: 980px) {
    body[data-page="pricing"] .grid {
      grid-template-columns: 1fr;
    }

    body[data-page="pricing"] .card {
      min-height: auto;
      width: 100%;
    }
  }

  @media (prefers-reduced-motion: reduce) {

    body[data-page="pricing"] .card,
    body[data-page="pricing"] .select-btn {
      transition: none;
    }
  }


  /* ===== Discount display (configurable) ===== */
  body[data-page="pricing"] .amounts {
    display: grid;
    gap: 6px;
  }

  body[data-page="pricing"] .amount.original {
    font-size: 14px;
    font-weight: 950;
    letter-spacing: -0.2px;
    color: rgba(15, 23, 42, 0.56);
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    text-decoration-color: rgba(15, 23, 42, 0.52);
  }

  body[data-page="pricing"] .amount.original.is-hidden {
    display: none;
  }

  body[data-page="pricing"] .discount-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 224, 140, 0.18);
    border: 1px solid rgba(255, 224, 140, 0.45);
    color: rgba(15, 23, 42, 0.82);
    font-size: 12px;
    line-height: 1.45;
  }

  body[data-page="pricing"] .discount-banner.is-hidden {
    display: none;
  }

  body[data-page="pricing"] .discount-badge {
    flex: 0 0 auto;
    font-weight: 980;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    font-size: 10.5px;
    background: rgba(15, 23, 42, 0.92);
    color: rgba(250, 245, 245, 0.98);
    padding: 5px 8px;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  }

  body[data-page="pricing"] .discount-text {
    color: rgba(15, 23, 42, 0.78);
  }

}

body[data-page="pricing"] .select-btn-center {
  align-self: center;
}


/* ===== Final patch: keep pricing card absolutely stable across billing switches ===== */
body[data-page="pricing"] .card-single {
  min-height: 0;
}

body[data-page="pricing"] .price {
  min-height: 64px;
}

body[data-page="pricing"] .amounts {
  min-height: 64px;
  align-content: start;
}

body[data-page="pricing"] .amount.original {
  min-height: 14px;
}

body[data-page="pricing"] .amount.original.is-hidden {
  display: block !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

body[data-page="pricing"] .discount-banner {
  min-height: 56px;
}

body[data-page="pricing"] .discount-banner.is-hidden {
  display: flex !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body[data-page="pricing"] .note {
  min-height: 38px;
}

body[data-page="pricing"] .fineprint {
  min-height: 18px;
}


/* ===== Final patch v7: pricing card aligned to login theme + beige primary button ===== */
body[data-page="pricing"] .card {
  border-radius: 18px !important;
  background: var(--cv-card-bg) !important;
  color: rgb(18, 18, 22) !important;
  border: 1px solid rgba(216, 178, 104, 0.32) !important;
  box-shadow:
    var(--cv-shadow),
    0 1px 0 rgba(255, 255, 255, 0.70) inset,
    0 -18px 38px rgba(0, 0, 0, 0.08) inset !important;
  overflow: hidden !important;
}

body[data-page="pricing"] .plan {
  margin: -18px -18px 12px -18px !important;
  padding: 14px 18px !important;
  background: rgb(7, 7, 10) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  border-bottom: none !important;
}

body[data-page="pricing"] .plan h2 {
  margin: 0 !important;
  color: rgba(250, 245, 245, 0.96) !important;
  font-family: "Cinzel", serif !important;
  font-weight: 800 !important;
  letter-spacing: 0.14em !important;
  font-size: 16px !important;
}

body[data-page="pricing"] .tag {
  color: rgba(250, 245, 245, 0.78) !important;
  border: 1px solid rgba(216, 178, 104, 0.30) !important;
  background: rgba(250, 245, 245, 0.06) !important;
}

body[data-page="pricing"] .billing {
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  background: rgba(0, 0, 0, 0.04) !important;
}

body[data-page="pricing"] .bill-pill input:checked+span {
  background: rgb(7, 7, 10) !important;
  color: rgba(250, 245, 245, 0.98) !important;
}

body[data-page="pricing"] .select-btn {
  background: rgb(216, 178, 104) !important;
  color: rgb(18, 18, 22) !important;
  border: 1px solid rgba(164, 129, 67, 0.42) !important;
  border-radius: 10px !important;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 -8px 16px rgba(0, 0, 0, 0.10) inset !important;
}

body[data-page="pricing"] .select-btn:hover {
  filter: brightness(1.03) !important;
}


/* ===== Final patch v9: pricing strip inset and off-white button states ===== */
body[data-page="pricing"] .plan {
  margin: 14px 14px 12px 14px !important;
  border-radius: 0 !important;
}

body[data-page="pricing"] .select-btn {
  background: rgb(244, 239, 231) !important;
  color: rgb(18, 18, 22) !important;
  border: 1px solid rgba(193, 175, 145, 0.58) !important;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.46) inset,
    0 -8px 16px rgba(0, 0, 0, 0.06) inset !important;
}

body[data-page="pricing"] .select-btn:disabled {
  background: rgb(251, 249, 245) !important;
  color: rgba(18, 18, 22, 0.46) !important;
  border: 1px solid rgba(210, 199, 180, 0.72) !important;
  opacity: 1 !important;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.55) inset,
    0 -6px 12px rgba(0, 0, 0, 0.03) inset !important;
  filter: none !important;
}

.cube-symbol-small {
  font-size: 18px;
  letter-spacing: 0.06em;
}


/* ===== Final patch v22: keep pricing amounts visually centered ===== */
body[data-page="pricing"] .price {
  justify-content: center !important;
  text-align: center !important;
}

body[data-page="pricing"] .amounts {
  justify-items: center !important;
  text-align: center !important;
}

body[data-page="pricing"] .per {
  align-self: end;
}