@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap");

:root {
    color-scheme: light;
    --bg: #f6f3eb;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #fffdf8;
    --line: rgba(42, 52, 65, 0.12);
    --text: #18212b;
    --muted: #5c6774;
    --brand: #0f766e;
    --brand-strong: #0b5f58;
    --accent: #d7df4a;
    --accent-soft: #f4f7c8;
    --danger: #b34747;
    --success: #1e8c5b;
    --shadow: 0 28px 80px rgba(24, 33, 43, 0.12);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

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

html, body { margin: 0; min-height: 100%; overflow-x: hidden; }

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 24%),
        radial-gradient(circle at top right, rgba(215, 223, 74, 0.12), transparent 18%),
        linear-gradient(180deg, #faf7f0 0%, #f2eee4 100%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.site-shell { min-height: 100vh; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.hero-grid > *,
.stats-grid > *,
.card-grid > *,
.plans-grid > *,
.dashboard-grid > *,
.course-grid > *,
.pricing-editorial > *,
.footer-grid > * {
    min-width: 0;
}
.eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--brand);
    font-weight: 800;
}
.muted { color: var(--muted); }
.flash {
    margin: 20px auto 0;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fff;
}
.flash-success { border-color: rgba(30, 140, 91, 0.24); }
.flash-error { border-color: rgba(179, 71, 71, 0.24); }
.flash-warning { border-color: rgba(196, 107, 45, 0.28); background: rgba(255, 248, 237, 0.92); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(251, 247, 239, 0.82);
    border-bottom: 1px solid rgba(24, 33, 43, 0.06);
}
.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 82px;
}
.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-lockup > span:last-child { min-width: 0; }
.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #164e63);
    box-shadow: 0 18px 32px rgba(15, 118, 110, 0.26);
}
.brand-logo-shell {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(24,33,43,.08);
    box-shadow: 0 18px 32px rgba(15, 118, 110, 0.12);
}
.brand-logo-shell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.brand-lockup strong { display: block; font-size: 18px; }
.brand-lockup small { color: var(--muted); }
.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.site-nav-shell {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.site-mobile-menu {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 42;
    width: min(380px, calc(100vw - 28px));
    display: none;
    align-items: stretch;
    align-content: stretch;
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform .28s ease, opacity .2s ease;
}

.site-mobile-menu > summary {
    display: none;
}

.site-mobile-menu > span {
    display: none;
}

.site-mobile-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 18px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 30px rgba(24, 33, 43, 0.08);
    cursor: pointer;
}

.site-mobile-trigger-icon {
    display: grid;
    gap: 4px;
    width: 20px;
}

.site-mobile-trigger-icon span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
    transition: transform .24s ease, opacity .2s ease;
}

.site-mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 41;
    background: rgba(24, 33, 43, 0.26);
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s ease;
}

.site-mobile-panel {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 20px 18px 24px;
    border-radius: 0 28px 28px 0;
    border-right: 1px solid rgba(24, 33, 43, 0.08);
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,253,.98)),
        #fff;
    box-shadow: 0 28px 80px rgba(24, 33, 43, 0.18);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.site-mobile-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(24, 33, 43, 0.08);
}

.site-mobile-panel-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.site-mobile-panel-copy strong {
    font-size: 16px;
}

.site-mobile-panel-copy small {
    color: var(--muted);
    font-size: 12px;
}

.site-mobile-close {
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid rgba(24, 33, 43, 0.08);
    border-radius: 16px;
    background: rgba(255,255,255,.94);
    cursor: pointer;
}

.site-mobile-close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--text);
}

.site-mobile-close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.site-mobile-close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.site-mobile-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(24, 33, 43, 0.08);
}

.site-mobile-links,
.site-mobile-actions {
    display: grid;
    gap: 10px;
    width: 100%;
}

.site-mobile-links {
    padding-top: 4px;
}

.site-mobile-links .nav-item,
.site-mobile-actions .button-secondary {
    display: flex;
    width: 100%;
    justify-content: flex-start;
}
.site-mobile-actions .button,
.site-mobile-actions .button-secondary {
    width: 100%;
}

body.mobile-nav-open {
    overflow: hidden;
}

