:root {
    color-scheme: light;
    --ink: #0a1930;
    --ink-soft: #274056;
    --muted: #53637a;
    --teal: #007f76;
    --teal-dark: #006960;
    --bright: #00bfae;
    --line: #dde7eb;
    --surface: #fff;
    --surface-soft: #f4f8f9;
    --surface-tint: #eff9f8;
    --yellow: #ffd23b;
    --error: #a53225;
    font-family: "DM Sans", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--surface);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; display: flex; flex-direction: column; }
h1, h2, h3 { font-family: Manrope, "DM Sans", "Segoe UI", Arial, sans-serif; line-height: 1.2; }
p { margin: 0 0 1rem; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: 16px; top: -100px; z-index: 50; padding: 10px 16px; background: var(--surface); color: var(--ink); }
.skip-link:focus { top: 10px; }

.app-header {
    min-height: 82px;
    padding: 12px clamp(20px, 3vw, 42px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; min-width: 0; gap: 14px; color: var(--ink); text-decoration: none; font-weight: 800; }
.brand:hover { color: var(--ink); }
.brand img { display: block; width: 126px; height: 50px; object-fit: contain; }
.brand span { border-left: 1px solid #bfced5; padding-left: 14px; font-size: .82rem; letter-spacing: .04em; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 18px; color: var(--ink-soft); font-size: .88rem; }
.header-actions form { margin: 0; }
.icon-command { min-height: 38px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--teal); padding: 6px 12px; font-weight: 700; }
.icon-command:hover { border-color: var(--teal); background: var(--surface-tint); }
.mobile-menu-button, .sidebar-logout { display: none; }

.app-shell { display: flex; flex: 1; min-height: 0; min-width: 0; }
.sidebar { width: 228px; flex: none; padding: 32px 14px; display: flex; flex-direction: column; gap: 3px; background: var(--surface-soft); border-right: 1px solid var(--line); }
.sidebar a { display: block; padding: 10px 13px; border-left: 3px solid transparent; border-radius: 0 4px 4px 0; color: var(--ink-soft); text-decoration: none; font-size: .91rem; font-weight: 650; }
.sidebar a:hover { background: #e8f1f1; color: var(--ink); }
.sidebar a[aria-current="page"] { border-left-color: var(--bright); background: #dff2ee; color: var(--ink); }
.sidebar-admin-title { margin: 0 13px 20px; padding-bottom: 13px; border-bottom: 2px solid var(--bright); color: var(--ink); font-size: 1.1rem; font-weight: 800; }
.sidebar-heading { margin: 0 13px 7px; color: var(--teal); font-size: .7rem; font-weight: 800; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-heading-section { margin: 18px 13px 7px; padding-top: 17px; border-top: 1px solid var(--line); }
.sidebar-account { margin-top: auto; }
.admin-media-preview { display: block; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; background: #07191d; }
[data-video-fields] { display: grid; gap: 10px; }
[data-video-upload] progress { width: 100%; height: 12px; accent-color: var(--teal); }
.video-frame > video { display: block; width: 100%; height: 100%; object-fit: contain; background: #07191d; }
.admin-content-filters { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; margin: 24px 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.admin-content-filters label { display: flex; flex-direction: column; gap: 6px; min-width: 180px; font-weight: 700; }
.admin-content-filters input, .admin-content-filters select { min-height: 42px; max-width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); }
.admin-content-filters input { width: min(100%, 360px); }
.sidebar-divider { width: 100%; flex: none; margin: 14px 0; border: 0; border-top: 1px solid var(--line); }
.sidebar .sidebar-logout-visible { display: block; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.sidebar .sidebar-logout-visible button { display: block; width: 100%; min-height: 44px; padding: 10px 13px; border: 1px solid var(--teal); border-radius: 4px; background: var(--surface); color: var(--teal); font: inherit; font-weight: 750; cursor: pointer; }
.sidebar .sidebar-logout-visible button:hover { background: var(--surface-tint); }
.sidebar .sidebar-logout-visible button:focus-visible { outline: 3px solid #9edbd1; outline-offset: 2px; }
.main-content { width: min(100%, 1080px); min-width: 0; margin: 0 auto; padding: 42px clamp(24px, 4vw, 60px) 72px; }
.main-content.dashboard-main { width: 100%; max-width: none; margin: 0; }
.dashboard-main > .dashboard-upgrade-banner { max-width: var(--banner-max-width, 1180px); }
.app-footer { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px clamp(20px, 3vw, 42px); border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.app-footer span { margin-right: auto; }
.app-footer a { color: var(--ink-soft); }

.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: .73rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.page-heading { max-width: 790px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.page-heading h1, .auth-panel h1 { margin: 0 0 12px; font-size: clamp(1.8rem, 2.8vw, 2.35rem); font-weight: 800; }
.page-heading p:last-child, .auth-panel > p:not(.eyebrow) { max-width: 660px; color: var(--muted); }
.heading-actions { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.heading-actions .primary-button { margin: 0 0 3px; flex: none; }
.dashboard-upgrade-banner { display: grid; justify-items: start; gap: 7px; width: 100%; max-width: var(--banner-max-width, 1180px); margin: 0 0 30px; padding: var(--banner-padding, 24px); border-left: 6px solid var(--banner-accent, #ffd23b); border-radius: var(--banner-radius, 4px); background: var(--banner-bg, #122b30); color: var(--banner-headline, #fff); font-family: var(--banner-font, Manrope, Arial, sans-serif); text-decoration: none; }
.dashboard-upgrade-banner:hover { color: var(--banner-headline, #fff); filter: brightness(1.08); }
.dashboard-upgrade-eyebrow { color: var(--banner-eyebrow, #80dad0); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.dashboard-upgrade-banner strong { color: var(--banner-headline, #fff); font-size: var(--banner-headline-size, 28px); line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.dashboard-upgrade-subheadline { color: var(--banner-subheadline, #d7e7e8); font-size: var(--banner-subheadline-size, 16px); overflow-wrap: anywhere; }
.dashboard-upgrade-button { display: inline-flex; align-items: center; gap: 12px; margin-top: 10px; padding: var(--banner-button-padding-y, 10px) var(--banner-button-padding-x, 16px); border-radius: var(--banner-button-radius, 4px); background: var(--banner-button-bg, #ffd23b); color: var(--banner-button-text, #0a1930); font-size: var(--banner-button-font-size, 15px); font-weight: 800; line-height: 1.25; }
.library-upgrade-banner { margin: 30px 0 0; }
.library-upgrade-banner + .library-lessons { margin-top: 30px; }
.upgrade-page-banner { margin: 0 0 30px; }
.banner-reset-form { margin-top: 18px; }
.banner-settings-form { max-width: 1000px; }
.banner-settings-section { padding: 25px 0 14px; border-top: 1px solid var(--line); }
.banner-settings-section h2 { margin: 0 0 13px; font-size: 1.2rem; }
.banner-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.banner-settings-grid > div { min-width: 0; }
.banner-settings-grid label { display: block; margin-bottom: 5px; }
.banner-settings-grid input, .banner-settings-grid select { width: 100%; }
.banner-settings-wide { grid-column: 1 / -1; }
.banner-settings-grid small { display: block; margin-top: 5px; color: var(--muted); }
.banner-color-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.banner-color-field input[type="color"] { width: 100%; height: 44px; padding: 3px; cursor: pointer; }
.banner-preview { margin: 0; }

.next-step { max-width: 760px; margin-top: 32px; padding: 24px 0 0; border-top: 3px solid var(--bright); }
.next-step h2 { margin: 0 0 10px; font-size: 1.4rem; }
.next-step p:not(.eyebrow) { color: var(--muted); }
.journey { max-width: 900px; margin-top: 48px; }
.journey-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.journey-heading h2 { margin: 0; font-size: 1.35rem; }
.journey-heading p { margin: 0; color: var(--muted); font-size: .86rem; }
.journey progress { display: block; width: 100%; height: 8px; margin-top: 16px; border: 0; border-radius: 4px; overflow: hidden; accent-color: var(--teal); }
.journey progress::-webkit-progress-bar { background: var(--line); }
.journey progress::-webkit-progress-value { background: var(--bright); }
.journey progress::-moz-progress-bar { background: var(--bright); }
.journey-list { margin: 17px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.journey-list li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.journey-number { color: var(--teal); font: 750 .82rem Manrope, "Segoe UI", Arial, sans-serif; }
.journey-list h3 { margin: 0 0 4px; font-size: 1rem; }
.journey-list p { margin: 0; color: var(--muted); font-size: .86rem; }
.journey-status { color: var(--teal); font-size: .83rem; font-weight: 750; white-space: nowrap; }
.account-section { max-width: 760px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.account-section h2 { margin: 0; font-size: 1.25rem; }
.auth-panel { width: min(100%, 440px); margin: 26px auto; }
.auth-panel h1 { font-size: 2rem; }
.form-stack { display: flex; flex-direction: column; gap: 7px; margin-top: 22px; }
.form-stack label { margin-top: 12px; font-size: .92rem; font-weight: 700; }
.form-stack input:not([type="checkbox"]), .form-stack select, .form-stack textarea {
    width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #aebfc8; border-radius: 4px; background: var(--surface); color: var(--ink);
}
.form-stack textarea { resize: vertical; }
.form-stack input:focus, .form-stack select:focus, .form-stack textarea:focus { border-color: var(--teal); outline: 3px solid #9edbd1; outline-offset: 0; }
.form-stack input[type="color"] { max-width: 90px; padding: 3px; cursor: pointer; }
.form-stack small { color: var(--muted); font-size: .8rem; }
.form-stack fieldset { margin: 15px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 4px; }
.form-stack legend { padding: 0 5px; font-weight: 700; }
.checkbox-row { display: flex; align-items: center; gap: 10px; margin: 7px 0 !important; font-weight: 500 !important; }
.checkbox-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); flex: none; }
.field-error { margin: 3px 0; color: var(--error); font-size: .87rem; }
.edit-form { max-width: 700px; }
.auth-switch, .auth-links { margin-top: 22px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

.primary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; margin-top: 10px; padding: 10px 19px; border: 1px solid #e9b824; border-radius: 4px; background: var(--yellow); color: var(--ink); font-weight: 800; text-decoration: none; text-align: center; transition: background .18s, border-color .18s; }
.primary-button:hover { border-color: #d9a900; background: #ffe16a; color: var(--ink); }
.text-command { border: 0; background: none; padding: 3px 0; color: var(--error); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.text-command:hover { color: #76261c; }
.notice { margin-bottom: 22px; padding: 12px 16px; border-left: 3px solid var(--teal); background: var(--surface-tint); color: var(--ink); }
.separate-action { margin-top: 28px; }
.backup-settings { margin-top: 32px; padding-block: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.backup-settings h2 { margin: 0 0 8px; }
.backup-settings p { color: var(--muted); }
.backup-schedule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.backup-schedule-grid > div { display: flex; flex-direction: column; min-width: 0; }
.backup-schedule-grid label { margin: 0 0 7px; }
@media (max-width: 700px) { .backup-schedule-grid { grid-template-columns: 1fr; } }
.affiliate-address-note { max-width: 700px; margin: 18px 0 0; color: var(--muted); font-size: .88rem; }
.affiliate-address-note strong { color: var(--ink); }
.affiliate-address-note a { color: var(--teal); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.affiliate-links { max-width: 850px; margin-top: 42px; padding-top: 24px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.affiliate-links-heading h2 { margin: 0 0 8px; font-size: 1.4rem; }
.affiliate-links-heading > p:last-child { max-width: 680px; color: var(--muted); font-size: .9rem; }
.affiliate-campaign { display: flex; flex-direction: column; gap: 5px; max-width: 360px; margin: 24px 0; }
.affiliate-campaign label, .affiliate-link-row label { font-size: .85rem; font-weight: 750; }
.affiliate-campaign input, .affiliate-link-controls input { min-width: 0; min-height: 42px; padding: 8px 11px; border: 1px solid #aebfc8; border-radius: 4px; background: var(--surface); color: var(--ink); }
.affiliate-campaign small { color: var(--muted); font-size: .78rem; }
.affiliate-link-list { border-top: 1px solid var(--line); }
.affiliate-link-row { display: grid; gap: 7px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.affiliate-link-row h3 { margin: 0 0 2px; font-size: 1.05rem; }
.affiliate-link-row p { margin: 0; color: var(--muted); font-size: .78rem; }
.affiliate-link-controls { display: flex; gap: 8px; }
.affiliate-link-controls input { flex: 1; }
.affiliate-link-controls button { min-width: 94px; padding: 8px 12px; border: 1px solid var(--teal); border-radius: 4px; background: var(--teal); color: #fff; font-size: .83rem; font-weight: 750; }
.affiliate-link-controls button:hover { background: var(--teal-dark); }
.affiliate-link-controls button:disabled { opacity: .5; cursor: not-allowed; }
.affiliate-copy-status { min-height: 1.25em; color: var(--teal); font-size: .78rem; }
@media (max-width: 540px) { .affiliate-link-controls { flex-direction: column; } .affiliate-link-controls button { min-height: 42px; } }

.badge-progress { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 24px; max-width: 850px; margin: 30px 0; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.badge-progress-visual { width: 96px; height: 96px; display: grid; place-items: center; }
.badge-progress-visual img, .badge-admin-row img, .badge-image-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.badge-progress-copy .eyebrow { margin-bottom: 5px; }
.badge-progress-copy h2 { margin: 0 0 5px; font-size: 1.45rem; }
.badge-progress-copy p { margin: 0; color: var(--muted); }
.badge-progress-copy progress { display: block; width: min(100%, 430px); height: 11px; margin: 15px 0 6px; accent-color: var(--teal); }
.badge-progress-copy small { color: var(--muted); }
.badge-leaderboard-link { display: inline-block; margin-top: 12px; color: var(--teal); font-weight: 800; }
.leaderboard-own { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin: 26px 0 34px; padding: 18px 0; border-top: 3px solid var(--bright); border-bottom: 1px solid var(--line); }
.leaderboard-own span:first-child { color: var(--teal); font-size: .75rem; font-weight: 800; }
.leaderboard-own strong { font-size: 1.35rem; }
.leaderboard-own span:last-child { color: var(--muted); }
.leaderboard-list { max-width: 920px; }
.leaderboard-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.leaderboard-head h2 { margin: 0; font-size: 1.35rem; }
.leaderboard-head span { color: var(--muted); font-size: .82rem; }
.leaderboard-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 64px; align-items: center; gap: 14px; min-height: 76px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.leaderboard-row-self { background: var(--surface-tint); }
.leaderboard-position { color: var(--teal); font-size: 1.15rem; font-weight: 850; }
.leaderboard-person { display: flex; align-items: center; gap: 13px; min-width: 0; }
.leaderboard-person img, .leaderboard-icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; object-fit: contain; }
.leaderboard-icon { border-radius: 50%; background: var(--surface-tint); color: var(--teal); font-weight: 800; }
.leaderboard-person > span:last-child { display: grid; min-width: 0; }
.leaderboard-person strong { overflow-wrap: anywhere; }
.leaderboard-person small { color: var(--muted); }
.leaderboard-score { text-align: right; font-size: 1.2rem; }
.leaderboard-empty { color: var(--muted); }
.sidebar-external { display: grid; gap: 6px; margin: 0 0 12px; }
.sidebar-external img { display: block; width: 100%; max-height: 110px; object-fit: contain; }
.sidebar-external a:has(img) { padding: 8px; border: 1px solid var(--line); background: var(--surface); }
.admin-form-section { max-width: 760px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.review-reject { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; margin-top: 12px; }
.content-row:has(.review-reject) { flex-wrap: wrap; }
.review-reject input { flex: 1 1 240px; min-width: 0; }
.review-note { padding: 10px 12px; border-left: 3px solid var(--teal); background: var(--surface-tint); }
.submission-check { max-width: 760px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.submission-check h2 { font-size: 1.2rem; }
.submission-check ul { padding: 0; list-style: none; }
.submission-check li { margin: 7px 0; color: var(--muted); }
.submission-check li::before { content: '○'; display: inline-block; width: 24px; color: #a14a3b; font-weight: 800; }
.submission-check li.is-ready::before { content: '✓'; color: var(--teal); }
.submission-check .primary-button:disabled { opacity: .48; cursor: not-allowed; }
@media (max-width: 480px) { .leaderboard-row { grid-template-columns: 28px minmax(0,1fr) 38px; gap: 8px; padding-inline: 4px; } .leaderboard-person { gap: 8px; } .leaderboard-person img, .leaderboard-icon { width: 40px; height: 40px; } .leaderboard-head span { max-width: 120px; text-align: right; } }
.badge-medal { --badge-color: #007f76; position: relative; display: grid; place-items: center; flex: none; width: 76px; height: 76px; border: 4px double rgba(255,255,255,.9); border-radius: 50%; background: var(--badge-color); box-shadow: 0 0 0 3px var(--badge-color), 0 4px 12px rgba(10,25,48,.16); color: #fff; font-size: 2rem; font-weight: 850; line-height: 1; }
.badge-medal::after { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; pointer-events: none; }
.badge-medal-empty { --badge-color: #72808e; }
.badge-admin-section { max-width: 900px; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.badge-admin-section h2 { margin: 0 0 8px; font-size: 1.35rem; }
.section-heading-compact p { margin: 0 0 12px; color: var(--muted); }
.badge-switch { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; max-width: 900px; margin: 26px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.badge-switch .primary-button { width: auto; }
.badge-switch-status { margin: 20px 0; color: var(--muted); }
.badge-admin-list { border-top: 1px solid var(--line); }
.badge-admin-row { display: grid; grid-template-columns: 76px minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.badge-admin-row img { width: 68px; height: 68px; }
.badge-admin-row .badge-medal { width: 62px; height: 62px; font-size: 1.55rem; }
.badge-admin-row .badge-medal::after { inset: 6px; }
.badge-admin-row small { color: var(--teal); font-weight: 750; }
.badge-admin-row h3 { margin: 2px 0; font-size: 1.05rem; }
.badge-admin-row p { margin: 0; color: var(--muted); font-size: .88rem; }
.badge-image-preview { display: flex; align-items: center; gap: 18px; }
.badge-image-preview img { width: 88px; height: 88px; }
.badge-admin-section input[type=color] { width: 78px; height: 46px; padding: 3px; }
@media (max-width: 600px) { .badge-progress { grid-template-columns: 72px minmax(0,1fr); gap: 16px; } .badge-progress-visual { width: 72px; height: 72px; } .badge-progress .badge-medal { width: 62px; height: 62px; font-size: 1.6rem; } .badge-admin-row { grid-template-columns: 62px minmax(0,1fr); gap: 12px; } .badge-admin-row .row-actions { grid-column: 2; } .badge-admin-row img { width: 58px; height: 58px; } }

.content-list { margin-top: 24px; border-top: 1px solid var(--line); }
.content-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.content-row > div:first-child { min-width: 0; }
.content-row small { color: var(--teal); font-size: .76rem; font-weight: 750; }
.content-row h2 { display: flex; align-items: center; min-width: 0; margin: 4px 0 5px; font-size: 1.09rem; overflow-wrap: anywhere; }
.content-row p { margin: 0; color: var(--muted); font-size: .89rem; overflow-wrap: anywhere; }
.content-row > a, .row-actions a { font-weight: 700; white-space: nowrap; }
.marketing-admin-row { justify-content: flex-start; }
.marketing-admin-row .row-actions { margin-left: auto; }
.marketing-admin-details { flex: 1; min-width: 0; }
.marketing-admin-thumb { width: 96px; height: 72px; flex: none; object-fit: cover; border: 1px solid var(--line); border-radius: 4px; }
.marketing-admin-preview img { display: block; width: min(100%, 280px); aspect-ratio: 4 / 3; object-fit: contain; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-soft); }
.marketing-admin-video { width: min(100%, 520px); aspect-ratio: 16 / 9; }
.marketing-admin-video video, .marketing-admin-video iframe { display: block; width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 4px; background: var(--ink); }
.row-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.row-actions form { margin: 0; }
.locked-label { color: var(--muted); font-size: .84rem; }
.request-state { display: inline-block; margin-top: 8px; padding: 8px 12px; border-left: 3px solid var(--teal); background: var(--surface-tint); color: var(--ink) !important; font-weight: 700; }
.level-swatch { width: 17px; height: 17px; margin: 0 10px 0 0; padding: 0; border: 0; flex: none; background: none; appearance: none; }
.level-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.level-swatch::-webkit-color-swatch { border: 1px solid #98a9b1; border-radius: 3px; }
.level-swatch::-moz-color-swatch { border: 1px solid #98a9b1; border-radius: 3px; }
.view-tabs { display: flex; gap: 24px; margin-top: 18px; border-bottom: 1px solid var(--line); }
.view-tabs a { display: inline-block; padding: 9px 2px; border-bottom: 3px solid transparent; color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.view-tabs a:hover { color: var(--teal); }
.view-tabs a[aria-current="page"] { border-bottom-color: var(--bright); color: var(--ink); }
.detail-list { max-width: 760px; margin: 24px 0; border-top: 1px solid var(--line); }
.detail-list > div { display: grid; grid-template-columns: minmax(130px, 180px) minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); font-size: .88rem; }
.detail-list dd { min-width: 0; margin: 0; font-weight: 650; overflow-wrap: anywhere; }

.content-body { max-width: 780px; margin: 24px 0; line-height: 1.75; overflow-wrap: anywhere; }
.article-page { width: min(100%, 820px); min-width: 0; margin: 0 auto; }
.article-page .page-heading { max-width: none; }
.article-page .page-heading h1 { color: var(--teal-dark); }
.article-page .content-engagement { margin-top: 18px; }
.article-body { width: 100%; max-width: 100%; min-width: 0; font-size: 1.04rem; line-height: 1.7; }
.article-body p { margin: 0 0 1.1rem; white-space: pre-line; }
.article-body h2 { margin: 2rem 0 .7rem; padding-left: .75rem; border-left: 4px solid var(--bright); color: var(--teal-dark); font-size: clamp(1.3rem, 1.8vw, 1.65rem); }
.article-body figure { width: 100%; max-width: 100%; min-width: 0; margin: 1.8rem 0; }
.article-body figure img { display: block; width: 100%; max-width: 100%; height: auto; border-radius: 4px; }
.article-body figcaption { margin-top: .5rem; color: #627285; font-size: .88rem; }
.article-media-admin { margin-top: 2.5rem; max-width: 780px; }
.article-media-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid #dbe5e8; }
.article-media-row img { width: 120px; height: 75px; object-fit: cover; }
.article-media-row div { flex: 1; min-width: 0; }
.article-media-row p { margin: .2rem 0; }
@media (max-width: 600px) { .article-media-row { align-items: flex-start; flex-wrap: wrap; } }
.video-frame { width: min(100%, 900px); aspect-ratio: 16 / 9; margin: 24px 0; background: var(--ink); }
.video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }

.main-content.library-main { width: min(100%, 1500px); }
.library-page { min-width: 0; }
.content-view-count { font-size: 13px; color: var(--muted); margin-left: 8px; }
.library-keywords { width: min(100%, 650px); min-width: 0; }
.library-keywords summary { width: fit-content; max-width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--teal); font-size: 14px; font-weight: 700; cursor: pointer; }
.library-keywords summary:hover { border-color: var(--teal); }
.library-keywords summary:focus-visible { outline: 3px solid #9edbd1; outline-offset: 2px; }
.keyword-close-label, [data-keyword-picker][open] .keyword-open-label { display: none; }
[data-keyword-picker][open] .keyword-close-label { display: inline; }
.keyword-panel { padding-top: 12px; }
.keyword-panel label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.keyword-panel input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.keyword-panel .keyword-results { max-height: 220px; overflow-y: auto; overscroll-behavior: contain; align-content: start; margin-top: 10px; padding: 2px 8px 4px 2px; scrollbar-gutter: stable; }
.keyword-results a[hidden], [data-keyword-empty][hidden] { display: none; }
[data-keyword-empty] { font-size: 13px; color: var(--muted); }
.keyword-active { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 13px; }
.keyword-active span { font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.library-info-banner { display: flex; justify-content: center; width: 100%; }
.library-info-banner img { display: block; width: auto; max-width: 100%; height: auto; max-height: 260px; object-fit: contain; border-radius: 6px; }
.library-info-banner ~ .library-lessons { margin-top: 24px; }
[data-resource-fields][hidden] { display: none; }
.resource-details { display: flex; flex-wrap: wrap; gap: 20px 40px; border-block: 1px solid var(--line); padding: 16px 0; margin: 24px 0; }
.resource-details div { min-width: 0; }
.resource-details dt { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.resource-details dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.resource-link { margin: 24px 0; }
.resource-disclosure { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.library-heading h1 { margin: 0; font-size: 2.2rem; }
.library-heading > p { margin: 0 0 3px; color: var(--muted); font-weight: 650; white-space: nowrap; }
.library-categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.library-category { min-width: 0; overflow: hidden; border: 1px solid #26363e; border-radius: 6px; background: #152128; color: #fff; text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s; }
.library-category:hover, .library-category:focus-visible { transform: translateY(-3px); border-color: var(--bright); box-shadow: 0 10px 20px #10232b24; color: #fff; }
.library-category[aria-current="true"] { border-color: var(--bright); box-shadow: 0 0 0 2px #00bfae36; }
.library-category img { display: block; width: 100%; aspect-ratio: 16 / 8; object-fit: cover; background: #20333a; }
.library-category-info { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 16px 16px; }
.library-category-info strong { font: 800 1.1rem Manrope, "DM Sans", "Segoe UI", Arial, sans-serif; }
.library-category-info span { color: #bdcbd0; font-size: .78rem; white-space: nowrap; }
.library-lessons { margin-top: 48px; scroll-margin-top: 22px; }
.library-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.library-section-heading h2 { margin: 0; font-size: 1.45rem; }
.library-heading-tools { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.library-heading-tools > span { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.library-sort { display: flex; align-items: center; gap: 8px; margin: 0; }
.library-sort label { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 600; }
.library-sort-field { position: relative; display: block; }
.library-sort-field::after { content: ''; position: absolute; right: 14px; top: 16px; width: 6px; height: 6px; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(45deg); pointer-events: none; }
.library-sort select { appearance: none; display: block; width: 152px; height: 40px; padding: 8px 34px 8px 12px; margin: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-size: .85rem; font-weight: 700; cursor: pointer; }
.library-sort select:hover { border-color: var(--teal); }
.library-sort select:focus-visible { outline: 3px solid #9edbd1; outline-offset: 2px; border-color: var(--teal); }
@media (max-width: 760px) {
    .library-section-heading { flex-wrap: wrap; align-items: center; }
    .library-heading-tools { width: 100%; justify-content: space-between; gap: 12px; }
}
.library-section-heading > span { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.library-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 20px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.library-filters a { padding: 7px 13px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-soft); font-size: .86rem; font-weight: 700; text-decoration: none; }
.library-filters a:hover { border-color: var(--teal); color: var(--teal); }
.library-filters a[aria-current="true"] { border-color: var(--teal); background: var(--teal); color: #fff; }
.library-discovery { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin-bottom: 20px; }
.library-search { display: flex; flex-direction: column; gap: 5px; width: min(100%, 300px); }
.library-search label { font-size: .83rem; font-weight: 800; }
.library-search input { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #aebfc8; border-radius: 4px; background: var(--surface); color: var(--ink); }
.library-search input:focus { border-color: var(--teal); outline: 3px solid #9edbd1; }
.library-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; max-width: 850px; }
.library-tags a, .library-lesson-tags a { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-soft); font-size: .76rem; font-weight: 700; text-decoration: none; }
.library-tags a:hover, .library-lesson-tags a:hover { border-color: var(--teal); color: var(--teal); }
.library-tags a[aria-current="true"] { border-color: var(--teal); background: var(--surface-tint); color: var(--teal); }
.library-tags .library-tags-clear { border: 0; color: var(--teal); text-decoration: underline; }
.library-lesson-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.progress-navigation { margin-top: 0; }
.progress-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid #00877e; border-radius: 4px; background: #e4f5f1; color: #00877e; cursor: pointer; }
.progress-icon--complete { border-color: #388153; background: #edf7ef; color: #276b40; cursor: default; }
.progress-icon:focus-visible { outline: 3px solid #9edbd1; outline-offset: 2px; }
.progress-icon:disabled { opacity: .5; cursor: wait; }
.library-lesson { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.library-lesson-image { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; background: #20333a; }
.library-lesson-body { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 17px 19px 19px; }
.library-lesson-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--teal); font-size: .73rem; font-weight: 800; text-transform: uppercase; }
.library-lesson--article .library-lesson-meta { color: #956021; }
.library-lesson--task .library-lesson-meta { color: #a14444; }
.library-lesson--template .library-lesson-meta { color: #476b95; }
.library-active-level { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: -4px 0 16px; color: var(--ink-soft); font-size: .84rem; }
.library-active-level span { font-weight: 800; }
.library-active-level a { color: var(--teal); text-underline-offset: 3px; }
.library-lesson-meta .library-level-badges { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.library-level-badge { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 1px solid var(--level-color); border-radius: 5px; background: #fff; color: var(--level-color); font-size: .56rem; font-weight: 900; line-height: 1; text-decoration: none; }
.library-level-badge img { display: block; width: 100%; height: 100%; border-radius: 4px; object-fit: contain; }
.library-level-badge:hover, .library-level-badge:focus-visible, .library-level-badge[aria-current="true"] { outline: 2px solid var(--level-color); outline-offset: 2px; }
.admin-level-badge-preview { display: block; width: 62px; height: 62px; object-fit: contain; }
.admin-level-badge-list { width: 32px; height: 32px; object-fit: contain; }
.upgrade-main { max-width: none; }
.upgrade-page { max-width: 1320px; margin: 0 auto; }
.upgrade-back { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px; color: var(--teal); font-weight: 800; text-decoration: none; }
.upgrade-back span { font-size: 1.5rem; line-height: 1; }
.upgrade-hero { padding: 28px 34px; border-left: 6px solid var(--yellow); background: #122b30; color: #fff; }
.upgrade-hero .eyebrow { margin: 0; color: #80dad0; }
.upgrade-hero h1 { margin: 8px 0 7px; font-size: clamp(1.8rem, 2.5vw, 2.8rem); }
.upgrade-hero > p:last-child { margin: 0; color: #d7e7e8; }
.upgrade-selected { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 13px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.upgrade-selected strong { color: var(--ink); }
.upgrade-selected-label { color: var(--teal); font-size: .8rem; font-weight: 800; text-transform: uppercase; }
.upgrade-offers { padding: 24px 0 36px; }
.upgrade-section-heading h2 { margin: 4px 0 7px; font-size: 1.65rem; }
.upgrade-section-heading p:last-child { margin: 0 0 18px; color: var(--muted); }
.upgrade-billing { display: inline-flex; gap: 3px; margin-bottom: 22px; padding: 4px; border: 1px solid var(--line); border-radius: 5px; background: #f3f7f8; }
.upgrade-billing button { min-width: 120px; padding: 10px 18px; border: 0; border-radius: 3px; background: transparent; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.upgrade-billing button[aria-pressed="true"] { background: var(--teal); color: #fff; }
.upgrade-offer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.upgrade-offer { display: flex; flex-direction: column; min-width: 0; padding: 27px; border: 1px solid var(--line); border-top: 6px solid var(--offer-color); border-radius: 5px; background: #fff; }
.upgrade-offer-heading > span { color: var(--teal); font-size: .72rem; font-weight: 800; }
.upgrade-offer h3 { margin: 8px 0; font-size: 1.55rem; }
.upgrade-offer-heading p { color: var(--muted); }
.upgrade-prices { display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 12px 0 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.upgrade-prices div { display: grid; }
.upgrade-prices strong { font-size: 2rem; line-height: 1.2; }
.upgrade-prices span { color: var(--muted); font-size: .84rem; }
.upgrade-benefits { display: grid; gap: 10px; margin: 22px 0 24px; padding: 18px 0 0 20px; border-top: 1px solid var(--line); }
.upgrade-benefits li::marker { color: var(--teal); }
.upgrade-unlocks { margin-top: auto; color: var(--teal); font-size: .83rem; font-weight: 800; }
.upgrade-contact { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 10px 16px; border-radius: 4px; background: var(--yellow); color: var(--ink); font-weight: 850; text-align: center; text-decoration: none; }
.upgrade-contact:hover { background: #ffe16a; color: var(--ink); }
.upgrade-actions { display: grid; gap: 10px; }
.upgrade-actions .upgrade-contact { justify-content: space-between; margin-top: 0; }
.upgrade-actions .upgrade-contact[hidden], .upgrade-prices [hidden] { display: none; }
.upgrade-pending { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: .9rem; }
.upgrade-availability { margin: 18px 0 0; color: var(--muted); font-size: .87rem; }
.upgrade-questions { display: grid; grid-template-columns: minmax(210px, .75fr) minmax(0, 1.25fr); gap: 44px; padding: 48px 0 64px; border-top: 1px solid var(--line); }
.upgrade-questions h2 { margin: 6px 0; font-size: 1.7rem; }
.upgrade-question-list > div { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.upgrade-question-list h3 { margin: 0 0 6px; font-size: 1.08rem; }
.upgrade-question-list p { margin: 0; color: var(--muted); }
.library-lesson h3 { margin: 10px 0 7px; font-size: 1.06rem; overflow-wrap: anywhere; }
.library-lesson p { margin: 0 0 16px; color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; }
.library-lesson-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.library-lesson-tags a { min-height: 26px; font-size: .72rem; }
.library-open-button { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; margin-top: auto; padding: 7px 14px; border: 1px solid #e9b824; border-radius: 4px; background: var(--yellow); color: var(--ink); font-size: .83rem; font-weight: 800; text-decoration: none; }
.library-open-button:hover { background: #ffe16a; color: var(--ink); }
.library-open-button--locked { border-color: var(--teal); background: var(--surface); color: var(--teal); }
.library-open-button--locked:hover { background: var(--surface-tint); color: var(--teal); }
.library-engagement, .content-engagement { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.library-engagement form, .content-engagement form { margin: 0; }
.library-engagement-button, .library-heart-button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink-soft); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.library-engagement-button:hover, .library-heart-button:hover { border-color: var(--teal); color: var(--teal); }
.library-engagement-button[aria-pressed="true"] { border-color: var(--teal); background: var(--surface-tint); color: var(--teal); }
.library-heart-button[aria-pressed="true"] { border-color: #ce4d63; background: #fff2f4; color: #b82d48; }
.library-heart-button span { margin-right: 5px; font-size: 1.12rem; line-height: 1; }
.content-feature-settings { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.content-feature-switch { min-width: 130px; }
.content-feature-settings .checkbox-row { margin: 0; }
.content-feature-settings .primary-button { min-height: 38px; margin: 0 0 0 auto; padding: 7px 14px; }
.continue-lesson { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 28px; padding: 20px 0; border-top: 3px solid var(--teal); border-bottom: 1px solid var(--line); }
.continue-lesson h2 { margin: 5px 0; font-size: 1.25rem; }
.continue-lesson p:last-child { margin: 0; color: var(--muted); }
.continue-lesson .primary-button { flex: none; }
@media (max-width: 700px) { .continue-lesson { align-items: start; flex-direction: column; } .content-feature-settings .primary-button { margin-left: 0; } }
.library-no-results { margin-top: 20px; color: var(--muted); }
.material-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.material-filters a { padding: 8px 13px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-soft); font-size: .85rem; font-weight: 750; text-decoration: none; }
.material-filters a[aria-current="page"] { border-color: var(--teal); background: var(--teal); color: #fff; }
.material-platform-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.material-platform-filter label { font-size: .85rem; font-weight: 800; }
.material-platform-filter select, .material-platform-filter button { min-height: 39px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); font: inherit; }
.material-platform-filter button { cursor: pointer; font-weight: 750; }
.material-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.material-item { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.material-image { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.material-video { aspect-ratio: 16 / 9; background: #152c32; }
.material-video iframe { width: 100%; height: 100%; border: 0; }
.material-item-body { padding: 18px; }
.material-item-body small { color: var(--teal); font-weight: 800; text-transform: uppercase; }
.material-item-body h2 { margin: 7px 0; font-size: 1.16rem; }
.material-item-body p { margin: 0 0 15px; color: var(--muted); }
.material-item-body textarea { display: block; width: 100%; min-height: 96px; margin: 12px 0; padding: 11px; border: 1px solid var(--line); border-radius: 4px; background: #f7fafb; color: var(--ink); font: inherit; line-height: 1.5; resize: vertical; }
.material-action { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 8px 14px; border: 1px solid #e9b824; border-radius: 4px; background: var(--yellow); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.material-action:hover { background: #ffe16a; color: var(--ink); }
.community-page { width: min(100%, 1040px); margin: 0 auto; }
.community-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.community-heading h1 { margin: 0; }
.community-heading a { color: var(--teal); font-weight: 800; }
.community-heading-actions { display: flex; align-items: center; gap: 16px; }
.community-window-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); font: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.community-window-button:hover, .community-window-button:focus-visible { border-color: var(--teal); color: var(--teal); }
.community-popout-placeholder { padding: 16px; border: 1px solid var(--line); border-radius: 4px; }
.community-popout-placeholder button { padding: 0; border: 0; background: none; color: var(--teal); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.community-popout-page { margin: 0; }
.community-popout-main { min-height: 100dvh; padding: 16px; }
.community-popout-main .community-page { max-width: none; padding: 0; }
.community-popout-main .community-heading { align-items: center; margin-bottom: 12px; }
.community-popout-main .community-heading h1 { font-size: 1.35rem; }
.community-popout-main .community-chat-shell { height: calc(100dvh - 132px); min-height: 280px; }
.community-chat-shell { display: flex; flex-direction: column; height: min(70dvh, 680px); min-height: 390px; border: 1px solid #244851; border-radius: 4px; overflow: hidden; background: #07191d; }
.community-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; background: #07191d; color: #fff; }
.community-message { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 9px; min-height: 28px; line-height: 1.45; }
.community-message-name { flex: none; font-weight: 850; }
.community-message-body { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.community-message-body a { color: #8ce7e1; text-decoration: underline; text-underline-offset: 2px; }
.community-emoji-picker { display: flex; flex-wrap: wrap; gap: 3px; }
.community-emoji-picker button { border: 0; background: transparent; padding: 3px 6px; font-size: 1.3rem; line-height: 1.3; cursor: pointer; border-radius: 4px; }
.community-emoji-picker button:hover, .community-emoji-picker button:focus-visible { background: #d1e5e5; }
.community-message time { color: #a9c1c6; font-size: .76rem; margin-left: auto; }
.community-message-moderation { position: relative; margin-left: 8px; }
.community-message-moderation summary { display: block; padding: 0 5px; color: #c0d5d9; cursor: pointer; font-size: 1.2rem; line-height: 1; }
.community-message-moderation summary::-webkit-details-marker { display: none; }
.community-message-menu { position: absolute; z-index: 5; top: 100%; right: 0; display: grid; gap: 8px; width: min(270px, 75vw); padding: 12px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 6px 16px #0005; }
.community-message-menu form { display: grid; gap: 5px; }
.community-message-menu label { font-size: .82rem; font-weight: 700; }
.community-message-menu select { min-height: 36px; padding: 5px; }
.community-message .community-message-menu button { width: 100%; padding: 7px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); text-align: left; font: inherit; font-size: .82rem; cursor: pointer; }
.community-message .community-message-menu button:hover { background: #eaf1f2; }
.community-name-0 { color: #61d6c4; }
.community-name-1 { color: #f2d15d; }
.community-name-2 { color: #fb9b83; }
.community-name-3 { color: #c8a5fa; }
.community-name-4 { color: #79c4ff; }
.community-name-5 { color: #afe17f; }
.community-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.community-meta time { color: var(--muted); font-size: .8rem; }
.community-question { padding: 16px 0; border-bottom: 1px solid var(--line); }
.community-question > p, .community-answer p { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.community-compose, .community-settings { display: grid; gap: 12px; margin: 24px 0; max-width: 760px; }
.community-chat-shell .community-compose { max-width: none; margin: 0; padding: 14px 18px; background: #eaf1f2; }
.community-compose-row { display: flex; align-items: stretch; gap: 10px; }
.community-compose-row textarea { flex: 1; min-width: 0; min-height: 48px; max-height: 130px; resize: vertical; }
.community-compose-row button { flex: none; align-self: stretch; }
.community-send-status:empty { display: none; }
.community-send-status { margin: 0; font-size: .86rem; color: #a62e2e; }
.community-readonly { padding: 14px 18px; color: var(--ink); background: #eaf1f2; font-size: .88rem; }
.community-compose textarea, .community-reply textarea, .community-settings input[type=number] { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.community-compose button, .community-settings button { justify-self: start; }
.community-upgrade { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 22px 0; padding: 20px; border-left: 5px solid var(--yellow); background: #102b30; color: white; text-decoration: none; }
.community-upgrade:hover { color: white; }
.community-question-list { border-top: 1px solid var(--line); }
.community-question { padding: 24px 0; }
.community-answer { margin: 12px 0 12px 20px; padding: 8px 16px; border-left: 3px solid var(--teal); background: #f4f8f9; }
.community-reply { display: grid; gap: 8px; margin-top: 18px; }
.community-reply button, .community-admin-actions button, .community-message button { justify-self: start; border: 0; background: none; color: var(--teal); font: inherit; font-weight: 800; cursor: pointer; }
.community-admin-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; }
.community-settings { padding-top: 14px; border-top: 1px solid var(--line); }
.community-settings input[type=number] { max-width: 190px; }
.community-check { display: flex; align-items: center; gap: 9px; }
.community-empty { padding: 26px 0; color: #bdced1; }
.community-admin-form { max-width: 900px; margin-top: 28px; }
.community-admin-section { padding: 26px 0 30px; border-top: 1px solid var(--line); }
.community-admin-section h2 { margin: 0 0 20px; font-size: 1.22rem; }
.community-admin-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.community-admin-option { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-width: 0; min-height: 76px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.community-admin-option span { display: grid; min-width: 0; }
.community-admin-option strong { font-size: 1rem; }
.community-admin-option small, .community-admin-field small { color: var(--muted); font-size: .82rem; }
.community-admin-option input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--teal); }
.community-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.community-admin-field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.community-admin-field label { font-size: .91rem; font-weight: 750; }
.community-admin-field input, .community-admin-field textarea { display: block; width: 100%; min-width: 0; min-height: 45px; padding: 10px 12px; border: 1px solid #aebfc8; border-radius: 4px; background: var(--surface); color: var(--ink); font: inherit; }
.community-admin-field input[type=number] { max-width: 170px; }
.community-admin-field textarea { resize: vertical; line-height: 1.45; }
.community-admin-field input:focus, .community-admin-field textarea:focus { border-color: var(--teal); outline: 3px solid #9edbd1; outline-offset: 0; }
.community-admin-note { margin: 16px 0 0; color: var(--muted); font-size: .86rem; }
.community-admin-banner { display: grid; align-content: start; gap: 16px; min-width: 0; }
.community-admin-banner h3 { margin: 0; padding-bottom: 10px; border-bottom: 2px solid var(--bright); font-size: 1rem; }
.community-admin-actions { padding-top: 24px; border-top: 1px solid var(--line); }
.community-admin-actions .primary-button { min-width: 220px; }
.community-admin-live, .community-admin-topspace { margin-top: 18px; }
.community-live-control { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 900px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.community-live-control strong { display: block; font-size: 1.4rem; }
.community-live-control p { margin: 6px 0; }
.community-live-control-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.community-live-control-actions a { color: var(--teal); font-weight: 800; }
.community-live-control-actions button { white-space: nowrap; }
.community-admin-live-chat { max-width: 900px; margin: 26px 0 32px; }
.community-admin-live-chat .community-heading { align-items: center; margin-bottom: 12px; }
.community-admin-live-chat h2 { margin: 0; font-size: 1.22rem; }
.community-admin-live-chat .community-chat-shell { height: min(58dvh, 560px); }
.community-admin-live-chat .community-compose { margin: 0; }
.community-admin-moderation { max-width: 900px; padding: 22px 0; border-top: 1px solid var(--line); }
.community-admin-moderation h2 { margin: 0 0 12px; font-size: 1.22rem; }
.community-admin-moderation h3 { margin: 18px 0 8px; font-size: 1rem; }
.community-admin-moderation-row { display: flex; align-items: start; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.community-admin-moderation-row span { min-width: 0; overflow-wrap: anywhere; }
.community-admin-moderation-row button { padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--teal); font: inherit; font-weight: 750; white-space: nowrap; cursor: pointer; }
.community-admin-fields { display: grid; gap: 14px; max-width: 650px; }
.community-admin-fields > button { justify-self: start; }
.community-admin-item { border-top: 1px solid var(--line); padding: 18px 0; margin-top: 22px; }
.community-admin-review { display: flex; gap: 20px; }
.community-admin-review button, .community-admin-item button, .community-admin-likes button, .community-reminder button, .community-topic button, .community-like { border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 4px; padding: 8px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.community-admin-likes { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; font-size: .85rem; }
.community-admin-likes input { width: 100px; padding: 7px; }
.community-live-status { border-left: 4px solid #d44338; padding: 12px 16px; background: #fff4f1; font-weight: 800; }
.community-offline-status { font-size: 1.05rem; }
.community-next-live { padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.community-next-live h2 { margin: 6px 0; }
.community-topics { margin-top: 32px; }
.community-topic { display: flex; justify-content: space-between; align-items: center; gap: 18px; border-top: 1px solid var(--line); padding: 18px 0; }
.community-topic h3 { margin: 0; font-size: 1.06rem; }
.community-topic p { margin: 5px 0 0; }
.community-topic button, .community-like { color: #b13a4b; white-space: nowrap; }
.community-reminder { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 20px; }
.community-reminder input { accent-color: var(--teal); }
@media (max-width: 760px) {
    .community-chat-shell { height: 62dvh; min-height: 350px; }
    .community-admin-live-chat .community-chat-shell { height: 58dvh; }
    .community-messages { padding: 12px; }
    .community-message { gap: 0 6px; font-size: .92rem; }
    .community-message time { font-size: .7rem; }
    .community-chat-shell .community-compose { padding: 10px; }
    .community-compose-row textarea { min-height: 44px; }
    .community-admin-moderation-row { flex-wrap: wrap; }
}
.material-copy-status { margin-left: 10px; color: var(--teal); font-size: .8rem; }
.admin-thumbnail-preview { display: block; width: min(100%, 300px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; }

@media (max-width: 1100px) {
    .material-grid { grid-template-columns: 1fr; }
    .library-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .library-lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .community-admin-options, .community-admin-grid { grid-template-columns: 1fr; }
    .community-live-control { align-items: start; flex-direction: column; }
    .community-admin-section { padding: 22px 0 26px; }
    .community-heading { align-items: start; flex-direction: column; }
    .community-upgrade { align-items: start; flex-direction: column; }
    .banner-settings-grid, .banner-color-grid { grid-template-columns: 1fr; }
    .upgrade-hero { padding: 22px 20px; }
    .upgrade-selected { display: grid; gap: 3px; }
    .upgrade-offer-grid { grid-template-columns: 1fr; }
    .upgrade-questions { grid-template-columns: 1fr; gap: 20px; }
    .app-header { min-height: 68px; padding: 9px 16px; }
    .brand img { width: 100px; height: 42px; }
    .brand span { padding-left: 10px; font-size: .72rem; }
    .header-actions { display: none; }
    .mobile-menu-button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--ink); font-weight: 750; }
    .mobile-menu-button span { color: var(--teal); font-size: 1.25rem; line-height: 1; }
    .mobile-menu-button[aria-expanded="true"] { border-color: var(--teal); background: var(--surface-tint); }
    .app-shell { display: block; }
    .js .sidebar:not(.is-open) { display: none; }
    .sidebar { width: 100%; padding: 12px 18px 20px; flex-direction: column; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
    .sidebar a { width: 100%; min-height: 44px; padding: 10px 14px; white-space: normal; border-left: 3px solid transparent; border-bottom: 0; border-radius: 0 4px 4px 0; }
    .sidebar a[aria-current="page"] { border-left-color: var(--bright); border-bottom-color: transparent; }
    .sidebar-external { width: 100%; margin: 12px 0; gap: 8px; }
    .sidebar-external a:has(img) { min-height: 0; }
    .sidebar-external img { width: min(100%, 320px); height: auto; max-height: 180px; margin: 0 auto; object-fit: contain; }
    .sidebar-account { margin-top: 0; }
    .sidebar-logout { display: block; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
    .sidebar-logout button { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--teal); font-weight: 750; }
    .main-content { padding: 28px 18px 52px; }
    .content-row { align-items: flex-start; flex-direction: column; gap: 10px; }
    .row-actions { flex-wrap: wrap; }
    .heading-actions { align-items: flex-start; flex-direction: column; }
    .heading-actions .primary-button { margin-top: 0; }
    .journey-list li { grid-template-columns: 30px minmax(0, 1fr); gap: 8px 12px; align-items: start; }
    .journey-status { grid-column: 2; }
    .library-lesson-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
    .brand { gap: 8px; }
    .brand img { width: 82px; }
    .brand span { padding-left: 8px; font-size: .64rem; }
    .icon-command { padding: 5px 8px; }
    .library-heading { align-items: start; flex-direction: column; gap: 4px; }
    .library-heading h1 { font-size: 1.85rem; }
    .library-categories { gap: 9px; }
    .library-category-info { align-items: start; flex-direction: column; gap: 1px; padding: 10px; }
    .library-category-info strong { font-size: .93rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition-duration: 0s !important; }
}
