/*
Theme Name: Snap Cohort FSE
Theme URI: https://snapcohort.local/
Author: Snap Cohort
Description: Optional block-theme companion used to validate Snap Cohort independently from the plugin artifact.
Version: 0.2.0
Requires at least: 6.9
Requires PHP: 8.1
Text Domain: snap-cohort-fse
License: GPL-2.0-or-later
*/

/* Premium visual direction */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --snap-cohort-surface-soft: radial-gradient(120% 90% at 100% 0%, var(--snap-cohort-accent-soft), transparent 45%), #fbfaf7;
    --snap-cohort-accent-1: #635bff;
    --snap-cohort-accent-2: #7e57ff;
    --snap-cohort-action-bg: var(--snap-cohort-accent-1);
    --snap-cohort-on-accent: #fff;
    --snap-cohort-accent-soft: rgba(99, 91, 255, 0.18);
    --snap-cohort-accent-gradient: linear-gradient(120deg, var(--snap-cohort-accent-soft), rgba(163, 139, 255, 0.14) 48%, transparent);
    --snap-cohort-ink: #151923;
    --snap-cohort-muted: #666c87;
    --snap-cohort-border: #e6e8ef;
    --snap-cohort-sidebar: #f8f9ff;
    --snap-cohort-focus-accent-soft: rgba(99, 91, 255, 0.09);
    --snap-cohort-header-columns: 3;
    --snap-cohort-footer-columns: 2;
    --snap-cohort-elementor-canvas-width: 1400px;
    --snap-cohort-radius-sm: 0.875rem;
    --snap-cohort-radius-lg: 1.25rem;
    --snap-cohort-shell-max-width: 1480px;
    --snap-cohort-shell-padding-inline: clamp(0.75rem, 2vw, 2rem);
    /* Deliberately compact: WordPress blocks already carry their own rhythm. */
    --snap-cohort-space-card: clamp(1rem, 1.8vw, 1.5rem);
    --snap-cohort-space-section: clamp(1.25rem, 2.4vw, 2.25rem);
    --snap-cohort-bg: #fbfaf7;
    --snap-cohort-surface-gradient-soft: radial-gradient(130% 110% at 100% 0%, var(--snap-cohort-accent-soft), transparent 48%);
    --snap-cohort-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 30px rgba(15, 23, 42, .06);
    --snap-cohort-shadow-lg: 0 24px 70px rgba(15, 23, 42, .12);
    --snap-cohort-reading-progress: 0%;
}

/* Snap Studio public builder. Its server-rendered output remains usable before
   the interaction bundle loads and keeps the same shared theme tokens. */