body.mobile-nav-open .site-mobile-menu {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

body.mobile-nav-open .site-mobile-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.mobile-nav-open .site-mobile-trigger-icon span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.mobile-nav-open .site-mobile-trigger-icon span:nth-child(2) {
    opacity: 0;
}

body.mobile-nav-open .site-mobile-trigger-icon span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}
.nav-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
}
.nav-item-icon {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}
.nav-item-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}
.nav-item-label {
    min-width: 0;
}
.nav-item-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}
.nav-item.is-active,
.nav-item:hover { background: rgba(15, 118, 110, 0.08); color: var(--text); }
.nav-item.is-cta {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
}
.site-user-menu {
    position: relative;
}
.site-user-menu summary {
    list-style: none;
}
.site-user-menu summary::-webkit-details-marker {
    display: none;
}
.site-user-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 8px 8px;
    border-radius: 999px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    background: rgba(255,255,255,.92);
    box-shadow: 0 12px 28px rgba(24, 33, 43, 0.08);
    cursor: pointer;
}
.site-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand), #1d4d3d);
}
.site-user-copy {
    display: grid;
    min-width: 0;
}
.site-user-copy strong {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-user-copy small {
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    display: grid;
    gap: 6px;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    background: rgba(255,255,255,.98);
    box-shadow: 0 24px 50px rgba(24, 33, 43, 0.14);
}
.site-user-dropdown a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    font-weight: 600;
}
.site-user-dropdown a:hover {
    background: rgba(15, 118, 110, 0.08);
}
.site-nav:empty {
    display: none;
}

.hero {
    padding: 72px 0 36px;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 28px;
    align-items: stretch;
}
.hero-card,
.glass-card,
.portal-card,
.course-card,
.plan-card,
.auth-card {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.58);
    border-radius: var(--radius-xl);
    box-shadow: 0 22px 58px rgba(24, 33, 43, 0.10);
}
.hero-copy {
    padding: 38px;
}
.hero-copy h1,
.page-title {
    margin: 0 0 18px;
    font-family: "Fraunces", serif;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-wrap: balance;
}
.hero-actions, .inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}
.button,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 700;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.button {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.18);
}
.button-secondary {
    background: rgba(255,255,255,.66);
    color: var(--text);
    border-color: rgba(24, 33, 43, 0.08);
}
.button:hover,
.button-secondary:hover {
    transform: translateY(-1px);
}

.page-shell {
    padding: 8px 0 40px;
}
.hero-panel {
    padding: 30px;
    background:
        linear-gradient(160deg, rgba(15, 118, 110, 0.88), rgba(24, 33, 43, 0.92)),
        #123;
    color: #f8fafc;
}
.hero-visual-panel {
    display: grid;
    gap: 18px;
}
.hero-media-shell,
.feature-visual,
.pricing-media,
.footer-brand-media {
    overflow: hidden;
    border-radius: 24px;
}
.hero-media-shell {
    min-height: 280px;
    border: 1px solid rgba(255,255,255,.12);
}
.hero-media-shell img,
.feature-visual img,
.pricing-media img,
.footer-brand-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-placeholder,
.pricing-placeholder,
.footer-brand-placeholder {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 28px;
    border-radius: 24px;
    overflow: hidden;
}
.hero-placeholder,
.pricing-placeholder {
    min-height: 260px;
    background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
    border: 1px dashed rgba(255,255,255,.22);
}
.footer-brand-placeholder {
    min-height: 96px;
    place-content: center;
    background: rgba(255,255,255,.72);
    border: 1px dashed rgba(24,33,43,.16);
    color: var(--text);
}
.hero-placeholder-copy,
.pricing-placeholder {
    position: relative;
    z-index: 1;
}
.hero-placeholder-copy strong,
.pricing-placeholder strong,
.footer-brand-placeholder strong {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
}
.hero-mini-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.hero-mini-card {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.14);
}
.hero-mini-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}
.hero-mini-card span {
    color: rgba(248, 250, 252, .88);
    font-size: 12px;
}
.hero-placeholder-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
}
.orb-one {
    width: 180px;
    height: 180px;
    top: -18px;
    right: -20px;
    background: rgba(255,255,255,.18);
}
.orb-two {
    width: 120px;
    height: 120px;
    bottom: 12px;
    left: 18px;
    background: rgba(244, 247, 200, .36);
}
.hero-stat-grid,
.stats-grid,
.card-grid,
.plans-grid,
.dashboard-grid,
.course-grid,
.pricing-editorial {
    display: grid;
    gap: 18px;
}
.hero-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 24px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 30px 0; }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.plans-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-grid { grid-template-columns: 1.1fr .9fr; margin: 32px 0; }
.course-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pricing-editorial { grid-template-columns: minmax(280px, .95fr) minmax(0, 1.05fr); margin-bottom: 18px; }

