/* Theory view inherits original app design tokens and header. */
.theoryWrap{max-width:1040px;margin:0 auto;padding:26px 24px 64px;position:relative}
.theoryHome{margin-left:auto;text-decoration:none;color:var(--ink);font-weight:700;font-size:13px}
.theoryTop{display:flex;justify-content:space-between;gap:20px;align-items:center}
.theoryTop small,.theoryKicker{font-size:11px;font-weight:800;letter-spacing:.13em;color:var(--muted)}
.theoryTop h1{font-size:clamp(34px,5vw,48px);margin:10px 0 8px;line-height:1.12}
.theoryTop p{margin:0;color:var(--muted);font-size:14px}
.theoryStats{margin:20px 0;color:var(--muted);font-size:13px}
.languageSwitch{display:flex;border:1px solid var(--line);border-radius:999px;padding:3px;flex:0 0 auto}
.languageSwitch button{min-width:46px;padding:8px 12px;background:transparent;color:inherit;border:0;border-radius:999px;cursor:pointer;font-weight:800}
.languageSwitch button[aria-pressed=true]{background:var(--accent-soft);color:var(--ink)}
.theoryNav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:26px}
.theoryNav button,.theoryPanel button{font:inherit;font-size:13px;font-weight:750;border:1px solid var(--line);padding:11px 17px;cursor:pointer}
.theoryNav button{background:var(--accent-pale);color:var(--ink);border-radius:999px}
.theorySelector{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:14px;color:var(--muted);font-size:13px}
.theorySelector select{margin-left:6px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--paper-solid);color:var(--ink);max-width:90vw}
.theoryPanel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow-soft);padding:clamp(22px,4vw,42px);min-height:260px}
.theoryPanel h2{font-size:clamp(23px,3.5vw,32px);line-height:1.25;margin:12px 0 18px}
.theoryPanel p{max-width:75ch;line-height:1.7}
.theoryTip,.theoryFeedback{background:var(--accent-pale);border-left:3px solid var(--focus);padding:15px 18px;margin:22px 0;border-radius:8px}
.theoryPanel button{background:var(--ink);color:white;border-radius:12px;margin:12px 10px 0 0}
.theoryPanel button:disabled{opacity:.46;cursor:not-allowed}
.theoryPanel input:not([type=radio]){display:block;font:inherit;font-size:16px;max-width:100%;width:460px;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--paper-solid);color:var(--ink)}
.choice{display:block;padding:12px;margin:8px 0;border:1px solid var(--line);border-radius:10px;cursor:pointer}.choice input{margin-right:12px;accent-color:var(--focus)}
.topicRow{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.topicRow button{background:none;color:var(--ink);border:0;margin:0;padding:4px;text-align:left}.topicRow span{font-size:12px;color:var(--muted)}
.theoryNote{font-size:12px;color:var(--muted);margin-top:24px}.staff{width:min(100%,370px);display:block;margin:16px 0}
@media(max-width:580px){.theoryWrap{padding:18px 15px 50px}.theoryTop{align-items:flex-start}.theoryPanel{padding:20px}.topicRow{align-items:flex-start;flex-direction:column}.theoryNav button{flex:1 1 auto}}
body{background:var(--night);color:#eef7ff}.theoryHome{color:var(--cyan)}.theoryTop h1{text-transform:uppercase;font-style:italic;font-weight:1000;letter-spacing:-.045em}.theoryTop small,.theoryKicker{color:var(--cyan)}.theoryTop p,.theoryStats,.theorySelector,.theoryNote,.topicRow span{color:#9ebbd8}.theoryPanel{--paper:linear-gradient(145deg,#08244a,#041631);--line:rgba(33,134,232,.5);--ink:#e9f7ff;--muted:#a9c5df;--accent-pale:#0a2d56;--paper-solid:#061a36;--focus:#16dcff;--shadow-soft:0 15px 42px #0005;--radius:16px;color:#eaf5ff;background:linear-gradient(145deg,#08244a,#041631)}.theorySelector select{background:#061a36;color:#eaf5ff;border-color:#24558a}.languageSwitch{border-color:#24558a}.languageSwitch button[aria-pressed=true]{background:#0e4f89;color:#fff}.theoryNav button{background:#0a2d56;border-color:#24609d;color:#d3edff;border-radius:9px;text-transform:uppercase;letter-spacing:.05em}.theoryPanel button{background:var(--cyan);color:#031a34;border-color:var(--cyan);border-radius:9px;font-weight:900;text-transform:uppercase}.theoryPanel input:not([type=radio]){background:#061a36;color:#fff;border-color:#24558a}.theoryTip,.theoryFeedback{background:#0a2d56;border-color:var(--cyan)}.choice{border-color:#24558a}.topicRow button{color:#eaf5ff}.theoryPanel h2{font-weight:900}.theoryHome:hover{color:#fff}

/* Integrated main tabs and fixed English/French parallel reading */
.theoryPageShell{max-width:1100px;margin:0 auto;padding:0 20px}
.theoryPageShell .sectionTabs{margin-top:20px;margin-bottom:0}
.theorySectionTabs a.theoryActive{font-weight:900;box-shadow:inset 0 -3px 0 currentColor}
.theoryWrap{padding-top:26px}
.theoryEnglish,.theoryFrench{display:block}
.theoryFrench{margin-top:7px;opacity:.82;font-size:.92em;line-height:1.5}
.theoryPanel h2 .theoryFrench{font-size:.76em;font-weight:normal}
.theoryTip .theoryFrench{margin-top:9px}
@media(max-width:580px){.theoryPageShell{padding:0 12px}.theoryPageShell .sectionTabs{display:flex;flex-wrap:wrap;gap:4px}.theoryPageShell .sectionTabs a{font-size:12px}.theoryWrap{padding-left:2px;padding-right:2px}}
