:root {
  color-scheme: light;
  --ink: #17312d;
  --muted: #687570;
  --ivory: #f7f3ea;
  --paper: #fffdf8;
  --forest: #0d302d;
  --forest-2: #123f3a;
  --teal: #0d5755;
  --teal-soft: #d8ebe6;
  --coral: #e86f5d;
  --coral-soft: #f9ded8;
  --cyan: #35a7b2;
  --cyan-soft: #d9eff1;
  --gold: #c7933e;
  --gold-soft: #f3e8cb;
  --line: #dfe1d8;
  --shadow: 0 18px 50px rgba(19, 47, 43, .09);
  --radius: 22px;
  --sidebar: 264px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--ivory); color: var(--ink); font-family: Inter, system-ui, sans-serif; line-height: 1.6; }
main, article, section, div { min-width: 0; }
p, h1, h2, h3, h4, a { overflow-wrap: anywhere; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
:focus-visible { outline: 3px solid #f1b554; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1000; padding: 10px 14px; border-radius: 10px; background: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar); display: flex; flex-direction: column; padding: 28px 20px 20px; background: var(--forest); color: #edf3ef; }
.brand { padding: 0 8px 30px; }
.brand a { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand b { display: block; font-family: Fraunces, Georgia, serif; font-size: 21px; letter-spacing: .01em; }
.brand small { display: block; margin-top: -2px; color: #a8bdb7; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { position: relative; display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; }
.brand-mark::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 5px rgba(232,111,93,.14); }
.brand-mark i { position: absolute; width: 25px; height: 1px; background: rgba(255,255,255,.52); transform-origin: center; }
.brand-mark i:nth-child(2) { transform: rotate(60deg); }
.brand-mark i:nth-child(3) { transform: rotate(120deg); }
.nav-list { display: grid; gap: 4px; }
.nav-list a { display: flex; min-height: 46px; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: #bacbc6; font-size: 14px; font-weight: 500; text-decoration: none; transition: .18s ease; }
.nav-list a:hover { color: white; background: rgba(255,255,255,.07); }
.nav-list a.active { color: white; background: rgba(255,255,255,.11); box-shadow: inset 3px 0 var(--coral); }
.nav-icon { width: 22px; text-align: center; font-size: 18px; font-family: Georgia, serif; }
.sidebar-foot { margin-top: auto; padding: 20px 9px 0; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar { overflow-y: auto; }
.sidebar-foot p { margin: 0 0 10px; color: #94aaa4; font-size: 11px; line-height: 1.45; }
.sidebar-actions { display: flex; gap: 13px; }
.text-button { border: 0; padding: 4px 0; background: transparent; color: #d9e5e1; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.file-label input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.mobile-header { display: none; }
#app-main { min-height: calc(100vh - 110px); padding: 48px clamp(28px, 5vw, 76px) 80px; }
.page { width: min(1180px, 100%); margin: 0 auto; animation: page-in .35s ease both; }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px clamp(28px, 5vw, 76px); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--teal); font-weight: 600; }
.notice { position: sticky; top: 12px; z-index: 40; width: min(680px, calc(100% - 32px)); margin: 12px auto -52px; padding: 12px 44px 12px 16px; border: 1px solid #d5b66a; border-radius: 12px; background: #fff8dc; box-shadow: var(--shadow); color: #5d4b1e; font-size: 13px; }
.notice button { position: absolute; top: 7px; right: 8px; min-width: 32px; min-height: 32px; border: 0; background: transparent; cursor: pointer; }

h1, h2, h3, h4 { margin: 0; font-family: Fraunces, Georgia, serif; line-height: 1.13; font-weight: 600; }
h1 { max-width: 860px; font-size: clamp(38px, 5vw, 68px); letter-spacing: -.035em; }
h2 { font-size: clamp(28px, 3vw, 42px); letter-spacing: -.025em; }
h3 { font-size: 23px; }
h4 { font-size: 18px; }
p { margin: 0; }
.eyebrow { margin-bottom: 11px; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; margin-bottom: 38px; }
.page-intro > div:first-child > p:not(.eyebrow) { max-width: 690px; margin-top: 13px; color: var(--muted); font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.lede { max-width: 720px; color: var(--muted); font-size: 17px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 54px 0 22px; }
.section-head p { max-width: 480px; color: var(--muted); font-size: 13px; }

.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 9px; padding: 11px 18px; border: 1px solid transparent; border-radius: 12px; background: var(--teal); color: white; font-weight: 650; font-size: 13px; text-decoration: none; cursor: pointer; transition: transform .16s, background .16s; }
.button:hover { transform: translateY(-1px); background: #0a4947; }
.button.secondary { border-color: #bec9c4; background: transparent; color: var(--ink); }
.button.secondary:hover { background: white; }
.button.coral { background: #b94c3b; }
.button.gold { background: #9d702b; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.hero { position: relative; display: grid; min-height: 510px; grid-template-columns: 1.12fr .88fr; overflow: hidden; border-radius: 30px; background: var(--forest-2); box-shadow: 0 28px 70px rgba(13, 48, 45, .18); color: white; }
.hero-copy { position: relative; z-index: 2; padding: clamp(34px, 5vw, 72px); }
.hero-copy .eyebrow { color: #9ed2cb; }
.hero h1 { font-size: clamp(42px, 5.2vw, 76px); }
.hero-copy > p:not(.eyebrow) { max-width: 600px; margin-top: 20px; color: #c4d7d2; font-size: 16px; }
.hero .button.secondary { border-color: rgba(255,255,255,.35); color: white; }
.hero .button.secondary:hover { background: rgba(255,255,255,.08); }
.hero-visual { position: relative; display: grid; min-height: 420px; place-items: center; overflow: hidden; background: radial-gradient(circle at center, rgba(67,168,164,.18), transparent 62%); }
.hero-visual::before, .hero-visual::after { content: ""; position: absolute; width: 330px; height: 330px; border: 1px solid rgba(137,211,202,.18); border-radius: 50%; }
.hero-visual::after { width: 240px; height: 240px; border-style: dashed; animation: orbit 28s linear infinite; }
.hero-visual svg { position: relative; z-index: 2; width: min(100%, 390px); max-height: 480px; }
.hero-chip { position: absolute; z-index: 3; right: 24px; bottom: 24px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.22); border-radius: 100px; background: rgba(9,40,38,.72); color: #cce1dc; font-size: 11px; backdrop-filter: blur(8px); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.stat { padding: 21px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,253,248,.75); }
.stat strong { display: block; font-family: Fraunces, Georgia, serif; font-size: 30px; font-weight: 600; }
.stat span { color: var(--muted); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.progress-bar { height: 6px; overflow: hidden; border-radius: 20px; background: #e3e4dc; }
.progress-bar i { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.game-progress { margin-top: 18px; }
.mission-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin-top: 20px; }
.mission { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font-size: 12px; }
.mission small { display: block; color: var(--muted); }
.mission > span { font-size: 22px; color: var(--teal); }
.mission.earned { background: var(--teal-soft); border-color: #8eb4a7; }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { position: relative; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 8px 24px rgba(20,43,39,.035); }
.card > p { margin-top: 10px; color: var(--muted); font-size: 14px; }
.area-card { min-height: 240px; display: flex; flex-direction: column; overflow: hidden; }
.area-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -28px; bottom: -28px; border-radius: 50%; background: var(--accent-soft); }
.area-card .area-line { width: 36px; height: 4px; margin-bottom: 28px; border-radius: 4px; background: var(--accent); }
.area-card .meta { margin-top: auto; padding-top: 18px; color: var(--accent); font-size: 12px; font-weight: 700; }
.area-card.cardiaca { --accent: #b94c3b; --accent-soft: var(--coral-soft); }
.area-card.respiratoria { --accent: var(--cyan); --accent-soft: var(--cyan-soft); }
.area-card.ecocardioscopia { --accent: var(--gold); --accent-soft: var(--gold-soft); }
.area-card.integracao { --accent: var(--teal); --accent-soft: var(--teal-soft); }
.lesson-card { display: flex; min-height: 250px; flex-direction: column; }
.lesson-card .button { align-self: flex-start; margin-top: auto; }
.pill, .tag { display: inline-flex; min-height: 27px; align-items: center; padding: 4px 9px; border-radius: 100px; background: var(--teal-soft); color: var(--teal); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pill.cardiaca { background: var(--coral-soft); color: #9c3d31; }
.pill.respiratoria { background: var(--cyan-soft); color: #236c73; }
.pill.ecocardioscopia { background: var(--gold-soft); color: #76531a; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; }

.next-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; padding: 24px; border-radius: 18px; background: #e5eee9; }
.next-index { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 50%; background: var(--teal); color: white; font-family: Fraunces, Georgia, serif; font-size: 22px; }
.next-card p { color: var(--muted); font-size: 13px; }

.filter-row, .tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-row { margin-bottom: 24px; }
.filter, .tab { min-height: 42px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 100px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; }
.filter.active, .tab.active { border-color: var(--teal); background: var(--teal); color: white; }
.tabs { margin-bottom: 22px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 34px; align-items: start; }
.lesson-body { padding: clamp(25px,4vw,52px); border: 1px solid var(--line); border-radius: 25px; background: var(--paper); }
.lesson-body section + section { margin-top: 42px; }
.lesson-body section > p { margin-top: 13px; color: #485953; white-space: pre-line; }
.lesson-aside { position: sticky; top: 24px; display: grid; gap: 14px; }
.lesson-aside .card { padding: 20px; }
.objective-list, .pearl-list, .plain-list { margin: 14px 0 0; padding: 0; list-style: none; }
.objective-list li, .plain-list li { position: relative; padding: 8px 0 8px 24px; border-bottom: 1px solid #ebece6; font-size: 13px; }
.objective-list li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 7px; height: 7px; border: 2px solid var(--teal); border-radius: 50%; }
.step-list { margin: 18px 0 0; padding: 0; counter-reset: steps; list-style: none; }
.step-list li { position: relative; padding: 0 0 27px 52px; counter-increment: steps; }
.step-list li::before { content: counter(steps, decimal-leading-zero); position: absolute; left: 0; top: 0; color: var(--teal); font-family: Fraunces, Georgia, serif; font-weight: 700; }
.step-list li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 29px; bottom: 5px; width: 1px; background: var(--line); }
.step-list p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.callout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.callout { padding: 20px; border-radius: 15px; background: var(--teal-soft); }
.callout.warning { background: var(--coral-soft); }
.callout h4 { margin-bottom: 10px; }
.callout ul { margin: 0; padding-left: 18px; font-size: 13px; }
.citation-list { display: grid; gap: 8px; margin-top: 14px; }
.citation { display: block; padding: 10px 12px; border-left: 3px solid var(--gold); background: #f7f2e6; color: #53605c; font-size: 12px; text-decoration: none; }
.citation:hover { color: var(--teal); }

.lab-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 25px; background: var(--paper); box-shadow: var(--shadow); }
.lab-content { display: grid; min-height: 570px; grid-template-columns: minmax(320px, 1.15fr) minmax(280px, .85fr); }
.lab-stage { position: relative; display: grid; min-height: 520px; place-items: center; overflow: hidden; padding: 32px; background: var(--forest-2); color: white; }
.lab-stage::before { content: ""; position: absolute; width: 440px; height: 440px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 55px rgba(255,255,255,.025), 0 0 0 110px rgba(255,255,255,.018); }
.lab-stage svg { position: relative; z-index: 2; width: min(100%, 460px); max-height: 490px; }
.focus-point { cursor: pointer; }
.lab-panel { padding: clamp(25px, 4vw, 44px); }
.lab-panel h2 { margin-bottom: 12px; }
.lab-panel > p { color: var(--muted); }
.select-list { display: grid; gap: 8px; margin-top: 22px; }
.select-list button { min-height: 48px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: white; text-align: left; cursor: pointer; }
.select-list button:hover, .select-list button.active { border-color: var(--teal); background: var(--teal-soft); }
.lab-detail { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-row { margin-top: 13px; }
.detail-row b { display: block; color: var(--teal); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.detail-row p { margin-top: 3px; color: #50605b; font-size: 13px; }
.sound-phase { display: flex; height: 72px; align-items: center; gap: 5px; margin: 22px 0; padding: 14px; overflow: hidden; border-radius: 12px; background: var(--forest); }
.sound-phase i { width: 4px; height: 15%; border-radius: 4px; background: #85d3c9; animation: sound 1s ease-in-out infinite alternate; animation-play-state: paused; }
.sound-phase.playing i { animation-play-state: running; }
.sound-phase i:nth-child(3n) { animation-delay: -.3s; height: 70%; }
.sound-phase i:nth-child(4n) { animation-delay: -.6s; height: 38%; }

.quiz-setup { display: grid; grid-template-columns: .9fr 1.1fr; gap: 22px; }
.setup-card { padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); }
.choice-row { display: grid; gap: 8px; margin: 16px 0 24px; }
.choice-row label { position: relative; display: flex; min-height: 48px; align-items: center; gap: 11px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.choice-row label:has(input:checked) { border-color: var(--teal); background: var(--teal-soft); }
.quiz-shell { max-width: 820px; margin: 0 auto; }
.quiz-progress { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.quiz-card { padding: clamp(25px,5vw,52px); border: 1px solid var(--line); border-radius: 26px; background: var(--paper); box-shadow: var(--shadow); }
.quiz-card h2 { margin: 15px 0 28px; font-size: clamp(25px,3.4vw,39px); }
.option-list { display: grid; gap: 10px; }
.option { position: relative; display: grid; min-height: 58px; grid-template-columns: 28px 1fr; align-items: center; gap: 12px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--teal); background: #eef6f2; }
.option input { position: absolute; opacity: 0; }
.option-letter { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #bec8c3; border-radius: 50%; font-size: 11px; font-weight: 700; }
.confidence { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 25px; padding-top: 21px; border-top: 1px solid var(--line); }
.confidence > span { width: 100%; color: var(--muted); font-size: 12px; }
.confidence label { cursor: pointer; }
.confidence input { position: absolute; opacity: 0; }
.confidence b { display: inline-flex; min-height: 42px; align-items: center; padding: 8px 13px; border: 1px solid var(--line); border-radius: 100px; font-size: 12px; }
.confidence input:checked + b { border-color: var(--teal); background: var(--teal); color: white; }
.feedback { margin-top: 25px; padding: 22px; border-radius: 15px; background: var(--coral-soft); }
.feedback.correct { background: var(--teal-soft); }
.feedback h3 { margin-bottom: 7px; }
.feedback > p { font-size: 14px; }
.option-feedback { display: grid; gap: 7px; margin-top: 17px; }
.option-feedback p { padding: 9px 11px; border-radius: 9px; background: rgba(255,255,255,.62); font-size: 12px; }
.option-feedback b { margin-right: 5px; }
.result-score { display: grid; width: 150px; height: 150px; margin: 12px auto 28px; place-items: center; border: 10px solid var(--teal-soft); border-radius: 50%; font-family: Fraunces, Georgia, serif; font-size: 38px; color: var(--teal); }

.case-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.case-card { min-height: 230px; display: flex; flex-direction: column; }
.case-card .button { align-self: flex-start; margin-top: auto; }
.vitals { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.vitals span { padding: 6px 9px; border-radius: 8px; background: #e8eeea; font-size: 11px; }
.stage-line { display: flex; gap: 5px; margin: 16px 0 30px; }
.stage-line i { height: 5px; flex: 1; border-radius: 5px; background: var(--line); }
.stage-line i.done { background: var(--teal); }

.supervisor-hero { display: grid; grid-template-columns: 1fr auto; gap: 30px; padding: 36px; border-radius: 24px; background: var(--forest-2); color: white; }
.supervisor-hero p { max-width: 730px; margin-top: 12px; color: #bfd1cc; }
.supervisor-symbol { display: grid; width: 94px; height: 94px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; font-family: Fraunces, Georgia, serif; font-size: 37px; }
.weak-row { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.weak-row p { color: var(--muted); font-size: 12px; }
.weak-count { color: var(--coral); font-weight: 700; }

.search-box { position: relative; margin-bottom: 24px; }
.search-box input { width: 100%; height: 52px; padding: 12px 16px 12px 44px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); color: var(--ink); }
.search-box::before { content: "⌕"; position: absolute; left: 16px; top: 9px; color: var(--muted); font-size: 22px; }
.source-list { display: grid; gap: 10px; }
.source { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); }
.source h3 { font-family: Inter, sans-serif; font-size: 14px; font-weight: 650; }
.source p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.source a { align-self: center; color: var(--teal); font-size: 12px; font-weight: 700; }
.access { display: inline-flex; margin-top: 10px; padding: 3px 7px; border-radius: 5px; background: var(--gold-soft); color: #70501a; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.comparison { width: 100%; border-collapse: collapse; font-size: 13px; }
.comparison th, .comparison td { padding: 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.comparison th { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.comparison td:first-child { font-weight: 700; color: var(--teal); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.method-card { min-height: 210px; }
.method-card .number { display: block; margin-bottom: 22px; color: var(--coral); font-family: Fraunces, Georgia, serif; font-size: 30px; }
.external-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.external { display: block; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); text-decoration: none; }
.external:hover { border-color: var(--teal); }
.external b { display: block; }
.external span { color: var(--muted); font-size: 12px; }

.empty { padding: 45px 25px; border: 1px dashed #bdc6c1; border-radius: 18px; text-align: center; color: var(--muted); }
.loading-view { display: grid; min-height: 65vh; align-content: center; justify-items: center; text-align: center; }
.loading-view h1 { font-size: clamp(30px,5vw,50px); }
.loading-orbit { display: grid; width: 70px; height: 70px; margin-bottom: 24px; place-items: center; border: 1px solid #bdc9c4; border-radius: 50%; animation: orbit 2.2s linear infinite; }
.loading-orbit i { width: 12px; height: 12px; border-radius: 50%; background: var(--coral); transform: translateX(34px); }
.error-view { max-width: 590px; margin: 15vh auto; padding: 36px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); text-align: center; }
.error-view p { margin: 12px 0 22px; color: var(--muted); }

@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes sound { from { transform: scaleY(.5); } to { transform: scaleY(1.6); } }

@media (max-width: 1000px) {
  .sidebar { transform: translateX(-105%); box-shadow: 16px 0 50px rgba(0,0,0,.25); transition: transform .22s ease; }
  .sidebar.open { transform: none; }
  .workspace { margin-left: 0; }
  .mobile-header { position: sticky; top: 0; z-index: 45; display: flex; height: 64px; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid rgba(18,63,58,.12); background: rgba(247,243,234,.92); backdrop-filter: blur(14px); }
  .mobile-brand { font-family: Fraunces, Georgia, serif; font-weight: 700; text-decoration: none; }
  .mobile-brand span { color: var(--muted); font-size: 13px; }
  .menu-button { display: grid; width: 44px; height: 44px; place-content: center; gap: 4px; border: 0; background: transparent; cursor: pointer; }
  .menu-button span { width: 21px; height: 2px; background: var(--ink); }
  .scrim { position: fixed; inset: 0; z-index: 44; background: rgba(5,22,20,.48); }
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 350px; }
}

@media (max-width: 760px) {
  #app-main { padding: 30px 18px 58px; }
  .site-footer { padding: 22px 18px; flex-direction: column; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .hero { min-height: 0; border-radius: 21px; }
  .hero-copy { padding: 33px 25px; }
  .hero h1 { font-size: clamp(39px,12vw,58px); }
  .hero-visual { min-height: 310px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .card-grid, .case-list, .method-grid, .external-grid { grid-template-columns: 1fr; }
  .next-card { grid-template-columns: auto 1fr; }
  .next-card .button { grid-column: 1 / -1; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-aside { position: static; }
  .callout-grid { grid-template-columns: 1fr; }
  .lab-content { grid-template-columns: 1fr; }
  .lab-stage { min-height: 390px; }
  .quiz-setup { grid-template-columns: 1fr; }
  .supervisor-hero { grid-template-columns: 1fr; }
  .supervisor-symbol { display: none; }
  .source { grid-template-columns: 1fr; gap: 9px; }
  .section-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .sidebar { width: min(286px, 86vw); }
  .stat { padding: 16px; }
  .stat strong { font-size: 25px; }
  .hero-visual { min-height: 270px; }
  .lab-stage { min-height: 330px; padding: 18px; }
  .lab-panel { padding: 22px 18px; }
  .quiz-card { padding: 24px 18px; }
  .comparison { min-width: 680px; }
}

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