.stat-tile,
.metric,
.feature-card,
.faq-card,
.course-card,
.plan-card,
.portal-card {
    padding: 22px;
}
.metric strong,
.stat-tile strong {
    display: block;
    font-size: 28px;
    margin-bottom: 6px;
}
.section {
    padding: 28px 0;
}
.section-head {
    margin-bottom: 18px;
}
.section-head h2, .section-head h3 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 38px);
    font-family: "Fraunces", serif;
    letter-spacing: -0.03em;
}

.feature-card h3,
.plan-card h3,
.course-card h3,
.portal-card h3,
.faq-card h3 {
    margin-top: 0;
}
.feature-visual {
    min-height: 170px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(196, 107, 45, 0.16));
}
.feature-visual-compact {
    min-height: 120px;
}
.feature-placeholder {
    display: grid;
    place-items: center;
    min-height: 170px;
    margin-bottom: 16px;
    border-radius: 22px;
    border: 1px dashed rgba(24,33,43,.14);
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.08), rgba(196, 107, 45, 0.1));
    color: var(--brand-strong);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 12px;
    font-weight: 800;
}
.feature-placeholder-pricing {
    min-height: 120px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: inherit;
    font-size: 12px;
    font-weight: 700;
}

.auth-wrap {
    min-height: calc(100vh - 82px);
    display: grid;
    place-items: center;
    padding: 40px 0;
}
.auth-card {
    width: min(620px, 100%);
    padding: 34px;
}
.auth-card-verify {
    width: min(720px, 100%);
}

.field-group {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}
.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.field {
    display: grid;
    gap: 8px;
}
.field span {
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}
.field input,
.field textarea,
.field select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.9);
    color: var(--text);
}
.field textarea { min-height: 120px; resize: vertical; }
.verify-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}
.verify-summary-item {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,247,244,.92));
}
.verify-summary-item strong {
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand);
}
.verify-summary-item span {
    color: var(--muted);
    line-height: 1.55;
}
.otp-shell {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.otp-input {
    min-height: 64px;
    padding: 0;
    text-align: center;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.04em;
    border-radius: 18px;
    border: 1px solid rgba(24, 33, 43, 0.12);
    background: rgba(255,255,255,.94);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.otp-input:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.45);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.page-shell { padding: 42px 0 60px; }
.portal-card + .portal-card { margin-top: 18px; }
.portal-card {
    display: grid;
    gap: 14px;
}
.status-chip,
.lock-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}
.status-chip.active { background: rgba(30, 140, 91, 0.12); color: var(--success); }
.status-chip.pending { background: rgba(196, 107, 45, 0.14); color: var(--accent); }
.status-chip.expired, .status-chip.cancelled { background: rgba(179, 71, 71, 0.12); color: var(--danger); }
.lock-chip { background: rgba(24, 33, 43, 0.08); color: var(--muted); }

.course-card.locked { border: 1px solid rgba(196, 107, 45, 0.26); }
.course-card.open { border: 1px solid rgba(30, 140, 91, 0.24); }
.course-reader-hero {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}
.course-reader-hero-copy {
    display: grid;
    gap: 8px;
}
.course-reader-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.metric-tile {
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    background: rgba(255,255,255,.72);
}
.metric-tile strong,
.metric-tile span {
    display: block;
}
.metric-tile span {
    color: var(--muted);
    margin-top: 6px;
    font-size: 13px;
}
.course-progress-bar {
    width: 100%;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(24, 33, 43, 0.08);
}
.course-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand), var(--accent));
}
.course-meta,
.list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}
.list-stack {
    display: grid;
    gap: 12px;
}
.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    background: rgba(255,255,255,.68);
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.activity-item:hover {
    border-color: rgba(15, 118, 110, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(24, 33, 43, 0.06);
}
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(24, 33, 43, 0.08);
    background: rgba(255,255,255,.76);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}
