/* File: /assets/css/premium.css
   Module: /premium/ (page-premium.php)

   Color grammar: royal blue is Premium, both its marks (the "Pro" chip, the
   Premium column) and, since 2026-10-03, its buttons: every .ch-prem-btn is
   the sitewide Premium button (style.css :root --ch-pro-*), because this page
   has one action and it buys Premium. Emerald stays the color of links and
   checks here. The store-apps band is the deep DevSecOps surface that stays
   identical in both themes.

   GeneratePress styles every button:hover / :focus / :active with a dark
   background at specificity 0,1,1. Every button state below is declared at
   0,2,0 or higher so none of them flashes dark grey on hover.

   Contents: 1 tokens, 2 layout + type, 3 buttons, 4 hero + plan card,
   5 tiles, 6 store apps, 7 table, 8 billing facts, 9 FAQ, 10 closing band,
   11 toasts, 12 responsive, 13 dark, 14 reduced motion */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */

.ch-prem {
    --p-surface:     #FFFFFF;
    --p-well:        #F1F5F9;
    --p-line:        var(--ch-border, #E2E8F0);
    --p-line-hi:     #CBD5E1;
    --p-ink:         var(--ch-text-main, #0F172A);
    --p-mute:        var(--ch-text-muted, #64748B);
    /* Muted text on the well (#F1F5F9): Slate 500 is 4.34:1 there, Slate 600
       about 6.9:1. The billing toggle and the table head sit on the well. */
    --p-mute-well:   #475569;
    --p-cta:         #10B981;
    --p-cta-hi:      #059669;
    --p-cta-ink:     #047857;
    --p-cta-wash:    rgba(16, 185, 129, 0.10);
    --p-cta-line:    rgba(16, 185, 129, 0.40);
    --p-pro:         #1E40AF;
    --p-pro-fill:    linear-gradient(180deg, #2563EB 0%, #1D4ED8 55%, #1E40AF 100%);
    --p-pro-wash:    rgba(37, 99, 235, 0.06);
    --p-pro-line:    rgba(37, 99, 235, 0.30);
    --p-warn:        #B45309;
    --p-stop:        #B91C1C;
    --p-stop-wash:   rgba(239, 68, 68, 0.07);
    --p-stop-line:   rgba(239, 68, 68, 0.34);
    --p-deep:        #0F172A;
    --p-deep-2:      #1E293B;
    --p-deep-line:   #334155;
    --p-deep-ink:    #E2E8F0;
    --p-deep-mute:   #94A3B8;
    --p-radius:      16px;
    --p-radius-sm:   10px;
    --p-shadow:      0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 30px -18px rgba(15, 23, 42, 0.22);
    --p-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.05), 0 28px 60px -30px rgba(15, 23, 42, 0.35);
    --p-mono:        'JetBrains Mono', 'Roboto Mono', ui-monospace, monospace;
    --p-ease:        cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   2. LAYOUT + TYPE
   ========================================================================== */

.ch-page-premium .site-main {
    padding-top: 1.5rem;
}

.ch-prem {
    color: var(--p-ink);
}

.ch-prem *,
.ch-prem *::before,
.ch-prem *::after {
    box-sizing: border-box;
}

.ch-prem-section {
    margin-top: 5.5rem;
}

.ch-prem-head {
    max-width: 760px;
    margin: 0 0 2rem;
}

.ch-prem-kicker,
.ch-prem-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--p-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--p-cta-ink);
}

.ch-prem-kicker::before {
    content: '//';
    opacity: 0.7;
}

.ch-prem-kicker.is-deep {
    color: var(--p-cta-ink);
}

.ch-prem-eyebrow {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--p-cta-line);
    border-radius: 999px;
    background-color: var(--p-cta-wash);
}

.ch-prem-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--p-cta);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.ch-prem-h1 {
    margin: 1.1rem 0 1.1rem;
    font-size: clamp(2.05rem, 4.2vw, 3.1rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--p-ink);
}

.ch-prem-h2 {
    margin: 0.6rem 0 0;
    font-size: clamp(1.55rem, 2.7vw, 2.15rem);
    font-weight: 800;
    line-height: 1.16;
    letter-spacing: -0.02em;
    color: var(--p-ink);
}

.ch-prem-lead {
    margin: 0 0 1.6rem;
    max-width: 38rem;
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--p-mute);
}

