/* subscriptions/static/subscriptions/css/catalog.css
   Plans catalogue (public /plans/, profession pages, provider plans page). Mobile first, RTL via logical properties,
   light/dark via [data-bs-theme]. Colours are tokens; never the theme's near-white --bs-secondary-color. */

.cx {
    --cx-bg: #ffffff;
    --cx-surface: #f6f7fb;
    --cx-card: #ffffff;
    --cx-text: #1d2433;
    --cx-muted: #5b6475;          /* 5.9:1 on white */
    --cx-line: #e3e6ee;
    --cx-brand: #2457d6;
    --cx-brand-ink: #ffffff;
    --cx-brand-soft: #e9efff;
    --cx-accent: #0f8a5f;
    --cx-accent-soft: #e3f6ee;
    --cx-warn: #a15c00;
    --cx-warn-soft: #fff4e2;
    --cx-radius: 16px;
    --cx-radius-sm: 10px;
    --cx-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
    --cx-focus: 0 0 0 3px rgba(36, 87, 214, .35);
    --cx-safe-bottom: env(safe-area-inset-bottom, 0px);
    color: var(--cx-text);
    background: var(--cx-bg);
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
}

[data-bs-theme="dark"] .cx {
    --cx-bg: #0f1420;
    --cx-surface: #161d2c;
    --cx-card: #1a2233;
    --cx-text: #eef1f7;
    --cx-muted: #a9b2c4;
    --cx-line: #2b3548;
    --cx-brand: #6d95ff;
    --cx-brand-ink: #0b1020;
    --cx-brand-soft: #1f2b4d;
    --cx-accent: #4fd1a1;
    --cx-accent-soft: #143a2e;
    --cx-warn: #ffc46b;
    --cx-warn-soft: #3a2a12;
    --cx-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
}

.cx *, .cx *::before, .cx *::after { box-sizing: border-box; }
.cx .text-muted, .cx .cx-muted { color: var(--cx-muted) !important; }
.cx a { color: var(--cx-brand); }
.cx :focus-visible { outline: none; box-shadow: var(--cx-focus); border-radius: var(--cx-radius-sm); }
.cx input, .cx select, .cx textarea, .cx button { font-size: 16px; } /* no iOS zoom on focus */
.cx-section { padding-block: 2.25rem; padding-inline: 16px; }
.cx-wrap { max-width: 1180px; margin-inline: auto; }
.cx-h1 { font-size: clamp(1.6rem, 4.6vw, 2.6rem); font-weight: 800; line-height: 1.25; margin: 0 0 .6rem; }
.cx-h2 { font-size: clamp(1.25rem, 3.4vw, 1.8rem); font-weight: 800; margin: 0 0 .4rem; }
.cx-lead { font-size: 1.05rem; color: var(--cx-muted); margin: 0 auto; max-width: 46rem; }
.cx-center { text-align: center; }

/* ---------------------------------------------------------------- hero + cycle switch */
.cx-hero { padding-block: 2.5rem 1.25rem; text-align: center; background:
    radial-gradient(1200px 400px at 50% -120px, var(--cx-brand-soft), transparent 70%); }
.cx-switch { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-top: 1.25rem;
    background: var(--cx-surface); border: 1px solid var(--cx-line); border-radius: 999px; }
.cx-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cx-switch label { min-height: 44px; min-width: 128px; display: inline-flex; align-items: center;
    justify-content: center; gap: .4rem; padding: 0 1rem; border-radius: 999px; font-weight: 700; cursor: pointer;
    color: var(--cx-muted); transition: background .15s, color .15s; user-select: none; }
.cx-switch input:checked + label { background: var(--cx-brand); color: var(--cx-brand-ink); }
.cx-switch input:focus-visible + label { box-shadow: var(--cx-focus); }
.cx-badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 800;
    background: var(--cx-accent-soft); color: var(--cx-accent); white-space: nowrap; }
.cx-switch input:checked + label .cx-badge { background: rgba(255, 255, 255, .22); color: inherit; }

/* ---------------------------------------------------------------- founding banner */
.cx-founding { display: flex; gap: .75rem; align-items: center; justify-content: center; flex-wrap: wrap;
    margin: 1rem auto 0; padding: .75rem 1rem; max-width: 46rem; border-radius: var(--cx-radius-sm);
    background: var(--cx-warn-soft); color: var(--cx-warn); font-weight: 600; }
.cx-founding code { background: transparent; color: inherit; font-weight: 800; }

