:root {
  --ink: #172128;
  --muted: #64727a;
  --line: #dfe6e8;
  --paper: #f5f7f5;
  --white: #ffffff;
  --navy: #112d38;
  --navy-soft: #1c4654;
  --teal: #0d766e;
  --teal-dark: #075e59;
  --mint: #dff3ed;
  --lime: #d8eb74;
  --yellow: #f4d879;
  --orange: #e9874a;
  --red: #bd4d4d;
  --shadow: 0 16px 48px rgba(16, 45, 55, .10);
  --shadow-small: 0 6px 22px rgba(16, 45, 55, .08);
  --radius: 18px;
  --radius-small: 11px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
img, video { max-width: 100%; }
.hidden { display: none !important; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); }
.brand > span:last-child { display: grid; line-height: 1.05; }
.brand strong { font-size: 15px; letter-spacing: -.02em; }
.brand small { margin-top: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .11em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--lime); color: var(--navy); font-weight: 900; font-size: 13px; letter-spacing: -.04em; }
.brand-light { color: var(--white); }
.brand-light small { color: rgba(255,255,255,.62); }

.button { border: 0; border-radius: 11px; padding: 12px 18px; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary { background: var(--teal); color: var(--white); box-shadow: 0 8px 20px rgba(13,118,110,.17); }
.button-primary:hover { background: var(--teal-dark); }
.button-secondary { background: var(--white); border: 1px solid var(--line); color: var(--navy); box-shadow: var(--shadow-small); }
.button-light { background: var(--lime); color: var(--navy); }
.button-full { width: 100%; }
.text-link { color: var(--teal); font-weight: 750; }
.icon-button { border: 1px solid var(--line); background: var(--white); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; color: var(--navy); }
.back-link { border: 0; background: transparent; color: var(--teal); padding: 0; font-weight: 750; margin-bottom: 18px; }

.eyebrow, .page-kicker { margin: 0 0 12px; color: var(--teal); font-weight: 850; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.fine-print { color: var(--muted); font-size: 12px; line-height: 1.55; }
.optional { color: var(--muted); font-weight: 500; font-size: 11px; }

/* Landing */
.landing-body { background: #f8faf7; }
.landing-nav { height: 86px; display: flex; align-items: center; justify-content: space-between; }
.hero { min-height: 650px; display: grid; grid-template-columns: 1.03fr .97fr; gap: 70px; align-items: center; padding: 55px 0 90px; }
.hero h1 { margin: 0; font-size: clamp(48px, 6vw, 78px); line-height: .98; letter-spacing: -.065em; color: var(--navy); }
.hero h1 span { color: var(--teal); }
.hero-lead { max-width: 640px; margin: 28px 0; color: var(--muted); font-size: 19px; line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.status-pill { margin-top: 28px; display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-pill span { width: 8px; height: 8px; border-radius: 50%; }
.status-live { background: var(--mint); color: var(--teal-dark); }
.status-live span { background: var(--teal); box-shadow: 0 0 0 5px rgba(13,118,110,.12); }
.status-demo { background: #fff5d9; color: #735a11; }
.status-demo span { background: #c99717; }
.hero-card { background: var(--navy); color: var(--white); border-radius: 28px; overflow: hidden; box-shadow: 0 30px 80px rgba(17,45,56,.25); transform: rotate(1.4deg); }
.preview-top { height: 48px; padding: 0 18px; display: flex; align-items: center; gap: 7px; background: #0b222b; }
.preview-top span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.24); }
.preview-top b { margin-left: 8px; font-size: 12px; color: rgba(255,255,255,.7); }
.preview-body { padding: 34px; }
.teacher-orb { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: var(--lime); color: var(--navy); font-weight: 900; font-size: 20px; }
.preview-message { margin: 20px 0; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); padding: 20px; border-radius: 16px; }
.preview-message small { color: var(--lime); letter-spacing: .13em; font-weight: 800; }
.preview-message p { margin: 9px 0 0; font-size: 19px; line-height: 1.45; }
.particle-diagram { min-height: 150px; border-radius: 16px; background: #f3f7f4; display: flex; justify-content: center; align-items: center; gap: 15px; color: var(--navy); }
.particle-diagram i { color: var(--teal); font-size: 25px; font-style: normal; }
.ion { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 900; }
.ion-plus { background: #e7dff7; color: #563e8a; }
.ion-minus { background: #e1f1f5; color: #246271; }
.electrode { width: 22px; height: 98px; display: grid; place-items: center; background: var(--navy); color: var(--white); border-radius: 5px; }
.exam-strip { display: flex; justify-content: space-between; margin-top: 18px; padding: 15px 16px; background: var(--lime); color: var(--navy); border-radius: 13px; font-size: 12px; }
.workflow { padding: 95px 0; }
.section-heading { max-width: 720px; }
.section-heading h2 { margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.07; letter-spacing: -.04em; color: var(--navy); }
.workflow-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--white); box-shadow: var(--shadow-small); }
.workflow-grid article { padding: 30px; min-height: 230px; border-right: 1px solid var(--line); }
.workflow-grid article:last-child { border-right: 0; }
.workflow-grid article span { color: var(--teal); font-size: 12px; font-weight: 900; }
.workflow-grid h3 { margin: 45px 0 10px; font-size: 24px; color: var(--navy); }
.workflow-grid p { margin: 0; color: var(--muted); line-height: 1.6; }
.trust-band { background: var(--navy); color: var(--white); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-grid div { padding: 45px 20px; display: grid; text-align: center; border-right: 1px solid rgba(255,255,255,.1); }
.trust-grid div:last-child { border: 0; }
.trust-grid strong { color: var(--lime); font-size: 40px; }
.trust-grid span { color: rgba(255,255,255,.65); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.disclaimer { padding: 85px 0; max-width: 800px; }
.disclaimer h2 { font-size: 38px; color: var(--navy); margin: 0 0 16px; }
.disclaimer > p:not(.fine-print) { font-size: 18px; color: var(--muted); line-height: 1.7; }
.landing-footer { height: 90px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.landing-footer a { color: var(--teal); font-weight: 750; }

/* Authentication */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(370px, .85fr) minmax(520px, 1.15fr); }
.auth-story { background: var(--navy); color: var(--white); padding: 46px clamp(34px, 5vw, 78px); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-story::after { content: ""; position: absolute; width: 540px; height: 540px; border-radius: 50%; border: 100px solid rgba(216,235,116,.05); right: -310px; bottom: -210px; }
.auth-story-copy { position: relative; z-index: 1; }
.auth-story-copy .eyebrow { color: var(--lime); }
.auth-story h1 { font-size: clamp(44px, 5vw, 70px); line-height: 1; letter-spacing: -.055em; margin: 0; }
.auth-story-copy > p:last-child { max-width: 530px; color: rgba(255,255,255,.65); line-height: 1.7; font-size: 17px; }
.auth-principles { display: grid; gap: 8px; position: relative; z-index: 1; }
.auth-principles div { display: flex; align-items: center; gap: 15px; border-top: 1px solid rgba(255,255,255,.12); padding: 14px 0; }
.auth-principles span { color: var(--lime); font-size: 11px; font-weight: 900; }
.auth-principles p { margin: 0; color: rgba(255,255,255,.8); }
.auth-panel { display: grid; place-items: center; padding: 50px 25px; background: #f8faf7; }
.auth-box { width: min(540px, 100%); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #e9eeeb; padding: 5px; border-radius: 13px; margin-bottom: 30px; }
.auth-tab { border: 0; background: transparent; color: var(--muted); border-radius: 9px; padding: 12px; font-weight: 750; }
.auth-tab.active { background: var(--white); color: var(--navy); box-shadow: 0 3px 10px rgba(17,45,56,.08); }
.auth-form { display: grid; gap: 18px; }
.form-heading { margin-bottom: 8px; }
.form-heading h2 { font-size: 35px; letter-spacing: -.04em; color: var(--navy); margin: 0 0 8px; }
.form-heading p { margin: 0; color: var(--muted); }
label { display: grid; gap: 8px; font-size: 12px; font-weight: 800; color: var(--navy); }
label small { color: var(--muted); font-weight: 500; }
input, select, textarea { width: 100%; border: 1px solid #d3ddda; background: var(--white); color: var(--ink); border-radius: 10px; padding: 12px 13px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,118,110,.1); }
textarea { resize: vertical; line-height: 1.55; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Main workspace */
.app-body { overflow-x: hidden; }
.workspace { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0,1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 230px; background: var(--white); border-right: 1px solid var(--line); padding: 25px 18px; display: flex; flex-direction: column; z-index: 10; }
.sidebar .brand { padding: 0 8px 26px; border-bottom: 1px solid var(--line); }
.sidebar-nav { display: grid; gap: 6px; margin-top: 22px; }
.nav-item { width: 100%; border: 0; background: transparent; color: var(--muted); border-radius: 10px; padding: 11px 12px; display: flex; gap: 11px; align-items: center; text-align: left; font-weight: 700; font-size: 13px; }
.nav-item span { width: 20px; text-align: center; color: var(--teal); font-size: 17px; }
.nav-item.active { background: var(--mint); color: var(--teal-dark); }
.sidebar-note { margin-top: auto; border: 1px solid var(--line); background: #f8faf7; padding: 14px; border-radius: 12px; }
.sidebar-note strong { color: var(--navy); font-size: 12px; }
.sidebar-note p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 7px 0 0; }
.logout-button { margin-top: 9px; }
.main-area { grid-column: 2; min-width: 0; padding: 0 clamp(22px, 4vw, 58px) 70px; }
.topbar { height: 112px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.topbar h1 { margin: 0; color: var(--navy); letter-spacing: -.035em; font-size: 29px; }
.topbar .page-kicker { margin-bottom: 6px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > div { display: grid; }
.user-chip strong { font-size: 13px; }
.user-chip small { color: var(--muted); font-size: 11px; text-transform: capitalize; }
.avatar { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; background: var(--navy); color: var(--lime); font-weight: 900; }
.screen { animation: fade-in .2s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(3px); } to { opacity:1; transform:none; } }
.loading-state { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); }
.loading-state span { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.welcome-banner { min-height: 220px; border-radius: var(--radius); background: var(--teal); color: var(--white); padding: 38px 42px; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.welcome-banner::after { content:""; width: 310px; height: 310px; border-radius: 50%; border: 70px solid rgba(255,255,255,.05); position: absolute; right: -120px; top: -150px; }
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-banner .eyebrow { color: var(--lime); }
.welcome-banner h2 { margin: 0 0 8px; font-size: 34px; letter-spacing: -.04em; }
.welcome-banner p:not(.eyebrow) { margin: 0; max-width: 690px; color: rgba(255,255,255,.74); line-height: 1.6; }
.tutor-banner { background: #3e4c7a; }
.admin-banner { background: #5c405d; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin: 20px 0; }
.metric-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: 0 2px 8px rgba(17,45,56,.03); }
.metric-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--mint); color: var(--teal); display: grid; place-items: center; font-size: 18px; font-weight: 900; }
.metric-card div { display: grid; }
.metric-card small { color: var(--muted); font-size: 11px; }
.metric-card strong { color: var(--navy); font-size: 23px; margin-top: 3px; }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 20px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 2px 10px rgba(17,45,56,.035); }
.panel-heading, .section-heading-inline { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.panel-heading small, .section-heading-inline small, .panel > small, .lesson-objectives > small, .chat-side small { color: var(--teal); font-size: 10px; letter-spacing: .13em; font-weight: 900; }
.panel-heading h3, .section-heading-inline h3 { margin: 5px 0 0; color: var(--navy); letter-spacing: -.025em; }
.section-heading-inline { margin-bottom: 23px; align-items: center; }
.section-heading-inline h2 { margin: 4px 0 0; color: var(--navy); font-size: 30px; letter-spacing: -.04em; }
.subject-badge, .type-badge { border-radius: 999px; background: var(--mint); color: var(--teal-dark); padding: 7px 10px; font-size: 11px; font-weight: 900; }
.empty-state { color: var(--muted); padding: 25px 0; font-size: 13px; }
.progress-list, .compact-list { margin-top: 16px; display: grid; gap: 11px; }
.progress-row { display: grid; grid-template-columns: minmax(0,1fr) 120px 42px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.progress-row strong { font-size: 13px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-track { height: 7px; background: #e9efec; border-radius: 99px; overflow: hidden; }
.progress-track span { height: 100%; display: block; background: var(--teal); border-radius: inherit; }
.progress-row small { color: var(--muted); text-align: right; }
.compact-booking { padding: 11px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.compact-booking strong { font-size: 13px; color: var(--navy); }
.compact-booking span { color: var(--muted); font-size: 11px; }

/* Course browser */
.panel-dark { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 36px; display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.panel-dark .eyebrow { color: var(--lime); }
.panel-dark h2 { margin: 0 0 9px; font-size: 35px; letter-spacing: -.04em; }
.panel-dark p:not(.eyebrow) { color: rgba(255,255,255,.65); max-width: 750px; margin: 0; line-height: 1.6; }
.course-stat { display: grid; text-align: center; min-width: 120px; }
.course-stat strong { color: var(--lime); font-size: 42px; }
.course-stat span { color: rgba(255,255,255,.6); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.lesson-browser { display: grid; grid-template-columns: 230px minmax(0,1fr); gap: 25px; margin-top: 25px; }
.module-list { display: grid; align-content: start; gap: 6px; }
.module-button { border: 1px solid var(--line); background: var(--white); border-radius: 11px; padding: 13px; color: var(--muted); text-align: left; display: grid; gap: 4px; }
.module-button strong { color: var(--navy); font-size: 12px; }
.module-button small { font-size: 10px; }
.module-button.active { border-color: var(--teal); background: var(--mint); }
.lesson-list { display: grid; gap: 12px; }
.lesson-card { background: var(--white); border: 1px solid var(--line); border-radius: 15px; padding: 19px 20px; display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 16px; transition: border-color .15s, transform .15s; }
.lesson-card:hover { border-color: #a9cfc8; transform: translateY(-1px); }
.lesson-number { width: 43px; height: 43px; border-radius: 12px; display: grid; place-items: center; background: #edf3f0; color: var(--teal); font-weight: 900; font-size: 12px; }
.lesson-card h4 { margin: 0 0 6px; color: var(--navy); font-size: 16px; }
.lesson-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.lesson-card-meta { display: flex; align-items: center; gap: 10px; }
.lesson-card-meta span { color: var(--muted); font-size: 11px; }

/* Active lesson */
.lesson-title-row { display: flex; justify-content: space-between; gap: 25px; align-items: flex-end; }
.lesson-title-row h2 { margin: 0 0 8px; font-size: 36px; color: var(--navy); letter-spacing: -.045em; }
.lesson-title-row p:not(.page-kicker) { color: var(--muted); margin: 0; max-width: 800px; line-height: 1.6; }
.lesson-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.duration-pill { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 9px 13px; color: var(--muted); font-size: 12px; font-weight: 700; }
.lesson-tabs { margin: 28px 0 22px; border-bottom: 1px solid var(--line); display: flex; gap: 4px; overflow-x: auto; }
.lesson-tab { border: 0; background: transparent; padding: 13px 17px; color: var(--muted); font-weight: 750; white-space: nowrap; border-bottom: 3px solid transparent; }
.lesson-tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.learning-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 22px; align-items: start; }
.lesson-objectives ul { padding-left: 20px; margin-bottom: 0; }
.lesson-objectives li { margin: 9px 0; color: var(--ink); line-height: 1.5; }
.teaching-sections { display: grid; gap: 15px; margin-top: 15px; }
.teaching-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.teaching-card-header { display: flex; align-items: center; gap: 13px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.teaching-card-header span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--mint); color: var(--teal); font-size: 11px; font-weight: 900; }
.teaching-card h3 { margin: 0; color: var(--navy); font-size: 17px; }
.teaching-card-body { padding: 22px; }
.teaching-card-body > p { color: #3f4c52; line-height: 1.72; white-space: pre-wrap; }
.teaching-callout { margin-top: 15px; padding: 15px; border-left: 3px solid var(--teal); background: #f2f8f5; color: var(--muted); font-size: 13px; line-height: 1.6; border-radius: 0 9px 9px 0; }
.teaching-callout strong { color: var(--teal-dark); }
.sticky-card { position: sticky; top: 15px; }
.sticky-card dl { margin-bottom: 0; }
.sticky-card dt { margin-top: 13px; color: var(--navy); font-size: 12px; font-weight: 850; }
.sticky-card dd { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.warning-card { margin-top: 15px; background: #fffaf0; border-color: #ede0b9; }
.warning-card small { color: #8a6b15; }
.warning-card ul { padding-left: 18px; margin-bottom: 0; }
.warning-card li { color: #6f6243; font-size: 12px; line-height: 1.55; margin: 8px 0; }
.panel-jump { margin-top: 15px; }

/* AI chat */
.chat-layout { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 20px; }
.chat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 620px; display: flex; flex-direction: column; }
.chat-header { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.teacher-identity { display: flex; align-items: center; gap: 11px; }
.teacher-avatar { width: 39px; height: 39px; border-radius: 12px; background: var(--lime); color: var(--navy); font-weight: 900; display: grid; place-items: center; }
.teacher-identity > div { display: grid; }
.teacher-identity strong { font-size: 13px; color: var(--navy); }
.teacher-identity small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.teacher-identity i { display: inline-block; width: 6px; height: 6px; background: #3dba70; border-radius: 50%; margin-right: 5px; }
.compact-select { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.compact-select select { width: auto; padding: 7px 9px; font-size: 11px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 22px; display: grid; align-content: start; gap: 14px; min-height: 420px; max-height: 570px; background: #fbfcfb; }
.chat-empty { margin: auto; text-align: center; max-width: 450px; color: var(--muted); }
.chat-empty span { margin: auto; width: 58px; height: 58px; display: grid; place-items: center; background: var(--mint); color: var(--teal); border-radius: 18px; font-weight: 900; }
.chat-empty h3 { color: var(--navy); margin: 15px 0 6px; }
.chat-empty p { font-size: 13px; line-height: 1.55; }
.message { max-width: 82%; display: grid; gap: 5px; }
.message.student { justify-self: end; }
.message.assistant { justify-self: start; }
.message-content { padding: 13px 15px; border-radius: 15px; white-space: pre-wrap; line-height: 1.55; font-size: 13px; }
.message.student .message-content { background: var(--teal); color: var(--white); border-bottom-right-radius: 4px; }
.message.assistant .message-content { background: var(--white); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.message small { color: var(--muted); font-size: 9px; }
.message.student small { text-align: right; }
.message-loading .message-content { display: flex; gap: 4px; align-items: center; }
.message-loading i { width: 6px; height: 6px; background: var(--muted); border-radius: 50%; animation: pulse 1s infinite alternate; }
.message-loading i:nth-child(2) { animation-delay: .2s; }
.message-loading i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { to { opacity: .25; transform: translateY(-2px); } }
.chat-composer { border-top: 1px solid var(--line); padding: 13px; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 9px; align-items: end; }
.chat-composer textarea { border: 0; background: #f2f5f3; resize: none; min-height: 46px; max-height: 130px; }
.composer-icon { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); color: var(--red); }
.composer-icon.listening { background: #fde9e9; animation: mic-pulse 1s infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 5px rgba(189,77,77,.13); } }
.chat-options { padding: 0 15px 13px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.chat-options label { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); font-weight: 600; }
.chat-options input { width: auto; }
.chat-side { display: grid; align-content: start; gap: 14px; }
.prompt-chip { width: 100%; text-align: left; margin-top: 9px; padding: 10px; border: 1px solid var(--line); background: #f8faf8; color: var(--navy); border-radius: 9px; font-size: 11px; line-height: 1.4; }
#ai-key-points ul { padding-left: 17px; }
#ai-key-points li { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 7px 0; }

/* Exam */
.exam-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 20px; align-items: start; }
.question-nav { display: grid; gap: 9px; }
.question-nav > small { margin-bottom: 5px; }
.question-button { width: 100%; border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 11px; text-align: left; display: flex; gap: 10px; align-items: center; color: var(--muted); }
.question-button span { width: 26px; height: 26px; display: grid; place-items: center; background: #edf3f0; border-radius: 7px; color: var(--teal); font-weight: 900; font-size: 10px; flex-shrink: 0; }
.question-button div { display: grid; gap: 2px; }
.question-button strong { color: var(--navy); font-size: 11px; text-transform: capitalize; }
.question-button small { font-size: 9px; }
.question-button.active { border-color: var(--teal); background: var(--mint); }
.exam-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.exam-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.exam-meta strong { margin-left: auto; color: var(--navy); }
.exam-card h3 { font-size: 21px; color: var(--navy); line-height: 1.5; margin: 22px 0; white-space: pre-wrap; }
.question-options { display: grid; gap: 8px; margin: -7px 0 20px; }
.option-row { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: 13px; }
.exam-submit { margin-top: 13px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.exam-submit span { color: var(--muted); font-size: 10px; }
.grade-result { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 22px; }
.grade-score { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.score-circle { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--lime); font-size: 20px; font-weight: 900; }
.grade-score h4 { margin: 0 0 4px; color: var(--navy); font-size: 18px; }
.grade-score p { margin: 0; color: var(--muted); font-size: 12px; }
.mark-points { display: grid; gap: 7px; }
.mark-point { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 8px; align-items: start; padding: 10px; background: #f7f9f7; border-radius: 9px; font-size: 12px; }
.mark-point > span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; font-weight: 900; }
.mark-point.awarded > span { background: var(--mint); color: var(--teal); }
.mark-point.missed > span { background: #f9e6e6; color: var(--red); }
.mark-point p { margin: 0; color: var(--ink); line-height: 1.45; }
.mark-point small { color: var(--muted); }
.model-answer { margin-top: 14px; padding: 15px; background: #f0f6f3; border-radius: 11px; }
.model-answer strong { color: var(--teal-dark); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.model-answer p { margin: 8px 0 0; line-height: 1.6; color: var(--ink); white-space: pre-wrap; }
.next-step { margin-top: 10px; color: var(--muted); font-size: 12px; }

/* Booking / tutor */
.qa-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 20px; }
.booking-card { padding: 30px; }
.booking-card h3 { font-size: 27px; color: var(--navy); letter-spacing: -.035em; margin: 0 0 8px; }
.booking-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
.booking-card form, #create-tutor-form { display: grid; gap: 15px; margin-top: 24px; }
.tutor-brief-preview ul { padding-left: 18px; margin: 12px 0 0; }
.tutor-brief-preview li { color: var(--muted); font-size: 12px; margin: 10px 0; line-height: 1.45; }
.booking-list { margin-top: 15px; display: grid; gap: 10px; }
.booking-item { border: 1px solid var(--line); border-radius: 13px; padding: 16px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; }
.booking-item h4 { margin: 0 0 5px; color: var(--navy); font-size: 14px; }
.booking-item p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.booking-item .student-question { margin-top: 6px; color: var(--ink); font-style: italic; }
.booking-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.booking-actions .button { padding: 8px 11px; font-size: 11px; }
.status-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; margin-left: 6px; }
.status-pending { background: #fff2cc; color: #775a07; }
.status-accepted { background: var(--mint); color: var(--teal-dark); }
.status-completed { background: #e8edf5; color: #45536a; }
.status-cancelled { background: #f5e5e5; color: #8d3d3d; }
#pending-bookings-panel { margin-bottom: 18px; }
.brief-panel { margin-top: 18px; border-color: #a6cfc8; }
.brief-content { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; margin-top: 18px; }
.brief-section { background: #f8faf8; padding: 15px; border-radius: 11px; }
.brief-section.full { grid-column: 1 / -1; }
.brief-section h4 { margin: 0 0 9px; color: var(--teal-dark); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.brief-section p, .brief-section li { color: var(--muted); font-size: 12px; line-height: 1.55; }
.brief-section ul, .brief-section ol { padding-left: 18px; margin: 0; }
.workflow-row { margin-top: 20px; display: grid; grid-template-columns: 28px 1fr 28px 1fr 28px 1fr 28px 1fr; align-items: center; gap: 9px; }
.workflow-row > span { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--mint); color: var(--teal); font-weight: 900; font-size: 10px; }
.workflow-row p { color: var(--muted); font-size: 12px; line-height: 1.45; }
.workflow-row strong { color: var(--navy); }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 10px; border-bottom: 1px solid var(--line); }
td { padding: 13px 10px; border-bottom: 1px solid var(--line); color: var(--ink); }
.role-pill { padding: 4px 7px; border-radius: 999px; background: #edf3f0; color: var(--teal-dark); font-size: 9px; font-weight: 900; text-transform: uppercase; }

.toast { position: fixed; z-index: 1000; right: 24px; top: 24px; min-width: 260px; max-width: 430px; padding: 13px 16px; border-radius: 11px; background: var(--navy); color: var(--white); box-shadow: var(--shadow); font-size: 12px; transform: translateY(-20px); opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { transform: none; opacity: 1; }
.toast.error { background: #7d3030; }
.toast.success { background: var(--teal-dark); }

/* Error */
.center-page { display: grid; place-items: center; padding: 30px; }
.error-card { width: min(460px,100%); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 35px; box-shadow: var(--shadow); text-align: center; }
.error-card .brand-mark { margin: auto; }
.error-card h1 { color: var(--navy); }
.error-card p { color: var(--muted); line-height: 1.6; }

/* Video room */
.room-body { background: #081820; color: var(--white); height: 100vh; overflow: hidden; }
.room-header { height: 76px; padding: 0 22px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid rgba(255,255,255,.1); background: #0b222b; }
.room-session-title { display: grid; text-align: center; }
.room-session-title strong { font-size: 13px; }
.room-session-title span { color: rgba(255,255,255,.58); font-size: 10px; margin-top: 4px; }
.room-session-title i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #e0b83f; margin-right: 5px; }
.room-session-title.connected i { background: #44c77c; }
.button-room { justify-self: end; padding: 9px 13px; background: rgba(255,255,255,.1); color: var(--white); }
.room-layout { height: calc(100vh - 76px); display: grid; grid-template-columns: minmax(0,1fr) 350px; }
.video-stage { position: relative; display: grid; place-items: center; background: #06151c; overflow: hidden; }
#remote-video { width: 100%; height: 100%; object-fit: contain; background: #06151c; }
.video-placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; background: radial-gradient(circle at center, #102e3a 0, #06151c 65%); }
.video-placeholder span { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: rgba(216,235,116,.1); color: var(--lime); font-size: 32px; }
.video-placeholder strong { margin-top: 16px; }
.video-placeholder p { color: rgba(255,255,255,.5); font-size: 12px; }
.local-video-wrap { position: absolute; right: 18px; top: 18px; width: min(230px, 25vw); aspect-ratio: 16/10; border-radius: 13px; border: 2px solid rgba(255,255,255,.16); overflow: hidden; background: #102e3a; box-shadow: 0 13px 35px rgba(0,0,0,.35); }
.local-video-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.local-video-wrap span { position: absolute; left: 8px; bottom: 7px; padding: 4px 7px; border-radius: 6px; background: rgba(0,0,0,.45); font-size: 9px; }
.call-controls { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); padding: 8px; border-radius: 18px; background: rgba(11,34,43,.86); backdrop-filter: blur(12px); display: flex; gap: 7px; box-shadow: 0 8px 30px rgba(0,0,0,.28); }
.call-button { width: 58px; height: 54px; border: 0; border-radius: 12px; background: rgba(255,255,255,.1); color: var(--white); display: grid; place-items: center; align-content: center; gap: 2px; }
.call-button span { font-size: 16px; }
.call-button small { font-size: 8px; }
.call-button.active { background: rgba(216,235,116,.18); }
.call-button.off { background: rgba(189,77,77,.28); }
.call-button.danger { background: #a53d3d; }
.room-side { background: #f5f7f5; color: var(--ink); display: flex; flex-direction: column; min-width: 0; }
.room-tabs { height: 54px; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); padding: 7px; gap: 5px; }
.room-tab { border: 0; background: transparent; color: var(--muted); border-radius: 8px; font-weight: 750; font-size: 11px; }
.room-tab.active { background: var(--white); color: var(--teal-dark); box-shadow: 0 2px 8px rgba(17,45,56,.08); }
.room-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.room-messages { flex: 1; overflow-y: auto; padding: 14px; display: grid; align-content: start; gap: 9px; }
.room-message { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; }
.room-message strong { color: var(--teal-dark); font-size: 10px; }
.room-message p { margin: 4px 0 0; font-size: 11px; line-height: 1.45; white-space: pre-wrap; }
.room-message small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; }
.room-system-message { color: var(--muted); text-align: center; font-size: 9px; padding: 5px; }
.room-chat-form { border-top: 1px solid var(--line); padding: 10px; display: grid; grid-template-columns: minmax(0,1fr) 37px; gap: 7px; }
.room-chat-form input { padding: 9px 10px; font-size: 11px; }
.room-chat-form button { border: 0; border-radius: 9px; background: var(--teal); color: var(--white); font-weight: 900; }
.board-toolbar { height: 48px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.board-toolbar span { color: var(--navy); font-size: 11px; font-weight: 800; }
.board-toolbar button { border: 1px solid var(--line); background: var(--white); border-radius: 7px; padding: 6px 9px; font-size: 9px; }
#whiteboard { flex: 1; width: 100%; height: calc(100% - 84px); background: var(--white); touch-action: none; cursor: crosshair; }
.board-note { height: 36px; margin: 0; padding: 10px; color: var(--muted); font-size: 9px; text-align: center; }
.room-alert { position: fixed; left: 50%; top: 95px; transform: translateX(-50%); z-index: 100; background: #7d3030; color: var(--white); padding: 12px 17px; border-radius: 10px; box-shadow: var(--shadow); font-size: 12px; max-width: min(500px, calc(100% - 30px)); }

/* Responsive */
@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-copy { max-width: 820px; }
  .hero-card { max-width: 650px; transform: none; }
  .workflow-grid { grid-template-columns: 1fr 1fr; }
  .workflow-grid article:nth-child(2) { border-right: 0; }
  .workflow-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .learning-layout, .chat-layout, .qa-layout { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .chat-side { grid-template-columns: 1fr 1fr; }
  .room-layout { grid-template-columns: minmax(0,1fr) 300px; }
}

@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { min-height: 350px; }
  .auth-principles { display: none; }
  .workspace { grid-template-columns: 76px minmax(0,1fr); }
  .sidebar { width: 76px; padding: 20px 10px; }
  .sidebar .brand { justify-content: center; padding: 0 0 20px; }
  .sidebar .brand > span:last-child, .nav-item:not(.logout-button) { font-size: 0; }
  .nav-item { justify-content: center; padding: 11px 5px; }
  .nav-item span { font-size: 18px; }
  .sidebar-note { display: none; }
  .logout-button { font-size: 0; margin-top: auto; }
  .main-area { grid-column: 2; padding: 0 20px 60px; }
  .dashboard-grid, .admin-grid { grid-template-columns: 1fr; }
  .lesson-browser { grid-template-columns: 1fr; }
  .module-list { grid-template-columns: repeat(2,1fr); }
  .exam-layout { grid-template-columns: 1fr; }
  .question-nav #question-list { display: flex; overflow-x: auto; gap: 8px; }
  .question-button { min-width: 150px; }
  .room-body { height: auto; min-height: 100vh; overflow: auto; }
  .room-header { grid-template-columns: 1fr auto; }
  .room-session-title { display: none; }
  .room-layout { height: auto; min-height: calc(100vh - 76px); grid-template-columns: 1fr; grid-template-rows: minmax(420px, 65vh) 520px; }
  .room-side { min-height: 520px; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 26px, 1180px); }
  .landing-nav { height: 72px; }
  .hero { padding: 45px 0 70px; gap: 45px; min-height: auto; }
  .hero h1 { font-size: 47px; }
  .hero-lead { font-size: 16px; }
  .preview-body { padding: 20px; }
  .particle-diagram { gap: 8px; }
  .workflow { padding: 65px 0; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-grid article { border-right: 0; border-bottom: 1px solid var(--line); min-height: 190px; }
  .workflow-grid article:last-child { border-bottom: 0; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid div:nth-child(2) { border-right: 0; }
  .trust-grid div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.1); }
  .auth-story { padding: 30px 24px; min-height: 300px; }
  .auth-story h1 { font-size: 44px; }
  .auth-panel { padding: 35px 18px; }
  .form-row { grid-template-columns: 1fr; }
  .workspace { display: block; padding-bottom: 70px; }
  .sidebar { top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 68px; padding: 7px 9px; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); }
  .sidebar .brand, .sidebar-note, .logout-button { display: none; }
  .sidebar-nav { margin: 0; display: flex; width: 100%; justify-content: space-around; }
  .nav-item { width: auto; min-width: 58px; display: grid; place-items: center; gap: 0; font-size: 0 !important; }
  .nav-item span { font-size: 19px; }
  .main-area { padding: 0 13px 28px; }
  .topbar { height: 88px; margin-bottom: 20px; }
  .topbar h1 { font-size: 23px; }
  .user-chip > div { display: none; }
  .welcome-banner { padding: 27px 23px; min-height: 250px; display: grid; }
  .welcome-banner h2 { font-size: 27px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { padding: 13px; gap: 9px; }
  .metric-icon { width: 32px; height: 32px; }
  .metric-card strong { font-size: 18px; }
  .metric-card small { font-size: 9px; }
  .panel-dark { padding: 25px; display: grid; }
  .course-stat { text-align: left; }
  .module-list { grid-template-columns: 1fr; }
  .lesson-card { grid-template-columns: 40px minmax(0,1fr); }
  .lesson-card-meta { grid-column: 2; justify-content: space-between; }
  .lesson-title-row { display: grid; }
  .lesson-title-row h2 { font-size: 29px; }
  .lesson-actions { justify-content: space-between; }
  .lesson-tabs { margin-top: 20px; }
  .lesson-tab { padding: 11px; font-size: 11px; }
  .chat-header { align-items: flex-start; }
  .compact-select { display: grid; }
  .chat-messages { padding: 13px; min-height: 400px; }
  .message { max-width: 94%; }
  .chat-composer { grid-template-columns: 33px minmax(0,1fr); }
  .chat-composer .button { grid-column: 2; justify-self: end; padding: 9px 16px; }
  .chat-options { display: grid; }
  .chat-side { grid-template-columns: 1fr; }
  .exam-card { padding: 19px; }
  .exam-card h3 { font-size: 17px; }
  .exam-submit { align-items: flex-end; }
  .booking-item { grid-template-columns: 1fr; }
  .booking-actions { justify-content: flex-start; }
  .brief-content { grid-template-columns: 1fr; }
  .brief-section.full { grid-column: auto; }
  .workflow-row { grid-template-columns: 28px 1fr; }
  .local-video-wrap { width: 125px; }
  .call-button { width: 50px; }
  .room-layout { grid-template-rows: minmax(340px, 60vh) 480px; }
}

/* Tutor teaching-philosophy and AI-alignment extension */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.alignment-indicator { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; font-style: normal; letter-spacing: .02em; }
.alignment-indicator.human-aligned { color: var(--teal-dark); font-weight: 800; }
.alignment-note { margin-top: 7px !important; padding-left: 10px; border-left: 3px solid var(--lime); color: var(--navy) !important; }
.status-draft { background: #e8edf0; color: #42545d; }
.status-submitted { background: #fff2cc; color: #775a07; }
.status-approved { background: var(--mint); color: var(--teal-dark); }
.status-rejected { background: #fce0df; color: #8b3030; }
.status-superseded { background: #ede8f7; color: #5c4b80; }

.tutor-home-grid { align-items: stretch; }
.philosophy-intro { margin-bottom: 20px; grid-template-columns: minmax(0,1fr) minmax(230px,.45fr); }
.philosophy-intro h3 { margin: 5px 0 9px; font-size: 25px; }
.philosophy-intro p { max-width: 760px; }
.alignment-rules { display: grid; gap: 8px; align-content: center; }
.alignment-rules strong { color: var(--lime); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.alignment-rules span { position: relative; padding: 8px 11px 8px 29px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; background: rgba(255,255,255,.05); color: rgba(255,255,255,.88); font-size: 10px; }
.alignment-rules span::before { content: "↓"; position: absolute; left: 10px; color: var(--lime); }
.alignment-rules span:first-of-type::before { content: "1"; }

.philosophy-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(320px,.75fr); gap: 20px; align-items: start; }
.philosophy-main, .philosophy-side { display: grid; gap: 16px; }
.philosophy-layout textarea { width: 100%; resize: vertical; }
.questionnaire-list { display: grid; gap: 14px; }
.philosophy-question { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfc; }
.philosophy-question-heading { display: grid; grid-template-columns: 35px minmax(0,1fr); gap: 10px; align-items: start; }
.philosophy-question-heading h4 { margin: 1px 0 0; color: var(--navy); font-size: 13px; line-height: 1.45; }
.question-index { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: var(--mint); color: var(--teal-dark); font-size: 9px; font-weight: 900; }
.philosophy-question > p { margin: 7px 0 10px 45px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.philosophy-question textarea { min-height: 108px; }
.answer-count { display: block; margin-top: 5px; text-align: right; color: var(--muted); font-size: 8px; }
.philosophy-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.philosophy-actions p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.profile-preview { display: grid; gap: 13px; max-height: 72vh; overflow: auto; padding-right: 4px; }
.profile-preview.empty-state { display: block; min-height: 150px; }
.profile-field { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.profile-field h4 { margin: 0 0 6px; color: var(--navy); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; }
.profile-field p { margin: 0; color: var(--ink); font-size: 10px; line-height: 1.55; white-space: pre-wrap; }
.profile-field ul { margin: 0; padding-left: 18px; color: var(--ink); font-size: 10px; line-height: 1.55; }
.risk-field { border-color: #e1b25c; background: #fff9e9; }
.profile-history-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.profile-history-item:last-child { border-bottom: 0; }
.profile-history-item .panel-heading { margin-bottom: 0; }
.profile-history-item strong { display: block; color: var(--navy); font-size: 11px; }
.profile-history-item small { color: var(--muted); font-size: 8px; }
.profile-history-item p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

.alignment-admin-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.profile-review-list, .profile-library { display: grid; gap: 14px; }
.profile-review-card { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfc; }
.profile-review-card .panel-heading { align-items: flex-start; }
.profile-review-card h4 { margin: 4px 0; color: var(--navy); font-size: 15px; }
.profile-review-card .panel-heading p { margin: 0; color: var(--muted); font-size: 9px; }
.profile-review-card > textarea { width: 100%; margin-top: 12px; resize: vertical; }
.profile-raw-details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.profile-raw-details summary { cursor: pointer; color: var(--teal-dark); font-size: 10px; font-weight: 800; }
.profile-raw-body { display: grid; gap: 8px; margin-top: 10px; max-height: 430px; overflow: auto; }
.approved-profile-card { padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.approved-profile-card strong { display: block; color: var(--navy); font-size: 12px; }
.approved-profile-card small { display: block; margin-top: 4px; color: var(--teal-dark); font-size: 9px; font-weight: 750; }
.approved-profile-card p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
#course-supervisor-form { display: grid; gap: 13px; }

@media (max-width: 1050px) {
  .philosophy-layout, .alignment-admin-grid { grid-template-columns: 1fr; }
  .profile-preview { max-height: none; }
  .philosophy-intro { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .philosophy-actions { display: grid; }
  .philosophy-actions .booking-actions { display: grid; width: 100%; }
  .philosophy-actions .button { width: 100%; }
  .philosophy-question > p { margin-left: 0; }
}

/* Browser-rendered animated lecture player */
.lecture-player {
  --lecture-ink: #eaf5f1;
  --lecture-muted: rgba(234, 245, 241, .66);
  overflow: hidden;
  border: 1px solid rgba(17, 45, 56, .12);
  border-radius: 22px;
  background: #0c2731;
  box-shadow: 0 24px 70px rgba(10, 38, 48, .22);
}
.lecture-toolbar {
  min-height: 78px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #f8fbf9;
  border-bottom: 1px solid var(--line);
}
.lecture-mode-label { display: flex; align-items: center; gap: 11px; }
.lecture-mode-label > div { display: grid; gap: 3px; }
.lecture-mode-label strong { color: var(--navy); font-size: 13px; }
.lecture-mode-label small { color: var(--muted); font-size: 9px; }
.lecture-live-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(13, 118, 110, .12);
  animation: lecturePulse 2.2s ease-in-out infinite;
}
.lecture-settings { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.lecture-settings label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.lecture-settings select { min-width: 118px; padding: 8px 28px 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--navy); font-size: 10px; text-transform: none; letter-spacing: 0; }
#lecture-voice { max-width: 210px; }

.lecture-screen { position: relative; min-height: 610px; background: radial-gradient(circle at 73% 28%, #1d5360 0, #10343f 37%, #081f28 100%); }
.lecture-stage { min-height: 540px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(275px, .65fr); }
.lecture-slide-card { position: relative; margin: 26px 0 26px 26px; min-height: 488px; border-radius: 20px; overflow: hidden; background: linear-gradient(145deg, #ffffff 0%, #f3f8f5 100%); box-shadow: 0 18px 55px rgba(0, 0, 0, .2); }
.lecture-slide-copy { min-height: 488px; padding: clamp(26px, 3.5vw, 48px); display: flex; flex-direction: column; }
.lecture-slide-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; color: var(--teal-dark); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.lecture-slide-meta span:last-child { padding: 6px 9px; border-radius: 999px; background: var(--mint); letter-spacing: .03em; }
.lecture-slide-card h3 { max-width: 760px; margin: 0; color: var(--navy); font-size: clamp(28px, 3.4vw, 48px); line-height: 1.02; letter-spacing: -.05em; }
.lecture-slide-card #lecture-slide-subtitle { max-width: 720px; margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.lecture-slide-bullets { max-width: 780px; margin: 23px 0 0; padding: 0; display: grid; gap: 10px; list-style: none; }
.lecture-slide-bullets li { position: relative; padding-left: 23px; color: var(--ink); font-size: 13px; line-height: 1.55; }
.lecture-slide-bullets li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border: 2px solid var(--teal); border-radius: 50%; }
.lecture-visual { margin-top: auto; min-height: 135px; padding-top: 24px; display: grid; place-items: center; }

.avatar-stage { position: relative; min-height: 540px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; overflow: hidden; }
.avatar-halo { position: absolute; width: 310px; height: 310px; top: 91px; left: 50%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(216,235,116,.23), rgba(216,235,116,.04) 57%, transparent 72%); animation: haloBreathe 4s ease-in-out infinite; }
.avatar-alignment { position: absolute; z-index: 3; top: 26px; left: 22px; right: 18px; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(4, 22, 28, .44); backdrop-filter: blur(8px); }
.avatar-alignment > span { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(216,235,116,.12); }
.avatar-alignment > div { display: grid; gap: 3px; min-width: 0; }
.avatar-alignment small { color: rgba(255,255,255,.48); font-size: 7px; letter-spacing: .12em; }
.avatar-alignment strong { overflow: hidden; color: var(--white); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.lecture-avatar-svg { position: relative; z-index: 2; width: min(330px, 92%); max-height: 455px; overflow: visible; }
.avatar-floor { fill: rgba(1, 13, 18, .34); }
.tutor-puppet { transform-origin: 180px 420px; animation: tutorBreathing 4.6s ease-in-out infinite; }
.tutor-head { transform-origin: 180px 292px; transition: transform .35s ease; animation: tutorHeadFloat 5.2s ease-in-out infinite; }
.tutor-jacket { stroke: rgba(255,255,255,.08); stroke-width: 2; }
.tutor-lapel { fill: #215160; stroke: rgba(255,255,255,.08); stroke-width: 1.5; }
.tutor-neck { stroke: rgba(103,55,37,.2); stroke-width: 1; }
.tutor-arm, .tutor-hand { transform-origin: 255px 410px; transition: transform .35s ease; }
.tutor-hair { fill: #1f1a1a; }
.tutor-hair-detail { fill: none; stroke: rgba(255,255,255,.13); stroke-width: 5; stroke-linecap: round; }
.tutor-face, .tutor-ear { stroke: rgba(82,42,31,.15); stroke-width: 1.5; }
.tutor-brow { fill: none; stroke: #3c2923; stroke-width: 7; stroke-linecap: round; transition: transform .25s ease; }
.eye-white { fill: #fff; transform-box: fill-box; transform-origin: center; transition: transform .09s ease; }
.eye-iris { fill: #5f3826; transition: transform .25s ease; }
.eye-pupil { fill: #15100e; transition: transform .25s ease; }
.eye-glint { fill: #fff; transition: transform .25s ease; }
.eye-lid { fill: none; stroke: #6a3e2e; stroke-width: 2.6; opacity: .45; }
.tutor-nose { fill: none; stroke: rgba(91,48,34,.45); stroke-width: 3; stroke-linecap: round; }
.tutor-cheek { fill: #d66f6f; opacity: .12; transition: opacity .25s ease; }
.tutor-beard { fill: rgba(35,27,24,.17); }
.mouth-neutral, .mouth-smile { fill: none; stroke: #6c302e; stroke-width: 4.5; stroke-linecap: round; opacity: 1; transition: opacity .12s ease, transform .15s ease; transform-origin: 180px 252px; }
.mouth-smile, .mouth-open, .mouth-teeth, .mouth-tongue { opacity: 0; }
.mouth-open { fill: #682a31; transform-origin: 180px 254px; transition: opacity .1s ease, transform .1s ease; }
.mouth-teeth { fill: #fff8ed; }
.mouth-tongue { fill: #cc696f; }
.avatar-expression-label { position: absolute; z-index: 4; bottom: 16px; display: flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: rgba(5, 23, 29, .72); color: rgba(255,255,255,.82); font-size: 9px; backdrop-filter: blur(8px); }
.avatar-expression-label > span:first-child { color: var(--lime); font-size: 8px; }

.lecture-player.is-blinking .eye-white,
.lecture-player.is-blinking .eye-iris,
.lecture-player.is-blinking .eye-pupil,
.lecture-player.is-blinking .eye-glint { transform: scaleY(.08); }
.lecture-player.is-speaking .mouth-neutral,
.lecture-player.is-speaking .mouth-smile { opacity: 0; }
.lecture-player.is-speaking .mouth-open { opacity: 1; }
.lecture-player.is-speaking .mouth-teeth,
.lecture-player.is-speaking .mouth-tongue { opacity: .95; }
.lecture-player.is-speaking.mouth-a .mouth-open { transform: scale(1, 1.15); }
.lecture-player.is-speaking.mouth-o .mouth-open { transform: scale(.65, 1.1); }
.lecture-player.is-speaking.mouth-e .mouth-open { transform: scale(1.18, .62); }
.lecture-player.is-speaking .tutor-head { animation: tutorSpeaking 1.1s ease-in-out infinite; }
.lecture-player.is-speaking .tutor-hand { animation: tutorHandTalk 1.8s ease-in-out infinite; }
.lecture-player[data-expression="welcome"] .mouth-neutral,
.lecture-player[data-expression="celebrate"] .mouth-neutral { opacity: 0; }
.lecture-player[data-expression="welcome"] .mouth-smile,
.lecture-player[data-expression="celebrate"] .mouth-smile { opacity: 1; }
.lecture-player[data-expression="welcome"] .tutor-cheek,
.lecture-player[data-expression="celebrate"] .tutor-cheek { opacity: .28; }
.lecture-player[data-expression="thinking"] .tutor-head { transform: rotate(-3deg) translateY(-2px); }
.lecture-player[data-expression="thinking"] .eye-iris,
.lecture-player[data-expression="thinking"] .eye-pupil,
.lecture-player[data-expression="thinking"] .eye-glint { transform: translate(4px, -3px); }
.lecture-player[data-expression="thinking"] .tutor-brow-left { transform: translateY(-4px) rotate(-4deg); }
.lecture-player[data-expression="thinking"] .tutor-brow-right { transform: translateY(2px) rotate(5deg); }
.lecture-player[data-expression="emphasis"] .tutor-brow { transform: translateY(-5px); }
.lecture-player[data-expression="emphasis"] .tutor-hand { transform: translate(-9px, -18px) rotate(-8deg); }
.lecture-player[data-expression="caution"] .tutor-brow-left { transform: translateY(2px) rotate(7deg); }
.lecture-player[data-expression="caution"] .tutor-brow-right { transform: translateY(2px) rotate(-7deg); }
.lecture-player[data-expression="caution"] .mouth-neutral { transform: rotate(180deg) translateY(-5px); }
.lecture-player[data-expression="celebrate"] .tutor-head { transform: translateY(-5px); }
.lecture-player[data-expression="celebrate"] .tutor-hand { transform: translate(-15px, -30px) rotate(-18deg); }
.lecture-player.is-speaking[data-expression="welcome"] .mouth-smile,
.lecture-player.is-speaking[data-expression="celebrate"] .mouth-smile { opacity: 0; }

.lecture-caption-bar { min-height: 70px; padding: 14px 22px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 13px; align-items: start; border-top: 1px solid rgba(255,255,255,.09); background: rgba(3, 18, 24, .74); }
.caption-speaker { margin-top: 2px; padding: 5px 8px; border-radius: 7px; background: var(--lime); color: var(--navy); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.lecture-caption-bar p { margin: 0; color: rgba(255,255,255,.86); font-size: 12px; line-height: 1.55; }
.lecture-player[data-language="urdu"] .lecture-caption-bar p { font-family: "Noto Nastaliq Urdu", "Noto Sans Arabic", serif; font-size: 14px; line-height: 1.9; }

.lecture-start-overlay { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; padding: 25px; background: rgba(4, 20, 26, .78); backdrop-filter: blur(7px); }
.lecture-start-card { width: min(510px, 100%); padding: 34px; border: 1px solid rgba(255,255,255,.13); border-radius: 22px; background: #123844; color: var(--white); text-align: center; box-shadow: 0 25px 80px rgba(0,0,0,.34); }
.lecture-start-card .eyebrow { margin-top: 18px; color: var(--lime); }
.lecture-start-card h3 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.lecture-start-card p:not(.eyebrow) { color: rgba(255,255,255,.72); line-height: 1.65; }
.lecture-start-card small { display: block; margin-top: 13px; color: rgba(255,255,255,.48); font-size: 9px; }
.lecture-play-orb { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto; padding-left: 4px; border-radius: 50%; background: var(--lime); color: var(--navy); font-size: 24px; box-shadow: 0 0 0 14px rgba(216,235,116,.08); }

.lecture-progress-wrap { padding: 16px 20px 13px; background: #f7faf8; border-top: 1px solid var(--line); }
.lecture-progress-heading { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.lecture-progress-heading strong { color: var(--teal-dark); }
.lecture-progress-track { height: 6px; margin-top: 7px; overflow: hidden; border-radius: 99px; background: #dfe8e5; }
.lecture-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #39a89b); transition: width .35s ease; }
.lecture-chapter-dots { margin-top: 11px; display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
.lecture-dot { flex: 0 0 auto; width: 22px; height: 5px; border: 0; border-radius: 99px; background: #d5dfdc; padding: 0; transition: width .2s ease, background .2s ease; }
.lecture-dot.completed { background: #79bdb3; }
.lecture-dot.active { width: 40px; background: var(--teal); }
.lecture-dot.quiz { background: #d8bf65; }
.lecture-dot.quiz.completed { background: #779f54; }

.lecture-transport { min-height: 76px; padding: 13px 20px; display: flex; align-items: center; gap: 9px; background: var(--white); border-top: 1px solid var(--line); }
.lecture-control { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--navy); font-weight: 900; box-shadow: var(--shadow-small); transition: transform .15s ease, background .15s ease; }
.lecture-control:hover { transform: translateY(-1px); background: #f2f7f4; }
.lecture-control:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.lecture-control-primary { width: 52px; height: 52px; border: 0; background: var(--teal); color: var(--white); font-size: 17px; }
.lecture-control-primary:hover { background: var(--teal-dark); }
.lecture-transport-status { margin-left: auto; display: grid; gap: 3px; text-align: right; }
.lecture-transport-status strong { color: var(--navy); font-size: 11px; }
.lecture-transport-status small { color: var(--muted); font-size: 8px; }

.lecture-quiz { position: absolute; inset: 0; z-index: 5; padding: clamp(25px, 4vw, 48px); overflow-y: auto; background: linear-gradient(145deg, #ffffff 0%, #f4f8f6 100%); }
.lecture-quiz-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lecture-quiz-heading > div { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; }
.lecture-quiz-heading strong { color: var(--navy); }
.lecture-quiz h4 { max-width: 850px; margin: 22px 0 18px; color: var(--navy); font-size: clamp(20px, 2.5vw, 31px); line-height: 1.3; letter-spacing: -.025em; }
.lecture-quiz textarea { width: 100%; min-height: 120px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; background: var(--white); padding: 14px; color: var(--ink); }
.lecture-quiz-options { display: grid; gap: 8px; margin-bottom: 14px; }
.lecture-quiz-option { width: 100%; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); color: var(--ink); text-align: left; }
.lecture-quiz-option span { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: var(--mint); color: var(--teal-dark); font-weight: 900; }
.lecture-quiz-option.selected { border-color: var(--teal); background: #edf8f4; box-shadow: 0 0 0 2px rgba(13,118,110,.08); }
.lecture-quiz-actions { margin-top: 13px; display: flex; justify-content: space-between; gap: 10px; }
.lecture-hint-text { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--yellow); background: #fff9e7; color: #6b5515; font-size: 10px; line-height: 1.55; }
.lecture-quiz-result { margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); }
.lecture-result-heading { display: flex; align-items: center; gap: 12px; }
.lecture-result-score { width: 47px; height: 47px; flex: 0 0 47px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--teal-dark); font-weight: 900; }
.lecture-result-heading h5 { margin: 0 0 4px; color: var(--navy); font-size: 14px; }
.lecture-result-heading p, .lecture-quiz-result > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.lecture-quiz-result .button { margin-top: 13px; }

.lecture-final-actions { padding: 23px 25px; display: flex; justify-content: space-between; align-items: center; gap: 22px; background: #f7faf8; border-top: 1px solid var(--line); }
.lecture-final-actions .eyebrow { margin-bottom: 6px; }
.lecture-final-actions h3 { margin: 0; color: var(--navy); font-size: 20px; letter-spacing: -.025em; }
.lecture-final-actions p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.lecture-final-actions > div:last-child { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

/* Animated chemistry visuals created from lesson JSON */
.chem-visual { width: min(100%, 680px); min-height: 118px; display: flex; align-items: center; justify-content: center; gap: 20px; color: var(--navy); }
.chem-label { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.particle-box { width: 120px; height: 100px; position: relative; border: 2px solid #b9d0ca; border-radius: 12px; background: rgba(223,243,237,.5); }
.particle-dot { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: var(--teal); box-shadow: inset -2px -2px 0 rgba(0,0,0,.12); }
.particle-box.solid .particle-dot { animation: particleVibrate .45s ease-in-out infinite alternate; }
.particle-box.liquid .particle-dot { animation: particleDrift 3s ease-in-out infinite alternate; }
.particle-box.gas .particle-dot { animation: particleGas 2.7s linear infinite alternate; }
.chem-arrow { color: var(--teal); font-size: 28px; font-weight: 900; }
.diffusion-tube { width: min(500px, 92%); height: 92px; position: relative; overflow: hidden; border: 2px solid #b9d0ca; border-radius: 50px; background: linear-gradient(90deg, rgba(72,117,203,.17), transparent 45%, rgba(224,118,83,.17)); }
.diffusion-cloud { position: absolute; top: 15px; width: 78px; height: 58px; border-radius: 50%; filter: blur(1px); opacity: .78; animation: diffusionMove 4.8s ease-in-out infinite alternate; }
.diffusion-cloud.left { left: 15px; background: #6790d7; }
.diffusion-cloud.right { right: 15px; background: #df8566; animation-direction: alternate-reverse; }
.atom-visual { width: 160px; height: 160px; position: relative; }
.atom-nucleus { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; transform: translate(-50%,-50%); display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: #fff; font-size: 9px; font-weight: 900; box-shadow: 0 0 0 10px rgba(233,135,74,.12); }
.atom-orbit { position: absolute; inset: 13px; border: 2px solid rgba(13,118,110,.35); border-radius: 50%; transform: rotate(22deg); }
.atom-orbit.orbit-2 { inset: 37px; transform: rotate(-25deg); }
.atom-electron { position: absolute; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: #fff; font-size: 8px; animation: electronPulse 1.7s ease-in-out infinite; }
.ion-pair { display: flex; align-items: center; gap: 18px; }
.ion-sphere { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; font-size: 15px; }
.ion-sphere.positive { background: #e7dff7; color: #563e8a; box-shadow: 0 0 0 9px rgba(86,62,138,.08); }
.ion-sphere.negative { background: #d9eef3; color: #246271; box-shadow: 0 0 0 9px rgba(36,98,113,.08); }
.shared-pair { display: flex; align-items: center; gap: 4px; }
.covalent-atom { width: 86px; height: 86px; display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--teal); background: var(--mint); color: var(--navy); font-weight: 900; }
.shared-electrons { display: flex; gap: 4px; margin: 0 -13px; z-index: 2; }
.shared-electrons i { width: 13px; height: 13px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px #fff; }
.equation-flow, .mole-flow, .salt-flow { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.equation-token, .mole-step, .salt-step { min-width: 92px; padding: 13px; border: 1px solid #bdd1cc; border-radius: 11px; background: var(--white); text-align: center; box-shadow: var(--shadow-small); }
.equation-token strong, .mole-step strong, .salt-step strong { display: block; color: var(--navy); font-size: 13px; }
.equation-token small, .mole-step small, .salt-step small { color: var(--muted); font-size: 8px; }
.ph-scale { width: min(590px, 96%); display: grid; grid-template-columns: repeat(14,1fr); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-small); }
.ph-scale span { min-height: 54px; display: grid; place-items: center; color: rgba(255,255,255,.92); font-size: 9px; font-weight: 900; }
.recap-visual { display: flex; align-items: center; justify-content: center; gap: 13px; flex-wrap: wrap; }
.recap-chip { padding: 10px 13px; border-radius: 999px; background: var(--mint); color: var(--teal-dark); font-size: 10px; font-weight: 800; }
.intro-orbit { width: 150px; height: 150px; position: relative; display: grid; place-items: center; border: 2px solid rgba(13,118,110,.25); border-radius: 50%; }
.intro-orbit::before, .intro-orbit::after { content: ""; position: absolute; inset: 19px -19px; border: 2px solid rgba(13,118,110,.17); border-radius: 50%; transform: rotate(55deg); }
.intro-orbit::after { transform: rotate(-55deg); }
.intro-orbit strong { width: 80px; height: 80px; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: var(--lime); font-size: 13px; text-align: center; }
.quiz-visual { display: grid; place-items: center; gap: 10px; }
.quiz-visual span { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); color: var(--navy); font-size: 30px; font-weight: 900; box-shadow: 0 0 0 13px rgba(244,216,121,.17); }

@keyframes lecturePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(.82); } }
@keyframes haloBreathe { 0%,100% { transform: translateX(-50%) scale(.96); opacity: .74; } 50% { transform: translateX(-50%) scale(1.05); opacity: 1; } }
@keyframes tutorBreathing { 0%,100% { transform: translateY(0) scaleY(1); } 50% { transform: translateY(-2px) scaleY(1.006); } }
@keyframes tutorHeadFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -2px; } }
@keyframes tutorSpeaking { 0%,100% { transform: rotate(-.8deg) translateY(0); } 50% { transform: rotate(.8deg) translateY(-2px); } }
@keyframes tutorHandTalk { 0%,100% { transform: rotate(0deg); } 50% { transform: translate(-4px,-7px) rotate(-5deg); } }
@keyframes particleVibrate { from { transform: translate(-1px,0); } to { transform: translate(1px,-1px); } }
@keyframes particleDrift { from { transform: translate(-2px,2px); } to { transform: translate(7px,-5px); } }
@keyframes particleGas { from { transform: translate(-7px,-4px); } to { transform: translate(12px,8px); } }
@keyframes diffusionMove { from { transform: translateX(0) scale(.8); } to { transform: translateX(150px) scale(1.45); } }
@keyframes electronPulse { 0%,100% { transform: scale(.92); } 50% { transform: scale(1.12); } }

@media (prefers-reduced-motion: reduce) {
  .lecture-player *, .lecture-player *::before, .lecture-player *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media (max-width: 1080px) {
  .lecture-stage { grid-template-columns: minmax(0,1.35fr) minmax(245px,.65fr); }
  .lecture-slide-card { margin-left: 18px; }
  .lecture-avatar-svg { width: 285px; }
}

@media (max-width: 820px) {
  .lecture-toolbar { align-items: flex-start; display: grid; }
  .lecture-settings { justify-content: flex-start; }
  .lecture-settings label { flex: 1 1 135px; }
  .lecture-settings select { width: 100%; }
  .lecture-stage { min-height: 720px; grid-template-columns: 1fr; grid-template-rows: minmax(420px,auto) 300px; }
  .lecture-slide-card { min-height: 400px; margin: 16px 16px 0; }
  .lecture-slide-copy { min-height: 400px; padding: 25px; }
  .avatar-stage { min-height: 300px; justify-content: flex-end; }
  .avatar-halo { width: 230px; height: 230px; top: 35px; }
  .lecture-avatar-svg { width: 235px; height: 300px; }
  .avatar-alignment { top: 13px; left: 14px; right: auto; max-width: 270px; }
  .avatar-expression-label { bottom: 8px; }
  .lecture-caption-bar { min-height: 83px; }
  .lecture-screen { min-height: 790px; }
  .lecture-quiz { padding: 25px; }
  .lecture-final-actions { display: grid; }
  .lecture-final-actions > div:last-child { justify-content: flex-start; }
}

@media (max-width: 540px) {
  .lecture-toolbar { padding: 13px; }
  .lecture-mode-label small { max-width: 260px; }
  .lecture-settings { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .lecture-settings label:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .lecture-stage { grid-template-rows: minmax(455px,auto) 270px; }
  .lecture-slide-card { margin: 10px 10px 0; }
  .lecture-slide-copy { padding: 21px; }
  .lecture-slide-card h3 { font-size: 28px; }
  .lecture-slide-bullets li { font-size: 11px; }
  .lecture-visual { min-height: 110px; overflow: hidden; }
  .particle-box { width: 83px; height: 82px; }
  .chem-visual { gap: 9px; }
  .lecture-caption-bar { padding: 12px; grid-template-columns: 1fr; gap: 7px; }
  .caption-speaker { justify-self: start; }
  .lecture-transport { padding: 10px; gap: 6px; }
  .lecture-control { width: 39px; height: 39px; }
  .lecture-control-primary { width: 48px; height: 48px; }
  .lecture-transport-status { display: none; }
  .lecture-start-card { padding: 25px 19px; }
  .lecture-start-card h3 { font-size: 24px; }
  .lecture-quiz { padding: 21px; }
  .lecture-quiz-actions { display: grid; }
  .lecture-quiz-actions .button { width: 100%; }
  .lecture-final-actions > div:last-child { display: grid; }
  .lecture-final-actions .button { width: 100%; }
}

/* Consented tutor voice and portrait onboarding */
.status-ready, .status-recorded { background: var(--mint); color: var(--teal-dark); }
.status-creating { background: #e7eef9; color: #30547e; }
.status-provider-access-required { background: #fff2cc; color: #775a07; }
.status-failed, .status-revoked { background: #fce0df; color: #8b3030; }
.status-not-started { background: #e8edf0; color: #42545d; }
.media-intro { margin-bottom: 20px; grid-template-columns: minmax(0,1fr) minmax(250px,.52fr); }
.media-intro h3 { margin: 5px 0 9px; font-size: 25px; }
.media-intro p { max-width: 760px; }
.media-guardrails { display: grid; gap: 8px; align-content: center; }
.media-guardrails strong { color: var(--lime); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.media-guardrails span { position: relative; padding: 8px 11px 8px 29px; border: 1px solid rgba(255,255,255,.13); border-radius: 9px; background: rgba(255,255,255,.05); color: rgba(255,255,255,.88); font-size: 10px; }
.media-guardrails span::before { content: "✓"; position: absolute; left: 10px; color: var(--lime); font-weight: 900; }
.media-onboarding-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: start; }
.media-step { min-height: 100%; }
.media-step > p { color: var(--muted); font-size: 10px; line-height: 1.6; }
.avatar-upload-preview { min-height: 270px; margin: 14px 0; display: grid; place-items: center; overflow: hidden; border: 1px dashed #afc6c0; border-radius: 16px; background: linear-gradient(145deg,#f5faf8,#e4f1ed); }
.avatar-upload-preview img { width: 100%; max-height: 360px; object-fit: contain; }
.media-placeholder { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); }
.media-placeholder span { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: var(--teal-dark); font-size: 32px; }
.media-upload-form { display: grid; gap: 12px; }
.consent-check { grid-template-columns: 18px minmax(0,1fr) !important; align-items: start; gap: 8px !important; color: var(--ink) !important; font-size: 10px !important; font-weight: 600 !important; text-transform: none !important; letter-spacing: 0 !important; line-height: 1.5; }
.consent-check input { width: 17px; height: 17px; margin-top: 1px; }
.voice-script { margin: 14px 0; padding: 15px 17px; border-left: 4px solid var(--teal); border-radius: 0 12px 12px 0; background: #eef7f4; color: var(--navy); font-size: 12px; font-weight: 750; line-height: 1.6; }
.recorder-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.recorder-controls > span { min-width: 44px; color: var(--navy); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 800; }
.recorder-controls audio, .media-step > audio { width: min(100%,360px); height: 38px; }
.media-file-fallback { margin-top: 12px; }
.media-file-fallback input { margin-top: 6px; }
.media-submit-box { margin-top: 20px; padding: 16px; border: 1px solid #c5d9d3; border-radius: 13px; background: #f5faf8; }
.media-submit-box strong { color: var(--navy); font-size: 12px; }
.media-submit-box p { margin: 6px 0 13px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.admin-media-preview { display: grid; grid-template-columns: minmax(140px,220px) minmax(0,1fr); gap: 18px; align-items: start; }
.admin-media-preview img { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: #eaf4f1; }
.admin-media-preview audio { width: min(100%,370px); height: 36px; }
.media-review-card .booking-actions:has(audio) { display: grid; justify-content: stretch; }

/* Photo-based 2D tutor puppet. Facial anchors are assigned as CSS variables. */
.lecture-avatar-photo {
  --left-eye-x: 36%; --left-eye-y: 39%; --right-eye-x: 64%; --right-eye-y: 39%;
  --eye-width: 15%; --mouth-x: 50%; --mouth-y: 69%; --mouth-width: 28%; --mouth-height: 8%; --brow-offset: 7%;
  position: relative; z-index: 2; width: min(330px,92%); aspect-ratio: 1; margin-bottom: 26px;
  overflow: hidden; border-radius: 43% 43% 27% 27% / 39% 39% 22% 22%;
  border: 3px solid rgba(255,255,255,.22); background: #123944;
  box-shadow: 0 19px 36px rgba(2,19,25,.38);
  animation: tutorBreathing 4s ease-in-out infinite;
}
.lecture-avatar-photo img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.portrait-lid, .portrait-brow, .portrait-mouth { position: absolute; z-index: 3; display: block; transform-origin: center; pointer-events: none; }
.portrait-lid { width: var(--eye-width); height: calc(var(--eye-width) * .52); border-radius: 50% 50% 48% 48%; background: rgba(155,100,74,.96); opacity: 0; }
.portrait-lid-left { left: calc(var(--left-eye-x) - var(--eye-width) / 2); top: calc(var(--left-eye-y) - var(--eye-width) * .23); }
.portrait-lid-right { left: calc(var(--right-eye-x) - var(--eye-width) / 2); top: calc(var(--right-eye-y) - var(--eye-width) * .23); }
.lecture-avatar-photo.is-blinking .portrait-lid { opacity: 1; animation: portraitBlink .17s ease-in-out; }
.portrait-brow { width: calc(var(--eye-width) * 1.12); height: 4px; border-radius: 999px; background: rgba(48,29,24,.88); }
.portrait-brow-left { left: calc(var(--left-eye-x) - var(--eye-width) * .56); top: calc(var(--left-eye-y) - var(--brow-offset)); transform: rotate(-4deg); }
.portrait-brow-right { left: calc(var(--right-eye-x) - var(--eye-width) * .56); top: calc(var(--right-eye-y) - var(--brow-offset)); transform: rotate(4deg); }
.portrait-mouth {
  left: calc(var(--mouth-x) - var(--mouth-width) / 2); top: calc(var(--mouth-y) - var(--mouth-height) / 2);
  width: var(--mouth-width); height: var(--mouth-height); overflow: hidden; border-radius: 48% 48% 55% 55%;
  background: #3d1718; border: 2px solid rgba(73,27,29,.72); transform: scaleY(var(--mouth-open, .2));
  transition: transform 70ms linear, border-radius 120ms ease;
}
.portrait-teeth { position: absolute; left: 8%; right: 8%; top: 0; height: 34%; border-radius: 0 0 45% 45%; background: #f8f2e9; opacity: .96; }
.portrait-tongue { position: absolute; left: 22%; right: 22%; bottom: -2%; height: 31%; border-radius: 50% 50% 0 0; background: #bb5861; }
.lecture-avatar-photo.is-speaking { animation: tutorSpeaking 1.1s ease-in-out infinite; }
.lecture-avatar-photo[data-expression="welcome"] .portrait-mouth,
.lecture-avatar-photo[data-expression="celebrate"] .portrait-mouth { border-radius: 30% 30% 65% 65%; }
.lecture-avatar-photo[data-expression="thinking"] .portrait-brow-left { transform: translateY(-4px) rotate(-10deg); }
.lecture-avatar-photo[data-expression="thinking"] .portrait-brow-right { transform: translateY(2px) rotate(7deg); }
.lecture-avatar-photo[data-expression="emphasis"] .portrait-brow-left,
.lecture-avatar-photo[data-expression="emphasis"] .portrait-brow-right { transform: translateY(-4px); }
.lecture-avatar-photo[data-expression="caution"] .portrait-brow-left { transform: rotate(12deg); }
.lecture-avatar-photo[data-expression="caution"] .portrait-brow-right { transform: rotate(-12deg); }
.avatar-disclosure { position: relative; z-index: 4; max-width: 290px; margin: 1px 12px 9px; color: rgba(234,245,241,.69); font-size: 8px; line-height: 1.4; text-align: center; }
#lecture-audio { display: none; }
@keyframes portraitBlink { 0%,100% { transform: scaleY(.1); } 50% { transform: scaleY(1); } }

@media (max-width: 1050px) {
  .media-onboarding-grid { grid-template-columns: 1fr; }
  .media-intro { grid-template-columns: 1fr; }
  .admin-media-preview { grid-template-columns: 180px minmax(0,1fr); }
}
@media (max-width: 820px) {
  .lecture-avatar-photo { width: 235px; margin-bottom: 14px; }
}
@media (max-width: 600px) {
  .admin-media-preview { grid-template-columns: 1fr; }
  .admin-media-preview img { max-width: 260px; }
  .recorder-controls { display: grid; }
}

/* Detailed AI mini-lecture panel */
.lecture-explanation-panel { margin: 18px 0 14px; padding: 16px; border: 1px solid #cfe2dc; border-radius: 15px; background: linear-gradient(145deg,#f7fcfa,#eef7f4); box-shadow: 0 12px 30px rgba(12,45,54,.06); }
.lecture-explanation-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.lecture-explanation-heading small,.lecture-teaching-card small { display:block; margin-bottom:4px; color:var(--teal-dark); font-size:8px; font-weight:900; letter-spacing:.12em; }
.lecture-explanation-heading strong { color:var(--navy); font-size:12px; }
.lecture-explanation-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.lecture-explanation-actions button { border:1px solid #b9d8cf; border-radius:999px; background:#fff; padding:7px 10px; color:var(--teal-dark); font-size:8px; font-weight:800; cursor:pointer; }
.lecture-explanation-actions button:hover { background:var(--mint); }
.lecture-explanation-actions button:disabled { opacity:.55; cursor:wait; }
.lecture-explanation-copy { margin:13px 0 0; color:#243b42; font-size:10.5px; line-height:1.65; white-space:pre-line; }
.lecture-teaching-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.lecture-teaching-card,.lecture-exam-card,.lecture-mistake-card,.lecture-check-card { border-radius:11px; padding:11px 12px; background:rgba(255,255,255,.86); border:1px solid rgba(117,158,148,.22); }
.lecture-teaching-card ul,.lecture-teaching-card ol { margin:5px 0 0 17px; padding:0; color:#344c52; font-size:9.5px; line-height:1.55; }
.lecture-exam-card,.lecture-mistake-card,.lecture-check-card { margin-top:9px; }
.lecture-exam-card strong,.lecture-mistake-card strong,.lecture-check-card strong { display:block; color:var(--navy); font-size:9px; }
.lecture-exam-card p,.lecture-mistake-card p,.lecture-check-card p { margin:4px 0 0; color:#42575d; font-size:9.5px; line-height:1.55; }
.lecture-exam-card { border-left:4px solid var(--teal); }
.lecture-mistake-card { border-left:4px solid #c66d46; background:#fff8f4; }
.lecture-check-card { border-left:4px solid #c9a126; background:#fffbea; }
@media (max-width:680px) { .lecture-explanation-heading{display:grid}.lecture-explanation-actions{justify-content:flex-start}.lecture-teaching-grid{grid-template-columns:1fr} }

/* Subject-neutral visuals for Mathematics and Physics lecture slides. */
.subject-visual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 190px;
  padding: 1.2rem;
}
.subject-token {
  min-width: 82px;
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: .75rem;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
  text-align: center;
}
.subject-token strong { font-size: clamp(1.05rem, 2.1vw, 1.65rem); }
.math-visual .subject-token { transform: rotate(calc((var(--token-angle, 0)) * 1deg)); }
.physics-visual .subject-token { border-radius: 50%; min-width: 78px; }
.subject-visual-hint {
  flex-basis: 100%;
  max-width: 560px;
  text-align: center;
  color: var(--muted, #52606d);
  line-height: 1.45;
}
.course-switcher {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: .25rem 0 .7rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.course-switcher select {
  min-width: min(420px, 72vw);
  background: rgba(255,255,255,.96);
  color: #17212b;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 12px;
  padding: .58rem .75rem;
}

/* Public marketing presentation link on landing and login screens. */
.presentation-link, .auth-presentation-link, .login-presentation-link {
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}
.presentation-link:hover, .auth-presentation-link:hover, .login-presentation-link:hover { text-decoration: underline; }
.auth-presentation-link {
  display: inline-flex;
  margin-top: 16px;
  color: var(--white);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 10px 14px;
}
.login-presentation-link { display: inline-flex; margin-top: 6px; }