.ch-prem-lead strong,
.ch-prem-sub strong {
    color: var(--p-ink);
}

.ch-prem-sub {
    margin: 0.9rem 0 0;
    font-size: 1.02rem;
    line-height: 1.65;
    color: var(--p-mute);
}

.ch-prem-pro {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: 5px;
    background-image: var(--p-pro-fill);
    color: #FFFFFF;
    font-family: var(--p-mono);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* ==========================================================================
   3. BUTTONS (0,2,0 on every state: see the header note)
   ========================================================================== */

/* White on #10B981 was 2.5:1. The Premium fill holds white at 5.2:1 or
   better on every stop, in both themes. */
.ch-prem .ch-prem-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 50px;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--ch-pro-line, rgba(30, 64, 175, 0.55));
    border-radius: var(--p-radius-sm);
    background-color: #2563EB;
    background-image: var(--ch-pro-fill);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--ch-pro-glow);
    transition: background-color 0.2s, box-shadow 0.25s var(--p-ease), transform 0.25s var(--p-ease);
}

/* The light sweep the header Premium button has, at page scale. */
.ch-prem .ch-prem-btn::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: var(--ch-pro-sweep);
    transform: skewX(-18deg);
    transition: left 0.7s var(--p-ease);
    pointer-events: none;
}

.ch-prem .ch-prem-btn:hover,
.ch-prem .ch-prem-btn:focus,
.ch-prem .ch-prem-btn:active {
    background-color: #1D4ED8;
    background-image: var(--ch-pro-fill-hi);
    color: #FFFFFF;
    text-decoration: none;
}

.ch-prem .ch-prem-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--ch-pro-glow-hi);
}

.ch-prem .ch-prem-btn:hover::after,
.ch-prem .ch-prem-btn:focus-visible::after {
    left: 130%;
}

.ch-prem .ch-prem-btn:focus-visible {
    outline: 3px solid var(--ch-pro-ring, rgba(96, 165, 250, 0.6));
    outline-offset: 3px;
}

.ch-prem .ch-prem-btn svg {
    transition: transform 0.25s var(--p-ease);
}

.ch-prem .ch-prem-btn:hover svg {
    transform: translateX(3px);
}

.ch-prem .ch-prem-btn.is-block {
    display: flex;
    width: 100%;
}

.ch-prem .ch-prem-btn.is-large {
    min-height: 56px;
    padding: 0.95rem 2rem;
    font-size: 1.06rem;
}

.ch-prem .ch-prem-btn[disabled],
.ch-prem .ch-prem-btn[disabled]:hover {
    border-color: var(--p-line-hi);
    background-color: var(--p-line-hi);
    background-image: none;
    color: var(--p-mute);
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.ch-prem .ch-prem-btn[disabled]::after {
    content: none;
}

.ch-prem-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2.5px solid rgba(255, 255, 255, 0.45);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: ch-prem-spin 0.7s linear infinite;
}

.ch-prem-btn.is-loading .ch-prem-spinner,
.ch-prem-spinner.is-on {
    display: inline-block;
}

.ch-prem-btn.is-loading .ch-prem-btn-label {
    opacity: 0.75;
}

.ch-prem .ch-prem-btn.is-loading,
.ch-prem .ch-prem-btn.is-loading:hover {
    background-color: #1D4ED8;
    background-image: var(--ch-pro-fill-hi);
    color: #FFFFFF;
    cursor: progress;
    transform: none;
}

@keyframes ch-prem-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   4. HERO + PLAN CARD
   ========================================================================== */

.ch-prem-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    /* The copy and the assurances stay one group, centred against the card. */
    grid-template-areas:
        ".      card"
        "copy   card"
        "assure card"
        ".      card";
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: 3.5rem;
    row-gap: 0;
    align-items: center;
    padding: 2.5rem 0 1rem;
}

.ch-prem-hero-copy { grid-area: copy; }
.ch-prem-card      { grid-area: card; }
.ch-prem-assure    { grid-area: assure; }

.ch-prem-hero::before {
    content: '';
    position: absolute;
    /* Right edge at 0, not -3rem: past the right edge the box widened the
       page by 32px at 390 (a sideways scroll on phones). The visible part of
       the glow fades out well inside the box, so nothing visible moves out. */
    inset: -2rem 0 auto auto;
    width: 560px;
    height: 560px;
    background: radial-gradient(closest-side, rgba(16, 185, 129, 0.16), rgba(37, 99, 235, 0.07) 55%, transparent 72%);
    pointer-events: none;
    z-index: 0;
}

