/* ─────────────────────────────────────────────────────────────────────────────
   SuperExam design system (2026) — loaded on every page, before header/footer/
   page CSS. Tokens live on :root so any template can use them.

   Tokens      --sx-*  colour, type, radius, motion, layout (below)
   Layout      .sx-wrap                 1240px container with responsive gutter
               .sx-frame [--dark]       thin vertical guides with nodes (absolute;
                                        parent needs position:relative)
   Type        .sx-eyebrow              uppercase kicker with a lime dot
               .sx-label                small uppercase column / group label
               .sx-title                Anton display heading (clamp sizes)
   Actions     .sx-btn                  pill button base (44px)
                 --main                 dark violet CTA; lime dot → chevron on hover
                                        (inner: superexam_cta_badge())
                 --main.sx-btn--accent  lime CTA for dark backgrounds
                 --primary / --ghost / --glass / --sm
   Surfaces    .sx-ring > .sx-ring__inner   double-frame card (stat cards style)
   Motion      cubic-bezier var(--sx-ease); everything respects reduced motion.
   ───────────────────────────────────────────────────────────────────────────── */

:root {
    --sx-ink: var(--body-text, #232323);
    --sx-muted: #666b78;
    --sx-line: #e6e8f1;
    --sx-canvas: #f8f8fa;
    --sx-soft: #f5f6fb;
    --sx-tint: #eef0fa;
    --sx-brand: var(--main-lavanda, #655899);
    --sx-brand-mid: #5b4e93;
    --sx-brand-dark: #52477f;
    --sx-brand-deep: #2f2753;
    --sx-lime: var(--main-lime, #cbdc2c);
    --sx-badge-bg: var(--second-pale, #daddf5);
    --sx-soon-bg: #fff3e3;
    --sx-soon-ink: #8a5300;

    --sx-font-title: var(--title-font, 'Anton', sans-serif);
    --sx-font-body: var(--second-font, 'Helvetica Neue', Arial, sans-serif);

    --sx-radius: 18px;
    --sx-radius-lg: 28px;
    --sx-ease: cubic-bezier(.2, .7, .2, 1);

    --sx-wrap: 1240px;
    --sx-gutter: 24px;
    --sx-bar-h: 74px;
}

@media (max-width: 1199px) { :root { --sx-bar-h: 64px; } }
@media (max-width: 640px) { :root { --sx-gutter: 16px; } }

/* ── Layout ───────────────────────────────────────────────────────────────── */

.sx-wrap { box-sizing: border-box; width: 100%; max-width: var(--sx-wrap); margin-inline: auto; padding-inline: var(--sx-gutter); }

.sx-frame {
    --sx-frame-line: rgba(35, 28, 80, .08);
    --sx-frame-node: rgba(35, 28, 80, .22);
    position: absolute;
    inset: 0 max(var(--sx-gutter), calc((100% - var(--sx-wrap)) / 2));
    z-index: 0;
    border-inline: 1px solid var(--sx-frame-line);
    pointer-events: none;
}

.sx-frame--dark { --sx-frame-line: rgba(255, 255, 255, .12); --sx-frame-node: rgba(255, 255, 255, .4); }

.sx-frame::before,
.sx-frame::after {
    content: '';
    position: absolute;
    left: -4px;
    right: -4px;
    height: 7px;
    background:
        radial-gradient(circle, var(--sx-frame-node) 0 3px, transparent 3.5px) left center / 7px 7px no-repeat,
        radial-gradient(circle, var(--sx-frame-node) 0 3px, transparent 3.5px) right center / 7px 7px no-repeat;
}

.sx-frame::before { top: 32px; }
.sx-frame::after { bottom: 32px; }

@media (max-width: 640px) { .sx-frame { display: none; } }

/* ── Type ─────────────────────────────────────────────────────────────────── */

.sx-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    color: var(--sx-brand);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.sx-eyebrow::before { content: ''; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--sx-lime); box-shadow: 0 0 0 4px rgba(203, 220, 44, .25); }

.sx-label { margin: 0 0 18px; color: var(--sx-muted); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; line-height: 1.3; text-transform: uppercase; }

.sx-title { margin: 0; font-family: var(--sx-font-title); font-size: clamp(32px, 4vw, 56px); font-weight: 400; line-height: 1.04; text-wrap: balance; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.sx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: 1.5px solid transparent;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s var(--sx-ease), box-shadow .2s ease;
}

.sx-btn--primary { background: var(--sx-brand); color: #fff !important; box-shadow: 0 8px 18px -10px rgba(101, 88, 153, .8); }
.sx-btn--primary:hover { background: var(--sx-brand-dark); transform: translateY(-1px); }
.sx-btn--ghost { border-color: #d7d9e6; background: #fff; color: var(--sx-ink) !important; }
.sx-btn--ghost:hover { border-color: var(--sx-brand); color: var(--sx-brand) !important; }
.sx-btn--glass { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff !important; }
.sx-btn--glass:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .14); }
.sx-btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }

/* Main CTA. Colours are local custom properties so variants stay one-liners. */
.sx-btn--main {
    --_bg: linear-gradient(180deg, var(--sx-brand-mid) 0%, var(--sx-brand-deep) 100%);
    --_fg: #fff;
    --_dot: var(--sx-lime);
    --_badge: var(--sx-lime);
    --_chev: var(--sx-brand-deep);
    --_shadow: rgba(47, 39, 83, .85);

    gap: 12px;
    padding: 0 13px 0 22px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: var(--_bg);
    color: var(--_fg) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 22px -12px var(--_shadow);
}

.sx-btn--main.sx-btn--accent {
    --_bg: linear-gradient(180deg, #d9e84f 0%, #bfcf1d 100%);
    --_fg: var(--sx-ink);
    --_dot: var(--sx-brand-deep);
    --_badge: var(--sx-brand-deep);
    --_chev: var(--sx-lime);
    --_shadow: rgba(160, 175, 20, .7);
    border-color: rgba(0, 0, 0, .06);
}

/* Orange variant (header "Explore Study Resources"): white on #c9500a = 4.5:1. */
.sx-btn--main.sx-btn--orange {
    --_bg: linear-gradient(180deg, #c9500a 0%, #ad3f04 100%);
    --_dot: #fff;
    --_badge: #fff;
    --_chev: #ad3f04;
    --_shadow: rgba(173, 63, 4, .6);
}

/* Two-line label: main text + small sub-label. */
.sx-btn--two { height: auto; min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
.sx-btn--two .sx-btn__text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.sx-btn__sub { display: block; font-size: 11px; font-weight: 500; opacity: .92; }

.sx-btn__badge { position: relative; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: transparent; transition: background-color .3s ease; }

.sx-btn__dot,
.sx-btn__chevron { position: absolute; top: 50%; left: 50%; transition: opacity .3s ease, transform .3s var(--sx-ease); }

.sx-btn__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--_dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_dot) 22%, transparent); transform: translate(-50%, -50%); }
.sx-btn__chevron { width: 16px; height: 16px; color: var(--_chev); opacity: 0; transform: translate(-50%, -50%) scale(0); }

.sx-btn--main:focus-visible { outline: 3px solid var(--sx-lime); outline-offset: 3px; }
.sx-btn--main:focus-visible .sx-btn__badge { background: var(--_badge); }
.sx-btn--main:focus-visible .sx-btn__dot { opacity: 0; transform: translate(-50%, -50%) scale(0); }
.sx-btn--main:focus-visible .sx-btn__chevron { opacity: 1; transform: translate(-50%, -50%) scale(1); }

@media (hover: hover) {
    .sx-btn--main:hover .sx-btn__badge { background: var(--_badge); }
    .sx-btn--main:hover .sx-btn__dot { opacity: 0; transform: translate(-50%, -50%) scale(0); }
    .sx-btn--main:hover .sx-btn__chevron { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ── Surfaces ─────────────────────────────────────────────────────────────── */

.sx-ring { padding: 10px; border: 1px solid rgba(35, 28, 80, .06); border-radius: calc(var(--sx-radius) + 8px); background: rgba(35, 28, 80, .025); }
.sx-ring__inner { border-radius: var(--sx-radius); background: #fff; box-shadow: 0 1px 2px rgba(35, 28, 80, .05), 0 24px 48px -36px rgba(35, 28, 80, .35); }

@media (prefers-reduced-motion: reduce) {
    .sx-btn, .sx-btn__badge, .sx-btn__dot, .sx-btn__chevron { transition: none; }
}

/* ── Select (assets/js/sx-select.js) ──────────────────────────────────────────
   One dropdown for the whole site: every CF7 <select> and <select data-sx-select>.
   Same look as the SQE Planner select (sqe-planner/assets/css/survey.css). */

.sx-sel { position: relative; }
.sx-sel__native { position: absolute !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; overflow: hidden; clip: rect(0 0 0 0); border: 0 !important; opacity: 0; pointer-events: none; }

.sx-sel__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 0 10px 0 16px;
    border: 1px solid #d7d9e6;
    border-radius: 14px;
    background: var(--sx-soft);
    color: var(--sx-ink);
    font: inherit;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.sx-sel__trigger.is-empty { color: #8b8fa3; font-weight: 400; }
.sx-sel__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-sel__trigger:hover { border-color: #b9bcd3; }
.sx-sel.is-open .sx-sel__trigger,
.sx-sel__trigger:focus-visible { border-color: var(--sx-brand); background: #fff; outline: none; box-shadow: 0 0 0 4px rgba(101, 88, 153, .16); }
.sx-sel.is-invalid .sx-sel__trigger { border-color: #c2410c; background: #fff7f3; }

.sx-sel__chev { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--sx-tint); color: var(--sx-brand-deep); transition: transform .25s var(--sx-ease), background-color .2s ease; }
.sx-sel.is-open .sx-sel__chev { background: var(--sx-lime); transform: rotate(180deg); }

.sx-sel__list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 296px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    border: 1px solid var(--sx-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(35, 28, 80, .06), 0 30px 60px -30px rgba(35, 28, 80, .5);
    list-style: none;
    outline: none;
    animation: sx-sel-in .18s var(--sx-ease);
}
.sx-sel__list[hidden] { display: none; }

.sx-sel__opt {
    position: relative;
    margin: 0;
    padding: 12px 40px 12px 14px;
    border-radius: 12px;
    color: var(--sx-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    cursor: pointer;
}
.sx-sel__opt::before { content: none; }
.sx-sel__opt.is-active { background: var(--sx-tint); }
.sx-sel__opt.is-selected { color: var(--sx-brand-deep); }
.sx-sel__opt.is-selected::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--sx-lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f2753' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
    transform: translateY(-50%);
}

@keyframes sx-sel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sx-sel__trigger, .sx-sel__chev { transition: none; } .sx-sel__list { animation: none; } }

/* ── FAQ section (site-wide, inc/faq.php) ─────────────────────────────────────
   One FAQ look for every page, modelled on the home page FAQ (.hb-faq): heading
   column (sticky on desktop) + the animated .faq-accordion (base.css / base.js). */

.sx-faq { position: relative; padding: clamp(56px, 7vw, 88px) 0; scroll-margin-top: calc(var(--sx-bar-h, 74px) + 24px); }
.sx-faq--tint { background: var(--sx-canvas); }
.sx-faq__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.sx-faq__head { position: sticky; top: calc(var(--sx-bar-h, 74px) + 24px); text-align: left; }
.sx-faq .sx-faq__title { margin: 0 0 14px; color: var(--sx-ink) !important; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; text-transform: none; }
.sx-faq__intro { max-width: 520px; color: var(--sx-muted); font-size: 17.5px; line-height: 1.6; }
.sx-faq__intro p { margin: 0 0 10px; }
.sx-faq__intro a { color: var(--sx-brand) !important; font-weight: 700; }
.sx-faq__list .faq-accordion-section { margin: 0; }
.sx-faq--stack .sx-faq__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.sx-faq--stack .sx-faq__head { position: static; }
.sx-faq--stack .sx-faq__title { font-size: clamp(28px, 3vw, 38px); }

/* Accordion details shared by every FAQ (base.css holds the core look). */
.faq-accordion .faq-item__q-text { font-family: inherit; text-transform: none; letter-spacing: 0; }
.faq-accordion .faq-item__a > * + * { margin-top: 10px; }
.faq-accordion .faq-item__a :is(ul, ol) { margin: 0; padding-left: 22px; }
.faq-accordion .faq-item__a li { margin: 0 0 6px; padding: 0; }
.faq-accordion .faq-item__a li::before { content: none; }
.faq-accordion .faq-item__a a { color: var(--sx-brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* Collapsed answers are not focusable (links inside stay out of the tab order). */
.faq-accordion .faq-item:not(.is-open) .faq-item__a-inner { visibility: hidden; transition: visibility 0s .3s; }
.faq-accordion .faq-item.is-open .faq-item__a-inner { visibility: visible; }

@media (max-width: 980px) {
    .sx-faq__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .sx-faq__head { position: static; }
}

@media (prefers-reduced-motion: reduce) {
    .faq-accordion .faq-item__a-wrap, .faq-accordion .faq-item__icon::before, .faq-accordion .faq-item__icon::after { transition: none; }
}
.sx-faq__note { margin-top: 18px; font-size: 15.5px; }
.sx-faq__action { margin: 22px 0 0; }

/* Yoast FAQ block (in post/page content) — same card look as .faq-accordion;
   Yoast prints its own FAQPage schema for the block. */
body .wp-block-yoast-faq-block.schema-faq { display: flex; flex-direction: column; gap: 12px; margin: 24px 0; }
body .wp-block-yoast-faq-block .schema-faq-section { margin: 0; padding: 0; overflow: hidden; border: 1px solid #e4e4ea; border-radius: 12px; background: #fff; }
body .wp-block-yoast-faq-block.schema-faq .schema-faq-question { display: block; margin: 0; padding: 18px 20px 10px; background: transparent; color: var(--sx-ink, #2a2a2a); font-family: var(--second-font, 'Helvetica Neue', sans-serif); font-size: 17px; font-weight: 600; line-height: 1.4; }
body .wp-block-yoast-faq-block.schema-faq .schema-faq-question:hover,
body .wp-block-yoast-faq-block.schema-faq .schema-faq-question:focus { background: transparent; color: var(--sx-ink, #2a2a2a); }
body .wp-block-yoast-faq-block .schema-faq-answer { margin: 0; padding: 0 20px 18px; color: #6b6b6b; font-size: 15.5px; line-height: 1.6; }
@media (max-width: 640px) {
    body .wp-block-yoast-faq-block.schema-faq .schema-faq-question { padding: 16px 16px 8px; font-size: 16px; }
    body .wp-block-yoast-faq-block .schema-faq-answer { padding: 0 16px 16px; }
}


/* ── Content tables (inc/tables.php) ──────────────────────────────────────────
   Table layout while the column is wide enough; rows become labelled cards
   below a container width that depends on the table's weight (stack-sm|md|lg).
   Overrides the older per-template table rules (.sxg/.sxbl/.sxl prose). */

.sx-table { container: sxt / inline-size; margin: 28px 0; padding: 0; }
.sx-table__scroll {
    overflow-x: auto;
    border: 1px solid var(--sx-line);
    border-radius: 18px;
    /* scroll shadows: visible only when there is more to scroll */
    background:
        linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0)) left / 32px 100% no-repeat local,
        linear-gradient(270deg, #fff 30%, rgba(255, 255, 255, 0)) right / 32px 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(35, 28, 80, .16), transparent) left / 12px 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(35, 28, 80, .16), transparent) right / 12px 100% no-repeat scroll,
        #fff;
    scrollbar-width: thin;
}
.sx-table__scroll:focus-visible { outline: 2px solid var(--sx-brand); outline-offset: 2px; }
.sx-table table { width: 100%; min-width: 520px; table-layout: auto; height: auto !important; margin: 0; border: 0; border-collapse: collapse; background: transparent; color: var(--sx-ink); font-size: 15px; line-height: 1.55; font-variant-numeric: tabular-nums; }
.sx-table[data-cols="1"] table, .sx-table[data-cols="2"] table { min-width: 0; }
.sx-table[data-cols="4"] table { min-width: 640px; }
.sx-table[data-cols="5"] table, .sx-table[data-cols="6"] table, .sx-table[data-cols="7"] table { min-width: 760px; }
.sx-table thead th { position: static; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--sx-line); background: var(--sx-canvas); color: var(--sx-ink); font-size: 13.5px; font-weight: 800; line-height: 1.35; text-align: left; vertical-align: bottom; text-transform: none; letter-spacing: 0; }
.sx-table tbody th, .sx-table tbody td { padding: 14px 16px; border: 0; border-bottom: 1px solid var(--sx-line); background: transparent; color: inherit; font-weight: 400; text-align: left; vertical-align: top; }
.sx-table tbody th[scope="row"] { color: var(--sx-ink); font-weight: 700; }
.sx-table tbody tr:first-child td, .sx-table tbody tr:first-child th { background: transparent; font-weight: 400; }
.sx-table tbody tr:first-child th[scope="row"] { font-weight: 700; }
.sx-table tbody tr:last-child > * { border-bottom: 0; }
.sx-table tbody tr:hover > * { background: #fbfbfe; }
.sx-table tbody tr.is-ours > * { background: #f6f4fd; }
.sx-table tbody tr.is-ours > th[scope="row"] { box-shadow: inset 4px 0 0 var(--sx-lime); }
.sx-table td.is-empty { color: #b5b8c7; }
.sx-table p { margin: 0 0 8px; }
.sx-table p:last-child { margin-bottom: 0; }
.sx-table__caption { margin: 10px 4px 0; color: var(--sx-muted); font-size: 13.5px; }

/* Multi-line cells */
.sx-table .sx-cell-list, figure.sx-table ul.sx-cell-list { display: grid; margin: 0; padding: 0; list-style: none; }
figure.sx-table ul.sx-cell-list > li { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; list-style: none; }
.sx-table .sx-cell-list li { margin: 0; padding: 7px 0; border-top: 1px dashed var(--sx-line); line-height: 1.45; }
.sx-table .sx-cell-list li:first-child { padding-top: 0; border-top: 0; }
.sx-table .sx-cell-list li:last-child { padding-bottom: 0; }
.sx-table .sx-cell-list li::before, .sx-table .sx-cell-list li::marker { content: none; }
.sx-table .sx-cell-list li.has-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sx-table .sx-cell-list__price { flex: 0 0 auto; max-width: 55%; color: var(--sx-brand-deep); text-align: right; }
.sx-table .sx-cell-list__price strong { color: inherit; font-weight: 800; white-space: nowrap; }

@container sxt (max-width: 460px) {
    .sx-table--stack-sm .sx-table__scroll { overflow: visible; border: 0; border-radius: 0; background: none; }
    .sx-table--stack-sm table { display: block; min-width: 0 !important; }
    .sx-table--stack-sm thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .sx-table--stack-sm tbody { display: grid; gap: 14px; }
    .sx-table--stack-sm tbody tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); overflow: hidden; border: 1px solid var(--sx-line); border-radius: 18px; background: #fff; box-shadow: 0 10px 24px -22px rgba(35, 28, 80, .45); }
    .sx-table--stack-sm tbody tr:hover > * { background: #fff; }
    .sx-table--stack-sm tbody tr.is-ours { border-color: rgba(101, 88, 153, .45); box-shadow: inset 4px 0 0 var(--sx-lime), 0 10px 24px -22px rgba(35, 28, 80, .45); }
    .sx-table--stack-sm tbody tr.is-ours > * { background: #fff; }
    .sx-table--stack-sm tbody th[scope="row"] { grid-column: 1 / -1; display: block; padding: 14px 18px; border: 0; background: var(--sx-canvas) !important; color: var(--sx-ink); font-size: 17px; font-weight: 800; box-shadow: none !important; }
    .sx-table--stack-sm tbody td { display: block; padding: 14px 18px; border: 0; border-top: 1px solid var(--sx-line); box-shadow: -1px 0 0 var(--sx-line); }
    .sx-table--stack-sm tbody td::before { content: attr(data-label); display: block; margin-bottom: 8px; color: var(--sx-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .07em; line-height: 1.4; text-transform: uppercase; }
    .sx-table--stack-sm tbody td.is-short { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-top: 10px; padding-bottom: 10px; }
    .sx-table--stack-sm tbody td.is-short::before { margin: 0; }
    .sx-table--stack-sm tbody td.is-empty { display: none; }
}

@container sxt (max-width: 680px) {
    .sx-table--stack-md .sx-table__scroll { overflow: visible; border: 0; border-radius: 0; background: none; }
    .sx-table--stack-md table { display: block; min-width: 0 !important; }
    .sx-table--stack-md thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .sx-table--stack-md tbody { display: grid; gap: 14px; }
    .sx-table--stack-md tbody tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); overflow: hidden; border: 1px solid var(--sx-line); border-radius: 18px; background: #fff; box-shadow: 0 10px 24px -22px rgba(35, 28, 80, .45); }
    .sx-table--stack-md tbody tr:hover > * { background: #fff; }
    .sx-table--stack-md tbody tr.is-ours { border-color: rgba(101, 88, 153, .45); box-shadow: inset 4px 0 0 var(--sx-lime), 0 10px 24px -22px rgba(35, 28, 80, .45); }
    .sx-table--stack-md tbody tr.is-ours > * { background: #fff; }
    .sx-table--stack-md tbody th[scope="row"] { grid-column: 1 / -1; display: block; padding: 14px 18px; border: 0; background: var(--sx-canvas) !important; color: var(--sx-ink); font-size: 17px; font-weight: 800; box-shadow: none !important; }
    .sx-table--stack-md tbody td { display: block; padding: 14px 18px; border: 0; border-top: 1px solid var(--sx-line); box-shadow: -1px 0 0 var(--sx-line); }
    .sx-table--stack-md tbody td::before { content: attr(data-label); display: block; margin-bottom: 8px; color: var(--sx-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .07em; line-height: 1.4; text-transform: uppercase; }
    .sx-table--stack-md tbody td.is-short { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-top: 10px; padding-bottom: 10px; }
    .sx-table--stack-md tbody td.is-short::before { margin: 0; }
    .sx-table--stack-md tbody td.is-empty { display: none; }
}

@container sxt (max-width: 860px) {
    .sx-table--stack-lg .sx-table__scroll { overflow: visible; border: 0; border-radius: 0; background: none; }
    .sx-table--stack-lg table { display: block; min-width: 0 !important; }
    .sx-table--stack-lg thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .sx-table--stack-lg tbody { display: grid; gap: 14px; }
    .sx-table--stack-lg tbody tr { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); overflow: hidden; border: 1px solid var(--sx-line); border-radius: 18px; background: #fff; box-shadow: 0 10px 24px -22px rgba(35, 28, 80, .45); }
    .sx-table--stack-lg tbody tr:hover > * { background: #fff; }
    .sx-table--stack-lg tbody tr.is-ours { border-color: rgba(101, 88, 153, .45); box-shadow: inset 4px 0 0 var(--sx-lime), 0 10px 24px -22px rgba(35, 28, 80, .45); }
    .sx-table--stack-lg tbody tr.is-ours > * { background: #fff; }
    .sx-table--stack-lg tbody th[scope="row"] { grid-column: 1 / -1; display: block; padding: 14px 18px; border: 0; background: var(--sx-canvas) !important; color: var(--sx-ink); font-size: 17px; font-weight: 800; box-shadow: none !important; }
    .sx-table--stack-lg tbody td { display: block; padding: 14px 18px; border: 0; border-top: 1px solid var(--sx-line); box-shadow: -1px 0 0 var(--sx-line); }
    .sx-table--stack-lg tbody td::before { content: attr(data-label); display: block; margin-bottom: 8px; color: var(--sx-muted); font-size: 11.5px; font-weight: 800; letter-spacing: .07em; line-height: 1.4; text-transform: uppercase; }
    .sx-table--stack-lg tbody td.is-short { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-top: 10px; padding-bottom: 10px; }
    .sx-table--stack-lg tbody td.is-short::before { margin: 0; }
    .sx-table--stack-lg tbody td.is-empty { display: none; }
}

/* ── Content buttons (inc/content-buttons.php) ────────────────────────────────
   Former button screenshots in editor content, now real .sx-btn buttons. */
.sx-content-cta { display: flex; justify-content: flex-start; margin: 24px 0 !important; }
a.sx-btn.sx-content-btn { max-width: 100%; height: auto; min-height: 52px; padding: 10px 12px 10px 24px; color: #fff !important; font-size: 16px; font-weight: 700; line-height: 1.3; text-align: left; text-decoration: none !important; white-space: normal; }
a.sx-btn.sx-content-btn > span:first-child { flex: 1 1 auto; }
a.sx-btn.sx-content-btn .sx-btn__badge { flex: 0 0 auto; margin-left: 14px; }
@media (max-width: 640px) {
    .sx-content-cta a.sx-btn.sx-content-btn { width: 100%; justify-content: space-between; font-size: 15px; }
}

.sx-content-cta { flex-wrap: wrap; gap: 12px; }
div.sx-content-cta { margin: 24px 0; }

/* Banner image -> CTA card (inc/content-buttons.php) */
.sx-content-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 22px; align-items: center; margin: 32px 0; padding: 24px 26px; border-radius: 22px; background: radial-gradient(120% 140% at 0% 0%, #6d5fae 0%, var(--sx-brand-mid) 35%, var(--sx-brand-deep) 100%); color: #fff; }
.sx-content-banner__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--sx-lime); color: var(--sx-brand-deep); }
.sx-content-banner__icon svg { width: 26px; height: 26px; }
.sx-content-banner p { margin: 0 !important; }
.sx-content-banner .sx-content-banner__eyebrow { margin-bottom: 4px !important; color: var(--sx-lime); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sx-content-banner .sx-content-banner__title { color: #fff; font-family: var(--sx-font-title); font-size: clamp(22px, 2.2vw, 28px); line-height: 1.1; }
.sx-content-banner .sx-content-banner__text { margin-top: 6px !important; color: rgba(255, 255, 255, .8); font-size: 15px; line-height: 1.5; }
.sx-content-banner .sx-btn { text-decoration: none !important; white-space: nowrap; }
@media (max-width: 760px) {
    .sx-content-banner { grid-template-columns: auto minmax(0, 1fr); }
    .sx-content-banner .sx-btn { grid-column: 1 / -1; justify-content: space-between; }
}

/* Bold text inside content links keeps the link colour and a sane weight (was black 900). */
:is(.sxg-prose, .sxbl-prose, .sxl-prose, .entry-content, .post-inner-content) a :is(strong, b) { color: inherit; font-weight: 700; }

/* ── Mobile: no tables of contents (2026-11-05) ───────────────────────────────
   Guide, legal (incl. the collapsible variant) and blog TOCs are hidden on
   phones and small tablets — the content starts right after the hero. */
@media (max-width: 900px) {
    .sxg-toc, .sxl-toc, .sxl-toc-m, .sxbl-toc { display: none !important; }
}

/* ── Mobile: link-card lists as a swipeable row ───────────────────────────────
   .sxg-cards (guide routes / next steps) and .sxp-links (landing link lists)
   become a scroll-snap slider with the next card peeking in. CSS only; links
   stay a normal list for keyboards and screen readers. Opt out: .sx-no-slider. */
@media (max-width: 640px) {
    :is(.sxg-cards, .sxp-links):not(.sx-no-slider) {
        display: grid !important;
        grid-template-columns: none !important;
        grid-auto-flow: column;
        grid-auto-columns: min(78%, 280px);
        gap: 12px !important;
        margin-right: -16px !important;
        margin-left: -16px !important;
        padding: 4px 16px 14px !important;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 16px;
        scrollbar-width: none;
    }
    :is(.sxg-cards, .sxp-links):not(.sx-no-slider)::-webkit-scrollbar { display: none; }
    :is(.sxg-cards, .sxp-links):not(.sx-no-slider) > li { scroll-snap-align: start; min-width: 0; }
    /* Compact card: icon + title on one row, text below, no arrow. */
    :is(.sxg-cards, .sxp-links):not(.sx-no-slider) :is(.sxg-card, .sxp-link) { flex-wrap: wrap; align-content: flex-start; gap: 10px 12px; height: 100%; padding: 16px; }
    :is(.sxg-cards, .sxp-links):not(.sx-no-slider) :is(.sxg-card__icon, .sxp-link__icon) { width: 38px; height: 38px; border-radius: 11px; }
    :is(.sxg-cards, .sxp-links):not(.sx-no-slider) :is(.sxg-card__icon, .sxp-link__icon) svg { width: 19px; height: 19px; }
    :is(.sxg-cards, .sxp-links):not(.sx-no-slider) :is(.sxg-card__title, .sxp-link__title) { font-size: 15.5px; line-height: 1.3; }
    :is(.sxg-cards, .sxp-links):not(.sx-no-slider) :is(.sxg-card__text, .sxp-link__text) { font-size: 13.5px; line-height: 1.45; }
    :is(.sxg-cards, .sxp-links):not(.sx-no-slider) :is(.sxg-card__arrow, .sxp-link__arrow) { display: none; }
    :is(.sxg-cards, .sxp-links):not(.sx-no-slider) :is(.sxg-card:hover, .sxp-link:hover) { transform: none; }
    /* Lists inside a card stay vertical (self-prep "free tools"). */
    .sxs-free__tools .sxp-links { display: grid !important; grid-auto-flow: row !important; grid-template-columns: minmax(0, 1fr) !important; margin: 0 !important; padding: 0 !important; overflow: visible; }
}

/* Dark sections: supporting text must stay readable (was grey on purple). */
.sxp-section--dark .sxp-head__text, .sxp-section--dark .sxp-head p:not(.sx-eyebrow) { color: rgba(255, 255, 255, .84) !important; }

/* ── Content blocks (core) used by migrated articles ─────────────────────── */
.wp-block-details { margin: 0 0 10px; border: 1px solid var(--sx-line); border-radius: 16px; background: #fff; }
.wp-block-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; color: var(--sx-ink); font-size: 16.5px; font-weight: 700; line-height: 1.4; cursor: pointer; list-style: none; }
.wp-block-details > summary::-webkit-details-marker { display: none; }
.wp-block-details > summary::after { content: ''; flex: none; width: 9px; height: 9px; margin-top: -3px; border-right: 2px solid var(--sx-brand); border-bottom: 2px solid var(--sx-brand); transform: rotate(45deg); transition: transform .2s var(--sx-ease); }
.wp-block-details[open] > summary { border-bottom: 1px dashed var(--sx-line); }
.wp-block-details[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.wp-block-details > :not(summary) { margin-left: 18px; margin-right: 18px; }
.wp-block-details > summary + * { margin-top: 12px; }
.wp-block-details > :last-child { margin-bottom: 16px; }
.wp-block-details > summary:focus-visible { outline: 3px solid rgba(101, 88, 153, .35); outline-offset: 2px; border-radius: 16px; }
.wp-block-gallery.has-nested-images { display: grid; grid-template-columns: repeat(var(--sx-gal-cols, 2), minmax(0, 1fr)); gap: 12px; margin: 22px 0; padding: 0; }
.wp-block-gallery.has-nested-images.columns-1 { --sx-gal-cols: 1; }
.wp-block-gallery.has-nested-images.columns-3 { --sx-gal-cols: 3; }
.wp-block-gallery.has-nested-images .wp-block-image { margin: 0; }
.wp-block-gallery.has-nested-images img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--sx-line); }
@media (max-width: 640px) { .wp-block-gallery.has-nested-images { --sx-gal-cols: 1 !important; } }
@media (prefers-reduced-motion: reduce) { .wp-block-details > summary::after { transition: none; } }

/* Scroll reveal (assets/js/sx-reveal.js); same motion as the home page. */
.sx-rv { opacity: 0; transform: translate3d(0, 32px, 0); }
.sx-rv.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .9s var(--sx-ease); }

/* ── "Ask an AI" row (inc/ai-ask.php) — blog posts + guide pages ─────────── */
.sxai-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 20px; padding: 14px 0; border-top: 1px solid var(--sx-line); border-bottom: 1px solid var(--sx-line); }
.sxai-ask__label { margin: 0; font-size: 14px; color: var(--sx-muted); }
.sxai-ask__row { display: flex; flex-wrap: wrap; gap: 8px; }
.sxai-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 1px solid var(--sx-line); border-radius: 999px; color: var(--sx-ink); font-size: 13.5px; font-weight: 600; line-height: 1; text-decoration: none; background: #fff; transition: border-color .2s var(--sx-ease), background .2s var(--sx-ease); }
.sxai-btn img { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; }
.sxai-btn:hover, .sxai-btn:focus-visible { border-color: var(--sx-brand); background: var(--sx-canvas); }
.sxai-btn.is-copied { border-color: var(--sx-lime); background: var(--sx-lime); }
@media (max-width: 640px) { .sxai-ask { justify-content: flex-start; } }
