/* Three compact language tabs, following the study-site's EN / 简 / 繁 control. */
body>header{gap:20px}
body>header .brand{flex-shrink:0;text-decoration:none;letter-spacing:-.4px}
body>header .brand .brand-name{font:600 23px/1.15 var(--serif,Georgia,serif);letter-spacing:-.4px;color:inherit}
.language-switcher{display:inline-flex;flex-shrink:0;gap:3px;padding:3px;border:1px solid #61708a;border-radius:9px;margin-left:8px;background:#fff;color:#19263b}
.language-switcher button{font:650 14px/1.3 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;min-width:36px;min-height:32px;padding:6px 9px;border:0;border-radius:6px;background:transparent;color:#45526b;cursor:pointer}
.language-switcher button[aria-pressed=true]{background:#3545b1;color:#fff}
.language-switcher button:hover{background:#e9eefb;color:#1a2850}
.language-switcher button[aria-pressed=true]:hover{background:#273a96;color:#fff}
.language-switcher button:focus-visible{outline:2px solid #455be1;outline-offset:3px}
html[lang^=zh] body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang TC','Microsoft JhengHei','Microsoft YaHei',sans-serif}
html[lang^=zh] p{line-height:1.9}
html[lang^=zh] .katex{line-height:1.2}
.tutorial-videos{padding:28px 0 38px;scroll-margin-top:145px;border-bottom:1px solid var(--line);margin-bottom:28px}
.video-section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:22px;margin-bottom:24px}
.video-section-heading h2{font:normal 29px/1.25 var(--serif);margin:9px 0 12px}
.video-section-heading p{font-size:16px;line-height:1.75;max-width:760px;margin:0}
.video-collection-link{flex-shrink:0;font-size:14px;line-height:1.5;border:1px solid #c5d1e6;border-radius:6px;padding:10px 13px;margin-top:12px}
.video-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.video-card{min-width:0;border:1px solid #d6dfed;border-radius:9px;overflow:hidden;background:#fff;padding:0;margin:0}
.video-poster{display:block;position:relative;aspect-ratio:16/9;background:#19263b;overflow:hidden}
.video-poster img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .2s ease}
.video-poster:hover img{transform:scale(1.025)}
.video-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:rgba(24,37,64,.9);border:1px solid #fff8;color:#fff;font-size:19px;padding-left:2px}
.video-duration{position:absolute;right:8px;bottom:8px;border-radius:4px;padding:3px 6px;background:#10192ee6;color:#fff;font:600 13px/1.2 -apple-system,sans-serif}
.video-card-copy{padding:15px 16px 17px}
.video-topic{font-size:13px;letter-spacing:.06em;font-weight:700;color:#4553a7}
.video-card .video-card-copy h3{font-size:17px;line-height:1.5;margin:7px 0 9px}
.video-card h3 a{color:var(--ink);text-decoration:none}
.video-card h3 a:hover{color:var(--blue);text-decoration:underline}
.video-language{font-size:14px!important;color:var(--muted);margin:0!important;line-height:1.6!important}
.video-calculation{display:inline-block;font-size:14px;margin-top:10px}
.video-poster:focus-visible{outline:3px solid #5364d1;outline-offset:-3px}
.foundation-videos{padding:20px 22px;background:#f5f8fd;border:1px solid #d4deee;border-radius:8px;margin:26px 0 12px}
.foundation-video-heading{display:flex;justify-content:space-between;gap:16px;margin-bottom:16px;line-height:1.5}
.foundation-video-heading strong{font-size:16px}
.foundation-video-heading>span{font-size:14px;color:var(--muted)}
.foundation-videos .video-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.foundation-videos .video-card{display:grid;grid-template-columns:minmax(130px,.9fr) minmax(0,1.1fr)}
.foundation-videos .video-poster{align-self:center;margin:10px 0 10px 10px;border-radius:5px}
.foundation-videos .video-card-copy{padding:12px}
.foundation-videos .video-card-copy h3{font-size:16px;margin:5px 0}
.foundation-videos .video-grid>.video-card:only-child{grid-column:1/-1;max-width:700px}
@media(max-width:1050px){body>header{gap:14px}.header-note{display:none}.video-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.foundation-videos .video-grid{grid-template-columns:1fr}}
@media(max-width:650px){body>header{height:auto;min-height:76px;padding:14px 18px;display:flex;flex-wrap:wrap;gap:12px 16px}body>header .brand{order:0;margin-right:auto}body>header .brand .brand-name{font-size:21px}.language-switcher{order:1;margin:0}body>header>a:not(.brand){order:2;font-size:14px;margin:0}.video-grid{grid-template-columns:1fr}.video-section-heading{display:block}.video-collection-link{display:inline-block;margin-top:16px}.video-section-heading h2{font-size:25px}.foundation-videos{padding:16px}.foundation-video-heading{display:block}.foundation-video-heading>span{display:block;margin-top:5px}.foundation-videos .video-card{grid-template-columns:1fr}.foundation-videos .video-poster{margin:0;border-radius:0}.video-card-copy{padding:14px 16px}.foundation-videos .video-card-copy{padding:14px 16px}}
@media(prefers-reduced-motion:reduce){.video-poster img{transition:none}.video-poster:hover img{transform:none}}
@media print{.language-switcher,.foundation-videos,.tutorial-videos{display:none}}

body>header .brand .brand-name{display:inline}
@media(max-width:650px){.foundation-nav{top:118px}.tutorial-foundation,.lesson{scroll-margin-top:170px}}

.foundation-videos{position:static;top:auto;height:auto;overflow:visible}
.foundation-nav a{min-width:0}
body>header .brand .brand-name{padding-left:0}

@media(max-width:760px){html{overflow-x:clip}}