.ch-prem-hero > * {
    position: relative;
    z-index: 1;
}

.ch-prem-assure {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ch-prem-assure li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--p-ink);
}

.ch-prem-assure svg {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 7px;
    border-radius: 8px;
    background-color: var(--p-cta-wash);
    color: var(--p-cta-ink);
}

/* --- the card --- */

.ch-prem-card {
    position: relative;
    padding: 1.9rem 1.8rem 1.6rem;
    border: 1px solid var(--p-line);
    border-radius: 20px;
    background-color: var(--p-surface);
    box-shadow: var(--p-shadow-card);
    overflow: hidden;
    scroll-margin-top: 110px;
}

.ch-prem-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #1D4ED8 0%, #2563EB 35%, #10B981 100%);
}

.ch-prem-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
}

.ch-prem-card-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--p-ink);
}

.ch-prem-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.6rem;
    border: 1px solid var(--p-cta-line);
    border-radius: 999px;
    background-color: var(--p-cta-wash);
    color: var(--p-cta-ink);
    font-family: var(--p-mono);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ch-prem-member-chip svg {
    width: 12px;
    height: 12px;
}

/* --- monthly / annual switch --- */

.ch-prem-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin: 0 0 1.3rem;
    border: 1px solid var(--p-line);
    border-radius: 12px;
    background-color: var(--p-well);
}

.ch-prem-toggle-opt {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0;
    padding: 0.4rem 0.6rem;
    border-radius: 9px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--p-mute-well);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.ch-prem-toggle-opt input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ch-prem-toggle-opt span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.ch-prem-toggle-opt.is-on,
.ch-prem-toggle-opt:has(input:checked) {
    background-color: var(--p-surface);
    color: var(--p-ink);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 12px -6px rgba(15, 23, 42, 0.25);
}

.ch-prem-toggle-opt:has(input:focus-visible) {
    outline: 2px solid var(--p-cta);
    outline-offset: 1px;
}

.ch-prem-save {
    padding: 0.14rem 0.42rem;
    border-radius: 999px;
    background-color: var(--p-cta);
    color: #FFFFFF;
    font-family: var(--p-mono);
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.04em;
}

/* --- price --- */

.ch-prem-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-height: 3.4rem;
}

.ch-prem-price-amount {
    font-size: 2.9rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--p-ink);
}

.ch-prem-price-amount.is-fallback {
    font-size: 1.45rem;
    letter-spacing: -0.01em;
    color: var(--p-mute);
}

.ch-prem-price-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--p-mute);
}

.ch-prem-skel {
    display: inline-block;
    width: 6.5ch;
    height: 0.82em;
    border-radius: 8px;
    vertical-align: -0.05em;
    background: linear-gradient(90deg, var(--p-well) 0%, var(--p-line) 50%, var(--p-well) 100%);
    background-size: 200% 100%;
    animation: ch-prem-shimmer 1.3s ease-in-out infinite;
}

@keyframes ch-prem-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

.ch-prem-card.is-annual [data-plan-show="monthly"],
.ch-prem-card.is-monthly [data-plan-show="annual"] {
    display: none;
}

.ch-prem-price-meta {
    min-height: 1.45em;
    margin: 0.35rem 0 1.2rem;
    font-size: 0.86rem;
    color: var(--p-mute);
}

.ch-prem-price-meta [data-premium-tax]:not(:empty)::before {
    content: ' ';
}

.ch-prem-status {
    margin: 0 0 1.1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--p-cta-line);
    border-radius: var(--p-radius-sm);
    background-color: var(--p-cta-wash);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--p-cta-ink);
}

.ch-prem-status.is-warning {
    border-color: rgba(245, 158, 11, 0.4);
    background-color: rgba(245, 158, 11, 0.09);
    color: var(--p-warn);
}

/* --- inclusions --- */

.ch-prem-list {
    display: grid;
    gap: 0.6rem;
    margin: 0 0 1.5rem;
    padding: 1.1rem 0 0;
    border-top: 1px dashed var(--p-line);
    list-style: none;
}

.ch-prem-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--p-ink);
}