.rich-html {
    color: var(--text);
    display: grid;
    gap: 18px;
    line-height: 1.75;
}
.rich-html p, .rich-html li { color: var(--muted); }
.rich-html > * {
    min-width: 0;
}
.rich-html [data-block-type] {
    position: relative;
    padding: 1.1rem 1.2rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(24, 33, 43, 0.1);
}
.rich-html [data-block-type]::before {
    display: inline-flex;
    margin-bottom: 0.7rem;
    padding: 0.28rem 0.68rem;
    border-radius: 999px;
    background: rgba(24, 33, 43, 0.08);
    color: #18212b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.rich-html [data-block-type="chapter"] { background: #f8f4eb; border-color: #dbcba8; }
.rich-html [data-block-type="chapter"]::before { content: "Chapitre"; }
.rich-html [data-block-type="section"] { background: #f4f1ff; border-color: #cfc4f5; }
.rich-html [data-block-type="section"]::before { content: "Section"; }
.rich-html [data-block-type="learning-objective"] { background: #eef8f7; border-color: #9fd0c8; }
.rich-html [data-block-type="learning-objective"]::before { content: "Objectif pedagogique"; }
.rich-html [data-block-type="summary"] { background: #f7f9f0; border-color: #bfd39d; }
.rich-html [data-block-type="summary"]::before { content: "Resume"; }
.rich-html [data-block-type="exercise"] { background: #fdf3ef; border-color: #e8b8a3; }
.rich-html [data-block-type="exercise"]::before { content: "Exercice"; }
.rich-html [data-block-type="important"] { background: #fff7eb; border-color: #efc98e; }
.rich-html [data-block-type="important"]::before { content: "Point important"; }
.rich-html [data-block-type="resource"] { background: #f3f9ed; border-color: #bbd3a1; }
.rich-html [data-block-type="resource"]::before { content: "Ressource"; }
.rich-html [data-block-type="note"] { background: #eff6ff; border-color: #9dc1f2; }
.rich-html [data-block-type="note"]::before { content: "Note"; }
.rich-html [data-block-type="warning"] { background: #fff6e8; border-color: #efcf9a; }
.rich-html [data-block-type="warning"]::before { content: "Avertissement"; }
.rich-html [data-block-type="info"] { background: #eef5ff; border-color: #b5c9f0; }
.rich-html [data-block-type="info"]::before { content: "Information"; }
.rich-html [data-block-type="success"] { background: #edf8ef; border-color: #9dceaa; }
.rich-html [data-block-type="success"]::before { content: "Succes"; }
.rich-html [data-block-type="boxed"] { background: #ffffff; border: 2px solid #d9cebe; }
.rich-html [data-block-type="boxed"]::before { content: "Bloc encadre"; }
.rich-html .eb-image-figure {
    margin: 1.4rem auto;
    text-align: center;
}
.rich-html .eb-image-figure figcaption {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.92rem;
}
.rich-html-figure {
    margin: 0;
}
.rich-html-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}
.rich-html-image,
.rich-html img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(24, 33, 43, 0.12);
    margin: 0;
    float: none !important;
}
.rich-html p:has(img),
.rich-html div:has(img),
.rich-html figure:has(img) {
    margin: 0;
}

.course-reader-card {
    padding: 0;
    overflow: hidden;
}

.course-reader-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    gap: 0;
}

.course-reader-toc {
    padding: 22px 18px;
    border-right: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 250, 252, 0.9);
}

.course-toc-head {
    font-weight: 800;
    margin-bottom: 12px;
}

.course-toc-list {
    display: grid;
    gap: 10px;
}

.course-toc-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    color: #1a273a;
    font-weight: 600;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
}

.course-toc-link.level-2 {
    margin-left: 10px;
    font-weight: 500;
    color: #3d4c62;
}

.course-toc-link.level-3 {
    margin-left: 18px;
    font-weight: 500;
    color: #5a6a83;
}

.course-toc-link.is-active {
    background: rgba(15, 118, 110, 0.12);
    color: #0b5f58;
}

.course-reader-content {
    padding: 26px 26px 30px;
    position: relative;
    max-height: 78vh;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.course-reader-content::after {
    content: var(--reader-watermark, "");
    position: absolute;
    inset: 12% 8% auto auto;
    font-size: clamp(34px, 5vw, 72px);
    font-weight: 800;
    letter-spacing: .08em;
    color: rgba(15, 118, 110, 0.05);
    pointer-events: none;
    transform: rotate(-18deg);
}

.course-reader-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.course-reader-save-state {
    margin-bottom: 16px;
}

.course-back-to-top {
    position: sticky;
    bottom: 18px;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 0;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 16px 36px rgba(15, 118, 110, 0.22);
}

.course-reader-content h1,
.course-reader-content h2,
.course-reader-content h3 {
    scroll-margin-top: 90px;
}

.course-toc-toggle {
    display: none;
    margin-bottom: 16px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #f8fafc;
    color: #0b5f58;
    font-weight: 700;
}

.course-toc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 12, 18, 0.4);
    z-index: 40;
}

.course-toc-drawer {
    position: fixed;
    right: 18px;
    left: 18px;
    bottom: 18px;
    max-height: 70vh;
    overflow: auto;
    padding: 18px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.2);
    z-index: 41;
}

.course-toc-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.course-toc-close {
    border: none;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
}

@media (max-width: 980px) {
    .course-reader-hero-stats {
        grid-template-columns: 1fr;
    }

    .course-reader-layout {
        grid-template-columns: 1fr;
    }

    .course-reader-toc {
        display: none;
    }

    .course-reader-content {
        padding: 20px 18px 26px;
    }

    .course-toc-toggle {
        display: inline-flex;
    }
}

body.course-focus-mode .site-header,
body.course-focus-mode .site-footer,
body.course-focus-mode .assistant-widget,
body.course-focus-mode .course-reader-toc,
body.course-focus-mode .course-reader-hero {
    display: none !important;
}

body.course-focus-mode .page-shell {
    padding-top: 18px;
}

body.course-focus-mode .course-reader-card,
body.course-focus-mode .course-reader-content {
    border-radius: 26px;
}

@media (max-width: 720px) {
    .verify-summary {
        grid-template-columns: 1fr;
    }

    .otp-shell {
        gap: 8px;
    }

    .otp-input {
        min-height: 56px;
        font-size: 22px;
    }
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255,255,255,.7);
    -webkit-overflow-scrolling: touch;
}
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}
th, td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}
th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.site-footer {
    margin-top: 48px;
    padding: 42px 0 60px;
    border-top: 1px solid rgba(24,33,43,.08);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr .8fr .8fr;
    gap: 28px;
}
.footer-links {
    display: grid;
    gap: 10px;
    color: var(--muted);
}
.footer-brand-media,
.footer-brand-placeholder {
    max-width: 220px;
    margin-bottom: 16px;
}
.footer-brand-media {
    min-height: 96px;
    border: 1px solid rgba(24,33,43,.08);
    background: #fff;
}
.footer-note {
    margin-top: 12px;
}

.payment-method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.payment-method-card {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.72);
}

.payment-method-card strong,
.payment-method-card span {
    display: block;
}

.payment-method-card span {
    color: var(--muted);
    margin-top: 4px;
    font-size: 13px;
}

.payment-method-card p {
    margin: 10px 0 0;
    font-size: 13px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.conversation-shell {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
}

.conversation-page-shell {
    padding-bottom: 28px;
}

.conversation-page-title {
    margin-bottom: 10px;
    font-size: clamp(2.2rem, 4vw, 3.4rem) !important;
}

.conversation-page-copy {
    max-width: 72ch;
    margin-bottom: 20px;
}

.conversation-shell-single {
    grid-template-columns: 1fr;
}

.conversation-sidebar,
.conversation-main,
.conversation-profile-card,
.conversation-empty-state {
    background: var(--surface);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.conversation-sidebar,
.conversation-main,
.conversation-empty-state {
    padding: 24px;
}

.conversation-sidebar {
    display: grid;
    gap: 18px;
}

.conversation-sidebar-head h2,
.conversation-thread-head h2,
.conversation-profile-card h3,
.conversation-empty-state h2 {
    margin: 0;
    font-family: "Fraunces", serif;
    letter-spacing: -0.03em;
}

.conversation-main {
    display: grid;
    grid-template-rows: auto minmax(360px, 1fr) auto;
    gap: 18px;
    min-height: 680px;
    height: min(76vh, 860px);
    overflow: hidden;
}

.conversation-main-full {
    min-height: 620px;
}

.conversation-thread-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(24, 33, 43, 0.08);
    flex: 0 0 auto;
}

.conversation-thread {
    display: grid;
    gap: 14px;
    align-content: start;
    overflow-y: auto;
    min-height: 0;
    padding-right: 6px;
    padding-bottom: 8px;
    scroll-behavior: smooth;
}

.conversation-item {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 82%;
}

.conversation-item.is-outgoing {
    margin-left: auto;
    flex-direction: row-reverse;
}

.conversation-avatar {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #294150, #18212b);
    box-shadow: 0 18px 30px rgba(24, 33, 43, 0.14);
    overflow: hidden;
}

.conversation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conversation-avatar-assistant,
.conversation-avatar-teacher {
    background: linear-gradient(135deg, var(--brand), #14532d);
}

.conversation-avatar-staff {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
}

.conversation-bubble-shell {
    display: grid;
    gap: 6px;
    min-width: 0;
    max-width: min(100%, 680px);
}

.conversation-meta-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.conversation-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.conversation-time,
.conversation-role {
    font-size: 12px;
    color: var(--muted);
}

.conversation-bubble {
    padding: 16px 18px;
    border-radius: 22px 22px 22px 8px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(24, 33, 43, 0.08);
    line-height: 1.65;
    color: var(--text);
    box-shadow: 0 16px 30px rgba(24, 33, 43, 0.06);
}

.conversation-item.is-outgoing .conversation-bubble {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    border-color: transparent;
    border-radius: 22px 22px 8px 22px;
}

.conversation-composer {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid rgba(24, 33, 43, 0.08);
    flex: 0 0 auto;
    background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.96));
}

.conversation-composer textarea,
.assistant-composer textarea {
    min-height: 76px;
    max-height: 180px;
    resize: vertical;
}

.conversation-composer-bar,
.assistant-composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.conversation-state,
.assistant-send-state {
    color: var(--muted);
    font-size: 13px;
}

.conversation-profile-card {
    padding: 22px;
    display: grid;
    gap: 16px;
    align-content: start;
}

.conversation-profile-head {
    display: flex;
    gap: 14px;
    align-items: center;
}

.conversation-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.conversation-profile-role,
.assistant-presence-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(24,33,43,.06);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.conversation-profile-copy {
    margin: 0;
    line-height: 1.7;
}

.conversation-profile-stack {
    display: grid;
    gap: 12px;
}

.conversation-profile-stat {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.76);
    border: 1px solid rgba(24,33,43,.08);
}

