
:root{--navy:#0b2545;--navy2:#123e66;--blue:#1678b8;--sky:#6bcdf2;--bg:#f4f7fb;--ink:#17233a;--muted:#637086;--line:#d8e3ed;--white:#fff;--green:#eaf8ef;--orange:#fff2df;--cyan:#e9f7ff}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Arial,Helvetica,sans-serif;line-height:1.6}a{color:inherit}.wrap{max-width:1180px;margin:0 auto;padding:0 28px}
header.site-head{background:var(--navy)!important;color:#fff!important;border-bottom:4px solid var(--sky);box-shadow:0 4px 14px rgba(0,0,0,.12)}
.nav{min-height:78px;display:flex;align-items:center;justify-content:space-between;gap:22px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none!important;color:white!important}.brand-badge{width:42px;height:42px;border-radius:12px;background:linear-gradient(145deg,#5cc9f1,#197fb9);position:relative;flex:0 0 auto}.brand-badge:before{content:"";position:absolute;width:18px;height:18px;border:3px solid white;border-radius:50%;left:9px;top:8px}.brand-badge:after{content:"";position:absolute;width:22px;height:3px;background:white;left:10px;top:28px;transform:rotate(-18deg);border-radius:3px}.brand-copy strong{display:block;font-size:17px;line-height:1.1}.brand-copy span{display:block;color:#aadcf2;font-size:11px;letter-spacing:.12em;text-transform:uppercase;margin-top:5px}
.navlinks{display:flex;align-items:center;gap:24px}.navlinks a{color:#eef9ff!important;text-decoration:none!important;font-weight:700}.navlinks a:hover{color:var(--sky)!important}
.btn{display:inline-flex!important;align-items:center;justify-content:center;padding:12px 18px;border-radius:12px;background:var(--blue)!important;color:white!important;text-decoration:none!important;font-weight:800;border:1px solid transparent}.btn.light{background:white!important;color:var(--navy)!important}.btn.outline{background:transparent!important;border-color:#8cd5f0!important;color:white!important}
.hero{background:linear-gradient(120deg,#0b2545 0%,#123e66 68%,#155784 100%);color:white;padding:72px 0 66px}.hero-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:46px;align-items:center}.eyebrow,.label{text-transform:uppercase;letter-spacing:.14em;font-size:12px;font-weight:900;color:var(--sky)}.hero h1{font-size:clamp(48px,6vw,82px);line-height:.98;margin:12px 0 20px}.hero h1 span{color:#91dcf7}.lede{font-size:20px;max-width:760px;color:#d9edf9}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.chem-card{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.18);border-radius:24px;padding:28px}.chem-card h3{margin:5px 0 18px;font-size:22px}.formula{font-size:38px;font-family:Georgia,serif;font-weight:700;color:white!important;margin:10px 0 20px}.mini-flow{display:grid;gap:10px}.mini-step{display:flex;align-items:center;gap:11px;background:rgba(255,255,255,.075);padding:12px 13px;border-radius:13px}.bubble{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#78d2f4;color:#0b2545;font-weight:900}
.section{padding:58px 0}.section h2{font-size:36px;line-height:1.15;margin:0 0 12px}.muted{color:var(--muted)}.section-title{max-width:750px}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:20px;margin-top:26px}.card,.box,.side,.topic,.teacher-copy,.feature-panel{background:white;border:1px solid var(--line);border-radius:20px;box-shadow:0 10px 28px rgba(11,37,69,.055)}.card{padding:26px}.card-icon{font-size:34px}.card h3{font-size:22px;margin:7px 0}.card a{color:var(--blue)!important;text-decoration:none!important;font-weight:800}.band{background:linear-gradient(180deg,#e9f7ff,#f7fbff)}.teacher{display:grid;grid-template-columns:1.35fr .85fr;gap:30px;align-items:center}.teacher-copy{padding:30px}.quote{background:var(--navy);color:white;border-radius:22px;padding:30px;box-shadow:0 14px 32px rgba(11,37,69,.16)}.quote p{color:#deeffa;font-size:17px}
.topic-feature{display:grid;grid-template-columns:1fr 1fr;gap:26px}.feature-panel{padding:28px}.feature-panel.dark{background:var(--navy);color:white;border-color:var(--navy)}.feature-panel.dark p{color:#deeffa}
.breadcrumb{padding-top:26px;font-size:14px;color:#68758a}.pagehero{padding:28px 0 34px}.pagehero h1{font-size:clamp(42px,5vw,68px);line-height:1.04;margin:8px 0 14px}.pagehero .lede{color:var(--muted);font-size:18px}.topicgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.topic{padding:20px;text-decoration:none!important;display:grid;grid-template-columns:auto 1fr;gap:14px}.topic:hover{border-color:#8dc8e7}.topic-num{width:46px;height:46px;border-radius:13px;background:var(--cyan);display:grid;place-items:center;color:var(--blue);font-weight:900}.topic small{display:block;color:var(--blue);font-weight:900}.topic strong{display:block;font-size:18px}.learning{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:28px}.box,.side{padding:27px;margin-bottom:18px}.watch{background:var(--cyan)}.example{background:var(--orange)}.check{background:var(--green)}.side{position:sticky;top:18px}.resource{display:block;padding:11px 0;border-bottom:1px solid var(--line);text-decoration:none!important;font-weight:700;color:var(--blue)!important}.video{aspect-ratio:16/9;border-radius:14px;overflow:hidden;background:#000}.video iframe{width:100%;height:100%;border:0}.notice{padding:13px 16px;background:#fff7db;border:1px solid #ead38a;border-radius:12px}.footer{background:#071d35;color:#dcecf7;padding:38px 0;margin-top:58px}.footer-grid{display:flex;align-items:center;justify-content:space-between;gap:22px}
@media(max-width:860px){.hero-grid,.teacher,.topic-feature,.learning,.cards,.topicgrid{grid-template-columns:1fr}.navlinks>a:not(.btn){display:none}.wrap{padding:0 20px}.hero{padding:54px 0}.side{position:static}.hero h1{font-size:54px}}

.video-resource + .video-resource{margin-top:24px;padding-top:24px;border-top:1px solid #cfe2ee}
.video-resource h3{margin:0 0 12px;font-size:18px}
.resource-list{display:grid;gap:10px;margin-top:16px}
.download-card{display:grid;grid-template-columns:auto 1fr auto;gap:13px;align-items:center;padding:14px 15px;border:1px solid var(--line);border-radius:14px;background:#fff;text-decoration:none!important}
.download-card:hover{border-color:#8dc8e7;box-shadow:0 5px 16px rgba(11,37,69,.06)}
.download-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:11px;background:#ffe8e8;color:#9b2c2c;font-size:11px;font-weight:900}
.download-card strong{display:block;color:var(--ink);font-size:15px}
.download-card small{display:block;color:var(--muted);margin-top:2px}
.download-arrow{color:var(--blue);font-size:20px}
.resource-stat{display:flex;align-items:baseline;gap:8px;padding:8px 0;border-bottom:1px solid var(--line)}
.resource-stat strong{font-size:20px;color:var(--blue)}.resource-stat span{font-size:13px;color:var(--muted)}
.legacy-note{font-size:13px;color:var(--muted);margin-top:12px}

.learn-groups{display:grid;gap:36px;margin-top:20px}
.area-block{background:#fff;border:1px solid var(--line);border-radius:22px;padding:26px;box-shadow:0 10px 28px rgba(11,37,69,.045)}
.area-head{display:flex;justify-content:space-between;gap:18px;align-items:end;margin-bottom:18px}
.area-head h2{margin:0}.topic-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.topic-card{display:block;background:#f9fbfd;border:1px solid var(--line);border-radius:16px;padding:19px;text-decoration:none!important}
.topic-card:hover{border-color:#8dc8e7;transform:translateY(-1px)}
.topic-card .counts{font-size:12px;color:var(--muted);margin-top:10px}
.topic-card h3{margin:6px 0 7px;font-size:19px}
.topic-card .label{color:var(--blue)}
.resource-section{margin-top:20px}
.resource-section h2{margin-bottom:8px}
.resource-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.topic-intro{display:grid;grid-template-columns:1fr 280px;gap:22px;align-items:start}
.summary-card{background:var(--navy);color:#fff;border-radius:18px;padding:22px}
.summary-card .label{color:var(--sky)}.summary-card p{color:#dcecf7}
@media(max-width:900px){.topic-cards,.resource-grid,.topic-intro{grid-template-columns:1fr}}

.formula-card{margin:18px 0;padding:18px 20px;border-radius:14px;background:#eef7fc;border:1px solid #cfe2ee;font-size:21px;text-align:center}
.lesson-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:22px;align-items:start}
.lesson-layout main{display:grid;gap:18px}.lesson-layout aside{position:sticky;top:90px}
@media(max-width:900px){.lesson-layout{grid-template-columns:1fr}.lesson-layout aside{position:static}}

.key-idea-panel{border-left:5px solid var(--blue);background:linear-gradient(135deg,#ffffff 0%,#f5fbff 100%)}
.key-idea-panel h2{margin-bottom:10px}
.key-idea-panel .formula-card{margin-bottom:4px}

.misconception{border-left:5px solid #d97706;background:linear-gradient(135deg,#fff 0%,#fff8eb 100%)}
.misconception .label{color:#9a5a00}

.topic-card .counts{margin-top:10px}

.audit-table{width:100%;border-collapse:collapse;font-size:14px}
.audit-table th,.audit-table td{text-align:left;vertical-align:top;padding:10px;border-bottom:1px solid var(--line)}
.audit-table th{color:var(--blue);font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.audit-table a{color:var(--blue);font-weight:700;text-decoration:none}


/* v3.6.7d2 public Revise + Exam Practice hubs */
.hub-hero{padding:42px 0 28px}.hub-hero-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(290px,.75fr);gap:28px;align-items:stretch}.hub-panel{background:#fff;border:1px solid #d8e3ed;border-radius:18px;padding:24px;box-shadow:0 8px 28px rgba(7,42,74,.06)}.hub-panel.dark{background:#0d365b;color:#fff;border-color:#2b577b}.hub-panel.dark .muted{color:#d0e0ee}.hub-panel h2,.hub-panel h3{margin-top:0}.hub-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.hub-kicker{font-size:.78rem;font-weight:900;letter-spacing:.11em;text-transform:uppercase;color:#1e8ac5}.hub-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.route-card{display:block;text-decoration:none;color:inherit;background:#fff;border:1px solid #d8e3ed;border-radius:16px;padding:19px;transition:.16s}.route-card:hover{transform:translateY(-2px);border-color:#78bde2;box-shadow:0 8px 22px rgba(7,42,74,.07)}.route-card h3{margin:5px 0 7px}.route-card p{margin:0;color:#5c6f80;line-height:1.55}.route-card .route-arrow{display:inline-block;margin-top:12px;font-weight:850;color:#137fba}.topic-link-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.topic-link{display:flex;justify-content:space-between;gap:12px;align-items:center;text-decoration:none;color:#18344d;background:#fff;border:1px solid #dbe4ec;border-radius:12px;padding:12px 14px;font-weight:750}.topic-link:hover{border-color:#65b4df;background:#f7fcff}.paper-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.paper-card{background:#fff;border:1px solid #d8e3ed;border-radius:16px;padding:18px}.paper-card h3{margin:5px 0 6px}.paper-card p{color:#5c6f80;line-height:1.5}.paper-card ul{padding-left:19px;color:#42596d;line-height:1.55}.workflow{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;counter-reset:step}.workflow-step{background:#f7fbfe;border:1px solid #d8e6f0;border-radius:14px;padding:16px}.workflow-step:before{counter-increment:step;content:counter(step);display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#79d2f6;color:#07385d;font-weight:900;margin-bottom:9px}.workflow-step strong{display:block;margin-bottom:5px}.hub-note{border-left:4px solid #55bce8;background:#f3fbff;padding:14px 16px;border-radius:0 12px 12px 0;color:#38556c;line-height:1.55}.quick-strip{display:flex;justify-content:space-between;gap:18px;align-items:center;background:#e9f7ff;border:1px solid #bfe5f8;border-radius:16px;padding:18px 20px}.quick-strip h3{margin:0 0 4px}.quick-strip p{margin:0;color:#4d6578}.section.compact{padding-top:24px}.section .section-title.narrow{max-width:760px}.navlinks a.active{color:#73d5ff}
@media(max-width:900px){.hub-hero-grid,.hub-grid,.paper-grid{grid-template-columns:1fr 1fr}.workflow{grid-template-columns:1fr 1fr}.hub-hero-grid>:first-child{grid-column:1/-1}}
@media(max-width:650px){.hub-hero-grid,.hub-grid,.paper-grid,.topic-link-grid,.workflow{grid-template-columns:1fr}.quick-strip{align-items:flex-start;flex-direction:column}}

/* v3.6.7d2a - authenticated app hand-off */
.member-access{padding:18px 0 8px;background:#f5f8fc}.member-access-card{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:22px 24px;border:1px solid #c8d7e6;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(15,45,75,.05)}.member-access-card h2{margin:4px 0 8px;font-size:1.25rem}.member-access-card p{margin:0;max-width:760px;color:#52677d;line-height:1.55}.member-access-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;min-width:220px}.account-badge{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#eaf6ff;color:#0a5f91;font-size:.78rem;font-weight:800;white-space:nowrap}@media(max-width:760px){.member-access-card{align-items:flex-start;flex-direction:column}.member-access-actions{justify-content:flex-start;min-width:0}}

/* v3.7.1 Unified Student Experience */
.student-nav{min-width:112px}.student-nav.is-signed-in{background:#eaf8ef!important;color:#0b5b3b!important;border-color:#bfe4ce!important}
.student-hero{padding:44px 0 30px;background:linear-gradient(135deg,#0b2545 0%,#123e66 62%,#155784 100%);color:#fff}.student-hero .lede{max-width:720px}.student-hero-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:26px;align-items:stretch}.student-status{background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.18);border-radius:20px;padding:23px;display:flex;flex-direction:column;justify-content:center}.student-status strong{font-size:1.2rem}.student-status p{color:#dcecf7;margin:6px 0 0}.student-status .account-badge{width:max-content;margin-bottom:10px;background:#e9f7ff;color:#0b4f76}.student-dashboard{padding:34px 0 18px}.student-actions-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.student-action-card{display:flex;flex-direction:column;min-height:210px;text-decoration:none;color:inherit;background:#fff;border:1px solid var(--line);border-radius:18px;padding:20px;box-shadow:0 8px 24px rgba(11,37,69,.05);transition:.16s}.student-action-card:hover{transform:translateY(-2px);border-color:#7bc6e8;box-shadow:0 10px 28px rgba(11,37,69,.08)}.student-action-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:var(--cyan);color:var(--navy);font-weight:900;margin-bottom:13px}.student-action-card h2{font-size:1.18rem;margin:0 0 6px}.student-action-card p{margin:0;color:var(--muted);font-size:.92rem}.student-action-card .route-arrow{margin-top:auto;padding-top:18px;color:var(--blue);font-weight:850}.student-loop{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:18px}.student-loop-step{background:#f7fbfe;border:1px solid #d8e6f0;border-radius:14px;padding:15px}.student-loop-step strong{display:block;margin-bottom:4px}.student-loop-step span{color:#5b6d7e;font-size:.9rem}.student-inline-note{margin-top:18px;padding:14px 16px;border-radius:13px;background:#eef8ff;border:1px solid #c7e5f5;color:#37566d}.student-auth-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.student-loading{opacity:.78}.student-continue{display:none;margin-top:14px}.student-continue.show{display:block}.student-destination{font-weight:800;color:#fff}
@media(max-width:980px){.student-actions-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.student-hero-grid{grid-template-columns:1fr}.student-loop{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.student-actions-grid,.student-loop{grid-template-columns:1fr}.student-hero{padding-top:34px}.student-action-card{min-height:0}}

/* v3.7.2 – functional audit & student journey cleanup */
:focus-visible{outline:3px solid #73d5ff;outline-offset:3px;border-radius:4px}
.navlinks a[aria-current="page"]{text-decoration:underline!important;text-underline-offset:6px;text-decoration-thickness:2px!important}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}

.video-fallback{margin:10px 0 0;font-size:14px}.video-fallback a{font-weight:800;color:var(--blue);text-decoration:none}.video-fallback a:hover{text-decoration:underline}


/* === v3.7.3 Rich Chemistry Rendering === */
.chem-formula,.chem-math{font-variant-numeric:lining-nums tabular-nums}
.chem-formula sub,.chem-equation sub{font-size:.72em;line-height:0;vertical-align:-.28em}
.chem-formula sup,.chem-equation sup{font-size:.72em;line-height:0;vertical-align:.52em}
.chem-state{font-style:normal;font-size:.92em}
.chem-equation{
  display:block;
  max-width:100%;
  overflow-x:auto;
  padding:14px 16px;
  margin:12px 0;
  border:1px solid #d6e1ed;
  border-radius:12px;
  background:#f8fbfe;
  font-family:"Cambria Math","STIX Two Math","Times New Roman",serif;
  font-size:1.08rem;
  line-height:1.7;
  white-space:nowrap;
}
.chem-math{
  font-family:"Cambria Math","STIX Two Math","Times New Roman",serif;
  letter-spacing:.01em;
}
.chem-render-demo{display:grid;gap:10px}
@media(max-width:640px){.chem-equation{font-size:1rem;padding:12px}}

/* === v3.7.4 Sharing & Discovery === */
.resource-share{position:relative;margin-top:18px;display:inline-block}
.share-trigger{appearance:none;border:1px solid #b9cde1;background:#fff;color:#174b78;border-radius:999px;padding:9px 14px;font:inherit;font-weight:800;cursor:pointer;box-shadow:0 4px 14px rgba(15,49,88,.05)}
.share-trigger:hover{background:#f3f8fd}
.share-panel{position:absolute;z-index:30;left:0;top:calc(100% + 9px);width:min(390px,calc(100vw - 48px));padding:14px;background:#fff;border:1px solid #cddbea;border-radius:16px;box-shadow:0 18px 45px rgba(15,49,88,.16)}
.share-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:11px}
.share-close{border:0;background:#eef4fa;border-radius:999px;width:30px;height:30px;font-size:1.25rem;cursor:pointer}
.share-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.share-options button{border:1px solid #cfdeec;background:#f8fbfe;border-radius:10px;padding:10px 11px;font:inherit;font-weight:700;color:#233f5d;cursor:pointer;text-align:left}
.share-options button:hover{background:#edf6ff}
@media(max-width:520px){.share-panel{position:fixed;left:16px;right:16px;bottom:16px;top:auto;width:auto}.share-options{grid-template-columns:1fr 1fr}}

/* === v3.7.5 Six-theme visual system === */
:root,[data-theme="clean"]{
 --theme-bg:#f5f9fe;--theme-surface:#ffffff;--theme-ink:#10234a;--theme-muted:#60718a;
 --theme-primary:#1769e8;--theme-primary-2:#54a7ff;--theme-accent:#2f80ed;--theme-line:#d8e5f3;
 --theme-soft:#edf6ff;--theme-shadow:0 12px 34px rgba(30,91,154,.10);--theme-radius:16px;
 --theme-hero:linear-gradient(135deg,#f9fcff 0%,#e9f4ff 100%);
}
[data-theme="dark"]{
 --theme-bg:#03132d;--theme-surface:#071d3e;--theme-ink:#f4f8ff;--theme-muted:#a7bdd8;
 --theme-primary:#18e0c0;--theme-primary-2:#8cff3f;--theme-accent:#a44cff;--theme-line:#153b66;
 --theme-soft:#09284f;--theme-shadow:0 14px 38px rgba(0,0,0,.28);--theme-radius:14px;
 --theme-hero:radial-gradient(circle at 85% 30%,rgba(24,224,192,.17),transparent 34%),linear-gradient(135deg,#03132d,#061d3c);
}
[data-theme="warm"]{
 --theme-bg:#fff8f1;--theme-surface:#fffdf9;--theme-ink:#342b29;--theme-muted:#766661;
 --theme-primary:#f0644b;--theme-primary-2:#ff9d7c;--theme-accent:#e97963;--theme-line:#f0ddd1;
 --theme-soft:#fff0e7;--theme-shadow:0 12px 34px rgba(137,75,53,.09);--theme-radius:18px;
 --theme-hero:linear-gradient(135deg,#fffdf9,#fff0e4);
}
[data-theme="academic"]{
 --theme-bg:#f5f8f4;--theme-surface:#ffffff;--theme-ink:#173d32;--theme-muted:#61736c;
 --theme-primary:#155b45;--theme-primary-2:#68aa91;--theme-accent:#2d7a60;--theme-line:#d3e2db;
 --theme-soft:#edf6f1;--theme-shadow:0 12px 32px rgba(20,80,61,.09);--theme-radius:10px;
 --theme-hero:linear-gradient(135deg,#fbfdfb,#e9f4ee);
}
[data-theme="bold"]{
 --theme-bg:#f8f4ff;--theme-surface:#ffffff;--theme-ink:#2d1559;--theme-muted:#715e89;
 --theme-primary:#6b24c9;--theme-primary-2:#ff5d72;--theme-accent:#ff6a4a;--theme-line:#e4d7f4;
 --theme-soft:#f2eaff;--theme-shadow:0 14px 36px rgba(85,32,151,.13);--theme-radius:18px;
 --theme-hero:radial-gradient(circle at 80% 30%,rgba(255,91,112,.28),transparent 32%),linear-gradient(135deg,#3e147a,#7026c7 60%,#9d2cbb);
}
[data-theme="minimal"]{
 --theme-bg:#f7f9f9;--theme-surface:#ffffff;--theme-ink:#222b2b;--theme-muted:#697676;
 --theme-primary:#078e87;--theme-primary-2:#49b8b1;--theme-accent:#078e87;--theme-line:#dce5e4;
 --theme-soft:#edf7f6;--theme-shadow:0 10px 28px rgba(29,68,66,.07);--theme-radius:8px;
 --theme-hero:linear-gradient(135deg,#ffffff,#f1f7f6);
}
html{background:var(--theme-bg)}
body{background:var(--theme-bg);color:var(--theme-ink);transition:background-color .2s ease,color .2s ease}
.site-head{background:color-mix(in srgb,var(--theme-surface) 94%,transparent);border-color:var(--theme-line);backdrop-filter:blur(12px)}
.brand,.navlinks a{color:var(--theme-ink)}
.brand-badge{background:var(--theme-primary)!important}
.hero,.pagehero{background:var(--theme-hero)}
.hero h1,.pagehero h1,.section-title h2,.card h3{color:var(--theme-ink)}
.hero h1 span,.label,.eyebrow,.card a{color:var(--theme-primary)!important}
.lede,.muted,.card p{color:var(--theme-muted)}
.card,.chem-card,.panel,.topic-card,.resource-card{background:var(--theme-surface);border-color:var(--theme-line);box-shadow:var(--theme-shadow);border-radius:var(--theme-radius)}
.btn:not(.light),a.btn:not(.light){background:var(--theme-primary);border-color:var(--theme-primary);color:#fff}
.btn.light,a.btn.light{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-ink)}
[data-theme="dark"] .btn:not(.light),[data-theme="dark"] a.btn:not(.light){color:#021c23}
[data-theme="bold"] .hero h1,[data-theme="bold"] .hero .lede,[data-theme="bold"] .hero .eyebrow{color:#fff!important}
[data-theme="bold"] .hero h1 span{color:#ff8a70!important}
[data-theme="dark"] .hero h1,[data-theme="dark"] .hero .lede,[data-theme="dark"] .hero .eyebrow{color:var(--theme-ink)!important}
[data-theme="dark"] .hero h1 span{color:var(--theme-primary)!important}
.share-trigger{background:var(--theme-surface);border-color:var(--theme-line);color:var(--theme-primary)}
.theme-control{position:relative;display:inline-flex;align-items:center;margin-left:6px}
.theme-button{border:1px solid var(--theme-line);background:var(--theme-surface);color:var(--theme-ink);border-radius:999px;padding:8px 11px;font:inherit;font-weight:750;cursor:pointer;white-space:nowrap}
.theme-panel{position:absolute;z-index:100;right:0;top:calc(100% + 9px);width:270px;background:var(--theme-surface);border:1px solid var(--theme-line);border-radius:14px;box-shadow:var(--theme-shadow);padding:12px}
.theme-panel strong{display:block;margin-bottom:8px}
.theme-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.theme-choice{display:flex;align-items:center;gap:7px;border:1px solid var(--theme-line);background:var(--theme-bg);color:var(--theme-ink);border-radius:9px;padding:9px;font:inherit;font-size:.82rem;font-weight:700;cursor:pointer;text-align:left}
.theme-choice[aria-pressed="true"]{outline:2px solid var(--theme-primary);outline-offset:1px}
.theme-dot{width:13px;height:13px;border-radius:50%;background:var(--dot);flex:0 0 auto}
[data-theme="dark"] .site-head,[data-theme="dark"] .card,[data-theme="dark"] .chem-card,[data-theme="dark"] .panel,[data-theme="dark"] .share-panel,[data-theme="dark"] .theme-panel{color:var(--theme-ink)}
@media(max-width:850px){.theme-control{margin-left:0}.theme-button{padding:7px 9px}.theme-panel{position:fixed;left:16px;right:16px;top:auto;bottom:16px;width:auto}}
@media(prefers-reduced-motion:reduce){body{transition:none}}

.theme-stats{margin-top:-22px;position:relative;z-index:3}
.theme-stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.theme-stat-grid>div{background:var(--theme-surface);border:1px solid var(--theme-line);box-shadow:var(--theme-shadow);border-radius:var(--theme-radius);padding:15px 18px;display:flex;flex-direction:column}
.theme-stat-grid strong{font-size:1.15rem;color:var(--theme-primary)}
.theme-stat-grid span{font-size:.78rem;color:var(--theme-muted);margin-top:2px}
[data-theme="academic"] .hero h1,[data-theme="warm"] .hero h1{font-family:Georgia,"Times New Roman",serif}
[data-theme="minimal"] .hero h1{letter-spacing:-.035em;font-weight:650}
@media(max-width:700px){.theme-stat-grid{grid-template-columns:1fr 1fr}.theme-stats{margin-top:-10px}}

/* === v3.7.5a Chemistry in Action card contrast fix ===
   Keep the dark theme unchanged; give the five light themes explicit,
   readable card text colours instead of inheriting legacy white text. */
html:not([data-theme="dark"]) .chem-card{color:var(--theme-ink)}
html:not([data-theme="dark"]) .chem-card h3{color:var(--theme-ink)!important}
html:not([data-theme="dark"]) .chem-card .formula{color:var(--theme-ink)!important}
html:not([data-theme="dark"]) .chem-card .mini-step{color:var(--theme-ink)!important;background:var(--theme-soft)}
html:not([data-theme="dark"]) .chem-card .mini-step span:not(.bubble){color:var(--theme-ink)!important}
html:not([data-theme="dark"]) .chem-card .bubble{color:var(--theme-ink)!important}
html:not([data-theme="dark"]) .chem-card .label{color:var(--theme-primary)!important}

/* === v3.7.5b Dark Mode light-card contrast fix ===
   Some legacy homepage feature cards keep a white background in Dark Mode.
   Force readable dark foregrounds only on those light cards, while leaving
   the navy Dark Mode cards unchanged. */
[data-theme="dark"] .card[style*="background:#fff"],
[data-theme="dark"] .card[style*="background: #fff"],
[data-theme="dark"] .card.light,
[data-theme="dark"] .light-card,
[data-theme="dark"] .feature-light,
[data-theme="dark"] .teacher-card{
  color:#10234a!important;
}
[data-theme="dark"] .card[style*="background:#fff"] h2,
[data-theme="dark"] .card[style*="background:#fff"] h3,
[data-theme="dark"] .card[style*="background: #fff"] h2,
[data-theme="dark"] .card[style*="background: #fff"] h3,
[data-theme="dark"] .card.light h2,
[data-theme="dark"] .card.light h3,
[data-theme="dark"] .light-card h2,
[data-theme="dark"] .light-card h3,
[data-theme="dark"] .feature-light h2,
[data-theme="dark"] .feature-light h3,
[data-theme="dark"] .teacher-card h2,
[data-theme="dark"] .teacher-card h3{
  color:#10234a!important;
}
[data-theme="dark"] .card[style*="background:#fff"] p,
[data-theme="dark"] .card[style*="background: #fff"] p,
[data-theme="dark"] .card.light p,
[data-theme="dark"] .light-card p,
[data-theme="dark"] .feature-light p,
[data-theme="dark"] .teacher-card p{
  color:#60718a!important;
}

/* === v3.7.5c Dark Mode homepage pale-panel contrast correction ===
   Targets the actual homepage classes: .teacher-copy and .feature-panel.
   The explicitly dark panels (.quote and .feature-panel.dark) are untouched. */
[data-theme="dark"] .teacher-copy,
[data-theme="dark"] .feature-panel:not(.dark){
  color:#10234a!important;
}
[data-theme="dark"] .teacher-copy h2,
[data-theme="dark"] .feature-panel:not(.dark) h2{
  color:#10234a!important;
  opacity:1!important;
}
[data-theme="dark"] .teacher-copy p,
[data-theme="dark"] .teacher-copy p.muted,
[data-theme="dark"] .feature-panel:not(.dark) p{
  color:#526985!important;
  opacity:1!important;
}
[data-theme="dark"] .teacher-copy .label,
[data-theme="dark"] .feature-panel:not(.dark) .label{
  color:#009d9a!important;
  opacity:1!important;
}

/* === v3.7.5e Unified Navigation & Mobile Polish === */
@media(max-width:860px){
 .site-head .nav{align-items:flex-start;gap:10px;flex-wrap:wrap}
 .site-head .navlinks{width:100%;display:flex;overflow-x:auto;flex-wrap:nowrap;gap:6px;padding:2px 0 7px;scrollbar-width:thin}
 .site-head .navlinks>a,.site-head .theme-control{flex:0 0 auto}
 .site-head .navlinks>a{min-height:40px;display:inline-flex;align-items:center;white-space:nowrap}
 .site-head .theme-button{min-height:40px}
}
@media(max-width:560px){
 .brand-copy span{font-size:.72rem}
 .hero{padding-top:38px}
 .hero .actions{display:grid;grid-template-columns:1fr}
 .hero .actions .btn{justify-content:center;text-align:center}
 .cards,.topic-grid,.resource-grid{grid-template-columns:1fr!important}
 .pagehero{padding-top:30px}
 .resource-share{width:100%}
 .share-trigger{width:100%;justify-content:center}
}