.ch-prem-check {
    flex-shrink: 0;
    color: var(--p-cta);
}

.ch-prem-list .ch-prem-check {
    width: 20px;
    height: 20px;
    padding: 3px;
    border-radius: 50%;
    background-color: var(--p-cta-wash);
    color: var(--p-cta-ink);
}

.ch-prem-alert {
    margin: 0 0 0.9rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--p-stop-line);
    border-radius: var(--p-radius-sm);
    background-color: var(--p-stop-wash);
    color: var(--p-stop);
    font-size: 0.9rem;
    font-weight: 600;
}

.ch-prem-activating {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.9rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--p-cta-line);
    border-radius: var(--p-radius-sm);
    background-color: var(--p-cta-wash);
    color: var(--p-cta-ink);
    font-size: 0.9rem;
    font-weight: 700;
}

.ch-prem-activating[hidden] {
    display: none;
}

.ch-prem-activating .ch-prem-spinner {
    border-color: var(--p-cta-line);
    border-top-color: var(--p-cta-ink);
}

.ch-prem-fine {
    margin: 0.95rem 0 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--p-mute);
}

.ch-prem-fine a,
.ch-prem-qa p a {
    color: var(--ch-accent, #2563EB);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ==========================================================================
   5. FEATURE TILES
   ========================================================================== */

.ch-prem-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.ch-prem-tile {
    padding: 1.5rem 1.4rem 1.4rem;
    border: 1px solid var(--p-line);
    border-radius: var(--p-radius);
    background-color: var(--p-surface);
    box-shadow: var(--p-shadow);
    transition: border-color 0.25s, transform 0.3s var(--p-ease), box-shadow 0.3s var(--p-ease);
}

.ch-prem-tile:hover {
    border-color: var(--p-cta-line);
    transform: translateY(-3px);
    box-shadow: 0 18px 34px -22px rgba(15, 23, 42, 0.4);
}

.ch-prem-tile-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-bottom: 1rem;
    border-radius: 11px;
    background-color: var(--p-cta-wash);
    color: var(--p-cta-ink);
}

.ch-prem-tile-q {
    margin: 0 0 0.5rem;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--p-ink);
}

.ch-prem-tile-a {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--p-mute);
}

.ch-prem-tile-a strong,
.ch-prem-fact-a strong {
    color: var(--p-ink);
}

/* ==========================================================================
   6. STORE APPS (light card in light mode, deep surface in dark)
   ========================================================================== */

/* Light mode: white with an emerald glow (the free apps that are live) and a
   Premium-blue one (the membership that includes them), a hairline and the
   page shadow. Dark mode: the deep surface (section 13). It was the deep
   surface in both themes until 2026-10-04, when Adrian ruled out dark panels
   on a light page. */
.ch-prem-apps {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
    margin-top: 5.5rem;
    padding: 3rem;
    border: 1px solid var(--p-line);
    border-radius: 22px;
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(16, 185, 129, 0.11), transparent 70%),
        radial-gradient(520px 320px at 100% 100%, rgba(37, 99, 235, 0.11), transparent 70%),
        linear-gradient(180deg, #F8FAFC 0%, var(--p-surface) 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 30px 60px -40px rgba(30, 64, 175, 0.4);
    color: var(--p-ink);
    overflow: hidden;
}

.ch-prem-apps .ch-prem-h2 {
    color: var(--p-ink);
}

.ch-prem-apps-lead {
    margin: 1rem 0 0.8rem;
    font-size: 1.04rem;
    line-height: 1.65;
    color: #334155;
}

.ch-prem-apps-lead strong {
    color: #0F172A;
}

.ch-prem-apps-note {
    margin: 0 0 1.6rem;
    font-size: 0.86rem;
    line-height: 1.6;
    color: #475569;
}

