:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --surface: #ffffff;
  --surface-soft: #f6f8fa;
  --text: #1f2328;
  --muted: #656d76;
  --line: #d0d7de;
  --accent: #0969da;
  --accent-strong: #0969da;
  --accent-soft: #ddf4ff;
  --shadow: 0 16px 48px rgba(31,35,40,.07);
  --sidebar: #0d1117;
  --sidebar-text: #e6edf3;
  --hero: #0d1117;
  --input: #fff;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #161b22;
  --surface-soft: #0d1117;
  --text: #e6edf3;
  --muted: #8b949e;
  --line: #30363d;
  --accent: #58a6ff;
  --accent-strong: #58a6ff;
  --accent-soft: #11243b;
  --shadow: 0 18px 56px rgba(0, 0, 0, .18);
  --sidebar: #0d1117;
  --sidebar-text: #e6edf3;
  --hero: #0d1117;
  --input: #0d1117;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; transition: background .25s, color .25s; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
::selection { background: #58a6ff; color: #0d1117; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.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; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0,1fr); }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); min-height: 100vh; padding: 28px 18px 22px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 1px 8px 34px; color: #fff; }
.brand-logo { display: block; width: 52px; height: 52px; flex: 0 0 52px; object-fit: contain; }
.brand-symbol { width: 39px; height: 39px; border-radius: 12px; flex: 0 0 39px; display: flex; align-items: center; justify-content: center; gap: 3px; background: linear-gradient(145deg,#58a6ff,#238636); box-shadow: 0 8px 22px rgba(88,166,255,.22); transform: rotate(-5deg); }
.brand-symbol span { display: block; width: 4px; height: 15px; border-radius: 4px; background: #0d1117; transform: rotate(25deg); }
.brand-symbol span:nth-child(2) { height: 22px; }
.brand-copy { display: grid; line-height: 1.04; }
.brand-copy strong { font-size: 19px; letter-spacing: -.045em; font-weight: 800; }
.brand-copy small { font-size: 9px; letter-spacing: .33em; color: #58a6ff; margin-top: 6px; font-weight: 800; }
.sidebar-caption { font-size: 9px; font-weight: 800; color: #8b949e; letter-spacing: .17em; padding: 0 15px; margin: 10px 0 12px; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 47px; border-radius: 11px; color: #8b949e; font-size: 13px; font-weight: 650; transition: background .2s, color .2s, transform .2s; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.065); transform: translateX(2px); }
.nav-link.active { color: #79b8ff; background: rgba(88,166,255,.13); box-shadow: inset 3px 0 0 #58a6ff; }
.nav-icon { font-size: 20px; width: 22px; text-align: center; line-height: 1; font-weight: 400; }
.sidebar-bottom { margin-top: auto; }
.sidebar-note { display: flex; gap: 10px; padding: 17px 10px 19px; border-bottom: 1px solid rgba(255,255,255,.09); color: #e6edf3; font-size: 11px; line-height: 1.55; }
.sidebar-note small { color: #8b949e; }
.pulse-dot { width: 8px; height: 8px; flex: 0 0 8px; display: inline-block; border-radius: 50%; background: #2ea043; box-shadow: 0 0 0 4px rgba(46,160,67,.14); margin-top: .42em; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 17px 7px 0; min-width: 0; }
.sidebar-user > span:last-child { min-width: 0; display: grid; }
.sidebar-user strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #fff; }
.sidebar-user small { font-size: 10px; color: #8b949e; }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 10px; background: #58a6ff; color: #0d1117; font-size: 12px; font-weight: 850; }
.avatar.soft { width: 39px; height: 39px; flex-basis: 39px; background: var(--accent-soft); color: var(--accent-strong); }
.avatar-photo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.main-column { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 73px; flex: 0 0 73px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(24px,4vw,66px); border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar-path { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); font-size: 12px; font-weight: 700; white-space: nowrap; }
.topbar-path > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.path-root { font-size: 10px; font-weight: 850; letter-spacing: .18em; color: var(--accent-strong); }
.path-divider { color: #8b949e; }
.topbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 15px; }
.language-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.language-switch button { min-width: 34px; min-height: 29px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 800; line-height: 1; }
.language-switch button:hover { color: var(--text); }
.language-switch button.active { color: #fff; background: var(--accent-strong); }
.login-top-actions { display: flex; align-items: center; gap: 9px; }
.topbar-badge { display: inline-flex; gap: 9px; align-items: center; color: var(--muted); font-size: 11px; font-weight: 700; }
.topbar-badge .pulse-dot { margin: 0; width: 6px; height: 6px; flex-basis: 6px; }
.icon-button { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--text); background: var(--surface-soft); font-size: 18px; transition: transform .2s, border-color .2s, background .2s; }
.icon-button:hover { transform: translateY(-2px); border-color: var(--accent); }
.topbar-inbox { position: relative; text-decoration: none; flex: none; }
.topbar-inbox.has-unread { border-color: var(--accent); color: var(--accent); }
.topbar-unread { position: absolute; top: -8px; right: -9px; min-width: 19px; height: 19px; padding: 0 4px; display: grid; place-items: center; border-radius: 99px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; line-height: 1; }
.text-button { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 12px; }
.text-button:hover { color: var(--accent-strong); }
.mobile-menu { display: none; }
.page-content { width: min(100%, 1430px); margin: 0 auto; padding: 39px clamp(24px,4vw,66px) 68px; flex: 1; animation: page-in .5s ease both; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; margin-bottom: 30px; }
.heading-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.page-heading h1 { font-size: clamp(29px,3.2vw,45px); letter-spacing: -.055em; line-height: 1.14; margin: 8px 0 9px; font-weight: 800; }
.page-heading p { color: var(--muted); margin: 0; font-size: 13px; max-width: 650px; }
.eyebrow { display: block; color: var(--accent-strong); font-size: 10px; font-weight: 850; letter-spacing: .2em; }
.accent-dot { color: var(--accent); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 43px; padding: 0 19px; border-radius: 10px; font-size: 12px; font-weight: 800; border: 1px solid transparent; white-space: nowrap; transition: transform .2s, box-shadow .2s, background .2s; }
.button:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(20,62,58,.1); }
.button-primary { color: #fff; background: #0969da; }
.button-primary:hover { background: #1f7cf0; }
html[data-theme="dark"] .button-primary { background: #2381ea; color: #fff; }
html[data-theme="dark"] .button-primary:hover { background: #388bfd; }
.button-outline { border-color: var(--line); background: var(--surface); color: var(--text); }
.button-secondary { color: var(--accent-strong); background: var(--accent-soft); }
.button-light { color: #0d1117; background: #ddf4ff; }
.button-ghost { color: var(--muted); background: transparent; }
.button-wide { width: 100%; justify-content: space-between; min-height: 52px; }
.hero-panel { background: radial-gradient(circle at 82% 26%,rgba(31,111,235,.24),transparent 31%),linear-gradient(125deg,#161b22,#0d1117 67%,#11243b); border-radius: 22px; min-height: 298px; overflow: hidden; display: grid; grid-template-columns: 1.15fr .85fr; position: relative; color: #e6edf3; box-shadow: 0 22px 50px rgba(0,0,0,.16); }
.hero-panel.compact { min-height: 260px; }
.hero-copy { padding: 34px 0 35px clamp(32px,3.5vw,57px); z-index: 2; }
.hero-label { display: inline-flex; align-items: center; gap: 10px; font-size: 10px; font-weight: 800; letter-spacing: .16em; color: #79b8ff; }
.hero-label .pulse-dot { margin: 0; }
.hero-copy h2 { font-size: clamp(30px,3vw,45px); line-height: 1.12; letter-spacing: -.05em; margin: 20px 0 12px; font-weight: 770; }
.hero-copy h2 em { font-style: normal; color: #58a6ff; }
.hero-copy p { color: #aab4c0; font-size: 13px; line-height: 1.7; max-width: 450px; margin: 0 0 24px; }
.hero-art { min-height: 260px; position: relative; }
.orbit { position: absolute; width: 288px; height: 288px; border: 1px solid rgba(142,241,204,.17); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(0deg); }
.orbit::before { content: ''; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #58a6ff; top: 22px; left: 58px; box-shadow: 0 0 16px rgba(88,166,255,.7); }
.orbit-a { animation: orbit 22s linear infinite; }
.orbit-b { width: 205px; height: 205px; border-style: dashed; animation: orbit-reverse 28s linear infinite; }
.orbit-b::before { top: 40px; left: 12px; width: 5px; height: 5px; }
.hero-core { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) rotate(-8deg); width: 131px; height: 131px; border-radius: 32px; display: grid; align-content: end; justify-items: center; padding-bottom: 15px; background: #161b22 url("../img/hiveops-logo.9d6c552a1dce.png") center 21px / 74px no-repeat; border: 1px solid #30363d; color: #e6edf3; box-shadow: 0 20px 48px rgba(0,0,0,.24),0 0 0 10px rgba(88,166,255,.05); }
.hero-core span { display: none; }
.hero-core small { font-size: 8px; font-weight: 900; letter-spacing: .24em; }
.floating-tag { position: absolute; padding: 7px 11px; border: 1px solid rgba(88,166,255,.3); border-radius: 6px; background: rgba(13,17,23,.65); color: #79b8ff; font-size: 8px; font-weight: 800; letter-spacing: .13em; animation: float 5s ease-in-out infinite; }
.tag-one { left: 15%; top: 18%; }.tag-two { right: 8%; top: 34%; animation-delay: -2s; }.tag-three { left: 13%; bottom: 17%; animation-delay: -3s; }
.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 17px; margin: 22px 0 31px; }
.metric-card { min-height: 150px; padding: 18px 21px; display: flex; flex-direction: column; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.metric-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.metric-icon { width: 31px; height: 31px; border-radius: 8px; display: grid; place-items: center; font-size: 18px; line-height: 1; margin-bottom: 8px; }
.metric-icon.cyan { color: #0969da; background: #ddf4ff; }.metric-icon.violet { color: #7e76ce; background: #eeecfc; }.metric-icon.amber { color: #cb8b3b; background: #fff3df; }.metric-icon.green { color: #238636; background: #dafbe1; }
.metric-label { font-size: 11px; color: var(--muted); font-weight: 700; }
.metric-card strong { font-size: 30px; letter-spacing: -.06em; line-height: 1.15; margin: 3px 0 1px; }
.metric-card small { color: var(--muted); font-size: 10px; }
.two-column { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.surface-card { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); padding: 23px; min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 17px; }
.section-heading h2 { font-size: 19px; letter-spacing: -.035em; margin: 4px 0 0; }
.section-heading.page-section { margin: 34px 0 16px; }
.subtle-link { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--accent-strong); font-size: 11px; font-weight: 800; white-space: nowrap; }
.subtle-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.list-stack { display: grid; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; transition: transform .2s; }
a.list-row:hover { transform: translateX(4px); }
.row-icon { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px; display: grid; place-items: center; color: #8e7bd2; background: #f0ecfc; font-size: 17px; font-weight: 700; }
.row-icon.accent { color: var(--accent-strong); background: var(--accent-soft); }
.row-main { min-width: 0; display: grid; gap: 1px; flex: 1; }
.row-main strong { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 10px; color: var(--muted); white-space: nowrap; }
.row-arrow { color: var(--accent-strong); font-size: 14px; font-weight: 750; white-space: nowrap; }
.empty-state { display: flex; align-items: flex-start; flex-direction: column; justify-content: center; min-height: 210px; padding: 16px 4px 5px; }
.empty-state.large { min-height: 305px; align-items: center; text-align: center; }
.empty-symbol { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); font-size: 24px; margin-bottom: 13px; }
.empty-state h3 { font-size: 15px; letter-spacing: -.02em; margin: 0 0 5px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.65; max-width: 320px; }
.footer { display: flex; justify-content: space-between; padding: 18px clamp(24px,4vw,66px) 24px; color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.footer span:first-child { color: var(--accent-strong); font-weight: 900; }
.message-stack { display: grid; gap: 8px; margin-bottom: 17px; }
.notice { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--line); padding: 12px 15px; border-radius: 10px; font-size: 12px; font-weight: 650; line-height: 1.55; }
.notice-success { background: #e8f5ed; color: #145d32; border-color: #b8dfc6; }
.notice-warning { background: #fff5df; color: #805400; border-color: #efd69f; }
.notice-error { background: #fff0ef; color: #a12d32; border-color: #f1bfc1; }
html[data-theme="dark"] .notice-success { background: #153024; color: #8ee1a7; border-color: #2b6241; }
html[data-theme="dark"] .notice-warning { background: #382b16; color: #f2cc79; border-color: #785c2c; }
html[data-theme="dark"] .notice-error { background: #3a2023; color: #ffabae; border-color: #814047; }
.course-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 19px; }
.course-card { min-height: 232px; display: flex; flex-direction: column; padding: 21px; border-radius: 17px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s,border-color .2s,box-shadow .2s; }
.course-cover-thumb { display: block; width: calc(100% + 42px); height: 135px; margin: -21px -21px 17px; object-fit: cover; border-radius: 17px 17px 0 0; }
.course-cover-hero { display: block; width: 100%; height: clamp(170px,23vw,300px); object-fit: cover; border-radius: 18px; margin-bottom: 22px; box-shadow: var(--shadow); }
.course-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 22px 45px rgba(17,77,68,.12); }
.course-card-top { display: flex; align-items: center; justify-content: space-between; }
.course-glyph { width: 41px; height: 41px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; color: var(--accent-strong); background: var(--accent-soft); }
.course-card h3 { font-size: 19px; letter-spacing: -.04em; margin: 18px 0 5px; line-height: 1.25; }
.course-card p { font-size: 11px; color: var(--muted); margin: 0 0 24px; line-height: 1.6; }
.course-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 13px; margin-top: auto; font-size: 10px; color: var(--muted); }
.course-card-bottom strong { color: var(--accent-strong); font-size: 11px; }
.catalog-card { min-height: 0; }
.catalog-classes { display: grid; gap: 10px; margin-top: 16px; }
.catalog-class { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.catalog-class span { overflow-wrap: anywhere; }
.catalog-class .button { flex: none; }
@media (max-width: 420px) { .catalog-class { align-items: stretch; flex-direction: column; } }
.status-pill { display: inline-flex; align-items: center; border-radius: 99px; padding: 6px 10px; background: var(--accent-soft); color: var(--accent-strong); font-size: 10px; font-weight: 800; white-space: nowrap; }
.progress-track { display: block; height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: auto; }
.progress-track > span { display: block; height: 100%; width: var(--progress,0%); border-radius: inherit; background: linear-gradient(90deg,#0969da,#58a6ff); transition: width .5s; }
.progress-track.small { width: 110px; height: 5px; margin-top: 5px; }
.back-link { display: inline-block; color: var(--muted); font-size: 11px; font-weight: 750; margin-bottom: 18px; }
.back-link:hover { color: var(--accent-strong); }
.detail-layout { grid-template-columns: 1.3fr .8fr; }
.module-block + .module-block { margin-top: 20px; }
.module-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }.module-index,.step-number { color: var(--accent-strong); background: var(--accent-soft); border-radius: 8px; padding: 5px 8px; font-size: 10px; font-weight: 850; }
.module-heading h3 { font-size: 14px; margin: 0; }
.course-order-actions { display: inline-flex; flex: none; gap: 4px; margin-left: auto; }
.course-order-actions button { width: 28px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: var(--surface); cursor: pointer; font-size: 15px; line-height: 1; }
.course-order-actions button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.course-order-actions button:disabled { opacity: .35; cursor: default; }
.module-block .list-row .course-order-actions { margin-left: 0; }
@media (max-width: 650px) { .module-block .list-row { flex-wrap: wrap; }.module-block .list-row .row-main { flex-basis: calc(100% - 48px); }.module-block .list-row .course-order-actions { margin-left: 45px; } }
.mini-empty { color: var(--muted); font-size: 11px; padding: 12px 0; }
.card-footer-note { border-top: 1px solid var(--line); margin-top: 19px; padding-top: 15px; font-size: 10px; color: var(--muted); }
.section-count { font-size: 10px; color: var(--muted); }
.student-row { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); padding: 17px 0; transition: transform .2s; }.student-row:hover { transform: translateX(3px); }
.student-progress { min-width: 115px; font-size: 10px; color: var(--muted); }
.progress-row { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.inline-form { display: flex; align-items: center; gap: 7px; }.compact-select { background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 10px; }
.mini-button { border: 1px solid var(--line); background: var(--surface-soft); color: var(--text); border-radius: 8px; padding: 7px 10px; font-size: 10px; font-weight: 700; }.mini-button:hover { border-color: var(--accent); }
.lesson-row { padding: 17px 0; }.lesson-content { max-width: 850px; }.lesson-meta { display: flex; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }.lesson-body { padding: 13px 0 4px; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }.lesson-body p { margin: 12px 0; }
.lesson-blocks { display: grid; gap: 22px; padding-top: 20px; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.lesson-block-heading { margin: 8px 0 -12px; font-size: 23px; letter-spacing: -.035em; }
.lesson-block-paragraph p,.lesson-rich-html p { margin: 0 0 12px; }
.lesson-rich-html :is(h2,h3) { margin: 10px 0; letter-spacing: -.025em; }
.lesson-rich-html a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.lesson-rich-html :is(ul,ol) { padding-left: 26px; }
.lesson-code { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.lesson-code-label { padding: 8px 15px; border-bottom: 1px solid var(--line); color: var(--accent-strong); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.lesson-code pre { margin: 0; padding: 17px; overflow: auto; color: var(--text); font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; }
.lesson-figure { margin: 0; }
.lesson-figure img { display: block; max-width: 100%; height: auto; max-height: 620px; border: var(--lesson-image-border,1px) solid var(--line); border-radius: 12px; }
.lesson-text-align-left { text-align: left; }.lesson-text-align-center { text-align: center; }.lesson-text-align-right { text-align: right; }.lesson-text-align-justify { text-align: justify; }
.lesson-figure figcaption { padding-top: 8px; color: var(--muted); font-size: 11px; }
.lesson-block-subheading { margin: 8px 0 -8px; font-size: 1.45em; line-height: 1.35; letter-spacing: -.025em; }
.lesson-font-serif { font-family: Georgia, Cambria, 'Times New Roman', serif; }.lesson-font-mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.lesson-font-display { font-family: 'Trebuchet MS', 'Avenir Next', Verdana, sans-serif; }.lesson-font-humanist { font-family: 'Segoe UI', Calibri, Optima, sans-serif; }
.lesson-blocks .lesson-text-xs { font-size: .75em; }.lesson-blocks .lesson-text-xl { font-size: 1.35em; }.lesson-blocks .lesson-text-xxl { font-size: 1.6em; }
.lesson-blocks .lesson-text-small { font-size: .88em; }.lesson-blocks .lesson-text-large { font-size: 1.18em; }
.lesson-blocks .lesson-block-subheading.lesson-text-small { font-size: 1.2em; }.lesson-blocks .lesson-block-subheading.lesson-text-large { font-size: 1.7em; }
.lesson-block-subsection { font-size: 1.2em; }.lesson-blocks .lesson-block-subheading.lesson-text-xs { font-size: 1em; }.lesson-blocks .lesson-block-subheading.lesson-text-xl { font-size: 2em; }.lesson-blocks .lesson-block-subheading.lesson-text-xxl { font-size: 2.25em; }
.lesson-figure.lesson-image-small { max-width: 320px; }.lesson-figure.lesson-image-medium { max-width: 560px; }.lesson-figure.lesson-image-large { max-width: 800px; }.lesson-figure.lesson-image-full { width: 100%; }
.lesson-figure[style*="--lesson-image-width"] { max-width: min(100%, var(--lesson-image-width)); width: 100%; }
.lesson-figure.lesson-align-center { margin-inline: auto; }.lesson-figure.lesson-align-right { margin-left: auto; }
.lesson-figure img { width: 100%; object-fit: contain; }
.lesson-quote { margin: 0; padding: 8px 18px; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.lesson-callout { padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; background: var(--accent-soft); }
.lesson-file { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.lesson-file .button { max-width: 100%; }
.lesson-file small { max-width: 100%; color: var(--muted); overflow-wrap: anywhere; }
.activity-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) auto auto; align-items: end; gap: 10px; }
.activity-row .row-main small { white-space: normal; }
@media (max-width: 1100px) { .activity-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 560px) { .activity-filters { grid-template-columns: 1fr; }.activity-row { flex-wrap: wrap; }.activity-row .row-meta { margin-left: 48px; } }
.section-gap { margin-top: 20px; }.support-text { color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }.practice-box { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }.practice-box h2 { margin: 6px 0 10px; font-size: 18px; }.evidence-item { align-items: flex-start; }.evidence-item .row-main small { white-space: normal; overflow-wrap: anywhere; }.evidence-item .support-text { margin-top: 5px; }
.history-stack { display: grid; gap: 18px; max-width: 900px; }.history-stack details { margin-top: 14px; }.history-stack summary { cursor: pointer; color: var(--accent-strong); font-size: 12px; font-weight: 800; }.revision-diff { padding: 15px; border-radius: 10px; background: var(--surface-soft); border: 1px solid var(--line); font-size: 11px; line-height: 1.6; max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.form-layout { max-width: 720px; }.form-card { padding: 28px; }.stack-form { display: grid; gap: 18px; }.field { display: grid; gap: 6px; }.field[hidden] { display: none; }.field label { font-size: 11px; color: var(--text); font-weight: 800; }.field input,.field textarea,.field select,.form-control { display: block; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--input); color: var(--text); font-size: 12px; outline: none; transition: border-color .2s, box-shadow .2s; }.field input:focus,.field textarea:focus,.field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88,166,255,.12); }.field textarea { resize: vertical; }.field-help,.field-error { font-size: 10px; color: var(--muted); }.field-error { color: #c55562; }.form-error { padding: 10px 12px; background: #fff0f1; color: #ae3e4e; border-radius: 8px; font-size: 11px; }.form-actions { display: flex; gap: 10px; margin-top: 7px; }
.field input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--accent); }
.field input[type=file] { padding: 9px; }.field input[type=file]::file-selector-button { border: 0; border-radius: 7px; padding: 8px 11px; margin-right: 10px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 750; cursor: pointer; }.list-search { display: flex; gap: 10px; margin-bottom: 15px; }.list-search input { min-width: 0; flex: 1; }
.student-id-card { min-width: 205px; max-width: 250px; padding: 15px 17px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--line); display: grid; gap: 4px; }
.field-help { line-height: 1.55; }
.field-help ul { margin: 3px 0 0; padding-left: 17px; }
.field-help li + li { margin-top: 3px; }
.select-picker { position: relative; min-width: 0; }
.field select.select-picker-native { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.select-picker-trigger { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--input); color: var(--text); text-align: left; cursor: pointer; }
.select-picker-trigger:hover,.select-picker-trigger:focus-visible { border-color: var(--accent); outline: 3px solid var(--accent-soft); }
.select-picker-trigger span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-picker-panel { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 30; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.select-picker-panel[hidden] { display: none; }
.select-picker-search { width: 100%; padding: 10px 11px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--text); }
.select-picker-options { max-height: 240px; overflow: auto; display: grid; gap: 3px; }
.select-picker-option { padding: 10px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.select-picker-option:hover,.select-picker-option:focus-visible,.select-picker-option[aria-selected=true] { background: var(--accent-soft); color: var(--accent-strong); outline: none; }
.select-picker-empty { margin: 8px; color: var(--muted); font-size: 12px; }
.assignment-choice { display: grid; align-content: start; gap: 12px; }
.assignment-choice h2,.assignment-choice p { margin: 0; }
.assignment-choice p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.assignment-choice .button { justify-self: start; margin-top: 8px; }
.assignment-instructor { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.assignment-instructor strong,.assignment-instructor small { display: block; }
.assignment-instructor small { color: var(--muted); font-size: 11px; }
.student-id-card span { color: var(--accent-strong); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.student-id-card strong { font-size: 27px; letter-spacing: -.05em; line-height: 1.15; }
.student-id-card small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.invitation-row { flex-wrap: wrap; }
.invitation-row .row-main small { white-space: normal; }
.invitation-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.invitation-actions .button { min-height: 36px; padding: 0 12px; }
.form-actions { flex-wrap: wrap; }
.login-body { min-height: 100vh; }.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1fr) minmax(430px,.93fr); }.login-feature { overflow: hidden; position: relative; color: #fff; background: radial-gradient(circle at 73% 48%,rgba(35,134,54,.22),transparent 31%),linear-gradient(135deg,#161b22,#0d1117 72%); }.login-feature-inner { min-height: 100vh; display: flex; flex-direction: column; padding: 38px clamp(34px,6vw,96px) 35px; position: relative; z-index: 2; }.login-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 850; letter-spacing: -.05em; }.login-brand em { color: #58a6ff; font-style: normal; }.feature-content { margin: auto 0; max-width: 540px; }.eyebrow.light { color: #58a6ff; }.feature-content h1 { font-size: clamp(48px,5.5vw,80px); letter-spacing: -.075em; line-height: 1.02; margin: 20px 0 24px; font-weight: 830; }.feature-content p { color: #8b949e; font-size: 15px; line-height: 1.8; max-width: 410px; }.feature-footer { display: flex; gap: 28px; font-size: 9px; font-weight: 800; letter-spacing: .16em; color: #8b949e; }.login-glow { position: absolute; width: 680px; height: 680px; border: 1px solid rgba(88,166,255,.13); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); box-shadow: 0 0 0 75px rgba(88,166,255,.025),0 0 0 160px rgba(88,166,255,.025); }.feature-orbit { position: absolute; width: 460px; height: 460px; left: 52%; top: 42%; border: 1px dashed rgba(88,166,255,.18); border-radius: 50%; animation: orbit 50s linear infinite; }.orbit-two { width: 300px; height: 300px; left: 60%; top: 50%; animation-direction: reverse; }.login-form-side { padding: 38px clamp(30px,6vw,105px) 28px; display: flex; flex-direction: column; }.login-top { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 800; letter-spacing: .2em; color: var(--muted); }.login-card { width: min(100%,390px); margin: auto; }.login-kicker { display: flex; align-items: center; gap: 10px; color: var(--accent-strong); font-size: 11px; font-weight: 800; }.login-kicker .pulse-dot { margin: 0; }.login-card h2 { font-size: clamp(31px,3vw,41px); letter-spacing: -.06em; line-height: 1.14; margin: 15px 0 10px; }.login-card > p { color: var(--muted); font-size: 13px; margin: 0 0 31px; }.login-card .stack-form { gap: 20px; }.login-card .field label { font-size: 12px; }.login-card .field input { min-height: 49px; }.login-help { border-top: 1px solid var(--line); margin-top: 31px; padding-top: 20px; color: var(--muted); font-size: 11px; }.login-bottom { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .13em; }.login-bottom span { color: var(--accent); margin: 0 8px; }
.login-feature { background: radial-gradient(circle at 73% 48%,rgba(31,111,235,.25),transparent 31%),linear-gradient(135deg,#161b22,#0d1117 72%); }
.login-brand em,.eyebrow.light { color: #58a6ff; }
.login-brand .brand-logo { width: 72px; height: 72px; flex-basis: 72px; }
.feature-content p,.feature-footer { color: #aab4c0; }
.login-glow { border-color: rgba(88,166,255,.12); box-shadow: 0 0 0 75px rgba(88,166,255,.025),0 0 0 160px rgba(88,166,255,.025); }
.feature-orbit { border-color: rgba(88,166,255,.18); }
.nav-link { color: #aab4c0; }
.sidebar-caption,.sidebar-user small,.sidebar-note small { color: #8b949e; }
.sidebar-note { color: #e6edf3; }
.avatar { background: #11243b; color: #58a6ff; }
html[data-theme="dark"] .metric-icon.cyan,html[data-theme="dark"] .metric-icon.violet,html[data-theme="dark"] .metric-icon.amber,html[data-theme="dark"] .metric-icon.green,html[data-theme="dark"] .row-icon { background: #11243b; color: #79b8ff; }
@keyframes page-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes orbit { from { transform: translate(-50%,-50%) rotate(0); } to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes orbit-reverse { from { transform: translate(-50%,-50%) rotate(360deg); } to { transform: translate(-50%,-50%) rotate(0); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 1100px) { .course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.hero-art { opacity: .75; }.topbar-badge { display: none; } }
@media (max-width: 800px) { .app-shell { grid-template-columns: 1fr; }.sidebar { position: fixed; left: 0; top: 0; width: 244px; transform: translateX(-110%); transition: transform .25s; box-shadow: 15px 0 40px rgba(0,0,0,.13); }.menu-open .sidebar { transform: translateX(0); }.mobile-menu { display: grid; }.topbar { padding: 0 22px; }.topbar-path { flex: 1; }.two-column,.detail-layout { grid-template-columns: 1fr; }.login-shell { grid-template-columns: 1fr; }.login-feature { min-height: 300px; }.login-feature-inner { min-height: 300px; padding: 24px 30px; }.feature-content { margin: auto 0; }.feature-content h1 { font-size: 42px; margin: 14px 0 10px; }.feature-content p { font-size: 12px; }.feature-footer { display: none; }.login-form-side { min-height: 480px; padding: 24px 30px; }.login-card { padding: 35px 0; } }
@media (max-width: 560px) { .page-content { padding: 27px 19px 45px; }.page-heading { align-items: flex-start; flex-direction: column; gap: 15px; }.page-heading h1 { font-size: 32px; }.hero-panel { grid-template-columns: 1fr; min-height: auto; }.hero-copy { padding: 28px 25px 30px; }.hero-copy h2 { font-size: 32px; }.hero-art { display: none; }.metric-grid { gap: 10px; }.metric-card { min-height: 135px; padding: 14px; }.course-grid { grid-template-columns: 1fr; }.surface-card { padding: 18px; }.topbar-path .path-root,.path-divider { display: none; }.topbar-actions { gap: 7px; }.logout-button { font-size: 0; }.logout-button span { font-size: 17px; }.footer { padding: 17px 19px; }.footer span:last-child { display: none; }.progress-row { align-items: flex-start; flex-wrap: wrap; }.progress-row .row-main { flex-basis: calc(100% - 55px); }.inline-form { padding-left: 42px; }.student-progress { display: none; }.feature-content h1 { font-size: 34px; }.login-feature { min-height: 255px; }.login-feature-inner { min-height: 255px; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; } }

/* Spacious course reader and personal progress views. */
.page-content:has(.reader-layout) { width: min(100%, 1650px); padding-inline: clamp(22px, 3vw, 52px); }
.reader-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 18px 0 24px; }
.reader-intro h1 { margin: 9px 0 10px; font-size: clamp(35px, 3.6vw, 58px); line-height: 1.08; letter-spacing: -.058em; }
.reader-intro p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; max-width: 78ch; }
.reader-progress { padding: 18px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin-bottom: 24px; }
.reader-progress-label { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 18px; margin-bottom: 13px; font-size: 12px; }
.reader-progress-label span { color: var(--muted); }
.reader-track { height: 8px; }
.reader-layout { display: grid; grid-template-columns: 205px minmax(0,1fr); gap: 22px; align-items: start; }
.reader-sidebar { display: grid; gap: 15px; position: sticky; top: 20px; }
.reader-side-card { padding: 18px 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.reader-side-card .eyebrow { padding-left: 8px; margin-bottom: 12px; }
.reader-page-list,.reader-course-list { display: grid; gap: 6px; }
.reader-page-link { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 9px; color: var(--muted); font-size: 12px; }
.reader-page-link span { flex: 0 0 23px; font-weight: 800; color: var(--accent-strong); }
.reader-page-link strong { flex: 1; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.reader-page-link small { font-size: 10px; }
.reader-page-link:hover,.reader-page-link.active { background: var(--accent-soft); color: var(--accent-strong); }
.reader-page-link.active { box-shadow: inset 3px 0 0 var(--accent); }
.reader-page-link.locked,.reader-page-link.locked:hover { opacity: .52; background: transparent; cursor: default; }
.reader-course-list a { display: flex; gap: 9px; padding: 9px 8px; border-radius: 8px; font-size: 11px; }
.reader-course-list a:hover,.reader-course-list a.active { background: var(--surface-soft); }
.reader-course-list a > span:first-child { flex: 0 0 23px; color: var(--accent-strong); font-weight: 800; }
.reader-course-list strong,.reader-course-list small { display: block; }
.reader-course-list strong { color: var(--text); line-height: 1.45; }
.reader-course-list small { color: var(--muted); margin-top: 3px; }
.reader-main { min-width: 0; }
.reader-paper { min-height: 540px; max-width: none; padding: clamp(26px, 3.3vw, 56px); }
.reader-paper-top { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 16px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.reader-objective { margin-top: 28px; padding: 23px 28px; border-radius: 14px; background: var(--accent-soft); border-left: 4px solid var(--accent); }
.reader-objective p { font-size: 16px; line-height: 1.75; margin: 10px 0 0; }
.reader-paper .lesson-blocks { width: min(100%, 1200px); margin-inline: auto; gap: 27px; padding-top: 34px; font-size: 17px; line-height: 1.85; }
.reader-paper .lesson-block-paragraph,.reader-paper .lesson-rich-html,.reader-paper .lesson-quote { max-width: 100%; min-width: 0; }
.reader-paper .lesson-body { width: min(100%, 1200px); margin-inline: auto; }
.reader-paper .lesson-block-heading { font-size: clamp(26px, 2.5vw, 36px); margin: 4px 0 -9px; line-height: 1.2; }
.reader-paper .lesson-code pre { font-size: 15px; line-height: 1.65; padding: 22px; }
.reader-paper .lesson-figure img { max-height: 700px; }
.reader-endnote { margin: 38px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.reader-pager { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.reader-pager .button { min-height: 48px; font-size: 13px; }
.reader-read-note { color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.reader-extra { max-width: none; margin-top: 20px; }
.reader-extra h2 { margin: 9px 0 16px; font-size: 23px; }
.reader-activity-page > .reader-read-note { margin: 18px 0 0; }
.reader-activity-page .reader-extra { margin-top: 20px; box-shadow: none; }
.reader-activity-page .reader-extra:first-of-type { margin-top: 28px; }
.course-learning-head { display: grid; grid-template-columns: minmax(240px,.7fr) minmax(0,1.3fr); min-height: 340px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); margin: 18px 0 42px; }
.course-learning-cover { width: 100%; height: 100%; min-height: 300px; object-fit: cover; }
.course-learning-copy { padding: clamp(28px,3vw,48px); align-self: center; }
.course-learning-copy h1 { margin: 10px 0; font-size: clamp(31px,3vw,46px); line-height: 1.13; letter-spacing: -.05em; }
.course-learning-copy p { color: var(--muted); line-height: 1.7; margin: 0 0 20px; }
.course-learning-progress { margin: 0 0 22px; max-width: 480px; }
.course-learning-progress strong { display: block; font-size: 13px; margin-bottom: 10px; }
.learning-section { margin-top: 28px; }
.learning-list { display: grid; gap: 10px; }
.learning-item { display: flex; align-items: center; gap: 17px; min-height: 88px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: transform .2s,border-color .2s,box-shadow .2s; }
.learning-item:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.learning-number { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; }
.learning-item .row-main { flex: 1; min-width: 0; }
.learning-item .row-main strong { font-size: 16px; }
.learning-item .row-main small { display: block; color: var(--muted); margin-top: 4px; }
.learning-item .row-arrow { color: var(--accent-strong); font-weight: 800; }
.learning-item.completed { background: var(--surface-soft); }
.information-identity { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.information-identity .avatar { width: 62px; height: 62px; flex-basis: 62px; font-size: 23px; }
.information-identity > div:nth-child(2) { display: grid; }
.information-identity > div:nth-child(2) strong { font-size: 20px; }
.information-identity > div:nth-child(2) span { color: var(--muted); font-size: 13px; }
.information-identity .student-id-card { margin-left: auto; }
.information-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); }
.information-metrics .metric-card { min-height: 125px; }
.information-resume { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.information-resume h2 { margin: 6px 0; font-size: 22px; }
.information-resume p { margin: 0; color: var(--muted); font-size: 13px; }
@media (max-width: 1600px) { .reader-layout { grid-template-columns: minmax(0,1fr); }.reader-sidebar { position: static; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }.reader-side-card { min-width: 0; }.reader-page-list { display: flex; flex-wrap: wrap; }.reader-page-link { flex: 1 1 150px; }.reader-course-list { max-height: 155px; overflow: auto; } }
@media (max-width: 850px) { .reader-sidebar { grid-template-columns: minmax(0,1fr); }.reader-side-card:last-child { display: none; }.course-learning-head { grid-template-columns: 1fr; }.course-learning-cover { max-height: 230px; min-height: 180px; }.information-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }.information-identity { flex-wrap: wrap; }.information-identity .student-id-card { margin-left: 0; } }
@media (max-width: 560px) { .reader-intro { display: block; }.reader-intro h1 { font-size: 34px; }.reader-intro p { font-size: 14px; }.reader-intro .status-pill { display: inline-block; margin-top: 15px; }.reader-progress { padding: 14px 16px; }.reader-paper { min-height: 420px; padding: 25px 20px; }.reader-paper .lesson-blocks { font-size: 16px; }.reader-paper .lesson-code pre { font-size: 13px; }.reader-pager .button { width: 100%; }.reader-pager form { flex: 1; }.reader-paper-top { font-size: 9px; }.reader-objective { padding: 18px; }.reader-page-link { flex-basis: 120px; }.learning-item { align-items: flex-start; flex-wrap: wrap; }.learning-item .row-main { flex-basis: calc(100% - 62px); }.learning-item .status-pill,.learning-item .row-arrow { margin-left: 60px; }.information-resume { align-items: flex-start; flex-direction: column; }.information-metrics { gap: 10px; } }
.lesson-upload-guide { margin: 16px 0; font-size: 13px; line-height: 1.7; }
.lesson-upload-guide strong { display: block; font-size: 15px; margin-bottom: 7px; }
.lesson-upload-guide p { margin: 0; color: var(--muted); }
.lesson-upload-guide code { padding: 2px 5px; border: 1px solid var(--line); border-radius: 5px; color: var(--accent-strong); background: var(--surface-soft); }
.reader-preview-map { display: grid; gap: 10px; }
.reader-preview-map > div { padding: 9px 8px; border-top: 1px solid var(--line); }
.reader-preview-map strong,.reader-preview-map small { display: block; }
.reader-preview-map strong { font-size: 11px; }
.reader-preview-map small { margin-top: 5px; font-size: 10px; color: var(--muted); line-height: 1.45; }
.lesson-page-plan { margin: 16px 0; }
.lesson-page-plan > strong { display: block; font-size: 15px; }
.lesson-page-plan > p { color: var(--muted); font-size: 13px; margin: 5px 0 0; }
.lesson-page-plan-list { display: grid; gap: 8px; margin-top: 14px; }
.lesson-page-plan-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.lesson-page-plan-item strong,.lesson-page-plan-item small { display: block; }
.lesson-page-plan-item small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.lesson-page-plan-item details { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 12px; }
.lesson-page-plan-item summary { cursor: pointer; color: var(--accent-strong); font-weight: 700; }
.lesson-page-plan-item ul { margin: 9px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.65; }
@media (max-width: 560px) {
  .page-content:has(.reader-layout) { padding-inline: 17px; }
  .reader-intro { margin: 10px 0 17px; }
  .reader-intro h1 { font-size: 31px; margin: 7px 0; }
  .reader-intro p { line-height: 1.5; }
  .reader-progress { margin-bottom: 12px; }
  .reader-progress-label { margin-bottom: 8px; }
  .reader-layout { gap: 12px; }
  .reader-side-card { padding: 12px; }
  .reader-side-card .eyebrow { margin-bottom: 7px; }
  .reader-page-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 220px; overflow-y: auto; overflow-x: hidden; gap: 4px; padding-right: 3px; }
  .reader-page-link { min-width: 0; min-height: 49px; padding: 7px; }
  .reader-page-link small { display: none; }
}
.course-learning-head { display: block; }
.course-learning-cover { display: block; width: 100%; height: clamp(220px, 24vw, 320px); min-height: 0; object-fit: cover; object-position: center 55%; background: #0e1b32; }
.course-learning-copy { padding: clamp(25px, 3vw, 42px); }
@media (max-width: 560px) { .course-learning-cover { height: 195px; }.course-learning-copy { padding: 24px 20px; } }
.form-layout:has([data-lesson-editor]) { max-width: 1560px; }
[data-lesson-editor] [hidden] { display: none !important; }
.lesson-editor-section { display: grid; gap: 19px; border-top: 1px solid var(--line); padding-top: 26px; }
.lesson-editor-heading h2,.lesson-attachments-heading h2 { font-size: clamp(22px,2.5vw,30px); letter-spacing: -.04em; margin: 5px 0 7px; }
.lesson-editor-heading p,.lesson-attachments-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.lesson-editor-tabs { display: flex; gap: 7px; flex-wrap: wrap; padding: 5px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); width: fit-content; }
.lesson-editor-tab { min-height: 42px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); padding: 0 18px; font-weight: 750; cursor: pointer; }
.lesson-editor-tab.active { color: var(--accent-strong); background: var(--surface); box-shadow: var(--shadow); }
.lesson-pages-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; margin: 3px 0 11px; }
.lesson-pages-toolbar strong { font-size: 15px; }.lesson-pages-toolbar span { font-size: 12px; color: var(--muted); }
.lesson-editor-pages { display: grid; gap: 15px; margin-bottom: 15px; }
.lesson-page-card { border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); padding: clamp(18px,2.5vw,25px); display: grid; gap: 10px; }
.lesson-page-card-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.lesson-page-card-bar strong { color: var(--accent-strong); font-size: 15px; }
.lesson-card-actions { display: flex; gap: 5px; }
.lesson-card-action { width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 9px; color: var(--text); background: var(--surface); font-size: 17px; cursor: pointer; }
.lesson-card-action:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-strong); }
.lesson-card-action:disabled,.lesson-preview-actions button:disabled { opacity: .35; cursor: default; }
.lesson-page-card label { font-size: 12px; font-weight: 750; }
.lesson-page-card input,.lesson-page-card textarea { width: 100%; padding: 12px 14px; background: var(--input); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font-size: 14px; line-height: 1.6; }
.lesson-page-card input:focus,.lesson-page-card textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.lesson-page-card textarea { min-height: 180px; resize: vertical; }
.lesson-block-list { display: grid; gap: 12px; }
.lesson-edit-block { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 16px; display: grid; gap: 12px; }
.lesson-edit-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.lesson-edit-block-head strong { font-size: 13px; color: var(--accent-strong); }
.lesson-edit-block label { display: grid; gap: 6px; }.lesson-edit-block input,.lesson-edit-block select,.lesson-edit-block textarea { min-height: 41px; }.lesson-edit-block textarea { min-height: 112px; }
.lesson-add-block,.lesson-format-toolbar,.lesson-block-options { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }.lesson-add-block { padding-top: 5px; }.lesson-add-block .button { padding: 8px 11px; font-size: 11px; min-height: 34px; }
.lesson-format-toolbar .lesson-card-action { width: auto; min-width: 36px; padding: 0 9px; font-size: 13px; font-weight: 800; }.lesson-format-toolbar [data-action="italic"] { font-style: italic; }
.lesson-rich-edit { min-height: 120px; padding: 16px; background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: 9px; font-size: 16px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }.lesson-rich-edit:focus { outline: 2px solid var(--accent); outline-offset: 1px; }.lesson-rich-edit:empty::before { content: 'Escribe aquí. Selecciona texto para aplicar formato o pega una imagen con Ctrl+V.'; color: var(--muted); pointer-events: none; }
.lesson-block-options span { font-size: 11px; font-weight: 750; color: var(--muted); }.lesson-block-options select { width: auto; min-width: 145px; padding: 8px 10px; }
.lesson-edit-image-preview { display: block; max-width: min(100%, 400px); max-height: 250px; border: 1px solid var(--line); border-radius: 9px; }.lesson-edit-image-preview[hidden] { display: none; }
.lesson-preview-refresh { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 13px 18px; }.lesson-preview-refresh span { color: var(--muted); font-size: 12px; }
.lesson-live-preview { margin-top: 24px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.lesson-live-preview .reader-paper { border: 0; border-radius: 0; box-shadow: none; min-height: 230px; }
.lesson-preview-top { display: flex; justify-content: space-between; gap: 12px; background: var(--surface-soft); border-bottom: 1px solid var(--line); padding: 14px 20px; color: var(--muted); font-size: 11px; letter-spacing: .08em; font-weight: 800; }
.lesson-preview-top strong { color: var(--accent-strong); letter-spacing: normal; }
.lesson-preview-paper { padding: clamp(22px,3vw,38px); min-height: 210px; }
.lesson-preview-paper h3 { font-size: clamp(22px,3vw,29px); margin: 0 0 18px; letter-spacing: -.04em; }
.lesson-preview-paper div { white-space: pre-wrap; font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.lesson-preview-actions { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 13px 18px; }
.lesson-import-panel { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: var(--surface-soft); }
.lesson-import-intro strong { font-size: 17px; }.lesson-import-intro p { font-size: 13px; line-height: 1.7; color: var(--muted); }
.lesson-import-panel .form-actions { flex-wrap: wrap; margin-bottom: 18px; }
.lesson-mode-notice { border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 7px; padding: 12px 15px; font-size: 13px; line-height: 1.6; }
.lesson-attachments-heading { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 7px; }
.lesson-optional-details { border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.lesson-optional-details > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 20px; cursor: pointer; list-style: none; }
.lesson-optional-details > summary::-webkit-details-marker { display: none; }
.lesson-optional-details > summary strong,.lesson-optional-details > summary small { display: block; }
.lesson-optional-details > summary strong { font-size: 14px; }.lesson-optional-details > summary small { margin-top: 4px; font-size: 11px; color: var(--muted); }
.lesson-optional-details[open] > summary { border-bottom: 1px solid var(--line); }
.lesson-optional-details[open] > summary > span:last-child { transform: rotate(180deg); }
.lesson-optional-inner { display: grid; gap: 18px; padding: 0 20px 20px; }
.lesson-optional-inner .lesson-attachments-heading { margin-top: 0; border-top: 0; }
.learning-list .empty-state.learning-empty { align-items: center; text-align: center; min-height: 205px; padding: 28px; }
.learning-empty .empty-symbol { margin-inline: auto; }
.learning-empty h3 { font-size: 20px; margin-bottom: 8px; }
.learning-empty p { max-width: 440px; font-size: 13px; margin: 0 auto; }
@media (max-width: 560px) { .form-layout:has([data-lesson-editor]) .form-card { padding: 18px; }.lesson-editor-tabs { width: 100%; }.lesson-editor-tab { flex: 1; padding: 0 9px; font-size: 11px; }.lesson-preview-actions .button { padding-inline: 10px; font-size: 11px; }.lesson-import-panel { padding: 16px; } }
.lesson-import-index { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 7px; }
.lesson-import-page { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 12px; font-weight: 700; }
.lesson-import-page.active { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.lesson-import-viewer { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); overflow: hidden; }
.lesson-import-viewer .reader-paper-top { margin: 0 22px; padding-top: 18px; }
.lesson-import-viewer [data-import-content] { min-height: 210px; }
.lesson-import-viewer .reader-paper { border: 0; border-radius: 0; box-shadow: none; min-height: 250px; }
.lesson-import-viewer .reader-extra { margin: 0 20px 20px; box-shadow: none; }
.lesson-workspace { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(350px, .8fr); gap: 22px; align-items: start; }
.lesson-workspace-editor { min-width: 0; }
.lesson-workspace .lesson-live-preview { margin-top: 0; position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); }
.lesson-page-card { padding: 0; overflow: hidden; gap: 0; background: var(--surface); grid-template-columns: minmax(0, 1fr); }
.lesson-page-card > * { min-width: 0; }
.lesson-page-card-bar { padding: 14px 20px; margin: 0; border-bottom: 1px solid var(--line); background: var(--surface-soft); flex-wrap: wrap; }
.lesson-page-card-bar strong { min-width: 0; overflow-wrap: break-word; }
.lesson-card-actions { flex-wrap: wrap; max-width: 100%; }
.lesson-page-card > label { margin: 17px 20px 14px; }
.lesson-page-card > label :is(input,textarea) { font-size: 18px; font-weight: 750; }
.lesson-page-card > label textarea { min-height: 68px; max-height: 160px; resize: vertical; overflow-y: auto; overflow-wrap: break-word; word-break: normal; }
.lesson-format-toolbar { padding: 10px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.lesson-format-toolbar select { width: auto; min-width: 126px; max-width: 175px; padding: 7px 9px; min-height: 35px; font-size: 12px; }
.lesson-toolbar-caption { color: var(--muted); font-size: 11px; font-weight: 800; margin-right: 5px; }
.lesson-source-toggle { min-height: 34px; padding: 7px 10px; font-size: 11px; margin-left: auto; }
.lesson-add-block { padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.lesson-page-canvas { display: block; padding: clamp(20px, 3vw, 38px); min-height: 380px; }
.lesson-page-canvas .lesson-edit-block { display: block; padding: 7px 0 14px; margin: 0; border: 0; border-radius: 0; background: transparent; border-bottom: 1px dashed transparent; }
.lesson-page-canvas .lesson-edit-block:hover,.lesson-page-canvas .lesson-edit-block:focus-within { border-bottom-color: var(--line); }
.lesson-edit-block-head { min-height: 23px; opacity: .7; margin-bottom: 4px; }
.lesson-edit-block-head strong { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.lesson-edit-block-head .lesson-card-action { width: 25px; height: 25px; font-size: 14px; }
.lesson-rich-edit { min-height: 70px; padding: 6px 0; border: 0; background: transparent; border-radius: 0; font-size: 17px; line-height: 1.85; }
.lesson-rich-edit:focus { outline: none; box-shadow: inset 0 -2px var(--accent); }
.lesson-edit-block[data-font="serif"] .lesson-rich-edit,.lesson-edit-block[data-font="serif"] [data-text] { font-family: Georgia, 'Times New Roman', serif; }
.lesson-edit-block[data-font="mono"] .lesson-rich-edit,.lesson-edit-block[data-font="mono"] [data-text] { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.lesson-edit-block[data-font="display"] .lesson-rich-edit,.lesson-edit-block[data-font="display"] [data-text] { font-family: Georgia, serif; letter-spacing: -.035em; }
.lesson-edit-block[data-font="humanist"] .lesson-rich-edit,.lesson-edit-block[data-font="humanist"] [data-text] { font-family: 'Trebuchet MS', Verdana, sans-serif; }
.lesson-edit-block[data-size="xs"] .lesson-rich-edit { font-size: 12px; }.lesson-edit-block[data-size="small"] .lesson-rich-edit { font-size: 14px; }.lesson-edit-block[data-size="large"] .lesson-rich-edit { font-size: 21px; }.lesson-edit-block[data-size="xl"] .lesson-rich-edit { font-size: 26px; }.lesson-edit-block[data-size="xxl"] .lesson-rich-edit { font-size: 32px; }
.lesson-edit-block[data-kind="subheading"] [data-text] { font-size: 26px; font-weight: 800; border: 0; background: transparent; padding: 8px 0; }
.lesson-edit-block[data-level="subsection"] [data-text] { font-size: 20px; }
.lesson-edit-block[data-kind="quote"],.lesson-edit-block[data-kind="callout"] { padding-left: 17px; border-left: 3px solid var(--accent); margin: 8px 0; }
.lesson-edit-block[data-kind="code"] textarea,.lesson-edit-block[data-kind="html"] textarea { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; background: var(--surface-soft); }
.lesson-edit-block[data-kind="image"] { text-align: center; }.lesson-edit-block[data-kind="image"] .lesson-edit-block-head { text-align: left; }
.lesson-edit-image-preview { max-width: 100%; max-height: none; height: auto; margin: 10px auto; }
.lesson-block-options { justify-content: center; }.lesson-block-options .lesson-image-width { width: clamp(90px, 12vw, 155px); padding: 0; }
.lesson-page-source { margin: 20px; width: calc(100% - 40px) !important; min-height: 430px !important; font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace !important; }
@media (max-width: 1100px) { .lesson-workspace { grid-template-columns: 1fr; }.lesson-workspace .lesson-live-preview { position: static; max-height: none; } }
.lesson-workspace { grid-template-columns: minmax(0, 1fr) 280px; }
.lesson-workspace:has(.lesson-inspector[hidden]) { grid-template-columns: minmax(0, 1fr); }
.lesson-inspector[hidden] { display: none; }
.lesson-page-body { min-height: 620px; padding: clamp(24px,4vw,52px); color: var(--text); background: var(--surface); font-size: 18px; line-height: 1.85; overflow-wrap: break-word; word-break: normal; hyphens: auto; outline: none; }
.lesson-page-body:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.lesson-page-body:empty::before { content: 'Escribe aquí tu lección. Pega una imagen o usa las herramientas de arriba.'; color: var(--muted); pointer-events: none; }
.lesson-page-body > p { margin: 0 0 1.15em; min-height: 1.85em; }
.lesson-page-body > p:last-child:empty { min-height: 86px; cursor: text; }
.lesson-page-body > h2 { font-size: 1.65em; line-height: 1.3; margin: 1.1em 0 .5em; }
.lesson-page-body > h4 { font-size: 1.25em; line-height: 1.35; margin: 1em 0 .5em; }
.lesson-page-body > blockquote { border-left: 4px solid var(--accent); margin: 1.3em 0; padding: .5em 1em; background: var(--surface-soft); border-radius: 0 9px 9px 0; }
.lesson-page-body > aside { border: 1px solid var(--accent); border-radius: 10px; margin: 1.3em 0; padding: .7em 1em; background: var(--accent-soft); }
.lesson-page-body > pre { white-space: pre-wrap; font: 14px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace; padding: 18px; margin: 1.3em 0; border-radius: 10px; background: var(--surface-soft); border: 1px solid var(--line); }
.lesson-page-body > blockquote,.lesson-page-body > aside { white-space: pre-wrap; }
.lesson-page-body > [data-kind="html"] { padding: 12px 0; }
.lesson-page-body [data-placeholder]:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.lesson-page-body > [data-kind="pdf"] { display: block; width: fit-content; margin: 1.2em 0; padding: 13px 17px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent-strong); background: var(--surface-soft); }
.lesson-page-body [data-font="serif"] { font-family: Georgia,'Times New Roman',serif; }
.lesson-page-body [data-font="mono"] { font-family: ui-monospace,SFMono-Regular,Consolas,monospace; }
.lesson-page-body [data-font="display"] { font-family: Georgia,serif; letter-spacing: -.035em; }
.lesson-page-body [data-font="humanist"] { font-family: 'Trebuchet MS',Verdana,sans-serif; }
.lesson-page-body [data-size="xs"] { font-size: 12px; }.lesson-page-body [data-size="small"] { font-size: 14px; }
.lesson-page-body [data-size="large"] { font-size: 21px; }.lesson-page-body [data-size="xl"] { font-size: 26px; }.lesson-page-body [data-size="xxl"] { font-size: 32px; }
.lesson-inline-image { display: block; width: 100%; max-width: 100%; padding: 8px 0 13px; cursor: pointer; user-select: none; }
.lesson-inline-image[data-align="left"] { text-align: left; }.lesson-inline-image[data-align="center"] { text-align: center; }.lesson-inline-image[data-align="right"] { text-align: right; }
.lesson-inline-image-frame { display: inline-block; position: relative; max-width: 100%; vertical-align: middle; }
.lesson-inline-image-frame img { display: block; width: 100%; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; pointer-events: none; }
.lesson-page-body > [data-align="left"] { text-align: left; }.lesson-page-body > [data-align="center"] { text-align: center; }.lesson-page-body > [data-align="right"] { text-align: right; }.lesson-page-body > [data-align="justify"] { text-align: justify; }
.lesson-inline-caption { display: block; font-size: 13px; line-height: 1.5; color: var(--muted); margin-top: 6px; }
.lesson-inline-image.selected .lesson-inline-image-frame { outline: 2px solid var(--accent); outline-offset: 2px; }
.lesson-inline-image.selected .lesson-image-resize-handle,.lesson-inline-image:hover .lesson-image-resize-handle,.lesson-image-resize-handle:focus-visible { opacity: 1; pointer-events: auto; }
.lesson-inline-image.is-resizing .lesson-inline-image-frame { outline: 2px dashed var(--accent); outline-offset: 4px; }
.lesson-page-body[hidden] { display: none; }
@media (max-width: 1100px) { .lesson-workspace:has(.lesson-inspector:not([hidden])) { grid-template-columns: minmax(0,1fr); }.lesson-inspector { position: static; } }
.lesson-inspector { position: sticky; top: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.lesson-inspector-head { padding: 19px 20px 16px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.lesson-inspector-head h3 { font-size: 18px; margin: 5px 0 0; letter-spacing: -.025em; }
.lesson-inspector-body { display: grid; gap: 15px; padding: 20px; font-size: 13px; }
.lesson-inspector-body p { color: var(--muted); line-height: 1.65; margin: 0; }
.lesson-inspector-body label { display: grid; gap: 7px; font-size: 12px; font-weight: 750; }
.lesson-inspector-body .form-control { width: 100%; min-height: 40px; }
.lesson-inspector-body .lesson-inspector-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lesson-inspector-body .lesson-inspector-width { display: flex; gap: 9px; align-items: center; }
.lesson-inspector-body .lesson-inspector-width input { width: 100%; }
.lesson-inspector-body .lesson-inspector-width output { min-width: 50px; text-align: right; }
.lesson-inspector-body .button { width: 100%; justify-content: center; }
.lesson-edit-block.selected { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 5px; }
.lesson-edit-block [data-image-settings],.lesson-edit-block [data-code-settings] { display: none !important; }
.lesson-image-placeholder { width: 100%; min-height: 140px; border: 1px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); color: var(--accent-strong); font-size: 14px; font-weight: 750; cursor: pointer; }
.lesson-edit-block[data-kind="image"] .lesson-edit-image-preview { cursor: pointer; }
.lesson-image-stage { display: flex; justify-content: center; width: 100%; min-width: 0; padding: 10px 0; }
.lesson-edit-block[data-align="left"] .lesson-image-stage { justify-content: flex-start; }
.lesson-edit-block[data-align="right"] .lesson-image-stage { justify-content: flex-end; }
.lesson-image-frame { position: relative; max-width: 100%; min-width: min(160px, 100%); }
.lesson-image-frame .lesson-edit-image-preview { display: block; width: 100%; max-width: none; max-height: 620px; height: auto; margin: 0; object-fit: contain; }
.lesson-image-resize-handle { position: absolute; z-index: 3; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: transparent; opacity: 0; pointer-events: none; touch-action: none; user-select: none; transition: opacity .12s ease; }
.lesson-image-resize-handle::after { content: ''; display: block; width: 10px; height: 10px; border: 2px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 2px 5px rgba(0, 0, 0, .28); }
.lesson-edit-block.selected .lesson-image-resize-handle,.lesson-edit-block[data-kind="image"]:hover .lesson-image-resize-handle,.lesson-image-resize-handle:focus-visible { opacity: 1; pointer-events: auto; }
.lesson-edit-block.selected .lesson-image-frame { outline: 1px solid var(--accent); outline-offset: 1px; }
.lesson-image-resize-handle[data-resize-handle="nw"] { top: -11px; left: -11px; cursor: nwse-resize; }
.lesson-image-resize-handle[data-resize-handle="n"] { top: -11px; left: calc(50% - 11px); cursor: ns-resize; }
.lesson-image-resize-handle[data-resize-handle="ne"] { top: -11px; right: -11px; cursor: nesw-resize; }
.lesson-image-resize-handle[data-resize-handle="e"] { top: calc(50% - 11px); right: -11px; cursor: ew-resize; }
.lesson-image-resize-handle[data-resize-handle="se"] { bottom: -11px; right: -11px; cursor: nwse-resize; }
.lesson-image-resize-handle[data-resize-handle="s"] { bottom: -11px; left: calc(50% - 11px); cursor: ns-resize; }
.lesson-image-resize-handle[data-resize-handle="sw"] { bottom: -11px; left: -11px; cursor: nesw-resize; }
.lesson-image-resize-handle[data-resize-handle="w"] { top: calc(50% - 11px); left: -11px; cursor: ew-resize; }
.lesson-edit-block.is-resizing .lesson-image-frame { outline: 2px dashed var(--accent); outline-offset: 4px; }
.lesson-page-canvas .lesson-edit-block[data-kind="paragraph"]:last-child .lesson-rich-edit:empty { min-height: 80px; }
.lesson-preview-modal { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--text); overflow: auto; }
.lesson-preview-modal::backdrop { background: rgba(4, 12, 25, .78); }
.lesson-preview-modal-inner { max-width: 1120px; min-height: 100vh; margin: auto; padding: clamp(15px, 3vw, 32px); }
.lesson-preview-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0 20px; }
.lesson-preview-modal-head h2 { font-size: clamp(22px, 3vw, 34px); margin: 4px 0 0; letter-spacing: -.04em; }
.lesson-preview-modal .lesson-preview-top { border: 1px solid var(--line); border-radius: 15px 15px 0 0; }
.lesson-preview-modal .lesson-preview-refresh { border-inline: 1px solid var(--line); background: var(--surface); }
.lesson-preview-modal [data-preview-body] { background: var(--surface); border-inline: 1px solid var(--line); }
.lesson-preview-modal [data-preview-body] .reader-paper { max-width: none; border: 0; border-radius: 0; box-shadow: none; }
.lesson-preview-modal .lesson-preview-actions { border: 1px solid var(--line); border-radius: 0 0 15px 15px; background: var(--surface); }
.lesson-preview-modal .lesson-preview-actions-top { border-radius: 0; border-top: 0; }
.lesson-page-navigation { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.lesson-page-navigation-bottom { margin: 14px 0; }
.lesson-page-picker { position: relative; min-width: min(290px, 45%); display: flex; align-items: center; gap: 10px; }
.lesson-page-picker > label { flex: none; font-size: 12px; font-weight: 800; white-space: nowrap; }
.lesson-page-picker > input { width: 100%; min-height: 39px; font-size: 12px; }
.lesson-page-options { position: absolute; z-index: 30; top: calc(100% + 5px); left: 0; right: 0; max-height: 245px; overflow-y: auto; overscroll-behavior: contain; padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); box-shadow: 0 15px 35px rgba(0, 0, 0, .2); }
.lesson-page-option { display: block; width: 100%; padding: 10px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--text); text-align: left; font-size: 12px; cursor: pointer; }
.lesson-page-option:hover,.lesson-page-option.highlighted { background: var(--accent-soft); color: var(--accent-strong); }
.lesson-page-no-results { margin: 0; padding: 10px; color: var(--muted); font-size: 12px; }
.lesson-page-navigation button:disabled { opacity: .42; cursor: default; }
.lesson-preview-open { overflow: hidden; }
@media (max-width: 1100px) { .lesson-workspace { grid-template-columns: 1fr; }.lesson-inspector { position: static; }.lesson-inspector-body { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); } }
@media (max-width: 600px) { .lesson-page-navigation { flex-wrap: wrap; }.lesson-page-picker { order: -1; width: 100%; min-width: 0; }.lesson-page-navigation button { flex: 1; }.lesson-preview-modal-head { align-items: flex-start; }.lesson-preview-modal-head .button { white-space: nowrap; } }
.lesson-import-viewer .lesson-blocks { font-size: 16px; line-height: 1.8; }
.lesson-import-viewer .lesson-preview-actions { background: var(--surface-soft); }
.lesson-import-metadata { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.lesson-import-metadata > div { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow-wrap: anywhere; }
.lesson-import-metadata strong,.lesson-import-metadata span { display: block; }
.lesson-import-metadata strong { font-size: 10px; color: var(--accent-strong); text-transform: uppercase; letter-spacing: .05em; }
.lesson-import-metadata span { margin-top: 5px; font-size: 12px; line-height: 1.5; color: var(--text); }
.lesson-guide { max-width: 1050px; display: grid; gap: 20px; }
.lesson-guide .page-heading { margin-bottom: 0; }
.lesson-guide .heading-actions { align-items: center; }
.lesson-guide [data-copy-guide][hidden] { display: none; }
.lesson-guide .surface-card h2 { font-size: 24px; margin: 0 0 10px; }
.lesson-guide .surface-card p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.course-retire { max-width: 940px; display: grid; gap: 20px; }.course-retire .page-heading { margin-bottom: 0; }
.course-retire-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.course-retire-stats > div { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.course-retire-stats strong { color: var(--accent-strong); font-size: 25px; line-height: 1; }.course-retire-stats span { color: var(--muted); font-size: 11px; }
.course-retire-card { display: grid; gap: 16px; }.course-retire-card h2 { margin: 5px 0 8px; font-size: 22px; }.course-retire-card p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.course-retire-card .stack-form { max-width: 650px; }.course-retire-card .check-label { align-items: flex-start; font-size: 13px; line-height: 1.55; }.course-retire-card .check-label input { flex: none; margin-top: 2px; }
.course-delete-button { justify-self: start; border: 1px solid #ac4752; background: #a73543; color: #fff; }.course-delete-button:hover { background: #8f2633; }
.course-retire-blocked { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }.course-retire-blocked strong { display: block; margin-bottom: 6px; }.course-retire-blocked ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.course-lesson-flow { max-width: 920px; margin: -4px 0 20px; padding: 12px 16px; border-left: 3px solid var(--accent); border-radius: 0 9px 9px 0; background: var(--accent-soft); color: var(--text); font-size: 13px; line-height: 1.6; }
.library-panel { display: grid; gap: 18px; }
.library-panel > .section-heading { margin-bottom: 0; }
.library-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.library-filters .field { min-width: 165px; margin: 0; flex: 1 1 190px; }
.library-filters .field:first-child { flex: 2 1 250px; }
.library-filters .button { flex: none; }
.library-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.library-selected-count { font-size: 12px; font-weight: 800; color: var(--muted); margin-right: auto; }
.library-note { margin: -10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.library-danger { background: #b42318; color: #fff; }
.library-danger:hover { background: #d92d20; }
.library-danger:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.library-confirm-word { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; font-weight: 700; }
.library-confirm-word input { width: 125px; }
.library-bulk:not(.has-selection) .library-confirm-word,.library-bulk:not(.has-selection) [data-bulk-submit] { display: none; }
.library-list-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.library-check-label { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: var(--text); }
.library-check-label input,.library-row > input,.library-course-select input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex: none; }
.library-row { flex-wrap: wrap; }
.library-row .row-main strong a:hover { color: var(--accent-strong); text-decoration: underline; }
.library-protected { padding: 5px 8px; border-radius: 8px; color: var(--muted); background: var(--surface-soft); font-size: 10px; font-weight: 700; }
.library-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.library-pagination .is-disabled { opacity: .4; pointer-events: none; }
.library-page-numbers { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 5px; }
.library-page-numbers a,.library-page-numbers span { min-width: 32px; min-height: 32px; display: grid; place-items: center; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 750; }
.library-page-numbers a:hover,.library-page-numbers a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-soft); }
.library-course-grid { margin-top: 0; }
.library-course-card { padding: 0; overflow: hidden; min-height: 0; }
.library-course-card:hover { transform: none; }
.library-course-select { display: flex; align-items: center; gap: 8px; padding: 11px 17px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.library-course-main { display: flex; flex-direction: column; flex: 1; padding: 0 17px 17px; }
.library-course-main .course-cover-thumb { margin: 0 -17px 12px; width: calc(100% + 34px); }
.library-course-actions { display: flex; align-items: center; gap: 9px; padding: 12px 17px; border-top: 1px solid var(--line); }
.library-course-actions .button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.library-course-actions .course-card-trash { width: 38px; padding: 0; margin-left: auto; border: 1px solid #b42318; background: transparent; color: #e5534b; }
.library-course-actions .course-card-trash:hover { border-color: #e5534b; background: rgba(180,35,24,.13); }
.module-heading .text-button,.detail-layout .list-row .text-button,.library-row .text-button { min-height: 32px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); color: var(--text); }
.module-heading .text-button:hover,.detail-layout .list-row .text-button:hover,.library-row .text-button:hover { border-color: #b42318; color: #e5534b; }
.course-delete-dialog { width: min(540px,calc(100vw - 32px)); max-width: none; max-height: min(92dvh,760px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.course-delete-dialog::backdrop { background: rgba(3,9,18,.72); backdrop-filter: blur(4px); }
.course-delete-dialog-inner { padding: clamp(22px,4vw,32px); }
.course-delete-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.course-delete-dialog h2 { margin: 12px 0 4px; font-size: 29px; line-height: 1.2; }
.course-delete-dialog p { line-height: 1.6; }
.course-delete-target { margin: 0 0 14px; color: var(--accent-strong); font-weight: 800; overflow-wrap: anywhere; }
.course-delete-dialog .check-label { align-items: flex-start; margin: 18px 0; line-height: 1.45; }
.course-delete-dialog .check-label input { flex: none; margin-top: 3px; }
.course-delete-dialog .form-actions { margin: 20px 0 14px; justify-content: flex-end; }
.zip-upload-active { overflow: hidden; }
.zip-upload-overlay { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 20px; background: rgba(3,9,18,.78); backdrop-filter: blur(5px); }
.zip-upload-overlay[hidden] { display: none; }
.zip-upload-card { width: min(420px,100%); display: grid; justify-items: center; gap: 12px; padding: 34px 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.zip-upload-card strong { font-size: 20px; line-height: 1.2; }
.zip-upload-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.zip-upload-card small { min-height: 18px; color: var(--accent-strong); font-size: 12px; font-weight: 800; }
.zip-upload-spinner { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: zip-spin .8s linear infinite; }
.zip-upload-track { width: 100%; height: 8px; overflow: hidden; border-radius: 99px; background: var(--line); }
.zip-upload-track > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .15s; }
.zip-upload-track.is-indeterminate > span { width: 36%; animation: zip-scan 1.2s ease-in-out infinite alternate; }
@keyframes zip-spin { to { transform: rotate(360deg); } }
@keyframes zip-scan { from { transform: translateX(-100%); } to { transform: translateX(280%); } }
@media (prefers-reduced-motion: reduce) { .zip-upload-spinner,.zip-upload-track.is-indeterminate > span { animation-duration: 2.4s; } }
.course-lesson-bulk { margin-bottom: 20px; }
.course-lesson-bulk [data-course-link-select],.course-lesson-bulk [data-course-select-all],.module-block [data-course-link-select] { width: 16px; height: 16px; flex: none; accent-color: var(--accent); cursor: pointer; }
.course-delete-library-option { flex: 1 1 230px; font-size: 11px; }
@media (max-width: 700px) { .course-lesson-bulk .button { width: 100%; }.module-block [data-course-link-select] { margin-left: 4px; } }
@media (max-width: 700px) { .library-row .row-main { flex-basis: calc(100% - 95px); }.library-row .subtle-link:first-of-type { margin-left: 42px; }.library-filters .field { flex-basis: 100%; }.library-filters .button { flex: 1; }.library-confirm-word { width: 100%; justify-content: space-between; } }
@media (max-width: 620px) { .course-retire-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }.course-retire .page-heading { align-items: flex-start; } }

.global-confirm { width: min(460px, calc(100vw - 32px)); max-width: none; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, .24); }
.global-confirm::backdrop { background: rgba(3, 9, 18, .68); backdrop-filter: blur(4px); }
.global-confirm-card { padding: clamp(24px, 4vw, 34px); }
.global-confirm h2 { margin: 10px 0; font-size: 25px; line-height: 1.2; }
.global-confirm p { color: var(--muted); line-height: 1.65; margin: 0 0 24px; }
.global-confirm-option { align-items: flex-start; font-size: 14px; line-height: 1.5; margin: 0 0 24px; }
.global-confirm-option[hidden] { display: none; }
.global-confirm-option input { flex: none; margin-top: 2px; }
.review-switch { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.review-filter-details > summary { display: none; }
.review-filters { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(160px, 1fr) minmax(130px, .7fr) auto auto; align-items: end; gap: 12px; }
.review-filters .field { min-width: 0; }
.review-results-heading { margin-top: 26px; }
.review-queue-row { align-items: flex-start; }
.review-queue-row .row-main { min-width: 0; }
.review-queue-row .row-main strong,.review-queue-row .row-main small,.review-excerpt { display: block; overflow-wrap: anywhere; }
.review-excerpt { color: var(--text); line-height: 1.55; margin: 7px 0; }
.review-queue-side { display: grid; justify-items: end; gap: 9px; flex: none; }
.review-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 18px; }
.review-detail-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.review-detail-grid { align-items: start; margin-top: 20px; }
.review-detail-grid .evidence-reading { margin-top: 0; }
.review-detail-grid > div { display: grid; gap: 20px; }
@media (max-width: 1000px) { .review-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }.review-filters .field:first-child { grid-column: 1 / -1; } }
@media (max-width: 620px) { .review-filter-details > summary { display: list-item; cursor: pointer; color: var(--accent); font-weight: 700; padding: 4px 0; }.review-filter-details[open] > summary { margin-bottom: 16px; }.review-filters { grid-template-columns: 1fr; }.review-filters .field:first-child { grid-column: auto; }.review-queue-row { flex-wrap: wrap; }.review-queue-row .row-main { flex-basis: calc(100% - 52px); }.review-queue-side { width: 100%; display: flex; justify-content: space-between; align-items: center; padding-left: 42px; } }
.global-confirm .form-actions { justify-content: flex-end; margin: 0; }

.evidence-reading { max-width: 1060px; margin-top: 20px; }
.evidence-reading h2 { margin: 8px 0 18px; font-size: clamp(22px, 3vw, 30px); }
.evidence-reading-copy { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.9; overflow-wrap: anywhere; }
.evidence-reading-copy p { margin: 0 0 1em; }
.evidence-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 18px; }
.evidence-gallery-item { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); color: var(--text); cursor: pointer; }
.evidence-gallery-item img { width: 100%; height: 170px; object-fit: cover; background: var(--bg); }
.evidence-gallery-item span { padding: 12px; font-size: 13px; overflow-wrap: anywhere; }
.evidence-file-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.evidence-lightbox { width: min(1100px, calc(100vw - 24px)); max-width: none; height: min(90vh, 900px); max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); }
.evidence-lightbox::backdrop { background: rgba(2, 7, 15, .88); }
.evidence-lightbox-inner { display: flex; flex-direction: column; height: 100%; padding: 16px; gap: 12px; }
.evidence-lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.evidence-lightbox-head strong { overflow-wrap: anywhere; }
.evidence-lightbox-stage { display: grid; place-items: center; min-height: 0; flex: 1; overflow: auto; border-radius: 12px; background: var(--bg); }
.evidence-lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.evidence-lightbox-stage img.zoomed { max-width: none; max-height: none; width: 150%; }
.evidence-lightbox-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.lesson-guide code { color: var(--accent-strong); }
.lesson-guide pre { overflow-x: auto; padding: 20px; border-radius: 12px; background: var(--surface-soft); border: 1px solid var(--line); color: var(--text); font-size: 13px; line-height: 1.6; }
.lesson-guide pre code { color: var(--text); }
.lesson-guide-code { position: relative; min-width: 0; }
.lesson-guide-code pre { padding-top: 54px; }
.lesson-guide-copy { position: absolute; top: 11px; right: 11px; z-index: 1; padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.lesson-guide-copy:hover,.lesson-guide-copy:focus-visible { color: var(--accent-strong); border-color: var(--accent); }
.lesson-guide-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.lesson-guide-grid > div { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; padding: 17px; }
@media (max-width: 650px) { .lesson-guide-grid,.lesson-import-metadata { grid-template-columns: 1fr; }.lesson-import-viewer .reader-paper-top { margin-inline: 16px; } }
.status-warning { color: #9a5b0d; background: #fff1d5; }
.timezone-notice { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-color: var(--accent); margin: 0 0 20px; background: var(--accent-soft); }
.timezone-notice h2 { font-size: 20px; margin: 5px 0; }
.timezone-notice p { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0; }
.timezone-notice .button { flex: 0 0 auto; }
@media (max-width: 650px) { .timezone-notice { align-items: stretch; flex-direction: column; }.timezone-notice .button { width: 100%; } }
.check-label { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 12px; cursor: pointer; }
.check-label input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.otp-row { display: flex; gap: 11px; width: 100%; margin-top: 5px; }
.otp-row[hidden],.otp-error[hidden] { display: none; }
.otp-fallback[hidden] { display: none !important; }
.otp-group { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; flex: 1; min-width: 0; }
.login-card .field .otp-digit { display: block; width: 100%; min-width: 0; min-height: 0; height: 58px; padding: 0; border: 1px solid var(--line); border-radius: 11px; background: var(--input); color: var(--text); text-align: center; font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; outline: none; transition: border-color .18s, box-shadow .18s, background .18s; }
.login-card .field .otp-digit:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(88,166,255,.17); }
.otp-row.has-error .otp-digit { border-color: #d65a6a; }
.otp-error { margin: 4px 0 0; color: #d65a6a; font-size: 12px; font-weight: 650; }
@media (max-width: 420px) { .otp-row { gap: 8px; }.otp-group { gap: 4px; }.login-card .field .otp-digit { height: 52px; font-size: 22px; border-radius: 9px; } }

.multi-picker { display: grid; gap: .65rem; }
.multi-picker-list { display: grid; gap: .35rem; max-height: 19rem; overflow-y: auto; padding: .45rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--surface); }
.multi-picker-row { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border-radius: .65rem; cursor: pointer; font-size: .9rem; line-height: 1.45; }
.multi-picker-row:hover, .multi-picker-row:focus-within { background: var(--accent-soft); }
.multi-picker-row input { width: 1.05rem; height: 1.05rem; accent-color: #d2a747; flex: none; }
.multi-picker-row[hidden] { display: none; }
.module-block .row-main strong a { color: inherit; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .2em; }
.module-block .row-main strong a:hover, .module-block .row-main strong a:focus-visible { color: var(--accent-strong); }

/* Reader images share the text column and open the same zoomable viewer for both roles. */
.reader-paper .lesson-figure img { cursor: pointer; transition: box-shadow .16s ease, border-color .16s ease; }
.reader-paper .lesson-figure img:hover,.reader-paper .lesson-figure img:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.image-viewer { width: min(1200px, calc(100vw - 32px)); height: min(920px, calc(100dvh - 32px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 30px 90px rgba(0,0,0,.5); overflow: hidden; }
.image-viewer::backdrop { background: rgba(2, 5, 12, .9); }
.image-viewer-shell { display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: 100%; min-height: 0; }
.image-viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.image-viewer-label { min-width: 0; display: grid; gap: 3px; }
.image-viewer-label strong,.image-viewer-label small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.image-viewer-label strong { font-size: 14px; }.image-viewer-label small { color: var(--muted); font-size: 12px; }
.image-viewer-controls { display: flex; align-items: center; gap: 8px; flex: none; }
.image-viewer-controls output { min-width: 48px; text-align: center; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.image-viewer-controls button { min-width: 38px; min-height: 38px; justify-content: center; }
.image-viewer-controls button:disabled { opacity: .45; cursor: default; }
.image-viewer-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #0a0d13; touch-action: none; }
.image-viewer-stage.can-pan { cursor: grab; }.image-viewer-stage.dragging { cursor: grabbing; }
.image-viewer-stage img { position: absolute; left: 50%; top: 50%; max-width: none; max-height: none; object-fit: contain; transform-origin: center center; pointer-events: none; user-select: none; }
.image-viewer-hint { padding: 10px 16px; color: var(--muted); font-size: 12px; text-align: center; border-top: 1px solid var(--line); }
@media (max-width: 650px) {
  .image-viewer { width: calc(100vw - 12px); height: calc(100dvh - 12px); border-radius: 10px; }
  .image-viewer-header { align-items: flex-start; flex-direction: column; gap: 9px; padding: 10px; }
  .image-viewer-label { width: 100%; }.image-viewer-controls { width: 100%; gap: 5px; }
  .image-viewer-controls .button { padding-inline: 9px; font-size: 11px; }
  .image-viewer-controls [data-viewer-close] { margin-left: auto; }
  .image-viewer-hint { font-size: 11px; padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) { .reader-paper .lesson-figure img { transition: none; } }

.exam-management-row { flex-wrap: wrap; gap: 14px; }
.exam-management-row .row-main { min-width: 0; overflow-wrap: anywhere; flex: 1 1 220px; }
.exam-management-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 620px) { .exam-management-actions { width: 100%; } .exam-management-actions .button { flex: 1 1 140px; } }

.taxonomy-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 22px; }
.taxonomy-filters .field { flex: 1 1 180px; min-width: 0; }
.label-options { max-height: 210px; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.label-options label { display: flex; gap: 10px; align-items: center; padding: 6px 0; overflow-wrap: anywhere; cursor: pointer; }
.label-options input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--accent-strong); }
.label-options .form-control { padding: 0; background: transparent; border: 0; }
.lesson-label-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.taxonomy-guide-table { overflow: auto; max-height: 340px; border: 1px solid var(--line); border-radius: 12px; }
.taxonomy-guide-table table { width: 100%; border-collapse: collapse; }
.taxonomy-guide-table th, .taxonomy-guide-table td { padding: 12px; text-align: left; vertical-align: top; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); font-size: 13px; }
.taxonomy-guide-table th { position: sticky; top: 0; background: var(--surface); }
[data-label-search][hidden], [data-label-empty][hidden] { display: none; }

/* Decorative course covers: titles belong to the course heading, outside the art. */
.course-cover-art { position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(ellipse at 77% 25%, #632030 0, transparent 62%), linear-gradient(125deg, #0c1220, #23141f); color: #fb6577; --cover-accent: #fb6577; }
.cover-art-web-api { --cover-accent: #ff7487; background: radial-gradient(ellipse at 77% 25%, #682138, transparent 62%), linear-gradient(125deg, #111725, #301522); }
.cover-art-networking { --cover-accent: #6dcbe1; background: radial-gradient(ellipse at 77% 25%, #15465a, transparent 62%), linear-gradient(125deg, #0c1623, #142437); }
.cover-art-mobile { --cover-accent: #bd98fa; background: radial-gradient(ellipse at 77% 25%, #49326b, transparent 62%), linear-gradient(125deg, #131323, #241d3d); }
.cover-art-directory { --cover-accent: #81d5b3; background: radial-gradient(ellipse at 77% 25%, #225344, transparent 62%), linear-gradient(125deg, #111a21, #152d29); }
.cover-art-reversing { --cover-accent: #e7bc75; background: radial-gradient(ellipse at 77% 25%, #5c422b, transparent 62%), linear-gradient(125deg, #171723, #302319); }
.cover-art-lab-setup { --cover-accent: #8db4f7; background: radial-gradient(ellipse at 77% 25%, #283f67, transparent 62%), linear-gradient(125deg, #131a26, #1f253e); }
.cover-art-malware { --cover-accent: #ff9276; background: radial-gradient(ellipse at 77% 25%, #6a2e29, transparent 62%), linear-gradient(125deg, #181321, #331d20); }
.cover-art-exploit-dev { --cover-accent: #f3a2cf; background: radial-gradient(ellipse at 77% 25%, #59294f, transparent 62%), linear-gradient(125deg, #171323, #2f1d33); }
.cover-art-research { --cover-accent: #79d6d0; background: radial-gradient(ellipse at 77% 25%, #205652, transparent 62%), linear-gradient(125deg, #0f1925, #173233); }
.cover-art-grid { position: absolute; inset: 0; background-image: linear-gradient(#ffffff08 1px, transparent 1px), linear-gradient(90deg, #ffffff08 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(110deg, transparent, #000); }
.cover-art-circuit { position: absolute; width: 100%; height: 100%; inset: 0; opacity: .18; color: var(--cover-accent); }
.cover-art-orbits { position: absolute; width: min(66%, 330px); aspect-ratio: 1; right: -2%; top: 50%; transform: translateY(-50%); border: 1px solid currentColor; border-radius: 50%; color: var(--cover-accent); opacity: .16; background: radial-gradient(circle, currentColor 0, transparent 66%); }
.cover-art-orbits::before, .cover-art-orbits::after { content: ""; position: absolute; inset: 13%; border: 1px solid currentColor; border-radius: 50%; }
.cover-art-orbits::after { inset: 29%; }
.cover-art-brand { position: absolute; left: 8%; bottom: 16%; display: grid; place-items: center; padding: 9px; border: 1px solid #ffffff1a; border-radius: 15px; background: #ffffff06; }
.cover-art-brand img { display: block; width: 44px; height: 44px; object-fit: contain; }
.cover-art-symbol { position: absolute; right: 9%; top: 50%; transform: translateY(-50%); width: min(32%, 145px); height: 72%; color: var(--cover-accent); filter: drop-shadow(0 0 15px #ffffff13); }
.course-cover-art.course-cover-hero .cover-art-brand { padding: 12px; border-radius: 20px; }
.course-cover-art.course-cover-hero .cover-art-brand img { width: clamp(44px, 6vw, 70px); height: clamp(44px, 6vw, 70px); }
.cover-preset-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cover-preset-option { position: relative; display: block !important; cursor: pointer; border: 2px solid var(--line); padding: 4px; border-radius: 14px; background: var(--surface); transition: border-color .18s, box-shadow .18s; min-width: 0; }
.cover-preset-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.cover-preset-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.cover-preset-option input { position: absolute; right: 12px; bottom: 13px; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; z-index: 1; }
.cover-preset-preview { display: block; }
.cover-art-mini { display: block; width: 100%; height: 102px; border-radius: 9px; }
.cover-art-mini .cover-art-brand { padding: 5px; border-radius: 9px; }
.cover-art-mini .cover-art-brand img { width: 27px; height: 27px; }
.cover-preset-name { display: block; padding: 10px 27px 7px 7px; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 600px) { .cover-preset-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }.cover-art-mini { height: 95px; }.cover-art-brand img { width: 32px; height: 32px; }.cover-art-mini .cover-art-brand img { width: 27px; height: 27px; } }

/* A focused, responsive module composer with a paginated owned library. */
.course-management-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.course-content-heading { flex-wrap: wrap; gap: 15px; }
.course-content-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.module-heading { flex-wrap: wrap; }
.module-heading h3 { flex: 1; min-width: 130px; overflow-wrap: anywhere; }
.course-composer { width: min(1180px, calc(100vw - 40px)); height: min(850px, calc(100dvh - 40px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--text); overflow: hidden; box-shadow: 0 24px 80px #0006; }
.course-composer::backdrop { background: #030912b3; backdrop-filter: blur(5px); }
.composer-form { position: relative; height: 100%; display: flex; flex-direction: column; }
.composer-header { padding: 23px 28px 17px; display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.composer-header h2 { margin: 7px 0; font-size: clamp(20px, 2vw, 28px); }
.composer-header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.composer-close { align-self: flex-start; background: var(--surface-soft); color: var(--text); border: 1px solid var(--line); border-radius: 10px; width: 36px; height: 36px; cursor: pointer; font-size: 23px; flex: 0 0 36px; }
.composer-target { padding: 16px 28px; display: flex; align-items: end; gap: 15px; flex-wrap: wrap; flex-shrink: 0; }
.composer-target .field { flex: 1 1 230px; min-width: 0; margin: 0; }
.composer-target-hint { flex: 1 1 210px; color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.composer-target [hidden], .composer-alert[hidden], .composer-busy[hidden] { display: none; }
.composer-target .select-picker-panel { z-index: 10; }
.composer-alert { margin: 0 28px 12px; padding: 10px 13px; border: 1px solid var(--accent); border-radius: 10px; color: var(--text); background: var(--accent-soft); font-size: 13px; line-height: 1.5; flex-shrink: 0; }
.composer-workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; padding: 0 28px 18px; overflow: hidden; }
.composer-library, .composer-order { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.composer-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.composer-panel-heading h3 { font-size: 15px; margin: 0 0 10px; }
.composer-panel-heading span { color: var(--muted); font-size: 12px; }
.composer-search input { width: 100%; }
.composer-library-help { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 9px 0 12px; }
.composer-results, .composer-queue { overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 80px; scrollbar-gutter: stable; padding-right: 5px; }
.composer-result { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 8px; background: var(--surface-soft); transition: border-color .15s; }
.composer-result:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.composer-result input { width: 18px; height: 18px; margin: 2px 0 0; cursor: pointer; accent-color: var(--accent); }
.composer-result label { cursor: pointer; min-width: 0; }
.composer-result strong, .composer-queue strong { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.composer-result small { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 4px; overflow-wrap: anywhere; }
.composer-result .button { padding: 6px 9px; min-height: 30px; font-size: 11px; }
.composer-pagination { display: flex; justify-content: space-between; align-items: center; gap: 9px; padding-top: 10px; flex-shrink: 0; }
.composer-pagination .button { min-height: 34px; padding: 7px 12px; font-size: 12px; }
.composer-pagination span { color: var(--muted); font-size: 12px; text-align: center; }
.composer-queue { list-style: none; padding: 0 5px 0 0; margin: 0; }
.composer-queue-item { display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: var(--surface-soft); cursor: grab; }
.composer-queue-item.dragging { opacity: .45; }
.composer-queue-item.drag-target { outline: 2px solid var(--accent); }
.composer-queue-index { font-size: 12px; color: var(--accent); font-weight: 700; min-width: 23px; }
.composer-queue-item strong { flex: 1; min-width: 0; }
.composer-queue-actions { display: flex; gap: 3px; flex-shrink: 0; }
.composer-queue-actions button { min-width: 28px; height: 29px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 7px; cursor: pointer; }
.composer-queue-actions button:disabled { opacity: .35; cursor: default; }
.composer-empty { padding: 25px 16px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.7; border: 1px dashed var(--line); border-radius: 12px; }
.composer-footer { padding: 16px 28px; display: flex; gap: 20px; align-items: center; border-top: 1px solid var(--line); flex-shrink: 0; }
.composer-footer p { flex: 1; color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.composer-footer .form-actions { margin: 0; flex-shrink: 0; }
.composer-busy { position: absolute; inset: 0; z-index: 20; background: var(--surface); opacity: .96; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
@media (max-width: 760px) {
 .course-composer { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
 .composer-form { overflow-y: auto; }.composer-header { padding: 18px; }.composer-target { padding: 15px 18px; gap: 10px; }.composer-workspace { flex: none; display: flex; flex-direction: column; padding: 0 18px 18px; overflow: visible; gap: 22px; }
 .composer-results { max-height: 36dvh; }.composer-queue { max-height: 36dvh; }.composer-target-hint { flex-basis: 100%; }.composer-alert { margin: 0 18px 12px; }.composer-footer { padding: 15px 18px; flex-direction: column; align-items: stretch; gap: 10px; }.composer-footer .form-actions { justify-content: flex-end; }
 .composer-queue-item { gap: 7px; padding: 10px; }.composer-result { padding: 10px; }.composer-result strong { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .cover-preset-option, .composer-result { transition: none; } }
.module-lesson-options { max-height: 340px; overflow-y: auto; overscroll-behavior: contain; }
.module-lesson-options > div { grid-template-columns: 1fr; }
.course-composer .button:disabled { opacity: .42; cursor: default; transform: none; box-shadow: none; }
.course-composer.is-saving .composer-form { overflow: hidden; }
/* Complete course tree, with independent library and module scrolling. */
.composer-workspace { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); }
.composer-modules { overflow-y: auto; flex: 1; min-height: 80px; padding: 2px 6px 3px 2px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.composer-module { padding: 13px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.composer-module.active { border-color: var(--accent); }.composer-module.drag-target { outline: 2px dashed var(--accent); }
.composer-module-heading { display: flex; align-items: center; gap: 7px; cursor: grab; }.composer-module-heading input { flex: 1; min-width: 0; font-size: 13px; padding: 8px; }
.composer-grip { color: var(--muted); cursor: grab; font-size: 17px; }
.composer-module-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 9px 0 12px; }.composer-module-meta small { color: var(--muted); font-size: 11px; }
.composer-destination { font-size: 11px; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--muted); }.composer-destination.selected { background: var(--accent-soft); color: var(--accent); }
.composer-module-lessons { padding: 0; margin: 0; list-style: none; }.composer-module .composer-queue-item { background: var(--surface); padding: 9px; flex-wrap: wrap; }.composer-module .composer-queue-item strong { flex-basis: 120px; font-size: 12px; }
.composer-move-menu { position: relative; margin-left: auto; font-size: 11px; }.composer-move-menu summary { cursor: pointer; color: var(--muted); padding: 3px 6px; }
.composer-move-options { width: min(220px,55vw); padding: 8px; max-height: 210px; overflow-y: auto; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; }
.composer-move-options button { display: block; width: 100%; border: 0; padding: 8px; background: var(--surface-soft); color: var(--text); text-align: left; border-radius: 6px; overflow-wrap: anywhere; }.composer-move-options button:hover { background: var(--accent-soft); }.composer-move-options button[hidden] { display: none; }
.composer-tag-filter { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-top: 9px; font-size: 12px; }.composer-tag-filter summary { cursor: pointer; }.composer-tag-filter .form-control { margin-top: 10px; font-size: 12px; }
.composer-tags { max-height: 115px; overflow-y: auto; padding: 7px 0; }.composer-tags label { display: flex; align-items: center; gap: 8px; padding: 4px; }.composer-tags input { width: 17px; height: 17px; accent-color: var(--accent); }
@media(max-width:760px){.composer-modules { max-height: 48dvh; }.composer-module { padding: 10px; }.composer-module-heading { flex-wrap: wrap; }.composer-module-heading input { flex-basis: 150px; }.composer-module-heading .composer-queue-actions { margin-left: auto; }}
.course-page-heading { display: block; width: 100%; }
.course-page-heading > div:first-child { width: 100%; max-width: none; }
.course-page-heading p { max-width: none; }
.course-page-heading .heading-actions { width: 100%; margin-top: 18px; justify-content: flex-start; flex-wrap: wrap; }
.course-lesson-flow { width: 100%; max-width: none; }

.lesson-credit { display:flex; align-items:center; gap:12px; margin:0 0 22px; color:var(--text); }
.lesson-credit-avatar { display:grid; place-items:center; flex:0 0 42px; height:42px; border:1px solid var(--line); border-radius:50%; background:var(--accent-soft); color:var(--accent); font-weight:700; }
.lesson-credit > div { min-width:0; display:grid; gap:3px; }
.lesson-credit small { color:var(--muted); font-size:12px; }
.lesson-credit strong { font-size:14px; overflow-wrap:anywhere; }
.course-lesson-flow { box-sizing:border-box; overflow-wrap:break-word; }

/* Impact-aware confirmation uses the existing global dialog in both themes. */
.global-confirm { max-height:90dvh; overflow-y:auto; }
.global-confirm [data-confirm-message] { white-space:pre-line; overflow-wrap:anywhere; }
.confirm-impact { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:18px 0; }
.confirm-impact > div { padding:12px; border:1px solid var(--line); border-radius:10px; background:var(--surface-soft); display:grid; gap:4px; }
.confirm-impact strong { font-size:24px; color:var(--text); }.confirm-impact span { font-size:12px; color:var(--muted); }
.global-confirm [data-confirm-warning] { align-items:flex-start; margin:16px 0; font-size:13px; line-height:1.6; }
.global-confirm [data-confirm-warning] input { flex:0 0 17px; width:17px; height:17px; margin-top:3px; accent-color:var(--accent); }
.global-confirm [data-confirm-details][hidden],.global-confirm [data-confirm-warning][hidden],[data-lesson-delete-error][hidden] { display:none; }
.global-confirm button:disabled { opacity:.45; cursor:default; }

.write-status { margin:12px 0 0; color:var(--muted); font-size:13px; }
.button.is-submitting::after { content:""; display:inline-block; width:12px; height:12px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:zip-spin 1s linear infinite; }

/* One code renderer in student reading and instructor previews. */
.lesson-code-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:7px 15px; border-bottom:1px solid var(--line); }
.lesson-code-header .lesson-code-label { padding:0; border:0; min-width:0; overflow-wrap:anywhere; }
.code-copy { display:inline-flex; align-items:center; justify-content:center; gap:6px; flex:none; min-height:32px; padding:4px 9px; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--muted); font-size:12px; font-weight:600; }
.code-copy:hover { background:var(--surface); border-color:var(--line); color:var(--text); }
.code-copy[data-copy-state="success"] { color:var(--action-add); }
.code-copy[data-copy-state="error"] { color:var(--action-delete); }

/* Shared action vocabulary across instructor, student and administrator CRUD. */
/* Filled backgrounds make action roles recognizable at a glance in both themes. */
:root {
 --action-add:#176b3a; --action-add-bg:#176b3a; --action-add-ink:#fff;
 --action-edit:#795108; --action-edit-bg:#a45900; --action-edit-ink:#fff;
 --action-delete:#b42338; --action-delete-bg:#b42338; --action-delete-ink:#fff;
 --action-preview:#7042b3; --action-preview-bg:#7042b3; --action-preview-ink:#fff;
 --action-download:#08777d; --action-download-bg:#08777d; --action-download-ink:#fff;
 --action-module-bg:#4b48b8; --action-module-ink:#fff;
 --action-remove-bg:#fffaf2; --action-remove-ink:#855018; --action-remove-line:#dac4a6;
 --action-delete-soft:#fff4f5; --action-delete-line:#dcabb3;
 --action-manage-bg:#155db1; --action-manage-ink:#fff;
 --action-archive-bg:#735531; --action-archive-ink:#fff;
}
html[data-theme="dark"] {
 --action-add:#7ee787; --action-add-bg:#217744;
 --action-edit:#f2cc60; --action-edit-bg:#9d5a0d; --action-edit-ink:#fff;
 --action-delete:#ff938a; --action-delete-bg:#bc2c44;
 --action-preview:#d2a8ff; --action-preview-bg:#7549b2;
 --action-download:#76e3ea; --action-download-bg:#08777d;
 --action-module-bg:#5b55c0;
 --action-remove-bg:#25221e; --action-remove-ink:#edcc9d; --action-remove-line:#66513a;
 --action-delete-soft:#261c23; --action-delete-line:#713846;
 --action-manage-bg:#2465b5;
 --action-archive-bg:#68482b; --action-archive-ink:#fff;
}
.button[data-button-kind] { gap:7px; max-width:100%; white-space:normal; text-align:center; line-height:1.35; padding:10px 14px; text-decoration:none; }
.button[data-button-kind]:hover { transform:none; }
.button[data-button-kind] > svg { width:17px; height:17px; flex:0 0 17px; }
.library-course-actions .course-card-trash[data-button-kind] { width:40px; min-width:40px; padding:0; }
.action-icon { width:17px; height:17px; flex:0 0 17px; pointer-events:none; }
.button-compact[data-button-kind] { min-height:36px; padding:7px 10px; font-size:11px; }
html[data-theme] .button:is([data-button-kind="add"],[data-button-kind="lesson"],[data-button-kind="approve"],[data-button-kind="restore"]) { background:var(--action-add-bg); color:var(--action-add-ink); border-color:var(--action-add-bg); }
html[data-theme] .button[data-button-kind="edit"] { background:var(--action-edit-bg); color:var(--action-edit-ink); border-color:var(--action-edit-bg); }
html[data-theme] .button:is([data-button-kind="delete"],[data-button-kind="reject"],[data-button-kind="remove"]) { background:var(--action-delete-bg); color:var(--action-delete-ink); border-color:var(--action-delete-bg); }
html[data-theme] .button[data-button-kind="module"] { background:var(--action-module-bg); color:var(--action-module-ink); border-color:var(--action-module-bg); }
/* Unlink is reversible; deletion has a distinct, quiet destructive treatment. */
html[data-theme] .button[data-button-kind="remove"] { background:var(--action-remove-bg); color:var(--action-remove-ink); border-color:var(--action-remove-line); }
html[data-theme] .button[data-button-kind="delete"] { background:var(--action-delete-soft); color:var(--action-delete); border-color:var(--action-delete-line); }
html[data-theme] .button[data-button-kind="preview"] { background:var(--action-preview-bg); color:var(--action-preview-ink); border-color:var(--action-preview-bg); }
html[data-theme] .button:is([data-button-kind="download"],[data-button-kind="import"],[data-button-kind="link"]) { background:var(--action-download-bg); color:var(--action-download-ink); border-color:var(--action-download-bg); }
html[data-theme] .button:is([data-button-kind="submit"],[data-button-kind="save"],[data-button-kind="manage"]) { background:var(--action-manage-bg); color:var(--action-manage-ink); border-color:var(--action-manage-bg); }
html[data-theme] .button[data-button-kind="archive"] { background:var(--action-archive-bg); color:var(--action-archive-ink); border-color:var(--action-archive-bg); }
html[data-theme] .button:is([data-button-kind="cancel"],[data-button-kind="clear"],[data-button-kind="history"],[data-button-kind="navigation"],[data-button-kind="search"]) { background:var(--surface); color:var(--text); border-color:var(--line); }
html[data-theme] .button[data-button-kind]:hover:not(:disabled):not(.is-disabled) { box-shadow:0 2px 7px #00000018; }
.button[data-button-kind]:focus-visible { outline:3px solid var(--text); outline-offset:3px; }
.button[data-button-kind]:disabled, .button[data-button-kind].is-disabled { opacity:.5; cursor:not-allowed; transform:none; box-shadow:none; }
.library-row .button[data-button-kind] { min-height:36px; padding:7px 10px; font-size:11px; }
.library-row { gap:10px; }
@media(max-width:620px) { .library-row .button[data-button-kind] { min-height:40px; }.library-course-actions { flex-wrap:wrap; }.form-actions,.heading-actions { flex-wrap:wrap; }.topbar .logout-button { min-height:34px; padding:6px 8px; } }
@media(max-width:420px) { .topbar { padding:0 12px; gap:8px; }.topbar-path { display:none; }.topbar-actions { flex:1; justify-content:flex-end; gap:6px; }.topbar .logout-button { padding:6px; }.mobile-menu { flex:none; } }
.button[data-button-kind] { transition:background .2s,color .2s,border-color .2s,box-shadow .2s; }
@media(prefers-reduced-motion:reduce) { .button[data-button-kind] { transition:none; } }

/* A module visibly contains its lessons in management and learner views. */
.module-block { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--surface); }
.module-block > .module-heading { padding:18px; margin:0; gap:12px; border-bottom:1px solid var(--line); background:var(--surface-soft); }
.module-heading .module-index,.composer-module-badge { flex:none; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:var(--accent-soft); color:var(--accent-strong); font-size:11px; font-weight:800; white-space:nowrap; }
.module-heading .module-title { flex:1 1 180px; min-width:0; }
.module-title h3 { margin:0 0 5px; font-size:17px; line-height:1.4; overflow-wrap:anywhere; }
.module-lesson-count { color:var(--muted); font-size:12px; }
.module-lessons-body { padding:18px; }
.module-lessons-label { margin:0 0 12px; color:var(--muted); font-size:12px; font-weight:650; }
.module-lessons-list,.composer-module-lessons { margin-left:8px; padding-left:18px; border-left:2px solid var(--line); }
.module-lessons-list > .list-row,.module-lessons-list > .learning-item { background:var(--surface-soft); border:1px solid var(--line); border-radius:10px; padding:12px; margin-bottom:8px; }
.module-lessons-list > :last-child { margin-bottom:0; }
.module-lessons-body .mini-empty { display:flex; flex-direction:column; align-items:center; gap:14px; }
.composer-module { padding:0; overflow:hidden; border:1px solid var(--line); box-shadow:0 3px 10px #00000008; }
.composer-module-heading { padding:13px; border-bottom:1px solid var(--line); background:var(--surface); }
.composer-module.active .composer-module-heading { background:var(--accent-soft); }
.composer-module-meta { margin:0; padding:12px 13px; flex-wrap:wrap; }
.composer-module > .module-lessons-label { margin:0 13px 10px; }
.composer-module-lessons { margin:0 13px 14px 20px; padding-left:14px; }
.learning-module .module-heading { justify-content:flex-start; }
.learning-module .learning-item { margin-top:0; }
@media(max-width:650px) {
 .module-block > .module-heading,.module-lessons-body { padding:13px; }
 .module-lessons-list { margin-left:0; padding-left:10px; }
 .module-heading .module-title { flex-basis:calc(100% - 105px); }
 .module-heading > .button,.module-heading > form { max-width:100%; }
 .module-lessons-list > .list-row { gap:9px; }
 .composer-module-heading { gap:8px; }.composer-module-badge { font-size:10px; }
}

.module-library-choice { display:flex; align-items:flex-start; gap:11px; padding:13px; border:1px solid var(--line); border-radius:10px; background:var(--surface-soft); margin-bottom:8px; }
.module-library-choice > input { width:18px; height:18px; flex:none; margin-top:3px; accent-color:var(--accent); }
.module-library-choice > label { flex:1; min-width:0; margin:0; cursor:pointer; }
.module-library-choice strong,.module-library-choice small { display:block; overflow-wrap:anywhere; }
.module-library-choice small { font-size:11px; line-height:1.7; color:var(--muted); margin-top:5px; }
.module-linked-lessons { margin-top:30px; padding-top:24px; border-top:1px solid var(--line); }
.module-linked-row { flex-wrap:wrap; align-items:flex-start; }.module-linked-row .row-main { flex:1 1 180px; }
.module-linked-row form { margin:0; }.module-linked-row .row-main small { white-space:normal; overflow-wrap:anywhere; line-height:1.6; }
.composer-lesson-copy { flex:1 1 120px; min-width:0; }.composer-lesson-copy strong { display:block; overflow-wrap:anywhere; }
.composer-lesson-copy small { display:block; font-size:10px; color:var(--muted); line-height:1.6; margin-top:4px; overflow-wrap:anywhere; }
.module-lesson-options .module-library-choice[hidden] { display:none; }

.module-library-choice:has(> input:checked) { border-color:var(--accent); background:var(--accent-soft); }
.module-linked-row .row-main strong a { color:inherit; text-decoration:underline; text-decoration-color:var(--accent); text-underline-offset:.2em; }
.module-linked-row .row-main strong a:hover { color:var(--accent-strong); }

.module-library-choice > label { display:flex; flex-direction:column; align-items:flex-start; gap:3px; }

.student-progress-summary .section-heading { align-items:center; flex-wrap:wrap; }
.progress-percentage { font-size:28px; color:var(--accent-strong); }
.student-progress-summary .support-text { margin:8px 0 0; }
.progress-row .row-main small { display:block; line-height:1.7; white-space:normal; overflow-wrap:anywhere; }

/* Icon controls keep a stable target and never inherit wide text-button padding. */
.course-composer .button.composer-unlink-button { width:32px; min-width:32px; height:32px; min-height:32px; padding:0; flex:0 0 32px; border-radius:8px; }

/* A completed reading stays distinct from its evidence review status. */
:root { --read-bg:#edf8f0; --read-ink:#186138; --read-line:#94c6a3; --read-check-bg:#d4eedc; }
html[data-theme="dark"] { --read-bg:#142b22; --read-ink:#a3e3b8; --read-line:#3d7755; --read-check-bg:#254d35; }
.module-lessons-list > .learning-item.lesson-read { background:var(--read-bg); border-color:var(--read-line); border-inline-start:4px solid var(--read-line); }
.learning-item.lesson-read:hover { border-color:var(--read-ink); }
.learning-item.lesson-read .learning-number { background:var(--read-check-bg); color:var(--read-ink); font-size:23px; }
.learning-item.lesson-read .row-main strong,.learning-item.lesson-read .row-main small,.learning-item.lesson-read .row-arrow { color:var(--read-ink); }
.reader-course-list a.lesson-read { background:var(--read-bg); border:1px solid var(--read-line); border-inline-start-width:3px; }
.reader-course-list a.lesson-read:hover,.reader-course-list a.lesson-read.active { background:var(--read-check-bg); }
.reader-course-list a.lesson-read.active { outline:2px solid var(--read-ink); outline-offset:-2px; }
.reader-course-list a.lesson-read > span:first-child,.reader-course-list a.lesson-read strong,.reader-course-list a.lesson-read small { color:var(--read-ink); }

/* Reading states use an icon/label as well as color, in both lists and reader. */
:root { --reading-bg:#fff8e8; --reading-ink:#825208; --reading-line:#d8ba79; --reading-badge:#f7e4b4; --unopened-bg:#f2f5f9; --unopened-ink:#475569; --unopened-line:#bac5d3; --unopened-badge:#e2e8f0; }
html[data-theme="dark"] { --reading-bg:#302619; --reading-ink:#f0cf87; --reading-line:#856737; --reading-badge:#4b3820; --unopened-bg:#18212a; --unopened-ink:#a7b6c8; --unopened-line:#536273; --unopened-badge:#293747; }
.lesson-in-progress { --lesson-state-bg:var(--reading-bg); --lesson-state-ink:var(--reading-ink); --lesson-state-line:var(--reading-line); --lesson-state-badge:var(--reading-badge); }
.lesson-unopened { --lesson-state-bg:var(--unopened-bg); --lesson-state-ink:var(--unopened-ink); --lesson-state-line:var(--unopened-line); --lesson-state-badge:var(--unopened-badge); }
.module-lessons-list > .learning-item:is(.lesson-in-progress,.lesson-unopened) { background:var(--lesson-state-bg); border-color:var(--lesson-state-line); border-inline-start:4px solid var(--lesson-state-line); }
.learning-item:is(.lesson-in-progress,.lesson-unopened):hover { border-color:var(--lesson-state-ink); }
.learning-item:is(.lesson-in-progress,.lesson-unopened) .learning-number,.learning-item:is(.lesson-in-progress,.lesson-unopened) .status-pill { background:var(--lesson-state-badge); color:var(--lesson-state-ink); }
.learning-item:is(.lesson-in-progress,.lesson-unopened) :is(.row-main strong,.row-main small,.row-arrow) { color:var(--lesson-state-ink); }
.reader-course-list a:is(.lesson-in-progress,.lesson-unopened) { background:var(--lesson-state-bg); border:1px solid var(--lesson-state-line); border-inline-start-width:3px; }
.reader-course-list a:is(.lesson-in-progress,.lesson-unopened):is(:hover,.active) { background:var(--lesson-state-badge); }
.reader-course-list a:is(.lesson-in-progress,.lesson-unopened).active { outline:2px solid var(--lesson-state-ink); outline-offset:-2px; }
.reader-course-list a:is(.lesson-in-progress,.lesson-unopened) :is(span:first-child,strong,small) { color:var(--lesson-state-ink); }

.lesson-read { --lesson-state-bg:var(--read-bg); --lesson-state-ink:var(--read-ink); --lesson-state-line:var(--read-line); --lesson-state-badge:var(--read-check-bg); }
.reader-intro:is(.lesson-read,.lesson-approved,.lesson-in-progress,.lesson-unopened,.lesson-awaiting-review,.lesson-needs-correction) { padding:22px; border:1px solid var(--lesson-state-line); border-inline-start-width:4px; border-radius:14px; background:var(--lesson-state-bg); }
.reader-intro:is(.lesson-read,.lesson-approved,.lesson-in-progress,.lesson-unopened,.lesson-awaiting-review,.lesson-needs-correction) :is(h1,.eyebrow) { color:var(--lesson-state-ink); }
.reader-intro:is(.lesson-read,.lesson-approved,.lesson-in-progress,.lesson-unopened,.lesson-awaiting-review,.lesson-needs-correction) .status-pill { color:var(--lesson-state-ink); background:var(--lesson-state-badge); }
.reader-progress:is(.lesson-read,.lesson-approved,.lesson-in-progress,.lesson-unopened,.lesson-awaiting-review,.lesson-needs-correction) { background:var(--lesson-state-bg); border-color:var(--lesson-state-line); }
.reader-progress:is(.lesson-read,.lesson-approved,.lesson-in-progress,.lesson-unopened,.lesson-awaiting-review,.lesson-needs-correction) .reader-progress-label :is(strong,span) { color:var(--lesson-state-ink); }
.reader-progress:is(.lesson-read,.lesson-approved,.lesson-in-progress,.lesson-unopened,.lesson-awaiting-review,.lesson-needs-correction) .progress-track > span { background:var(--lesson-state-ink); }
@media (max-width:560px) { .reader-intro:is(.lesson-read,.lesson-approved,.lesson-in-progress,.lesson-unopened,.lesson-awaiting-review,.lesson-needs-correction) { padding:18px 16px; }.reader-intro h1 { overflow-wrap:anywhere; } }

/* Practice approval has its own palette, distinct from a finished reading. */
:root { --approved-bg:#f3eeff; --approved-ink:#6331a1; --approved-line:#b89cdc; --approved-badge:#e5d8fb; }
html[data-theme="dark"] { --approved-bg:#261d38; --approved-ink:#d6baff; --approved-line:#8162a5; --approved-badge:#42305b; }
.lesson-approved { --lesson-state-bg:var(--approved-bg); --lesson-state-ink:var(--approved-ink); --lesson-state-line:var(--approved-line); --lesson-state-badge:var(--approved-badge); }
.module-lessons-list > .learning-item.lesson-approved { background:var(--approved-bg); border-color:var(--approved-line); border-inline-start:4px solid var(--approved-line); }
.learning-item.lesson-approved:hover { border-color:var(--approved-ink); }
.learning-item.lesson-approved .learning-number,.learning-item.lesson-approved .status-pill { color:var(--approved-ink); background:var(--approved-badge); }
.learning-item.lesson-approved .learning-number { font-size:23px; }
.learning-item.lesson-approved :is(.row-main strong,.row-main small,.row-arrow) { color:var(--approved-ink); }
.reader-course-list a.lesson-approved { background:var(--approved-bg); border:1px solid var(--approved-line); border-inline-start-width:3px; }
.reader-course-list a.lesson-approved:is(:hover,.active) { background:var(--approved-badge); }
.reader-course-list a.lesson-approved.active { outline:2px solid var(--approved-ink); outline-offset:-2px; }
.reader-course-list a.lesson-approved :is(span:first-child,strong,small) { color:var(--approved-ink); }
.reader-statuses { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.reader-intro:is(.lesson-read,.lesson-approved,.lesson-in-progress,.lesson-unopened,.lesson-awaiting-review,.lesson-needs-correction) .status-pill.reader-academic-status { background:var(--surface-soft); color:var(--muted); }

/* Stable cover badges: the check draws once; text never scrolls or blinks. */
.student-course-card:hover { transform:none; }
.student-course-cover { position:relative; margin:-21px -21px 17px; width:calc(100% + 42px); border-radius:17px 17px 0 0; overflow:hidden; }
.student-course-cover > .course-cover-thumb { margin:0; width:100%; border-radius:0; }
.student-course-cover.course-cover-detail { margin:0; width:100%; border-radius:0; }
.student-course-badges { position:absolute; top:12px; right:12px; left:12px; display:flex; flex-wrap:wrap; gap:7px; align-items:flex-start; z-index:1; pointer-events:none; }
.student-course-badges:empty { display:none; }
.student-course-badge { display:inline-flex; align-items:center; gap:7px; max-width:100%; padding:7px 10px; border-radius:9px; border:1px solid; font-size:11px; line-height:17px; font-weight:700; overflow-wrap:anywhere; box-shadow:0 2px 8px #0002; }
.student-course-badge svg { flex:none; }.student-course-badge strong { flex:none; }
.student-course-badge.course-approved { color:#185d37; background:#e7f8ed; border-color:#9acaac; }
.student-course-badge.course-new { color:#825208; background:#fff8e8; border-color:#d8ba79; }
.student-course-badge.course-updated { color:#164e93; background:#edf5ff; border-color:#a9c9ee; }
html[data-theme="dark"] .student-course-badge.course-approved { color:#a3e3b8; background:#142b22; border-color:#3d7755; }
html[data-theme="dark"] .student-course-badge.course-new { color:#f0cf87; background:#302619; border-color:#856737; }
html[data-theme="dark"] .student-course-badge.course-updated { color:#aad0ff; background:#16283f; border-color:#476b98; }
.completion-check { stroke-dasharray:18; stroke-dashoffset:0; animation:completion-check-draw .45s ease-out 1; }
@keyframes completion-check-draw { from {stroke-dashoffset:18} to {stroke-dashoffset:0} }
.course-progress-label { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:0 0 9px; font-size:11px; color:var(--muted); }
.course-progress-label strong { color:var(--text); }.student-course-card .progress-track { margin-bottom:16px; }
.student-course-card.course-is-approved .progress-track > span { background:var(--read-ink); }
.student-course-card .course-card-bottom { flex-wrap:wrap; line-height:1.7; }
@media (prefers-reduced-motion:reduce) { .completion-check { animation:none; }.student-course-card .progress-track > span { transition:none; } }
/* Reserve a badge strip inside the cover so notices never cover its logo/title. */
.student-course-badges { position:relative; top:auto; left:auto; right:auto; padding:9px 12px; background:var(--surface-soft); border-bottom:1px solid var(--line); }
.student-course-badges:not(:has(.student-course-badge)) { display:none; }
.student-course-badge { box-shadow:none; }

/* A submitted practice and a returned practice stay distinct from approval. */
:root { --awaiting-bg:#edf5ff; --awaiting-ink:#18579b; --awaiting-line:#a1c0e5; --awaiting-badge:#d4e8ff; --correction-bg:#fff1ee; --correction-ink:#a13528; --correction-line:#d4a298; --correction-badge:#f9d4cc; }
html[data-theme="dark"] { --awaiting-bg:#162b42; --awaiting-ink:#afd5ff; --awaiting-line:#5278a3; --awaiting-badge:#244867; --correction-bg:#361f20; --correction-ink:#ffb6a7; --correction-line:#a36660; --correction-badge:#59312d; }
.lesson-awaiting-review { --lesson-state-bg:var(--awaiting-bg); --lesson-state-ink:var(--awaiting-ink); --lesson-state-line:var(--awaiting-line); --lesson-state-badge:var(--awaiting-badge); }
.lesson-needs-correction { --lesson-state-bg:var(--correction-bg); --lesson-state-ink:var(--correction-ink); --lesson-state-line:var(--correction-line); --lesson-state-badge:var(--correction-badge); }
.module-lessons-list > .learning-item:is(.lesson-awaiting-review,.lesson-needs-correction) { background:var(--lesson-state-bg); border-color:var(--lesson-state-line); border-inline-start:4px solid var(--lesson-state-line); }
.learning-item:is(.lesson-awaiting-review,.lesson-needs-correction):hover { border-color:var(--lesson-state-ink); }
.learning-item:is(.lesson-awaiting-review,.lesson-needs-correction) :is(.learning-number,.status-pill) { background:var(--lesson-state-badge); color:var(--lesson-state-ink); }
.learning-item:is(.lesson-awaiting-review,.lesson-needs-correction) .learning-number { font-size:23px; }
.learning-item:is(.lesson-awaiting-review,.lesson-needs-correction) :is(.row-main strong,.row-main small,.row-arrow) { color:var(--lesson-state-ink); }
.reader-course-list a:is(.lesson-awaiting-review,.lesson-needs-correction) { background:var(--lesson-state-bg); border:1px solid var(--lesson-state-line); border-inline-start-width:3px; }
.reader-course-list a:is(.lesson-awaiting-review,.lesson-needs-correction):is(:hover,.active) { background:var(--lesson-state-badge); }
.reader-course-list a:is(.lesson-awaiting-review,.lesson-needs-correction).active { outline:2px solid var(--lesson-state-ink); outline-offset:-2px; }
.reader-course-list a:is(.lesson-awaiting-review,.lesson-needs-correction) :is(span:first-child,strong,small) { color:var(--lesson-state-ink); }

/* Edit and archive keep light labels with contrasting action backgrounds. */
html[data-theme="light"] { --action-edit-bg:#a45900; --action-edit-ink:#fff; --action-archive-bg:#735531; --action-archive-ink:#fff; }
html[data-theme="light"] .button:is([data-button-kind="cancel"],[data-button-kind="clear"],[data-button-kind="history"],[data-button-kind="navigation"],[data-button-kind="search"]) { color:#1c5794; }
html[data-theme="light"] .icon-button { color:#245990; }
.module-management-shortcut { margin-top:24px; max-width:720px; }.module-management-shortcut p { color:var(--muted); line-height:1.7; }
.zip-batch-panel { max-width:1100px; }.zip-batch-rows { display:grid; gap:12px; margin:24px 0; }
.zip-batch-row { min-width:0; padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); }
.zip-batch-row > strong,.zip-batch-row p { overflow-wrap:anywhere; }.zip-batch-row .progress-track { margin:12px 0; }
.zip-batch-row[data-state="created"] { border-inline-start:4px solid var(--read-ink); }.zip-batch-row[data-state="duplicate"] { border-inline-start:4px solid var(--reading-ink); }
.zip-batch-row[data-state="error"],.zip-batch-row[data-state="unknown"] { border-inline-start:4px solid var(--correction-ink); }
.zip-batch-row .form-actions { flex-wrap:wrap; }[data-batch-summary] { min-height:1.7em; }

html[data-theme="light"] .button:not([data-button-kind]),html[data-theme="light"] .lesson-editor-tab { color:#1c5794; }
input[type="file"]::file-selector-button { padding:8px 12px; margin-right:12px; border:1px solid var(--line); border-radius:8px; color:var(--accent-strong); background:var(--surface-soft); cursor:pointer; }
html[data-theme="light"] input[type="file"]::file-selector-button { color:#1c5794; background:#edf5ff; border-color:#9bbbde; }

.zip-batch-panel [hidden] { display:none !important; }

/* Reading and approved work are independent, student-scoped counters. */
.student-course-progress { display:grid; gap:16px; min-width:0; margin:4px 0 18px; }
.course-progress-item { min-width:0; }
.student-course-progress .course-progress-label { flex-wrap:wrap; margin:0 0 8px; font-size:12px; }
.student-course-progress .course-progress-label strong { display:inline; font-size:12px; margin:0; white-space:nowrap; font-variant-numeric:tabular-nums; }
.student-course-progress .progress-track { margin:0; height:7px; }
.student-course-progress .course-reading-progress .progress-track > span { background:var(--read-ink); }
.student-course-progress .course-practice-progress .progress-track > span { background:var(--approved-ink); }
.course-progress-note { display:block; margin-top:7px; color:var(--muted); font-size:11px; line-height:1.5; }
.student-course-card .course-card-bottom > strong { margin-inline-start:auto; }
.course-learning-progress .student-course-progress { margin-bottom:0; }

/* Instructor groups: bounded lists and separate reading, work and submission views. */
.group-heading-actions { margin:0 0 24px; }
.group-list { display:grid; gap:14px; }
.group-list-card { display:flex; align-items:center; flex-wrap:wrap; gap:16px; padding:20px; border:1px solid var(--line); border-radius:14px; background:var(--surface-soft); }
.group-list-card h3 { margin:0 0 6px; }.group-list-card p { margin:0; color:var(--muted); }
.group-list-meta { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; color:var(--muted); font-size:12px; }
.group-list-card .row-main { flex:1 1 240px; min-width:0; }.group-list-card .form-actions { margin:0; }
.group-filters { display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin:0 0 24px; }.group-filters .field { flex:1 1 180px; min-width:0; margin:0; }.group-filters .field:first-of-type { flex-basis:260px; }
.group-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:24px; }.group-metrics > div { padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }.group-metrics span { display:block; color:var(--muted); font-size:12px; line-height:1.5; }.group-metrics strong { display:block; margin-top:8px; font-size:24px; overflow-wrap:anywhere; }
.group-tabs { display:flex; flex-wrap:wrap; gap:10px; margin:24px 0; }html[data-theme] .group-tabs .button[aria-current=page] { background:var(--action-manage-bg); color:#fff; border-color:var(--action-manage-bg); }
.group-student-list { display:grid; gap:14px; }.group-student-row { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(160px,1fr) auto; align-items:center; gap:22px; padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); }
.group-student-identity { display:flex; align-items:center; min-width:0; gap:12px; }.group-student-identity .avatar { flex:none; }.group-student-identity .row-main { min-width:0; }
.group-student-progress { min-width:0; }.group-student-progress .course-progress-label { flex-wrap:wrap; font-size:12px; }.group-student-progress .progress-track { margin:0; height:7px; }
.group-reading-track > span { background:var(--read-ink); }.group-practice-track > span { background:var(--approved-ink); }
.group-row-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; }.group-row-actions .button { padding:9px 11px; font-size:12px; }
.group-evidence-row,.group-activity-row { display:flex; flex-wrap:wrap; align-items:center; gap:20px; padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); }.group-evidence-row .row-main,.group-activity-row .row-main { min-width:0; flex:1 1 260px; }
.group-evidence-row small,.group-student-row small,.group-activity-row small { display:block; line-height:1.7; color:var(--muted); overflow-wrap:anywhere; }
.group-evidence-row strong,.group-student-row strong,.group-list-card h3,.group-list-card p,.group-activity-row strong { overflow-wrap:anywhere; }
.group-filter-note { padding:12px; border-radius:8px; background:var(--accent-soft); overflow-wrap:anywhere; }.group-retention-note { margin-top:20px; line-height:1.7; }
.group-student-profile { display:flex; flex-wrap:wrap; gap:12px 24px; color:var(--muted); }.group-student-profile > * { overflow-wrap:anywhere; }.group-student-profile strong { color:var(--accent-strong); }
.group-student-section { scroll-margin-top:24px; }.group-activity-row.lesson-approved { border-inline-start:4px solid var(--approved-ink); }.group-activity-row.lesson-awaiting-review { border-inline-start:4px solid var(--awaiting-ink); }.group-activity-row.lesson-needs-correction { border-inline-start:4px solid var(--correction-ink); }
@media(max-width:1000px) { .group-student-row { grid-template-columns:minmax(0,1fr) minmax(140px,1fr); }.group-student-row .group-row-actions { grid-column:1/-1; } }
@media(max-width:650px) { .group-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }.group-metrics > div { padding:14px; }.group-metrics strong { font-size:22px; }.group-student-row { grid-template-columns:minmax(0,1fr); gap:16px; padding:14px; }.group-student-row .group-row-actions { grid-column:auto; justify-content:flex-start; }.group-row-actions { justify-content:flex-start; }.group-list-card { padding:14px; }.group-student-identity { align-items:flex-start; }.group-filters .field { flex-basis:100%; }.group-tabs .button { flex:1 1 110px; } }
.group-results .status-pill,.group-list .status-pill,.group-student-section .status-pill { max-width:100%; white-space:normal; overflow-wrap:anywhere; line-height:1.5; }

.group-student-section .reading-read-status { background:var(--read-bg); color:var(--read-ink); border:1px solid var(--read-line); }

.lesson-zip-action-panel { max-width:1050px; }.zip-action-impact { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:16px; }.zip-action-impact > span { background:var(--accent-soft); color:var(--accent-strong); padding:8px 12px; border-radius:8px; font-size:12px; }.zip-action-preview { width:min(1400px,96vw); max-width:96vw; height:94vh; max-height:94vh; padding:24px; overflow:auto; border:1px solid var(--line); border-radius:16px; color:var(--text); background:var(--surface); }.zip-action-preview::backdrop { background:#080f1dcc; }.zip-preview-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }.zip-action-preview .reader-paper { max-width:none; }.zip-action-preview [data-zip-preview-title] { overflow-wrap:anywhere; }.lesson-zip-action-panel .field-error { display:block; }
@media(max-width:650px){ .zip-action-preview { padding:14px; }.zip-action-preview .form-actions { flex-wrap:wrap; }.zip-action-preview .form-actions .button { flex:1 1 100px; } }

/* Course-local teams keep identities readable and actions within small screens. */
.course-team-member { flex-wrap:wrap; }
.course-team-member .row-main { flex:1 1 180px; }
.course-team-member .row-main strong,.course-team-member .row-main small { white-space:normal; overflow-wrap:anywhere; }
.course-team-member form { margin-inline-start:auto; max-width:100%; }
.course-team-member .button { max-width:100%; white-space:normal; }

/* Mixed teaching and learning accounts can have a longer navigation menu. */
.sidebar-nav { min-height:0; flex:1; align-content:start; overflow-y:auto; overflow-x:hidden; scrollbar-width:thin; padding-right:3px; }
.sidebar .brand,.sidebar-caption,.sidebar-bottom { flex:none; }

/* Teaching navigation and consistent separation around access actions. */
.student-access-actions { margin-bottom:24px; row-gap:12px; }
.student-access-actions form { margin:0; }
.progress-lesson-link { color:var(--accent-strong); text-decoration:underline; text-underline-offset:4px; }
.progress-lesson-link:hover { text-decoration-thickness:2px; }
.reader-sidebar.reader-lesson-index { grid-template-columns:minmax(0,1fr); }
.reader-sidebar.reader-lesson-index .reader-side-card { display:block; }
.library-course-actions { flex-wrap:wrap; }
.button[data-button-kind="students"] { background:var(--action-download-bg); color:#fff; border-color:var(--action-download-bg); }
.group-metrics-expanded { grid-template-columns:repeat(3,minmax(0,1fr)); }
.group-lesson-row { padding:20px 0; border-bottom:1px solid var(--line); min-width:0; }
.group-lesson-row:last-child { border-bottom:0; }
.group-lesson-row h3 { margin:8px 0; overflow-wrap:anywhere; }
.group-lesson-counts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:20px 0; }
.group-lesson-counts dt { color:var(--muted); font-size:12px; line-height:1.5; }
.group-lesson-counts dd { margin:6px 0 0; font-size:20px; font-weight:700; }
@media(max-width:650px) { .group-metrics-expanded,.group-lesson-counts { grid-template-columns:repeat(2,minmax(0,1fr)); }.student-access-actions { margin-bottom:20px; } }

/* ZIP examples stay readable without widening narrow screens. */
.lesson-guide { min-width:0; }
.lesson-guide .surface-card { min-width:0; }
.lesson-guide p code { overflow-wrap:anywhere; word-break:break-word; }
.lesson-guide-code { min-width:0; max-width:100%; }
.lesson-file { min-width:0; }
.lesson-file strong,.lesson-file small { overflow-wrap:anywhere; }

.zip-batch-replace-option { padding:18px; border:1px solid var(--line); border-radius:12px; background:var(--surface-soft); }
.zip-batch-replace-option .library-check-label { align-items:flex-start; white-space:normal; }
.zip-batch-row[data-state="planned"] { border-inline-start:4px solid var(--accent); }
.zip-batch-row[data-state="replaced"] { border-inline-start:4px solid var(--read-ink); }
.zip-batch-match { margin:12px 0; padding:14px; border:1px solid var(--line); border-radius:10px; line-height:1.7; overflow-wrap:anywhere; }

.global-confirm h2,.global-confirm .confirm-impact span,.global-confirm [data-confirm-warning-label] { min-width:0; overflow-wrap:anywhere; }
.zip-batch-panel,.zip-batch-match { min-width:0; }

/* Code is collapsed in the reader; copying always includes the full source. */
.lesson-code { position:relative; min-width:0; }
.lesson-code-disclosure { min-width:0; }
.lesson-code-disclosure > .lesson-code-header { min-height:50px; box-sizing:border-box; padding:10px 110px 10px 15px; justify-content:flex-start; flex-wrap:wrap; gap:6px 14px; border-bottom:0; cursor:pointer; list-style:none; }
.lesson-code-disclosure > summary::-webkit-details-marker { display:none; }
.lesson-code-disclosure > summary::marker { content:""; }
.lesson-code-disclosure > summary:focus-visible { outline:3px solid var(--accent); outline-offset:-3px; border-radius:10px; }
.lesson-code-disclosure[open] > .lesson-code-header { border-bottom:1px solid var(--line); }
.lesson-code > .code-copy { position:absolute; top:9px; right:10px; max-width:96px; }
.lesson-code-toggle { display:inline-flex; align-items:center; gap:8px; color:var(--accent-strong); font-size:12px; font-weight:600; }
.lesson-code-hide,.lesson-code-disclosure[open] > summary .lesson-code-show { display:none; }
.lesson-code-disclosure[open] > summary .lesson-code-hide { display:inline; }
.lesson-code-chevron { display:inline-block; font-size:18px; line-height:1; }
.lesson-code-disclosure[open] > summary .lesson-code-chevron { transform:rotate(180deg); }
.lesson-code-disclosure > pre { max-width:100%; max-height:min(60vh,520px); box-sizing:border-box; overflow:auto; }

.lesson-code > .code-copy [data-copy-status] { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lesson-code > .code-copy svg { flex:0 0 15px; }