/* ---------------------------------------------------------------- plan cards */
.cx-plans { display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 12px; overflow-x: auto;
    scroll-snap-type: x mandatory; scroll-padding-inline: 16px; padding: 4px 16px 16px; margin-inline: -16px;
    overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cx-plans::-webkit-scrollbar { display: none; }
.cx-plans > * { scroll-snap-align: center; }
.cx-dots { display: flex; justify-content: center; gap: 6px; }
.cx-dots button { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; display: grid;
    place-items: center; }
.cx-dots button::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cx-line); }
.cx-dots button[aria-current="true"]::after { background: var(--cx-brand); width: 20px; border-radius: 4px; }

.cx-card { position: relative; display: flex; flex-direction: column; gap: .85rem; padding: 1.25rem;
    background: var(--cx-card); border: 1px solid var(--cx-line); border-radius: var(--cx-radius);
    box-shadow: var(--cx-shadow); min-width: 0; }
.cx-card.is-featured { border: 2px solid var(--cx-brand); }
.cx-card.is-current { border: 2px solid var(--cx-accent); }
.cx-ribbon { position: absolute; inset-block-start: -12px; inset-inline-start: 1.25rem; padding: .2rem .7rem;
    border-radius: 999px; background: var(--cx-brand); color: var(--cx-brand-ink); font-size: .78rem;
    font-weight: 800; }
.cx-card.is-current .cx-ribbon { background: var(--cx-accent); }
.cx-card h3 { font-size: 1.2rem; font-weight: 800; margin: 0; }
.cx-card .cx-for { color: var(--cx-muted); font-size: .92rem; margin: 0; min-height: 2.6em; }
.cx-price { display: flex; flex-direction: column; gap: .15rem; min-height: 4.4rem; }
.cx-price .cx-amount { font-size: 1.75rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cx-price .cx-per { font-size: .9rem; color: var(--cx-muted); font-weight: 600; }
.cx-price .cx-note { font-size: .85rem; color: var(--cx-muted); }
[data-cycle="monthly"] .cx-when-annual, [data-cycle="annually"] .cx-when-monthly { display: none !important; }
.cx-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px;
    padding: 0 1.1rem; border-radius: 12px; border: 2px solid var(--cx-brand); background: var(--cx-brand);
    color: var(--cx-brand-ink) !important; font-weight: 800; text-decoration: none; width: 100%;
    cursor: pointer; transition: transform .1s, filter .15s; }
