.language-switch{display:flex;align-items:center;gap:.4rem;flex-shrink:0;margin-left:auto;font-size:.85rem;white-space:nowrap}
.language-switch a{display:grid;place-items:center;min-width:44px;min-height:44px;padding:.35rem .45rem;text-decoration:none;border-radius:6px;color:#183c53;font-weight:600}
.language-switch a[aria-current]{background:#183c53;color:white;font-weight:700}
.language-switch a:hover{box-shadow:inset 0 0 0 2px #197d8a}
.language-switch a:focus-visible,.audience-trigger:focus-visible{outline:3px solid #168a96;outline-offset:3px}
.topbar{flex-wrap:wrap;gap:12px}
@media(max-width:650px){.topbar>nav{order:3;width:100%}}
@media print{.language-switch,.audience-trigger,.audience-dialog{display:none!important}}

.audience-trigger{cursor:pointer}
.audience-dialog{width:min(640px,calc(100% - 32px));box-sizing:border-box}

/* Shared teaching-site header and footer. */
.topbar{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:16px 24px}
.topbar>.brand{grid-column:1;grid-row:1;justify-self:start}
.topbar>.university-brand{grid-column:2;grid-row:1;justify-self:center;display:block;line-height:0}
.university-brand img{display:block;width:168px;max-width:100%;height:auto}
.topbar>.language-switch{grid-column:3;grid-row:1;justify-self:end;margin-left:0}
.topbar>nav{grid-column:1/-1;grid-row:2;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px 8px;width:100%}
.site-footer{display:flex;justify-content:space-between;align-items:flex-start;gap:24px}
.footer-home{font-size:14px;font-weight:700;color:var(--ink);text-decoration:none}
.footer-home:hover{text-decoration:underline}
.footer-identity p{margin:4px 0 10px}
.footer-actions{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-left:auto}
.site-footer .text-link{display:block;margin-top:0;text-align:left}
@media(max-width:650px){
 .topbar{grid-template-columns:minmax(0,1fr) auto;gap:14px}
 .topbar>.brand{grid-column:1;grid-row:1}
 .topbar>.language-switch{grid-column:2;grid-row:1}
 .topbar>.university-brand{grid-column:1/-1;grid-row:2}
 .university-brand img{width:145px}
 .topbar>nav{grid-column:1/-1;grid-row:3;justify-content:flex-end;gap:4px}
 .site-footer{flex-wrap:wrap}.footer-actions{margin-left:0}
}

/* Compact, pinned teaching-site bars, matching Python for chemistry. */
:root{--site-header-height:88px;--site-footer-height:69px}
html{scroll-padding-top:calc(var(--site-header-height) + 16px);scroll-padding-bottom:calc(var(--site-footer-height) + 16px)}
body{padding-top:var(--site-header-height);padding-bottom:var(--site-footer-height)}
.topbar{position:fixed;inset:0 0 auto;z-index:100;min-height:74px;padding:10px 30px;grid-template-columns:minmax(0,1fr) 150px minmax(0,1fr);column-gap:24px;row-gap:6px;background:#fff}
.topbar>.brand{font-size:17px;letter-spacing:-.025em}
.topbar>.university-brand{grid-column:2;grid-row:1}
.university-brand img{width:150px;height:auto}
.topbar>nav{grid-column:3;grid-row:1;justify-self:end;width:auto;margin:0 106px 0 0;justify-content:flex-end;flex-wrap:nowrap;gap:2px}
.topbar>nav a{white-space:nowrap;padding:8px 7px;font-size:13px;font-weight:400;border-radius:6px;color:#526576;text-decoration:none}
.topbar>nav a:hover{background:#e9f3f1;color:#0b726b}
.topbar>nav a[aria-current=page]{background:#eaf5f2;color:#0b726b;font-weight:700}
.topbar>.language-switch{grid-column:3;grid-row:1;font-size:13px;gap:4px}
.site-footer{position:fixed;inset:auto 0 0;z-index:100;max-width:none;width:100%;margin:0;padding:10px 30px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:#f5f7fa;border-top:1px solid #dce4eb;font-size:12px;line-height:1.6}
.site-footer .footer-identity{display:grid;grid-template-columns:auto auto;column-gap:16px;align-items:center}
.site-footer .footer-home{grid-column:1;font-size:12px;font-weight:700}
.site-footer .footer-identity p{grid-column:1;margin:0}
.site-footer .license-badge{grid-column:2;grid-row:1/3;display:block;margin:0;height:31px}
.site-footer .license-badge img{display:block}
.site-footer .design-credit{padding:0;min-height:0;font-size:12px;line-height:1.6;font-weight:400;color:#526576}
.site-footer .footer-actions{gap:2px;margin-left:auto}
.site-footer .footer-actions .text-link{padding:0;min-height:0;font-size:13px;font-weight:400;line-height:1.8;color:#172d3e}
.workspace>aside{top:calc(var(--site-header-height) + 16px)}
@media(max-width:1250px){
 .topbar>nav{grid-column:1/-1;grid-row:2;margin:0;justify-self:end;justify-content:flex-end;width:100%;flex-wrap:wrap}
}
@media(max-width:760px){
 .topbar{padding:8px 16px;grid-template-columns:minmax(0,1fr) 115px minmax(0,1fr);column-gap:12px}
 .topbar>.brand{font-size:14px}.university-brand img{width:115px}
 .topbar>.language-switch{gap:0}.language-switch a{min-width:36px;min-height:36px}
 .topbar>nav a{font-size:12px;padding:6px}
 .site-footer{padding:8px 16px;gap:8px;flex-wrap:nowrap}
 .site-footer .footer-identity{column-gap:8px}
 .site-footer .footer-actions .text-link,.site-footer .design-credit,.site-footer .footer-home{font-size:11px}
 .site-footer .license-badge{height:auto}.site-footer .license-badge img{width:70px;height:auto}
}
@media(max-width:480px){
 .topbar{grid-template-columns:minmax(0,1fr) 96px auto;column-gap:8px}
 .topbar>.brand{font-size:13px}.university-brand img{width:96px}
 .topbar>nav{justify-content:center}.topbar>nav a{font-size:11px;padding:5px}
 .language-switch a{min-width:30px;min-height:34px}.language-switch{font-size:12px}
 .site-footer{padding:7px 10px}.site-footer .footer-identity{column-gap:6px}
 .site-footer .license-badge img{width:58px}.site-footer .footer-actions .text-link{font-size:10px}
}
@media print{body{padding:0}.topbar,.site-footer{display:none!important}}

/* Thermochemistry identity beside the site name. */
.topbar>.brand{gap:10px;white-space:nowrap}
.topbar .brand-symbol{display:grid;place-items:center;width:36px;height:36px;flex-shrink:0;border-radius:9px;background:#172d3e;color:#fff;font:25px/1 Georgia,serif}
@media(max-width:480px){.topbar>.brand{gap:5px}.topbar .brand-symbol{width:25px;height:28px;border-radius:6px;font-size:21px}}

/* Eight cards: six core modules and two optional extensions. */
.eight-module-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:36px}
.eight-module-grid .part-card{display:flex;flex-direction:column;min-width:0;min-height:300px;padding:22px 20px;border-top:3px solid var(--part-accent);border-radius:16px}
.eight-module-grid .part-card h2{font-size:21px;line-height:1.25;margin:18px 0 12px}
.eight-module-grid .part-card p{font-size:14px}
.eight-module-grid .card-open{margin-top:auto;align-self:flex-start;font-size:12px}
.eight-module-grid .optional-card{--part-accent:#116d69}
.eight-module-grid .optional-label{font:700 10px/1.5 system-ui;letter-spacing:.05em;color:#116d69;min-height:32px}
.optional-next{flex-wrap:wrap;margin-bottom:30px}
@media(max-width:1050px){.eight-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.eight-module-grid{grid-template-columns:1fr}.eight-module-grid .part-card{min-height:240px}}

/* v29: centred navigation and university identity in the footer. */
.topbar{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.topbar>nav{grid-column:2;grid-row:1;justify-self:center;justify-content:center;width:auto;margin:0;flex-wrap:nowrap}
.topbar>.language-switch{grid-column:3;grid-row:1;justify-self:end}
.site-footer{display:grid;grid-template-columns:minmax(0,1fr) 130px minmax(0,1fr)}
.site-footer>.university-brand{grid-column:2;grid-row:1;justify-self:center;display:block}
.site-footer>.university-brand img{display:block;width:130px;height:auto}
.site-footer>.footer-identity{grid-column:1;grid-row:1;justify-self:start}
.site-footer>.footer-actions{grid-column:3;grid-row:1;justify-self:end;margin-left:0}
@media(max-width:900px){
 .topbar{grid-template-columns:1fr auto}
 .topbar>.language-switch{grid-column:2}
 .topbar>nav{grid-column:1/-1;grid-row:2;flex-wrap:wrap}
}
@media(max-width:650px){
 .site-footer{grid-template-columns:minmax(0,1fr) 85px minmax(0,1fr);column-gap:8px}
 .site-footer>.university-brand img{width:85px}
 .site-footer .footer-identity{display:flex;flex-direction:column;align-items:flex-start;gap:1px}
 .site-footer .license-badge img{width:58px}
 .site-footer .footer-actions{text-align:right}
}
@media print{.site-footer{display:none!important}}

/* v30: resource catalogue with a contextual reading guide. */
.topbar nav a[aria-current="page"]{text-decoration:none}
.resources-page{max-width:1180px;margin:auto;padding:36px 24px}
.resources-page>h1{font-size:42px;margin:12px 0 18px}
.resource-layout{display:grid;grid-template-columns:minmax(280px,1fr) minmax(0,1.12fr);gap:48px;align-items:start;margin:32px 0 56px}
.resource-catalog label{display:block;font-weight:600;font-size:14px;margin-bottom:8px}
#resource-search{width:100%;padding:12px 14px;border:1px solid #cbd6dd;border-radius:10px;background:white;font:inherit}
.resource-choice{padding:20px;border:1px solid #dce4eb;border-radius:14px;margin:12px 0;background:white}
.resource-choice.is-selected{border-color:#176d61;box-shadow:inset 3px 0 #176d61;background:#f1f8f6}
.resource-choice h2{font-size:19px;margin:7px 0}.resource-choice h2 a{color:#183c53;text-underline-offset:4px}
.resource-meta{font-size:13px;color:#526576;margin:0}
.resource-choice button{margin-top:12px;border:1px solid #cbd6dd;border-radius:8px;background:white;color:#176d61;padding:8px 14px;font:600 13px system-ui;cursor:pointer}
.resource-choice button[aria-pressed=true]{background:#176d61;color:white;border-color:#176d61}
.resource-details{position:sticky;top:calc(var(--site-header-height) + 20px);max-height:calc(100dvh - var(--site-header-height) - var(--site-footer-height) - 40px);overflow:auto;padding:28px;background:white;border:1px solid #dce4eb;border-radius:20px;box-shadow:0 8px 28px #18364d08}
.resource-panel h2{font-size:27px;margin:0 0 20px}.resource-panel p{line-height:1.7}.resource-panel a{overflow-wrap:anywhere}
.resource-tip{background:#eef4f8;padding:16px 20px;border-radius:12px;margin-top:24px}.resource-tip h3{font-size:16px;margin:0 0 8px}.resource-tip p{margin:0}
.resources-page [hidden]{display:none!important}
.resources-page>#donnees{border-top:1px solid #dce4eb;padding-top:24px}
@media(max-width:760px){.resource-layout{grid-template-columns:1fr;gap:24px}.resource-details{position:static;max-height:none;padding:22px}.resources-page>h1{font-size:32px}}
@media print{.resource-layout{display:block}.resource-catalog{display:none}.resource-details{position:static;max-height:none;overflow:visible;border:0;padding:0}.resources-page .resource-panel[hidden]{display:block!important}}