.snap-studio-site-header {
    position: relative;
    z-index: 80;
    border-bottom: 1px solid var(--snap-cohort-border, #e6e8ef);
    background: color-mix(in srgb, var(--snap-cohort-surface, #fff) 94%, transparent);
    color: var(--snap-cohort-text, #172033);
    backdrop-filter: blur(16px);
}

.snap-studio-site-footer {
    margin-top: var(--snap-cohort-space-section, clamp(2.5rem, 6vw, 5rem));
    background: var(--snap-cohort-ink, #172033);
    color: var(--snap-cohort-surface, #fff);
}

.snap-studio-public-builder { padding: clamp(.75rem, 2vw, 1.5rem) var(--snap-cohort-shell-padding-inline, 1rem); }
.snap-studio-public-builder__device--tablet,
.snap-studio-public-builder__device--mobile { display: none; }
.snap-studio-public-builder__row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.75rem, 2vw, 1.5rem);
    align-items: center;
}
.snap-studio-public-builder__row:empty { display: none; }
.snap-studio-public-builder__zone { display: flex; gap: .75rem; align-items: center; min-width: 0; }
.snap-studio-public-builder__zone--center { justify-content: center; }
.snap-studio-public-builder__zone--right { justify-content: flex-end; }
.snap-studio-brand { display: inline-flex; gap: .75rem; align-items: center; font-size: 1.1rem; font-weight: 750; white-space: nowrap; }
.snap-studio-brand img { width: auto; max-height: 46px; }
.snap-studio-nav__list { display: flex; gap: clamp(.75rem, 2vw, 1.5rem); align-items: center; margin: 0; padding: 0; list-style: none; }
.snap-studio-nav__list a,
.snap-studio-brand a { color: inherit; text-decoration: none; }
.snap-studio-nav__list a:hover,
.snap-studio-nav__list a:focus-visible { color: var(--snap-cohort-accent-1, #635bff); }
.snap-studio-builder__cta {
    display: inline-flex;
    min-height: 44px;
    padding: .65rem 1rem;
    align-items: center;
    border-radius: var(--snap-cohort-radius-lg, 1.25rem);
    background: var(--snap-cohort-action-bg, #635bff);
    color: var(--snap-cohort-on-accent, #fff);
    font-weight: 700;
    text-decoration: none;
}
.snap-studio-builder__account,
.snap-studio-builder__progress { color: inherit; font-weight: 650; white-space: nowrap; }
.snap-studio-builder__course-cta { display: grid; gap: .35rem; }
.snap-studio-site-footer .snap-studio-public-builder__row { padding-block: .9rem; }
.snap-studio-site-footer .snap-studio-public-builder__row { grid-template-columns: repeat(var(--snap-studio-footer-columns, 3), minmax(0, 1fr)); }
.snap-studio-site-footer .snap-studio-public-builder__zone { display: contents; }
.snap-studio-site-footer[data-layout-preset="wide-left"] .snap-studio-public-builder__row > :first-child,
.snap-studio-site-footer[data-layout-preset="wide-right"] .snap-studio-public-builder__row > :last-child { grid-column: span 2; }
.snap-studio-site-footer[data-layout-preset="wide-center"] .snap-studio-public-builder__row > :nth-child(2) { grid-column: span 2; }
.snap-studio-site-footer a { color: inherit; }
.snap-studio-site-header.is-transparent { position: absolute; inset: var(--snap-cohort-adminbar-height, 0) 0 auto; width: 100%; border-color: transparent; background: transparent; backdrop-filter: none; }
.snap-studio-site-header.is-transparent-contrast-light { color: #fff; }
.snap-studio-site-header.is-transparent-contrast-dark { color: #111827; }
.snap-studio-site-header[data-sticky-enabled="0"] { position: relative !important; top: auto !important; }
.snap-studio-site-header.is-reveal-hidden { transform: translateY(-110%); }
.snap-studio-site-header.is-shrunk .snap-studio-public-builder { padding-block: .45rem; }
.snap-studio-site-header { transition: transform var(--snap-cohort-motion-duration, 180ms) ease, background var(--snap-cohort-motion-duration, 180ms) ease; }
.snap-studio-offcanvas-toggle,
.snap-studio-offcanvas-backdrop { display: none; }
.snap-studio-builder__badge,
.snap-studio-builder__badges span { display: inline-flex; min-height: 32px; padding: .35rem .65rem; align-items: center; border: 1px solid currentcolor; border-radius: 999px; font-size: .78rem; font-weight: 750; }
.snap-studio-builder__socials { display: flex; gap: .65rem; }
.snap-studio-builder__mega { position: relative; }
.snap-studio-builder__mega-panel { position: absolute; z-index: 30; top: calc(100% + .75rem); left: 50%; width: min(720px, 90vw); padding: 1.25rem; border: 1px solid var(--snap-cohort-border, #dfe3eb); border-radius: var(--snap-cohort-radius-lg, 1.25rem); background: var(--snap-cohort-surface, #fff); box-shadow: var(--snap-cohort-shadow, 0 18px 45px rgb(24 32 51 / 14%)); color: var(--snap-cohort-text, #172033); transform: translateX(-50%); }
.snap-studio-mobile-bar { display: none; }

@media (max-width: 980px) {
    .snap-studio-public-builder__device--desktop { display: none; }
    .snap-studio-public-builder__device--tablet { display: block; }
    .snap-studio-public-builder__row { grid-template-columns: minmax(0, 1fr) auto; }
    .snap-studio-public-builder__zone--center { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; overflow-x: auto; }
    .snap-studio-public-builder__zone--right { grid-column: 2; grid-row: 1; }
    .snap-studio-site-footer .snap-studio-public-builder__row { grid-template-columns: 1fr; }
    .snap-studio-site-footer .snap-studio-public-builder__zone { grid-column: 1; grid-row: auto; justify-content: flex-start; }
}

@media (max-width: 600px) {
    .snap-studio-public-builder__device--tablet { display: none; }
    .snap-studio-public-builder__device--mobile { display: block; }
    .snap-studio-public-builder__zone { flex-wrap: wrap; }
    .snap-studio-nav__list { gap: 1rem; overflow-x: auto; }
    .snap-studio-brand { white-space: normal; }
    .snap-studio-site-header[data-offcanvas="left"] .snap-studio-offcanvas-toggle,
    .snap-studio-site-header[data-offcanvas="right"] .snap-studio-offcanvas-toggle { display: inline-flex; position: relative; z-index: 52; min-width: 44px; min-height: 44px; margin: .5rem; align-items: center; justify-content: center; }
    .snap-studio-site-header[data-offcanvas="left"] .snap-studio-public-builder__device--mobile,
    .snap-studio-site-header[data-offcanvas="right"] .snap-studio-public-builder__device--mobile { position: fixed; z-index: 51; top: 0; bottom: 0; width: min(88vw, 390px); padding: 5rem 1rem 2rem; overflow-y: auto; background: var(--snap-cohort-surface, #fff); color: var(--snap-cohort-text, #172033); box-shadow: 0 0 60px rgb(15 23 42 / 24%); transition: transform var(--snap-cohort-motion-duration, 180ms) ease; }
    .snap-studio-site-header[data-offcanvas="left"] .snap-studio-public-builder__device--mobile { left: 0; transform: translateX(-105%); }
    .snap-studio-site-header[data-offcanvas="right"] .snap-studio-public-builder__device--mobile { right: 0; transform: translateX(105%); }
    .snap-studio-site-header.is-offcanvas-open .snap-studio-public-builder__device--mobile { transform: translateX(0); }
    .snap-studio-site-header.is-offcanvas-open .snap-studio-offcanvas-backdrop { display: block; position: fixed; z-index: 50; inset: 0; border: 0; background: rgb(15 23 42 / 55%); }
    .snap-studio-site-header[data-offcanvas] .snap-studio-public-builder__row { display: grid; grid-template-columns: 1fr; }
    .snap-studio-site-header[data-offcanvas] .snap-studio-public-builder__zone { display: flex; grid-column: 1; grid-row: auto; flex-direction: column; align-items: stretch; overflow: visible; }
    .snap-studio-site-header[data-offcanvas] .snap-studio-nav__list { flex-direction: column; align-items: stretch; overflow: visible; }
    .snap-studio-mobile-bar { display: block; position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; padding: .65rem max(1rem, env(safe-area-inset-left)); background: var(--snap-cohort-surface, #fff); box-shadow: 0 -8px 30px rgb(15 23 42 / 14%); text-align: center; }
    .snap-studio-mobile-bar a { display: block; min-height: 44px; padding: .7rem 1rem; border-radius: 999px; background: var(--snap-cohort-accent-1, #635bff); color: #fff; font-weight: 750; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
    .snap-studio-site-header,
    .snap-studio-site-header .snap-studio-public-builder__device--mobile { transition: none; }
}

body.snap-entry-layout-contained main.snap-cohort-shell { max-width: min(100% - 2rem, 1120px); margin-inline: auto; }
body.snap-entry-layout-wide main.snap-cohort-shell { max-width: min(100% - 2rem, var(--snap-cohort-shell-max-width)); margin-inline: auto; }
body.snap-entry-layout-fluid main.snap-cohort-shell { width: 100%; max-width: none; }
.snap-entry-breadcrumbs { margin-bottom: 1rem; color: color-mix(in srgb,currentcolor 65%,transparent); font-size: .85rem; }
.snap-entry-breadcrumbs a { color: inherit; }
.snap-entry-hero { display: grid; gap: clamp(1rem,3vw,2.5rem); align-items: center; margin-bottom: 1.25rem; }
.snap-entry-hero--split { grid-template-columns: minmax(0,1fr) minmax(280px,.8fr); }
.snap-entry-hero--stacked { grid-template-columns: 1fr; }
.snap-entry-hero--cover { position: relative; min-height: clamp(280px,42vw,580px); padding: clamp(1.5rem,5vw,4rem); align-content: end; overflow: hidden; border-radius: var(--snap-cohort-radius-lg); color: #fff; isolation: isolate; }
.snap-entry-hero--text-light { color: #fff; }.snap-entry-hero--text-dark { color: #111827; }
.snap-entry-hero--cover .snap-entry-teaser { position: absolute; z-index: -2; inset: 0; margin: 0; }
.snap-entry-hero--cover .snap-entry-teaser img { width: 100%; height: 100%; object-fit: cover; }
.snap-entry-hero--cover::after { position: absolute; z-index: -1; inset: 0; content: ""; pointer-events: none; }
.snap-entry-hero--overlay-soft::after { background: rgb(0 0 0 / 25%); }.snap-entry-hero--overlay-gradient::after { background: linear-gradient(0deg,rgb(0 0 0 / 72%),rgb(0 0 0 / 5%) 70%); }.snap-entry-hero--overlay-strong::after { background: rgb(0 0 0 / 58%); }
.snap-entry-teaser { margin: 0; overflow: hidden; border-radius: var(--snap-cohort-radius-lg); }.snap-entry-teaser img { display: block; width: 100%; height: auto; }
.snap-entry-metadata { display: flex; gap: .5rem 1rem; margin-top: .75rem; align-items: center; flex-wrap: wrap; font-size: .88rem; opacity: .78; }
.snap-entry-page-links,.snap-entry-navigation { margin-top: 2rem; }
@media (max-width: 780px) { .snap-entry-hero--split { grid-template-columns: 1fr; } }

/* Compositions premium prêtes à l'emploi. Les couleurs restent reliées aux
 * jetons du thème afin que les variations Bleu, Rose, Violet et Nocturne
 * conservent automatiquement un contraste cohérent. */
.snap-cohort-pattern-section {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: clamp(1.25rem, 2vw, 2rem);
    background: var(--wp--preset--color--surface);
    box-shadow: 0 24px 70px rgba(24, 32, 49, 0.1);
}

.snap-cohort-builder-canvas {
    width: 100%;
    max-width: none;
    padding: clamp(1rem, 2.5vw, 2.5rem);
}

.snap-cohort-builder-canvas > .wp-block-post-content {
    width: 100%;
    max-width: none;
}

.snap-cohort-pattern-section::before {
    position: absolute;
    inset: 0 auto auto 0;
    width: 13rem;
    height: 13rem;
    border-radius: 999px;
    background: var(--snap-cohort-accent-gradient);
    content: "";
    filter: blur(36px);
    opacity: 0.45;
    pointer-events: none;
    transform: translate(-38%, -48%);
}

.snap-cohort-pattern-eyebrow {
    color: var(--wp--preset--color--accent);
    font-family: var(--wp--preset--font-family--headline);
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.snap-cohort-pattern-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.snap-cohort-pattern-card {
    min-height: 100%;
    padding: clamp(1.25rem, 2vw, 2rem);
    border: 1px solid var(--wp--preset--color--border);
    border-radius: clamp(1rem, 1.5vw, 1.5rem);
    background: color-mix(in srgb, var(--wp--preset--color--surface) 94%, var(--wp--preset--color--accent-soft));
}

.snap-cohort-pattern-stat {
    font-family: var(--wp--preset--font-family--headline);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 780;
    letter-spacing: -0.045em;
    line-height: 1;
}

@media (max-width: 780px) {
    .snap-cohort-pattern-grid {
        grid-template-columns: 1fr;
    }
}

body.snap-cohort-theme-dark {
    --snap-cohort-surface-soft: linear-gradient(180deg, #0f172a, #020617), #020617;
    --snap-cohort-accent-1: #7d8bff;
    --snap-cohort-accent-2: #a48bff;
    --snap-cohort-ink: #e5e7eb;
    --snap-cohort-muted: #94a3b8;
    --snap-cohort-border: #24324a;
    --snap-cohort-sidebar: #0f1a31;
    --snap-cohort-focus-accent-soft: rgba(125, 139, 255, 0.18);
    --snap-cohort-bg: #020617;
    --wp--preset--color--paper: #020617;
    --wp--preset--color--surface: #0f172a;
    --wp--preset--color--ink: #f1f5f9;
    --wp--preset--color--muted: #a8b3c7;
    --wp--preset--color--border: #334155;
}

body.snap-cohort-force-dark {
    --snap-cohort-surface-soft: linear-gradient(180deg, #0f172a, #020617), #020617;
    --snap-cohort-ink: #e5e7eb;
    --snap-cohort-muted: #94a3b8;
    --snap-cohort-border: #24324a;
    --snap-cohort-sidebar: #0f1a31;
    --snap-cohort-focus-accent-soft: rgba(125, 139, 255, 0.18);
}

html.snap-cohort-force-dark body {
    --snap-cohort-bg: #020617;
    --snap-cohort-ink: #f1f5f9;
    --snap-cohort-muted: #a8b3c7;
    --snap-cohort-border: #334155;
    --wp--preset--color--paper: #020617;
    --wp--preset--color--surface: #0f172a;
    --wp--preset--color--ink: #f1f5f9;
    --wp--preset--color--muted: #a8b3c7;
    --wp--preset--color--border: #334155;
}

body.snap-cohort-force-light,
html:not(.snap-cohort-force-dark) body {
    --snap-cohort-surface-soft: var(--snap-cohort-surface-gradient-soft);
}

body {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0)) center/cover no-repeat,
        var(--snap-cohort-surface-soft);
    color: var(--wp--preset--color--ink);
    text-wrap: pretty;
    letter-spacing: -0.006em;
    background-color: var(--snap-cohort-bg);
    -webkit-font-smoothing: antialiased;
    font-family: var(--snap-cohort-body-font, ui-sans-serif, system-ui, sans-serif);
}

html { font-size: var(--snap-cohort-type-scale, 100%); }
h1, h2, h3, h4, h5, h6,
.wp-block-site-title { font-family: var(--snap-cohort-heading-font, ui-sans-serif, system-ui, sans-serif); }
.wp-block-post-content > :where(p, ul, ol, blockquote) { max-width: var(--snap-cohort-reading-width, 68ch); }
.snap-cohort-card,
.snap-cohort-pattern-card {
    border-width: var(--snap-cohort-border-width, 1px);
    box-shadow: var(--snap-cohort-studio-shadow, var(--snap-cohort-shadow-sm));
    transition-duration: var(--snap-cohort-motion-duration, 180ms);
}
.snap-cohort-card { padding: calc(var(--snap-cohort-space-card) * var(--snap-cohort-density, 1)); }
.snap-cohort-course-card-style-minimal .snap-cohort-course-card { box-shadow: none; }
.snap-cohort-course-card-style-immersive .snap-cohort-course-card { background: var(--snap-cohort-accent-gradient); }
.snap-cohort-button-style-soft :where(.wp-element-button, .snap-studio-builder__cta) { background: var(--snap-cohort-accent-soft); color: var(--snap-cohort-accent-1); }
.snap-cohort-button-style-outline :where(.wp-element-button, .snap-studio-builder__cta) { border: 2px solid var(--snap-cohort-accent-1); background: transparent; color: var(--snap-cohort-accent-1); }
.snap-cohort-progress-style-ring .snap-cohort-progress { border-radius: 999px; }

@media (prefers-reduced-motion: reduce) {
    :root { --snap-cohort-motion-duration: 0ms; }
}

::selection {
    background: var(--snap-cohort-accent-soft);
    color: var(--snap-cohort-ink);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--snap-cohort-accent-1) 72%, white);
    outline-offset: 3px;
}

body.snap-cohort-theme-dark {
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.82)),
        var(--snap-cohort-surface-soft);
}

.snap-cohort-fse-skip-link {
    background: var(--wp--preset--color--ink);
    border-radius: 0 0 var(--snap-cohort-radius-sm) 0;
    color: var(--wp--preset--color--surface);
    left: 0;
    padding: 0.75rem 1rem;
    position: fixed;
    top: 0;
    transform: translateY(-120%) translateZ(0);
    transition: transform 120ms ease;
    z-index: 100000;
}

.snap-cohort-fse-skip-link:focus {
    outline: 3px solid var(--wp--preset--color--accent);
    outline-offset: 3px;
    transform: translateY(0);
}

.wp-site-blocks,
.wp-site-blocks > .wp-block-template-part,
.wp-site-blocks > .wp-block-group {
    width: 100%;
}

body.snap-cohort-layout-contained .is-root-container,
body.snap-cohort-layout-contained main,
body.snap-cohort-layout-contained .wp-site-blocks,
.is-root-container,
main {
    background: transparent;
    width: min(var(--snap-cohort-shell-max-width), 100%);
    margin-inline: auto;
    min-height: 60vh;
    padding-inline: var(--snap-cohort-shell-padding-inline);
}

body.snap-cohort-layout-wide .is-root-container,
body.snap-cohort-layout-wide main,
body.snap-cohort-layout-wide .wp-site-blocks {
    width: min(var(--snap-cohort-shell-max-width), 100%);
    max-width: min(var(--snap-cohort-shell-max-width), 100%);
}

body.snap-cohort-layout-fluid .is-root-container,
body.snap-cohort-layout-fluid main,
body.snap-cohort-layout-fluid .wp-site-blocks {
    width: min(100%, 100%);
    max-width: min(100%, 100%);
    padding-inline: clamp(0.65rem, 2vw, 1.5rem);
}

/* Elementor compatibility: avoid narrow canvas in the builder/canvas context */
html.elementor-editor-active .wp-site-blocks,
html.elementor-editor-active .is-root-container,
html.elementor-editor-active main,
html.elementor-preview-active .wp-site-blocks,
html.elementor-preview-active .is-root-container,
html.elementor-preview-active main,
body.snap-elementor-editor .wp-site-blocks,
body.snap-elementor-editor .is-root-container,
body.snap-elementor-editor main,
body.snap-elementor-preview .wp-site-blocks,
body.snap-elementor-preview .is-root-container,
body.snap-elementor-preview main {
    margin-inline: auto;
    max-width: 100%;
    width: min(100%, 100%);
    padding-inline: clamp(0.75rem, 2vw, 2rem);
}

html.elementor-editor-active .snap-cohort-shell,
html.elementor-preview-active .snap-cohort-shell,
body.snap-elementor-editor .snap-cohort-shell,
body.snap-elementor-preview .snap-cohort-shell {
    margin-inline: auto;
    max-width: 100%;
}

html.elementor-editor-active .snap-cohort-site-toolbar,
html.elementor-preview-active .snap-cohort-site-toolbar,
body.snap-elementor-editor .snap-cohort-site-toolbar,
body.snap-elementor-preview .snap-cohort-site-toolbar {
    display: none;
}

html.elementor-editor-active .snap-cohort-site-notification-panel,
html.elementor-preview-active .snap-cohort-site-notification-panel,
body.snap-elementor-editor .snap-cohort-site-notification-panel,
body.snap-elementor-preview .snap-cohort-site-notification-panel {
    display: none;
}

html.elementor-editor-active .snap-cohort-focus-shell,
html.elementor-preview-active .snap-cohort-focus-shell,
body.snap-elementor-editor .snap-cohort-focus-shell,
body.snap-elementor-preview .snap-cohort-focus-shell {
    align-items: stretch;
    grid-template-columns: 1fr;
}

html.elementor-editor-active .snap-cohort-focus-shell__sidebar,
html.elementor-preview-active .snap-cohort-focus-shell__sidebar,
body.snap-elementor-editor .snap-cohort-focus-shell__sidebar,
body.snap-elementor-preview .snap-cohort-focus-shell__sidebar {
    display: none;
}

html.elementor-editor-active .elementor,
html.elementor-preview-active .elementor,
body.snap-elementor-editor .elementor,
body.snap-elementor-preview .elementor {
    width: 100%;
}

html.elementor-editor-active .elementor-section-wrap,
html.elementor-preview-active .elementor-section-wrap,
body.snap-elementor-editor .elementor-section-wrap,
body.snap-elementor-preview .elementor-section-wrap {
    max-width: 100% !important;
    padding-inline: clamp(0.75rem, 2vw, 2rem);
}

html.elementor-editor-active .elementor-section.elementor-top-section,
html.elementor-preview-active .elementor-section.elementor-top-section,
body.snap-elementor-editor .elementor-section.elementor-top-section,
body.snap-elementor-preview .elementor-section.elementor-top-section {
    max-width: 100% !important;
}

html.elementor-editor-active .elementor-section.elementor-section-boxed > .elementor-container,
html.elementor-preview-active .elementor-section.elementor-section-boxed > .elementor-container,
body.snap-elementor-editor .elementor-section.elementor-section-boxed > .elementor-container,
body.snap-elementor-preview .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 100% !important;
    width: 100% !important;
}

html.elementor-editor-active .elementor-section.elementor-section-boxed > .elementor-container,
html.elementor-preview-active .elementor-section.elementor-section-boxed > .elementor-container,
body.snap-elementor-editor .elementor-section.elementor-section-boxed > .elementor-container,
body.snap-elementor-preview .elementor-section.elementor-section-boxed > .elementor-container {
    width: min(var(--snap-cohort-elementor-canvas-width, 1400px), 100%) !important;
}

html.elementor-editor-active .elementor-widget-container,
html.elementor-preview-active .elementor-widget-container,
body.snap-elementor-editor .elementor-widget-container,
body.snap-elementor-preview .elementor-widget-container {
    max-width: 100%;
}

/* Keep WordPress paragraph defaults from doubling Elementor's own widget gap. */
.elementor-page .elementor-widget-text-editor > :first-child,
.elementor-page .elementor-widget-text-editor > .elementor-widget-container > :first-child {
    margin-block-start: 0;
}

.elementor-page .elementor-widget-text-editor > :last-child,
.elementor-page .elementor-widget-text-editor > .elementor-widget-container > :last-child {
    margin-block-end: 0;
}

html.elementor-editor-active .elementor-inner,
html.elementor-preview-active .elementor-inner,
body.snap-elementor-editor .elementor-inner,
body.snap-elementor-preview .elementor-inner,
html.elementor-editor-active .elementor-container,
html.elementor-preview-active .elementor-container,
body.snap-elementor-editor .elementor-container,
body.snap-elementor-preview .elementor-container,
html.elementor-editor-active .elementor-column,
html.elementor-preview-active .elementor-column,
body.snap-elementor-editor .elementor-column,
body.snap-elementor-preview .elementor-column,
html.elementor-editor-active .elementor-widget-wrap,
html.elementor-preview-active .elementor-widget-wrap,
body.snap-elementor-editor .elementor-widget-wrap,
body.snap-elementor-preview .elementor-widget-wrap {
    width: auto;
    max-width: 100%;
}

.snap-cohort-shell {
    --snap-cohort-shell-bg: var(--wp--preset--color--surface);
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--snap-cohort-border);
    border-radius: var(--snap-cohort-radius-lg);
    box-shadow: 0 24px 80px rgba(7, 10, 24, 0.07);
    overflow: clip;
    width: 100%;
}

.snap-cohort-shell-wide {
    max-width: 100%;
}

.wp-block-group.has-surface-background-color.has-background,
.wp-block-cover.has-background,
.wp-block-cover {
    border-radius: var(--snap-cohort-radius-lg);
}

.wp-block-navigation__container {
    gap: .55rem;
}

.wp-block-navigation-item__content {
    border-radius: 999px;
    padding: 0.38rem 0.8rem;
    transition: background-color 160ms ease, color 160ms ease;
}

.wp-block-navigation-item__content:hover {
    background: var(--snap-cohort-accent-soft);
    color: var(--snap-cohort-accent-1);
}

.wp-block-post-title,
.wp-block-post-title a,
.wp-block-post-title a:hover {
    color: var(--snap-cohort-ink);
    text-decoration: none;
}

.wp-block-query .wp-block-post-template {
    gap: clamp(1rem, 2vw, 1.35rem);
}

.wp-block-query .wp-block-post-template {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.snap-cohort-card {
    background: var(--snap-cohort-accent-gradient);
    border: 1px solid var(--snap-cohort-border);
    border-radius: var(--snap-cohort-radius-lg);
    box-shadow: var(--snap-cohort-shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
    padding: clamp(1rem, 2vw, 1.5rem);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.snap-cohort-card:hover,
.snap-cohort-card:focus-within {
    box-shadow: 0 18px 44px rgba(33, 33, 67, 0.14);
    transform: translateY(-3px);
}

.snap-cohort-chip {
    border: 1px solid var(--snap-cohort-border);
    border-radius: 999px;
    color: var(--snap-cohort-accent-1);
    display: inline-flex;
    font-weight: 600;
    padding: 0.32rem 0.9rem;
}

.wp-block-button__link,
button,
input[type="submit"] {
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
    filter: brightness(0.98);
    transform: translateY(-1px);
}

.wp-block-button.is-style-fill .wp-block-button__link {
    border: 0;
    border-radius: 999px;
    background: var(--snap-cohort-action-bg);
    color: var(--snap-cohort-on-accent) !important;
    box-shadow: 0 12px 30px var(--snap-cohort-accent-soft);
}

.wp-block-button.is-style-outline .wp-block-button__link {
    border-color: rgba(99, 91, 255, 0.35);
    border-radius: 999px;
}

.wp-block-separator {
    opacity: 0.45;
}

.snap-cohort-site-frame {
    margin-top: clamp(0.75rem, 1.5vw, 1.25rem);
}

.snap-cohort-shell--section {
    margin-top: clamp(0.85rem, 2vw, 1.25rem);
}

.snap-cohort-home-hero,
.snap-cohort-home-content {
    padding: var(--snap-cohort-space-section) !important;
}

.home main.snap-cohort-shell {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    padding-block: clamp(1.25rem, 2.5vw, 2.25rem) !important;
}

.snap-cohort-home-hero {
    align-items: stretch;
    background:
        radial-gradient(80% 100% at 100% 0%, var(--snap-cohort-accent-soft), transparent 62%),
        var(--wp--preset--color--surface);
    display: grid !important;
    gap: var(--snap-cohort-space-section);
    grid-template-columns: minmax(0, 1.15fr) minmax(20rem, .85fr);
}

.snap-cohort-home-hero > * {
    min-width: 0;
}

.snap-cohort-home-hero > :first-child {
    align-content: center;
    display: grid;
    max-width: 48rem;
    padding: clamp(.25rem, 1vw, .75rem);
}

.snap-cohort-home-hero .wp-block-post-title {
    font-size: clamp(2.25rem, 4.5vw, 4.75rem);
    line-height: 1.02;
    margin-block: .75rem 1.15rem;
    max-width: 12ch;
}

.snap-cohort-home-hero .wp-block-post-excerpt {
    color: var(--snap-cohort-muted);
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.55;
    margin-block: 0 1.5rem;
    max-width: 42rem;
}

.snap-cohort-home-proof {
    align-content: center;
    background: color-mix(in srgb, var(--wp--preset--color--surface) 88%, var(--snap-cohort-accent-1));
    box-shadow: 0 18px 50px rgba(23, 28, 50, .09);
    display: grid;
    padding: var(--snap-cohort-space-card) !important;
}

.snap-cohort-home-proof .snap-cohort-chip {
    margin: 0 0 1.1rem;
}

.snap-cohort-home-proof ul {
    margin: 0;
    padding-inline-start: 1.35rem;
}

.snap-cohort-home-proof li + li {
    margin-top: .55rem;
}

.snap-cohort-home-content {
    display: grid;
    gap: clamp(1.25rem, 2vw, 2rem);
}

.snap-cohort-home-content > * {
    margin-block: 0 !important;
}

.snap-cohort-catalog-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.snap-cohort-course-archive .wp-block-post-template {
    align-items: stretch;
    gap: clamp(1rem, 2vw, 1.5rem);
}

.snap-cohort-course-archive .wp-block-post {
    display: flex;
}

.snap-cohort-course-archive .snap-cohort-card {
    width: 100%;
}

.snap-cohort-error-page {
    min-height: min(68vh, 46rem);
}

.snap-cohort-error-page > .snap-cohort-card {
    margin-inline: auto;
    max-width: 52rem;
    padding: clamp(1.5rem, 5vw, 3.5rem) !important;
}

.snap-cohort-error-page h1 {
    font-size: clamp(2.25rem, 6vw, 4.75rem);
    line-height: 1.02;
    max-width: 13ch;
    text-wrap: balance;
}

.snap-cohort-shell--feature .wp-block-post-title {
    margin-bottom: .55rem;
}

.snap-cohort-site-toolbar,
.snap-cohort-site-notification-panel {
    font: inherit;
}

.snap-cohort-site-toolbar {
    align-items: center;
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    margin: 0;
    position: relative;
}

.snap-cohort-site-toolbar__action,
.snap-cohort-site-toolbar__notification {
    align-items: center;
    appearance: none;
    background: color-mix(in srgb, var(--wp--preset--color--surface) 92%, var(--snap-cohort-accent-1));
    border: 1px solid var(--snap-cohort-border);
    border-radius: 999px;
    color: var(--snap-cohort-ink);
    cursor: pointer;
    display: inline-flex;
    font-weight: 600;
    gap: .45rem;
    justify-content: center;
    min-height: 44px;
    padding: .45rem .85rem;
    position: relative;
    transition: background 180ms ease, transform 160ms ease;
}

.snap-cohort-site-toolbar__action:hover,
.snap-cohort-site-toolbar__notification:hover {
    transform: translateY(-1px);
}

.snap-cohort-site-toolbar__notification {
    padding-right: .8rem;
}

/* Fullscreen is a reading aid, not a global site-navigation action. */
body:not(.single-sc_lesson) [data-snap-cohort-fullscreen-toggle] {
    display: none;
}

.snap-cohort-site-toolbar__badge {
    background: #b91c1c;
    border: 2px solid var(--wp--preset--color--surface);
    border-radius: 999px;
    color: #fff;
    font-size: .72rem;
    line-height: 1;
    min-width: 1rem;
    padding: .18rem .38rem;
}

.snap-cohort-site-toolbar__notification[aria-expanded="true"] {
    background: var(--snap-cohort-focus-accent-soft);
}

.snap-cohort-site-toolbar__notification.is-open {
    background: var(--snap-cohort-focus-accent-soft);
}

.snap-cohort-site-notification-panel {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--snap-cohort-border);
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(2, 6, 23, .18);
    color: var(--snap-cohort-ink);
    display: none;
    margin: 0;
    max-width: 30rem;
    padding: .75rem .95rem;
    position: absolute;
    right: 0;
    top: calc(100% + .65rem);
    width: min(30rem, calc(100vw - 2rem));
    z-index: 100;
}

.snap-cohort-site-notification-panel[hidden] {
    display: none;
}

.snap-cohort-site-notification-panel[open] {
    display: block;
}

.snap-cohort-site-notification-panel__title {
    margin: 0 0 .45rem;
}

.snap-cohort-site-notification-panel__item {
    border-bottom: 1px solid var(--snap-cohort-border);
    padding: .5rem 0;
}

.snap-cohort-site-notification-panel__item:last-child {
    border-bottom: 0;
}

.snap-cohort-site-notification-panel__empty {
    color: var(--snap-cohort-muted);
    margin: .35rem 0;
}

.snap-cohort-site-notification-panel.is-open {
    box-shadow:
        0 26px 58px rgba(2, 6, 23, .24),
        0 0 0 1px color-mix(in srgb, var(--snap-cohort-border) 75%, transparent);
}

.snap-cohort-focus-shell {
    box-sizing: border-box;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
    align-items: start;
    width: 100%;
}

.snap-cohort-focus-shell__sidebar {
    box-sizing: border-box;
    background: var(--snap-cohort-sidebar);
    border: 1px solid var(--snap-cohort-border);
    border-radius: var(--snap-cohort-radius-lg);
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    position: sticky;
    min-width: 0;
    top: 84px;
    transition: min-width 160ms ease, opacity 160ms ease, transform 160ms ease, width 160ms ease, padding 160ms ease;
}

body.snap-cohort-focus-overlay-open {
    overflow: hidden;
}

.snap-cohort-focus-shell.is-sidebar-collapsed .snap-cohort-focus-shell__sidebar {
    border-radius: 0 0 var(--snap-cohort-radius-lg) var(--snap-cohort-radius-lg);
}

.snap-cohort-focus-shell.is-sidebar-collapsed .snap-cohort-focus-shell__sidebar {
    min-width: 0;
    opacity: 0;
    padding-inline: 0;
    transform: translateX(16px);
    width: 0;
}

.snap-cohort-focus-shell.is-sidebar-collapsed .snap-cohort-focus-shell__sidebar > * {
    display: none;
}

.snap-cohort-focus-shell__sidebar h3,
.snap-cohort-focus-shell__sidebar h4,
.snap-cohort-focus-shell__sidebar p {
    margin-top: 0;
}

.snap-cohort-focus-shell__sidebar-panel {
    align-items: center;
    display: flex;
    gap: .4rem;
    justify-content: space-between;
}

.snap-cohort-focus-shell__sidebar-panel button {
    border: 1px solid var(--snap-cohort-border);
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    padding: .35rem .7rem;
}

.snap-cohort-focus-shell__sidebar.is-hidden {
    display: none;
}

.snap-cohort-focus-shell__overlay {
    background: rgba(2, 6, 23, 0.22);
    border: 0;
    border-radius: 0;
    bottom: 0;
    cursor: default;
    display: block;
    inset: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity 180ms ease;
    z-index: 95;
}

.snap-cohort-focus-shell__overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.snap-cohort-empty-state,
.snap-cohort-focus-shell__sidebar .snap-cohort-empty-state {
    color: var(--snap-cohort-muted);
    font-size: .95rem;
    margin: 0;
}

.snap-cohort-header-shell {
    container-type: inline-size;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible;
    padding-block: clamp(.625rem, 1vw, .85rem) !important;
    position: relative;
}

header.wp-block-template-part {
    height: auto !important;
    min-height: 0 !important;
}

header.wp-block-template-part .snap-cohort-header-shell,
header.wp-block-template-part .snap-cohort-header-grid {
    max-height: none !important;
}

.snap-cohort-header-shell--sticky {
    border-bottom: 1px solid var(--snap-cohort-border);
    box-shadow: 0 1px 0 rgba(7, 10, 24, .04);
    backdrop-filter: blur(10px);
    /* An opaque enough surface keeps navigation legible over every hero. */
    background: color-mix(in srgb, var(--wp--preset--color--surface) 97%, var(--snap-cohort-bg)) !important;
    top: 0;
    transition: box-shadow 180ms ease, background-color 180ms ease;
}

.snap-cohort-header-shell--sticky.is-scrolled {
    box-shadow: 0 14px 38px rgba(7, 10, 24, .14);
}

.snap-cohort-header-grid {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    gap: .75rem;
    height: auto !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    min-height: 0 !important;
    overflow: visible;
    width: 100%;
    justify-items: stretch;
}

.snap-cohort-header-grid > .snap-cohort-header-grid__brand,
.snap-cohort-header-grid > .snap-cohort-header-grid__nav,
.snap-cohort-header-grid > .snap-cohort-header-grid__actions {
    margin: 0 !important;
    max-width: 100% !important;
}

.snap-cohort-header-grid__brand {
    display: flex;
    gap: .6rem;
    min-width: 0;
    align-items: center;
}

.snap-cohort-header-grid__brand .wp-block-site-title,
.snap-cohort-header-grid__brand a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.snap-cohort-header-grid__brand .wp-block-site-title a,
.snap-cohort-header-grid__nav a {
    color: var(--snap-cohort-ink) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.snap-cohort-header-grid__nav a:hover,
.snap-cohort-header-grid__nav a:focus-visible {
    color: var(--snap-cohort-accent-1);
}

.snap-cohort-header-grid__nav {
    contain: inline-size;
    grid-column: 2;
    justify-self: center;
    min-width: 0;
    overflow: hidden;
    width: 100% !important;
}

.snap-cohort-header-grid__nav nav {
    justify-content: flex-start;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.snap-cohort-header-grid__nav .wp-block-navigation__container,
.snap-cohort-header-grid__nav .wp-block-page-list {
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
}

.snap-cohort-header-grid__nav .wp-block-navigation__container {
    gap: .15rem;
}

.snap-cohort-header-grid__nav .wp-block-navigation-item__content {
    padding: .3rem .52rem;
}

.snap-cohort-header-grid__nav .wp-block-page-list::-webkit-scrollbar {
    display: none;
}

.snap-cohort-header-grid__actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: .65rem;
    justify-content: flex-end;
    width: max-content;
}

.snap-cohort-header-grid__actions .wp-block-button__link {
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--snap-cohort-accent-1) 55%, var(--snap-cohort-border));
    color: var(--snap-cohort-ink);
    min-height: 44px;
    padding: .6rem 1rem;
}

.snap-cohort-header-grid__actions .wp-block-button__link:hover,
.snap-cohort-header-grid__actions .wp-block-button__link:focus-visible {
    background: var(--snap-cohort-accent-1);
    color: var(--snap-cohort-on-accent);
}

/* A custom Gutenberg background may be deliberately light. Do not force a
 * white foreground here: WordPress' paired text color remains authoritative.
 * The Snap Cohort filled style keeps its own contrast-safe foreground above. */
.wp-block-button.is-style-fill .wp-block-button__link:not(.has-text-color) {
    color: var(--snap-cohort-on-accent) !important;
}

.wp-block-template-part > header,
.wp-block-template-part > header > .snap-cohort-header-shell {
    height: auto !important;
    min-height: 0 !important;
}

.snap-cohort-footer-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(var(--snap-cohort-footer-columns), minmax(0, 1fr));
}

body.snap-cohort-header-sticky .snap-cohort-header-shell--sticky {
    position: sticky;
    top: calc(var(--snap-cohort-adminbar-height, 0px));
    z-index: 80;
}

body.snap-cohort-header-sticky .snap-cohort-site-toolbar { z-index: 90; }

/* Keep a single, compact desktop row until the header genuinely lacks room. */
@container (max-width: 980px) {
    .snap-cohort-header-grid { grid-template-columns: minmax(0, 1fr) auto; }
    .snap-cohort-header-grid__nav { grid-column: 1 / -1; grid-row: 2; }
    .snap-cohort-header-grid__actions { grid-column: 2; grid-row: 1; }
}

.snap-cohort-card,
.snap-cohort-shell--feature {
    padding: var(--snap-cohort-space-card) !important;
}

/* Editorial panels should frame content, not become large empty canvases. */
.snap-cohort-front-page__header {
    gap: .75rem;
    padding: clamp(1.25rem, 2.2vw, 1.85rem) !important;
}

.snap-cohort-front-page__header .wp-block-post-title {
    margin-block: 0 .5rem;
}

.snap-cohort-front-page__header .wp-block-post-excerpt {
    margin-block: 0;
}

/* Plugin cards own their inner spacing; avoid stacking theme and component padding. */
.snap-cohort-card:has(> .snap-cohort-card__body) {
    padding: 0 !important;
}

.snap-cohort-card > :first-child,
.snap-cohort-shell--feature > :first-child { margin-top: 0; }

.snap-cohort-card > :last-child,
.snap-cohort-shell--feature > :last-child { margin-bottom: 0; }

.snap-cohort-card ul,
.snap-cohort-shell--feature ul {
    margin-block: 1rem 0;
    padding-inline-start: 1.35rem;
}

.snap-cohort-card li + li,
.snap-cohort-shell--feature li + li { margin-top: .55rem; }

@media (max-width: 980px) {
    .snap-cohort-home-hero { grid-template-columns: 1fr; }
    .snap-cohort-home-hero > :first-child { max-width: 100%; }
    .snap-cohort-home-hero .wp-block-post-title { max-width: 16ch; }
    .snap-cohort-header-grid { grid-template-columns: minmax(0, 1fr) auto; }
    .snap-cohort-header-grid__nav { grid-column: 1 / -1; grid-row: 2; }
    .snap-cohort-header-grid__actions .wp-block-buttons { display: none; }
}

@media (max-width: 600px) {
    :root { --snap-cohort-shell-padding-inline: 1rem; --snap-cohort-space-card: 1.15rem; }
    .snap-cohort-site-toolbar { gap: .35rem; }
    .snap-cohort-site-toolbar__action { padding-inline: .75rem; }
    .snap-cohort-site-toolbar__action[data-snap-cohort-theme-toggle] > :last-child,
    .snap-cohort-site-toolbar__action[data-snap-cohort-fullscreen-toggle] {
        display: none;
    }
    .snap-cohort-header-grid {
        gap: .6rem;
        grid-template-columns: minmax(0, 1fr) auto auto;
    }
    .snap-cohort-header-grid__brand {
        overflow: visible;
    }
    .snap-cohort-header-grid__brand .wp-block-site-title {
        font-size: 1rem !important;
        line-height: 1.2;
        max-width: 11rem;
    }
    .snap-cohort-header-grid__nav {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        min-width: 44px;
        overflow: visible;
    }
    .snap-cohort-header-grid__actions {
        grid-column: 2;
        grid-row: 1;
    }
    .snap-cohort-home-hero > :first-child { padding: 0; }
    .snap-cohort-home-hero .wp-block-post-title,
    .snap-cohort-home-hero > :first-child > p:first-child { text-align: left !important; }
    .snap-cohort-home-hero .wp-block-buttons {
        align-items: stretch;
        display: grid;
        gap: .75rem;
        grid-template-columns: 1fr;
    }
    .snap-cohort-home-hero .wp-block-button,
    .snap-cohort-home-hero .wp-block-button__link { width: 100%; }
    .snap-cohort-home-hero .wp-block-button__link { justify-content: center; }
}

.snap-cohort-header-toolbar-placeholder {
    border-left: 2px dashed transparent;
    color: var(--snap-cohort-muted);
    font-size: .85rem;
}

.snap-cohort-focus-shell__reader-card {
    background: linear-gradient(160deg, var(--snap-cohort-focus-accent-soft), transparent 45%);
    border: 1px solid var(--snap-cohort-border);
    border-radius: var(--snap-cohort-radius-lg);
    box-shadow: var(--snap-cohort-shadow-sm);
    padding: clamp(1.25rem, 2.6vw, 2.25rem);
}

.snap-cohort-reading-progress {
    background: color-mix(in srgb, var(--snap-cohort-border) 72%, transparent);
    height: 3px;
    inset: auto 0 0;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
}

.snap-cohort-reading-progress::after {
    background: linear-gradient(90deg, var(--snap-cohort-accent-1), var(--snap-cohort-accent-2));
    content: "";
    display: block;
    height: 100%;
    transform: scaleX(calc(var(--snap-cohort-reading-progress) / 100%));
    transform-origin: left center;
    width: 100%;
}

.snap-cohort-focus-shell__reader-card > .wp-block-post-title,
.snap-cohort-focus-shell__reader-card > h1 {
    max-width: 18ch;
    text-wrap: balance;
}

.snap-cohort-focus-shell__reader-card + :where(h2, .wp-block-heading) {
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

main.snap-cohort-shell > .snap-cohort-card:first-child {
    background:
        radial-gradient(100% 140% at 100% 0%, var(--snap-cohort-accent-soft), transparent 62%),
        var(--wp--preset--color--surface);
}

main.snap-cohort-shell > .wp-block-post-excerpt {
    color: var(--snap-cohort-muted);
    font-size: clamp(1.15rem, 2.1vw, 1.8rem);
    line-height: 1.45;
    max-width: 52rem;
}

.snap-cohort-focus-shell__header {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

@media (max-width: 980px) {
    .snap-cohort-focus-shell {
        grid-template-columns: 1fr;
    }

    .snap-cohort-focus-shell__sidebar {
        position: static;
    }

    .snap-cohort-focus-shell.is-sidebar-collapsed .snap-cohort-focus-shell__overlay,
    .snap-cohort-focus-shell:not(.is-mobile-overlay-enabled) .snap-cohort-focus-shell__overlay {
        display: none;
        opacity: 0;
        pointer-events: none;
    }

    .snap-cohort-focus-shell.is-mobile-overlay-enabled .snap-cohort-focus-shell__overlay {
        display: block;
    }

    .snap-cohort-focus-shell.is-mobile-overlay-enabled .snap-cohort-focus-shell__sidebar {
        position: fixed;
        top: calc(72px + var(--snap-cohort-adminbar-height, 0px));
        left: auto;
        right: clamp(0.75rem, 2vw, 1.5rem);
        width: min(360px, calc(100vw - 2rem));
        max-height: calc(100dvh - 90px);
        overflow: auto;
        overscroll-behavior: contain;
        transform: translateX(120%);
        transition:
            transform 180ms ease,
            opacity 180ms ease;
    }

    .snap-cohort-focus-shell.is-mobile-overlay-enabled:not(.is-sidebar-collapsed) .snap-cohort-focus-shell__sidebar {
        border-radius: var(--snap-cohort-radius-lg);
        opacity: 1;
        transform: translateX(0);
    }

    .snap-cohort-focus-shell.is-mobile-overlay-enabled.is-sidebar-collapsed .snap-cohort-focus-shell__sidebar {
        opacity: 0;
        visibility: hidden;
        width: min(360px, calc(100vw - 2rem));
        transform: translateX(120%);
        pointer-events: none;
    }

    .snap-cohort-focus-shell.is-mobile-overlay-enabled.is-sidebar-collapsed .snap-cohort-focus-shell__sidebar > * {
        display: block;
    }

    .snap-cohort-focus-shell.is-mobile-overlay-enabled .snap-cohort-focus-shell__overlay {
        inset: 0;
        pointer-events: none;
    }

    .snap-cohort-focus-shell.is-mobile-overlay-enabled.is-mobile-overlay-open .snap-cohort-focus-shell__overlay {
        pointer-events: auto;
    }
}

@media (max-width: 780px) {
    main .wp-block-group.alignwide.snap-cohort-pattern-section {
        width: 100%;
        max-width: 100%;
        margin-inline: 0 !important;
    }

    .is-layout-constrained,
    .wp-block-query .wp-block-group,
    .wp-block-columns {
        margin-left: 0;
        margin-right: 0;
    }

    .wp-block-query .wp-block-post-template {
        grid-template-columns: 1fr;
    }

    main.snap-cohort-shell {
        padding-block: 1.25rem !important;
    }

    .snap-cohort-focus-shell__reader-card {
        padding: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .snap-cohort-fse-skip-link {
        transition: none;
    }

    .snap-cohort-card,
    .wp-block-button__link,
    button,
    input[type="submit"] {
        transition: none;
    }

    .snap-cohort-reading-progress::after,
    .snap-cohort-header-shell--sticky,
    .snap-cohort-focus-shell__sidebar,
    .snap-cohort-focus-shell__overlay {
        transition: none;
    }
}
