/* DACAR visual layer. Keep training content and account behavior in their own files. */
:root {
  --ink: #193b33;
  --muted: #5f706a;
  --forest: #153d32;
  --green: #287451;
  --lime: #daf49a;
  --line: #dfe8e2;
  --bg: #f4f7f5;
  --red: #a83c3c;
  --radius: 22px;
  --sidebar-width: 236px;
  --soft-shadow: 0 4px 24px rgb(25 59 51 / 4%);
}

html { scroll-padding-top: 100px; }
body { font-family: 'DM Sans', system-ui, sans-serif; line-height: 1.65; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #43815f;
  outline-offset: 4px;
}
h1 { font-size: clamp(28px, 2.35vw, 36px); letter-spacing: -1.15px; line-height: 1.25; }
h2, h3 { color: var(--ink); }
h2 { letter-spacing: -.65px; }
p { text-wrap: pretty; }
::selection { color: #12372b; background: #daf49a; }

/* Navigation and account header */
.sidebar {
  width: var(--sidebar-width);
  padding: 32px 18px 24px;
  background: #12392f;
  color: #d5e3dc;
  border-right: 1px solid #254c3e;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #547466 transparent;
}
.brand { gap: 11px; font-size: 25px; letter-spacing: 1.2px; }
.brand-symbol {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: #173d30;
  box-shadow: 0 4px 16px rgb(0 0 0 / 7%);
}
.brand small { color: #b1c8ba; font-size: 10px; letter-spacing: 1.6px; }
.sidebar-caption { margin: 41px 14px 13px; color: #b0c4b9; font-size: 11px; }
.sidebar nav { gap: 7px; }
.sidebar nav a {
  padding: 13px 14px;
  gap: 12px;
  min-height: 48px;
  font-size: 14px;
  border-radius: 12px;
  color: #d5e3dc;
  transition: background .18s, color .18s;
}
.sidebar nav a svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar nav a:hover { background: #214b3d; color: #fff; }
.sidebar nav a.active {
  color: #193b2c;
  background: var(--lime);
  box-shadow: 0 5px 18px rgb(0 0 0 / 7%);
  font-weight: 700;
}
.nav-count { padding: 1px 7px; border-radius: 6px; background: #36594a; color: #edf6ef; }
.active .nav-count { background: #bad67e; color: #193b2c; }
.side-course {
  margin: 30px 6px 18px;
  padding: 20px 18px;
  background: #1c4437;
  border-color: #3b5a49;
  border-radius: 16px;
  flex-shrink: 0;
}
.side-course strong { margin-top: 10px; font-size: 17px; }
.side-course>span:not(.tiny-pill):not(.side-spark), .side-course p { color: #bbcec1; }
.side-line { margin: 17px 0; background: #47634f; }
.side-spark { display: none; }
.side-footer { padding-top: 18px; color: #d8e5db; }
.side-footer small { color: #b2c8b9; }
.page { margin-left: var(--sidebar-width); }
.page>header {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 78px;
  height: auto;
  padding: 18px 38px;
  gap: 18px;
  background: rgb(255 255 255 / 97%);
  border-color: var(--line);
  backdrop-filter: blur(12px);
}
.breadcrumb { color: var(--muted); font-size: 14px; white-space: nowrap; }
.breadcrumb strong { font-weight: 650; }
.breadcrumb span { margin: 0 12px; }
.header-right { gap: 12px; min-width: 0; }
.course-chip { border-radius: 8px; background: #f5f8f4; color: #355a44; padding: 5px 11px; }
#account-email { color: #435e51; max-width: 185px; white-space: nowrap; }
.avatar { background: #e7f0e1; color: #315d42; width: 36px; height: 36px; font-weight: 700; flex-shrink: 0; }
.header-right .button { border-radius: 9px; min-height: 38px; padding: 7px 12px; }
.sync-banner {
  padding: 10px 38px;
  background: #ebf4eb;
  border-bottom: 1px solid #dceadd;
  color: #3d664b;
  font-size: 13px;
}
.sync-banner::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #438259;
  flex-shrink: 0;
}
.sync-error { color: #883b27; background: #fff1e8; border-color: #efd8c9; }
.sync-error::before { background: #a45131; }
main { max-width: 1360px; padding: 34px 38px 28px; }
.intro { gap: 20px; align-items: center; margin-bottom: 27px; }
.intro>div { min-width: 0; }
.intro p { color: var(--muted); font-size: 15px; margin-top: 10px; }
.eyebrow { font-size: 11px; font-weight: 700; color: #527160; letter-spacing: 1.5px; margin-bottom: 9px; }
.demo-badge {
  color: #3e674c;
  background: #edf4e9;
  border-color: #dae7d3;
  padding: 7px 12px;
  border-radius: 100px;
  font-size: 12px;
}

/* Dashboard */
.hero {
  min-height: 282px;
  padding: 35px 36px;
  margin-bottom: 22px;
  border-radius: 23px;
  background: #183f32;
  border-color: #284f3b;
  box-shadow: 0 10px 28px rgb(21 61 50 / 8%);
}
.hero::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid #497348;
  border-radius: 50%;
  right: -85px;
  top: -120px;
  opacity: .45;
  pointer-events: none;
}
.hero-copy { max-width: 58%; }
.hero .eyebrow { color: #dbefa9; }
.hero h2 { color: #f6faee; font-size: clamp(30px, 2.5vw, 38px); line-height: 1.25; letter-spacing: -1.1px; }
.hero p { max-width: 410px; color: #cfdec9; font-size: 15px; line-height: 1.75; }
.hero-tags { gap: 16px; color: #e0ebcc; font-size: 12px; margin-top: 22px; flex-wrap: wrap; }
.hero-tags svg { color: var(--lime); }
.forklift-art { width: 335px; height: 250px; right: 13px; bottom: 3px; }
.source-summary {
  padding: 20px 24px;
  margin-bottom: 20px;
  border-radius: 16px;
  border-color: var(--line);
  gap: 20px;
  box-shadow: var(--soft-shadow);
}
.source-summary strong { font-size: 16px; }
.source-summary p { font-size: 14px; color: var(--muted); line-height: 1.7; }
.section-heading { margin: 29px 0 17px; gap: 14px; }
.section-heading h2 { font-size: 21px; }
.section-heading>span { font-size: 13px; }
.panel { border-radius: 18px; border-color: var(--line); box-shadow: var(--soft-shadow); padding: 26px; }
.oral-home {
  position: relative;
  background: #edf4e7;
  border-color: #d4e3c8;
  padding: 26px;
  margin-bottom: 19px;
  gap: 24px;
}
.oral-home .eyebrow { color: #47733f; }
.oral-home h2 { font-size: 25px; }
.oral-home p { font-size: 15px; color: #4e6753; line-height: 1.75; margin-top: 8px; max-width: 650px; }
.modes { gap: 17px; }
.mode-card {
  border-radius: 18px;
  padding: 25px;
  border-color: var(--line);
  box-shadow: var(--soft-shadow);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.mode-card:hover { transform: translateY(-3px); border-color: #9ab99f; box-shadow: 0 9px 28px rgb(25 59 51 / 8%); }
.icon-box { width: 47px; height: 47px; border-radius: 14px; background: #edf4e4; color: #446f40; }
.mode-card:nth-child(2) .icon-box { background: #edf0fb; color: #5b65a0; }
.mode-card:nth-child(3) .icon-box { background: #fff0e2; color: #996335; }
.tag { padding: 4px 9px; border-radius: 7px; font-size: 12px; color: #526950; background: #f1f5ef; font-weight: 500; }
.mode-card h3 { margin: 20px 0 9px; font-size: 21px; }
.mode-card p { min-height: 78px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.mode-meta { padding: 17px 0 20px; gap: 12px; color: #55705b; font-size: 12px; flex-wrap: wrap; }
.mode-meta svg { width: 15px; height: 15px; }
.button {
  min-height: 46px;
  padding: 12px 19px;
  border-radius: 11px;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 650;
  text-align: center;
  transition: background .16s, border-color .16s, box-shadow .16s;
}
.button.primary { color: #fff; background: #184b36; }
.button.primary:hover { background: #246346; box-shadow: 0 3px 10px rgb(25 59 51 / 10%); }
.button.secondary { border-color: #d3dfd5; background: #fff; color: #254d39; }
.button.secondary:hover { border-color: #9db59d; background: #f3f7ef; }
.button.lime { background: var(--lime); color: #193d2c; }
.button:disabled { opacity: .55; }
.button-row { gap: 10px; }
.below { gap: 18px; margin-top: 22px; grid-template-columns: 1.4fr 1fr; }
.panel-header { gap: 14px; margin-bottom: 20px; }
.panel-header h3 { font-size: 17px; }
.text-link, .text-button { color: #356c44; font-size: 13px; text-underline-offset: 4px; }
.text-link:hover, .text-button:hover { text-decoration: underline; }
.stats-row { margin: 15px 0 22px; gap: 18px; }
.stat strong { font-size: 32px; color: var(--ink); }
.stat small { color: #667d61; font-size: 14px; }
.stat>span { font-size: 13px; color: var(--muted); margin-top: 4px; }
.progress-track { height: 7px; background: #eaf0e8; border-radius: 10px; }
.progress-track>span { background: #74a55a; border-radius: 10px; }
.progress-note { margin-top: 13px; font-size: 13px; color: #5a7356; }
.tip { background: #edf3e9; border-color: #dce6d6; }
.tip-title { color: #486d3f; font-size: 12px; margin-bottom: 15px; }
.tip h3 { font-size: 19px; }
.tip p { font-size: 15px; color: #596f53; line-height: 1.8; }
.material-note { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); color: #64755f; font-size: 12px; line-height: 1.9; }
.page>footer { max-width: 1360px; border-top: 1px solid var(--line); padding: 20px 38px 25px; color: #5f735b; font-size: 12px; }

/* Theory questions and tests */
.toolbar { gap: 15px; margin-bottom: 24px; }
.field { gap: 7px; }
.field label, .oral-draft-label { color: #526c5a; font-weight: 550; font-size: 14px; }
.field input, .field select, #oral-draft {
  min-height: 48px;
  padding: 12px 14px;
  border-color: #cfddd2;
  border-radius: 11px;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgb(25 59 51 / 2%);
}
.field select { padding-right: 38px; background-position: right 14px center; }
.field input::placeholder, #oral-draft::placeholder { color: #687a6e; }
.field input:focus, .field select:focus, #oral-draft:focus { border-color: #759a77; }
.question-count { font-size: 13px; color: #5b715f; }
.quiz-layout { grid-template-columns: minmax(0, 1fr) 212px; gap: 20px; }
.question-card { padding: 31px; }
.question-top { gap: 12px; margin-bottom: 20px; color: #5b715f; font-size: 13px; flex-wrap: wrap; }
.question-top .tag { flex-shrink: 0; }
.question-card h2 { margin: 24px 0; font-size: 23px; line-height: 1.55; letter-spacing: -.4px; }
.options { gap: 12px; }
.answer { border-radius: 12px; padding: 17px; font-size: 16px; line-height: 1.65; gap: 15px; border-color: #dbe5da; transition: background .15s, border-color .15s; }
.answer:hover { background: #f6f9f2; border-color: #89aa78; }
.answer-letter { width: 33px; height: 33px; border-radius: 9px; background: #f2f6ee; border-color: #e0e8d9; color: #4a6a42; font-size: 14px; font-weight: 650; }
.answer.selected { background: #eef5e7; border-color: #6d9258; }
.answer.correct { background: #eef6e9; border-color: #6a9454; box-shadow: inset 3px 0 0 #6a9454; }
.answer.correct .answer-letter { background: #d8eac9; border-color: #c8deb4; color: #2b572d; }
.answer.wrong { background: #fff1ee; border-color: #d99b90; box-shadow: inset 3px 0 0 #bf6759; }
.answer.wrong .answer-letter { background: #f8dbd5; border-color: #edc5bb; color: #883f32; }
.answer[aria-disabled=true]:hover { cursor: default; }
.explanation { padding: 21px; margin-top: 22px; border-radius: 13px; font-size: 16px; line-height: 1.85; background: #eef5e8; color: #355532; border: 1px solid #d6e4ca; }
.explanation.bad { background: #fff3ed; color: #774632; border-color: #eed8c9; }
.explanation strong { margin-bottom: 8px; font-size: 16px; }
.explanation small { opacity: 1; font-size: 12px; color: #566a4c; }
.explanation.bad small { color: #855e49; }
.question-source { color: #416d42; font-size: 12px; margin-top: 20px; overflow-wrap: anywhere; }
.question-figure { padding: 18px; border-radius: 13px; border-color: #dce6d7; margin-bottom: 24px; }
.quiz-actions { padding-top: 20px; border-top: 1px solid var(--line); margin-top: 25px; gap: 12px; }
.quiz-side { padding: 21px 18px; }
.quiz-side h3 { font-size: 17px; }
.question-map { gap: 7px; margin: 20px 0; }
.question-map button { border-radius: 8px; min-height: 36px; background: #f4f7f0; border-color: #dce6d5; color: #526d46; font-size: 12px; }
.question-map button.current { border-color: #396b3a; background: #eaf3df; color: #254e28; }
.question-map button.answered { background: #e1edcf; color: #3d622b; }
.map-pager .button { font-size: 11px; padding: 7px 5px; min-height: 35px; border-radius: 8px; }
.subtle { color: #5d7359; font-size: 14px; }
.timer { font-size: 31px; color: #244c34; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--red); }
.exam-cover { padding: 34px; border-radius: 22px; }
.exam-cover h2 { font-size: 29px; letter-spacing: -.7px; }
.exam-rules { gap: 14px; margin: 28px 0; }
.rule { padding: 20px; background: #eff5e9; border: 1px solid #e1e9d9; border-radius: 13px; }
.rule strong { font-size: 29px; color: #2e5837; }
.rule span { font-size: 13px; color: #5b7353; }
.empty { padding: 64px 28px; }
.empty h2 { font-size: 26px; }
.empty p { font-size: 16px; line-height: 1.8; }
.score-circle { background: #e6f1d9; color: #31592f; }
.stat-grid { gap: 18px; }
.stat-grid .stat { padding: 25px; border-radius: 18px; border-color: var(--line); box-shadow: var(--soft-shadow); }
.history { font-size: 15px; }
.history th { color: #59724e; font-size: 13px; font-weight: 600; background: #f4f7f0; }
.history th, .history td { padding: 16px 12px; border-color: #e2e9dc; }
.history tbody tr:hover { background: #fafcf7; }
.topic-progress { font-size: 14px; }
.review-item { padding: 23px 0; }
.review-item h3 { font-size: 18px; line-height: 1.65; }
.review-item p { font-size: 15px; }
.review-item details { font-size: 15px; line-height: 1.8; }

/* Oral study: reading rhythm and topic navigation, independent of the material text. */
.oral-overview { padding: 29px 30px; border-top: 3px solid #7c9f56; }
.oral-overview h2 { font-size: 27px; }
.oral-overview>p { max-width: 74ch; color: #586f53; font-size: 16px; line-height: 1.8; }
.oral-tabs { gap: 9px; margin: 23px 0 17px; }
.oral-tabs .button { min-height: 47px; border-radius: 11px; padding: 12px 18px; font-size: 15px; }
.oral-tabs .button[aria-pressed=true] { background: #23593c; color: #fff; border-color: #23593c; box-shadow: 0 3px 9px rgb(25 59 51 / 8%); }
.oral-foundations { margin-top: 12px; padding: 18px 23px; border-radius: 14px; box-shadow: none; }
.oral-foundations>summary { color: #355d3c; font-size: 15px; line-height: 1.7; padding: 2px 0; }
.oral-foundations>summary::marker { color: #638743; }
.oral-foundations[open] { border-color: #afc597; background: #fcfdf9; }
.oral-foundations[open]>summary { padding-bottom: 16px; border-bottom: 1px solid #dce6d1; margin-bottom: 20px; }
.oral-controls { margin: 27px 0 23px; }
.oral-layout { grid-template-columns: 224px minmax(0, 1fr); gap: 21px; }
.oral-index { padding: 21px 12px 14px; background: #fcfdfb; border-radius: 17px; }
.oral-index h2 { padding: 0 9px; font-size: 18px; }
.oral-index>p { padding: 5px 9px 16px; font-size: 13px; }
.oral-topic-list { gap: 5px; }
.oral-topic { align-items: flex-start; padding: 12px 10px; gap: 9px; border-radius: 10px; font-size: 14px; line-height: 1.65; color: #4e6653; }
.oral-topic>span:first-child { flex-shrink: 0; color: #597a45; font-weight: 650; min-width: 19px; }
.oral-topic:hover { background: #f0f5e9; }
.oral-topic.current { background: #e8f2dc; border-color: #c5d7ac; color: #2a512e; font-weight: 650; }
.oral-topic small { color: #466a37; margin-top: 4px; font-weight: 500; }
.oral-card { padding: 31px; border-radius: 19px; }
.oral-card h2 { font-size: 25px; line-height: 1.45; margin: 20px 0 12px; letter-spacing: -.5px; }
.oral-scope { font-size: 14px; color: #5c7455; line-height: 1.8; padding-bottom: 20px; margin-bottom: 24px; }
.oral-answer { background: #eef5e4; border: 1px solid #d7e5c4; border-left: 4px solid #84a65d; border-radius: 13px; padding: 23px; margin: 23px 0 28px; color: #2e5130; font-size: 17px; line-height: 1.85; }
.oral-answer .eyebrow { color: #496e38; font-size: 11px; margin-bottom: 12px; }
.oral-answer>p { margin: 0; }
.oral-memory { padding-top: 15px; margin-top: 16px!important; border-top: 1px solid #cfdcba; color: #46633a; font-size: 15px; }
.oral-reading { max-width: 74ch; font-size: 17px; line-height: 1.9; color: #3e5643; }
.oral-reading section { margin-top: 29px; }
.oral-reading h3 { font-size: 20px; line-height: 1.55; margin: 27px 0 12px; color: #224b2c; letter-spacing: -.25px; }
.oral-reading p { margin: 12px 0; }
.oral-reading ul, .oral-reading ol { padding-left: 25px; margin: 15px 0; }
.oral-reading li { margin: 12px 0; padding-left: 5px; }
.oral-reading li::marker { color: #4d763e; font-weight: 650; }
.oral-followup { margin: 20px 0; padding-bottom: 17px; border-bottom: 1px solid #e5ebdf; }
.oral-followup h4 { font-size: 16px; font-weight: 650; color: #2c5130; line-height: 1.65; }
.oral-faults { padding: 4px 0 4px 21px; border-left: 3px solid #c58b5b; }
.oral-references { margin: 30px 0 0; padding-top: 7px; }
.oral-references a:not(.button) { font-size: 14px; color: #47703c; }
.oral-references .subtle { font-size: 13px; color: #607752; }
.oral-table-wrap { border-radius: 10px; }
.oral-table-wrap table { font-size: 15px; line-height: 1.75; }
.oral-table-wrap th { font-size: 13px; }
.oral-self-rate { margin-top: 32px; padding-top: 21px; }
.oral-self-rate>p { color: #526e49; font-size: 14px; font-weight: 550; }
.oral-self-rate .button { min-width: 115px; }
.oral-recall-prompt { color: #41623b; font-size: 17px; line-height: 1.8; }
.oral-draft-label { margin-top: 24px; }
#oral-draft { padding: 16px; line-height: 1.85; }
.oral-full-detail { padding: 17px 0; }
.oral-full-detail>summary { color: #3e6734; font-size: 16px; line-height: 1.7; }
.oral-card, .oral-foundations, .oral-answer { overflow-wrap: break-word; }

/* Sign in, account forms and dialogs */
.signed-out {
  color: #e8f2df;
  background-color: #12392e;
  background-image: radial-gradient(ellipse at 12% 20%, #355c36 0, transparent 44%), radial-gradient(ellipse at 90% 90%, #284d38 0, transparent 48%);
}
.auth-screen { min-height: 100svh; padding: 44px 24px; }
.auth-screen>p { color: #e5efda; font-size: 16px; }
.auth-card {
  width: min(100%, 480px);
  padding: 38px 40px 31px;
  background: #fff;
  border: 1px solid #dfebdc;
  border-radius: 24px;
  color: var(--ink);
  box-shadow: 0 24px 90px rgb(0 20 10 / 24%);
}
.auth-card .brand { display: flex; padding: 0; color: #1b4633; margin-bottom: 31px; }
.auth-card .brand>span:last-child { display: block; }
.auth-card .brand small { color: #5c795a; }
.auth-card .brand-symbol { color: #173b2b; background: var(--lime); }
.auth-card h1 { font-size: 29px; margin: 21px 0 12px; line-height: 1.3; letter-spacing: -.9px; }
.auth-card p { color: #586e51; font-size: 15px; line-height: 1.8; }
.auth-card label { color: #335735; font-size: 14px; font-weight: 550; margin: 21px 0 8px; }
.auth-card input { border: 1px solid #cbdcc7; min-height: 50px; border-radius: 11px; background: #fcfdf9; color: var(--ink); font-size: 16px; padding: 12px 14px; }
.auth-card form>.button { display: block; margin-top: 27px; width: 100%; min-height: 49px; font-size: 16px; }
.auth-card .text-button { margin-top: 16px; font-size: 14px; color: #426e36; }
.auth-card #auth-message { color: #98492d; }
.auth-card #auth-message:empty { margin: 0; }
.auth-footer { margin-top: 28px; padding-top: 20px; border-color: #e0e8d8; }
.auth-footer a { text-decoration: underline; text-underline-offset: 4px; }
.admin-form { gap: 19px; margin-top: 23px; }
.admin-members>p { color: var(--muted); font-size: 14px; margin: 10px 0 19px; }
.admin-members #refresh-members { margin: 0 0 18px; }
.admin-members td .button { font-size: 13px; margin: 4px 0; }
dialog { border-radius: 21px; padding: 33px; max-height: calc(100svh - 40px); overflow-y: auto; border-color: #d5e2d0; }
dialog::backdrop { background: rgb(14 37 25 / 55%); backdrop-filter: blur(5px); }
dialog p { font-size: 15px; line-height: 1.85; color: #536b4b; }
dialog label { color: #42653a; font-size: 14px; }
dialog input:not([type=checkbox]) { font-size: 16px; border-radius: 10px; border-color: #c6d7bd; min-height: 48px; }
.dialog-close { min-width: 40px; min-height: 40px; top: 9px; right: 9px; border-radius: 10px; }
.dialog-close:hover { background: #f0f5e9; }
#toast { background: #184b36; border: 1px solid #416944; border-radius: 13px; padding: 14px 22px; box-shadow: 0 6px 30px rgb(17 47 24 / 16%); }

/* Smaller laptops and tablets */
@media (min-width: 1450px) {
  main { padding-top: 41px; }
  .hero { min-height: 300px; }
  .forklift-art { width: 385px; height: 275px; right: 25px; }
}
@media (max-width: 1150px) {
  :root { --sidebar-width: 210px; }
  .sidebar { padding: 29px 14px 22px; }
  .sidebar nav a { padding: 12px; gap: 11px; font-size: 13px; }
  .page>header { padding: 16px 27px; }
  main { padding: 29px 27px 25px; }
  .sync-banner { padding: 10px 27px; }
  .page>footer { padding-left: 27px; padding-right: 27px; }
  .hero { padding: 30px; }
  .hero-copy { max-width: 59%; }
  .hero h2 { font-size: 31px; }
  .forklift-art { width: 270px; height: 224px; right: 0; }
  .hero-tags { gap: 11px; }
  .modes { gap: 13px; }
  .mode-card { padding: 21px; }
  .mode-card h3 { font-size: 19px; }
  .mode-card p { min-height: 105px; font-size: 14px; }
  .mode-meta { gap: 8px; }
  .mode-card .tag { font-size: 11px; }
  .mode-card .icon-box { width: 40px; height: 40px; }
  .quiz-layout { grid-template-columns: minmax(0, 1fr) 190px; gap: 17px; }
  .question-card { padding: 25px; }
  .header-right { gap: 9px; }
  #account-email { max-width: 145px; }
}
@media (max-width: 1050px) {
  .oral-layout { grid-template-columns: minmax(0, 1fr); }
  .oral-index { padding: 18px 15px 12px; }
  .oral-topic-list { display: flex; width: 100%; gap: 8px; overflow-x: auto; padding-bottom: 9px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #9eb789 #ecf2e6; }
  .oral-topic { flex-shrink: 0; min-width: 170px; max-width: 205px; }
  .oral-index>p { padding-bottom: 12px; }
  .oral-card { padding: 28px; }
}
@media (min-width: 601px) and (max-width: 850px) {
  :root { --sidebar-width: 80px; }
  .sidebar { padding: 25px 11px 20px; }
  .sidebar .brand { padding: 0 6px; }
  .sidebar nav { margin-top: 38px; gap: 11px; }
  .sidebar nav a { min-height: 52px; padding: 15px 17px; font-size: 0; }
  .sidebar nav a svg { width: 22px; height: 22px; }
  .page>header { padding-left: 25px; padding-right: 25px; }
  .hero-copy { max-width: 62%; }
  .hero h2 { font-size: 29px; }
  .hero p { font-size: 14px; }
  .forklift-art { width: 235px; height: 205px; right: -12px; }
  .mode-card { padding: 18px; }
  .mode-card p { min-height: 115px; }
  .mode-card .mode-top { gap: 8px; flex-wrap: wrap; }
  .mode-card .tag { font-size: 10px; }
  .below { grid-template-columns: minmax(0, 1fr); }
  .quiz-layout { grid-template-columns: minmax(0, 1fr); }
  .quiz-side { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; }
  #practice .quiz-side { order: 0; }
  .quiz-side .question-map { flex-basis: 100%; order: 3; }
  .quiz-side .map-pager { flex-basis: 100%; order: 4; }
  .oral-home { align-items: flex-start; flex-direction: column; }
}

/* Phone layouts retain safe-area space for all six destinations. */
@media (max-width: 600px) {
  html { scroll-padding-top: 82px; -webkit-text-size-adjust: 100%; }
  :root { --sidebar-width: 0px; }
  .page { width: 100%; margin: 0; padding-bottom: calc(94px + env(safe-area-inset-bottom, 0px)); }
  .page>header { padding: 12px 16px; min-height: 66px; gap: 8px; flex-wrap: wrap; }
  .breadcrumb { font-size: 12px; }
  .breadcrumb span { margin: 0 8px; }
  .header-right { gap: 6px; }
  .header-right .button { padding: 8px 9px; min-height: 38px; font-size: 12px; }
  .sidebar {
    inset: auto 0 0;
    width: 100%;
    min-height: 76px;
    height: auto;
    padding: 7px 5px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #365b44;
    border-right: 0;
    overflow: visible;
    box-shadow: 0 -3px 18px rgb(20 49 32 / 12%);
  }
  .sidebar .brand { display: none; }
  .sidebar nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; margin: 0; }
  .sidebar nav a { min-height: 55px; padding: 8px 2px 6px; gap: 5px; flex-direction: column; justify-content: flex-start; border-radius: 10px; font-size: 10px; line-height: 1.35; white-space: normal; text-align: center; overflow-wrap: normal; }
  .sidebar nav a svg { width: 20px; height: 20px; }
  .sidebar nav a.active { box-shadow: none; }
  .sync-banner { padding: 10px 16px; gap: 9px; font-size: 12px; line-height: 1.55; }
  .sync-banner::before { width: 5px; height: 5px; }
  main { width: 100%; padding: 25px 16px 23px; }
  .intro { align-items: flex-start; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
  .intro>div { flex: 1 1 230px; }
  .intro h1 { font-size: 28px; line-height: 1.3; letter-spacing: -.8px; }
  .intro p { font-size: 14px; line-height: 1.75; margin-top: 8px; }
  .intro .eyebrow { font-size: 10px; line-height: 1.6; letter-spacing: 1.3px; }
  .demo-badge, .intro .demo-badge { max-width: none; margin-top: 0; font-size: 11px; padding: 5px 10px; white-space: normal; }
  .hero { min-height: 352px; padding: 26px 24px; align-items: flex-start; border-radius: 19px; margin-bottom: 18px; }
  .hero-copy { max-width: 100%; }
  .hero h2 { max-width: none; font-size: 29px; line-height: 1.28; letter-spacing: -.8px; }
  .hero p { max-width: 285px; color: #d5e3ce; font-size: 14px; line-height: 1.7; }
  .hero .eyebrow { font-size: 10px; }
  .hero-tags { flex-direction: column; align-items: flex-start; gap: 7px; max-width: 160px; margin-top: 22px; font-size: 11px; }
  .forklift-art { width: 188px; height: 154px; right: -3px; bottom: 4px; opacity: 1; }
  .hero::before { width: 300px; height: 300px; right: -150px; top: 45px; }
  .source-summary { padding: 19px; gap: 15px; margin-bottom: 18px; border-radius: 15px; flex-direction: column; align-items: flex-start; }
  .source-summary strong { font-size: 16px; }
  .source-summary p { font-size: 14px; }
  .source-summary .button { min-height: 42px; font-size: 14px; padding: 10px 14px; }
  #practice-diagrams { width: 100%; white-space: normal; font-size: 14px; }
  .section-heading { margin: 27px 0 16px; }
  .section-heading h2 { font-size: 21px; }
  .section-heading>span { font-size: 12px; }
  .panel, .oral-card, .oral-foundations { padding: 22px 20px; border-radius: 16px; }
  .oral-home { gap: 19px; padding: 23px 21px; margin-bottom: 16px; }
  .oral-home h2 { font-size: 24px; }
  .oral-home p { font-size: 15px; }
  .oral-home .button { width: 100%; }
  .modes { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .mode-card { padding: 24px 22px; border-radius: 17px; }
  .mode-card .mode-top { flex-wrap: nowrap; }
  .mode-card .icon-box { width: 45px; height: 45px; }
  .mode-card .tag { font-size: 12px; }
  .mode-card h3 { font-size: 22px; margin: 17px 0 8px; }
  .mode-card p { min-height: 0; font-size: 15px; }
  .mode-meta { font-size: 12px; padding: 16px 0 19px; }
  .mode-meta span:last-child { display: flex; }
  .mode-card .button { min-height: 46px; padding: 12px 16px; }
  .below { grid-template-columns: minmax(0, 1fr); gap: 15px; margin-top: 18px; }
  .panel-header h3 { font-size: 16px; }
  .panel-header .text-link { font-size: 12px; text-align: right; }
  .stats-row { gap: 10px; }
  .stat strong { font-size: 27px; }
  .stat small { font-size: 12px; }
  .stat>span { font-size: 12px; line-height: 1.6; }
  .progress-note { font-size: 12px; }
  .tip p { font-size: 15px; }
  .material-note { font-size: 12px; margin-top: 24px; }
  .page>footer { padding: 21px 18px 24px; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 11px; }
  .page>footer .text-button { font-size: 12px; }
  .toolbar { gap: 13px; margin-bottom: 20px; }
  .toolbar .field { min-width: 145px; }
  .field label { font-size: 13px; }
  .field input, .field select, input, select, textarea { font-size: 16px; }
  .quiz-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .question-card { padding: 23px 18px; }
  .question-top { margin-bottom: 18px; font-size: 12px; gap: 10px; }
  .question-top .tag { font-size: 11px; }
  .question-card h2 { margin: 22px 0; font-size: 21px; line-height: 1.6; }
  .answer { padding: 15px 12px; gap: 11px; font-size: 16px; border-radius: 11px; }
  .answer-letter { width: 29px; height: 29px; font-size: 13px; border-radius: 8px; }
  .explanation { padding: 18px 16px; font-size: 16px; }
  .question-figure { padding: 9px; }
  .quiz-actions { flex-wrap: wrap; padding-top: 20px; }
  .quiz-actions .button { flex: 1 1 120px; font-size: 14px; padding: 12px 10px; }
  .quiz-side { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px; }
  #practice .quiz-side { order: 0; }
  .quiz-side .question-map { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); flex-basis: 100%; order: 3; width: 100%; gap: 8px; }
  .quiz-side .map-pager { flex-basis: 100%; order: 4; width: 100%; }
  .question-map { margin: 7px 0; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .question-map button { width: auto; min-height: 44px; font-size: 13px; }
  .map-pager .button { min-height: 39px; font-size: 12px; }
  .exam-cover { margin-top: 0; padding: 26px 20px; }
  .exam-cover h2 { font-size: 26px; }
  .exam-rules { gap: 9px; margin: 23px 0; }
  .rule { padding: 15px 10px; }
  .rule strong { font-size: 25px; }
  .rule span { font-size: 12px; }
  .button-row .button { width: 100%; }
  .empty { padding: 45px 22px; }
  .empty h2 { font-size: 24px; }
  .history th, .history td { padding: 14px 8px; font-size: 12px; }
  .stat-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .stat-grid .stat { padding: 22px; }
  .topic-progress { font-size: 13px; grid-template-columns: 110px minmax(0, 1fr) 40px; }
  .oral-overview { padding: 24px 21px; }
  .oral-overview h2 { font-size: 25px; }
  .oral-overview>p { font-size: 16px; }
  .oral-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 22px 0 17px; }
  .oral-tabs .button { width: 100%; min-width: 0; min-height: 50px; font-size: 14px; padding: 12px 9px; }
  .oral-overview>.subtle { font-size: 13px; }
  .oral-foundations { padding: 17px 19px; border-radius: 13px; }
  .oral-foundations>summary { font-size: 14px; line-height: 1.75; }
  .oral-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 24px 0 21px; }
  .oral-controls .field { min-width: 0; }
  .oral-index { padding: 20px 13px 12px; }
  .oral-topic-list { gap: 8px; -webkit-overflow-scrolling: touch; }
  .oral-topic { min-width: 165px; max-width: 195px; min-height: 52px; padding: 12px 10px; font-size: 14px; }
  .oral-card { padding: 24px 20px; }
  .oral-card h2 { font-size: 23px; line-height: 1.5; letter-spacing: -.4px; margin: 20px 0 12px; }
  .oral-scope { font-size: 14px; padding-bottom: 19px; }
  .oral-answer { font-size: 16px; padding: 20px 17px; line-height: 1.9; border-radius: 11px; }
  .oral-answer .eyebrow { font-size: 10px; line-height: 1.6; }
  .oral-memory { font-size: 15px; }
  .oral-reading { font-size: 16px; line-height: 1.9; }
  .oral-reading h3 { font-size: 19px; line-height: 1.6; margin: 27px 0 12px; }
  .oral-reading ul, .oral-reading ol { padding-left: 22px; }
  .oral-reading li { padding-left: 3px; }
  .oral-self-rate .button-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oral-self-rate .button { min-width: 0; }
  .oral-references .button { width: 100%; white-space: normal; }
  .oral-references .subtle { font-size: 13px; }
  .oral-table-wrap table { min-width: 560px; font-size: 14px; }
  .oral-table-wrap th { font-size: 12px; }
  .auth-screen { padding: 24px 16px; }
  .auth-card { padding: 31px 25px 27px; border-radius: 21px; }
  .auth-card .brand { margin-bottom: 27px; }
  .auth-card h1 { font-size: 28px; }
  .auth-card p { font-size: 15px; }
  .admin-form { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .admin-members { max-width: 100%; overflow-x: auto; }
  dialog { padding: 30px 23px; max-height: calc(100svh - 32px); }
  dialog h2 { padding-right: 16px; font-size: 24px; }
  dialog p { font-size: 15px; }
  #toast { bottom: calc(94px + env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 32px); width: max-content; font-size: 14px; }
}
@media (max-width: 360px) {
  .intro h1 { font-size: 26px; }
  .hero { padding: 24px 20px; min-height: 365px; }
  .hero h2 { font-size: 27px; }
  .hero p { max-width: 245px; }
  .forklift-art { width: 162px; height: 135px; right: -7px; }
  .oral-card, .oral-overview { padding-left: 17px; padding-right: 17px; }
  .oral-card h2 { font-size: 21px; }
  .auth-card { padding-left: 23px; padding-right: 23px; }
  .stats-row { gap: 8px; }
  .stat strong { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none!important; animation: none!important; scroll-behavior: auto!important; }
}

/* Original OSK DACAR identity, including the compact phone header. */
.platform-brand { gap: 11px; letter-spacing: 0; }
.platform-brand .brand-logo {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e2e7e1;
  border-radius: 12px;
}
.platform-brand .brand-wordmark { min-width: 0; }
.platform-brand .brand-wordmark small {
  display: block;
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.platform-brand .brand-wordmark strong {
  display: block;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .1px;
  white-space: nowrap;
}
.sidebar .brand.platform-brand { padding: 0 5px; }
.sidebar .platform-brand .brand-wordmark strong { color: #fff; }
.sidebar .platform-brand .brand-wordmark small { color: #bdcec1; }
.page>header .header-brand { display: none; }
.auth-card .platform-brand .brand-wordmark strong { color: #1b4633; font-size: 21px; }
.auth-card .platform-brand .brand-wordmark small { color: #5c795a; }
@media (min-width: 851px) and (max-width: 1150px) {
  .sidebar .brand.platform-brand { gap: 9px; padding: 0; }
  .sidebar .platform-brand .brand-wordmark strong { font-size: 17px; }
}
@media (max-width: 850px) {
  .sidebar .brand.platform-brand { display: none; }
  .page>header .header-brand { display: flex; padding: 0; gap: 9px; }
  .page>header .header-brand .brand-wordmark { display: block; }
  .page>header .header-brand .brand-logo { width: 38px; height: 38px; flex-basis: 38px; border-radius: 9px; }
  .page>header .header-brand .brand-wordmark small { color: #5c795a; font-size: 9px; letter-spacing: 1.25px; margin-bottom: 2px; }
  .page>header .header-brand .brand-wordmark strong { color: #1b4633; font-size: 15px; }
  .page>header .breadcrumb { display: none; }
}