.conversation-profile-stat span,
.room-list-item span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.conversation-profile-stat strong {
    display: block;
    margin-top: 6px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    flex: 0 0 auto;
}

.verified-badge-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    position: relative;
}

.verified-badge-dot::before {
    content: "";
    width: 5px;
    height: 3px;
    border-left: 1.6px solid #fff;
    border-bottom: 1.6px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

.verified-badge-assistant {
    color: #0f5132;
    background: rgba(15, 118, 110, 0.14);
    border: 1px solid rgba(15, 118, 110, 0.2);
}

.verified-badge-assistant .verified-badge-dot {
    background: linear-gradient(135deg, #34d399, #0f766e);
}

.verified-badge-teacher {
    color: #14532d;
    background: rgba(190, 242, 100, 0.22);
    border: 1px solid rgba(101, 163, 13, 0.18);
}

.verified-badge-teacher .verified-badge-dot {
    background: linear-gradient(135deg, #84cc16, #15803d);
}

.verified-badge-staff {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.18);
}

.verified-badge-staff .verified-badge-dot {
    background: linear-gradient(135deg, #60a5fa, #1d4ed8);
}

.room-list {
    display: grid;
    gap: 10px;
}

.room-list-item,
.room-list-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(24,33,43,.08);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.room-list-item strong {
    display: block;
    margin-bottom: 4px;
}

.room-list-item:hover,
.room-list-item.is-active {
    border-color: rgba(15,118,110,.3);
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(15,118,110,.08);
}

.room-list-count {
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(15,118,110,.12);
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
}

.conversation-empty-state {
    display: grid;
    place-items: center;
    text-align: center;
    min-height: 560px;
}

.assistant-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 50;
    max-width: calc(100vw - 24px);
}

.assistant-fab {
    position: relative;
    width: 68px;
    height: 68px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: linear-gradient(135deg, #1aa36f, #0f766e);
    color: #fff;
    box-shadow: 0 20px 45px rgba(15, 118, 110, 0.34);
    display: grid;
    place-items: center;
}

.assistant-fab-ring {
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 1px solid rgba(26, 163, 111, 0.22);
}

.assistant-fab-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.28);
    z-index: 2;
}

.assistant-fab-icon {
    position: relative;
    z-index: 1;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(255,255,255,.16);
    color: #fff;
}

.assistant-fab-icon img,
.assistant-fab-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.assistant-fab-icon img {
    object-fit: cover;
}

.assistant-fab-icon svg {
    width: 26px;
    height: 26px;
}

.assistant-panel {
    position: absolute;
    right: 0;
    bottom: 86px;
    width: min(420px, calc(100vw - 24px));
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(24,33,43,.08);
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(24,33,43,.18);
    overflow: hidden;
    height: min(76vh, 760px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    opacity: 0;
    transform: translateY(18px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}

.assistant-panel-head,
.assistant-panel-body {
    padding: 20px 22px;
}

.assistant-widget.is-open .assistant-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.assistant-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, rgba(15,118,110,.12), rgba(215,223,74,.18));
    border-bottom: 1px solid rgba(24,33,43,.08);
}

.assistant-agent-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.assistant-agent-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1aa36f, #0f766e);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(15,118,110,.18);
}

