/* Plantão 2.0 — linguagem clínica global. Este arquivo vem depois dos estilos legados. */
:root {
  color-scheme: dark;
  --paper: #06121c;
  --card: #0e2633;
  --ink: #effbfc;
  --muted: #adc5cf;
  --line: #315364;
  --green: #70d9a5;
  --mint: #153c3d;
  --amber: #efc477;
  --amberbg: #3b3028;
  --red: #f19d99;
  --redbg: #3d292e;
  --violet: #b9a5e8;
  --cyan: #6bd8df;
  --cyan-strong: #83e5eb;
  --surface: #0b202d;
  --surface-raised: #143342;
  --shadow: 0 18px 48px #010b13a6;
}
html { background: #06121c; }
body { min-width: 0; background: radial-gradient(ellipse 85% 42% at 60% -10%, #123747 0, transparent 78%), #06121c; color: var(--ink); }
body, button, input, select, textarea { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--cyan-strong); outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { color: #071b25; background: #8ae7e9; }

/* Estrutura: uma estação de estudo, com navegação lateral no desktop. */
.shell {
  width: min(1600px, calc(100% - 44px));
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  grid-template-areas: "top top" "nav hero" "nav stats" "nav sub" "nav content";
  grid-template-rows: auto auto auto auto 1fr;
  gap: 0 clamp(18px, 2.4vw, 38px);
  align-content: start;
  padding: 0 0 80px;
}
.shell > * { min-width: 0; }
.topbar { grid-area: top; position: relative; min-height: 84px; padding: 14px 4px; margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.brand { gap: 12px; font-size: 17px; letter-spacing: -.035em; }
.brand > span { display: flex; flex-direction: column; line-height: 1.1; }
.brand > span small { color: var(--muted); font-size: 12px; font-weight: 580; letter-spacing: .02em; }
.topbar .logo { width: 44px; height: 44px; border-radius: 13px; background: #174251; border: 1px solid #4b9faa; color: #a9f3f3; box-shadow: inset 0 1px #ffffff20; }
.topbar .portal-version { align-self: center; padding: 6px 8px; border: 1px solid #3c6879; border-radius: 6px; color: #88dfe5; font-size: 10px; font-weight: 790; letter-spacing: .07em; }
.actions { gap: 11px; }
.privacy { padding: 8px 12px; background: #0d2936; border: 1px solid var(--line); color: #bbd7dd; font-size: 12px; }
.privacy-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px #70d9a522; }
.account b { max-width: 180px; color: var(--ink); font-size: 13px; }
.account span, .signout { color: var(--muted); font-size: 11px; }
.avatar { background: #194554; color: #cbf7f7; border: 1px solid #4b8090; }
.signout:hover { color: #fff; }

.tabbar {
  grid-area: nav; position: sticky; top: 18px; align-self: start;
  display: flex; flex-direction: column; gap: 5px;
  width: 100%; min-height: 410px; margin: 0; padding: 18px 12px;
  background: linear-gradient(160deg, #0e2a39, #0a202c 75%);
  border: 1px solid var(--line); border-radius: 17px;
  box-shadow: 0 18px 44px #010b1359;
}
.nav-heading { padding: 4px 10px 14px; color: #83bac6; font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.tabbar .tab { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 46px; padding: 9px 11px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #c4dce1; font-size: 14px; font-weight: 670; text-align: left; box-shadow: none; }
.tabbar .tab:hover { background: #1c3b49; color: #fff; }
.tabbar .tab.active { background: #194454; color: #e8ffff; border-color: #508c98; box-shadow: inset 3px 0 #75dce1; }
.nav-glyph { display: grid; place-items: center; width: 22px; flex: none; color: #92d6dd; font-size: 18px; }
.nav-footer { margin: auto 10px 0; padding-top: 21px; border-top: 1px solid var(--line); color: #6fcbd5; font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.nav-footer span { display: block; margin-top: 6px; color: #87a7b3; font-size: 11px; font-weight: 520; letter-spacing: 0; }
.tabbar .vip-tab span:last-child { margin-left: auto; padding: 3px 5px; border-radius: 5px; background: #3b3155; color: #d9c9ff; font-size: 10px; }
.tabbar .vip-tab.active { background: #2c334c; border-color: #766397; box-shadow: inset 3px 0 var(--violet); }

.hero { grid-area: hero; min-height: 238px; padding: clamp(20px, 2.4vw, 32px); margin: 0; border-radius: 18px; border: 1px solid #396678; background: radial-gradient(ellipse 45% 100% at 2% 0%, #1a55606b, transparent), linear-gradient(115deg, #102c3c, #0d2636 62%, #123849); box-shadow: var(--shadow); }
.hero::after { right: 18%; top: -180px; width: 380px; height: 380px; border: 1px solid #a1f0f016; border-radius: 50%; pointer-events: none; }
.hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr); align-items: stretch; gap: clamp(20px, 3vw, 40px); }
.hero-intro { align-self: center; }
.hero .eyebrow { color: #8cdae0; font-size: 11px; letter-spacing: .13em; }
.hero .eyebrow span { color: #77a8b5; }
.hero h1 { max-width: 16ch; margin: 12px 0; font-size: clamp(32px, 3.3vw, 51px); line-height: 1.08; letter-spacing: -.055em; }
.hero-copy { max-width: 54ch; color: #c6dce2; font-size: 16px; line-height: 1.55; }
.focus { width: fit-content; margin-top: 20px; padding-top: 14px; border-color: #96d8dd35; }
.focus-num { width: 36px; height: 36px; background: #276473; color: #edffff; font-size: 18px; }
.focus-copy { color: #aac8cf; font-size: 12px; }
.focus-copy b { font-size: 14px; }
.hero .exam { align-self: stretch; display: flex; flex-direction: column; align-items: start; padding: clamp(17px, 2vw, 25px); border: 1px solid #4b7683; border-radius: 14px; background: #09202dcf; backdrop-filter: blur(7px); }
.hero .exam.empty { border-style: solid; }
.exam-label { color: #9cdee2; font-size: 11px; letter-spacing: .1em; }
.exam-title { font-size: 21px; line-height: 1.22; margin: 12px 0 7px; }
.exam-meta { color: #b7ced5; font-size: 13px; line-height: 1.45; }
.exam .btn { margin-top: auto; }
.stats { grid-area: stats; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 22px; }
.stats .stat { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #102936; box-shadow: none; }
.stat-label { color: #b0cbd3; font-size: 12px; margin-bottom: 11px; }
.stat-value { color: #f5ffff; font-size: clamp(25px, 2.6vw, 36px); }
.stat-sub { color: #9cb8c2; font-size: 12px; line-height: 1.35; }
.study-subnav { grid-area: sub; width: 100%; max-width: 100%; gap: 5px; margin: 0 0 19px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #0c2431; overflow-x: auto; }
.study-subtab { flex: 1; min-width: max-content; min-height: 40px; padding: 9px 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #bed6dd; font-size: 13px; }
.study-subtab:hover { background: #1c4050; }
.study-subtab.active { background: #1d5361; border-color: #4a98a3; color: #e8ffff; }
.shell > main { grid-area: content; min-width: 0; }
.shell:not([data-current-view="today"]) .hero,
.shell:not([data-current-view="today"]) .stats { display: none; }
.shell[data-current-view="today"] .hero { margin-bottom: 20px; }

/* Entrada pedagógica: ação recomendada primeiro, exploração deliberada depois. */
.learning-priority { border-color: #4c8991; background: linear-gradient(145deg, #12313e, #0d2634); }
.recommended-action, .exam-context { padding: 19px; border: 1px solid #477583; border-radius: 13px; background: #0a2230; }
.recommended-action h3, .exam-context h3 { margin: 8px 0; font-size: 21px; line-height: 1.2; }
.recommended-action p, .exam-context p, .review-honest p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.recommended-action .btn { display: block; width: fit-content; margin-top: 17px; }
.exam-context { margin-top: 12px; border-color: #8a724c; background: #292923; }
.exam-context .btn { margin-top: 8px; }
.recommendation-subject { color: #8fdee2; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.exam-context .recommendation-subject { color: #ecca8d; }
.review-honest { padding: 16px; background: #102c3a; border-radius: 10px; }
.review-honest b { color: #d8eef0; }
.review-honest p { margin: 8px 0 17px; }
.study-explore { display: flex; justify-content: space-between; gap: 20px; margin-top: 19px; padding: 22px; border: 1px solid var(--line); border-radius: 15px; background: #0b2230; }
.study-explore h2 { margin: 5px 0; font-size: 20px; }
.study-explore p { max-width: 60ch; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.study-explore-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: center; gap: 8px; max-width: 460px; }
.study-return { margin: 1px 0 17px; padding: 7px 0; border: 0; background: transparent; color: #92dbe1; font-size: 13px; font-weight: 750; cursor: pointer; }
.study-return:hover { color: #e7ffff; }
.mobile-study-intro { display: none; }
.knowledge-distribution { display: grid; gap: 9px; }
.knowledge-distribution > p, .learning-xray .bars > p { color: var(--muted); line-height: 1.55; }
.knowledge-count, .knowledge-sample > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.knowledge-count b { font-size: 21px; }
.knowledge-state { display: inline-block; width: fit-content; padding: 5px 9px; border: 1px solid #406275; border-radius: 6px; background: #193544; color: #c6e2e8; font-size: 11px; font-weight: 750; }
.knowledge-state.state-learning { color: #f4cc8a; border-color: #897248; background: #393227; }
.knowledge-state.state-comprehended, .knowledge-state.state-dominated { color: #a2edbe; border-color: #548a68; background: #1b4036; }
.knowledge-sample { margin-top: 15px; }
.knowledge-sample > div { align-items: start; font-size: 12px; }
.knowledge-sample > div span:first-child { max-width: 26ch; }
.topic-mark { color: #84cbd3; }

/* Componentes compartilhados e estados. */
.card, .subject, .study-subject, .mind-map, .atlas-macro, .atlas-micro, .atlas-guide, .profile-form-card, .profile-card { background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.card { border-radius: 16px; padding: clamp(18px, 2vw, 25px); }
.card h2, .feature-head h2, .community-head h2, .mind-map-heading h3 { color: #f2fcfd; letter-spacing: -.025em; }
.card h2 { font-size: 19px; }
.card-desc, .feature-head p, .community-head p, .mind-map-heading p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.feature-head { margin: 4px 0 20px; align-items: start; }
.feature-head h2 { font-size: clamp(23px, 2.4vw, 31px); }
.feature-badge, .admin-badge { background: #143d46; color: #a4e7e8; border: 1px solid #3d7780; border-radius: 7px; }
.btn { min-height: 39px; padding: 9px 14px; border-radius: 9px; font-size: 13px; font-weight: 760; transition: background .18s, border-color .18s, transform .18s; }
.btn-sm { min-height: 35px; padding: 7px 11px; font-size: 12px; }
.btn-primary, .btn-green { background: #69d6de; color: #082633; }
.btn-primary:hover, .btn-green:hover { background: #9cf0ef; }
.btn-soft { background: #173847; border: 1px solid #406779; color: #daf1f3; }
.btn-soft:hover { background: #285365; }
.btn:disabled, button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.danger { color: var(--red); background: var(--redbg); }
.pill, .score, .chip, .quiz-formats span { font-size: 12px; }
.pill.red { background: var(--redbg); color: var(--red); }
.pill.amber { background: var(--amberbg); color: var(--amber); }
.pill.green, .score { background: #183c3b; color: var(--green); }
.topic-row { min-width: 0; padding: 13px; border-color: var(--line); border-radius: 11px; }
.topic-row:hover { border-color: #5b929d; }
.topic-row.done { opacity: 1; background: #112c31; }
.topic-title, .review-name, .subject-name, .item-title { color: #eafafa; font-size: 14px; overflow-wrap: anywhere; }
.topic-meta, .review-date, .subject-count, .item-body, .item-meta, .mini { color: var(--muted); font-size: 12px; }
.score { font-size: 12px; }
.check { border-color: #6796a0; background: #0b202c; color: #061b23; }
.check.checked { background: var(--green); border-color: var(--green); }
.review-row, .notice, .shared-exam, .material, .study-material, .study-guide { border-color: var(--line); }
.empty, .study-empty, .lexicon-empty { padding: 28px; color: #b3ccd3; font-size: 14px; line-height: 1.5; background: #102a38; border: 1px dashed #436473; border-radius: 12px; }
.empty-icon { background: #204b4a; color: var(--green); }
.day { background: #112c39; border-color: var(--line); }
.day-name, .day-date { color: #e7f5f6; }
.chip { color: #d6ebec; background: #183d46; line-height: 1.45; }
.chip.study { background: var(--amberbg); color: #f4deb8; }
.subject { border-radius: 13px; }
.bar, .quiz-subject-stat .bar { background: #1f4350; }
.ring { background: conic-gradient(#63d7a3 calc(var(--p)*1%), #264653 0); }
.ring:after { background: var(--card); }
.ring-text { color: var(--muted); font-size: 12px; }
.bar-head { color: #dceff2; font-size: 13px; }
.filter-btn, .study-subject-head, .study-file-icon, .mind-map, .mind-canvas, .guide-chapters section, .mind-branch, .quiz-formats span, .quiz-kpi, .quiz-ai-status, .smart-callout { background: #102c3a; color: var(--ink); border-color: var(--line); }
.filter-btn { min-height: 38px; color: #c9e2e5; font-size: 13px; }
.filter-btn.active { background: #1b5663; border-color: #65b4bc; color: white; }
.study-subject-head { border-bottom-color: var(--line); }
.study-subject p, .study-file-meta, .mind-map summary small, .mind-map-heading > span { color: var(--muted); }
.study-file-icon { background: color-mix(in srgb, var(--subject-color, #75d6dd) 19%, #102e3b); color: #e7fcfb; }
.study-guide summary .study-file-icon { background: #1c4955; }
.guide-chapters section { border-top-color: var(--subject-color); }
.guide-chapters h4 { color: #e6f8f9; }
.guide-chapters p, .guide-chapters li { color: #c8dce1; font-size: 14px; }
.mind-canvas { background: radial-gradient(circle at center, #173b46, #0d2532 65%); }
.mind-branch { color: #ecf9fa; background: #12313d; }
.mind-branch-copy b, .mind-map-open, .study-guide-open { color: #d8f3f2; }
.mind-branch-copy em, .mind-branch-details>span>span, .mind-map-top p { color: #bfd6db; }
.mind-branch[aria-expanded="true"] { background: #19424c; }
.mind-branch-number { background: #24505b; color: #e5fcfa; }
.mind-expand-all { background: #163744; color: #daf5f4; }
.mind-center { color: #fff; }

.field label, .lexicon-search, .lexicon-filter { color: #e5f2f4; font-size: 13px; }
.field input, .field select, .field textarea, .lexicon-search input, .lexicon-filter select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #4c6c79; border-radius: 9px; background: #0a202c; color: #f0fbfc; font-size: 15px; }
.field input::placeholder, .field textarea::placeholder { color: #9cb6c1; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #75dae1; box-shadow: 0 0 0 3px #65d4db29; }
.modal-bg { background: #020b12d6; }
.modal { background: #102c39; color: #f0fcfc; border: 1px solid #4b7380; box-shadow: 0 24px 90px #000a; }
.modal > p, .field small { color: var(--muted); font-size: 13px; }
.toast { bottom: 28px; background: #17434e; border: 1px solid #5a96a0; color: #eefcfc; font-size: 13px; }
.upload-progress { color: #c2eede; background: #183e3a; }

/* Por matéria, atmosfera discreta em vez de troca de produto. */
.study-subject, .mind-map { --subject-accent: var(--subject-color, var(--map-color, var(--cyan))); }
.study-subject-head, .mind-map summary { border-left: 3px solid var(--subject-accent); }
.study-subject[style*="#d07d45"], .mind-map[style*="#d07d45"] { --subject-accent: #eab48c; }
.study-subject[style*="#0e6966"], .mind-map[style*="#0e6966"] { --subject-accent: #70d8d7; }
.study-subject[style*="#8a68a8"], .mind-map[style*="#8a68a8"] { --subject-accent: #bea6e0; }
.study-subject[style*="#4c74b8"], .mind-map[style*="#4c74b8"] { --subject-accent: #91b5e8; }

/* Turma, VIP, administração e perfil herdam a mesma estação clínica. */
.community-grid { gap: 16px; }
.file-icon { background: #214756; color: #c7eeee; }
.item-body { line-height: 1.55; }
.download { color: var(--cyan-strong); }
.account-stats .stat, .admin-hub button, .users-list article { background: #102a38; border-color: var(--line); color: #e5f4f5; }
.admin-hub button:hover { border-color: var(--cyan); }
.admin-hub button small { color: var(--muted); }
.vip-panel { --vip-ink: #f3f7ff; --vip-blue: #a9c4e5; --vip-gold: #c7b4ee; }
.vip-hero { background: radial-gradient(circle at 80% 20%, #5e648e70, transparent 40%), linear-gradient(135deg, #162a40, #29334f); border: 1px solid #655e84; }
.vip-kicker, .vip-seal strong { color: #d5c4fa; }
.vip-seal { border-color: #a995d1; }
.vip-toolbar { background: #0e2938; border-color: var(--line); }
.vip-toolbar button { color: #c4d9e0; }
.vip-toolbar button.active { background: #464163; color: #fff; }
.atlas-macro, .atlas-micro, .atlas-guide { color: #eaf6f7; }
.atlas-frame-head b, .atlas-micro-head h3, .lexicon-head h3 { color: #effafb; }
.atlas-frame-head span, .atlas-micro-head p { color: var(--muted); }
.atlas-attribution, .atlas-lexicon { background: #102a38; color: var(--muted); }
.lexicon-list button, .atlas-system-card, .scale-switch, .lexicon-search input, .lexicon-filter select { background: #0c2633; border-color: var(--line); color: #eaf8f8; }
.lexicon-list button:hover, .lexicon-list button.active, .atlas-system-card.active { background: #214052; border-color: #7895b9; }
.lexicon-head span, .lexicon-list span { color: #bdd1da; }
.profile-card { background: linear-gradient(135deg, #173c4a, #0d2d3c); }
.profile-card p, .profile-card small, .profile-intro p { color: #c6dbe0; }

/* Organismo Digital: escala conceitual, sem atribuir domínio à leitura. */
.organism-overview { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(0, 1.3fr); overflow: hidden; margin: 0 0 17px; border: 1px solid #416776; border-radius: 16px; background: linear-gradient(120deg, #0d2837, #112d3c); }
.organism-visual { display: grid; justify-items: center; align-content: center; padding: 14px 22px 20px; background: radial-gradient(ellipse at 50% 42%, #1e586770, transparent 65%), #0a1e2b; border-right: 1px solid #345765; }
.organism-visual svg { display: block; width: min(210px, 82%); height: auto; max-height: 320px; }
.organism-visual-label { color: #9ccbd2; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-align: center; }
.organism-explanation { align-self: center; padding: clamp(20px, 3vw, 38px); }
.organism-explanation h3 { margin: 10px 0; font-size: clamp(22px, 2.3vw, 32px); letter-spacing: -.04em; }
.organism-explanation > p { max-width: 55ch; color: #c6dce0; font-size: 15px; line-height: 1.6; }
.knowledge-scale { display: flex; flex-wrap: wrap; gap: 7px; margin: 24px 0; padding: 0; list-style: none; }
.knowledge-scale li { padding: 7px 9px; border: 1px solid #467482; border-radius: 7px; background: #1b3b49; color: #d6f0f1; font-size: 12px; }
.knowledge-scale li + li::before { content: '›'; margin-right: 9px; color: #7fdce2; }
.organism-explanation .organism-note { padding-top: 14px; border-top: 1px solid var(--line); color: #a8c4cd; font-size: 13px; }

@media (max-width: 1050px) {
  .shell { grid-template-columns: 190px minmax(0,1fr); gap: 0 18px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero-grid { grid-template-columns: minmax(0,1fr); }
  .hero .exam { min-height: 145px; }
}
@media (max-width: 800px) {
  .shell { display: flex; flex-direction: column; }
  .shell > main { order: 1; width: 100%; }
  .shell > .hero { order: 2; width: 100%; margin-top: 18px; }
  .shell > .topbar { order: 0; }
  .shell[data-current-view="today"] .hero { margin-bottom: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .hero::after, .hero-intro { display: none; }
  .hero .exam { min-height: 0; }
  .mobile-study-intro { display: block; margin: 10px 0 18px; }
  .mobile-study-intro h1 { margin: 7px 0; font-size: clamp(29px, 7vw, 40px); line-height: 1.1; }
  .mobile-study-intro p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
  .study-explore { display: block; }
  .study-explore-actions { justify-content: flex-start; margin-top: 15px; }
  .recommended-action, .exam-context { padding: 16px; }
  .shell { width: min(100% - 24px, 680px); display: flex; flex-direction: column; padding: 0 0 112px; }
  .topbar { min-height: 66px; padding: 10px 0; margin: 0 0 14px; }
  .topbar .brand { font-size: 15px; }
  .topbar .logo { width: 39px; height: 39px; }
  .topbar .privacy, .topbar .invite-top, .topbar .admin-top, .topbar .signout { display: none; }
  .topbar .avatar { display: grid; width: 36px; height: 36px; }
  .tabbar { display: none; }
  .hero { min-height: 0; padding: 22px; border-radius: 15px; }
  .hero h1 { max-width: none; font-size: clamp(29px, 7vw, 40px); }
  .hero-copy { font-size: 15px; }
  .hero-grid { gap: 19px; }
  .hero .exam { min-height: 138px; }
  .shell .hero .exam { min-height: 0; }
  .stats { margin: 11px 0 16px; gap: 8px; }
  .stats .stat { padding: 14px; }
  .study-subnav { margin: 0 0 15px; }
  .study-subtab { flex: none; min-height: 42px; font-size: 13px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); left: 9px; right: 9px; bottom: calc(8px + env(safe-area-inset-bottom)); padding: 6px; border: 1px solid #51808b; border-radius: 14px; background: #0d2a38f7; backdrop-filter: blur(10px); box-shadow: 0 8px 35px #0008; }
  .mobile-nav:has(#vipMobileButton:not([hidden])), .mobile-nav:has(#adminMobileButton:not([hidden])) { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .mobile-nav:has(#vipMobileButton:not([hidden])):has(#adminMobileButton:not([hidden])) { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .mobile-tab { min-height: 52px; padding: 7px 2px; color: #c0d9df; font-size: 11px; }
  .mobile-tab span { font-size: 17px; }
  .mobile-tab.active { color: #edffff; background: #235363; }
  .organism-overview { grid-template-columns: 1fr; }
  .organism-visual { border-right: 0; border-bottom: 1px solid #345765; }
  .organism-visual svg { max-height: 230px; }
  .organism-explanation { padding: 22px; }
  .toast { bottom: calc(83px + env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  .study-explore { padding: 17px; }
  .study-explore-actions { display: grid; grid-template-columns: 1fr; max-width: none; }
  .study-explore-actions .btn { width: 100%; text-align: left; }
  .shell { width: calc(100% - 20px); }
  .brand > span small { font-size: 11px; }
  .hero { padding: 18px; }
  .hero .eyebrow { font-size: 10px; }
  .hero h1 { font-size: 30px; }
  .stats .stat-value { font-size: 27px; }
  .card { padding: 17px; }
  .card-head, .feature-head, .study-toolbar { flex-wrap: wrap; }
  .study-file-actions { flex-wrap: wrap; justify-content: start; }
  .topic-row { grid-template-columns: auto minmax(0,1fr); }
  .score { grid-column: 2; width: max-content; }
  .modal { padding: 18px; }
  .mobile-tab { font-size: 10px; }
  .knowledge-scale li { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .shell *, .shell *::before, .shell *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