.ch-prem-apps-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ch-prem-app {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin: 0;
    padding: 1rem 1.1rem;
    border: 1px solid var(--p-line);
    border-radius: 14px;
    background-color: var(--p-surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color 0.25s, transform 0.3s var(--p-ease);
}

.ch-prem-app:hover {
    border-color: rgba(37, 99, 235, 0.45);
    transform: translateX(3px);
}

.ch-prem-app-ico {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background-color: rgba(37, 99, 235, 0.1);
    color: #1D4ED8;
}

.ch-prem-app.is-live .ch-prem-app-ico {
    background-color: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.ch-prem-app-body {
    display: grid;
    gap: 0.25rem;
}

.ch-prem-app-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 800;
    color: #0F172A;
}

.ch-prem-app-chip {
    padding: 0.12rem 0.45rem;
    border: 1px solid rgba(245, 158, 11, 0.45);
    border-radius: 999px;
    font-family: var(--p-mono);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #92400E;
    background-color: #FEF3C7;
}

.ch-prem-app.is-live .ch-prem-app-chip {
    color: #065F46;
    border-color: rgba(16, 185, 129, 0.45);
    background-color: #D1FAE5;
}

.ch-prem-app-desc {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #475569;
}

/* ==========================================================================
   7. FREE VS PREMIUM TABLE
   ========================================================================== */

.ch-prem-table {
    border: 1px solid var(--p-line);
    border-radius: var(--p-radius);
    background-color: var(--p-surface);
    box-shadow: var(--p-shadow);
    overflow: hidden;
}

.ch-prem-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    border-top: 1px solid var(--p-line);
}

.ch-prem-row > span {
    padding: 0.85rem 1.2rem;
}

.ch-prem-row.is-head {
    border-top: 0;
    background-color: var(--p-well);
}

.ch-prem-row.is-head .ch-prem-col {
    gap: 0.5rem;
    font-family: var(--p-mono);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--p-mute-well);
}

.ch-prem-row.is-head .ch-prem-col.is-pro {
    color: var(--p-pro);
}

.ch-prem-group {
    padding: 1.1rem 1.2rem 0.45rem;
    border-top: 1px solid var(--p-line);
    font-family: var(--p-mono);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--p-cta-ink);
}

.ch-prem-group + .ch-prem-row {
    border-top-color: transparent;
}

.ch-prem-label {
    font-size: 0.94rem;
    line-height: 1.45;
    color: var(--p-ink);
}

.ch-prem-col {
    align-self: stretch;
    display: flex;
    align-items: center;
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--p-ink);
}

.ch-prem-col.is-pro {
    background-color: var(--p-pro-wash);
    color: var(--p-pro);
    border-left: 1px solid var(--p-pro-line);
}

.ch-prem-yes .ch-prem-check {
    width: 18px;
    height: 18px;
}

.ch-prem-col.is-pro .ch-prem-yes .ch-prem-check {
    color: var(--p-pro);
}

/* The dash is the only visible "not included" mark, so it is text that has
   to be read: muted ink, not the hairline color it used to share (1.48:1). */
.ch-prem-no {
    color: var(--p-mute);
    font-weight: 800;
}

.ch-prem-cta-row {
    display: flex;
    justify-content: center;
    margin-top: 1.8rem;
}

/* ==========================================================================
   8. BILLING FACTS
   ========================================================================== */

.ch-prem-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
}

.ch-prem-fact {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.35rem 1.35rem 1.25rem;
    border: 1px solid var(--p-line);
    border-radius: var(--p-radius);
    background-color: var(--p-surface);
}

.ch-prem-fact-ico {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background-color: var(--p-pro-wash);
    color: var(--p-pro);
    border: 1px solid var(--p-pro-line);
}

.ch-prem-fact-q {
    margin: 0.1rem 0 0.35rem;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--p-ink);
}

.ch-prem-fact-a {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--p-mute);
}

/* ==========================================================================
   9. FAQ
   ========================================================================== */

.ch-prem-faq-list {
    display: grid;
    gap: 0.7rem;
    max-width: 860px;
}

.ch-prem-qa {
    border: 1px solid var(--p-line);
    border-radius: 12px;
    background-color: var(--p-surface);
    transition: border-color 0.2s;
}

.ch-prem-qa[open] {
    border-color: var(--p-cta-line);
}

.ch-prem-qa summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1.2rem;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--p-ink);
    cursor: pointer;
    list-style: none;
}

.ch-prem-qa summary::-webkit-details-marker {
    display: none;
}

.ch-prem-qa summary:focus-visible {
    outline: 2px solid var(--p-cta);
    outline-offset: 2px;
    border-radius: 12px;
}

.ch-prem-qa-ico {
    position: relative;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--p-well);
}

