:root {
  color-scheme: light;
  --paper: #f6f5f1;
  --surface: #ffffff;
  --surface-muted: #f0f1ec;
  --ink: #20312f;
  --muted: #687774;
  --line: #e3e8e1;
  --brand: #236b5d;
  --brand-dark: #174f45;
  --brand-pale: #e5f1eb;
  --gold: #d49b3b;
  --gold-pale: #fbf1dc;
  --blue: #526b8f;
  --blue-pale: #eaf0f8;
  --danger: #a9453f;
  --shadow: 0 18px 45px rgba(40, 57, 51, .08);
  font-family: "DM Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 0; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.app-root { min-height: 100vh; }
.loading-card { width: min(420px, calc(100% - 32px)); margin: 18vh auto; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: center; color: var(--muted); }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.1fr); background: #f7f6f2; }
.auth-intro { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(32px, 6vw, 84px); color: #f6f6ef; background: #1d4e45; position: relative; overflow: hidden; }
.auth-intro::after { content: ""; position: absolute; width: 420px; height: 420px; right: -190px; bottom: -190px; border: 1px solid rgba(236, 219, 172, .28); border-radius: 50%; box-shadow: 0 0 0 42px rgba(236, 219, 172, .07), 0 0 0 84px rgba(236, 219, 172, .05); }
.auth-brand { display: flex; align-items: center; gap: 12px; font-family: Manrope, sans-serif; font-weight: 800; letter-spacing: -.03em; font-size: 19px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 12px; color: #f3dca9; font-family: Georgia, serif; font-size: 22px; }
.brand-mark svg { width: 22px; height: 22px; display: block; }
.auth-copy { position: relative; z-index: 1; max-width: 530px; padding: 70px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 700; color: #98b8a6; }
.auth-copy h1 { margin: 16px 0; font: 800 clamp(36px, 4vw, 56px)/1.08 Manrope, sans-serif; letter-spacing: -.045em; }
.auth-copy p { max-width: 480px; color: #d5e2d8; font-size: 16px; line-height: 1.7; }
.auth-foot { color: #a8c2b4; font-size: 12px; z-index: 1; }
.auth-panel { display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card h2 { margin: 0 0 8px; font: 800 26px Manrope, sans-serif; letter-spacing: -.035em; }
.auth-card > p { margin: 0 0 24px; color: var(--muted); line-height: 1.55; }
.form-stack { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field label { color: #435650; font-size: 13px; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #d9e1db; border-radius: 10px; outline: none; background: #fff; color: var(--ink); }
.field input:focus, .field textarea:focus { border-color: #63a28e; box-shadow: 0 0 0 3px rgba(35, 107, 93, .12); }
.field small { color: var(--muted); line-height: 1.45; }
.form-error { min-height: 20px; color: var(--danger); font-size: 13px; }
.auth-switch { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.text-button { border: 0; padding: 0; background: none; color: var(--brand); font-weight: 700; }

.layout { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 23px 16px 18px; border-right: 1px solid var(--line); background: #fff; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 11px 26px; font: 800 17px Manrope, sans-serif; letter-spacing: -.04em; }
.sidebar-brand .brand-mark { width: 34px; height: 34px; background: var(--brand); border-color: var(--brand); color: #fff3d0; font-size: 20px; }
.nav-label { padding: 15px 12px 8px; color: #9aa7a2; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-list { display: grid; gap: 5px; }
.nav-button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: #65736f; text-align: left; font-size: 13px; font-weight: 600; transition: .16s ease; }
.nav-button:hover { background: #f5f7f4; color: var(--ink); }
.nav-button.active { background: var(--brand-pale); color: var(--brand-dark); }
.nav-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.sidebar-spacer { flex: 1; }
.sidebar-note { margin: 16px 5px; padding: 15px; border: 1px solid #e7ede7; border-radius: 14px; background: #f8faf7; }
.sidebar-note strong { display: block; margin-bottom: 5px; font-size: 12px; }
.sidebar-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.profile-row { display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid var(--line); }
.avatar { width: 34px; height: 34px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #dcebe2; color: var(--brand-dark); font-weight: 800; font-size: 12px; }
.profile-copy { min-width: 0; flex: 1; }
.profile-copy strong, .profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 12px; }
.profile-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.icon-button { border: 0; background: transparent; color: var(--muted); padding: 6px; }
.main-area { min-width: 0; }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.76); }
.topbar-left { color: var(--muted); font-size: 12px; }
.topbar-left strong { color: var(--ink); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.today-label { color: var(--muted); font-size: 12px; }
.mobile-brand, .mobile-nav { display: none; }
.content { width: min(1320px, 100%); margin: 0 auto; padding: 33px clamp(20px, 4vw, 54px) 60px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 27px; }
.page-heading h1 { margin: 5px 0 6px; font: 800 clamp(25px, 3vw, 34px)/1.16 Manrope, sans-serif; letter-spacing: -.05em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.heading-actions { display: flex; gap: 9px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; font-weight: 700; transition: .15s ease; }
.button-primary { background: var(--brand); color: white; }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { border-color: var(--line); background: white; color: var(--ink); }
.button-secondary:hover { border-color: #bbcec2; background: #fafcf9; }
.button-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.button-quiet:hover { background: var(--surface-muted); color: var(--ink); }
.button-danger { border-color: #f0d7d5; background: #fff8f7; color: var(--danger); }
.button:disabled { cursor: not-allowed; opacity: .55; }

.welcome-panel { min-height: 218px; display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 20px; padding: 30px 36px; }
.welcome-copy { position: relative; z-index: 1; max-width: 590px; }
.welcome-copy .eyebrow { color: #c8dfcf; }
.welcome-copy h2 { margin: 10px 0 9px; font: 800 clamp(24px, 3vw, 32px)/1.14 Manrope, sans-serif; letter-spacing: -.04em; }
.welcome-copy p { margin: 0; max-width: 510px; color: #d9e7dc; font-size: 14px; line-height: 1.6; }
.welcome-panel .button { position: relative; z-index: 1; flex: 0 0 auto; border-color: rgba(255,255,255,.35); background: #f4e7c3; color: #2d463d; }
.welcome-panel .button:hover { background: #fff2cd; }
.welcome-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 9px; }
.welcome-panel .button-outline-light { border-color: rgba(255,255,255,.36); background: rgba(255,255,255,.1); color: white; }
.welcome-panel .button-outline-light:hover { background: rgba(255,255,255,.18); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 24px; }
.stat-card { min-height: 113px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.stat-value { margin-top: 11px; font: 800 25px Manrope, sans-serif; letter-spacing: -.04em; }
.stat-foot { margin-top: 3px; color: #8a9993; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .8fr); gap: 18px; }
.panel { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.panel-header { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.panel-header h2 { margin: 0; font: 800 16px Manrope, sans-serif; letter-spacing: -.02em; }
.panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.small-link { border: 0; padding: 0; background: none; color: var(--brand); font-size: 12px; font-weight: 700; white-space: nowrap; }
.unit-list { display: grid; gap: 10px; }
.unit-card { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1px solid #e9eee8; border-radius: 12px; background: #fcfdfb; text-align: left; }
.unit-dot { width: 44px; height: 39px; display: grid; flex: 0 0 44px; place-items: center; border-radius: 12px; background: var(--brand-pale); color: var(--brand-dark); font-size: 10px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; }
.unit-copy { min-width: 0; flex: 1; text-align: left; }
.unit-copy strong { display: block; font-size: 12px; line-height: 1.4; }
.unit-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.unit-arrow { color: #9aa8a0; font-size: 20px; }
.weak-list { display: grid; gap: 14px; }
.weak-item { display: grid; gap: 7px; }
.weak-title { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.weak-title span:last-child { color: var(--muted); font-weight: 700; }
.topic-progress, .quiz-bar { display: block; width: 100%; height: 8px; overflow: hidden; appearance: none; border: 0; border-radius: 99px; background: #edf0eb; accent-color: #5d9e83; }
.topic-progress::-webkit-progress-bar, .quiz-bar::-webkit-progress-bar { border-radius: 99px; background: #edf0eb; }
.topic-progress::-webkit-progress-value, .quiz-bar::-webkit-progress-value { border-radius: 99px; background: #5d9e83; }
.topic-progress::-moz-progress-bar, .quiz-bar::-moz-progress-bar { border-radius: 99px; background: #5d9e83; }
.weak-item:nth-child(1) .topic-progress { accent-color: #d48e58; }
.weak-item:nth-child(1) .topic-progress::-webkit-progress-value { background: #d48e58; }
.weak-item:nth-child(1) .topic-progress::-moz-progress-bar { background: #d48e58; }
.empty-note { padding: 15px; border-radius: 11px; background: #f7f9f6; color: var(--muted); font-size: 12px; line-height: 1.55; }
.recent-list { display: grid; }
.recent-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid #eef0ec; }
.recent-result { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-pale); color: var(--brand-dark); font-size: 12px; font-weight: 800; }
.recent-copy { min-width: 0; flex: 1; }
.recent-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.recent-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.recent-points { color: #9b732c; font-size: 11px; font-weight: 700; }

.course-grid, .exam-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.course-card { padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.course-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.course-code { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.course-card h2 { margin: 6px 0; font: 800 18px Manrope, sans-serif; letter-spacing: -.03em; }
.course-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.course-chapters { display: grid; gap: 7px; margin-top: 17px; }
.chapter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid #edf0ec; border-radius: 9px; background: #fcfdfb; }
.chapter-row span { min-width: 0; font-size: 11px; line-height: 1.35; }
.chapter-row small { display: block; margin-top: 3px; color: #7d8992; font-size: 10px; font-weight: 500; line-height: 1.35; }
.chapter-row button { flex: 0 0 auto; border: 0; padding: 5px 8px; border-radius: 7px; background: var(--brand-pale); color: var(--brand-dark); font-size: 10px; font-weight: 700; }
.chapter-row button:disabled { background: #f2f3f0; color: #9ba6a0; cursor: default; }
.badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 99px; background: var(--brand-pale); color: var(--brand-dark); font-size: 10px; font-weight: 800; }
.badge-muted { background: #f0f2ef; color: #687774; }
.exam-card { display: flex; flex-direction: column; min-height: 230px; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.exam-card-head { display: flex; justify-content: space-between; gap: 10px; }
.exam-card h2 { margin: 15px 0 7px; font: 800 17px Manrope, sans-serif; letter-spacing: -.03em; }
.exam-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.exam-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 14px 0 18px; color: #82908b; font-size: 10px; }
.exam-card .button { margin-top: auto; align-self: flex-start; }
.library-note { margin-top: 20px; padding: 16px; border-left: 3px solid var(--gold); border-radius: 8px; background: #fffaf0; color: #6d6049; font-size: 12px; line-height: 1.6; }

.quiz-shell { max-width: 850px; margin: 0 auto; }
.quiz-progress { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.quiz-progress .quiz-bar { flex: 1; }
.quiz-progress span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.question-card { padding: clamp(20px, 4vw, 32px); border: 1px solid var(--line); border-radius: 17px; background: white; box-shadow: 0 8px 28px rgba(40,57,51,.04); }
.question-card h2 { margin: 8px 0 22px; font: 800 clamp(20px, 3vw, 25px)/1.35 Manrope, sans-serif; letter-spacing: -.035em; }
.question-options { display: grid; gap: 9px; }
.option-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border: 1px solid #e1e7e1; border-radius: 11px; background: #fff; text-align: left; color: #3a4b46; font-size: 13px; line-height: 1.45; }
.option-button:hover { border-color: #a8c4b5; background: #fbfdfb; }
.option-button.selected { border-color: #5b9b82; background: var(--brand-pale); color: var(--brand-dark); }
.option-key { width: 25px; height: 25px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid #dce4dd; border-radius: 7px; background: white; color: #72817b; font-size: 11px; font-weight: 800; }
.quiz-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 23px; }
.result-score { display: flex; align-items: center; gap: 19px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.section-spaced { margin-top: 18px; }
.review-section { margin-top: 23px; }
.invite-notice { margin-top: 18px; }
.score-circle { width: 82px; height: 82px; display: grid; flex: 0 0 auto; place-items: center; border: 7px solid #d8ecdf; border-radius: 50%; color: var(--brand-dark); font: 800 19px Manrope, sans-serif; }
.result-score h2 { margin: 0 0 5px; font: 800 19px Manrope, sans-serif; }
.result-score p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.answer-review { display: grid; gap: 10px; margin-top: 17px; }
.answer-card { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.answer-card.correct { border-left: 3px solid #5b9b72; }
.answer-card.incorrect { border-left: 3px solid #c57963; }
.answer-card h3 { margin: 0 0 8px; font: 700 13px/1.5 Manrope, sans-serif; }
.answer-card p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.answer-status { color: #4d8261; font-size: 10px; font-weight: 800; }
.answer-card.incorrect .answer-status { color: var(--danger); }

.history-table { width: 100%; border-collapse: collapse; }
.history-table th { padding: 11px 9px; color: #82908b; text-align: left; font-size: 10px; font-weight: 700; }
.history-table td { padding: 13px 9px; border-top: 1px solid #edf0ec; font-size: 12px; }
.score-pill { display: inline-flex; min-width: 52px; justify-content: center; padding: 6px 8px; border-radius: 8px; background: var(--brand-pale); color: var(--brand-dark); font-size: 11px; font-weight: 800; }
.table-wrap { overflow-x: auto; }

.chat-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 16px; }
.chat-panel { min-height: 580px; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.chat-header h2 { margin: 0; font: 800 15px Manrope, sans-serif; }
.live-status { display: inline-flex; align-items: center; gap: 7px; color: #5d766b; font-size: 10px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #5aab78; box-shadow: 0 0 0 3px #e8f4ec; }
.live-status.reconnecting .live-dot { background: #d49b3b; box-shadow: 0 0 0 3px #fbf1dc; }
.chat-messages { display: flex; flex: 1; flex-direction: column; gap: 11px; min-height: 380px; max-height: 58vh; overflow: auto; padding: 18px 20px; background: #fafbf9; }
.chat-message { max-width: min(82%, 530px); align-self: flex-start; padding: 10px 12px; border: 1px solid #e7ece6; border-radius: 4px 13px 13px 13px; background: white; box-shadow: 0 2px 7px rgba(20,45,33,.025); }
.chat-message.mine { align-self: flex-end; border-color: #d4e7da; border-radius: 13px 4px 13px 13px; background: #eaf4ed; }
.chat-message.deleted { color: #88948e; font-style: italic; }
.chat-message-top { display: flex; align-items: baseline; gap: 9px; margin-bottom: 4px; }
.chat-message-top strong { color: var(--brand-dark); font-size: 10px; }
.chat-message.mine .chat-message-top strong { color: #3e735c; }
.chat-message-top time { color: #a0aaa5; font-size: 9px; }
.chat-message-body { white-space: pre-wrap; overflow-wrap: anywhere; color: #40524c; font-size: 12px; line-height: 1.5; }
.chat-delete { float: right; margin-left: 8px; border: 0; padding: 0; background: transparent; color: #a1aaa5; font-size: 10px; }
.chat-form { display: flex; gap: 9px; padding: 13px 15px; border-top: 1px solid var(--line); background: white; }
.chat-form input { min-width: 0; flex: 1; padding: 11px 12px; border: 1px solid #dfe6df; border-radius: 10px; outline: 0; }
.chat-form input:focus { border-color: #7aab95; box-shadow: 0 0 0 3px rgba(35,107,93,.1); }
.online-panel { align-self: start; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.online-panel h3 { margin: 0 0 13px; font: 800 13px Manrope, sans-serif; }
.online-list { display: grid; gap: 11px; }
.online-person { display: flex; align-items: center; gap: 8px; color: #5a6964; font-size: 11px; }
.online-person .live-dot { width: 6px; height: 6px; }
.online-foot { margin: 15px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: #8a9791; font-size: 10px; line-height: 1.5; }

.invite-card { max-width: 650px; }
.invite-result { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 17px; padding: 15px; border: 1px solid #dbe9df; border-radius: 11px; background: #f4faf5; }
.invite-result code { overflow-wrap: anywhere; color: var(--brand-dark); font-size: 14px; font-weight: 800; letter-spacing: .05em; }
.notice { padding: 12px 14px; border-radius: 10px; background: #f6f7f3; color: var(--muted); font-size: 11px; line-height: 1.5; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; max-width: min(380px, calc(100% - 32px)); padding: 13px 16px; border-radius: 11px; background: #244e43; color: #fff; box-shadow: var(--shadow); font-size: 12px; animation: rise .18s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1040px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-intro { min-height: 245px; padding: 24px; }
  .auth-copy { padding: 35px 0 15px; }
  .auth-copy h1 { font-size: 34px; }
  .auth-foot { display: none; }
  .auth-panel { padding: 22px 16px 40px; }
  .auth-card { padding: 25px 22px; }
  .layout { display: block; padding-bottom: 70px; }
  .sidebar { display: none; }
  .topbar { height: 62px; padding: 0 18px; }
  .topbar-left { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 9px; font: 800 15px Manrope, sans-serif; }
  .mobile-brand .brand-mark { width: 29px; height: 29px; border-radius: 9px; background: var(--brand); color: #fff3d0; border-color: var(--brand); font-size: 17px; }
  .today-label { display: none; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 7px 6px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
  .mobile-nav .nav-button { min-height: 52px; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 3px; font-size: 9px; }
  .content { padding: 24px 16px 35px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .heading-actions { width: 100%; }
  .welcome-panel { align-items: flex-start; flex-direction: column; padding: 23px; }
  .welcome-actions { align-items: flex-start; flex-direction: column; }
  .welcome-panel .button { align-self: flex-start; }
  .stat-grid { gap: 0; }
  .stat-card { min-height: 94px; padding: 12px 10px; }
  .stat-card:nth-child(odd) { border-right: 1px solid #eadfd1; }
  .stat-card:nth-child(even) { border-right: 0; }
  .stat-card:nth-child(-n+2) { border-bottom: 1px solid #eadfd1; }
  .stat-head { font-size: 10px; }
  .stat-value { font-size: 22px; }
  .course-grid, .exam-grid { grid-template-columns: 1fr; }
  .chat-grid { grid-template-columns: 1fr; }
  .online-panel { order: -1; }
  .online-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-panel { min-height: 520px; }
  .chat-messages { max-height: 50vh; }
  .chat-form { padding: 10px; }
  .chat-form .button { padding: 9px 11px; }
  .history-table th:nth-child(2), .history-table td:nth-child(2) { display: none; }
}

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

/* A warmer, more human study space: paper, clay and a little sunlight. */
:root {
  --paper: #fbf3e8;
  --surface: #fffaf2;
  --surface-muted: #f6eadb;
  --ink: #3e302e;
  --muted: #806d67;
  --line: #eadbcc;
  --brand: #bd5e49;
  --brand-dark: #8c453d;
  --brand-pale: #fae4d8;
  --gold: #c58d2e;
  --gold-pale: #fbefce;
  --blue: #706393;
  --blue-pale: #eee8f5;
  --danger: #aa4f50;
  --shadow: 0 18px 48px rgba(103, 66, 43, .09);
}

body {
  background:
    radial-gradient(ellipse at 91% 3%, rgba(249, 211, 168, .28), transparent 34rem),
    var(--paper);
}
button, input, textarea, select { color: var(--ink); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(189, 94, 73, .32);
  outline-offset: 2px;
}
.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; }

.auth-page { background: #fbf2e7; }
.auth-intro {
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 250, 227, .72) 0 7%, transparent 7.2%),
    radial-gradient(ellipse at 15% 105%, rgba(222, 133, 104, .34), transparent 48%),
    linear-gradient(142deg, #f7e0ae 0%, #f4d4bb 55%, #f1c8b7 100%);
}
.auth-intro::after {
  width: 390px; height: 390px; right: -160px; bottom: -210px;
  border-color: rgba(131, 81, 59, .16);
  box-shadow: 0 0 0 42px rgba(255, 255, 255, .12), 0 0 0 84px rgba(255, 255, 255, .09);
}
.auth-brand { color: #573d38; }
.auth-brand .brand-mark { border-color: rgba(125, 77, 56, .28); color: #964e3d; background: rgba(255, 250, 241, .48); }
.auth-copy .eyebrow { color: #925742; }
.auth-copy h1 { max-width: 540px; color: #493430; }
.auth-copy p { color: #6e534a; }
.auth-foot { color: #815e50; }
.auth-panel { background: rgba(255, 250, 242, .62); }
.auth-card { border-color: #ead8c7; background: rgba(255, 251, 244, .96); box-shadow: 0 25px 60px rgba(117, 74, 49, .1); }
.auth-card > p, .field small { color: #806d67; }
.field label { color: #594540; }
.field input, .field textarea, .field select { border-color: #e7d6c6; background: #fffdf9; }
.field input:focus, .field textarea:focus { border-color: #ca8067; box-shadow: 0 0 0 3px rgba(189, 94, 73, .13); }
.text-button { color: var(--brand-dark); }

.sidebar { border-color: #eadbcc; background: #fff9f0; }
.sidebar-brand { color: #4c3935; font: 700 17px Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.sidebar-brand .brand-mark, .mobile-brand .brand-mark { border-color: var(--brand); background: var(--brand); color: #fff3d9; }
.sidebar-brand .brand-mark { width: 34px; height: 34px; border-radius: 7px; }
.sidebar-brand .brand-mark svg, .mobile-brand .brand-mark svg { width: 19px; height: 19px; }
.nav-label { color: #ae9788; }
.nav-button { color: #765f56; }
.nav-list { gap: 1px; }
.nav-button { position: relative; border-radius: 5px; }
.nav-button:hover { background: rgba(225, 209, 191, .28); color: #513a35; }
.nav-button.active { background: transparent; color: #8c453d; }
.nav-button.active::before { position: absolute; top: 8px; bottom: 8px; left: 0; width: 2px; background: #bd7658; content: ""; }
.sidebar-note { border: 0; border-left: 2px solid #c59756; border-radius: 0 8px 8px 0; background: #f5eddf; }
.avatar { background: #f1d6c3; color: #75483d; }
.profile-row { border-color: #eadbcc; }
.topbar { border-color: #eadbcc; background: #faf5eb; }
.topbar-left strong { color: #493632; }
.content { padding-top: 36px; }
.page-heading h1, .panel-header h2, .course-card h2, .exam-card h2, .question-card h2, .auth-card h2 { color: #493632; }
.eyebrow { color: #aa6c55; }

.button-primary { background: #bd5e49; color: #fffaf2; }
.button-primary:hover { background: #994b3e; }
.button-secondary { border-color: #e8d8c8; background: #fffaf2; }
.button-secondary:hover { border-color: #d5b49e; background: #fff3e4; }
.button-quiet:hover { background: #f7e8d9; }
.small-link { color: #a34f40; }
.welcome-panel {
  min-height: 186px;
  padding: clamp(24px, 3vw, 35px);
  border: 0;
  border-left: 3px solid #bd7658;
  border-radius: 0 12px 12px 0;
  background: #f4eadb;
  color: #473632;
}
.welcome-copy { max-width: 690px; }
.welcome-copy .eyebrow { color: #8f6550; }
.welcome-copy h2 { color: #493632; font: 700 clamp(25px, 2.8vw, 34px)/1.16 Georgia, "Times New Roman", serif; letter-spacing: -.03em; }
.welcome-copy p { color: #715d52; }
.welcome-panel .button { border-color: #ad5e48; background: #ad5e48; color: #fffaf2; box-shadow: none; }
.welcome-panel .button:hover { background: #914b3a; }
.welcome-panel .button-outline-light { border-color: #bba18a; background: transparent; color: #674c40; }
.welcome-panel .button-outline-light:hover { background: rgba(255,255,255,.48); }
.stat-card, .panel, .course-card, .exam-card, .question-card, .online-panel, .answer-card, .result-score {
  border-color: #eadbcc;
  background: #fffaf2;
  box-shadow: 0 5px 18px rgba(111, 70, 43, .035);
}
.stat-grid { gap: 0; border-top: 1px solid #ddcdb9; border-bottom: 1px solid #ddcdb9; }
.stat-card { min-height: 0; padding: 14px 20px 15px; border: 0; border-right: 1px solid #eadfd1; border-radius: 0; background: transparent; box-shadow: none; }
.stat-card:last-child { border-right: 0; }
.stat-head { display: block; color: #756359; font-size: 11px; }
.stat-value { margin-top: 8px; color: #493632; font: 700 27px/1 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.stat-foot { margin-top: 4px; color: #88776b; font-size: 10px; }
.panel { border-radius: 13px; box-shadow: none; }
.unit-card { border-color: #eddfd0; background: #fffdf8; }
.unit-dot { background: #fae1d4; color: #9b4b3d; }
.unit-arrow { color: #c28c69; }
.topic-progress, .quiz-bar { background: #f0e5d8; accent-color: #c66f55; }
.topic-progress::-webkit-progress-bar, .quiz-bar::-webkit-progress-bar { background: #f0e5d8; }
.topic-progress::-webkit-progress-value, .quiz-bar::-webkit-progress-value { background: #c66f55; }
.topic-progress::-moz-progress-bar, .quiz-bar::-moz-progress-bar { background: #c66f55; }
.empty-note { background: #f9efe2; color: #79645b; }
.recent-row, .history-table td { border-color: #efe3d6; }
.recent-result, .score-pill { background: #fae4d8; color: #8c453d; }
.recent-points { color: #9a702c; }
.course-code, .badge { color: #914c40; }
.badge { background: #fae4d8; }
.badge-muted { background: #f2eadd; color: #7e6a62; }
.course-card h2, .exam-card h2 { color: #493632; }
.chapter-row { border-color: #efe2d4; background: #fffdf8; }
.chapter-row button { background: #fae4d8; color: #8c453d; }
.chapter-row button:disabled { background: #f3ece3; color: #ac9b8d; }
.library-note { border-left-color: #d7a23f; background: #fbf0d5; color: #705a37; }
.question-card { box-shadow: 0 12px 30px rgba(111, 70, 43, .06); }
.option-button { border-color: #eadbcc; background: #fffdf8; color: #594740; }
.option-button:hover { border-color: #d9a68d; background: #fff8ef; }
.option-button.selected { border-color: #ca8067; background: #fae6db; color: #81453b; }
.option-key { border-color: #eadbcc; color: #8a7165; }
.score-circle { border-color: #f2dcc8; color: #90483e; }
.answer-card.correct { border-left-color: #9baf6a; }
.answer-card.incorrect { border-left-color: #cb795f; }
.answer-status { color: #687d50; }
.history-table th { color: #9b8275; }
.chat-messages { background: #fbf2e7; }
.chat-message { border-color: #eddccb; background: #fffaf2; box-shadow: 0 3px 10px rgba(93, 61, 41, .04); }
.chat-message.mine { border-color: #edcdbb; background: #fae8dc; }
.chat-message-top strong, .chat-message.mine .chat-message-top strong { color: #8e4a3f; }
.chat-message-body { color: #594741; }
.chat-form { border-color: #eadbcc; background: #fffaf2; }
.chat-form input { border-color: #e7d6c6; background: #fffdf9; }
.chat-form input:focus { border-color: #ca8067; box-shadow: 0 0 0 3px rgba(189, 94, 73, .11); }
.online-panel h3 { color: #493632; }
.invite-result { border-color: #ead6bd; background: #fff3df; }
.invite-result code { color: #80493b; }
.notice { background: #f9efe2; color: #79645b; }
.toast { background: #75483e; }

.activity-panel { padding-bottom: 18px; }
.activity-total { color: #9a7160; font-size: 12px; font-weight: 700; }
.activity-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 11px; height: 116px; padding: 0 8px; }
.activity-day { display: grid; grid-template-rows: 22px 1fr 18px; justify-items: center; gap: 4px; min-width: 0; }
.activity-count, .activity-label { color: #9a8276; font-size: 10px; }
.activity-track { display: flex; align-items: end; width: 100%; max-width: 45px; height: 100%; overflow: hidden; border-radius: 9px 9px 4px 4px; background: #f7ecdf; }
.activity-fill { display: block; width: 100%; height: 7%; border-radius: inherit; background: #eadac8; }
.activity-fill.level-1 { height: 20%; }
.activity-fill.level-2 { height: 40%; }
.activity-fill.level-3 { height: 60%; }
.activity-fill.level-4 { height: 80%; }
.activity-fill.level-5 { height: 100%; }
.activity-fill.has-activity { background: linear-gradient(180deg, #e09b6b, #c75d49); }

.exam-filters { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(170px, .7fr)); gap: 10px; margin-bottom: 17px; }
.search-field, .filter-select { min-width: 0; }
.search-field { position: relative; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid #eadbcc; border-radius: 11px; background: #fffaf2; color: #ad806c; }
.search-field > span:not(.sr-only) { font-size: 21px; line-height: 1; }
.search-field input, .filter-select select { width: 100%; min-height: 44px; border: 0; outline: 0; background: transparent; color: #594740; font-size: 12px; }
.search-field:focus-within, .filter-select select:focus-visible { border-color: #ca8067; box-shadow: 0 0 0 3px rgba(189, 94, 73, .1); }
.filter-select select { padding: 0 12px; border: 1px solid #eadbcc; border-radius: 11px; background: #fffaf2; }
.exam-card { min-height: 250px; border-radius: 17px; }
.exam-last-result { margin: auto 0 14px; padding: 10px 11px; border-radius: 9px; background: #f9efe2; color: #806c61; font-size: 10px; line-height: 1.5; }
.exam-last-result strong { color: #8c453d; font-size: 12px; }
.exam-last-result span { color: #a28c7d; }
.exam-card .button { margin-top: 0; }
.exam-empty { grid-column: 1 / -1; padding: 24px; }
.timer-pill { display: inline-flex; margin-top: 12px; padding: 7px 10px; border: 1px solid #edd4bf; border-radius: 99px; background: #fff1db; color: #80533e; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer-pill.urgent { border-color: #e6b3a3; background: #fae2d9; color: #9f423e; }
.question-map { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.question-step { width: 35px; height: 35px; border: 1px solid #eadbcc; border-radius: 11px; background: #fffaf2; color: #826b60; font-size: 11px; font-weight: 800; }
.question-step.answered { border-color: #e4b99f; background: #f8e6d9; color: #914c40; }
.question-step.current { outline: 2px solid #c8775d; outline-offset: 2px; }
.answer-count { align-self: center; color: #9b8275; font-size: 11px; }
.retry-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 17px 20px; border: 1px solid #efd1b4; border-radius: 15px; background: linear-gradient(110deg, #fbefd5, #fae4d8); }
.retry-banner strong { color: #6f493d; font-size: 13px; }
.retry-banner p { margin: 4px 0 0; color: #896e5e; font-size: 11px; }
.retry-banner-good { border-color: #e8dfc7; background: #f9f2dc; }

.author-panel { border-color: #e7d4c0; }
.editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.editor-wide { grid-column: 1 / -1; }
.question-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 27px 0 13px; }
.question-editor-heading h3 { margin: 0; font-size: 15px; }
.question-editor-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.question-editor { position: relative; min-width: 0; margin: 0 0 12px; padding: 17px; border: 1px solid #ecdaca; border-radius: 14px; background: #fffdf8; }
.question-editor legend { padding: 0 7px; color: #8e4d40; font-size: 12px; font-weight: 800; }
.question-editor .field label, .question-editor .field > span { font-size: 11px; }
.question-editor .field input, .question-editor .field textarea, .question-editor .field select { min-height: 40px; font-size: 12px; }
.question-editor .field textarea { resize: vertical; }
.remove-question { position: absolute; top: 13px; right: 14px; border: 0; background: transparent; color: #a76e5f; font-size: 10px; font-weight: 700; }
.editor-actions, .admin-exam-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.admin-exam-list { display: grid; gap: 9px; }
.admin-exam-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; border-top: 1px solid #efe2d4; }
.admin-exam-copy { min-width: 0; }
.admin-exam-copy h3 { margin: 9px 0 4px; color: #493632; font: 800 14px Manrope, sans-serif; }
.admin-exam-copy p { margin: 0; color: #8a7569; font-size: 10px; }
.admin-exam-actions { flex: 0 0 auto; align-items: center; }
.badge-live { background: #f6e8bf; color: #806126; }
.muted-cell { color: #a28c7d; font-size: 10px; }
.resume-card { display: grid; grid-template-columns: 58px 1fr; align-items: center; gap: 14px 17px; max-width: 720px; padding: 26px; border: 1px solid #edcfb4; border-radius: 18px; background: linear-gradient(125deg, #fff7e8, #fae4d8); box-shadow: 0 10px 28px rgba(111, 70, 43, .05); }
.resume-mark { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: #f2d39e; color: #925340; font-size: 29px; font-weight: 800; }
.resume-card h2 { margin: 0 0 5px; color: #503b35; font: 800 19px Manrope, sans-serif; }
.resume-card p { margin: 0; color: #806b60; font-size: 12px; line-height: 1.55; }
.resume-actions { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 4px; }

@media (max-width: 760px) {
  .auth-intro { min-height: 260px; padding: 24px; }
  .auth-copy { padding: 31px 0 12px; }
  .auth-copy h1 { font-size: 34px; }
  .auth-foot { display: block; font-size: 11px; }
  .auth-panel { background: #fbf3e8; }
  .topbar { background: #faf5eb; }
  .mobile-nav { border-color: #eadbcc; background: #faf5eb; }
  .mobile-nav-admin { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .mobile-nav .nav-button { color: #80695f; }
  .mobile-nav .nav-button.active { background: transparent; color: #8c453d; box-shadow: inset 0 -2px #bd7658; }
  .welcome-panel { min-height: 0; padding: 23px; }
  .welcome-copy h2 { font-size: 27px; }
  .welcome-actions { position: relative; }
  .exam-filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-wide { grid-column: auto; }
  .admin-exam-row { align-items: flex-start; flex-direction: column; }
  .admin-exam-actions { width: 100%; }
  .retry-banner { align-items: flex-start; flex-direction: column; }
  .activity-chart { gap: 5px; }
  .resume-card { grid-template-columns: 44px minmax(0, 1fr); gap: 11px; padding: 19px; }
  .resume-mark { width: 44px; height: 44px; border-radius: 14px; }
  .resume-actions { grid-column: 1 / -1; align-items: stretch; flex-direction: column; }
  .resume-actions .button { width: 100%; }
  .quiz-actions { flex-wrap: wrap; }
  .answer-count { order: 3; width: 100%; text-align: center; }
}

/* Account personalization and meaningful, low-pressure learning rewards. */
.avatar-trigger { padding: 0; border: 1px solid #e5c6ad; cursor: pointer; }
.avatar-trigger:hover { outline: 3px solid rgba(189, 94, 73, .16); }
.rewards-panel { border-color: #ddcdb9; border-radius: 14px; background: #fffdf8; box-shadow: none; }

/* Give the course index a clear first step, then reveal only the chosen area. */
.home-learning-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.home-learning-card { display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; gap: 2px 10px; align-items: center; min-width: 0; padding: 11px; border: 1px solid #eddfd0; border-radius: 11px; background: #fffdf8; color: #493632; text-align: left; transition: border-color .16s ease, background .16s ease; }
.home-learning-card:hover, .home-learning-card:focus-visible { border-color: #d6ad95; background: #fff8ef; }
.home-learning-mark { grid-column: 1; grid-row: 1 / span 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #fae4d8; color: #914c40; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.home-learning-copy { grid-column: 2; grid-row: 1; min-width: 0; }
.home-learning-copy strong, .home-learning-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-learning-copy strong { font-size: 11px; line-height: 1.35; }
.home-learning-copy small { margin-top: 2px; color: #806d67; font-size: 10px; }
.home-learning-count { grid-column: 2; grid-row: 2; color: #9b7462; font-size: 9px; }
.home-learning-arrow { grid-column: 3; grid-row: 1 / span 2; color: #bd7658; font-size: 20px; }
.learning-group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; max-width: 1080px; }
.learning-group-card { display: grid; grid-template-columns: 54px minmax(0, 1fr) 20px; gap: 0 16px; align-items: center; min-height: 142px; padding: 20px; border: 1px solid #eadbcc; border-radius: 15px; background: #fffaf2; color: #493632; text-align: left; box-shadow: 0 5px 18px rgba(111, 70, 43, .035); transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.learning-group-card:hover { transform: translateY(-2px); border-color: #d7b49d; background: #fffdf8; }
.learning-group-card:focus-visible, .home-learning-card:focus-visible, .learning-course-summary:focus-visible { outline: 3px solid rgba(189, 94, 73, .28); outline-offset: 2px; }
.learning-group-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 15px; background: #fae4d8; color: #914c40; font: 700 14px Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.learning-group-copy { display: grid; gap: 4px; min-width: 0; }
.learning-group-course-names { color: #a56550; font-size: 10px; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.learning-group-copy strong { color: #493632; font: 700 19px/1.2 Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.learning-group-copy small { color: #806d67; font-size: 11px; line-height: 1.45; }
.learning-group-meta { margin-top: 5px; color: #947e70; font-size: 10px; }
.learning-group-arrow { color: #bd7658; font-size: 21px; transition: transform .16s ease; }
.learning-group-card:hover .learning-group-arrow { transform: translateX(3px); }
.learning-course-grid { align-items: start; }
.learning-course { min-width: 0; overflow: hidden; padding: 0; }
.learning-course[open] { border-color: #dfc9b5; }
.learning-course-summary { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto 18px; gap: 0 14px; align-items: center; min-height: 92px; padding: 18px; cursor: pointer; list-style: none; }
.learning-course-summary::-webkit-details-marker { display: none; }
.learning-course-mark { grid-column: 1; grid-row: 1; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: #fae4d8; color: #914c40; font-size: 10px; font-weight: 800; }
.learning-course-copy { grid-column: 2; grid-row: 1; display: grid; gap: 4px; min-width: 0; }
.learning-course-copy strong { color: #493632; font: 700 17px/1.2 Georgia, "Times New Roman", serif; }
.learning-course-copy small { color: #806d67; font-size: 10px; line-height: 1.4; }
.learning-course-summary .badge { grid-column: 3; grid-row: 1; white-space: nowrap; }
.learning-course-chevron { grid-column: 4; grid-row: 1; color: #bd7658; font-size: 19px; transition: transform .16s ease; }
.learning-course[open] .learning-course-chevron { transform: rotate(180deg); }
.learning-course .course-chapters { margin: 0; padding: 0 18px 18px; border-top: 1px solid #efe2d4; }
.learning-course .course-chapter-pack { padding-top: 10px; }
.learning-course .chapter-row { min-height: 45px; }
.learning-course .chapter-row span { font-size: 11px; }

@media (max-width: 760px) {
  .home-learning-grid, .learning-group-grid, .learning-course-grid { grid-template-columns: 1fr; }
  .learning-group-card { min-height: 126px; padding: 17px; }
  .learning-group-copy strong { font-size: 18px; }
  .learning-course-summary { grid-template-columns: 42px minmax(0, 1fr) 18px; grid-template-rows: auto auto; gap: 5px 12px; padding: 14px; }
  .learning-course-mark { grid-column: 1; grid-row: 1 / span 2; width: 40px; height: 40px; }
  .learning-course-copy { grid-column: 2; grid-row: 1; }
  .learning-course-summary .badge { grid-column: 2; grid-row: 2; justify-self: start; }
  .learning-course-chevron { grid-column: 3; grid-row: 1 / span 2; }
  .learning-course .course-chapters { padding: 0 12px 14px; }
  .learning-course .chapter-row { align-items: flex-start; }
}
.reward-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; padding-bottom: 15px; border-bottom: 1px solid #eadfd1; }
.reward-heading h2 { margin: 4px 0 5px; color: #493632; font: 700 23px/1.2 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.reward-heading p { margin: 0; color: #715f55; font-size: 13px; line-height: 1.5; }
.reward-total { flex: 0 0 auto; display: flex; align-items: baseline; gap: 4px; padding: 0 2px 4px; border-bottom: 2px solid #bf7658; color: #766154; font-size: 12px; }
.reward-total strong { color: #493632; font: 700 25px Georgia, "Times New Roman", serif; }
.reward-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; margin: 0; padding: 0; list-style: none; }
.reward-card { min-width: 0; display: grid; grid-template-columns: 37px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px 0; border: 0; border-bottom: 1px solid #eee5da; border-radius: 0; background: transparent; }
.reward-mark { align-self: start; padding-top: 2px; color: #a56b52; font: 700 13px/1.2 Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reward-card.unlocked .reward-mark { color: #647851; }
.reward-copy { min-width: 0; }
.reward-copy strong, .reward-copy > span { display: block; }
.reward-copy strong { color: #493c35; font-size: 13px; font-weight: 750; }
.reward-copy > span { margin-top: 3px; color: #786b60; font-size: 12px; line-height: 1.45; }
.reward-state { color: #806b5f; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reward-card.unlocked .reward-state { color: #57704d; }

.profile-panel { max-width: 960px; padding: clamp(20px, 4vw, 34px); }
.profile-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; }
.profile-preview { align-self: start; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 16px; border-radius: 16px; background: linear-gradient(145deg, #fff3df, #f9e7dc); color: #694b40; text-align: center; }
.profile-preview strong { margin-top: 4px; font-size: 16px; }
.profile-preview > span:last-child { color: #806d62; font-size: 12px; }
.profile-avatar-large { width: 84px; height: 84px; border: 3px solid #fffaf3; font-size: 42px; box-shadow: 0 4px 15px rgba(117, 74, 49, .1); }
.profile-fields { display: grid; align-content: start; gap: 20px; }
.avatar-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.avatar-field legend { color: #594540; font-size: 13px; font-weight: 700; }
.avatar-field p { margin: 6px 0 12px; color: #806d67; font-size: 12px; }
.avatar-picker { display: grid; grid-template-columns: repeat(5, minmax(42px, 52px)); gap: 9px; }
.avatar-option { width: 48px; height: 48px; border: 1px solid #eadbcc; border-radius: 14px; background: #fffaf2; font-size: 23px; transition: .15s ease; }
.avatar-option:hover { transform: translateY(-2px); border-color: #d4a98d; }
.avatar-option.selected { border: 2px solid #bd5e49; background: #f8e2d7; box-shadow: 0 0 0 3px rgba(189, 94, 73, .12); }
.account-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.account-details > div { display: grid; gap: 4px; padding: 12px 14px; border-radius: 10px; background: #f8efe4; }
.account-details span { color: #806d67; font-size: 11px; }
.account-details strong { color: #594540; font-size: 13px; overflow-wrap: anywhere; }
.profile-form-error { min-height: 0; }
.profile-note { max-width: 960px; margin-top: 15px; padding: 13px 16px; border-radius: 11px; background: #f8efe4; color: #756157; font-size: 12px; line-height: 1.55; }

/* Keep utility labels readable while preserving their quieter visual role. */
.profile-copy small, .live-status, .chat-delete, .answer-status, .remove-question { font-size: 11px; }
.stat-foot, .unit-copy small, .recent-copy small, .recent-points, .chapter-row span,
.exam-meta, .exam-last-result, .exam-last-result span, .history-table th,
.chat-message-top strong, .online-foot, .notice, .activity-count, .activity-label,
.muted-cell, .question-editor-heading p, .question-editor .field label,
.question-editor .field > span, .admin-exam-copy p { font-size: 12px; }
.course-code, .badge { font-size: 11px; }
.nav-label { font-size: 11px; }
.activity-count, .activity-label, .exam-meta, .recent-copy small, .stat-foot,
.profile-copy small, .admin-exam-copy p, .online-foot, .muted-cell { color: #79645a; }

@media (min-width: 1600px) {
  .content { width: min(1680px, 100%); padding-right: clamp(44px, 4vw, 72px); padding-left: clamp(44px, 4vw, 72px); }
  .welcome-panel { min-height: 186px; padding: 34px 40px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.55fr) minmax(340px, .8fr); gap: 22px; }
  .stat-grid { gap: 0; }
  .stat-card { min-height: 0; padding: 17px 22px; }
  .panel { padding: 26px; }
}

@media (max-width: 760px) {
  .mobile-nav .nav-button { font-size: 10px; }
  .stat-head { font-size: 11px; }
  .reward-grid { grid-template-columns: 1fr; column-gap: 0; }
  .reward-card { grid-template-columns: 37px minmax(0, 1fr) auto; gap: 10px; padding: 12px 0; }
  .reward-heading h2 { font-size: 22px; }
  .reward-copy strong { font-size: 13px; }
  .reward-copy > span { font-size: 12px; }
  .reward-state { font-size: 11px; }
  .profile-layout { grid-template-columns: 1fr; gap: 20px; }
  .profile-preview { flex-direction: row; justify-content: flex-start; text-align: left; padding: 14px; }
  .profile-avatar-large { width: 58px; height: 58px; font-size: 30px; }
  .avatar-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .avatar-option { width: 100%; height: 46px; }
  .account-details { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .reward-grid { grid-template-columns: 1fr; }
  .reward-card { grid-template-columns: 34px minmax(0, 1fr); }
  .reward-state { grid-column: 2; margin-top: -4px; }
  .account-details { grid-template-columns: 1fr; }
  .mobile-nav { padding-right: 2px; padding-left: 2px; }
  .mobile-nav .nav-button { padding-right: 1px; padding-left: 1px; font-size: 9px; }
}

.auth-help { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #eadbcc; color: #806d67; font-size: 12px; }
.help-trigger { min-height: 36px; padding: 6px 11px; gap: 7px; font-size: 12px; }
.help-mark { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--gold-pale); color: #7e5720; font-weight: 800; }
.help-dialog { width: min(680px, calc(100% - 24px)); max-height: min(86vh, 820px); margin: auto; padding: 0; overflow: hidden; border: 1px solid #ead8c7; border-radius: 20px; background: #fffaf2; color: #493632; box-shadow: 0 28px 90px rgba(49, 35, 28, .3); }
.help-dialog::backdrop { background: rgba(44, 37, 33, .52); backdrop-filter: blur(3px); }
.help-dialog-header { position: sticky; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 22px clamp(18px, 4vw, 30px) 17px; border-bottom: 1px solid #eadbcc; background: #fffaf2; }
.help-dialog-header .eyebrow { color: #925742; }

.excel-intro { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 15px; margin-bottom: 15px; padding: 18px 21px; border: 1px solid #e9d6be; border-left: 3px solid #bd7658; border-radius: 0 12px 12px 0; background: #f5eddf; }
.excel-intro-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: #f3dcc5; color: #8f5543; font-size: 25px; }
.excel-intro strong { color: #503b35; font: 700 15px Georgia, "Times New Roman", serif; }
.excel-intro p { max-width: 760px; margin: 5px 0 0; color: #80695c; font-size: 12px; line-height: 1.55; }
.excel-progress { display: grid; gap: 3px; min-width: 112px; padding-left: 15px; border-left: 1px solid #dfcdb9; color: #8b7060; font-size: 10px; }
.excel-progress strong { color: #8e4a3f; font: 700 22px Georgia, "Times New Roman", serif; }
.excel-progress small { color: #a58c7a; font: 400 12px Arial, sans-serif; }
.excel-module-list { display: grid; gap: 9px; }
.excel-module { overflow: clip; border: 1px solid #e9dac7; border-radius: 12px; background: #fffaf2; }
.excel-module[open] { border-color: #d9b99f; box-shadow: 0 5px 18px rgba(111, 70, 43, .045); }
.excel-module > summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 20px; align-items: center; gap: 13px; min-height: 78px; padding: 14px 18px; cursor: pointer; list-style: none; }
.excel-module > summary::-webkit-details-marker { display: none; }
.excel-level { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 50%; background: #f6e6d5; color: #8d4e3e; font: 700 12px Georgia, "Times New Roman", serif; }
.excel-module-heading { min-width: 0; display: grid; gap: 4px; }
.excel-module-heading strong { color: #503b35; font: 700 16px Georgia, "Times New Roman", serif; }
.excel-module-heading small { color: #847166; font-size: 11px; line-height: 1.45; }
.excel-module-result { color: #92796a; font-size: 11px; white-space: nowrap; }
.excel-chevron { color: #b2765e; font-size: 20px; transition: transform .15s ease; }
.excel-module[open] .excel-chevron { transform: rotate(180deg); }
.excel-module-body { padding: 0 18px 18px; border-top: 1px solid #efe4d7; }
.excel-function-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding-top: 14px; }
.excel-function { min-width: 0; padding: 15px; border: 1px solid #efe2d3; border-radius: 9px; background: #fffdf8; }
.excel-function-name { display: grid; gap: 4px; margin-bottom: 11px; }
.excel-function-name span, .excel-syntax > span { color: #a07f6c; font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.excel-function-name strong { color: #6f4438; font: 700 16px Georgia, "Times New Roman", serif; }
.excel-syntax { display: grid; gap: 6px; margin-bottom: 13px; }
.excel-syntax code { display: block; width: 100%; overflow-wrap: anywhere; padding: 9px 10px; border: 1px solid #ecdfd1; border-radius: 7px; background: #f7f0e7; color: #60463b; font: 12px/1.5 Consolas, monospace; }
.excel-function dl { display: grid; gap: 9px; margin: 0; }
.excel-function dl > div { padding-top: 8px; border-top: 1px solid #f0e7dd; }
.excel-function dt { margin-bottom: 3px; color: #89664f; font-size: 10px; font-weight: 700; }
.excel-function dd { margin: 0; color: #66574d; font-size: 12px; line-height: 1.55; }
.excel-function .excel-common-mistake dt { color: #a05c49; }
.excel-function .excel-correction dt { color: #6d8056; }
.excel-module-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 13px; border-top: 1px solid #eadbcc; color: #8b7567; font-size: 11px; }
.excel-module-footer .button { flex: 0 0 auto; }
.excel-references { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 18px; margin-top: 16px; padding: 14px 16px; border-top: 1px solid #e8d9c8; color: #806c5e; font-size: 10px; line-height: 1.5; }
.excel-references p { width: 100%; margin: 0 0 1px; }
.excel-references a { color: #9a5142; font-weight: 700; text-decoration: underline; text-decoration-color: #d8b5a0; text-underline-offset: 3px; }
.answer-feedback { margin-top: 11px; padding: 11px 12px; border-radius: 8px; }
.answer-feedback strong { display: block; margin-bottom: 4px; font-size: 11px; }
.answer-feedback p { margin: 0; font-size: 12px; line-height: 1.55; }
.answer-feedback-mistake { border-left: 2px solid #bd7658; background: #fbefe5; color: #70564b; }
.answer-feedback-mistake strong { color: #9a5142; }
.answer-feedback-correct { border-left: 2px solid #98a873; background: #f3f3e8; color: #5e674b; }
.answer-feedback-correct strong { color: #68784e; }
.option-feedback-editor { grid-column: 1 / -1; margin-top: -4px; padding: 0 11px 9px; border: 1px solid #efdfcf; border-radius: 8px; background: #fffaf3; }
.option-feedback-editor summary { padding: 9px 0; color: #8c5d49; cursor: pointer; font-size: 11px; font-weight: 700; }
.option-feedback-editor .field span { color: #796357; font-size: 11px; }

@media (max-width: 760px) {
  .excel-intro { grid-template-columns: 42px minmax(0, 1fr); gap: 11px; padding: 14px; }
  .excel-intro-mark { width: 40px; height: 40px; font-size: 22px; }
  .excel-progress { grid-column: 2; display: flex; align-items: baseline; gap: 7px; min-width: 0; padding: 8px 0 0; border-top: 1px solid #dfcdb9; border-left: 0; }
  .excel-progress strong { font-size: 18px; }
  .excel-module > summary { grid-template-columns: 35px minmax(0, 1fr) 18px; gap: 10px; min-height: 72px; padding: 12px; }
  .excel-level { width: 33px; height: 33px; }
  .excel-module-heading strong { font-size: 14px; }
  .excel-module-result { grid-column: 2; grid-row: 2; white-space: normal; }
  .excel-chevron { grid-column: 3; grid-row: 1 / 3; }
  .excel-module-body { padding: 0 12px 13px; }
  .excel-function-grid { grid-template-columns: 1fr; }
  .excel-module-footer { align-items: flex-start; flex-direction: column; }
  .excel-module-footer .button { width: 100%; }
  .excel-references { gap: 9px 13px; }
}

@media (min-width: 1500px) {
  .excel-function-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.help-dialog-header h2 { margin: 5px 0 4px; font: 800 clamp(20px, 3vw, 25px)/1.2 Manrope, sans-serif; letter-spacing: -.035em; }
.help-dialog-header p { margin: 0; color: #806d67; font-size: 13px; line-height: 1.45; }
.help-close { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #eadbcc; border-radius: 50%; background: #fff; color: #654c43; font-size: 24px; line-height: 1; }
.help-close:hover { background: #f7e8d9; }
.help-dialog-body { display: grid; gap: 10px; max-height: calc(min(86vh, 820px) - 108px); padding: 18px clamp(18px, 4vw, 30px) 26px; overflow-y: auto; overscroll-behavior: contain; }
.help-topic { padding: 14px 16px; border: 1px solid #eadbcc; border-radius: 13px; background: #fff; }
.help-topic h3 { margin: 0 0 6px; color: #493632; font: 750 14px/1.35 Manrope, sans-serif; }
.help-topic p, .help-contact p { margin: 0; color: #6e5c55; font-size: 13px; line-height: 1.6; }
.help-topic strong, .help-contact strong { color: #493632; }
.help-contact { padding: 14px 16px; border: 1px solid #e9cfaa; border-radius: 13px; background: #fff3db; }
.help-contact > strong { display: block; margin-bottom: 5px; font-size: 13px; }

@media (max-width: 760px) {
  .topbar-right { gap: 7px; }
  .today-label { display: none; }
  .help-trigger { min-height: 34px; padding: 5px 8px; }
  .help-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 20px); border-radius: 16px; }
  .help-dialog-body { max-height: calc(100dvh - 130px); padding: 14px 14px 20px; }
  .help-dialog-header { padding: 17px 14px 14px; }
  .help-topic, .help-contact { padding: 12px 13px; }
}

/* Public learning-room landing page: course-led, with a printed-workbook feel. */
.landing-page {
  min-height: 100vh;
  overflow: hidden;
  background: #faf5eb;
}
.landing-header {
  width: min(1400px, 100%);
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 76px);
  border-bottom: 1px solid #e7dbca;
}
.landing-brand, .landing-brand-small {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #4c3935;
  font: 700 17px Georgia, "Times New Roman", serif;
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
}
.landing-brand .brand-mark, .landing-brand-small .brand-mark {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 7px;
  background: #bd5e49;
  color: #fff8e8;
  box-shadow: none;
}
.landing-brand .brand-mark svg, .landing-brand-small .brand-mark svg { width: 21px; height: 21px; }
.landing-nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 38px); }
.landing-nav a {
  color: #735e55;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
.landing-nav a:hover { color: #994b3e; }
.landing-nav .landing-nav-cta {
  display: inline-flex;
  min-height: 43px;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid #bd5e49;
  border-radius: 7px;
  background: #bd5e49;
  color: #fffaf2;
  box-shadow: none;
}
.landing-nav .landing-nav-cta:hover { background: #994b3e; color: #fffaf2; }
.landing-hero {
  width: min(1400px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .78fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  margin: 0 auto;
  padding: clamp(34px, 5vw, 68px) clamp(20px, 5vw, 76px) clamp(62px, 7vw, 98px);
}
.landing-intro { min-width: 0; max-width: 700px; }
.landing-kicker, .landing-section-heading .eyebrow {
  display: inline-block;
  color: #8a6551;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.45;
  text-transform: uppercase;
}
.landing-intro h1 {
  margin: 15px 0 15px;
  color: #493632;
  font: 700 clamp(39px, 4.8vw, 62px)/1.06 Georgia, "Times New Roman", serif;
  letter-spacing: -.04em;
}
.landing-intro h1 span { color: #985940; font-style: italic; font-weight: 400; }
.landing-intro > p {
  max-width: 570px;
  margin: 0;
  color: #66564d;
  font-size: 15px;
  line-height: 1.68;
}
.lesson-note { max-width: 620px; margin-top: 27px; padding: 18px 22px 16px; border: 1px solid #dfd1be; border-left: 3px solid #bd7658; background: #fffdf8; box-shadow: 3px 4px 0 rgba(99, 75, 55, .06); }
.lesson-note-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; color: #8b6650; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.lesson-note > p { margin: 14px 0 13px; color: #493a33; font: 17px/1.48 Georgia, "Times New Roman", serif; }
.lesson-note-footer { padding-top: 10px; border-top: 1px solid #eee5d8; color: #827266; font-size: 10px; line-height: 1.5; }
.landing-hero .auth-panel { min-width: 0; padding: 0; background: transparent; }
.landing-hero .auth-card {
  position: relative;
  width: min(480px, 100%);
  justify-self: center;
  padding: clamp(23px, 3vw, 34px);
  border: 1px solid #ddcfbd;
  border-top: 3px solid #bd7658;
  border-radius: 3px 3px 10px 10px;
  background: #fffdf8;
  box-shadow: 4px 5px 0 rgba(99, 75, 55, .055);
}
.landing-hero .auth-card h2 { font: 700 25px Georgia, "Times New Roman", serif; }
.landing-hero .auth-card > p { margin-bottom: 21px; color: #76675c; font-size: 13px; }
.landing-hero .form-stack { gap: 13px; }
.landing-hero .field { gap: 6px; }
.landing-hero .field label { font-size: 12px; }
.landing-hero .field input { min-height: 45px; border-radius: 6px; }
.landing-hero .button-primary { width: 100%; min-height: 46px; justify-content: space-between; padding: 12px 15px; border-radius: 6px; }
.landing-hero .auth-switch { margin-top: 15px; font-size: 12px; }
.landing-hero .auth-help { margin-top: 16px; padding-top: 13px; font-size: 11px; }
.landing-features {
  padding: clamp(55px, 7vw, 86px) clamp(20px, 5vw, 76px) clamp(64px, 8vw, 94px);
  border-top: 1px solid #e5d7c4;
  background: #f5eee2;
}
.landing-section-heading { max-width: 1050px; margin: 0 auto 24px; text-align: left; }
.landing-section-heading h2 { margin: 8px 0 6px; color: #493632; font: 700 clamp(27px, 3vw, 36px)/1.15 Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.landing-section-heading p { max-width: 590px; margin: 0; color: #715c54; font-size: 13px; line-height: 1.65; }
.landing-feature-grid { width: min(1050px, 100%); margin: 0 auto; border-top: 1px solid #ddcfbd; }
.landing-feature {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(145px, auto);
  align-items: center;
  gap: 10px 20px;
  padding: 17px 4px;
  border: 0;
  border-bottom: 1px solid #ddcfbd;
  background: transparent;
}
.feature-step { grid-row: 1 / span 2; align-self: start; padding-top: 3px; color: #985940; font: 700 15px Georgia, "Times New Roman", serif; }
.landing-feature h3 { margin: 0 0 4px; color: #493632; font: 700 17px/1.3 Georgia, "Times New Roman", serif; }
.landing-feature p { margin: 0; color: #715c54; font-size: 12px; line-height: 1.6; }
.landing-feature a { justify-self: end; grid-column: 3; grid-row: 1 / span 2; color: #834939; font-size: 11px; font-weight: 700; text-decoration: none; }
.landing-feature a:hover { text-decoration: underline; text-underline-offset: 3px; }
.landing-feature a span { margin-left: 4px; }
.landing-footer {
  width: min(1280px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto;
  padding: 22px clamp(20px, 5vw, 76px) 28px;
  color: #806d67;
  font-size: 11px;
  line-height: 1.5;
}
.landing-brand-small { gap: 8px; font-size: 12px; }
.landing-brand-small .brand-mark { width: 26px; height: 26px; border-radius: 9px; font-size: 16px; }
.landing-info-links { display: flex; flex-wrap: wrap; gap: 14px; }
.landing-info-links a { color: #806d67; font-size: 11px; text-decoration: none; }
.landing-info-links a:hover { color: #834939; text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 1600px) {
  .landing-hero { gap: 92px; }
  .landing-intro h1 { font-size: 64px; }
}
@media (max-width: 920px) {
  .landing-hero { grid-template-columns: minmax(0, 1fr); gap: 34px; padding-top: 33px; }
  .landing-intro { max-width: 720px; margin: 0 auto; }
  .lesson-note { max-width: 720px; }
  .landing-hero .auth-panel { width: 100%; }
  .landing-hero .auth-card { width: min(580px, 100%); }
}
@media (max-width: 760px) {
  .landing-header { min-height: 66px; padding: 10px 18px; }
  .landing-brand { gap: 8px; font-size: 14px; }
  .landing-brand .brand-mark { width: 32px; height: 32px; border-radius: 7px; font-size: 19px; }
  .landing-brand .brand-mark svg { width: 18px; height: 18px; }
  .landing-nav { gap: 8px; }
  .landing-nav a:not(.landing-nav-cta) { display: none; }
  .landing-nav .landing-nav-cta { min-height: 38px; padding: 8px 12px; border-radius: 6px; font-size: 12px; }
  .landing-hero { gap: 26px; padding: 32px 18px 50px; }
  .landing-intro h1 { margin: 13px 0; font-size: clamp(36px, 8.6vw, 51px); }
  .landing-intro > p { font-size: 14px; }
  .lesson-note { margin-top: 22px; padding: 16px 17px 14px; }
  .lesson-note > p { font-size: 16px; }
  .landing-hero .auth-panel { padding: 0; }
  .landing-hero .auth-card { padding: 23px 19px; border-radius: 3px 3px 8px 8px; }
  .landing-hero .auth-card h2 { font-size: 23px; }
  .landing-features { padding: 54px 18px 58px; }
  .landing-feature { grid-template-columns: 28px minmax(0, 1fr); gap: 8px 13px; padding: 16px 2px; }
  .landing-feature > div { grid-column: 2; }
  .landing-feature a { grid-column: 2; grid-row: auto; justify-self: start; }
  .landing-footer { align-items: flex-start; flex-direction: column; gap: 11px; padding: 20px 18px 26px; }
}
@media (max-width: 380px) {
  .landing-header { padding-right: 13px; padding-left: 13px; }
  .landing-brand { font-size: 13px; }
  .landing-nav .landing-nav-cta { min-height: 36px; padding: 7px 10px; }
  .landing-hero { padding-right: 14px; padding-left: 14px; }
  .landing-kicker { font-size: 10px; letter-spacing: .05em; }
  .landing-intro h1 { font-size: 36px; }
  .lesson-note-header { font-size: 9px; }
  .lesson-note > p { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-nav a { transition: none; }
}

.word-workshop .excel-intro { border-color: #d8dcc8; border-left-color: #82906e; background: #f1f0e6; }
.word-workshop .excel-intro-mark { background: #e3e5d3; color: #59684b; font: 700 22px Georgia, "Times New Roman", serif; }
.word-workshop .excel-intro strong, .word-workshop .excel-module-heading strong { color: #4e5644; }
.word-workshop .excel-intro p, .word-workshop .excel-module-heading small { color: #747765; }
.word-workshop .excel-progress { border-left-color: #d5d7c7; color: #737862; }
.word-workshop .excel-progress strong { color: #687750; }
.word-workshop .excel-module { border-color: #e0e0d2; background: #fbfaf4; }
.word-workshop .excel-module[open] { border-color: #c8ceb6; }
.word-workshop .excel-level { background: #eceede; color: #64744f; }
.word-workshop .excel-chevron { color: #83906d; }
.word-workshop .excel-function { border-color: #e6e5d9; background: #fffef9; }
.word-workshop .excel-function-name strong { color: #5a6748; }
.word-workshop .excel-syntax code { border-color: #e4e3d7; background: #f3f2e9; color: #525c45; }
.word-workshop .excel-function dt { color: #72775d; }
.word-workshop .excel-function .excel-common-mistake dt { color: #a05c49; }
.word-workshop .excel-function .excel-correction dt { color: #5e7a54; }
.word-workshop .excel-module-footer { border-top-color: #e3e1d2; }
.word-workshop .excel-references a { color: #5c714b; text-decoration-color: #c6ceb5; }

@media (max-width: 760px) {
  .mobile-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .mobile-nav-admin { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .mobile-nav-admin .nav-button { font-size: 9px; }
}
@media (max-width: 380px) {
  .mobile-nav-admin .nav-button { font-size: 8px; }
}

.exam-prep-note { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 13px; margin: 0 0 20px; padding: 17px 19px; border: 1px solid #ead8c2; border-left: 4px solid #c77757; border-radius: 14px; background: #fff8ed; color: #675348; }
.exam-prep-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: #f4e5cf; color: #a35b42; font-size: 19px; }
.exam-prep-note strong { display: block; margin: 1px 0 5px; color: #503d34; font: 800 14px Manrope, sans-serif; }
.exam-prep-note p { margin: 0; font-size: 12px; line-height: 1.65; }
.exam-prep-note .exam-cohort-note { margin-top: 8px; color: #805d48; font-weight: 650; }
.exam-prep-note a { display: inline-block; margin-top: 6px; color: #944b3a; font-weight: 700; text-decoration-color: #d7a48f; text-underline-offset: 3px; }
.exam-resource-library { margin: 0 0 20px; padding: 19px; border: 1px solid #e6d6c4; border-radius: 16px; background: #fffdf9; }
.exam-resource-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.exam-resource-heading h2 { margin: 5px 0 4px; color: #493632; font: 800 19px Manrope, sans-serif; letter-spacing: -.02em; }
.exam-resource-heading p { max-width: 760px; margin: 0; color: #78695e; font-size: 12px; line-height: 1.6; }
.exam-resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.exam-resource-card { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-content: start; gap: 10px; min-width: 0; padding: 13px; border: 1px solid #eadfce; border-radius: 12px; background: #fffaf3; }
.exam-resource-number { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: #f3ead9; color: #996347; font-size: 10px; font-weight: 800; }
.exam-resource-card h3 { margin: 1px 0 5px; color: #51433a; font: 750 13px Manrope, sans-serif; }
.exam-resource-card p { margin: 0 0 9px; color: #78695e; font-size: 11px; line-height: 1.55; }
.exam-resource-card a { color: #944b3a; font-size: 11px; font-weight: 750; text-decoration: underline; text-decoration-color: #d7a48f; text-underline-offset: 3px; }
.exam-area-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 15px; }
.exam-area-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 39px; padding: 8px 14px; border: 1px solid #e7d9ca; border-radius: 999px; background: #fffaf3; color: #67574c; font-size: 12px; font-weight: 700; }
.exam-area-tab:hover { border-color: #d2aa8e; background: #fff5e8; }
.exam-area-tab.active { border-color: #b45f49; background: #b45f49; color: #fffaf3; }
.exam-area-tab span { display: inline-grid; min-width: 20px; min-height: 20px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.62); color: #794332; font-size: 10px; }
.exam-area-tab.active span { background: rgba(255,255,255,.2); color: white; }
.oral-practice { margin: 20px 0; padding: 20px; border: 1px solid #e6d6c4; border-radius: 16px; background: #fbf7ef; }
.oral-practice .panel-header { align-items: flex-start; margin-bottom: 14px; }
.oral-practice .panel-header h2 { margin: 4px 0; color: #493632; font: 800 18px Manrope, sans-serif; }
.oral-practice .panel-header p { max-width: 650px; margin: 0; color: #78695e; font-size: 12px; line-height: 1.55; }
.oral-case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.oral-case { min-width: 0; border: 1px solid #eadfce; border-radius: 11px; background: #fffdf9; }
.oral-case summary { display: flex; align-items: center; gap: 10px; padding: 11px 12px; color: #55443b; cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; }
.oral-case summary::-webkit-details-marker { display: none; }
.oral-case summary::after { content: "＋"; margin-left: auto; color: #a4674b; font-size: 16px; }
.oral-case[open] summary::after { content: "−"; }
.oral-case-number { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #f3ead9; color: #996347; font-size: 10px; }
.oral-case-body { padding: 0 14px 13px 49px; color: #61574f; font-size: 11px; line-height: 1.55; }
.oral-case-body p { margin: 0 0 9px; }
.oral-case-body ol { margin: 6px 0 10px; padding-left: 17px; }
.oral-case-body li + li { margin-top: 3px; }
.oral-case-body > strong { color: #51433a; }
.oral-case-note { color: #87776a; font-size: 10px; }
.practice-library { margin: 20px 0; padding: 20px; border: 1px solid #e6d6c4; border-radius: 16px; background: #fbf7ef; }
.practice-library .panel-header { align-items: flex-start; margin-bottom: 14px; }
.practice-library .panel-header h2 { margin: 4px 0; color: #493632; font: 800 18px Manrope, sans-serif; }
.practice-library .panel-header p { max-width: 680px; margin: 0; color: #78695e; font-size: 12px; line-height: 1.55; }
.practice-shortcuts { display: flex; flex-wrap: wrap; gap: 12px; }
.practice-task-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.practice-task { min-width: 0; border: 1px solid #eadfce; border-radius: 11px; background: #fffdf9; }
.practice-task > summary { display: flex; align-items: center; gap: 9px; min-height: 49px; padding: 9px 11px; color: #55443b; cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; }
.practice-task > summary::-webkit-details-marker { display: none; }
.practice-task > summary::after { content: "＋"; margin-left: auto; color: #a4674b; font-size: 16px; }
.practice-task[open] > summary::after { content: "−"; }
.practice-task-number { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #f3ead9; color: #996347; font-size: 10px; }
.practice-task-title { min-width: 0; }
.practice-badge-excel, .practice-badge-word { flex: 0 0 auto; background: #e8eddf; color: #5e6f4e; }
.practice-badge-word { background: #e9e9f2; color: #60627e; }
.practice-task-body { padding: 0 15px 14px; color: #61574f; font-size: 11px; line-height: 1.6; }
.practice-task-body > p { margin: 2px 0 10px; }
.practice-task-body > strong { color: #51433a; }
.practice-task-body ul { display: grid; gap: 4px; margin: 6px 0 0; padding-left: 19px; }
.practice-write-label { display: grid; gap: 6px; margin: 10px 0; color: #51433a; font-size: 11px; font-weight: 700; }
.practice-write-label textarea { width: 100%; min-height: 90px; padding: 10px 11px; border: 1px solid #e6d9c8; border-radius: 9px; background: #fffefa; color: #4d4038; font: 400 12px/1.5 Manrope, sans-serif; resize: vertical; }
.practice-write-label textarea:focus { border-color: #bf8366; outline: 2px solid rgba(191,131,102,.16); }
.practice-write-label small { color: #88796c; font-size: 10px; font-weight: 500; }
.practice-answer { margin-top: 11px; border-top: 1px solid #eee3d4; }
.practice-answer > summary { padding: 9px 0 4px; color: #965d46; cursor: pointer; font-weight: 700; }
.practice-answer ul { margin-top: 5px; }
@media (max-width: 560px) {
  .exam-prep-note { grid-template-columns: 31px minmax(0, 1fr); gap: 9px; padding: 14px; }
  .exam-resource-library { padding: 14px; }
  .exam-resource-grid { grid-template-columns: 1fr; }
  .exam-prep-icon { width: 29px; height: 29px; border-radius: 9px; font-size: 16px; }
  .exam-area-tabs { gap: 6px; }
  .exam-area-tab { min-height: 36px; padding: 7px 10px; font-size: 11px; }
  .oral-practice { padding: 14px; }
  .oral-case-grid { grid-template-columns: 1fr; }
  .oral-case-body { padding-left: 14px; }
  .practice-library { padding: 14px; }
  .practice-task-grid { grid-template-columns: 1fr; }
  .practice-shortcuts { width: 100%; }
}

/* AP1/AP2 full practice cases */
.simulation-choice, .full-simulation, .simulation-sidepart { margin: 0 0 20px; padding: 20px; border: 1px solid #e6d6c4; border-radius: 16px; background: linear-gradient(145deg, #fffaf1, #f8f0e3); color: #55473d; }
.simulation-choice > .eyebrow { color: #9b6047; }
.simulation-choice > h2 { margin: 6px 0 7px; color: #493632; font: 800 21px/1.25 Manrope, sans-serif; }
.simulation-choice > p { max-width: 760px; color: #77685d; font-size: 12px; line-height: 1.6; }
.simulation-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 8px; }
.simulation-choice-grid article { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 17px; border: 1px solid #e9ddce; border-radius: 13px; background: #fffdf9; }
.simulation-choice-grid h3 { margin: 12px 0 5px; color: #514039; font: 800 16px/1.3 Manrope, sans-serif; }
.simulation-choice-grid p { flex: 1; margin: 0 0 14px; color: #786c61; font-size: 12px; line-height: 1.55; }
.simulation-disclaimer { margin: 13px 0 0; color: #85766a; font-size: 10px; line-height: 1.55; }
.full-simulation { padding: 22px; }
.simulation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.simulation-heading h2 { margin: 5px 0; color: #493632; font: 800 20px/1.25 Manrope, sans-serif; }
.simulation-heading p { max-width: 670px; margin: 0; color: #78695e; font-size: 12px; line-height: 1.55; }
.simulation-heading > .badge { flex: 0 0 auto; }
.simulation-clock { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 0; padding: 13px 15px; border: 1px solid #e8d7c4; border-radius: 12px; background: #fffdf8; }
.simulation-clock > div { display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 10px; }
.simulation-clock .eyebrow { grid-column: 1 / -1; color: #9b6047; }
.simulation-clock strong { color: #493632; font: 800 23px/1.2 Manrope, sans-serif; font-variant-numeric: tabular-nums; }
.simulation-clock small { grid-column: 1 / -1; color: #817367; font-size: 10px; }
.simulation-clock button:disabled { cursor: default; opacity: .74; }
.simulation-brief { margin: 14px 0; padding: 14px 16px; border-left: 3px solid #bd7958; border-radius: 0 10px 10px 0; background: rgba(255,255,255,.72); }
.simulation-brief strong { color: #493632; font: 800 13px Manrope, sans-serif; }
.simulation-brief p { margin: 6px 0 0; color: #66584d; font-size: 12px; line-height: 1.65; }
.simulation-source { margin: 13px 0; padding: 0 14px 12px; border: 1px solid #e7dac9; border-radius: 12px; background: rgba(255,255,255,.62); }
.simulation-source > summary { padding: 12px 0; color: #80533f; cursor: pointer; font-size: 12px; font-weight: 800; }
.simulation-data-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 15px; }
.simulation-data-grid h3, .simulation-task-list > h3 { margin: 4px 0 8px; color: #554239; font: 800 14px Manrope, sans-serif; }
.simulation-data-grid p, .simulation-facts { color: #716258; font-size: 11px; line-height: 1.55; }
.simulation-data-grid p { margin: 8px 0 0; }
.simulation-facts { display: grid; gap: 5px; margin: 0; padding-left: 18px; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid #e9dfd2; border-radius: 8px; }
.simulation-table { width: 100%; min-width: 310px; border-collapse: collapse; background: #fffefa; font-size: 10px; }
.simulation-table th, .simulation-table td { padding: 7px 8px; border-bottom: 1px solid #eee6da; text-align: left; white-space: nowrap; }
.simulation-table th { background: #f6eee2; color: #674f40; font-weight: 800; }
.simulation-table tr:last-child td { border-bottom: 0; }
.simulation-task-list { margin: 17px 0 12px; }
.simulation-task-list > h3 { margin-bottom: 8px; font-size: 16px; }
.simulation-task-list article { position: relative; margin: 8px 0; padding: 14px 15px; border: 1px solid #eadfce; border-radius: 12px; background: #fffdf9; }
.simulation-task-list article h4 { margin: 0 112px 8px 0; color: #4f3e35; font: 800 13px/1.4 Manrope, sans-serif; }
.simulation-task-list article p { margin: 7px 0; color: #71645a; font-size: 11px; line-height: 1.6; }
.simulation-points { position: absolute; top: 13px; right: 14px; color: #9b6047; font-size: 10px; font-weight: 800; }
.simulation-answer { display: grid; gap: 5px; margin: 10px 0 0; color: #5b493e; font-size: 11px; font-weight: 700; }
.simulation-answer textarea { width: 100%; min-height: 65px; padding: 9px 10px; border: 1px solid #e6d9c8; border-radius: 8px; background: #fffefa; color: #4d4038; font: 400 12px/1.5 Manrope, sans-serif; resize: vertical; }
.simulation-answer textarea:focus { border-color: #bf8366; outline: 2px solid rgba(191,131,102,.16); }
.simulation-answer small { color: #88796c; font-size: 10px; font-weight: 500; }
.simulation-solution { margin: 15px 0 5px; border: 1px solid #d9dfc7; border-radius: 11px; background: #f8faef; }
.simulation-solution > summary { padding: 12px 14px; color: #596544; cursor: pointer; font-size: 12px; font-weight: 800; }
.simulation-solution > div { padding: 0 16px 14px; color: #5c5d4f; font-size: 11px; line-height: 1.6; }
.simulation-solution h3 { margin: 7px 0; color: #4e5a3e; font: 800 13px Manrope, sans-serif; }
.simulation-solution ul { display: grid; gap: 5px; padding-left: 19px; }
.simulation-sidepart { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 18px; }
.simulation-sidepart h2 { margin: 5px 0; color: #493632; font: 800 16px Manrope, sans-serif; }
.simulation-sidepart p { margin: 0; color: #78695e; font-size: 11px; line-height: 1.55; }
.simulation-duration { flex: 0 0 auto; color: #915a43; font: 800 14px Manrope, sans-serif; }
@media (max-width: 650px) {
  .simulation-choice, .full-simulation { padding: 15px; }
  .simulation-choice-grid { grid-template-columns: 1fr; }
  .simulation-heading { flex-direction: column; }
  .simulation-clock { align-items: flex-start; flex-direction: column; }
  .simulation-clock button { width: 100%; }
  .simulation-task-list article h4 { margin-right: 0; padding-right: 84px; }
  .simulation-points { top: 37px; right: 13px; }
  .simulation-sidepart { align-items: flex-start; }
}
.simulation-clock-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 650px) {
  .simulation-clock-actions { width: 100%; flex-direction: column; align-items: stretch; }
}

.course-chapter-pack { display: grid; gap: 7px; min-width: 0; }
.chapter-lesson { overflow: clip; border: 1px solid #eadbcc; border-radius: 11px; background: #fffaf2; }
.chapter-lesson > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; color: #59453a; cursor: pointer; list-style: none; font-size: 12px; font-weight: 700; }
.chapter-lesson > summary::-webkit-details-marker, .book-task > summary::-webkit-details-marker { display: none; }
.lesson-open-label { flex: 0 0 auto; color: #9a5945; font-size: 10px; }
.chapter-lesson[open] > summary { border-bottom: 1px solid #eee1d3; background: #fbf3e7; }
.chapter-lesson-content { display: grid; gap: 13px; padding: 14px; }
.chapter-lesson-content p { margin: 0; color: #66574d; font-size: 12px; line-height: 1.65; }
.lesson-source { color: #7d8992 !important; font-size: 10px !important; }
.lesson-references > div { display: flex; flex-wrap: wrap; gap: 8px; }
.lesson-references a { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 8px 10px; border: 1px solid #e5dbce; border-radius: 8px; background: #fffdf9; color: #795747; font-size: 11px; font-weight: 650; text-decoration: none; }
.lesson-references a:hover { border-color: #c99073; background: #fff8ef; }
.roadmap-note { margin: 12px 0; padding: 11px 13px; border: 1px dashed #ddc9af; border-radius: 10px; background: #fff8ed; color: #755b4a !important; font-size: 11px !important; line-height: 1.55 !important; }
.chapter-lesson-content .chapter-lesson-intro { padding: 12px 14px; border-left: 3px solid #bd7658; border-radius: 0 8px 8px 0; background: #f7eee1; color: #59453a; }
.chapter-lesson-section { display: grid; gap: 8px; }
.chapter-lesson-section h3 { margin: 0; color: #60473c; font: 700 14px/1.35 Georgia, "Times New Roman", serif; }
.chapter-lesson-section ul { display: grid; gap: 6px; margin: 0; padding-left: 19px; color: #66574d; font-size: 12px; line-height: 1.55; }
.team-phase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.team-phase-grid article { min-width: 0; padding: 11px 12px; border: 1px solid #e9dccb; border-radius: 9px; background: #fffdf8; }
.team-phase-grid strong { display: block; margin-bottom: 5px; color: #8e5141; font-size: 11px; }
.book-tasks { padding-top: 11px; border-top: 1px solid #eadbcc; }
.book-tasks > p { margin-bottom: 2px; }
.book-task { border: 1px solid #eee2d5; border-radius: 8px; background: #fffdf9; }
.book-task > summary { display: flex; justify-content: space-between; gap: 10px; padding: 10px 11px; color: #59453a; cursor: pointer; list-style: none; font-size: 11px; font-weight: 700; }
.book-task > summary span:last-child { flex: 0 0 auto; color: #9a735e; font-size: 10px; font-weight: 500; }
.book-task > div { display: grid; gap: 8px; padding: 0 11px 12px; }
.book-task[open] > summary { color: #8e5141; }
.chapter-lesson-content .book-task-check { padding: 9px 10px; border-radius: 7px; background: #f5f1e8; }
@media (max-width: 560px) {
  .team-phase-grid { grid-template-columns: 1fr; }
  .chapter-lesson > summary, .book-task > summary { align-items: flex-start; }
}

/* Lesbarkeit und alternative Erklärungen */
.glossary-term {
  position: relative;
  display: inline;
  border-bottom: 1px dotted currentColor;
  cursor: help;
  outline: none;
  text-decoration: none;
  text-underline-offset: 3px;
}
.glossary-term:focus-visible {
  border-radius: 3px;
  outline: 2px solid #9b7252;
  outline-offset: 2px;
}
.glossary-popover {
  position: fixed;
  z-index: 1000;
  display: block;
  width: min(280px, calc(100vw - 32px));
  padding: 11px 13px;
  border: 1px solid #6e5244;
  border-radius: 9px;
  background: #493b35;
  box-shadow: 0 8px 24px rgba(35, 25, 20, .22);
  color: #fffaf2;
  font: 500 13px/1.5 "DM Sans", "Segoe UI", sans-serif;
  text-align: left;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.glossary-term:hover .glossary-popover,
.glossary-term:focus .glossary-popover,
.glossary-term.is-open .glossary-popover {
  visibility: visible;
  opacity: 1;
}
.glossary-details,
.simple-explanation {
  margin-top: 10px;
  border: 1px solid #eadbcc;
  border-radius: 9px;
  background: #fffaf2;
}
.glossary-details > summary,
.simple-explanation > summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #765642;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}
.glossary-details > summary::-webkit-details-marker,
.simple-explanation > summary::-webkit-details-marker { display: none; }
.glossary-details > summary::before,
.simple-explanation > summary::before { content: "+"; color: #a06d4d; font-size: 16px; }
.glossary-details[open] > summary::before,
.simple-explanation[open] > summary::before { content: "−"; }
.glossary-details > summary span { color: #988273; font-size: 11px; }
.glossary-details dl { display: grid; gap: 8px; margin: 0; padding: 0 12px 12px; }
.glossary-details dl > div { padding-top: 8px; border-top: 1px solid #eee1d3; }
.glossary-details dt { margin: 0 0 2px; color: #59453a; font-size: 12px; font-weight: 700; }
.glossary-details dd { margin: 0; color: #66574d; font-size: 13px; line-height: 1.55; }
.simple-explanation { border-color: #d9e2ce; background: #f6f8ef; }
.simple-explanation > summary { color: #546641; }
.simple-explanation > summary::before { color: #718456; }
.simple-explanation > p { margin: 0; padding: 0 12px 12px; color: #536148; font-size: 14px; line-height: 1.6; }
.term-help-hint { margin: 0; color: #77665a; font-size: 12px; line-height: 1.45; }
.chapter-lesson-content p { font-size: 14px; line-height: 1.7; }
.chapter-lesson-content ul { font-size: 14px; line-height: 1.65; }
.excel-function dd { font-size: 14px; line-height: 1.65; }
.answer-card p { font-size: 13px; line-height: 1.6; }
.answer-feedback p { font-size: 14px; line-height: 1.65; }
.answer-feedback .simple-explanation p { margin: 0; font-size: 14px; }
.question-card .glossary-details { margin: -8px 0 18px; }
.chapter-lesson-section > .simple-explanation { margin: 0; }

@media (max-width: 700px) {
  .glossary-popover { font-size: 13px; }
  .glossary-details dd, .simple-explanation > p { font-size: 14px; }
  .answer-card { padding: 13px; }
}

.sidebar-footer-links { display: grid; gap: 6px; padding: 4px 12px 13px; color: #6c776e; font-size: 11px; }
.sidebar-footer-links a { width: fit-content; color: inherit; text-decoration: none; }
.sidebar-footer-links a:hover, .sidebar-footer-links a:focus-visible { color: var(--brand); text-decoration: underline; }
.daily-quest-panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; align-items: center; margin: 18px 0; padding: clamp(20px, 3vw, 30px); border: 1px solid #e7d1a9; border-radius: 17px; background: linear-gradient(125deg, #fff8e9 0%, #fffdf8 72%); box-shadow: 0 10px 24px rgba(90, 64, 30, .04); }
.daily-quest-copy h2 { margin: 7px 0 8px; color: #3b4338; font: 800 clamp(22px, 3vw, 28px)/1.2 Manrope, sans-serif; letter-spacing: -.03em; }
.daily-quest-copy > p { max-width: 760px; margin: 0; color: #6d675b; font-size: 14px; line-height: 1.6; }
.daily-quest-action { display: flex; align-items: center; justify-content: flex-end; }
.daily-complete-mark { display: grid; width: 45px; height: 45px; place-items: center; border: 1px solid #c4dac6; border-radius: 50%; background: #edf6ee; color: #34724e; font-size: 23px; font-weight: 800; }
.daily-empty { max-width: 220px; color: #7b6958; font-size: 12px; line-height: 1.5; text-align: right; }
.daily-settings-inline { grid-column: 1 / -1; padding-top: 13px; border-top: 1px solid #eddfc7; }
.daily-settings-inline > summary { width: fit-content; color: #795c3d; cursor: pointer; font-size: 12px; font-weight: 700; }
.daily-settings-panel { max-width: 960px; padding: clamp(19px, 3vw, 28px); }
.daily-settings-form { display: grid; gap: 12px; }
.daily-settings-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.daily-settings-hint { margin: 0; color: #6c7167; font-size: 12px; line-height: 1.55; }
.daily-settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; }
.daily-settings-actions .form-error { min-height: 0; }
.question-share-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 12px 0 3px; padding: 11px 13px; border: 1px solid #eadfce; border-radius: 11px; background: #fffaf2; color: #786858; font-size: 12px; }
.question-share-row .button { min-height: 36px; padding: 8px 12px; }
.book-task-share { justify-self: start; min-height: 36px; padding: 8px 11px; }
.chat-message-body a { color: #286b58; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 2px; }
.chat-message-body a:hover { color: #174f45; }
@media (max-width: 760px) {
  .daily-quest-panel { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .daily-quest-action { justify-content: flex-start; }
  .daily-empty { text-align: left; }
  .daily-settings-fields { grid-template-columns: minmax(0, 1fr); }
}


/* A wider, warmer start page keeps the daily routine and the welcome together. */
.content:has(.home-start-grid) { width: min(1600px, 100%); }
.home-start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.home-start-grid > * { min-width: 0; }
.home-start-grid .welcome-panel {
  min-height: 246px;
  height: 100%;
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  padding: clamp(23px, 3vw, 36px);
  border: 1px solid #e6cdb5;
  border-left: 3px solid #bd7658;
  border-radius: 15px;
  background: radial-gradient(circle at 92% 8%, rgba(220, 168, 117, .18), transparent 36%), linear-gradient(135deg, #f7ecdc, #fff8ec);
  box-shadow: 0 8px 22px rgba(111, 70, 43, .045);
}
.home-start-grid .welcome-copy { max-width: 36rem; }
.home-start-grid .welcome-copy h2 { max-width: 16ch; font-size: clamp(27px, 3vw, 38px); line-height: 1.12; }
.home-start-grid .welcome-copy p { color: #715d52; }
.home-start-grid .welcome-actions { margin-top: 22px; }
.home-start-grid .daily-quest-panel {
  min-height: 246px;
  height: 100%;
  grid-template-columns: minmax(0, 1fr);
  align-content: space-between;
  align-items: start;
  gap: 15px;
  margin: 0;
  padding: clamp(22px, 3vw, 34px);
  border-color: #e7d1a9;
  background: linear-gradient(140deg, #fff7e5, #fffdf8 77%);
  box-shadow: 0 8px 22px rgba(90, 64, 30, .045);
}
.home-start-grid .daily-quest-copy h2 { color: #493632; font: 700 clamp(23px, 2.6vw, 31px)/1.18 Georgia, "Times New Roman", serif; }
.home-start-grid .daily-quest-copy > p { max-width: 46ch; }
.home-start-grid .daily-quest-action { justify-content: flex-start; }
.home-start-grid .daily-empty { text-align: left; }
.content:has(.home-start-grid) .stat-grid { gap: 12px; margin-bottom: 26px; border: 0; }
.content:has(.home-start-grid) .stat-card {
  min-height: 126px;
  padding: 19px 21px;
  border: 1px solid #eadbcc;
  border-radius: 14px;
  background: #fffaf2;
  box-shadow: 0 4px 14px rgba(111, 70, 43, .025);
}
.content:has(.home-start-grid) .stat-head { color: #806d67; font-size: 11px; }
.content:has(.home-start-grid) .stat-value { margin-top: 12px; font-size: 30px; }
.content:has(.home-start-grid) .stat-foot { color: #88776b; font-size: 11px; }
.content:has(.home-start-grid) .dashboard-grid { grid-template-columns: minmax(0, 1.35fr) minmax(290px, .85fr); gap: 18px; }
.content:has(.home-start-grid) .dashboard-grid > .panel { padding: clamp(20px, 2.2vw, 27px); }
.content:has(.home-start-grid) .home-learning-grid { gap: 10px; }
.content:has(.home-start-grid) .home-learning-card { min-height: 62px; padding: 12px; }

.learning-group-grid { max-width: none; }
.learning-group-icon, .home-learning-icon, .excel-module-glyph { display: block; width: 25px; height: 25px; }
.learning-group-mark .learning-group-icon { width: 29px; height: 29px; }
.home-learning-mark .home-learning-icon { width: 21px; height: 21px; }
.excel-module-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #efdcc8;
  border-radius: 12px;
  background: #f8e9d9;
  color: #8d4e3e;
}
.excel-module-glyph { width: 21px; height: 21px; }
.avatar { overflow: hidden; }
.avatar-image { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.online-person { gap: 9px; }
.online-avatar { width: 28px; height: 28px; font-size: 10px; }
.avatar-upload-control { display: grid; gap: 8px; padding: 14px 15px; border: 1px dashed #d9b99f; border-radius: 12px; background: #fff8ee; color: #594540; }
.avatar-upload-control > span { font-size: 12px; font-weight: 700; }
.avatar-upload-control input[type="file"] { max-width: 100%; color: #6f5d52; font: 12px Arial, sans-serif; }
.avatar-upload-control input[type="file"]::file-selector-button { margin-right: 10px; padding: 8px 11px; border: 1px solid #ddc3ab; border-radius: 8px; background: #fffdf8; color: #70483c; cursor: pointer; }
.avatar-upload-control small { color: #806d67; font-size: 11px; line-height: 1.5; }
.avatar-upload-status { min-height: 16px; margin: -12px 0 0; color: #806d67; font-size: 12px; line-height: 1.5; }
.retry-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.retry-actions .button { min-height: 42px; }
@media (max-width: 1100px) {
  .home-start-grid { grid-template-columns: minmax(0, 1fr); }
  .home-start-grid .welcome-panel, .home-start-grid .daily-quest-panel { min-height: 220px; }
  .content:has(.home-start-grid) .dashboard-grid { grid-template-columns: minmax(0, 1.3fr) minmax(250px, .8fr); }
}
@media (max-width: 760px) {
  .home-start-grid { gap: 12px; margin-bottom: 18px; }
  .home-start-grid .welcome-panel { min-height: 218px; }
  .home-start-grid .daily-quest-panel { min-height: 220px; }
  .content:has(.home-start-grid) .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
  .content:has(.home-start-grid) .stat-card { min-height: 105px; padding: 14px 13px; border: 1px solid #eadbcc; border-radius: 12px; }
  .content:has(.home-start-grid) .stat-value { margin-top: 8px; font-size: 25px; }
  .content:has(.home-start-grid) .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .content:has(.home-start-grid) .dashboard-grid > .panel { padding: 18px; }
  .content:has(.home-start-grid) .home-learning-grid { grid-template-columns: minmax(0, 1fr); }
  .retry-banner { align-items: flex-start; flex-direction: column; }
  .retry-actions { width: 100%; justify-content: flex-start; }
  .retry-actions .button { flex: 1 1 auto; }
}
@media (max-width: 420px) {
  .retry-actions { flex-direction: column; }
  .retry-actions .button { width: 100%; }
.home-start-grid .welcome-copy h2 { font-size: 27px; }
}

/* Put the next learning choice before the statistics, with a calmer editorial rhythm. */
.content:has(.home-start-grid) { width: min(1780px, 100%); }
.home-start-grid { grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); gap: 20px; margin-bottom: 34px; }
.home-start-grid .welcome-panel {
  position: relative;
  min-height: 326px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  overflow: hidden;
  padding: clamp(28px, 3vw, 46px);
  border-left-width: 4px;
  background: radial-gradient(circle at 82% 18%, rgba(217, 170, 126, .24), transparent 32%), linear-gradient(135deg, #f3e6d5 0%, #fff7e9 100%);
}
.home-start-grid .welcome-copy { max-width: 690px; }
.home-start-grid .welcome-copy h2 { max-width: 18ch; margin: 12px 0; font-size: clamp(30px, 3.2vw, 43px); }
.home-start-grid .welcome-copy p { max-width: 44ch; font-size: 15px; line-height: 1.7; }
.home-start-grid .welcome-actions { margin-top: 24px; }
.welcome-doodle { display: grid; justify-items: center; align-self: stretch; align-content: center; gap: 8px; color: #9b6a52; text-align: center; }
.welcome-doodle > span { color: #875c47; font: 700 12px/1.3 Georgia, "Times New Roman", serif; letter-spacing: .05em; }
.welcome-doodle svg { width: min(100%, 190px); height: auto; overflow: visible; }
.welcome-doodle small { color: #806c5a; font-size: 11px; }
.home-start-grid .daily-quest-panel {
  min-height: 326px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: 20px 22px;
  padding: clamp(26px, 3vw, 40px);
  background: radial-gradient(circle at 90% 6%, rgba(232, 199, 132, .23), transparent 35%), linear-gradient(145deg, #fff6dc, #fffdf7 74%);
}
.home-start-grid .daily-quest-copy h2 { max-width: 14ch; margin: 10px 0; font-size: clamp(26px, 2.6vw, 35px); }
.home-start-grid .daily-quest-copy > p { max-width: 39ch; font-size: 14px; }
.home-start-grid .daily-quest-action { grid-column: 1 / -1; justify-content: flex-start; }
.home-start-grid .daily-quest-action .button { min-height: 48px; padding-inline: 19px; }
.home-start-grid .daily-settings-inline { grid-column: 1 / -1; width: 100%; margin-top: 2px; }
.home-learning-section { margin: 0 0 34px; padding: 0 2px; }
.home-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.home-section-heading h2 { margin: 6px 0 5px; color: #493632; font: 700 clamp(21px, 2vw, 27px)/1.22 Georgia, "Times New Roman", serif; letter-spacing: -.02em; }
.home-section-heading p { margin: 0; color: #796a5e; font-size: 13px; line-height: 1.5; }
.home-section-heading .eyebrow { color: #9a725b; }
.home-section-heading.compact { align-items: start; margin-bottom: 17px; }
.home-section-heading.compact h2 { font-size: 22px; }
.home-learning-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.content:has(.home-start-grid) .home-learning-card {
  min-height: 94px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  grid-template-rows: auto;
  gap: 10px;
  padding: 15px;
  border-color: #e7d7c5;
  border-radius: 13px;
  background: linear-gradient(145deg, #fffdf9, #fff8ed);
  box-shadow: 0 5px 15px rgba(111, 70, 43, .035);
}
.content:has(.home-start-grid) .home-learning-card:hover { transform: translateY(-2px); box-shadow: 0 9px 22px rgba(111, 70, 43, .075); }
.content:has(.home-start-grid) .home-learning-mark { width: 46px; height: 46px; border: 1px solid #f0d7c6; border-radius: 14px; background: #f8e5d6; }
.content:has(.home-start-grid) .home-learning-copy { align-self: center; }
.content:has(.home-start-grid) .home-learning-copy strong, .content:has(.home-start-grid) .home-learning-copy small { overflow: visible; text-overflow: clip; white-space: normal; }
.content:has(.home-start-grid) .home-learning-copy strong { font-size: 13px; line-height: 1.25; }
.content:has(.home-start-grid) .home-learning-copy small { margin-top: 4px; font-size: 11px; line-height: 1.3; }
.content:has(.home-start-grid) .home-learning-count { grid-column: 2; color: #8b7869; font-size: 11px; }
.content:has(.home-start-grid) .home-learning-arrow { grid-column: 3; grid-row: 1; width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #eadbcc; border-radius: 50%; color: #93614d; font-size: 15px; }
.home-progress-section { margin: 0 0 34px; }
.home-progress-section .home-section-heading { margin-bottom: 11px; }
.content:has(.home-start-grid) .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid #ddcdb9; border-bottom: 1px solid #ddcdb9; }
.content:has(.home-start-grid) .stat-card { min-height: 0; padding: 15px 20px; border: 0; border-right: 1px solid #eadfd1; border-radius: 0; background: transparent; box-shadow: none; }
.content:has(.home-start-grid) .stat-card:last-child { border-right: 0; }
.content:has(.home-start-grid) .stat-value { margin-top: 8px; font-size: 28px; }
.home-insights-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 17px; }
.home-insight-panel { min-width: 0; padding: 24px; border: 1px solid #eadbcc; border-radius: 14px; background: #fffaf2; }
.home-insight-panel .empty-note { padding: 12px 0 2px; border: 0; background: transparent; }
.home-insight-panel .activity-chart { margin-top: 4px; }
.home-insight-panel .home-section-heading { margin-bottom: 13px; }
.home-insight-panel .activity-total { align-self: center; color: #8f6a53; font-size: 12px; }
@media (max-width: 1450px) {
  .home-start-grid .welcome-panel { grid-template-columns: minmax(0, 1fr) 125px; padding: 28px; }
  .home-start-grid .welcome-copy h2 { font-size: clamp(28px, 2.6vw, 36px); }
  .welcome-doodle svg { width: min(100%, 125px); }
}
@media (max-width: 1160px) {
  .home-start-grid { grid-template-columns: minmax(0, 1fr); }
  .home-start-grid .welcome-panel, .home-start-grid .daily-quest-panel { min-height: 250px; }
  .home-start-grid .welcome-panel { grid-template-columns: minmax(0, 1fr) 180px; padding: clamp(28px, 4vw, 44px); }
  .home-start-grid .welcome-copy h2 { font-size: clamp(32px, 4vw, 42px); }
  .welcome-doodle svg { width: min(100%, 175px); }
  .home-learning-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .home-start-grid { gap: 12px; margin-bottom: 26px; }
  .home-start-grid .welcome-panel { min-height: 0; grid-template-columns: minmax(0, 1fr) 90px; padding: 22px; }
  .home-start-grid .welcome-copy h2 { font-size: 29px; }
  .welcome-doodle svg { width: 88px; }
  .welcome-doodle > span, .welcome-doodle small { font-size: 9px; }
  .home-start-grid .daily-quest-panel { min-height: 0; padding: 22px; }
  .home-section-heading { align-items: start; }
  .home-learning-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .home-insights-grid { grid-template-columns: minmax(0, 1fr); }
  .home-insight-panel { padding: 19px; }
  .content:has(.home-start-grid) .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content:has(.home-start-grid) .stat-card { padding: 13px; border-bottom: 1px solid #eadfd1; }
  .content:has(.home-start-grid) .stat-card:nth-child(2) { border-right: 0; }
  .content:has(.home-start-grid) .stat-card:nth-child(3), .content:has(.home-start-grid) .stat-card:nth-child(4) { border-bottom: 0; }
}
@media (max-width: 420px) {
  .home-start-grid .welcome-panel { grid-template-columns: minmax(0, 1fr); }
  .welcome-doodle { display: none; }
  .home-section-heading { flex-direction: column; gap: 9px; }
  .content:has(.home-start-grid) .stat-head { font-size: 10px; }
  .content:has(.home-start-grid) .stat-foot { font-size: 9px; }
}
 
