/* Shared appearance controls, scalable type and a full dark palette. */
:root {
  --surface: #fff;
  --surface-raised: #f7f9fa;
  --font-scale: 1;
  color-scheme: light;
}
html[data-theme="dark"] {
  --ink: #edf3fa;
  --muted: #b7c5d7;
  --forest: #101e32;
  --green: #67d9e8;
  --line: #35455d;
  --bg: #0f172a;
  --surface: #172235;
  --surface-raised: #1e293b;
  --surface-muted: #233248;
  --green-soft: #18364a;
  --green-border: #3f7088;
  --green-text: #86dfeb;
  --red: #f0a19a;
  --soft-shadow: 0 5px 24px rgb(0 0 0 / 12%);
  color-scheme: dark;
}
.page { min-height: 100svh; display: flex; flex-direction: column; }
.page>main { width: 100%; flex: 1; }
.page>header { flex-wrap: wrap; }
.breadcrumb { color: var(--ink); font-size: .9375rem; }
.header-right { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.appearance-trigger { gap: 7px; flex-shrink: 0; white-space: nowrap; }
.appearance-trigger svg { width: 19px; height: 19px; flex-shrink: 0; }
.auth-appearance { display: none; }
.signed-out .auth-appearance {
  display: inline-flex;
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 2;
  background: rgb(255 255 255 / 9%);
  border-color: rgb(221 241 245 / 35%);
  color: #eff8fa;
}
.signed-out .auth-appearance:hover { background: rgb(255 255 255 / 16%); border-color: #c4dee4; }
.signed-out .auth-screen { padding-top: 90px; }
.auth-card { overflow-wrap: anywhere; }

.home-hero { min-height: 440px; margin: 0; padding: 48px; isolation: isolate; }
.home-hero .hero-copy { max-width: 59%; position: relative; z-index: 1; }
.home-hero h1 { font-size: clamp(2rem, calc(3vw * var(--font-scale)), 3rem); color: #fff; line-height: 1.22; letter-spacing: -1.3px; }
.home-hero p { font-size: 1rem; max-width: 40ch; margin-top: 19px; }
.home-hero .forklift-art { width: 46%; height: auto; max-height: 360px; right: 3px; bottom: 29px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-top: 30px; }
.hero-actions .button { gap: 15px; }
.hero-link { color: #edf6f8; font-size: .9375rem; text-decoration: underline; text-underline-offset: 5px; }
.hero-link:hover { color: var(--lime); }

.appearance-dialog {
  width: min(500px, calc(100% - 32px));
  padding: 32px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.appearance-dialog h2 { padding-right: 27px; font-size: 1.5rem; }
.appearance-dialog h3 { font-size: 1rem; letter-spacing: -.2px; }
.appearance-section { margin-top: 27px; }
.text-size-controls { display: flex; align-items: center; gap: 14px; margin: 14px 0 9px; }
.text-size-controls .button { width: 60px; min-height: 48px; padding: 9px; font-size: 1.125rem; }
#appearance-size { min-width: 65px; text-align: center; font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.appearance-dialog .text-button { font-size: .8125rem; min-height: 38px; }
.theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.theme-option { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); font-size: .8125rem; font-weight: 600; }
.theme-option:hover { border-color: var(--green-border); background: var(--surface-raised); }
.theme-option[aria-pressed="true"] { border-color: #457884; background: var(--green-soft); box-shadow: inset 0 0 0 1px #457884; }
.theme-preview { display: block; position: relative; width: 100%; height: 48px; border: 1px solid rgb(88 110 115 / 35%); border-radius: 6px; overflow: hidden; }
.theme-preview::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 23%; background: #192f38; }
.theme-preview::after { content: ''; position: absolute; left: 35%; right: 12%; top: 12px; height: 6px; border-radius: 2px; background: #8cb5be; box-shadow: 0 12px 0 rgb(116 142 148 / 40%); }
.preview-light { background: #f4f6f7; }
.preview-dark { background: #1b272c; }
.preview-system { background: linear-gradient(120deg, #f4f6f7 50%, #1b272c 50%); }
.appearance-dialog .appearance-hint { font-size: .8125rem; color: var(--muted); margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Actual surfaces and semantic feedback are recolored; diagrams retain their white canvas. */
[data-theme="dark"] .page>header { background: rgb(23 34 53 / 97%); }
[data-theme="dark"] :is(.panel, .mode-card, .stat-grid .stat, .oral-index, .oral-foundations, .auth-card, dialog, .study-view) { background: var(--surface); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] :is(input, select, textarea, .question-notes textarea) { color: var(--ink); background-color: #111d30; border-color: #465b76; }
[data-theme="dark"] :is(input, textarea)::placeholder { color: #9aaaae; }
[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23bcced2' stroke-width='1.8'%3E%3Cpath d='m3 5 4 4 4-4'/%3E%3C/svg%3E"); }
[data-theme="dark"] :is(.field label, .oral-draft-label, .question-notes label, dialog label, .auth-card label, .oral-reading, .oral-followup h4, .oral-recall-prompt, .oral-self-rate>p) { color: #d1e0e3; }
[data-theme="dark"] :is(.oral-reading h3, .oral-foundations>summary, .oral-full-detail>summary, .question-notes>summary, .timer) { color: var(--ink); }
[data-theme="dark"] :is(#account-email, .question-count, .oral-scope) { color: var(--muted); }
[data-theme="dark"] .course-chip { background: #293b43; color: #c9dfe4; }
[data-theme="dark"] .avatar { background: #2d4149; color: #e3f2f5; }
[data-theme="dark"] .progress-track { background: #2d4048; }
[data-theme="dark"] .progress-track>span { background: #81b4c0; }
[data-theme="dark"] :is(.text-link, .text-button, .source-link, .question-source, .oral-references a:not(.button), .oral-topic small) { color: var(--green-text); }
[data-theme="dark"] :is(.button.secondary, .study-view, .question-map button) { color: #e0ebee; background: var(--surface-raised); border-color: #485c61; }
[data-theme="dark"] :is(.button.secondary:hover, .study-view:hover, .question-map button:hover) { background: #2b3f47; border-color: #7ea8b2; }
[data-theme="dark"] :is(.button.primary, .oral-tabs .button[aria-pressed="true"]) { background: #9ad6e4; color: #172a32; border-color: #9ad6e4; }
[data-theme="dark"] :is(.button.primary:hover, .oral-tabs .button[aria-pressed="true"]:hover) { background: #b3e2ed; border-color: #b3e2ed; }
[data-theme="dark"] :is(.study-view.active, .question-bookmark.is-saved, .oral-topic.current, .question-map button.current) { background: #29424c; color: #d1ebf1; border-color: #7fb2be; }
[data-theme="dark"] :is(.study-view [data-study-count], .note-saved-label) { background: var(--surface-muted); color: #d1e3e7; }
[data-theme="dark"] .study-view.active [data-study-count] { background: #3b5b62; color: #e3f3f7; }
[data-theme="dark"] .question-notes { background: #162328; border-color: var(--line); }
[data-theme="dark"] .question-notes>summary::marker { color: #9ed0db; }
[data-theme="dark"] .answer { background: var(--surface); border-color: #485c60; color: var(--ink); }
[data-theme="dark"] .answer:hover { background: #23363e; border-color: #83b1bb; }
[data-theme="dark"] .answer-letter { background: #2a3940; border-color: #485c60; color: #d5e7eb; }
[data-theme="dark"] .answer.selected { background: #243f4b; border-color: #91bfc9; }
[data-theme="dark"] .answer.correct { background: #203a45; border-color: #6badbc; box-shadow: inset 3px 0 0 #6badbc; }
[data-theme="dark"] .answer.correct .answer-letter { background: #36525e; color: #e0f4f8; border-color: #6badbc; }
[data-theme="dark"] .answer.wrong { background: #472921; border-color: #d78b76; box-shadow: inset 3px 0 0 #d78b76; }
[data-theme="dark"] .answer.wrong .answer-letter { background: #63392e; color: #ffdfd3; border-color: #cb8c77; }
[data-theme="dark"] :is(.explanation, .oral-answer) { background: #20343c; border-color: #567b83; color: #daeaee; }
[data-theme="dark"] :is(.explanation small, .oral-answer .eyebrow, .oral-memory) { color: #bbd3d8; }
[data-theme="dark"] .oral-memory { border-color: #4a666c; }
[data-theme="dark"] :is(.explanation.bad, .study-unavailable, .sync-error) { background: #402a20; color: #f9d0b5; border-color: #875a42; }
[data-theme="dark"] .explanation.bad small { color: #e5baa1; }
[data-theme="dark"] :is(.review-wrong, .failure, .question-personal-status.is-error, .question-note-status.is-error, .auth-card #auth-message) { color: #ffb7a5; }
[data-theme="dark"] :is(.review-correct, .success) { color: #a4d8e4; }
[data-theme="dark"] :is(.rule, .question-map button.answered, .score-circle) { background: #23363e; color: #cee9ef; border-color: var(--line); }
[data-theme="dark"] .rule strong { color: #b6e1eb; }
[data-theme="dark"] .history th { background: #213138; color: #bfd1d5; }
[data-theme="dark"] .history tbody tr:hover { background: #213138; }
[data-theme="dark"] :is(.history th, .history td) { border-color: var(--line); }
[data-theme="dark"] .oral-topic { color: #d2e1e4; }
[data-theme="dark"] .oral-topic>span:first-child { color: #a4cfd9; }
[data-theme="dark"] .oral-topic:hover { background: #283c44; }
[data-theme="dark"] .oral-foundations[open] { background: #1a292f; }
[data-theme="dark"] .oral-reading li::marker { color: #a4cfd9; }
[data-theme="dark"] .oral-answer .eyebrow { color: #b1dee8; }
[data-theme="dark"] :is(.auth-card .platform-brand .brand-wordmark strong, .page>header .header-brand .brand-wordmark strong) { color: #e4eff1; }
[data-theme="dark"] .signed-out { background-color: #0f172a; background-image: radial-gradient(ellipse at 15% 10%, #16364f 0, transparent 50%); }
[data-theme="dark"] .dialog-close { color: var(--ink); }
[data-theme="dark"] .dialog-close:hover { background: var(--surface-raised); }
[data-theme="dark"] .theme-option[aria-pressed="true"] { border-color: #89b5bf; box-shadow: inset 0 0 0 1px #89b5bf; }
[data-theme="dark"] :is(button, a, input, select, textarea, summary):focus-visible { outline-color: #a4d9e5; }

@media (max-width: 1150px) {
  .home-hero { min-height: 420px; padding: 36px; }
  .home-hero .forklift-art { width: 45%; right: -2px; bottom: 40px; }
  .header-right { gap: 8px; }
}
@media (max-width: 850px) {
  .page>header .breadcrumb { display: block; order: 3; flex-basis: 100%; font-size: .8125rem; padding-top: 8px; border-top: 1px solid var(--line); }
  .appearance-trigger-label { display: none; }
  .header-right .appearance-trigger { min-width: 40px; min-height: 40px; padding: 8px; }
}
@media (max-width: 700px) {
  .home-hero { min-height: 0; padding: 30px 26px 6px; flex-direction: column; align-items: flex-start; }
  .home-hero .hero-copy { max-width: 100%; width: 100%; }
  .home-hero h1 { font-size: 2rem; max-width: 100%; }
  .home-hero h1 br { display: none; }
  .home-hero p { max-width: 100%; font-size: .9375rem; }
  .home-hero .forklift-art { position: relative; inset: auto; width: min(100%, 360px); max-height: none; align-self: center; margin: 14px 0 0; }
  .hero-actions { margin-top: 24px; gap: 17px; }
  .hero-actions .button, .hero-link { font-size: .875rem; }
  .page>header { gap: 10px; }
  .page>header .header-right { gap: 6px; }
  .appearance-dialog { padding: 30px 22px 24px; }
  .theme-options { gap: 7px; }
  .theme-option { padding: 9px; font-size: .75rem; }
  .signed-out .auth-appearance { right: 16px; top: 16px; }
  .signed-out .auth-appearance .appearance-trigger-label { display: inline; }
  html { scroll-padding-top: 160px; }
}
@media (max-width: 600px) {
  .sidebar nav a { overflow-wrap: normal; }
  .home-hero { padding-left: 24px; padding-right: 24px; }
  :is([data-text-size="130"], [data-text-size="140"]) .sidebar nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  :is([data-text-size="130"], [data-text-size="140"]) .sidebar nav a { flex-direction: row; justify-content: center; align-items: center; gap: 6px; min-height: 48px; padding: 8px 5px; text-align: left; }
  :is([data-text-size="130"], [data-text-size="140"]) .page { padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
  :is([data-text-size="130"], [data-text-size="140"]) #toast { bottom: calc(140px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 400px) {
  .theme-options { grid-template-columns: minmax(0, 1fr); }
  .theme-option { flex-direction: row; align-items: center; gap: 13px; }
  .theme-preview { width: 64px; flex: 0 0 64px; height: 38px; }
}

/* Restored dashboard summary follows the selected theme. */
[data-theme="dark"] .source-summary { background: var(--surface); color: var(--ink); border-color: var(--line); }


/* Answer outcomes keep the same meaning in the question map and review. */
.question-map button.is-correct{background:#dcfce7;color:#166534;border-color:#86c99b}
.question-map button.is-wrong{background:#fee2e2;color:#991b1b;border-color:#e8a0a0}
.question-map button.current{outline:2px solid #237284;outline-offset:2px}
.answer.correct{background:#e6f6eb;border-color:#309154;box-shadow:inset 3px 0 0 #309154}
.answer.correct .answer-letter{background:#caecd5;color:#14532d;border-color:#309154}
[data-theme="dark"] .question-map button.is-correct{background:#173e2a;color:#bbf7d0;border-color:#4b9b69}
[data-theme="dark"] .question-map button.is-wrong{background:#4c2025;color:#fecaca;border-color:#c06b74}
[data-theme="dark"] .answer.correct{background:#173e2a;border-color:#4b9b69;box-shadow:inset 3px 0 0 #4b9b69}
[data-theme="dark"] .answer.correct .answer-letter{background:#25593b;color:#bbf7d0;border-color:#4b9b69}

/* Pagination wraps inside narrow question navigation panels. */
.quiz-side .map-pager{display:flex;flex-wrap:wrap;gap:8px;min-width:0;max-width:100%}
.quiz-side .map-pager .button{flex:1 1 0;min-width:44px;min-height:40px;padding:10px;max-width:100%;white-space:normal;overflow-wrap:anywhere;justify-content:center;text-align:center;box-sizing:border-box}

.quiz-side .map-pager .button svg{width:20px;height:20px;flex-shrink:0;margin:auto}

/* Plain, readable practical-section label across all courses. */
.oral-home .eyebrow.practical-label,html body.tenant-body .oral-home .eyebrow.practical-label{color:#202020;font-family:Arial,Helvetica,sans-serif;font-weight:600;letter-spacing:0;text-transform:none}
[data-theme="dark"] .oral-home .eyebrow.practical-label,html[data-theme="dark"] body.tenant-body .oral-home .eyebrow.practical-label{color:#eef2f3}

.result-top h2.exam-outcome.is-passed{color:#16713b}
.result-top h2.exam-outcome.is-failed{color:#b42318}
[data-theme="dark"] .result-top h2.exam-outcome.is-passed{color:#a4e6b6}
[data-theme="dark"] .result-top h2.exam-outcome.is-failed{color:#ffb4b4}

/* Focused oral practice: consistent modes, local topic tools and a readable answer. */
.oral-workbench{max-width:1320px;margin:0 auto}
.oral-workbench .oral-page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:28px;margin-bottom:24px}
.oral-workbench .oral-page-heading>div{min-width:0;max-width:85ch}
.oral-workbench .oral-page-heading h1{margin:0;font-size:1.875rem;line-height:1.3;letter-spacing:-.5px}
.oral-workbench .oral-intro-description{max-width:85ch;font-size:.875rem;color:var(--muted);line-height:1.7;margin:10px 0 0}
.oral-workbench .oral-download{display:inline-flex;align-items:center;gap:8px;flex-shrink:0;font-size:.8125rem;min-height:40px;padding:9px 12px;white-space:normal;background:transparent;box-shadow:none}
.oral-workbench .oral-download svg{flex-shrink:0}
.oral-workbench .oral-mode-tabs{display:grid;grid-template-columns:repeat(var(--oral-mode-count,3),minmax(0,1fr));gap:4px;padding:5px;border:1px solid var(--line);border-radius:11px;background:var(--surface-muted);margin:0 0 26px;width:min(100%,780px)}
.oral-workbench .oral-mode-tabs .button{width:100%;min-width:0;min-height:43px;border:0;border-radius:7px;padding:10px 12px;font-size:.875rem;line-height:1.45;letter-spacing:0;background:transparent;color:var(--muted);box-shadow:none;font-weight:500;white-space:normal}
.oral-workbench .oral-mode-tabs .button:hover{background:var(--surface);color:var(--ink);filter:none}
html .oral-workbench .oral-mode-tabs .button[aria-pressed="true"]{background:var(--surface);color:var(--ink);font-weight:700;box-shadow:inset 0 -3px 0 var(--brand-accent,var(--lime));border-color:transparent}
.oral-workbench .oral-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:24px;align-items:start}
.oral-workbench .oral-index{padding:20px 14px;background:var(--surface);border-radius:12px;min-width:0}
.oral-workbench .oral-index>h2{font-size:1rem;margin:0;padding:0 6px 18px;line-height:1.5}
.oral-workbench .oral-topic-toggle{display:none}
.oral-workbench .oral-controls{display:grid;grid-template-columns:minmax(0,1fr);align-items:stretch;gap:13px;padding:0 6px 18px;margin:0;border-bottom:1px solid var(--line)}
.oral-workbench .oral-controls .field{min-width:0;width:100%;margin:0}
.oral-workbench .oral-controls label{display:block;font-size:.75rem;line-height:1.5;margin:0 0 6px;color:var(--muted);font-weight:500}
.oral-workbench .oral-controls :is(input,select){display:block;width:100%;min-width:0;max-width:100%;min-height:40px;padding:9px 10px;margin:0;border:1px solid var(--line);border-radius:7px;background:var(--surface-muted);color:var(--ink);font:inherit;font-size:.8125rem;line-height:1.5}
.oral-workbench .oral-random{font-size:.8125rem;line-height:1.5;justify-self:start;padding:3px 0;margin:0;color:var(--ink);text-decoration:underline;text-underline-offset:3px;min-height:28px}
.oral-workbench .oral-index .oral-topic-list{display:grid;gap:4px;margin:14px 0 0;padding:0;max-height:65vh;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;overscroll-behavior:contain}
.oral-workbench .oral-topic{width:100%;min-width:0;max-width:none;min-height:44px;font-size:.8125rem;line-height:1.65;padding:10px 8px;border-radius:7px;gap:9px;color:var(--ink);background:transparent;text-align:left}
.oral-workbench .oral-topic>span:first-child{min-width:18px;color:var(--muted);font-weight:500}
.oral-workbench .oral-topic>span:last-child{min-width:0;overflow-wrap:anywhere}
.oral-workbench .oral-topic small{font-size:.6875rem;margin-top:2px;color:var(--muted)}
.oral-workbench .oral-topic.current{font-weight:600}
.oral-workbench .oral-topic-empty{font-size:.8125rem;line-height:1.6;padding:8px;color:var(--muted)}
.oral-workbench .oral-card{min-width:0;padding:28px 32px;border-radius:12px;background:var(--surface);border-color:var(--line)}
.oral-workbench .oral-card>.question-top{font-size:.75rem;color:var(--muted);line-height:1.5;margin:0 0 14px}
.oral-workbench .oral-card>h2{max-width:65ch;font-size:1.375rem;line-height:1.5;letter-spacing:-.3px;margin:0 0 22px;color:var(--ink)}
.oral-workbench .oral-answer{max-width:74ch;padding:0;margin:24px 0;background:transparent;border:0;border-radius:0;box-shadow:none;color:var(--ink);font-size:1rem;line-height:1.85}
.oral-workbench .oral-answer .eyebrow{display:block;font-size:.75rem;line-height:1.6;letter-spacing:0;text-transform:none;font-weight:600;color:var(--muted);margin-bottom:10px}
.oral-workbench .oral-answer>p{margin:0}
.oral-workbench .oral-answer>.oral-memory{padding:13px 16px;margin:18px 0 0;background:var(--surface-muted);border:0;border-radius:8px;font-size:.875rem;line-height:1.75;color:var(--ink)}
.oral-workbench .oral-reading-details{margin:24px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:16px 0}
.oral-workbench .oral-reading-details>summary{cursor:pointer;font-size:.9375rem;font-weight:600;color:var(--ink);line-height:1.6;list-style-position:inside}
.oral-workbench .oral-reading-details[open]>summary{margin-bottom:20px}
.oral-workbench .oral-reading{max-width:74ch;font-size:1rem;line-height:1.85;color:var(--ink)}
.oral-workbench .oral-reading h3{font-size:1.0625rem;line-height:1.55;margin:26px 0 10px;color:var(--ink)}
.oral-workbench .oral-reading section{margin-top:24px}
.oral-workbench .oral-reading li{margin:8px 0}
.oral-workbench .oral-self-rate{margin:24px 0 0;padding:0;border:0;background:transparent}
.oral-workbench .oral-self-rate>p{font-size:.8125rem;color:var(--muted);line-height:1.6;margin:0 0 10px}
.oral-workbench .oral-self-rate .button-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:min(100%,360px);margin:0}
.oral-workbench .oral-self-rate .button{min-height:40px;padding:9px 14px;font-size:.875rem}
.oral-workbench #oral-feedback:empty{display:none}
.oral-workbench #oral-feedback{margin:10px 0 0}
.oral-workbench .quiz-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding-top:20px;margin-top:24px;border-top:1px solid var(--line)}
.oral-workbench .quiz-actions .button{min-width:0;width:100%;min-height:44px;font-size:.875rem;padding:11px 12px;line-height:1.5;white-space:normal}
.oral-workbench .oral-recall-prompt{font-size:.9375rem;line-height:1.75;color:var(--muted);margin-bottom:18px}
.oral-workbench .oral-foundations{background:var(--surface);border-color:var(--line)}
.oral-workbench :is(button,input,select,summary):focus-visible{outline:2px solid var(--brand-accent,var(--lime));outline-offset:3px}
@media(max-width:1050px){.oral-workbench .oral-layout{grid-template-columns:minmax(0,1fr)}.oral-workbench .oral-index{padding:0}.oral-workbench .oral-index>h2{display:none}.oral-workbench .oral-topic-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:15px 18px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.oral-workbench .is-topics-open .oral-topic-toggle svg{transform:rotate(180deg)}.oral-workbench .oral-index:not(.is-topics-open) .oral-topic-body{display:none}.oral-workbench .oral-topic-body{padding:0 12px 16px}.oral-workbench .oral-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;column-gap:16px}.oral-workbench .oral-random{grid-column:1/-1}.oral-workbench .oral-index .oral-topic-list{max-height:300px}}
@media(max-width:600px){.oral-workbench .oral-page-heading{gap:16px;flex-wrap:wrap;margin-bottom:20px}.oral-workbench .oral-page-heading h1{font-size:1.625rem}.oral-workbench .oral-download{min-height:36px;padding:7px 10px}.oral-workbench .oral-intro-description{font-size:.8125rem}.oral-workbench .oral-mode-tabs{gap:2px;padding:4px;margin-bottom:20px}.oral-workbench .oral-mode-tabs .button{font-size:.75rem;min-height:48px;padding:8px 5px}.oral-workbench .oral-layout{gap:16px}.oral-workbench .oral-card{padding:22px 20px}.oral-workbench .oral-card>h2{font-size:1.1875rem}.oral-workbench .oral-controls{grid-template-columns:minmax(0,1fr);gap:12px}.oral-workbench .oral-controls :is(input,select){font-size:.875rem}.oral-workbench .oral-topic{font-size:.875rem}.oral-workbench .oral-answer{font-size:1rem}.oral-workbench .oral-reading{font-size:1rem}}
@media(prefers-reduced-motion:reduce){.oral-workbench *{scroll-behavior:auto}}

/* Small personal tools; the private editor is shown only on request. */
.question-personal-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:10px 0 0}
.question-personal-tools .question-tool{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;min-width:0;padding:6px 10px;border-radius:7px;font-size:.8125rem;line-height:1.5;font-weight:500;white-space:normal;box-shadow:none}
.question-personal-tools .question-tool svg{width:16px;height:16px;flex-shrink:0}
.question-personal-tools .question-tool.is-saved,.question-personal-tools .question-note-toggle.is-open{font-weight:600}
.question-note-indicator{width:5px;height:5px;border-radius:50%;background:currentColor;flex-shrink:0}
.question-personal-status{margin:6px 0 0;font-size:.75rem;line-height:1.5}
.question-personal-status:empty{display:none}
.question-notes.question-note-editor{padding:18px;margin:18px 0 0;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:none}
.question-note-editor .question-note-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:8px}
.question-note-editor .question-note-heading h3{font-size:.9375rem;line-height:1.5;letter-spacing:0;margin:0;color:var(--ink)}
.question-note-editor .question-note-close{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 0;font-size:.8125rem;line-height:1.5;color:var(--muted);font-weight:500}
.question-note-editor .question-note-close span{font-size:1.125rem;line-height:1}
.question-note-editor>.subtle{font-size:.8125rem;line-height:1.6;margin:0 0 12px;color:var(--muted)}
.question-note-editor .question-note-label{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.question-note-editor textarea{display:block;width:100%;min-height:100px;padding:10px 12px;margin:0;border:1px solid var(--line);border-radius:7px;background:var(--surface-muted);color:var(--ink);font:inherit;font-size:.875rem;line-height:1.6;resize:vertical}
.question-note-editor .question-note-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}
.question-note-editor .question-note-footer .button-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0}
.question-note-editor .question-note-footer .button{min-height:34px;min-width:0;width:auto;padding:7px 12px;font-size:.8125rem;line-height:1.5;border-radius:7px}
.question-note-editor .question-note-footer .text-button{min-height:32px;padding:5px 0;font-size:.8125rem;line-height:1.5}
.question-note-editor .note-counter{font-size:.6875rem;color:var(--muted)}
.question-note-editor .question-note-status{font-size:.75rem;line-height:1.6;margin:10px 0 0}
.question-note-editor .question-note-status:empty{display:none}
@media(max-width:600px){.question-notes.question-note-editor{padding:15px}.question-note-editor .question-note-footer{align-items:flex-start}.question-note-editor .question-note-footer .button-row{flex:1 1 auto}}

/* Compact learner tools and an explicitly opened support conversation. */
.question-action-bar{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px 12px;margin:14px 0 18px}
.question-action-bar>#question-personal-top,.question-action-bar>#question-help{min-width:0;max-width:100%}
.question-action-bar .question-personal-tools{margin:0}
.question-action-bar .question-personal-status,.support-inline-status{font-size:.75rem;line-height:1.5;margin:6px 0 0;color:var(--muted)}
.support-inline-status:empty{display:none}
.question-help-tools{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.support-tool{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:6px 10px;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--muted);font:inherit;font-size:.8125rem;font-weight:500;line-height:1.5;cursor:pointer;white-space:normal;max-width:100%}
.support-tool svg{flex-shrink:0}
.support-tool:hover{background:var(--surface-muted);color:var(--ink)}
.support-tool.is-flagged{color:var(--ink);background:var(--surface-muted);border-color:var(--brand-accent,var(--green-border));font-weight:600}
.support-tool.is-flagged svg{fill:var(--brand-accent,var(--lime));stroke:currentColor}
.support-tool:focus-visible,.support-link:focus-visible,.support-close:focus-visible,.support-inbox-tabs button:focus-visible{outline:2px solid var(--brand-accent,var(--lime));outline-offset:3px}
html body .question-personal-tools .button.question-tool{min-height:34px;padding:6px 10px;font-size:.8125rem;line-height:1.5;border-radius:7px;font-weight:500}
[data-review-help]{margin-top:14px}
.support-link{padding:4px 0;border:0;background:none;font:inherit;font-size:.8125rem;color:var(--ink);line-height:1.5;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
dialog.support-dialog{width:min(680px,calc(100% - 28px));max-height:92svh;overflow-y:auto;padding:24px;border-radius:14px;background:var(--surface);color:var(--ink);border:1px solid var(--line)}
.support-dialog-top{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}
.support-dialog .support-dialog-top h2{font-size:1.375rem;line-height:1.4;margin:6px 0 0;padding:0;letter-spacing:-.3px}
.support-dialog-student{font-size:.8125rem;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}
.support-close{display:grid;place-items:center;min-width:34px;min-height:34px;padding:0;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--ink);font:inherit;font-size:1.5rem;line-height:1;cursor:pointer}
.support-question{font-size:.8125rem;line-height:1.7;border:1px solid var(--line);border-radius:8px;padding:11px 14px;margin-bottom:14px;background:var(--surface-muted)}
.support-question summary{cursor:pointer;font-weight:600;color:var(--ink)}
.support-question p{margin:10px 0 0;overflow-wrap:anywhere}
.support-ticket-state{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;font-size:.75rem;color:var(--muted);line-height:1.6}
.support-dialog .support-thread{display:grid;gap:10px;max-height:34svh;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;margin:18px 0;padding:1px}
.support-dialog .help-message{padding:12px 14px;border-radius:9px;border-color:var(--line);background:var(--surface-muted)}
.support-dialog .help-message-teacher{border-left:2px solid var(--brand-accent,var(--lime));background:var(--surface)}
.support-dialog .help-message-heading{gap:6px 14px}
.support-dialog .help-message-heading strong{font-size:.8125rem;font-weight:600}
.support-dialog .help-message time{font-size:.6875rem}
.support-dialog .help-message p{font-size:.875rem;line-height:1.75;margin:8px 0 0}
.support-thread-empty{font-size:.875rem;line-height:1.7;color:var(--muted);padding:14px 0;margin:0}
.support-dialog .support-reply{border-top:1px solid var(--line);padding-top:16px}
.support-dialog .support-reply label{font-size:.8125rem;font-weight:600;margin:0 0 8px}
.support-dialog .support-reply textarea{display:block;width:100%;min-height:88px;max-height:180px;padding:11px 12px;margin:0;border:1px solid var(--line);border-radius:8px;background:var(--surface-muted);color:var(--ink);font:inherit;font-size:.875rem;line-height:1.7;resize:vertical}
.support-feedback{font-size:.8125rem;line-height:1.6;color:var(--ink);margin:10px 0 0}
.support-feedback:empty{display:none}
.support-dialog-actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin-top:14px}
.support-dialog .support-dialog-actions .button{min-height:38px;padding:9px 13px;font-size:.8125rem;margin:0;max-width:100%;line-height:1.5;white-space:normal}
.support-dialog-actions [data-close-bottom]{margin-left:auto!important}
.support-board{max-width:1120px}
.support-board .help-board-header{align-items:center;margin-bottom:22px}
.support-board .help-board-header h1{margin:0;font-size:1.75rem;line-height:1.4;letter-spacing:-.4px}
.support-board .button{font-size:.8125rem;min-height:38px;padding:9px 13px;line-height:1.5}
.support-inbox-tools{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;flex-wrap:wrap;margin-bottom:20px}
.support-inbox-tabs{display:flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:9px;background:var(--surface-muted);flex-wrap:wrap}
.support-inbox-tabs button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:36px;padding:8px 11px;border:0;border-radius:6px;background:transparent;color:var(--muted);font:inherit;font-size:.8125rem;line-height:1.5;cursor:pointer}
.support-inbox-tabs button[aria-pressed="true"]{background:var(--surface);color:var(--ink);font-weight:650;box-shadow:inset 0 -2px 0 var(--brand-accent,var(--lime))}
.support-inbox-tabs button>span{font-size:.6875rem;min-width:18px;text-align:center;color:var(--muted)}
.support-search{display:flex;flex-direction:column;gap:6px;width:min(100%,320px);font-size:.75rem;color:var(--muted);line-height:1.5}
.support-search input{width:100%;min-width:0;min-height:40px;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;font-size:.8125rem}
.support-ranking{padding:13px 16px;border:1px solid var(--line);border-radius:10px;background:var(--surface);margin-bottom:16px;font-size:.8125rem;line-height:1.6;color:var(--muted)}
.support-ranking>summary{cursor:pointer;color:var(--ink);font-weight:600}
.support-ranking>summary>span{font-weight:400;font-size:.75rem;margin-left:7px;color:var(--muted)}
.support-ranking-list{list-style:decimal;margin:15px 0 0;padding:0 0 0 22px}
.support-ranking-list li{padding:12px 0;border-top:1px solid var(--line)}
.support-ranking-list strong{font-size:.8125rem;font-weight:600;color:var(--ink)}
.support-ranking-list p{margin:5px 0;overflow-wrap:anywhere}
.support-ranking-list li>span{font-size:.75rem}
.support-ticket-list{display:grid;gap:12px}
.support-ticket{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:18px 20px}
.support-ticket-main{min-width:0;flex:1}
.support-ticket-heading{display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.support-ticket-heading .help-student strong{font-size:.875rem;line-height:1.5}
.support-ticket-heading .help-student>span{font-size:.75rem}
.support-ticket .help-badge{font-size:.6875rem;padding:4px 7px}
.support-ticket .help-category{font-size:.6875rem}
.support-question-preview{font-size:.875rem;line-height:1.7;margin:5px 0 0;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.support-ticket>[data-help-open]{flex:0 0 auto;max-width:100%}
html body .question-notes.question-note-editor textarea{background:var(--surface-muted);color:var(--ink)}
@media(max-width:700px){.support-inbox-tools{gap:14px;align-items:stretch}.support-inbox-tabs{width:100%;flex-wrap:nowrap}.support-inbox-tabs button{flex:1;min-width:0;padding:8px 5px;gap:4px;font-size:.75rem}.support-search{width:100%}.support-ticket{align-items:stretch;flex-direction:column;gap:14px;padding:16px}.support-ticket>[data-help-open]{align-self:flex-start}.support-ticket-heading{gap:10px}.support-board .help-board-header h1{font-size:1.5rem}.question-action-bar{gap:8px;margin:12px 0 16px}.support-tool,html body .question-personal-tools .button.question-tool{min-height:36px}dialog.support-dialog{padding:20px 16px}.support-dialog .support-dialog-top h2{font-size:1.1875rem}.support-ticket-state{align-items:flex-start}.support-dialog .support-thread{max-height:30svh}.support-dialog-actions{gap:10px}.support-dialog-actions [data-send]{flex:1 1 auto}.support-dialog-actions [data-close-bottom]{margin-left:0!important}}

/* Account administration: a compact directory with separate edit dialogs. */
.member-admin{max-width:1440px;margin:0 auto;color:var(--ink)}
.member-admin-header{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}
.member-admin .member-admin-header h1{font-size:1.75rem;line-height:1.3;letter-spacing:-.5px;margin:0}
.member-admin-header p{font-size:.875rem;line-height:1.6;margin:8px 0 0;color:var(--muted)}
.member-header-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px}
html body .member-admin .member-header-actions .button{min-height:40px;min-width:0;padding:9px 14px;font-size:.875rem;line-height:1.5;border-radius:8px;white-space:normal}
.member-directory{background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:visible}
.member-directory-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) minmax(160px,210px) auto;align-items:end;gap:16px;padding:20px;border-bottom:1px solid var(--line)}
.member-admin #tenant-member-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-column:1/-1;gap:4px;width:min(100%,840px);padding:4px;margin:0;border:1px solid var(--line);border-radius:9px;background:var(--surface-muted)}
.member-admin #tenant-member-tabs [data-member-view]{width:100%;min-width:0;min-height:40px;padding:9px 12px;border:0;border-radius:6px;box-shadow:none;background:transparent;color:var(--muted);font-size:.8125rem;font-weight:500;line-height:1.5;text-align:center;white-space:normal}
.member-admin #tenant-member-tabs [data-member-view][aria-pressed="true"]{background:var(--surface);color:var(--ink);font-weight:650;box-shadow:inset 0 -3px 0 var(--brand-accent,var(--lime))}
.member-admin #tenant-member-tabs [data-member-view]:hover{color:var(--ink);background:var(--surface);filter:none}
.member-admin #tenant-member-tabs:has(button:only-child){display:none}
.member-search{display:flex;flex-direction:column;gap:6px;min-width:0;width:100%;max-width:520px;font-size:.75rem;line-height:1.5;color:var(--muted)}
.member-admin .member-search label{font-size:.75rem;line-height:1.5;margin:0;color:var(--muted)}
.member-admin .member-search input,.member-admin .member-status-filter select,.member-admin select.member-status-filter{display:block;width:100%;min-width:0;min-height:40px;padding:9px 11px;margin:0;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink);font:inherit;font-size:.875rem;line-height:1.5}
.member-status-filter{display:flex;flex-direction:column;gap:6px;min-width:170px;font-size:.75rem;line-height:1.5;color:var(--muted)}
.member-admin .member-status-filter label{font-size:.75rem;line-height:1.5;margin:0;color:var(--muted)}
.member-admin select.member-status-filter{width:auto;min-width:170px}
.member-account{display:grid;grid-template-columns:minmax(200px,1.35fr) minmax(170px,1fr) auto;align-items:center;gap:20px;min-width:0;padding:18px 20px;border-bottom:1px solid var(--line);background:transparent}
.member-account:last-child{border-bottom:0}
.member-identity{display:flex;flex-direction:column;gap:5px;min-width:0}
.member-identity strong{font-size:.9375rem;font-weight:650;line-height:1.5;overflow-wrap:anywhere;color:var(--ink)}
.member-identity small{font-size:.8125rem;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.member-access{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0;font-size:.8125rem;line-height:1.5;color:var(--muted)}
.member-access>small,.member-access time{font-size:.75rem;line-height:1.5;color:var(--muted)}
.member-status{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;max-width:100%;border-radius:6px;background:var(--surface-muted);color:var(--muted);font-size:.6875rem;font-weight:600;line-height:1.5}
.member-status:before{content:'';width:5px;height:5px;flex-shrink:0;border-radius:50%;background:currentColor}
.member-status.is-active{background:#e7f5eb;color:#276a3e}
.member-status.is-inactive{background:var(--surface-muted);color:var(--muted)}
.member-status.is-expired{background:#fff0e7;color:#964a23}
.member-access .text-button,.member-access [data-categories]{min-height:28px;padding:2px 0;margin:0;font-size:.75rem;line-height:1.5;letter-spacing:0;color:var(--muted);text-align:left}
.member-access [data-categories]:hover{color:var(--ink);text-decoration:underline;text-underline-offset:3px}
.member-account-actions{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
html body .member-admin .member-account-actions>.button,html body .member-admin .member-account-actions>button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:34px;padding:7px 11px;margin:0;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink);font:inherit;font-size:.8125rem;font-weight:550;line-height:1.5;white-space:normal;box-shadow:none}
html body .member-admin .member-account-actions>.button:hover,html body .member-admin .member-account-actions>button:hover{background:var(--surface-muted);filter:none}
.member-account-actions svg{width:16px;height:16px;flex-shrink:0}
.member-actions-menu{position:relative;flex-shrink:0}
.member-actions-menu>summary{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 9px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--muted);font-size:.8125rem;line-height:1.5;cursor:pointer;list-style:none;user-select:none}
.member-actions-menu>summary::-webkit-details-marker{display:none}
.member-actions-menu>summary:hover,.member-actions-menu[open]>summary{color:var(--ink);background:var(--surface-muted);border-color:var(--line)}
.member-actions-menu:not([open])>.member-action-dropdown{display:none}
.member-action-dropdown{position:absolute;right:0;top:calc(100% + 7px);z-index:40;display:flex;flex-direction:column;gap:3px;width:218px;max-width:calc(100vw - 44px);max-height:min(340px,65vh);overflow-y:auto;padding:6px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 28px rgb(0 0 0 / 14%)}
.member-admin .member-action-dropdown :is(button,a,.button){display:flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;min-width:0;min-height:36px;padding:9px 10px;margin:0;border:0;border-radius:6px;background:transparent;box-shadow:none;color:var(--ink);font:inherit;font-size:.8125rem;font-weight:500;line-height:1.5;text-align:left;white-space:normal}
.member-admin .member-action-dropdown :is(button,a,.button):hover{background:var(--surface-muted);filter:none}
.member-admin .member-action-dropdown .member-danger{margin-top:4px;border-top:1px solid var(--line);border-radius:0 0 6px 6px;padding-top:12px;color:#aa352b}
.member-admin .member-action-dropdown .member-danger:hover{background:#fff0ec;color:#8e281f}
.member-admin #tenant-member-feedback{font-size:.875rem;line-height:1.6;margin:0 0 18px;overflow-wrap:anywhere}
.member-admin #tenant-member-feedback:empty{display:none}
.member-admin #tenant-credentials:empty{display:none}
.member-directory #tenant-member-list>p{font-size:.875rem;color:var(--muted);line-height:1.7;padding:24px;margin:0}
.member-directory #tenant-member-list>h3{font-size:1rem;line-height:1.5;margin:18px 20px 6px}
.member-directory [data-back-staff]{font-size:.8125rem;line-height:1.5;min-height:32px;margin:0 20px 12px;padding:4px 0;color:var(--muted)}
.tenant-console.member-dialog{width:min(720px,calc(100% - 28px));padding:28px;border-radius:14px;max-height:92svh;background:var(--surface);color:var(--ink)}
.member-dialog>h2,.member-dialog .member-dialog-heading h2{font-size:1.375rem;line-height:1.4;letter-spacing:-.3px;margin:0 0 10px;padding-right:32px;color:var(--ink)}
.member-dialog>p,.member-dialog .member-dialog-heading p{font-size:.875rem;line-height:1.65;margin:0 0 22px;color:var(--muted);overflow-wrap:anywhere}
.member-dialog .dialog-close{position:absolute;right:18px;top:18px;float:none;width:32px;height:32px;min-height:32px;padding:0;font-size:1.375rem;line-height:1;border-radius:7px}
.member-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:18px}
.member-field{display:block;min-width:0;margin:0;font-size:.8125rem;line-height:1.5;font-weight:500;color:var(--ink)}
.member-dialog .member-field label,.member-dialog label.member-field{display:block;font-size:.8125rem;line-height:1.5;font-weight:550;margin:0;color:var(--ink)}
.member-dialog .member-field :is(input:not([type=checkbox]):not([type=radio]),select,textarea){display:block;width:100%;min-width:0;min-height:42px;padding:10px 12px;margin:7px 0 0;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;font-size:.875rem;font-weight:400;line-height:1.5}
.member-dialog .member-field textarea{min-height:100px;resize:vertical}
.member-dialog .member-field input[type=checkbox],.member-dialog .member-field input[type=radio]{width:18px;height:18px;flex-shrink:0;accent-color:var(--brand-accent,var(--lime));margin:0}
.member-dialog .member-field small,.member-dialog .member-field .subtle{display:block;font-size:.75rem;font-weight:400;line-height:1.6;margin-top:6px;color:var(--muted)}
.member-form-grid>.member-field-full,.member-form-grid>.is-full,.member-form-grid>[data-login],.member-form-grid>.member-category-select,.member-form-grid>.member-form-actions,.member-form-grid>[data-error]{grid-column:1/-1}
.member-dialog [data-login]{min-width:0}
.member-dialog [data-login] .member-field+.member-field{margin-top:16px}
.member-dialog .check-label{display:flex;align-items:center;gap:10px;font-size:.8125rem;line-height:1.5;margin:0}
.member-dialog .check-label input{margin:0;width:18px;height:18px;flex-shrink:0}
.member-category-select{min-width:0;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.member-category-select>summary{font-size:.875rem;font-weight:600;line-height:1.5;cursor:pointer;color:var(--ink);list-style-position:inside}
.member-category-select>p{font-size:.8125rem;line-height:1.65;color:var(--muted);margin:12px 0 0}
.member-dialog .tenant-category-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:340px;overflow-y:auto;overscroll-behavior:contain;margin:14px 0 0;padding:2px}
.member-dialog .tenant-category-checks label{align-items:flex-start;padding:10px;border-radius:8px;gap:9px;font-size:.8125rem;font-weight:400}
.member-dialog .tenant-category-checks strong{font-size:.8125rem;font-weight:600;line-height:1.5}
.member-dialog .tenant-category-checks small{font-size:.6875rem;line-height:1.55;margin-top:3px}
.member-dialog .tenant-category-checks input[type=checkbox]{width:18px;height:18px;margin:2px 0 0;accent-color:var(--brand-accent,var(--lime))}
.member-form-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding-top:20px;margin-top:22px;border-top:1px solid var(--line)}
html body .member-dialog .member-form-actions .button,html body .member-dialog .member-field .button,html body .member-dialog [data-generate]{min-height:38px;min-width:0;width:auto;padding:8px 13px;margin:0;border-radius:8px;font-size:.8125rem;line-height:1.5;white-space:normal}
html body .member-dialog [data-generate]{margin-top:10px}
.member-dialog [data-error]{font-size:.8125rem;line-height:1.6;overflow-wrap:anywhere;margin:14px 0 0}
.member-dialog [data-error]:empty{display:none}
.member-dialog .member-form-grid>[data-error]{margin:0}
.member-form-grid>.member-form-actions{margin-top:0;padding-top:18px}
.member-dialog .panel{padding:18px;border-radius:10px;background:var(--surface-muted);border-color:var(--line);box-shadow:none}
.member-dialog .panel h3{font-size:1rem;line-height:1.5;letter-spacing:0;margin:0 0 12px;color:var(--ink)}
.member-dialog dl{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 18px;margin:14px 0 0;font-size:.8125rem;line-height:1.5}
.member-dialog dt{color:var(--muted)}
.member-dialog dd{margin:0;color:var(--ink);text-align:right;font-weight:600;font-variant-numeric:tabular-nums}
.member-dialog .history{font-size:.8125rem}
.member-dialog .history :is(th,td){padding:10px 8px}
.member-dialog>ul{padding-left:20px;margin:18px 0;font-size:.875rem;line-height:1.7}
.member-dialog>ul>li{margin:8px 0}
.member-admin :is(button,input,select,summary,a):focus-visible,.member-dialog :is(button,input,select,summary,a,textarea):focus-visible{outline:2px solid var(--brand-accent,var(--lime));outline-offset:3px}
[data-theme="dark"] .member-status.is-active{background:#24412e;color:#c0e5c9}
[data-theme="dark"] .member-status.is-expired{background:#473127;color:#f2c5a0}
[data-theme="dark"] .member-action-dropdown{box-shadow:0 10px 28px rgb(0 0 0 / 30%)}
[data-theme="dark"] .member-admin .member-action-dropdown .member-danger{color:#ffb8ae}
[data-theme="dark"] .member-admin .member-action-dropdown .member-danger:hover{background:#422a26;color:#ffd2ca}
@media(max-width:1000px){.member-account{grid-template-columns:minmax(0,1fr) minmax(150px,.8fr);gap:14px 20px}.member-account-actions{grid-column:1/-1;padding-top:12px;border-top:1px solid var(--line)}.member-admin-header{align-items:flex-start;flex-wrap:wrap}}
@media(max-width:600px){.member-admin .member-admin-header h1{font-size:1.5rem}.member-admin-header{gap:16px;margin-bottom:18px}.member-header-actions{justify-content:flex-start;gap:8px}html body .member-admin .member-header-actions .button{font-size:.8125rem;padding:8px 11px;min-height:38px}.member-directory-toolbar{grid-template-columns:minmax(0,1fr);gap:14px;padding:15px}.member-admin #tenant-member-tabs{width:100%;gap:2px;padding:3px}.member-admin #tenant-member-tabs [data-member-view]{padding:8px 5px;font-size:.75rem;min-height:44px}.member-search{max-width:none}.member-status-filter{min-width:0;width:100%}.member-admin select.member-status-filter{width:100%;min-width:0}.member-account{grid-template-columns:minmax(0,1fr);padding:16px;gap:12px}.member-access{flex-direction:row;align-items:center;gap:6px 10px;flex-wrap:wrap}.member-account-actions{justify-content:flex-end}.member-form-grid{grid-template-columns:minmax(0,1fr);gap:16px}.tenant-console.member-dialog{padding:24px 18px;border-radius:12px}.member-dialog .dialog-close{right:14px;top:14px}.member-dialog .tenant-category-checks{grid-template-columns:minmax(0,1fr)}.member-form-actions{justify-content:stretch}html body .member-dialog .member-form-actions .button{flex:1 1 120px;min-height:40px}}

.member-backnav{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin:0 0 14px;font-size:.8125rem;line-height:1.5;color:var(--muted)}
.member-backnav a:hover{text-decoration:underline;text-underline-offset:3px;color:var(--ink)}
.member-tab-count{font-size:.6875rem;color:var(--muted);margin-left:7px;font-weight:500}
.member-admin #tenant-member-refresh{font-size:.8125rem;min-height:40px;padding:9px 12px;line-height:1.5}
.member-list-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:12px 20px;border-bottom:1px solid var(--line);font-size:.75rem;line-height:1.6;color:var(--muted)}
.member-assigned-heading{padding:18px 20px 8px}
.member-assigned-heading h2{font-size:1rem;line-height:1.5;margin:0}
.member-assigned-heading [data-back-staff]{margin:0 0 8px}
.member-row-feedback{font-size:.75rem;line-height:1.6;color:var(--ink);margin:4px 0 0}
.member-row-feedback:empty{display:none}
.member-empty{padding:36px 24px;text-align:center;color:var(--muted)}
.member-empty h2{font-size:1rem;line-height:1.5;color:var(--ink);letter-spacing:0;margin:0 0 10px}
.member-empty p{font-size:.875rem;line-height:1.7;margin:0 0 16px}
.member-admin .member-empty .button{font-size:.8125rem;padding:9px 14px;min-height:38px}
.member-dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 22px}
.member-dialog .member-dialog-header h2{font-size:1.375rem;line-height:1.4;margin:0;padding:0;letter-spacing:-.3px}
.member-dialog-close{display:grid;place-items:center;width:34px;min-width:34px;height:34px;padding:0;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--ink);font:inherit;font-size:1.5rem;line-height:1;cursor:pointer}
.member-dialog .member-dialog-person{font-size:.875rem;line-height:1.6;margin:0 0 20px;color:var(--ink);overflow-wrap:anywhere}
.member-dialog-person small{display:block;color:var(--muted);font-size:.8125rem;margin-top:4px}
.member-form-hint{font-size:.8125rem;line-height:1.7;color:var(--muted);margin:16px 0}
.member-dialog .member-field.check-label{display:flex;align-items:center;min-height:42px;padding-top:22px;gap:10px}
.member-category-actions{display:flex;flex-wrap:wrap;gap:16px;padding:12px 0 0}
.member-category-actions .text-button{font-size:.75rem;line-height:1.5;min-height:28px;padding:3px 0}
.member-create-success{font-size:.875rem;line-height:1.7;padding:14px 16px;background:var(--surface-muted);border-left:3px solid var(--brand-accent,var(--lime));border-radius:8px;margin:0 0 20px}
.member-error,.member-form-error{color:#a7332b}
[data-theme="dark"] :is(.member-error,.member-form-error){color:#ffb8ae}
.member-progress-category{border:1px solid var(--line);border-radius:10px;padding:0 16px;margin:12px 0;background:var(--surface)}
.member-progress-category>summary{font-size:.9375rem;line-height:1.6;font-weight:600;color:var(--ink);cursor:pointer;padding:15px 0;list-style-position:inside}
.member-dialog .member-progress-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 16px}
.member-progress-grid>div{padding:12px 14px;border-radius:8px;background:var(--surface-muted)}
.member-progress-grid dt{font-size:.75rem;line-height:1.5;color:var(--muted);margin:0 0 5px}
.member-dialog .member-progress-grid dd{text-align:left;font-size:1.125rem;line-height:1.5;font-weight:600;color:var(--ink)}
.member-progress-category>h3{font-size:.875rem;line-height:1.6;margin:18px 0 8px}
.member-progress-category .oral-table-wrap{margin-bottom:16px}
@media(max-width:750px){.member-directory-toolbar{grid-template-columns:minmax(0,1fr) auto}.member-search{grid-column:1/-1;max-width:none}.member-admin #tenant-member-refresh{align-self:end}.member-status-filter{min-width:0}}
@media(max-width:600px){.member-directory-toolbar{grid-template-columns:minmax(0,1fr) auto}.member-admin #tenant-member-tabs{grid-column:1/-1}.member-status-filter{width:auto}.member-admin #tenant-member-tabs [data-member-view]{font-size:.6875rem;padding:8px 5px}.member-tab-count{display:block;margin:3px 0 0}.member-dialog .member-progress-grid{grid-template-columns:minmax(0,1fr)}.member-dialog .member-field.check-label{padding-top:0}.member-list-heading{padding:12px 16px}.member-dialog .member-dialog-header h2{font-size:1.1875rem}}
.member-dialog #tenant-member-form label.member-field{margin:0;font-size:.8125rem;line-height:1.5;font-weight:550}
.member-dialog #tenant-member-form .member-field :is(input:not([type=checkbox]):not([type=radio]),select){min-height:42px;padding:10px 12px;margin:7px 0 0;border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;font-size:.875rem;line-height:1.5;font-weight:400}
.member-dialog #tenant-member-form .tenant-category-checks label{font-size:.8125rem;font-weight:400;gap:9px;padding:10px}
.member-dialog #tenant-member-form .tenant-category-checks input[type=checkbox]{width:18px;height:18px}

/* A single clear input for the e-mail confirmation code. */
.auth-card .email-mfa{margin-top:16px}
.auth-card .email-mfa>p{font-size:.875rem;line-height:1.75;color:var(--muted);margin:0 0 12px;text-align:left}
.auth-card .email-mfa .mfa-recipient{margin-bottom:8px}
.email-mfa .mfa-recipient strong{display:block;color:var(--ink);font-weight:600;overflow-wrap:anywhere}
.auth-card #mfa-form label{font-size:.8125rem;font-weight:600;margin:22px 0 8px}
.auth-card #mfa-code{font-variant-numeric:tabular-nums;font-size:1.5rem;font-weight:500;line-height:1.4;letter-spacing:.35em;text-align:center;padding:11px 12px 11px 20px;min-height:54px}
.auth-card #mfa-code::placeholder{color:var(--muted);opacity:.5}
.auth-card #mfa-form .button{margin-top:18px}
.auth-card .email-mfa .mfa-message{font-size:.8125rem;line-height:1.7;color:var(--ink);margin:14px 0 0}
.auth-card .email-mfa .mfa-message:empty{display:none}
.email-mfa .mfa-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.auth-card .email-mfa .mfa-actions .text-button{min-height:32px;padding:4px 0;margin:0;font-size:.8125rem;line-height:1.5;letter-spacing:0;text-align:left;color:var(--ink)}
.auth-card .email-mfa .mfa-actions .text-button:disabled{color:var(--muted);cursor:default}
.auth-card .email-mfa :is(input,button):focus-visible{outline:2px solid var(--brand-accent,var(--lime));outline-offset:3px}
@media(max-width:480px){.auth-card .email-mfa .mfa-actions{align-items:flex-start;gap:8px}.auth-card #mfa-code{font-size:1.375rem;min-height:52px}}