.ch-prem-qa-ico::before,
.ch-prem-qa-ico::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 2px;
    border-radius: 2px;
    background-color: var(--p-ink);
    transform: translate(-50%, -50%);
    transition: transform 0.25s var(--p-ease);
}

.ch-prem-qa-ico::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.ch-prem-qa[open] .ch-prem-qa-ico {
    background-color: var(--p-cta-wash);
}

.ch-prem-qa[open] .ch-prem-qa-ico::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.ch-prem-qa p {
    margin: 0;
    padding: 0 1.2rem 1.15rem;
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--p-mute);
}

/* ==========================================================================
   10. CLOSING BAND
   ========================================================================== */

.ch-prem-close {
    margin-top: 5.5rem;
    padding: 3.2rem 2rem;
    border: 1px solid var(--p-cta-line);
    border-radius: 22px;
    background:
        radial-gradient(420px 200px at 50% 0%, rgba(16, 185, 129, 0.14), transparent 75%),
        var(--p-surface);
    text-align: center;
}

.ch-prem-close .ch-prem-h2 {
    max-width: 720px;
    margin: 0 auto;
}

.ch-prem-close-sub {
    margin: 0.9rem auto 1.7rem;
    font-size: 1rem;
    color: var(--p-mute);
}

/* ==========================================================================
   11. TOASTS (billing.js writes .ch-toast into [data-toast-stack])
   ========================================================================== */

.ch-prem-toasts {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    display: grid;
    gap: 0.5rem;
    max-width: min(380px, calc(100vw - 32px));
}

.ch-prem-toasts .ch-toast {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background-color: var(--p-deep);
    color: #F8FAFC;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 14px 30px -14px rgba(15, 23, 42, 0.6);
    transition: opacity 0.3s, transform 0.3s;
}

.ch-prem-toasts .ch-toast.is-error {
    background-color: var(--p-stop);
}

.ch-prem-toasts .ch-toast.is-leaving {
    opacity: 0;
    transform: translateY(6px);
}

/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
    .ch-prem-hero {
        grid-template-columns: 1fr;
        grid-template-areas:
            "copy"
            "card"
            "assure";
        grid-template-rows: auto;
        row-gap: 2rem;
        padding-top: 1.5rem;
    }
    .ch-prem-lead {
        margin-bottom: 0;
    }
    .ch-prem-card {
        max-width: 520px;
    }
    .ch-prem-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .ch-prem-apps {
        grid-template-columns: 1fr;
        padding: 2.4rem;
    }
}

@media (max-width: 680px) {
    .ch-prem-section,
    .ch-prem-apps,
    .ch-prem-close {
        margin-top: 3.8rem;
    }
    .ch-prem-lead {
        font-size: 1.05rem;
    }
    .ch-prem-card {
        max-width: none;
        padding: 1.6rem 1.25rem 1.35rem;
    }
    .ch-prem-price-amount {
        font-size: 2.5rem;
    }
    .ch-prem-tiles,
    .ch-prem-facts {
        grid-template-columns: 1fr;
    }
    .ch-prem-apps {
        padding: 1.8rem 1.25rem;
        border-radius: 18px;
    }
    .ch-prem-row {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr) minmax(0, 0.9fr);
    }
    .ch-prem-row > span {
        padding: 0.75rem 0.7rem;
    }
    .ch-prem-label,
    .ch-prem-col {
        font-size: 0.84rem;
    }
    .ch-prem-group {
        padding: 1rem 0.7rem 0.4rem;
    }
    .ch-prem .ch-prem-cta-row .ch-prem-btn,
    .ch-prem-close .ch-prem-btn,
    .ch-prem-apps .ch-prem-btn {
        width: 100%;
    }
    .ch-prem-close {
        padding: 2.4rem 1.25rem;
    }
}

/* ==========================================================================
   13. DARK
   ========================================================================== */

html[data-theme="dark"] .ch-prem {
    --p-surface:   #1E293B;
    --p-mute-well: var(--ch-text-muted, #94A3B8);
    --p-well:      #0F172A;
    --p-line:      #334155;
    --p-line-hi:   #475569;
    --p-cta-ink:   #34D399;
    --p-cta-wash:  rgba(16, 185, 129, 0.13);
    --p-cta-line:  rgba(52, 211, 153, 0.38);
    --p-pro:       #93C5FD;
    --p-pro-wash:  rgba(59, 130, 246, 0.10);
    --p-pro-line:  rgba(96, 165, 250, 0.30);
    --p-warn:      #FBBF24;
    --p-stop:      #FCA5A5;
    --p-stop-wash: rgba(239, 68, 68, 0.12);
    --p-stop-line: rgba(248, 113, 113, 0.38);
    --p-shadow:      0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px -18px rgba(0, 0, 0, 0.7);
    --p-shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35), 0 30px 60px -30px rgba(0, 0, 0, 0.85);
}