.cx-btn:hover { filter: brightness(1.06); }
.cx-btn:active { transform: scale(.98); }
.cx-btn.is-ghost { background: transparent; color: var(--cx-brand) !important; }
.cx-btn.is-current { background: var(--cx-accent-soft); border-color: var(--cx-accent); color: var(--cx-accent) !important; }
.cx-btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.cx-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .95rem; }
.cx-list li { display: flex; gap: .5rem; align-items: flex-start; }
.cx-list li::before { content: ''; flex: 0 0 18px; height: 18px; margin-top: 2px; border-radius: 50%;
    background: var(--cx-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%230f8a5f' d='M6.2 11.3 3 8.1l1.1-1.1 2.1 2.1 5.7-5.7L13 4.5z'/%3E%3C/svg%3E") center/12px no-repeat; }
.cx-limits { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .75rem; font-size: .88rem;
    padding: .7rem .8rem; background: var(--cx-surface); border-radius: var(--cx-radius-sm); }
.cx-limits b { font-variant-numeric: tabular-nums; }

/* vertical package selector (segmented chips inside a card) */
.cx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cx-chips button { min-height: 40px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--cx-line);
    background: var(--cx-surface); color: var(--cx-text); font-weight: 700; font-size: .9rem; cursor: pointer; }
.cx-chips button[aria-pressed="true"] { background: var(--cx-brand-soft); border-color: var(--cx-brand);
    color: var(--cx-brand); }
.cx-pkg[hidden] { display: none !important; }

/* enterprise strip */
.cx-enterprise { display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem; margin-top: 1rem;
    border-radius: var(--cx-radius); background: var(--cx-surface); border: 1px dashed var(--cx-line); }

/* ---------------------------------------------------------------- profession links */
.cx-industries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cx-industries a { display: flex; align-items: center; gap: .5rem; min-height: 52px; padding: .5rem .75rem;
    border-radius: var(--cx-radius-sm); background: var(--cx-card); border: 1px solid var(--cx-line);
    color: var(--cx-text); text-decoration: none; font-weight: 700; font-size: .92rem; }
.cx-industries i { color: var(--cx-brand); font-size: 1.2rem; }

/* ---------------------------------------------------------------- trade showcase (_showcase.html) */
.cx-sc-chips { justify-content: center; margin-bottom: 1rem; }
.cx-sc-chips button i { color: var(--cx-brand); }
.cx-sc-panel { display: grid; gap: 1.25rem; align-items: center; padding: 1.25rem; border-radius: var(--cx-radius);
    background: var(--cx-card); border: 1px solid var(--cx-line); box-shadow: var(--cx-shadow); }
.cx-sc-panel[hidden] { display: none !important; }

/* the phone: colours of the trade's card design (custom properties set on the element) */
.cx-sc-phone { justify-self: center; width: 210px; padding: 9px; border-radius: 30px; background: #11151c;
    box-shadow: 0 18px 40px rgba(16, 24, 40, .22); }
.cx-sc-screen { min-height: 360px; border-radius: 22px; overflow: hidden; background: var(--sc-bg);
    display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.cx-sc-hero { height: 110px; display: flex; align-items: center; justify-content: center; font-size: 2.4rem;
    color: #fff; background: linear-gradient(150deg, var(--sc-accent), color-mix(in srgb, var(--sc-accent) 55%, #000)); }
.cx-sc-name { margin: -26px 12px 0; padding: 10px; border-radius: 12px; background: var(--sc-surface);
    color: #1d2433; font-weight: 800; font-size: .82rem; text-align: center; box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
.cx-sc-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0 12px; }
.cx-sc-bar span { height: 30px; border-radius: 9px; background: color-mix(in srgb, var(--sc-accent) 14%, var(--sc-surface)); }
.cx-sc-bar .is-main { background: var(--sc-accent); }
.cx-sc-row { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 8px; border-radius: 10px;
    background: var(--sc-surface); color: #1d2433; font-size: .72rem; font-weight: 700; }
.cx-sc-dot { flex: 0 0 22px; height: 22px; border-radius: 7px; background: color-mix(in srgb, var(--sc-accent) 22%, var(--sc-surface)); }
.cx-sc-row-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-sc-go { flex: 0 0 30px; height: 14px; border-radius: 999px; background: var(--sc-accent); }

.cx-sc-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 .35rem; }
.cx-sc-design { display: flex; gap: .45rem; align-items: baseline; font-size: .9rem; margin-bottom: .9rem; }
.cx-sc-design i, .cx-sc-tools i { color: var(--cx-brand); }
.cx-sc-label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
    color: var(--cx-muted); margin-bottom: .4rem; }
.cx-sc-tools { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 6px; }
.cx-sc-tools li { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .7rem; border-radius: 999px;
    background: var(--cx-surface); border: 1px solid var(--cx-line); font-weight: 700; font-size: .88rem; }
.cx-sc-tools li.is-exclusive { background: var(--cx-brand-soft); border-color: var(--cx-brand); }
.cx-sc-only { font-size: .72rem; font-weight: 700; color: var(--cx-brand); }
.cx-sc-words { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .75rem; }
.cx-sc-words span { padding: .25rem .6rem; border-radius: 6px; background: var(--cx-accent-soft); color: var(--cx-accent);
    font-weight: 700; font-size: .85rem; }
.cx-sc-note { font-size: .85rem; color: var(--cx-muted); margin-bottom: 1rem; }
.cx-sc-cta { display: flex; flex-wrap: wrap; gap: .5rem; }

@media (min-width: 768px) {
    .cx-sc-panel { grid-template-columns: 240px minmax(0, 1fr); padding: 1.75rem; gap: 2rem; }
}

/* ---------------------------------------------------------------- add-ons */
.cx-addons { display: grid; gap: 1rem; }
.cx-addon-group h3 { font-size: 1rem; font-weight: 800; margin: 0 0 .5rem; }
.cx-addon { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: .8rem 1rem;
    border: 1px solid var(--cx-line); border-radius: var(--cx-radius-sm); background: var(--cx-card); }
.cx-addon + .cx-addon { margin-top: 6px; }
.cx-addon .cx-addon-name { font-weight: 700; }
.cx-addon .cx-addon-desc { font-size: .86rem; color: var(--cx-muted); }
.cx-addon .cx-addon-price { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums;
    text-align: end; }

/* ---------------------------------------------------------------- comparison: accordion on phones, table above */
.cx-compare-acc details { border: 1px solid var(--cx-line); border-radius: var(--cx-radius-sm); background: var(--cx-card); }
.cx-compare-acc details + details { margin-top: 6px; }
.cx-compare-acc summary { min-height: 48px; display: flex; align-items: center; padding: 0 1rem; font-weight: 700;
    cursor: pointer; list-style: none; }
.cx-compare-acc summary::-webkit-details-marker { display: none; }
.cx-compare-acc summary::after { content: '+'; margin-inline-start: auto; font-size: 1.3rem; color: var(--cx-muted); }
.cx-compare-acc details[open] summary::after { content: '−'; }
.cx-compare-acc ul { list-style: none; margin: 0; padding: 0 1rem .75rem; display: grid; gap: .3rem; }
.cx-compare-acc li { display: flex; justify-content: space-between; gap: .5rem; font-size: .92rem; }
.cx-yes { color: var(--cx-accent); font-weight: 800; }
.cx-no { color: var(--cx-muted); }
.cx-compare-table { display: none; }

/* ---------------------------------------------------------------- guarantees */
.cx-guarantees { display: grid; gap: 10px; }
.cx-guarantee { display: flex; gap: .75rem; align-items: flex-start; padding: 1rem; border-radius: var(--cx-radius-sm);
    background: var(--cx-surface); }
.cx-guarantee i { font-size: 1.5rem; color: var(--cx-accent); }
.cx-guarantee b { display: block; }
.cx-guarantee span { color: var(--cx-muted); font-size: .92rem; }

/* ---------------------------------------------------------------- FAQ */
.cx-faq details { border-bottom: 1px solid var(--cx-line); }
.cx-faq summary { min-height: 52px; display: flex; align-items: center; gap: .5rem; padding: .6rem 0;
    font-weight: 700; cursor: pointer; list-style: none; }
.cx-faq summary::-webkit-details-marker { display: none; }
.cx-faq summary::after { content: '+'; margin-inline-start: auto; font-size: 1.35rem; color: var(--cx-muted); }
.cx-faq details[open] summary::after { content: '−'; }
.cx-faq p { margin: 0 0 1rem; color: var(--cx-muted); line-height: 1.8; }

/* ---------------------------------------------------------------- sticky bottom CTA (phones) */
.cx-sticky { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 1020; display: flex; gap: .75rem;
    align-items: center; padding: .6rem 16px calc(.6rem + var(--cx-safe-bottom));
    background: color-mix(in srgb, var(--cx-card) 94%, transparent); backdrop-filter: blur(10px);
    border-top: 1px solid var(--cx-line); transform: translateY(110%); transition: transform .2s ease; }
.cx-sticky.is-visible { transform: none; }
.cx-sticky .cx-sticky-info { flex: 1; min-width: 0; line-height: 1.25; }
.cx-sticky .cx-sticky-info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-sticky .cx-sticky-info span { font-size: .85rem; color: var(--cx-muted); }
.cx-sticky .cx-btn { width: auto; flex: 0 0 auto; }
.cx-has-sticky { padding-bottom: calc(80px + var(--cx-safe-bottom)); }

/* ---------------------------------------------------------------- skeleton */
.cx-skeleton { background: linear-gradient(90deg, var(--cx-surface), var(--cx-line), var(--cx-surface));
    background-size: 200% 100%; animation: cx-shimmer 1.2s infinite; border-radius: 8px; min-height: 1em; }
@keyframes cx-shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- profession page */
.cx-pains { display: grid; gap: 8px; list-style: none; padding: 0; margin: 0; }
.cx-pains li { padding: .75rem 1rem; border-radius: var(--cx-radius-sm); background: var(--cx-warn-soft);
    color: var(--cx-warn); font-weight: 600; }
.cx-features { display: grid; gap: 10px; }
.cx-feature { padding: 1rem; border-radius: var(--cx-radius-sm); border: 1px solid var(--cx-line); background: var(--cx-card); }
.cx-feature b { display: block; margin-bottom: .2rem; }
.cx-feature span { color: var(--cx-muted); font-size: .94rem; }

/* ---------------------------------------------------------------- larger screens */
@media (min-width: 576px) {
    .cx-plans { grid-auto-columns: 62%; }
    .cx-industries { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cx-guarantees { grid-template-columns: repeat(3, 1fr); }
    .cx-features { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .cx-section { padding-block: 3.5rem; }
    .cx-plans { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible;
        margin: 0; padding: 12px 0 0; }
    .cx-dots { display: none; }
    .cx-sticky { display: none; }
    .cx-has-sticky { padding-bottom: 0; }
    .cx-enterprise { flex-direction: row; align-items: center; justify-content: space-between; }
    .cx-enterprise .cx-btn { width: auto; }
    .cx-addons { grid-template-columns: repeat(2, 1fr); }
    .cx-compare-acc { display: none; }
    .cx-compare-table { display: block; overflow-x: auto; border: 1px solid var(--cx-line); border-radius: var(--cx-radius); }
    .cx-compare-table table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
    .cx-compare-table th, .cx-compare-table td { padding: .65rem .75rem; text-align: center;
        border-bottom: 1px solid var(--cx-line); white-space: nowrap; }
    .cx-compare-table thead th { position: sticky; top: 0; z-index: 2; background: var(--cx-surface); font-weight: 800; }
    .cx-compare-table tbody th { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--cx-card);
        text-align: start; font-weight: 600; }
    .cx-compare-table .is-featured { background: var(--cx-brand-soft); }
    .cx-features { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
    .cx *, .cx-sticky { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