.assistant-agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.assistant-agent-avatar-generic svg {
    width: 22px;
    height: 22px;
}

.assistant-agent-meta {
    min-width: 0;
}

.assistant-agent-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.assistant-panel-head h3 {
    margin: 0;
    font-family: "Fraunces", serif;
    font-size: 24px;
    line-height: 1;
}

.assistant-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.14);
}

.assistant-status-dot.is-online {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.assistant-head-badge {
    margin-left: 2px;
}

.assistant-panel-close {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 0;
    background: rgba(24,33,43,.08);
    cursor: pointer;
    color: transparent;
    position: relative;
}

.assistant-panel-close::before {
    content: "×";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.assistant-panel-close::before {
    content: "\00D7";
}

.assistant-presence {
    display: none;
}

.assistant-panel-body {
    display: grid;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    background: linear-gradient(180deg, rgba(248,251,247,.82), rgba(255,255,255,.96));
    overflow: hidden;
}

.assistant-thread {
    display: grid;
    gap: 14px;
    max-height: none;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
    scroll-behavior: smooth;
}

.assistant-composer {
    display: grid;
    gap: 12px;
    padding: 16px 22px 20px;
    border-top: 1px solid rgba(24,33,43,.08);
    background: rgba(255,255,255,.96);
}

.assistant-composer textarea {
    width: 100%;
    min-height: 64px;
    max-height: 140px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(24,33,43,.1);
    background: #fff;
    resize: vertical;
}

.assistant-composer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.assistant-send-state {
    color: var(--muted);
    font-size: 13px;
    min-height: 20px;
}

.assistant-intro-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(15,118,110,.08), rgba(255,255,255,.92));
    border: 1px solid rgba(15,118,110,.12);
}