html[data-theme="dark"] .ch-prem-hero::before {
    background: radial-gradient(closest-side, rgba(16, 185, 129, 0.14), rgba(37, 99, 235, 0.10) 55%, transparent 72%);
}

html[data-theme="dark"] .ch-prem-toggle-opt.is-on,
html[data-theme="dark"] .ch-prem-toggle-opt:has(input:checked) {
    background-color: #334155;
    box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .ch-prem .ch-prem-btn[disabled] {
    background-color: #334155;
    color: #94A3B8;
}

html[data-theme="dark"] .ch-prem-toasts .ch-toast {
    background-color: #334155;
}

html[data-theme="dark"] .ch-prem-toasts .ch-toast.is-error {
    background-color: #B91C1C;
    color: #FFFFFF;
}

html[data-theme="dark"] .ch-prem-fine a,
html[data-theme="dark"] .ch-prem-qa p a {
    color: #60A5FA;
}

html[data-theme="dark"] .ch-prem-close {
    background:
        radial-gradient(420px 200px at 50% 0%, rgba(16, 185, 129, 0.16), transparent 75%),
        var(--p-surface);
}

/* Store apps: the deep surface, dark mode only. It equals the dark page
   background, so it needs an edge. Every colour the light rules set is
   restated here. */
html[data-theme="dark"] .ch-prem-apps {
    border: 1px solid #1E293B;
    background:
        radial-gradient(600px 300px at 0% 0%, rgba(16, 185, 129, 0.16), transparent 70%),
        radial-gradient(520px 320px at 100% 100%, rgba(37, 99, 235, 0.18), transparent 70%),
        linear-gradient(160deg, #101B2E 0%, var(--p-deep) 60%, #0A1222 100%);
    box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.9);
    color: var(--p-deep-ink);
}

html[data-theme="dark"] .ch-prem-apps .ch-prem-h2 { color: #F8FAFC; }
html[data-theme="dark"] .ch-prem-apps-lead { color: #CBD5E1; }
html[data-theme="dark"] .ch-prem-apps-lead strong { color: #FFFFFF; }
html[data-theme="dark"] .ch-prem-apps-note { color: var(--p-deep-mute); }
html[data-theme="dark"] .ch-prem-kicker.is-deep { color: #34D399; }

html[data-theme="dark"] .ch-prem-app {
    border-color: var(--p-deep-line);
    background-color: rgba(30, 41, 59, 0.72);
    box-shadow: none;
}

html[data-theme="dark"] .ch-prem-app:hover { border-color: rgba(52, 211, 153, 0.5); }

html[data-theme="dark"] .ch-prem-app-ico {
    background-color: rgba(37, 99, 235, 0.18);
    color: #93C5FD;
}

html[data-theme="dark"] .ch-prem-app.is-live .ch-prem-app-ico {
    background-color: rgba(16, 185, 129, 0.18);
    color: #34D399;
}

html[data-theme="dark"] .ch-prem-app-name { color: #F8FAFC; }
html[data-theme="dark"] .ch-prem-app-desc { color: var(--p-deep-mute); }

html[data-theme="dark"] .ch-prem-app-chip {
    color: #FCD34D;
    border-color: rgba(252, 211, 77, 0.35);
    background-color: rgba(245, 158, 11, 0.1);
}

html[data-theme="dark"] .ch-prem-app.is-live .ch-prem-app-chip {
    color: #34D399;
    border-color: rgba(52, 211, 153, 0.4);
    background-color: rgba(16, 185, 129, 0.12);
}

html[data-theme="dark"] .ch-prem-row.is-head {
    background-color: #172033;
}

/* ==========================================================================
   14. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .ch-prem *,
    .ch-prem *::before,
    .ch-prem *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .ch-prem-tile:hover,
    .ch-prem-app:hover,
    .ch-prem .ch-prem-btn:hover {
        transform: none;
    }
}
