:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  background: #131416;
  color: #f4f5f1;
  --canvas: #131416;
  --surface: #1a1c1f;
  --surface-raised: #222529;
  --surface-hover: #292d31;
  --text: #f4f5f1;
  --muted: #b0b3b8;
  --quiet: #959aa1;
  --line: #34383d;
  --accent: #dfff00;
  --accent-hover: #e8ff66;
  --accent-ink: #1a2000;
  --error: #ffb4a8;
  --warning: #f0d597;
}

/* Foundation and keyboard access */
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button, a, input, textarea { touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
a { color: inherit; }
img, video { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
[hidden], .is-hidden { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.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; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 14px 20px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* Navigation */
.site-header { background: var(--canvas); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1536px; min-height: 64px; margin: auto; display: flex; align-items: center; gap: 28px; padding: 10px 32px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; text-decoration: none; font-size: 19px; font-weight: 650; letter-spacing: -.6px; }
.brand-mark { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 23px; font-weight: 700; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.search-box { display: flex; align-items: center; gap: 11px; height: 44px; min-width: 0; max-width: 360px; flex: 1; margin-left: auto; padding: 0 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.search-box svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex-shrink: 0; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 14px; }
.search-box:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search-box input:focus-visible { outline: none; }
.search-box input::placeholder { color: var(--quiet); }
.search-key { color: var(--quiet); font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.private-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.top-nav { display: flex; align-items: stretch; gap: 24px; min-height: 44px; margin: 0; flex-shrink: 0; }
.top-nav a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; position: relative; padding: 10px 0; color: var(--muted); text-decoration: none; font-size: 13px; white-space: nowrap; }
.top-nav a.active { color: var(--text); font-weight: 700; }
.top-nav a.active::after { content: ""; position: absolute; right: 0; bottom: 1px; left: 0; height: 2px; background: var(--accent); }
.top-nav a:hover { color: var(--accent); }
.sign-out { margin-left: auto; display: flex; align-items: center; }
.sign-out button { min-height: 44px; border: 0; padding: 10px 0; background: transparent; color: var(--muted); font-size: 14px; }
.sign-out button:hover { color: var(--text); }

/* Shared layout and actions */
main { max-width: 1440px; min-height: calc(100vh - 260px); padding: 48px 32px 72px; margin: auto; }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 36px; }
.library-heading h1, .search-header h1 { font-family: Arial, "Helvetica Neue", sans-serif; font-size: clamp(32px, 3.8vw, 48px); line-height: 1.08; font-weight: 700; letter-spacing: -1.8px; margin: 0 0 14px; }
.library-heading h1 { text-transform: uppercase; }
.library-heading p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.65; }
.library-heading .eyebrow, .eyebrow { color: var(--accent); font-size: 12px; font-weight: 650; line-height: 1.4; letter-spacing: 2.2px; text-transform: uppercase; margin-bottom: 18px; }
@supports (-webkit-background-clip: text) {
  .library-heading h1, .search-header h1 { background: linear-gradient(180deg, #fff 15%, #c8cbd1 70%, #8b9099 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 12px 19px; border: 1px solid #555b61; border-radius: 10px; background: transparent; color: var(--text); font-size: 13px; font-weight: 650; line-height: 1.4; text-align: center; text-decoration: none; transition: background .18s, border-color .18s; }
.button:hover { background: var(--surface-hover); border-color: var(--quiet); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button svg { width: 17px; height: 17px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; }
.back-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: -8px 0 28px; color: var(--muted); text-decoration: none; font-size: 13px; line-height: 1.5; }
.back-link:hover { color: var(--accent); }

/* Two-source home: existing local imagery, no external assets */
main:has(.collection-grid) { padding-top: 32px; }
.classroom-home, main:has(.collection-grid) > section { padding-top: 10px; }
.classroom-home .library-heading, main:has(.collection-grid) .library-heading { flex-direction: column; text-align: center; gap: 20px; margin-bottom: 32px; }
.classroom-home .library-heading h1, main:has(.collection-grid) .library-heading h1 { display: flex; flex-direction: column; align-items: center; font-size: clamp(38px, 4vw, 56px); font-weight: 700; letter-spacing: -.055em; text-transform: uppercase; }
.classroom-home .library-heading p:not(.eyebrow), main:has(.collection-grid) .library-heading p:not(.eyebrow) { font-size: 17px; }
.collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; max-width: 1080px; margin: auto; }
.collection-card { isolation: isolate; position: relative; overflow: hidden; min-height: 340px; display: flex; flex-direction: column; align-items: flex-start; padding: 30px; text-align: left; border: 1px solid #42474d; border-radius: 20px; background: var(--surface-raised); text-decoration: none; transition: border-color .2s, transform .2s; }
.collection-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #13141624 0%, #131416d9 58%, #131416 100%); }
.collection-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.collection-art { position: absolute; inset: 0; z-index: -2; opacity: .65; pointer-events: none; }
.collection-art img { width: 100%; height: 100%; object-fit: cover; }
.collection-icon { width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; margin-bottom: 28px; border: 1px solid #ffffff35; border-radius: 16px; background: #202428; color: var(--accent); font-size: 38px; overflow: hidden; box-shadow: 0 8px 32px #0004; }
.collection-icon img { width: 100%; height: 100%; object-fit: cover; }
.collection-card h2 { font-size: clamp(26px, 2.5vw, 34px); font-weight: 700; letter-spacing: -1px; line-height: 1.16; margin: 0 0 12px; }
.collection-card p { color: #c9cdd1; font-size: 14px; line-height: 1.5; margin: 0 0 28px; }
.collection-open { display: inline-flex; align-items: center; gap: 12px; min-height: 46px; padding: 12px 17px; margin-top: auto; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; }
.collection-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.continue-watching { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; flex-wrap: wrap; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 3px 0 #8a9b00; }
.continue-watching:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Course collections and search cards */
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 26px; }
.course-card { display: flex; flex-direction: column; min-width: 0; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); text-decoration: none; transition: transform .2s, border-color .2s; }
.course-card:only-child { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0,1.35fr) minmax(280px,1fr); }
.course-card:only-child .course-cover { height: 100%; }
.course-card:only-child .course-details { justify-content: center; padding: 36px; }
.course-card:only-child .course-details h2 { font-size: clamp(26px,3vw,38px); }
.course-card:only-child .course-bottom { margin-top: 12px; }
.course-card:hover { border-color: #858c4a; transform: translateY(-3px); }
.course-cover { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16/9; overflow: hidden; background: var(--surface-raised); }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { max-width: 100%; padding: 30px; text-align: center; color: var(--muted); font-size: 22px; font-weight: 700; line-height: 1.3; }
.course-details { display: flex; flex-direction: column; flex: 1; min-height: 204px; padding: 24px; }
.course-details h2 { font-size: 23px; line-height: 1.22; font-weight: 650; letter-spacing: -.65px; margin: 0 0 13px; }
.course-description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0 0 26px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.course-bottom { margin-top: auto; }
.course-count { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--quiet); font-size: 12px; line-height: 1.5; }
.progress-track { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 5px; border: 0; border-radius: 8px; background: #383d40; overflow: hidden; }
.progress-track::-webkit-progress-bar { background: #383d40; border-radius: 8px; }
.progress-track::-webkit-progress-value { background: var(--accent); border-radius: 8px; }
.progress-track::-moz-progress-bar { background: var(--accent); border-radius: 8px; }
.course-status { margin-top: 12px; color: var(--quiet); font-size: 12px; line-height: 1.5; }
.search-header { margin-bottom: 32px; }
.search-header p { font-size: 15px; color: var(--muted); line-height: 1.6; margin: 0; }
.search-reset { min-height: 44px; margin-top: 14px; padding: 10px 0; border: 0; background: transparent; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; font-size: 14px; text-align: left; }
.search-section-title { margin: 32px 0 16px; color: var(--quiet); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: 1.5px; }
.search-results { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.search-result { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-bottom: 1px solid var(--line); text-decoration: none; }
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: var(--surface-raised); }
.result-info { flex: 1; min-width: 0; }
.search-result h2 { margin: 0 0 6px; font-size: 18px; line-height: 1.4; font-weight: 650; }
.search-result p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.search-result .search-snippet { margin-top: 9px; color: var(--quiet); font-size: 14px; }
.result-arrow { color: var(--accent); }

/* Lesson navigation */
.classroom-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 24px; align-items: start; }
main:has(.classroom-layout) { max-width: 1520px; padding-top: 20px; }
.course-sidebar { grid-column: 2; grid-row: 1; position: sticky; top: 20px; min-width: 0; margin-top: 56px; padding: 14px; border: 1px solid #2e3135; border-radius: 18px; background: var(--surface); }
.course-sidebar .back-link { min-height: 44px; margin: -4px 0 10px; font-size: 12px; }
.sidebar-heading { padding: 0 4px; }
.sidebar-heading h1 { font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -.4px; margin-bottom: 12px; }
.sidebar-progress-copy { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 14px; color: var(--quiet); font-size: 12px; line-height: 1.5; }
.lesson-list { max-height: calc(100dvh - 260px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #51575d transparent; list-style: none; margin: 0; padding: 4px; }
.lesson-list li { margin: 4px 0; }
.lesson-link { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; padding: 12px; border-radius: 10px; color: var(--muted); font-size: 14px; line-height: 1.45; text-decoration: none; }
.lesson-link:hover { color: var(--text); background: var(--surface-raised); }
.lesson-link.selected { color: var(--text); background: #282a2d; }
.lesson-link.selected .lesson-name { font-weight: 650; }
.lesson-icon { display: flex; align-items: center; justify-content: center; position: relative; flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border: 1.5px solid #717980; border-radius: 50%; font-size: 11px; line-height: 1; color: var(--text); }
.lesson-icon.complete { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.lesson-link.selected .lesson-icon:not(.complete) { border-color: var(--accent); }
.lesson-link.selected .lesson-icon:not(.complete)::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.lesson-name { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lesson-number { color: var(--quiet); font-size: 12px; font-weight: 500; }
.lesson-link.selected .lesson-number { color: var(--accent); }
.lesson-title-text { font-size: 14px; font-weight: 500; line-height: 1.4; }
.lesson-duration { color: var(--quiet); font-size: 12px; line-height: 1.6; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.lesson-thumb { display: block; width: 96px; height: 54px; overflow: hidden; border-radius: 6px; background: var(--surface-raised); }
.lesson-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lesson-link:has(.lesson-thumb) { position: relative; display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 3px 14px; align-items: start; }
.lesson-link:has(.lesson-thumb) .lesson-icon { position: absolute; left: 122px; top: 14px; width: 14px; height: 14px; margin: 0; }
.lesson-link:has(.lesson-thumb) .lesson-thumb { grid-column: 1; grid-row: 1 / span 2; }
.lesson-link:has(.lesson-thumb) .lesson-name { grid-column: 2; }
.lesson-link:has(.lesson-thumb) .lesson-number { padding-left: 22px; }
.lesson-link:has(.lesson-thumb) .lesson-duration { grid-column: 2; font-size: 12px; }
.lesson-list .section-label { padding: 22px 11px 8px; margin: 0; color: var(--quiet); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 1.5px; }
.mobile-course-toggle { display: none; }

/* Player and saved lesson content */
.lesson-panel { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; background: transparent; }
.lesson-topline { order: -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; color: var(--quiet); font-size: 12px; line-height: 1.5; }
.lesson-topline a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; }
.lesson-topline a:hover { color: var(--accent); }
.lesson-heading { order: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 4px 0 24px; }
.lesson-heading h2 { min-width: 0; flex: 1; margin: 0; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.15; font-weight: 700; letter-spacing: -1px; overflow-wrap: anywhere; }
.complete-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; flex-shrink: 0; padding: 0 0 0 8px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.check-circle { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1.5px solid #737b82; border-radius: 50%; color: #8b949b; font-size: 16px; }
.complete-button[aria-pressed="true"] { color: var(--accent); }
.complete-button[aria-pressed="true"] .check-circle { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.video-wrap { aspect-ratio: 16/9; position: relative; overflow: hidden; margin-bottom: 18px; border-radius: 16px; background: #050607; }
.video-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-wrap video, .video-wrap > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.video-wrap.online > img { object-fit: cover; opacity: .65; }
.video-overlay { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; position: absolute; inset: 0; padding: 20px; background: linear-gradient(0deg,#050607b3,#05060710 80%); }
.video-play { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.video-play svg { width: 24px; height: 24px; fill: currentColor; margin-left: 4px; }
.video-online-note { color: #fff; font-size: 13px; text-align: center; line-height: 1.6; }
.media-caption { margin: -8px 0 26px; color: var(--quiet); font-size: 12px; line-height: 1.65; }
.media-caption a { display: inline-block; white-space: nowrap; color: var(--muted); text-underline-offset: 3px; }
.playback-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 22px; padding: 0; border: 0; background: transparent; }
.playback-status, .resume-status { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 12px; line-height: 1.6; }
.playback-reset, .playback-restart { flex-shrink: 0; min-height: 44px; padding: 10px 13px; border: 1px solid #555b61; border-radius: 8px; background: transparent; color: var(--text); font-size: 12px; font-weight: 600; }
.playback-reset:hover, .playback-restart:hover { background: var(--surface-raised); border-color: var(--accent); }
.lesson-body { order: 4; color: #d0d3d5; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.lesson-body > :first-child { margin-top: 0; }
.lesson-body p { margin-bottom: 20px; }
.lesson-body h1, .lesson-body h2, .lesson-body h3, .lesson-body h4 { color: var(--text); font-size: 21px; line-height: 1.4; font-weight: 650; letter-spacing: -.4px; margin: 32px 0 14px; }
.lesson-body img { height: auto; border-radius: 8px; }
.lesson-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.lesson-body ul, .lesson-body ol { padding-left: 24px; }
.lesson-body li { margin-bottom: 8px; }
.lesson-body blockquote { margin: 24px 0; padding: 4px 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.lesson-body pre { max-width: 100%; overflow-x: auto; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); font-size: 14px; }
.lesson-body code { padding: 2px 5px; border-radius: 4px; background: var(--canvas); color: #e1e4d9; font-family: Consolas, monospace; font-size: .9em; }
.lesson-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.lesson-body td, .lesson-body th { border: 1px solid #464c51; padding: 10px 14px; }
.lesson-body hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.notice { order: 3; margin-bottom: 24px; padding: 17px 19px; border: 1px solid #665431; border-radius: 9px; background: #30291c; color: var(--warning); font-size: 14px; line-height: 1.7; }
.notice a { text-underline-offset: 4px; }
.resources, .notes { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.resources { order: 5; }
.notes { order: 6; }
.resources h3, .notes h3 { font-size: 16px; font-weight: 650; margin: 0 0 16px; }
.resource-list { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; margin: 0; }
.resource-link { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas); color: #d9dcde; text-decoration: none; font-size: 14px; overflow-wrap: anywhere; }
.resource-link:hover { background: var(--surface-raised); border-color: #656c72; }
.resource-link svg { width: 20px; height: 20px; stroke: var(--accent); stroke-width: 1.6; fill: none; flex-shrink: 0; }
.resource-name { flex: 1; min-width: 0; }
.resource-state { color: var(--quiet); font-size: 12px; white-space: nowrap; }
.notes-help { color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 14px; }
.notes textarea { display: block; resize: vertical; width: 100%; min-height: 150px; border: 1px solid #51575d; border-radius: 10px; background: var(--canvas); color: var(--text); padding: 16px; line-height: 1.7; font-size: 16px; }
.notes textarea::placeholder { color: var(--quiet); }
.lesson-footer { order: 7; display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.lesson-footer .next { margin-left: auto; }
.lesson-capture-label { order: 8; margin: 26px 0 0; color: var(--quiet); font-size: 12px; line-height: 1.6; }
.course-empty { padding: 36px; text-align: center; }
.course-empty h2 { font-size: 27px; }
.course-empty p { color: var(--muted); font-size: 16px; line-height: 1.6; }

/* Native-cue transcript and copy controls */
main.has-transcript-view { max-width: 1520px; }
.media-and-transcript { display: contents; }
.video-column { order: 0; min-width: 0; }
.video-column .media-caption { margin-bottom: 10px; }
.transcript-panel { order: 2; min-width: 0; overflow: hidden; margin-bottom: 28px; border: 1px solid #34383d; border-radius: 16px; background: var(--surface); }
.transcript-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px 0; }
.transcript-heading h3 { margin: 0; font-size: 15px; font-weight: 650; }
.transcript-heading label { display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); font-size: 12px; white-space: nowrap; cursor: pointer; }
.transcript-follow { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.transcript-origin { margin: 3px 16px 16px; color: var(--quiet); font-size: 12px; line-height: 1.5; }
.transcript-copy-tools { padding: 0 16px 16px; color: var(--muted); font-size: 12px; }
.transcript-copy-tools > span { display: block; margin-bottom: 9px; }
.transcript-copy-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.transcript-copy-buttons button, .transcript-select-all { min-height: 44px; padding: 10px 11px; border: 1px solid #51575d; border-radius: 7px; background: var(--surface); color: var(--text); font-size: 12px; line-height: 1.4; }
.transcript-copy-buttons button:hover:not(:disabled), .transcript-select-all:hover { border-color: var(--accent); background: var(--surface-hover); }
.transcript-copy-status { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.transcript-copy-fallback { margin-top: 14px; }
.transcript-copy-fallback label { display: block; color: var(--text); font-size: 13px; }
.transcript-copy-value { display: block; width: 100%; min-height: 150px; max-height: 300px; resize: vertical; border: 1px solid #697178; border-radius: 7px; background: var(--surface); color: var(--text); padding: 12px; margin: 9px 0; line-height: 1.6; font-size: 16px; }
.transcript-copy-fallback p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 9px 0 0; }
.transcript-scroll { max-height: 380px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #626b72 transparent; border-top: 1px solid var(--line); padding: 8px; }
.transcript-scroll:focus-visible { outline-offset: -2px; }
.transcript-cues { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2px 16px; list-style: none; padding: 0; margin: 0; }
.transcript-cues li { margin: 2px 0; }
.transcript-cue { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 10px; width: 100%; min-height: 44px; padding: 12px 8px; border: 0; border-radius: 6px; background: transparent; color: #c8cdd0; text-align: left; font-size: 14px; line-height: 1.65; }
.transcript-cue:hover { background: var(--surface-raised); }
.transcript-cue.active { color: var(--accent-ink); background: var(--accent); }
.transcript-time { color: var(--quiet); font-size: 12px; line-height: 1.9; font-variant-numeric: tabular-nums; }
.transcript-cue.active .transcript-time { color: #485300; }
.transcript-text { white-space: pre-line; overflow-wrap: anywhere; }
.transcript-status { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 12px 0 18px; padding: 0 16px; }

/* Empty states and footer */
.empty-state, .error-state { max-width: 720px; margin: 40px auto; padding: 48px 32px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: center; line-height: 1.7; }
.empty-state h1, .empty-state h2, .error-state h1 { font-size: 30px; line-height: 1.2; letter-spacing: -.8px; margin: 16px 0; }
.empty-state p, .error-state p { color: var(--muted); font-size: 16px; }
.empty-icon { color: var(--accent); font-size: 32px; }
.loading-state { padding: 110px 20px; color: var(--muted); font-size: 16px; text-align: center; }
.loader { display: inline-block; width: 26px; height: 26px; margin-bottom: 14px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.site-footer { display: flex; justify-content: space-between; gap: 28px; max-width: 1376px; margin: 0 auto; padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 12px; line-height: 1.65; }
.site-footer #save-status { color: var(--muted); text-align: right; flex-shrink: 0; max-width: 42%; }
.site-footer #save-status.error { color: var(--error); }

/* Responsive layouts keep the player primary and chapter navigation usable. */
@media (min-width: 1760px) {
  main.has-transcript-view { max-width: 1856px; }
  .has-transcript-view .lesson-panel { display: grid; grid-template-columns: minmax(0,1fr) 320px; column-gap: 24px; align-items: start; }
  .has-transcript-view .lesson-panel > * { grid-column: 1 / -1; }
  .has-transcript-view .video-column { grid-column: 1; }
  .has-transcript-view .transcript-panel { grid-column: 2; order: 0; }
  .has-transcript-view .transcript-cues { grid-template-columns: 1fr; }
  .has-transcript-view .transcript-scroll { max-height: 420px; }
}
@media (max-width: 1440px) {
  .site-footer { margin-left: 32px; margin-right: 32px; }
  .classroom-layout { grid-template-columns: minmax(0,1fr) 330px; gap: 20px; }
}
@media (max-width: 1190px) {
  .header-inner { gap: 20px; }
  .brand { font-size: 18px; }
  .private-label { font-size: 11px; }
  .course-grid { gap: 20px; }
  .course-details { padding: 21px; }
  .course-details h2 { font-size: 21px; }
  .classroom-layout { grid-template-columns: minmax(0,1fr) 310px; }
  .course-sidebar { padding: 10px; }
  .lesson-link:has(.lesson-thumb) { grid-template-columns: 84px minmax(0,1fr); column-gap: 12px; }
  .lesson-thumb { width: 84px; height: 48px; }
  .lesson-link:has(.lesson-thumb) .lesson-icon { left: 108px; }
  .complete-button .complete-label { display: none; }
  .complete-button { min-width: 44px; padding: 0; }
  .transcript-scroll { max-height: 340px; }
}
@media (max-width: 1000px) {
  .classroom-layout { display: flex; flex-direction: column; gap: 0; }
  .course-sidebar { position: static; width: 100%; margin: 0 0 22px; padding: 0; border: 0; border-radius: 0; background: transparent; }
  .course-sidebar .back-link { margin-bottom: 6px; }
  .sidebar-heading { padding: 0; }
  .sidebar-heading h1 { font-size: 21px; margin-bottom: 10px; }
  .sidebar-progress-copy { margin: 10px 0 14px; }
  .mobile-course-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 13px 15px; border: 1px solid #4c5359; border-radius: 10px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; }
  .mobile-course-toggle svg { width: 17px; height: 17px; stroke: var(--accent); fill: none; stroke-width: 2; }
  .mobile-course-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .lesson-list { display: none; max-height: 380px; padding: 6px; margin: 10px 0 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .lesson-list.mobile-open { display: block; }
  .lesson-link { padding: 14px 12px; }
  .lesson-link:has(.lesson-thumb) { grid-template-columns: 96px minmax(0,1fr); column-gap: 14px; }
  .lesson-thumb { width: 96px; height: 54px; }
  .lesson-link:has(.lesson-thumb) .lesson-icon { left: 122px; top: 16px; }
  .lesson-panel { width: 100%; }
}
@media (max-width: 900px) {
  .header-inner { padding-left: 24px; padding-right: 24px; }
  .private-label, .search-key { display: none; }
  .top-nav { gap: 18px; }
  .search-box { max-width: 300px; }
  .site-footer { margin-left: 24px; margin-right: 24px; }
  main { padding: 36px 24px 56px; }
  .course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .course-card:only-child { grid-template-columns: minmax(0,1fr) minmax(240px,1fr); }
  .course-card:only-child .course-details { padding: 24px; }
  .collection-grid { gap: 20px; }
  .collection-card { padding: 28px; min-height: 340px; }
  .collection-icon { margin-bottom: 28px; }
  .lesson-heading h2 { font-size: 30px; }
  .resource-state { display: none; }
}
@media (max-width: 700px) {
  .header-inner { min-height: 0; padding: 14px 20px; flex-wrap: wrap; gap: 10px 18px; }
  .brand { font-size: 20px; }
  .brand-mark { width: 34px; height: 34px; font-size: 23px; }
  .top-nav { order: 2; width: 100%; gap: 24px; }
  .search-box { order: 3; flex: auto; width: 100%; max-width: none; margin: 0; }
  .search-box input { font-size: 16px; }
  .site-footer { margin-left: 20px; margin-right: 20px; }
  main { padding: 28px 20px 48px; }
  .library-heading { gap: 18px; align-items: flex-start; margin-bottom: 28px; }
  .library-heading h1, .search-header h1 { font-size: 34px; letter-spacing: -1.2px; }
  .library-heading p { font-size: 14px; }
  .library-heading > .button { flex-shrink: 0; padding: 10px 12px; font-size: 12px; }
  .classroom-home, main:has(.collection-grid) > section { padding-top: 16px; }
  .classroom-home .library-heading, main:has(.collection-grid) .library-heading { align-items: center; margin-bottom: 32px; }
  .classroom-home .library-heading h1, main:has(.collection-grid) .library-heading h1 { font-size: clamp(38px,9vw,52px); }
  .classroom-home .library-heading p:not(.eyebrow), main:has(.collection-grid) .library-heading p:not(.eyebrow) { font-size: 16px; }
  .collection-grid { grid-template-columns: 1fr; gap: 20px; max-width: 460px; }
  .collection-card { min-height: 320px; padding: 26px; }
  .collection-icon { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 24px; }
  .collection-card h2 { font-size: 30px; }
  .course-grid { gap: 20px; }
  .course-card:only-child { display: flex; }
  .course-card:only-child .course-cover { height: auto; }
  .course-card:only-child .course-details { padding: 24px; }
  .course-details { padding: 20px; }
  .sidebar-heading h1 { font-size: 21px; }
  .lesson-topline { font-size: 12px; gap: 14px; }
  .lesson-heading { gap: 12px; margin-bottom: 22px; }
  .lesson-heading h2 { font-size: 29px; line-height: 1.18; }
  .video-wrap { border-radius: 12px; }
  .video-online-note { font-size: 12px; }
  .video-play { width: 48px; height: 48px; }
  .lesson-body { font-size: 16px; }
  .transcript-scroll { max-height: 330px; }
  .transcript-cues { grid-template-columns: 1fr; }
  .transcript-cue { font-size: 14px; }
  .playback-tools { align-items: flex-start; gap: 12px; }
  .playback-reset, .playback-restart { padding: 10px; }
  .lesson-footer { gap: 10px; }
  .lesson-footer .button { padding: 11px 12px; font-size: 12px; }
  .site-footer { flex-direction: column; gap: 12px; padding-top: 22px; }
  .site-footer #save-status { max-width: none; text-align: left; }
  .empty-state, .error-state { padding: 32px 22px; margin: 20px 0; }
  .empty-state h1, .empty-state h2, .error-state h1 { font-size: 26px; }
  .search-result { gap: 13px; padding: 20px 17px; }
}
@media (max-width: 520px) {
  .course-grid { grid-template-columns: 1fr; }
  .library-heading { flex-wrap: wrap; }
  .course-details h2 { font-size: 24px; }
  .course-description { font-size: 15px; }
  .course-details { min-height: 190px; }
  .transcript-heading { flex-wrap: wrap; gap: 0 10px; }
}
@media (max-width: 360px) {
  main { padding-left: 16px; padding-right: 16px; }
  .header-inner { padding-left: 16px; padding-right: 16px; }
  .site-footer { margin-left: 16px; margin-right: 16px; }
  .collection-card { padding: 24px; }
  .collection-card h2 { font-size: 27px; }
  .lesson-footer { flex-wrap: wrap; }
}
/* Keep both classroom choices visible on short desktop windows. */
@media (min-width: 900px) and (max-height: 700px) {
  body:has(.collection-grid) .header-inner { min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
  main:has(.collection-grid) { padding-top: 20px; padding-bottom: 32px; }
  .classroom-home, main:has(.collection-grid) > section { padding-top: 0; }
  .classroom-home .library-heading, main:has(.collection-grid) .library-heading { gap: 12px; margin-bottom: 20px; }
  .classroom-home .library-heading .eyebrow { margin-bottom: 10px; }
  .classroom-home .library-heading h1, main:has(.collection-grid) .library-heading h1 { flex-direction: row; justify-content: center; gap: .24em; font-size: 42px; margin-bottom: 10px; }
  .classroom-home .library-heading p:not(.eyebrow), main:has(.collection-grid) .library-heading p:not(.eyebrow) { font-size: 14px; }
  .collection-card { display: grid; grid-template-columns: 56px minmax(0,1fr); grid-template-rows: auto auto 1fr; column-gap: 18px; row-gap: 8px; min-height: 220px; padding: 24px; }
  .collection-icon { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 56px; height: 56px; margin: 0; border-radius: 13px; }
  .collection-card h2 { grid-column: 2; grid-row: 1; margin: 0; font-size: 28px; }
  .collection-card p { grid-column: 2; grid-row: 2; margin: 0; }
  .collection-open { grid-column: 1 / -1; grid-row: 3; align-self: end; justify-self: start; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .collection-card:hover, .course-card:hover { transform: none; }
}
