/* Unified educational styling for legacy theory/task pages. v35 */
:root{color-scheme:light dark;--lu-bg:#f5fbff;--lu-card:#fff;--lu-text:#172033;--lu-muted:#5f6b7a;--lu-line:#dbe7f3;--lu-primary:#1f66d1;--lu-soft:#edf6ff}
html[data-theme="dark"]{color-scheme:dark;--lu-bg:#111827;--lu-card:#182235;--lu-text:#eef5ff;--lu-muted:#a9b8c8;--lu-line:#2c3b51;--lu-primary:#79b4ff;--lu-soft:#172b43}
html[data-theme="light"]{color-scheme:light;--lu-bg:#f5fbff;--lu-card:#fff;--lu-text:#172033;--lu-muted:#5f6b7a;--lu-line:#dbe7f3;--lu-primary:#1f66d1;--lu-soft:#edf6ff}
@media(prefers-color-scheme:dark){html:not([data-theme]){--lu-bg:#111827;--lu-card:#182235;--lu-text:#eef5ff;--lu-muted:#a9b8c8;--lu-line:#2c3b51;--lu-primary:#79b4ff;--lu-soft:#172b43}}
html{scroll-behavior:smooth}body.learning-unified{margin:0!important;padding:0!important;display:block!important;min-height:100vh;background:var(--lu-bg)!important;color:var(--lu-text)!important;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif!important;line-height:1.62;text-align:left!important}
.learning-site-header{position:relative;z-index:20;background:color-mix(in srgb,var(--lu-card) 94%,transparent);border-bottom:1px solid var(--lu-line);box-shadow:0 5px 22px rgba(15,23,42,.04)}
.learning-header-inner{width:min(1180px,calc(100% - 34px));min-height:74px;margin:auto;display:flex;align-items:center;gap:20px;justify-content:space-between}
.learning-brand{display:flex;flex-direction:column;text-decoration:none!important;color:var(--lu-text)!important;font-weight:850;line-height:1.05;font-size:1rem}.learning-brand small{margin-top:5px;font-size:.72rem;color:var(--lu-muted);font-weight:650;letter-spacing:.045em}
.learning-nav{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}.learning-nav a{display:inline-flex;align-items:center;min-height:38px;padding:7px 11px;border-radius:12px;text-decoration:none!important;color:var(--lu-text)!important;font-size:.9rem;font-weight:700}.learning-nav a:hover{background:var(--lu-soft)}.learning-nav .learning-home-button{border:1px solid color-mix(in srgb,var(--lu-primary) 35%,var(--lu-line));background:color-mix(in srgb,var(--lu-primary) 9%,transparent);color:var(--lu-primary)!important}
[data-theme-toggle]{box-sizing:border-box}
.theme-toggle { width: 68px; height: 34px; display: grid; grid-template-columns: repeat(2, 1fr); align-items: center; flex: 0 0 auto; position: relative; overflow: hidden; padding: 3px; border: 1px solid #c8d1da; border-radius: 999px; background: #dfe4eb; color: #84909b; line-height: 1; cursor: pointer; box-shadow: inset 0 1px 2px rgba(16, 42, 67, .08); transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.theme-toggle::before { content: ""; width: calc(50% - 3px); height: calc(100% - 6px); position: absolute; left: 3px; top: 3px; z-index: 0; border-radius: 999px; background: #fff; box-shadow: 0 2px 6px rgba(16, 42, 67, .14); transition: transform .24s ease, background .24s ease; }
.theme-toggle:hover, .theme-toggle:focus-visible { transform: translateY(-1px); border-color: #aebbc6; }
.theme-toggle:focus-visible { outline: 3px solid rgba(21, 126, 192, .24); outline-offset: 2px; }
.theme-toggle__option { position: relative; z-index: 1; display: grid; place-items: center; font-size: .94rem; transition: color .2s ease, opacity .2s ease; }
.theme-toggle__option--light { color: #092535; }
.theme-toggle__option--dark { color: #74818d; }
html[data-theme="dark"] .theme-toggle { border-color: #506373; background: #314654; }
html[data-theme="dark"] .theme-toggle::before { transform: translateX(100%); background: #f5f8fa; }
html[data-theme="dark"] .theme-toggle__option--light { color: #93a1ac; }
html[data-theme="dark"] .theme-toggle__option--dark { color: #102a43; }
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus-visible { border-color: #7f929f; }
.learning-content{box-sizing:border-box;width:min(1080px,calc(100% - 34px));margin:30px auto 56px!important;padding:clamp(22px,4vw,44px)!important;background:var(--lu-card)!important;border:1px solid var(--lu-line)!important;border-radius:24px!important;box-shadow:0 14px 42px rgba(15,23,42,.07)!important;display:block!important;min-height:200px;text-align:left!important}
.learning-content h1,.learning-content h2,.learning-content h3{font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif!important;color:var(--lu-text)!important;line-height:1.18!important;text-wrap:balance}.learning-content h1{font-size:clamp(1.75rem,4vw,2.55rem)!important;margin:.1em 0 .7em!important}.learning-content h2{font-size:clamp(1.3rem,2.6vw,1.72rem)!important;margin:1.6em 0 .55em!important}.learning-content h3{font-size:1.13rem!important}
.learning-content p,.learning-content li,.learning-content td,.learning-content th{color:var(--lu-text)!important;font-family:inherit!important;font-size:clamp(.97rem,1.3vw,1.04rem);line-height:1.65}.learning-content p{margin:.72em 0!important}.learning-content li{margin:.32em 0}.learning-content a{color:var(--lu-primary)!important}.learning-content img{max-width:100%!important;height:auto!important}.learning-content table{max-width:100%;border-collapse:collapse;margin:20px auto!important;background:var(--lu-card)!important}.learning-content th,.learning-content td{border:1px solid var(--lu-line)!important;padding:9px 11px!important;background:transparent!important}.learning-content th{background:var(--lu-soft)!important;font-weight:800}.learning-content input,.learning-content select,.learning-content textarea,.learning-content button{font:inherit}.learning-content button,.learning-content input[type=button],.learning-content input[type=submit]{border:1px solid var(--lu-line);border-radius:12px;padding:9px 13px}.learning-content hr{border:0;border-top:1px solid var(--lu-line);margin:24px 0}.learning-content footer{margin:34px -12px -12px;padding:18px 12px 0;border-top:1px solid var(--lu-line);background:transparent!important;color:var(--lu-muted)!important}
@media(max-width:760px){.learning-header-inner{min-height:68px;align-items:flex-start;flex-direction:column;padding:13px 0;gap:10px}.learning-nav{justify-content:flex-start;flex-wrap:nowrap;width:100%;gap:5px}.learning-nav a{min-width:0;min-height:32px;padding:4px 7px;white-space:nowrap}.theme-toggle { width: 60px; height: 36px; padding: 3px; }.theme-toggle__option { font-size: .82rem; }.theme-toggle { width: 56px; height: 32px; }.learning-content{width:min(100% - 20px,1080px);margin-top:18px!important;padding:20px 16px!important;border-radius:18px!important;overflow-x:auto}}
@media(max-width:480px){.learning-nav{gap:4px}.learning-nav a{padding:3px 6px;font-size:.72rem}}
@media(max-width:380px){.learning-nav{gap:3px}.learning-nav a{padding:2px 4px;font-size:.68rem}}
@media(max-width:340px){.learning-nav a{padding:2px 3px;font-size:.63rem}}

/* Privacy consent card (shared with site.css). */
/* Scoped aliases follow light, explicit dark, and system dark learning themes.
   Keep a saturated primary button so white text remains readable in both themes. */
.privacy-banner, .privacy-choice-card, .privacy-status {
  --muted: var(--lu-muted, #5f6b7a);
  --primary: #1f66d1;
  --primary-dark: var(--lu-primary, #1f66d1);
  --primary-soft: var(--lu-soft, #edf6ff);
  --secondary: var(--lu-text, #172033);
  --surface: var(--lu-card, #fff);
  --surface-soft: var(--lu-soft, #edf6ff);
  --line: var(--lu-line, #dbe7f3);
  color: var(--lu-text, #172033);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  text-align: left;
}
.privacy-banner, .privacy-banner *, .privacy-choice-card, .privacy-choice-card * { box-sizing: border-box; }
.privacy-banner { position: fixed; right: 16px; bottom: 16px; z-index: 4000; width: min(520px, calc(100% - 32px)); overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 14px 36px rgba(7,31,52,.18); backdrop-filter: blur(16px); transition: opacity .28s ease, transform .28s ease; }
.privacy-banner[hidden] { display: none; }
.privacy-banner.is-hiding { opacity: 0; transform: translateY(calc(100% + 18px)); }
.privacy-banner__panel { padding: 19px 20px 20px; }
.privacy-banner__panel[hidden] { display: none; }
.privacy-banner h2 { margin-bottom: 9px; font-size: 1.05rem; letter-spacing: -.015em; }
.privacy-banner p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.privacy-banner a { color: var(--primary-dark); text-decoration: underline; }
.privacy-banner__actions, .privacy-choice-card__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 11px; margin-top: 16px; }
.privacy-button { min-height: 42px; width: 100%; padding: 8px 13px; border: 1px solid var(--primary); border-radius: 10px; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 850; line-height: 1.25; text-align: center; white-space: normal; cursor: pointer; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.privacy-button--secondary { border-color: var(--line); background: var(--surface); color: var(--primary-dark); }
.privacy-button:hover, .privacy-button:focus-visible { background: #fff; color: var(--primary-dark); }
.privacy-button--secondary:hover, .privacy-button--secondary:focus-visible { border-color: var(--primary); background: var(--primary-soft); }
.privacy-banner__back { margin: -3px 0 8px; padding: 2px 0; border: 0; background: transparent; color: var(--primary-dark); font-size: .74rem; font-weight: 750; cursor: pointer; }
.privacy-category { margin-top: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.privacy-category__heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.privacy-category__heading strong { color: var(--secondary); font-size: .82rem; }
.privacy-category__heading span { flex: 0 0 auto; padding: 3px 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: .62rem; font-weight: 800; }
.privacy-category p { font-size: .72rem; line-height: 1.45; }
.privacy-banner .privacy-banner__status { margin-top: 10px; font-size: .69rem; font-weight: 720; }
.privacy-choice-card { margin: 24px 0 30px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-soft); }
.privacy-choice-card p { margin-bottom: 14px; color: var(--muted); }
.privacy-choice-card [data-inline-privacy-status] { margin: 12px 0 0; font-size: .88rem; }

.privacy-banner h2 { margin-top: 0; color: var(--lu-text, #172033); }
.privacy-status { color: var(--lu-muted, #5f6b7a); font-size: .88rem; }
@media (max-width: 430px) {
  .privacy-banner { right: 8px; bottom: 8px; width: calc(100% - 16px); }
  .privacy-banner__panel { padding: 16px; }
  .privacy-banner p { font-size: .74rem; }
  .privacy-banner__actions, .privacy-choice-card__actions { grid-template-columns: 1fr; }
}
@media (max-width: 390.5px) {
  .privacy-banner { transform: scale(.8); transform-origin: right bottom; }
  .privacy-banner.is-hiding { transform: translateY(calc(100% + 18px)) scale(.8); }
}
@media (max-width: 320px) {
  .privacy-banner { transform: scale(.6667); }
  .privacy-banner.is-hiding { transform: translateY(calc(100% + 18px)) scale(.6667); }
}
/* PDF sheet variant A: scoped additions only. */
.pdf-sheet-title-row{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:1.5em}
.learning-content .pdf-sheet-title-row>h1,.learning-content .pdf-sheet-title-row>h2{margin:0!important;flex:1 1 320px;min-width:0}
.pdf-sheet-actions{display:flex;gap:10px;align-items:center;flex:0 0 auto}
.learning-content a.pdf-sheet-btn{--pdf-red:#d93025;--pdf-red-hover:#b3271e;display:inline-flex;align-items:center;gap:8px;background:var(--pdf-red);color:#fff!important;border:1px solid transparent;border-radius:9px;padding:9px 16px;font-size:15px;font-weight:700;line-height:1.5;text-decoration:none!important;box-shadow:0 1px 2px rgba(0,0,0,.18);white-space:nowrap}
.learning-content a.pdf-sheet-btn:hover{background:var(--pdf-red-hover)}
.learning-content a.pdf-sheet-btn:focus-visible{outline:3px solid var(--lu-primary);outline-offset:3px;border-color:var(--lu-card)}
.learning-content a.pdf-sheet-btn:active{transform:translateY(1px)}
.pdf-sheet-btn svg{width:18px;height:18px;flex:none}
html[data-theme="dark"] .pdf-sheet-btn{--pdf-red:#ef6558!important;--pdf-red-hover:#f57f74!important}
@media(prefers-color-scheme:dark){html:not([data-theme]) .pdf-sheet-btn{--pdf-red:#ef6558!important;--pdf-red-hover:#f57f74!important}}
@media(max-width:640px){.pdf-sheet-title-row{gap:10px}.pdf-sheet-title-row>h1,.pdf-sheet-title-row>h2{flex-basis:100%!important}.pdf-sheet-actions{width:100%}.learning-content a.pdf-sheet-btn{box-sizing:border-box;min-height:44px}}

/* === REPORT ERROR BLOCK v1 (teacher-bridge.js) START === */
/* Styles for the report-error panel and modal on legacy pages that load only
   learning-unified.css. Site variables are mapped to the --lu theme tokens so
   light/dark themes follow theme-init.js exactly like the privacy banner. */
.report-error-panel,.error-report-modal{--muted:var(--lu-muted,#5f6b7a);--primary:#1f66d1;--primary-dark:var(--lu-primary,#1f66d1);--primary-soft:var(--lu-soft,#edf6ff);--secondary:var(--lu-text,#172033);--surface:var(--lu-card,#fff);--surface-soft:var(--lu-soft,#edf6ff);--line:var(--lu-line,#dbe7f3);--text:var(--lu-text,#172033);color:var(--lu-text,#172033);font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;line-height:1.5;text-align:left}
.report-error-panel,.report-error-panel *,.error-report-modal,.error-report-modal *{box-sizing:border-box}
.report-error-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:26px 0 6px;padding:18px;border:1px dashed rgba(19,104,164,.34);border-radius:16px;background:var(--surface-soft)}
.report-error-panel>div{display:grid;gap:4px}
.report-error-panel span{color:var(--muted);font-size:.93rem}
.report-error-panel .button,.error-report-modal .button{min-height:50px;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:12px 20px;border:1px solid transparent;border-radius:13px;font-size:.93rem;font-weight:820;line-height:1.2;text-align:center;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:rgba(21,126,192,.16);transition:transform .2s ease,box-shadow .2s ease,background .2s ease;font-family:inherit}
.report-error-panel .button:hover,.error-report-modal .button:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(12,59,94,.13)}
.report-error-panel .button-secondary,.error-report-modal .button-secondary{border-color:#a9c9de;background:var(--surface-soft);color:var(--primary-dark)}
.report-error-panel .button-secondary:hover,.report-error-panel .button-secondary:focus-visible,.error-report-modal .button-secondary:hover,.error-report-modal .button-secondary:focus-visible{border-color:var(--primary);background:var(--primary-soft);color:var(--primary-dark)}
html[data-theme="dark"] .report-error-panel .button-secondary,html[data-theme="dark"] .error-report-modal .button-secondary{border-color:#3f7593;background:#12364b;color:#d8effc}
html[data-theme="dark"] .report-error-panel .button-secondary:hover,html[data-theme="dark"] .report-error-panel .button-secondary:focus-visible,html[data-theme="dark"] .error-report-modal .button-secondary:hover,html[data-theme="dark"] .error-report-modal .button-secondary:focus-visible{border-color:#6abbea;background:#1a4b68;color:#fff}
.error-report-modal{position:fixed;inset:0;z-index:10000}
.error-report-modal__backdrop{position:absolute;inset:0;background:rgba(3,23,37,.62);backdrop-filter:blur(2px)}
.error-report-dialog{position:relative;z-index:1;width:min(620px,calc(100% - 28px));margin:min(12vh,110px) auto 0;padding:26px;border-radius:22px;background:var(--surface);box-shadow:0 28px 80px rgba(0,0,0,.28)}
.error-report-dialog h2{margin:0 0 10px;color:var(--text);font-size:1.5rem}
.error-report-dialog p{line-height:1.5;color:var(--text)}
.error-report-dialog .section-kicker{margin-bottom:13px;color:var(--primary);font-size:.77rem;font-weight:850;letter-spacing:.12em;text-transform:uppercase}
.error-report-dialog label{display:grid;gap:8px;font-weight:700;color:var(--text)}
.error-report-dialog textarea{width:100%;resize:vertical;padding:12px 14px;border:1px solid rgba(19,104,164,.28);border-radius:12px;background:var(--surface);color:var(--text);font:inherit;line-height:1.5}
.error-report-dialog__close{position:absolute;right:13px;top:10px;border:0;background:transparent;color:var(--muted);font-size:2rem;cursor:pointer;line-height:1}
.error-report-status{min-height:1.4em;color:var(--muted);font-size:.92rem}
.error-report-modal .cta-row{margin-top:27px;display:flex;flex-wrap:wrap;gap:11px}
.error-report-modal .button-primary{background:var(--primary);color:#fff}
.error-report-modal .button-primary:hover{background:var(--primary-dark)}
.report-honeypot{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;opacity:0!important}
.modal-open{overflow:hidden}
@media(max-width:620px){.report-error-panel{align-items:stretch;flex-direction:column}.error-report-dialog{margin-top:5vh;padding:22px 18px}.error-report-dialog .cta-row{display:grid}.error-report-dialog .button{width:100%}}

/* === REPORT ERROR BLOCK v1 (teacher-bridge.js) END === */

/* site-tails-v1: compact cookie notice on phones so it does not cover page buttons. */
@media (max-width:430px){
  .privacy-banner{max-height:34vh;overflow-y:auto}
  .privacy-banner__panel{padding:12px 14px}
  .privacy-banner h2{margin-bottom:5px;font-size:.95rem}
  .privacy-banner p{font-size:.72rem;line-height:1.38}
  .privacy-banner__actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:9px}
  .privacy-banner .privacy-button{min-height:36px;padding:6px 8px;font-size:.74rem}
}