.assistant-intro-card p {
    margin: 0;
    line-height: 1.7;
}

.assistant-guest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 980px) {
    .hero-grid,
    .dashboard-grid,
    .card-grid,
    .plans-grid,
    .course-grid,
    .pricing-editorial,
    .footer-grid,
    .stats-grid,
    .field-row,
    .hero-mini-grid {
        grid-template-columns: 1fr;
    }

    .container {
        width: min(1180px, calc(100% - 24px));
    }

    .nav-bar {
        min-height: 74px;
        padding: 12px 0;
        align-items: center;
    }

    .site-mobile-menu {
        display: grid;
    }

    .site-mobile-trigger {
        display: inline-flex;
    }

    .site-nav-shell {
        display: none;
    }

    .payment-method-grid {
        grid-template-columns: 1fr;
    }

    .conversation-shell {
        grid-template-columns: 1fr;
    }

    .conversation-main {
        min-height: 560px;
        height: min(72vh, 760px);
    }

    .conversation-item {
        max-width: 100%;
    }

    .assistant-widget {
        right: 16px;
        bottom: 16px;
    }

    .assistant-panel {
        width: min(420px, calc(100vw - 16px));
    }

    .site-footer {
        padding-bottom: 96px;
    }
}

@media (max-width: 768px) {
    .container {
        width: calc(100% - 20px);
    }

    .hero {
        padding: 34px 0 20px;
    }

    .hero-copy,
    .glass-card,
    .portal-card,
    .course-card,
    .plan-card,
    .auth-card,
    .conversation-sidebar,
    .conversation-main,
    .conversation-empty-state {
        padding: 18px;
        border-radius: 24px;
    }

    .section {
        padding: 22px 0;
    }

    .hero-copy h1,
    .page-title {
        font-size: clamp(30px, 9vw, 42px);
        line-height: 1.08;
    }

    .button,
    .button-secondary {
        width: 100%;
        min-height: 50px;
    }

    .hero-actions,
    .inline-actions,
    .assistant-guest-actions {
        display: grid;
        gap: 12px;
    }

    .activity-item,
    .room-list-item,
    .room-list-empty {
        align-items: flex-start;
        flex-direction: column;
    }

    .conversation-main {
        height: min(74vh, 700px);
    }

    .conversation-thread-head {
        flex-direction: column;
        align-items: stretch;
    }

    .conversation-meta-line {
        flex-wrap: wrap;
    }

    .conversation-item {
        max-width: 100%;
        gap: 10px;
    }

    .conversation-avatar {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .assistant-fab {
        width: 60px;
        height: 60px;
    }

    .assistant-fab-icon {
        width: 46px;
        height: 46px;
    }

    .rich-html-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15px;
    }

    .container {
        width: calc(100% - 16px);
    }

    .nav-bar {
        gap: 14px;
        align-items: center;
    }

    .brand-lockup {
        gap: 10px;
        min-width: 0;
    }

    .brand-lockup strong {
        font-size: 16px;
    }

    .brand-lockup small {
        display: block;
        font-size: 12px;
    }

    .site-mobile-menu {
        width: calc(100vw - 18px);
    }

    .site-mobile-panel {
        padding: 16px 14px 22px;
        border-radius: 0 24px 24px 0;
    }

    .stats-grid {
        margin: 20px 0;
    }

    .dashboard-grid {
        margin: 22px 0;
    }

    .metric strong {
        font-size: 24px;
    }

    .site-footer {
        margin-top: 34px;
        padding: 34px 0 96px;
    }

    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 560px;
    }

    .conversation-main {
        min-height: 0;
        height: min(76vh, 680px);
    }

    .conversation-bubble {
        padding: 14px 15px;
        font-size: 14px;
    }

    .conversation-composer,
    .assistant-composer {
        gap: 10px;
    }

    .conversation-composer textarea,
    .assistant-composer textarea {
        min-height: 68px;
    }

    .assistant-widget {
        right: 10px;
        bottom: 10px;
        max-width: calc(100vw - 20px);
    }

    .assistant-panel {
        width: calc(100vw - 20px);
        right: 0;
        bottom: 74px;
        border-radius: 22px;
        height: min(82vh, 720px);
    }

    .assistant-panel-head,
    .assistant-panel-body,
    .assistant-composer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .assistant-panel-head h3 {
        font-size: 22px;
    }

    .assistant-composer-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 420px) {
    .hero-copy,
    .glass-card,
    .portal-card,
    .course-card,
    .plan-card,
    .auth-card,
    .conversation-sidebar,
    .conversation-main,
    .conversation-empty-state {
        padding: 16px;
        border-radius: 20px;
    }

    .eyebrow {
        font-size: 11px;
        letter-spacing: .12em;
    }

    .conversation-item {
        align-items: flex-start;
    }

    .conversation-avatar {
        width: 36px;
        height: 36px;
    }

    .assistant-fab {
        width: 56px;
        height: 56px;
    }

    .assistant-fab-icon {
        width: 42px;
        height: 42px;
    }

    table {
        min-width: 520px;
    }
}
