/* Vector identity, mathematical compositions and reading layouts. */
.brand,.site-sidebar .brand{width:310px;max-width:100%;height:auto;aspect-ratio:auto;overflow:visible;margin-left:0;mix-blend-mode:normal;background:transparent}
.brand .brand-image{position:static;display:block;width:100%;max-width:100%;height:auto;left:auto;top:auto;filter:none;aspect-ratio:auto}
.brand-picture{display:block;width:100%;line-height:0}
.site-sidebar .brand{width:218px;margin:0 -6px 0 0}
.mobile-nav-actions{display:none}
.mobile-navigation{display:flex;flex:1;min-height:0;flex-direction:column}
.mobile-navigation[hidden]{display:none!important}
.math-illustration{display:block;width:100%;height:auto;border:0;border-radius:0;background:transparent;color:var(--year-accent,var(--blue));padding:0;box-shadow:none}
.home-marketing .home-intro.has-math-cover{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(230px,1fr);align-items:center;gap:28px;margin:48px 0 36px}
.home-marketing .home-intro.has-math-cover h1.brand-slogan{font-size:clamp(2.25rem,3.1vw,3.5rem);max-width:20ch}
.home-math-cover{position:relative;padding:24px 12px 16px;border:1px solid #d1dce6;border-radius:50% 50% 14px 14px;background:linear-gradient(150deg,#fff,#edf3f7);color:var(--blue);box-shadow:0 18px 50px #14243c07}
.home-math-cover .math-illustration{width:100%;height:auto}
.chapter-miniature{width:100%;margin:0 0 16px;padding:5px 14px;background:var(--year-wash,#eff3f8);border-radius:9px;border:1px solid #dce5ee}
.chapter-miniature .math-illustration{width:100%;height:130px;object-fit:contain}
.cardtop{margin-bottom:17px}.card .symbol{width:34px;height:34px;font-size:20px}.card h3{margin-top:0}
.annual-cover{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(220px,1fr);align-items:center;gap:40px;margin:26px 0 28px;padding:36px 40px;background:var(--year-wash,#edf3fa);border:1px solid var(--line);border-radius:18px}
.annual-cover-copy{min-width:0}.annual-cover h1{margin:14px 0 18px}.annual-cover .billing-intro{margin:0;font-size:1rem;line-height:1.75}.annual-cover-art{padding:10px;background:#ffffff8c;border-radius:12px}
.suite-chapter-list .chapter-miniature{margin:14px 0 16px;padding:4px 8px}.suite-chapter-list .chapter-miniature .math-illustration{height:115px}
.reading-layout{display:grid;grid-template-columns:minmax(0,1fr) 205px;gap:38px;align-items:start}
.reading-layout>.billing-main{width:auto;min-width:0;margin:0;padding-top:30px}
aside.lesson-outline{position:sticky;inset:auto;top:30px;align-self:start;width:auto;display:block;padding:0;background:transparent;border:0;margin:40px 0 0}
.lesson-outline details{margin:0;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden;font-size:.875rem}
.lesson-outline summary{padding:18px 16px;color:var(--navy);font-weight:600;cursor:pointer;min-height:48px}
.lesson-outline nav{padding:0 10px 14px}.lesson-outline nav a{display:block;padding:10px 10px;border-left:2px solid var(--line);color:var(--muted);line-height:1.55;text-decoration:none;overflow-wrap:anywhere}
.lesson-outline nav a[aria-current]{border-left-color:var(--blue);background:var(--tint);color:var(--navy)}
.lesson-outline nav a:hover{background:var(--paper);color:var(--blue)}
.reading-layout :is(section,h2)[id]{scroll-margin-top:30px}
.explanation-pair{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:24px;align-items:center;margin:18px 0}
.explanation-pair>p{margin:0}.explanation-pair>.number-formula{min-width:0;margin:0!important;font-size:1.15rem!important;overflow-x:auto}
.theory-figure-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);align-items:center;gap:26px;margin:30px 0}
.theory-figure-pair>.cycle-section{margin:0!important;padding:0!important;border:0;background:none}.theory-figure-pair .explanation-pair{display:block}.theory-figure-pair .explanation-pair>.number-formula{margin-top:16px!important}
.theory-figure-pair>.cycle-figure{margin:0!important;min-width:0}
.manual-figure figcaption{display:flex;flex-direction:column;align-items:flex-start;gap:8px;border-top:1px solid var(--line);margin-top:18px;padding:16px 18px!important;text-align:left!important;font-size:.9375rem!important;line-height:1.65!important;color:var(--body)}
.figure-number{font:600 .75rem/1.5 var(--sans);color:var(--blue);letter-spacing:.12em;white-space:nowrap}
.composed-exercises .number-question[id^="exercice-"]{position:relative;margin-left:56px;padding:26px 28px}
.exercise-margin-number{position:absolute;right:calc(100% + 14px);top:26px;display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line-strong);border-radius:50%;background:var(--paper);font:400 1rem var(--serif);color:var(--blue)}
.composed-exercises .exercise-group{border-top:2px solid var(--line-strong);padding-top:20px;margin-top:42px}
.chapter-journey{position:relative;border:0!important;margin-left:16px;padding-left:26px;border-left:2px solid var(--line-strong)!important}
.chapter-journey>.progress-chapter{position:relative;border:1px solid var(--line);border-radius:12px;background:var(--surface);margin-bottom:16px;padding:0 20px;border-left:1px solid var(--line)!important}
.chapter-journey .journey-marker{position:absolute;left:-44px;top:25px;display:grid!important;place-items:center;width:32px;height:32px;background:var(--paper);border:1px solid var(--line-strong);border-radius:50%;font-size:.875rem;color:var(--muted)}
.chapter-journey [data-completion="started"] .journey-marker{background:var(--year-wash);border-color:var(--year-accent);color:var(--year-accent)}
.chapter-journey [data-completion="answered"] .journey-marker{background:var(--year-accent);border-color:var(--year-accent);color:white}
.chapter-journey .progress-chapter>summary>span:nth-child(2){display:grid;gap:5px}
.chapter-journey .progress-chapter[open]{box-shadow:0 8px 26px #14243c07}
.illustrated-empty{position:relative;min-height:175px;padding-right:200px!important;border-style:solid!important;background:linear-gradient(120deg,#fff,#f3f6fa)}
.empty-illustration{position:absolute;right:24px;top:50%;transform:translateY(-50%);width:155px;color:var(--blue)}
dialog.composed-dialog{padding:0!important;width:min(960px,94vw);border:1px solid var(--line);border-radius:18px;max-height:90dvh}
.composed-dialog .modalhead{position:sticky;top:0;z-index:3;padding:16px 28px;background:#fff;border-bottom:1px solid var(--line);gap:16px;min-height:72px}
.composed-dialog #lessonBody{padding:22px 34px 30px}.composed-dialog .lesson-title{max-width:25ch;margin-top:0;font-family:var(--serif);font-weight:400;font-size:clamp(1.6rem,3vw,2.2rem)}
.composed-dialog .visualstage{min-height:300px;padding:30px}.composed-dialog .stepbuttons{position:sticky;bottom:0;display:flex;justify-content:space-between;gap:12px;padding:16px 0;margin-bottom:-15px;background:#fff;border-top:1px solid var(--line);z-index:2}
.composed-dialog .close{flex-shrink:0;min-width:44px;min-height:44px}.composed-dialog .tabs{flex-wrap:wrap;gap:8px}.composed-dialog .tabs button{font-size:.9375rem;min-height:44px}
.footer-directory{display:grid;grid-template-columns:1.1fr repeat(3,minmax(0,1fr));gap:28px;align-items:start;margin-top:26px;padding-top:24px;border-top:1px solid var(--line)}
.footer-signature{display:flex;align-items:center;background:var(--navy);border-radius:10px;padding:15px 10px;max-width:230px;min-height:82px}
.footer-signature img{width:100%;height:auto;display:block}.footer-column{display:grid;gap:8px}.footer-column h2{font:600 .875rem var(--sans);margin:0 0 8px;color:var(--navy)}
.footer-column a{font-size:.875rem;text-decoration:none;line-height:1.6;padding:5px 0;color:var(--body)}.footer-column a:hover{text-decoration:underline;color:var(--blue)}
@media(max-width:1300px){.reading-layout{grid-template-columns:minmax(0,1fr) 180px;gap:24px}.theory-figure-pair{display:block}.theory-figure-pair>.cycle-figure{margin-top:26px!important}.explanation-pair{display:block}.explanation-pair>.number-formula{margin-top:18px!important}}
@media(max-width:1199px){.reading-layout{display:flex;flex-direction:column;gap:0}.reading-layout>.billing-main{width:100%}aside.lesson-outline{position:static;order:-1;margin:20px 0 0;width:100%}.lesson-outline nav{display:grid;grid-template-columns:1fr 1fr;gap:4px}.footer-directory{grid-template-columns:repeat(3,minmax(0,1fr))}.footer-signature{grid-column:1/-1;max-width:240px}.home-marketing .home-intro.has-math-cover{grid-template-columns:minmax(0,1.3fr) minmax(200px,1fr);gap:20px}.annual-cover{gap:24px;padding:28px}}
@media(max-width:900px){.home-marketing .home-intro.has-math-cover{grid-template-columns:1fr}.home-math-cover{max-width:440px;border-radius:14px;justify-self:stretch;display:none}.home-marketing .home-intro.has-math-cover h1.brand-slogan{max-width:24ch}.annual-cover{grid-template-columns:minmax(0,1.3fr) minmax(160px,1fr);padding:26px}.chapter-miniature .math-illustration{height:112px}}
@media(max-width:720px){
 .brand,.billing-header .brand,.account-header .brand{width:190px;max-width:100%}.brand-picture{max-width:190px}
 aside.site-sidebar.compact-navigation{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;padding:12px 18px;position:relative;inset:auto;width:100%;height:auto;min-height:80px;overflow:visible}
 .compact-navigation .brand{width:165px;max-width:100%;margin:0}.mobile-nav-actions{display:flex;align-items:center;gap:8px}.mobile-account{font-size:.875rem;text-decoration:none;color:var(--navy);padding:10px 4px}.mobile-menu-toggle{font:600 .875rem var(--sans);min-height:44px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:8px;background:white;color:var(--navy)}
 .mobile-navigation{grid-column:1/-1;width:100%;padding:12px 0}.mobile-navigation>.school{margin:4px 0 16px}.mobile-navigation>nav:not(.years){display:grid;grid-template-columns:1fr 1fr;gap:4px}.mobile-navigation .years{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:20px}.mobile-navigation .navlabel{grid-column:1/-1}.mobile-navigation .asidebottom{display:none}.mobile-navigation .year{margin:0!important}.mobile-navigation .nav{white-space:normal;font-size:.9rem!important}
 .home-marketing .home-intro.has-math-cover{margin-top:28px}.home-marketing .home-intro.has-math-cover h1.brand-slogan{font-size:clamp(2rem,7.7vw,2.65rem)}
 .home-math-cover{display:block;max-width:100%;padding:4px 12px;border-radius:12px}.home-math-cover .math-illustration{height:180px}
 .annual-cover{grid-template-columns:1fr;gap:22px;padding:24px 22px}.annual-cover-art .math-illustration{height:165px}.annual-cover h1{font-size:2rem}.annual-cover .eyebrow{font-size:.75rem}
 .lesson-outline nav{grid-template-columns:1fr}.reading-layout>.billing-main{padding-top:24px}
 .manual-figure figcaption{padding:14px 10px!important}.composed-exercises .number-question[id^="exercice-"]{margin-left:0;padding:60px 20px 24px}.exercise-margin-number{left:20px;right:auto;top:14px;width:32px;height:32px;font-size:.875rem}
 .chapter-journey{margin-left:13px;padding-left:19px}.chapter-journey>.progress-chapter{padding:0 15px}.chapter-journey .journey-marker{left:-36px;width:30px;height:30px}.chapter-journey .progress-chapter>summary>span:nth-child(2){flex-basis:100%}
 .illustrated-empty{padding:24px!important}.empty-illustration{position:static;transform:none;width:130px;margin:0 0 12px}.empty-illustration .math-illustration{height:75px}
 .composed-dialog #lessonBody{padding:20px}.composed-dialog .modalhead{padding:12px 18px}.composed-dialog .visualstage{padding:22px 16px}.composed-dialog .stepbuttons button{white-space:normal;min-height:44px;font-size:.9rem;padding:10px 12px;margin:0}.composed-dialog .stepbuttons{gap:8px}
 .footer-directory{grid-template-columns:1fr 1fr;gap:24px 20px}.footer-signature{max-width:200px}.footer-column:last-child{grid-column:auto}
}
@media(prefers-reduced-motion:reduce){.lesson-outline *{scroll-behavior:auto}}
@media print{.lesson-outline,.home-math-cover,.chapter-miniature,.annual-cover-art,.footer-directory,.mobile-nav-actions,.empty-illustration{display:none!important}.reading-layout,.explanation-pair,.theory-figure-pair{display:block!important}.composed-exercises .number-question{margin-left:0!important}.exercise-margin-number{display:none}.annual-cover{display:block;background:white;border:0;padding:0}.brand-picture source{display:none}}


/* Fifteen finishing details: shared across all four years. */
:root{--math-curve:#345d8f;--math-tangent:var(--brand-orange);--success:#226345;--success-wash:#eef7f1;--error:#934633;--error-wash:#fff3ee;--surface-raised:#fff;--control-bg:#fff}
/* Compact identity and a single stroke vocabulary. */
.brand-picture{isolation:isolate}.brand-image{image-rendering:auto}
.ui-icon{display:inline-block;flex:none;width:20px!important;height:20px!important;min-width:20px;vertical-align:-.2em;border:0!important;border-radius:0!important;padding:0!important;background:none!important;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;box-shadow:none!important}
.resource-with-icon{display:inline-flex!important;align-items:center;gap:9px}
.site-sidebar .nav.resource-with-icon{display:flex!important}
.return-icon{stroke-width:1.7}
.chapter-prefix{font:500 .72rem/1.3 var(--sans);letter-spacing:.025em}
.cardnum:has(.roman-number){display:inline-flex;align-items:center;gap:8px;padding:5px 9px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--body)}
.roman-number{font:500 1.08rem/1.25 var(--serif);letter-spacing:.06em;color:var(--year-accent)}
.chapter-number{display:inline-block;border:1px solid var(--line-strong);border-radius:6px;padding:5px 12px;font:500 1.15rem/1.25 var(--serif);letter-spacing:.06em;background:var(--tint);color:var(--blue)}
/* Subject dividers give the catalogue an editorial rhythm. */
.chapter-group>.sectionhead{display:flex;align-items:center;gap:18px;margin:34px 0 21px}
.chapter-group>.sectionhead::after{content:"";height:1px;flex:1;order:1;background:linear-gradient(90deg,var(--line-strong),var(--line))}
.chapter-group>.sectionhead h2{font:500 1.5rem/1.3 var(--serif);color:var(--year-accent)}
.chapter-group>.sectionhead>span{order:2;font-variant-numeric:tabular-nums;white-space:nowrap}
/* Mathematical typography; native superscripts and text remain selectable. */
.number-formula,.step-math,.sheet-formula,.formula-lines,.math,.math-illustration text{font-family:var(--math);font-variant-numeric:lining-nums;letter-spacing:0}
.number-formula,.step-math,.sheet-formula,.formula-lines{line-height:1.85;overflow-wrap:break-word}
.number-formula sup,.number-formula sub,.step-math sup,.step-math sub,.sheet-formula sup,.sheet-formula sub{font-size:.72em;line-height:0;position:relative;vertical-align:baseline}
.number-formula sup,.step-math sup,.sheet-formula sup{top:-.55em}.number-formula sub,.step-math sub,.sheet-formula sub{bottom:-.2em}
.typeset-fraction{display:inline-flex;position:relative;flex-direction:column;vertical-align:-.62em;text-align:center;line-height:1.12;margin:0 .13em;font-size:.88em}
.fraction-numerator{border-bottom:1px solid currentColor;padding:0 .15em .1em}.fraction-denominator{padding:.1em .15em 0}
.fraction-slash{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.aligned-calculation{display:grid!important;grid-template-columns:max-content max-content minmax(0,1fr);column-gap:.4em;row-gap:.15em;align-items:baseline;text-align:left!important;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain}
.calculation-row{display:contents}.calculation-left{text-align:right}.calculation-equals{color:var(--muted)}.calculation-right{min-width:0}
.math-tone-curve{color:var(--math-curve)!important}.math-tone-tangent{color:var(--math-tangent)!important}
svg text.math-tone-curve{fill:var(--math-curve)!important}svg text.math-tone-tangent{fill:var(--math-tangent)!important}
/* Definitions, theorems, examples and cautions. */
[data-callout]{--callout-color:var(--blue);--callout-wash:var(--tint);border:1px solid var(--line)!important;border-left:3px solid var(--callout-color)!important;background:var(--callout-wash)!important;border-radius:10px!important;padding:22px 24px!important;color:var(--body)}
[data-callout="theorem"]{--callout-color:var(--gold);--callout-wash:var(--champagne-soft)}
[data-callout="example"]{--callout-color:var(--success);--callout-wash:var(--success-wash)}
[data-callout="warning"]{--callout-color:var(--error);--callout-wash:var(--error-wash)}
[data-callout] :is(h2,h3,h4){display:flex;align-items:baseline;gap:10px;color:var(--ink);margin-top:0}
[data-callout] :is(h2,h3,h4)>.ui-icon{align-self:center;color:var(--callout-color)}
[data-callout] p:last-child{margin-bottom:0}
/* Mathematical tables retain their native row and header semantics. */
.refined-table-scroll{max-width:100%;overflow-x:auto;margin:22px 0;border:1px solid var(--line);border-radius:10px;overscroll-behavior-inline:contain;background:var(--surface);scrollbar-color:var(--line-strong) var(--surface)}
.refined-table-scroll:focus-visible{outline:3px solid var(--blue);outline-offset:3px}
table.refined-table{width:100%;border-collapse:collapse;border:0!important;margin:0!important;background:var(--surface);color:var(--ink);font-variant-numeric:tabular-nums}
.refined-table :is(th,td){padding:15px 20px!important;border:0!important;border-bottom:1px solid var(--line)!important;line-height:1.65;vertical-align:middle}
.refined-table th{background:var(--tint)!important;color:var(--ink)!important;font-size:.9rem;font-weight:600;text-align:left;white-space:normal}
.refined-table td{background:transparent!important;color:var(--body)!important}
.refined-table tbody tr:nth-child(even){background:color-mix(in srgb,var(--tint) 45%,var(--surface))}
.refined-table tbody tr:last-child :is(th,td){border-bottom:0!important}
.refined-table td:first-child{color:var(--ink)!important}
/* Restrained card motion and directional affordances. */
.card,.suite-chapter-list>a,.annual-formulary-card{transition:border-color .22s var(--ease),box-shadow .22s var(--ease),transform .22s var(--ease)}
.cardfoot span:last-child{display:inline-flex;align-items:center;gap:6px}
.cardfoot .ui-icon{width:16px!important;height:16px!important;min-width:16px;transition:transform .22s var(--ease)}
@media(hover:hover){.card:hover,.suite-chapter-list>a:hover{transform:translateY(-2px);border-color:var(--year-accent);box-shadow:0 8px 25px color-mix(in srgb,var(--year-accent) 12%,transparent)}.card:hover .cardfoot .ui-icon{transform:translateX(3px)}}
/* Tabs have a quiet, moving underline; no navigation behavior changes. */
.tabs,.sheet-tabs,.account-tabs{gap:4px;border-bottom:1px solid var(--line);padding-bottom:0}
.tabs button,.sheet-tabs a,.account-tabs a{position:relative;border-radius:6px 6px 0 0;background:transparent;color:var(--muted);border:0;padding:13px 15px}
.tabs button::after,.sheet-tabs a::after,.account-tabs a::after,.foundation-links a::after,.interval-links a::after,.power-nav a::after{content:"";position:absolute;left:13px;right:13px;bottom:0;height:2px;border-radius:2px;background:var(--blue);transform:scaleX(0);transform-origin:center;transition:transform .22s var(--ease)}
.tabs button[aria-selected="true"],.sheet-tabs a[aria-current],.account-tabs a[aria-current]{background:var(--tint);color:var(--blue);font-weight:600}
.tabs button[aria-selected="true"]::after,.sheet-tabs a[aria-current]::after,.account-tabs a[aria-current]::after,.foundation-links a[aria-current]::after,.interval-links a[aria-current]::after,.power-nav a[aria-current]::after{transform:scaleX(1)}
.foundation-links a,.interval-links a,.power-nav a{position:relative}
/* Inputs, selected answers and feedback. */
input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="hidden"]),textarea,select{background:var(--control-bg);color:var(--ink);border:1px solid var(--line-strong);border-radius:8px;caret-color:var(--blue);min-height:44px;padding:11px 13px}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}
input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--blue);outline-offset:3px;box-shadow:0 0 0 5px var(--tint)}
.answer-options label{position:relative;background:var(--surface)!important;color:var(--ink);border:1px solid var(--line)!important;border-radius:10px;min-height:52px;gap:12px;padding:13px 16px;transition:border-color .18s,background-color .18s,box-shadow .18s}
.answer-options label:has(input:checked){border-color:var(--blue)!important;background:var(--tint)!important;box-shadow:inset 3px 0 0 var(--blue)}
.answer-options label:has(input:focus-visible){outline:2px solid var(--blue);outline-offset:3px}
.answer-options input[type="radio"]{accent-color:var(--blue);width:19px;height:19px;flex:none}
.answer-options label>span{min-width:0;overflow-wrap:anywhere;font-family:var(--math);font-size:1.06rem;color:var(--ink)}
.exercise-feedback:not(:empty){position:relative;padding:15px 18px 15px 48px;border-radius:9px;line-height:1.65;border:1px solid var(--line)}
.exercise-feedback.is-correct{background:var(--success-wash);color:var(--success);border-color:color-mix(in srgb,var(--success) 30%,var(--surface))}
.exercise-feedback.is-incorrect{background:var(--error-wash);color:var(--error);border-color:color-mix(in srgb,var(--error) 30%,var(--surface))}
.exercise-feedback.is-correct::before,.exercise-feedback.is-incorrect::before{content:"";position:absolute;left:19px;top:20px;width:13px;height:9px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg)}
.exercise-feedback.is-incorrect::before{width:15px;height:15px;top:20px;border:2px solid currentColor;border-radius:50%;transform:none;background:linear-gradient(currentColor,currentColor) center 3px/2px 5px no-repeat,linear-gradient(currentColor,currentColor) center 10px/2px 2px no-repeat}
.feedback.good{color:var(--success)}.feedback.bad{color:var(--error)}
/* A complete end-of-chapter composition. */
.chapter-ending{margin:44px 0 32px;padding:27px 29px;border:1px solid var(--line);border-top:2px solid var(--blue);border-radius:12px;background:var(--surface);box-shadow:var(--shadow)}
.chapter-ending>h2{font:500 1.6rem/1.3 var(--serif);margin:0 0 20px}
.chapter-ending-resources{display:flex;flex-wrap:wrap;gap:12px}
.chapter-ending .chapter-ending-next{display:flex;justify-content:space-between;gap:18px;flex-wrap:wrap;margin:24px 0 0;padding:20px 0 0;border-top:1px solid var(--line);background:none}
.chapter-ending-next a{max-width:100%;line-height:1.65;font-size:.95rem;color:var(--blue);text-decoration:none}
.chapter-ending-next a:last-child{font-weight:600}.chapter-ending-next a:hover{text-decoration:underline}
/* Appearance control: visible in the header, keyboard accessible and local to this device. */
.welcome-appearance{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:20px 0 24px}
.appearance-label{font:500 .9rem/1.5 var(--sans);color:var(--body)}
.appearance-options{display:inline-flex;gap:4px;padding:4px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface)}
.appearance-choice{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--body);font:500 .9rem/1.3 var(--sans)}
.appearance-choice[aria-pressed="true"]{background:var(--tint);color:var(--blue);border-color:var(--line-strong);box-shadow:0 2px 5px #14243c0a}
.appearance-choice:hover{background:var(--tint);color:var(--blue)}
.appearance-choice:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
@media(max-width:480px){.welcome-appearance{align-items:flex-start;flex-direction:column;gap:8px;margin:16px 0 20px}.appearance-choice{min-width:110px}}
@media print{.welcome-appearance{display:none!important}}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 12px;min-height:44px;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface);color:var(--body);font:500 .84rem/1.25 var(--sans);white-space:nowrap;flex:none}
.theme-toggle:hover{background:var(--tint);color:var(--blue)}
.theme-toggle-floating{position:fixed;right:20px;bottom:20px;z-index:50;box-shadow:var(--shadow)}
.account-header{flex-wrap:wrap;gap:16px}.billing-header{height:auto;min-height:90px;gap:16px;flex-wrap:wrap;padding-top:14px;padding-bottom:14px}
.billing-header .return-link{margin-left:auto}.billing-header .theme-toggle{margin-left:0}
/* Midnight theme, with explicit palettes for surfaces, diagrams and feedback. */
html[data-theme="dark"]{color-scheme:dark;--paper:#0e1726;--surface:#162235;--surface-raised:#1b2b41;--control-bg:#111e30;--ink:#e6edf7;--navy:#e6edf7;--body:#c1cee0;--muted:#9eafc5;--blue:#96bdf0;--blue-hover:#bed7f8;--tint:#21334d;--line:#304057;--line-strong:#50627b;--brand-orange:#dfb875;--brand-orange-hover:#e9c992;--brand-orange-ink:#14243c;--gold:var(--brand-orange);--gold-ink:var(--brand-orange);--champagne:#776444;--champagne-soft:#302b25;--math-curve:#96bdf0;--math-tangent:var(--brand-orange);--success:#9edaba;--success-wash:#19352d;--error:#f1b09e;--error-wash:#392825;--shadow:0 3px 18px #0002;--shadow-lift:0 10px 28px #0004;--year-accent:#96bdf0;--year-wash:#1b2e47}
html[data-theme="dark"] [data-academic-year="1"],html[data-theme="dark"] .year[data-year="1"]{--year-accent:#96bdf0;--year-wash:#1b2e47}
html[data-theme="dark"] [data-academic-year="2"],html[data-theme="dark"] .year[data-year="2"]{--year-accent:#8fcedc;--year-wash:#19333d}
html[data-theme="dark"] [data-academic-year="3"],html[data-theme="dark"] .year[data-year="3"]{--year-accent:#b8bfee;--year-wash:#292e48}
html[data-theme="dark"] [data-academic-year="4"],html[data-theme="dark"] .year[data-year="4"]{--year-accent:#aac7de;--year-wash:#223344}
html[data-theme="dark"] :is(body,.billing,.account-page){background:var(--paper);color:var(--ink)}
html[data-theme="dark"] :is(.feature,.offer,.footer-signature){background:#14243c;border-color:var(--line)}
html[data-theme="dark"] :is(.feature,.offer) :is(h2,p,.eyebrow,small){color:var(--ink)}
html[data-theme="dark"] :is(.white,.offer-cta){background:#eadbbb;border-color:#eadbbb;color:#14243c}
html[data-theme="dark"] :is(.site-sidebar,.card,.annual-formulary-card,.suite-chapter-list>a,.progressbox,.account-card,.dashboard-card,.progress-metrics article,.progress-chapter,.progress-sheet-list article,.lesson-outline details,.number-question,.cycle-figure,.number-figure,.foundation-figure,.sheet-section,.sheet-heading,.sheet-note,dialog,.composed-dialog .modalhead,.composed-dialog .stepbuttons,.mobile-menu-toggle,.secondary-link,.secondary,.dashboard-years a){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.home-math-cover,.annual-cover,.tutor-banner,.visualstage,.theory,.exercise,.course-total>span,.progress-storage-note,.curriculum-note,.release-note,.planned-message,.cycle-allocation,.cycle-toc,.course-tip,.format-row span,.account-badge,.account-art,.sheet-tabs,.foundation-summary,.number-note,.exercise-summary){background:var(--tint);color:var(--body);border-color:var(--line)}
html[data-theme="dark"] :is(.annual-cover-art,.symbol,.year b,.chapter-miniature,.sheet-formula,.number-formula){background:var(--year-wash);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.site-sidebar .nav,.site-sidebar .nav:hover,.site-sidebar .year:hover,.secondary:hover,.secondary-link:hover,.dashboard-years a:hover,.close,.cycle-browse a){color:var(--blue);background:var(--tint)}
html[data-theme="dark"] .site-sidebar .year[data-year].selected b{color:#101c2e}
html[data-theme="dark"] .chapter-journey [data-completion="answered"] .journey-marker{color:#101c2e}
html[data-theme="dark"] :is(.progress-page .progress-metrics strong,.progress-page .progress-chapter summary,.progress-page .progress-sheet-list a,.progress-page .progress-empty,.account-card label,.account-card p,.billing-intro,.cycle-toc a,.visualstage p,.step-math,.math,.sheet-formula,.formula-lines,.sheet-heading h2,.cardfoot span,.card p){color:var(--body)}
html[data-theme="dark"] :is(.progress-page .progress-empty,.illustrated-empty){background:var(--surface);border-color:var(--line)}
html[data-theme="dark"] :is(#progress-root,#error-root,#exam-root)>p[role="status"],html[data-theme="dark"] #account-status{background:var(--tint);color:var(--body);border-color:var(--line)}
html[data-theme="dark"] :is(#progress-root,#error-root,#exam-root)>p[role="alert"]{background:var(--error-wash);color:var(--error);border-color:var(--error)}
html[data-theme="dark"] :is(.account-card,.account-story,.billing-main,.progress-page) a{color:var(--blue)}
html[data-theme="dark"] :is(.check,.primary-button,.account-primary){background:var(--blue);color:#101c2e;border-color:var(--blue)}
html[data-theme="dark"] .account-card input,html[data-theme="dark"] .account-card select{background:var(--control-bg);color:var(--ink);border-color:var(--line-strong)}
html[data-theme="dark"] :is(.tabs button[aria-selected="true"],.sheet-tabs a[aria-current],.account-tabs a[aria-current]){background:var(--tint);color:var(--blue)}
html[data-theme="dark"] .math-illustration{color:var(--year-accent);background:transparent}
html[data-theme="dark"] svg:not(.ui-icon):not(.return-icon){background:transparent;border-color:var(--line)}
html[data-theme="dark"] svg text{fill:var(--body)}
html[data-theme="dark"] svg [fill="currentColor"]{fill:var(--year-accent)}
html[data-theme="dark"] svg :is([fill="#ffffff"],[fill="#fff"],[fill="white"],[fill="#edf2f7"]){fill:var(--surface-raised)}
html[data-theme="dark"] svg :is([fill="#e7d8b9"],[fill="#f5efe2"]){fill:var(--champagne-soft)}
html[data-theme="dark"] svg :is([fill="#345d8f"],[fill="#243d60"],[fill="#173458"]){fill:var(--math-curve)}
html[data-theme="dark"] svg :is([stroke="#345d8f"],[stroke="#243d60"],[stroke="#173458"]){stroke:var(--math-curve)}
html[data-theme] svg :is([stroke="#987132"],[stroke="#b69558"]){stroke:var(--math-tangent)}
html[data-theme] svg :is([fill="#987132"],[fill="#b69558"]){fill:var(--math-tangent)}
html[data-theme="dark"] svg :is([stroke="#dce5ee"],[stroke="#e2e7ee"],[stroke="#bdc9d8"]){stroke:var(--line)}
html[data-theme="dark"] svg [stroke="#8297ad"]{stroke:var(--muted)}
html[data-theme="dark"] .refined-table th{background:var(--tint)!important;color:var(--ink)!important}
html[data-theme="dark"] ::selection{background:#46678e;color:#fff}
/* Tests, account panels and worked examples use the same night palette. */
html[data-theme="dark"] :is(.walkthrough,.exam-card,.exam-option,.exam-nav a,.revision-topic,.account-resource,.account-notice,.skip-link){background:var(--surface);color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] :is(.exam-option:hover,.exam-option[aria-pressed="true"],.exam-nav a.answered,.exam-option b){background:var(--tint);color:var(--blue);border-color:var(--blue)}
html[data-theme="dark"] :is(.exam-meta,.exam-hint,.exam-question,.exam-score,.exam-summary-link,.account-price,.account-status dt,.account-fields small,.account-steps li::before,.account-resource .resource-index,.account-resource>span){color:var(--body)}
html[data-theme="dark"] .exam-nav a[aria-current]{outline-color:var(--blue)}
html[data-theme="dark"] :is(.exam-good,.revision-ready){background:var(--success-wash);border-color:var(--success)}
html[data-theme="dark"] :is(.exam-bad,.revision-review){background:var(--error-wash);border-color:var(--error)}
html[data-theme="dark"] :is(.exam-good .exam-status,.revision-right){color:var(--success)}
html[data-theme="dark"] :is(.exam-bad .exam-status,.revision-wrong){color:var(--error)}
html[data-theme="dark"] .account-fields input{-webkit-text-fill-color:var(--ink)}
html[data-theme="dark"] .account-fields input::placeholder{-webkit-text-fill-color:var(--muted)}
html[data-theme="dark"] :is(.number-explorer,.foundation-card,.checkout-content,.private-formats section){background:var(--surface);color:var(--body);border-color:var(--line)}
html[data-theme="dark"] :is(.foundation-hero,.interval-hero){background:#14243c;color:var(--ink)}
html[data-theme="dark"] svg :is([stroke="#314567"],[stroke="#47556e"],[stroke="#3e4d67"],[stroke="#3c4b64"],[stroke="#43526b"],[stroke="#7794b7"]){stroke:var(--math-curve)}
html[data-theme="dark"] svg :is([stroke="#838ea0"],[stroke="#687387"],[stroke="#697488"],[stroke="#8b95a6"],[stroke="#7c879b"]){stroke:var(--muted)}
html[data-theme="dark"] svg :is([stroke="#b58b28"],[stroke="#a26509"]){stroke:var(--math-tangent)}
html[data-theme="dark"] svg :is([fill="#314567"],[fill="#47556e"],[fill="#3e4d67"],[fill="#3c4b64"],[fill="#43526b"],[fill="#7794b7"]){fill:var(--math-curve)}
/* Diagram areas use dark surfaces too: labels must remain readable on the shapes. */
@media screen{
 html[data-theme="dark"] svg :is(rect,path,polygon,circle,ellipse):is([fill="#d2d8e3"],[fill="#dfe3ea"],[fill="#c6cedd"],[fill="#c4cddd"],[fill="#ced5e1"]){fill:var(--tint)}
 html[data-theme="dark"] svg :is(rect,path,polygon,circle,ellipse):is([fill="#b3bbc8"],[fill="#b9c2d3"],[fill="#a3abba"],[fill="#bac3d4"]){fill:#30455f}
}
.exam-option{transition:background-color .18s,border-color .18s,box-shadow .18s}
.exam-option[aria-pressed="true"]{box-shadow:inset 3px 0 0 var(--blue);border-color:var(--blue)}
.exam-good,.exam-bad{border-radius:10px;padding:20px 24px}
.exam-good .exam-status,.exam-bad .exam-status{font-weight:600;letter-spacing:.015em}
/* Button backgrounds and labels are a pair, independent of heading colors. */
html[data-theme="dark"]{--action-fill:#96bdf0;--action-hover:#bed7f8;--action-ink:#101c2e;--accent-action-fill:var(--brand-orange);--accent-action-hover:var(--brand-orange-hover);--accent-action-ink:var(--brand-orange-ink)}
html[data-theme="dark"] body :is(.home-primary,.check,.exam-btn:not(.secondary),.progress-link.primary,.primary-button,.account-primary,.account-button:not(.secondary)),
html[data-theme="dark"] .account-page .dashboard-course .account-button:not(.secondary),
html[data-theme="dark"] #account-service .account-button:not(.secondary){background:var(--action-fill);color:var(--action-ink);border-color:var(--action-fill);-webkit-text-fill-color:var(--action-ink)}
html[data-theme="dark"] body :is(.home-primary,.check,.exam-btn:not(.secondary),.progress-link.primary,.primary-button,.account-primary,.account-button:not(.secondary)):not(:disabled):hover,
html[data-theme="dark"] .account-page .dashboard-course .account-button:not(.secondary):hover,
html[data-theme="dark"] #account-service .account-button:not(.secondary):hover{background:var(--action-hover);color:var(--action-ink);border-color:var(--action-hover);-webkit-text-fill-color:var(--action-ink)}
html[data-theme="dark"] body :is(.white,.offer-cta){background:var(--accent-action-fill);color:var(--accent-action-ink);border-color:var(--accent-action-fill);-webkit-text-fill-color:var(--accent-action-ink)}
html[data-theme="dark"] body :is(.white,.offer-cta):not(:disabled):hover{background:var(--accent-action-hover);color:var(--accent-action-ink);border-color:var(--accent-action-hover);-webkit-text-fill-color:var(--accent-action-ink)}
html[data-theme="dark"] body :is(.secondary-link,.secondary,.exam-btn.secondary,.account-button.secondary,.step-controls button,.theme-toggle,.appearance-choice,.sheet-tabs a,.tabs button,.mobile-menu-toggle,.close){background:var(--surface);color:var(--blue);border-color:var(--line-strong);-webkit-text-fill-color:var(--blue)}
html[data-theme="dark"] body :is(.secondary-link,.secondary,.exam-btn.secondary,.account-button.secondary,.step-controls button,.theme-toggle,.appearance-choice,.sheet-tabs a,.tabs button,.mobile-menu-toggle,.close):not(:disabled):hover,
html[data-theme="dark"] body :is(.appearance-choice[aria-pressed="true"],.tabs button[aria-selected="true"],.sheet-tabs a[aria-current]){background:var(--tint);color:var(--blue);border-color:var(--blue);-webkit-text-fill-color:var(--blue)}
html[data-theme="dark"] body :is(.home-primary,.check,.exam-btn,.progress-link.primary,.account-button,.white,.offer-cta,.secondary-link,.theme-toggle,.appearance-choice)>:is(span,strong,b,small,svg){color:inherit;-webkit-text-fill-color:inherit}
html[data-theme="dark"] body :is(.home-primary,.check,.exam-btn,.progress-link.primary,.account-button,.white,.offer-cta,.secondary-link,.step-controls button,.theme-toggle,.appearance-choice):focus-visible{outline:3px solid var(--gold);outline-offset:4px}
html[data-theme="dark"] .order-summary #pay-button,html[data-theme="dark"] .account-fields button:disabled{background:var(--tint);color:var(--body);border-color:var(--line-strong);-webkit-text-fill-color:var(--body);opacity:1}
html[data-theme="dark"] body :is(.check,.exam-btn,.step-controls button,.primary-button):disabled{background:var(--tint);color:var(--muted);border-color:var(--line);-webkit-text-fill-color:var(--muted);opacity:1}
@media(max-width:900px){.aligned-calculation{font-size:1.1rem!important}.account-header nav{flex-wrap:wrap}.billing-header .brand{max-width:60%}}
@media(max-width:720px){
 .chapter-group>.sectionhead{gap:12px}.chapter-group>.sectionhead h2{font-size:1.3rem}.chapter-group>.sectionhead>span{font-size:.75rem}
 .theme-toggle{width:42px;padding:9px}.theme-toggle>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 aside.site-sidebar.compact-navigation{grid-template-columns:minmax(0,1fr) auto;padding:12px 14px;gap:8px}.compact-navigation .brand{width:145px}.mobile-nav-actions{gap:5px}.mobile-account{font-size:.8rem}.mobile-account>.ui-icon{display:none}.mobile-menu-toggle{padding:9px;font-size:.8rem}
 .billing-header{gap:10px}.billing-header .return-link{font-size:.82rem;max-width:45%;margin-left:0}.billing-header .theme-toggle{margin-left:auto}.billing-header .brand{max-width:65%}
 .chapter-ending{padding:22px 19px;margin-top:30px}.chapter-ending-resources>a{flex:1 1 180px;justify-content:center}.chapter-ending-next{flex-direction:column}
 [data-callout]{padding:20px 18px!important}.refined-table :is(th,td){padding:12px 15px!important}.typeset-fraction{font-size:.9em}
 .cardnum:has(.roman-number){gap:6px}.aligned-calculation{font-size:1.02rem!important}
}
@media(max-width:380px){.compact-navigation .brand{width:120px}.mobile-account{padding-inline:0}.mobile-menu-toggle{padding-inline:7px}.mobile-nav-actions{gap:4px}}
@media(prefers-reduced-motion:reduce){.card,.suite-chapter-list>a,.annual-formulary-card,.cardfoot .ui-icon,.tabs button::after,.sheet-tabs a::after,.account-tabs a::after,.foundation-links a::after,.interval-links a::after,.power-nav a::after{transition:none!important;transform:none!important}.tabs button::after,.sheet-tabs a::after,.account-tabs a::after,.foundation-links a::after,.interval-links a::after,.power-nav a::after{opacity:0}.tabs button[aria-selected="true"]::after,.sheet-tabs a[aria-current]::after,.account-tabs a[aria-current]::after,.foundation-links a[aria-current]::after,.interval-links a[aria-current]::after,.power-nav a[aria-current]::after{opacity:1}}
@media print{
 html[data-theme]{color-scheme:light;--paper:white;--surface:white;--ink:#14243c;--navy:#14243c;--body:#27364b;--muted:#4d5f76;--blue:#345d8f;--line:#c7cdd5;--line-strong:#a9b4c2;--tint:#f2f4f7;--year-accent:#345d8f;--year-wash:white;--gold:#80612d;--math-curve:#345d8f;--math-tangent:#80612d;--success-wash:#f4f6f5;--error-wash:#f6f3f1;--champagne-soft:#f6f4f0}
 .theme-toggle,.chapter-ending{display:none!important}.refined-table-scroll{overflow:visible;border:0}.aligned-calculation{overflow:visible}.refined-table thead{display:table-header-group}[data-callout]{break-inside:avoid}
 html[data-theme="dark"] :is(body,.billing,.account-page,main,figure,.number-question,.number-formula,.sheet-section,.sheet-formula,.step-math){background:white!important;color:#14243c!important}
}


/* Editorial details: the catalogue remains the main destination. */
.home-marketing .home-intro.has-math-cover{margin:28px 0 24px;gap:22px}
.home-marketing .home-intro.has-math-cover h1.brand-slogan{font-size:clamp(2.05rem,2.85vw,3.05rem);line-height:1.12;margin:12px 0 14px;max-width:22ch}
.home-marketing .home-lead{font-size:1rem;line-height:1.65;margin:10px 0;max-width:66ch}
.home-marketing .home-actions{margin-top:18px;gap:14px 22px}
.home-intro .welcome-appearance{margin:14px 0 18px}
.home-marketing .home-math-cover{padding:12px 8px}
.home-marketing .home-math-cover .math-illustration{max-height:195px}
.home-marketing .home-proof{margin:24px 0 26px}
.home-proof dl{grid-template-columns:repeat(4,minmax(0,1fr));padding:20px 0}
.home-proof dl>div{padding-inline:18px}
.home-proof dd{font-size:clamp(1.9rem,2.7vw,2.55rem);font-variant-numeric:tabular-nums;letter-spacing:-.025em;margin-bottom:10px;min-height:1.1em}
.home-proof dt{font-size:.9rem;line-height:1.55;max-width:24ch}
.home-marketing .home-bank-note{font-size:.9375rem;line-height:1.6;margin-bottom:18px}
/* Common reading widths and row alignment, without fixed content heights. */
@media(min-width:1200px){.billing-shell,.account-shell{max-width:1220px;padding-inline:36px}.reading-layout{grid-template-columns:minmax(0,1fr) 205px;gap:34px}body.home-marketing>main{max-width:1460px;padding-inline:clamp(30px,3.2vw,52px)}}
@media(min-width:1800px){body.home-marketing>main{margin-left:calc(250px + (100vw - 1710px)/2)}}
.number-lesson :is(.cycle-section,.foundation-section)>p{max-width:74ch}
.cards{grid-auto-rows:1fr;align-items:stretch}
.chapter-with-formulary{height:100%}.chapter-with-formulary>.card{display:flex;flex-direction:column}
.chapter-with-formulary>.chapter-formulary-link{min-height:46px;justify-content:center;text-align:center}
.cardfoot{width:100%;align-items:flex-end;min-height:66px;gap:8px 12px}
.cardfoot>span:first-child{flex:1 1 130px}.cardfoot>span:last-child{flex:none}
.suite-chapter-list>.annual-formulary-card>a:first-child{display:flex;flex-direction:column;align-items:stretch;height:auto}
.annual-formulary-card>a:first-child>span:first-child{align-self:flex-start}
.annual-formulary-card>a:first-child>span:last-child{margin-top:auto;padding-top:18px;border-top:1px solid var(--line);color:var(--blue);font-size:.9rem}
.annual-formulary-card>a:first-child>p{margin-bottom:22px}
/* Subtle backgrounds distinguish the years without changing the diagrams. */
:is(body,#catalogue)[data-academic-year="1"] .chapter-miniature{background-image:none}
:is(body,#catalogue)[data-academic-year="2"] .chapter-miniature{background-image:linear-gradient(color-mix(in srgb,var(--year-accent) 8%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--year-accent) 8%,transparent) 1px,transparent 1px);background-size:24px 24px}
:is(body,#catalogue)[data-academic-year="3"] .chapter-miniature{background-image:linear-gradient(transparent calc(50% - .5px),color-mix(in srgb,var(--year-accent) 13%,transparent) 50%,transparent calc(50% + .5px)),linear-gradient(90deg,transparent calc(50% - .5px),color-mix(in srgb,var(--year-accent) 13%,transparent) 50%,transparent calc(50% + .5px));background-size:100% 100%}
:is(body,#catalogue)[data-academic-year="4"] .chapter-miniature{background-image:linear-gradient(145deg,color-mix(in srgb,var(--surface) 50%,transparent),transparent 75%)}
/* Readable graph labels and consistent axes; plotted coordinates are unchanged. */
.refined-course-graph text{font-family:var(--sans);font-variant-numeric:tabular-nums;letter-spacing:0}
.refined-course-graph .graph-grid-line{stroke:var(--line)!important;stroke-width:1;opacity:.72}
.refined-course-graph .graph-axis{stroke:var(--muted)!important;stroke-width:1.7;stroke-linecap:round}
.refined-course-graph .graph-key-point{stroke:var(--surface)!important;stroke-width:2.5;paint-order:stroke fill}
.refined-course-graph .graph-point-label{paint-order:stroke fill;stroke:var(--surface);stroke-width:5px;stroke-linejoin:round;font-weight:600;fill:var(--ink)!important}
.refined-course-graph :is(line,path){stroke-linejoin:round}
.manual-figure:has(.refined-course-graph) figcaption{max-width:72ch;margin-inline:auto}
/* A quieter sidebar and discreet optional-chapter labels. */
.site-sidebar .nav{background:transparent;border-radius:6px}
.site-sidebar .nav.active{box-shadow:inset 2px 0 0 var(--blue);background:color-mix(in srgb,var(--tint) 65%,transparent)}
.site-sidebar .years{margin-top:28px;padding-top:20px;border-top:1px solid var(--line)}
.site-sidebar .navlabel{margin-bottom:8px}
.site-sidebar nav .year{gap:11px;padding:9px 6px;margin:6px 0}
.site-sidebar .year[data-year] b{background:transparent;border-color:transparent;border-radius:5px}
.site-sidebar .year[data-year].selected b{background:var(--year-wash);color:var(--year-accent);border:1px solid var(--line)}
html[data-theme="dark"] .site-sidebar .year[data-year].selected b{color:var(--year-accent)}
.card .optional-badge{background:transparent;color:var(--gold-ink);border:1px solid color-mix(in srgb,var(--gold) 50%,var(--line));border-radius:20px;padding:3px 10px;font-size:.75rem;font-weight:500;letter-spacing:.015em}
/* Breadcrumbs are real links to the existing year and chapter. */
.course-breadcrumb{margin:0 0 22px;font:.85rem/1.6 var(--sans);color:var(--muted)}
.course-breadcrumb ol{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;list-style:none;margin:0;padding:0}
.course-breadcrumb li{display:inline-flex;align-items:baseline;gap:10px;min-width:0;max-width:100%}
.course-breadcrumb li+li::before{content:'›';color:var(--muted);font-size:1rem}
.course-breadcrumb a{color:var(--body);text-decoration:none;overflow-wrap:anywhere}
.course-breadcrumb a:hover{text-decoration:underline;color:var(--blue)}
.course-breadcrumb [aria-current]{color:var(--blue);font-weight:600}
/* Native disclosure interactions retain keyboard and screen-reader behavior. */
.refined-disclosure>summary{list-style:none;position:relative;padding-right:38px!important}
.refined-disclosure>summary::-webkit-details-marker{display:none}
.refined-disclosure>summary::marker{content:''}
.refined-disclosure>summary::after{content:''!important;position:absolute;right:16px;top:50%;width:8px;height:8px;border-right:1.7px solid currentColor;border-bottom:1.7px solid currentColor;transform:translateY(-65%) rotate(45deg);transition:transform .18s ease;color:var(--muted);font-size:0!important}
.refined-disclosure[open]>summary::after{transform:translateY(-25%) rotate(225deg)}
.refined-disclosure[open]>:not(summary){animation:disclosure-reveal .18s ease-out}
@keyframes disclosure-reveal{from{opacity:0;transform:translateY(-3px)}to{opacity:1;transform:translateY(0)}}
/* Loading shells have no fictitious results and are replaced by the actual content. */
.student-loading{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:24px 0;pointer-events:none}
.loading-card{border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:24px;display:grid;gap:15px}
.loading-line{height:12px;border-radius:4px;background:linear-gradient(90deg,var(--tint),var(--line),var(--tint));background-size:220% 100%;animation:loading-sheen 1.7s ease-in-out infinite}
.loading-line:first-child{height:20px;width:65%}.loading-line:last-child{width:82%}
@keyframes loading-sheen{from{background-position:150% 0}to{background-position:-100% 0}}
/* Values and percentages are derived from the existing native progress element. */
.progress-meter{display:grid;grid-template-columns:minmax(0,1fr) 4.2ch;align-items:center;gap:12px;width:100%;margin:16px 0 6px}
.progress-page .progress-meter progress{appearance:none;-webkit-appearance:none;width:100%;height:8px;margin:0;border:0;border-radius:20px;overflow:hidden;background:var(--line)}
.progress-meter progress::-webkit-progress-bar{background:var(--line);border-radius:20px}
.progress-meter progress::-webkit-progress-value{background:var(--year-accent);border-radius:20px;transition:width .3s ease}
.progress-meter progress::-moz-progress-bar{background:var(--year-accent);border-radius:20px;transition:width .3s ease}
.progress-percent{font:.85rem/1.4 var(--sans);font-variant-numeric:tabular-nums;color:var(--body);white-space:nowrap;text-align:right}
.progress-percent:empty{display:none}
.progress-bar i{transition:width .3s ease;border-radius:20px}
/* A composed result summary, based solely on the score already calculated. */
.exam-card.result-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:28px;align-items:start;border-top:3px solid var(--year-accent);padding:28px 30px}
.result-summary>h2{grid-column:1;font:500 1.7rem/1.25 var(--serif);margin:0 0 12px}
.result-summary>.exam-score{grid-column:2;grid-row:1 / span 3;align-self:center;min-width:140px;padding:22px 24px;margin:0;background:var(--year-wash);color:var(--year-accent);border:1px solid var(--line);border-radius:12px;font:500 clamp(2.4rem,4vw,3.2rem)/1.1 var(--serif);font-variant-numeric:tabular-nums;text-align:center;white-space:nowrap}
.result-summary>:not(h2):not(.exam-score){grid-column:1;margin-top:8px;margin-bottom:8px}
.result-summary>.exam-btn{justify-self:start}
.revision-topics{gap:18px}.revision-topic{padding:22px;border-radius:10px}.revision-topic h3{font-size:1.05rem}
html[data-theme="dark"] .result-summary>.exam-score{background:var(--year-wash);color:var(--year-accent);border-color:var(--line)}
@media(max-width:1100px){.home-proof dl{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 0}.home-proof dl>div:nth-child(3){border-left:0;padding-left:0}}
@media(max-width:720px){
 .home-marketing .home-intro.has-math-cover{margin:22px 0 20px;gap:16px}.home-marketing .home-intro.has-math-cover h1.brand-slogan{font-size:clamp(1.9rem,7vw,2.4rem);margin:10px 0 12px}
 .home-marketing .home-math-cover .math-illustration{height:135px}.home-intro .welcome-appearance{margin:10px 0 14px}
 .home-proof dd{font-size:2rem}.home-proof dt{font-size:.875rem}.home-proof dl>div{padding-inline:12px}
 .cards{grid-auto-rows:auto}.cardfoot{min-height:0}.course-breadcrumb{margin-bottom:18px;font-size:.8rem}
 .site-sidebar .years{margin-top:16px;padding-top:14px}.site-sidebar nav .year{margin:0;padding:8px 5px}
 .student-loading{grid-template-columns:1fr;gap:12px}.loading-card{padding:20px}
 .exam-card.result-summary{grid-template-columns:1fr;padding:22px;gap:10px}.result-summary>.exam-score{grid-column:1;grid-row:2;justify-self:start;min-width:130px;padding:18px 22px;font-size:2.6rem}.result-summary>:not(h2):not(.exam-score){grid-column:1}
 .progress-meter{gap:9px}.progress-percent{font-size:.8125rem}
}
@media(prefers-reduced-motion:reduce){.refined-disclosure>summary::after,.progress-bar i,.progress-meter progress::-webkit-progress-value,.progress-meter progress::-moz-progress-bar{transition:none!important}.refined-disclosure[open]>:not(summary),.loading-line{animation:none!important}.loading-line{background:var(--tint)}}
@media print{.course-breadcrumb,.student-loading,.progress-percent{display:none!important}.refined-disclosure>summary::after{display:none!important}.refined-course-graph .graph-point-label{stroke:#fff!important;fill:#14243c!important}.refined-course-graph .graph-key-point{stroke:#fff!important}.result-summary{display:block!important}.result-summary>.exam-score{background:white!important;color:#14243c!important}}

/* Native form controls use paired theme colors, including open option lists.
   The shared rule outranks the older component-specific white backgrounds. */
@media screen{
 html[data-theme="light"]{color-scheme:light}
 html[data-theme] body :is(select,textarea,input:not([type="radio"],[type="checkbox"],[type="range"],[type="hidden"],[type="color"],[type="file"],[type="image"],[type="submit"],[type="reset"],[type="button"])),
 html[data-theme] #account-service :is(select,textarea,input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"])){
  color-scheme:inherit;background:var(--control-bg);color:var(--ink);-webkit-text-fill-color:var(--ink);caret-color:var(--blue);border-color:var(--line-strong);opacity:1
 }
 html[data-theme] body :is(input,textarea,select)[aria-invalid="true"],
 html[data-theme] #account-service :is(input,textarea,select)[aria-invalid="true"]{border-color:var(--error)!important}
 html[data-theme] body select :is(option,optgroup){background:var(--control-bg);color:var(--ink);-webkit-text-fill-color:var(--ink)}
 html[data-theme] body :is(input,textarea)::placeholder{color:var(--muted);-webkit-text-fill-color:var(--muted);opacity:1}
 html[data-theme] body :is(select,textarea,input):disabled,
 html[data-theme] #account-service :is(select,textarea,input):disabled{background:var(--tint)!important;color:var(--muted)!important;-webkit-text-fill-color:var(--muted)!important;opacity:1}
 html[data-theme] body select option:disabled{color:var(--muted);-webkit-text-fill-color:var(--muted)}
 html[data-theme] body :is(input,textarea):autofill,
 html[data-theme] #account-service :is(input,textarea):autofill{box-shadow:0 0 0 1000px var(--control-bg) inset;-webkit-text-fill-color:var(--ink);caret-color:var(--blue)}
 html[data-theme] body :is(input,textarea):-webkit-autofill,
 html[data-theme] #account-service :is(input,textarea):-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--control-bg) inset;-webkit-text-fill-color:var(--ink);caret-color:var(--blue)}
}

/* The catalogue year picker echoes the visual-explanation action. */
@media screen{
 html[data-theme] body #year-select{
  color-scheme:light;background:var(--accent-action-fill,var(--champagne-soft));
  color:var(--accent-action-ink,#14243c);-webkit-text-fill-color:var(--accent-action-ink,#14243c);
  border-color:var(--accent-action-fill,var(--champagne));font-weight:600
 }
 html[data-theme] body #year-select:not(:disabled):hover{
  background:var(--accent-action-hover,#fff);border-color:var(--accent-action-hover,#fff)
 }
}

/* Manual-inspired course typography and instructional hierarchy. */
.manual-course .manual-section-title{position:relative;display:block;padding:14px 0 12px 48px!important;border:0!important;border-top:1px solid var(--line)!important;margin:30px 0 20px;font-size:clamp(1.25rem,2vw,1.55rem);line-height:1.4}
.manual-section-title::before{content:attr(data-section-index);position:absolute;left:0;top:17px;color:var(--gold-ink);font:500 .9rem/1.5 var(--sans);font-variant-numeric:tabular-nums;letter-spacing:.06em}
.manual-original-index{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.manual-chapter-heading{position:relative;isolation:isolate;overflow:hidden;padding:12px 22px 18px;border-bottom:1px solid var(--line);border-left:3px solid var(--gold);margin:8px 0 26px;border-radius:0 12px 0 0;background:var(--surface)}
.manual-chapter-heading h1{position:relative;z-index:1;margin:8px 0!important;max-width:27ch;text-wrap:balance}
.chapter-formula-watermark{position:absolute;right:12px;bottom:6px;z-index:0;max-width:70%;overflow:hidden;white-space:nowrap;pointer-events:none;font:500 clamp(2.5rem,5vw,4.5rem)/1.15 var(--math);color:var(--year-accent);opacity:.065;user-select:none}
.manual-chapter-heading .chapter-number{margin-bottom:15px}
.lesson-outline nav a[data-outline-index]{position:relative;padding:12px 8px 12px 36px;border-left-width:2px;border-radius:0 6px 6px 0;font-size:.83rem;line-height:1.6}
.lesson-outline nav a[data-outline-index]::before{content:attr(data-outline-index);position:absolute;left:9px;top:13px;font:.7rem/1.7 var(--sans);color:var(--muted);font-variant-numeric:tabular-nums}
.lesson-outline nav a[aria-current="location"]{box-shadow:inset 2px 0 0 var(--blue);font-weight:600}
.lesson-outline nav a[aria-current="location"]::before{color:var(--blue)}
.manual-learning-box{padding:24px!important;margin-block:30px!important;border:1px solid var(--line)!important;border-radius:10px!important;background:var(--surface)!important}
.manual-learning-box[data-manual-kind="definition"]{border-left:3px solid var(--blue)!important}
.manual-learning-box[data-manual-kind="theorem"]{border:1px solid var(--gold)!important;background:color-mix(in srgb,var(--champagne-soft) 35%,var(--surface))!important}
.manual-learning-box[data-manual-kind="warning"]{border-left:3px solid var(--error)!important;background:var(--error-wash)!important}
.manual-box-label{display:flex;gap:8px;align-items:center;margin:0 0 10px;color:var(--blue);font:600 .72rem/1.5 var(--sans);letter-spacing:.1em;text-transform:uppercase}
[data-manual-kind="theorem"]>.manual-box-label{color:var(--gold-ink)}
[data-manual-kind="warning"]>.manual-box-label{color:var(--error)}
[data-manual-kind="warning"]>.manual-box-label::before{content:'!';display:grid;place-items:center;border:1.5px solid currentColor;border-radius:50%;width:18px;height:18px;font:700 .75rem/1 var(--sans)}
.manual-learning-box>.manual-section-title{margin-top:4px;border-top:0!important;padding-top:4px!important}
.manual-learning-box>.manual-section-title::before{top:7px}
.theorem-hypothesis{padding:12px 14px;border-bottom:1px solid var(--line);background:var(--surface);border-radius:5px;line-height:1.7}
.manual-proof>ol{border-left:2px solid var(--line-strong);margin-left:10px;padding-left:28px}
.manual-proof>ol>li{position:relative}.manual-proof>ol>li::before{box-shadow:0 0 0 5px var(--surface)}
.manual-proof .proof-end{float:right;margin:8px 0 0 16px;color:var(--gold-ink);font-size:1.15rem}
.manual-worked-example ol>li.manual-example-step{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 24px;align-items:start;padding-top:20px;padding-bottom:20px;border-bottom:1px solid var(--line)}
.manual-example-step>.step-math{grid-column:1;font-size:1.12rem!important;line-height:1.8;margin:0!important;min-width:0}
.manual-example-step>p{grid-column:2;font-size:.95rem!important;margin:0!important;padding-left:18px;border-left:1px solid var(--line);min-width:0}
.manual-worked-example ol>li:last-child{border-bottom:0}
.exercise-difficulty{display:inline-flex;gap:8px;align-items:center;margin:-4px 0 16px;padding:5px 9px;border:1px solid var(--line);border-radius:20px;background:var(--surface);color:var(--muted);font:.76rem/1.5 var(--sans)}
.difficulty-dots{display:flex;gap:3px}.difficulty-dots i{display:block;width:5px;height:5px;border:1px solid var(--blue);border-radius:50%}.difficulty-dots i.filled{background:var(--blue)}
/* Selection remains distinct from correctness: the native checked radio is retained. */
.answer-options label:has(input:checked){border-width:2px!important;padding:12px 15px;background:var(--tint)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--blue) 12%,transparent)}
.answer-options input[type="radio"]{width:21px;height:21px;margin:0;accent-color:var(--blue)}
.exam-option[aria-pressed="true"]{outline:2px solid var(--blue);outline-offset:2px}
.exam-option[aria-pressed="true"]>b{border-radius:50%;border:2px solid var(--blue)}
article.number-question>.number-formula.manual-final-result{position:relative;display:block;margin:24px 0 18px!important;padding:18px 22px!important;border:1px solid var(--line-strong)!important;border-left:3px solid var(--blue)!important;background:var(--tint)!important;color:var(--ink)!important;border-radius:8px!important;font-size:1.2rem!important;line-height:1.7!important}
.manual-final-result::before{content:'Résultat';display:block;color:var(--muted);font:600 .7rem/1.4 var(--sans);text-transform:uppercase;letter-spacing:.1em;margin-bottom:8px;grid-column:1/-1}
.manual-final-result.aligned-calculation{display:grid!important}
.manual-sign-table :is(th,td){text-align:center!important;border-right:1px solid var(--line)!important;padding:12px 16px!important}
.manual-sign-table :is(th,td):last-child{border-right:0!important}
.manual-sign-table .table-key-value{font:600 1.15rem var(--math);color:var(--blue)!important}
.manual-sign-chart rect{fill:var(--surface)!important;stroke:var(--line);stroke-width:1;rx:4px}
.manual-sign-chart line{stroke:var(--line-strong)!important;stroke-width:1}
.manual-sign-chart text{font-family:var(--math);fill:var(--ink)!important}
.manual-sign-chart .chart-key-value{font-weight:700;fill:var(--blue)!important;font-size:19px}
.manual-chapter-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:28px 0 10px;padding-top:24px;border-top:1px solid var(--line)}
html[data-theme] body .manual-chapter-navigation .chapter-direction{display:flex;flex-direction:column;gap:10px;padding:20px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink);text-decoration:none;min-width:0}
.manual-chapter-navigation .next{grid-column:2;margin:0;text-align:right}
.chapter-direction .direction-label{color:var(--blue);font:.8rem/1.5 var(--sans)}
.chapter-direction strong{font:500 1.08rem/1.5 var(--serif);overflow-wrap:anywhere}
html[data-theme] body .manual-chapter-navigation .chapter-direction:hover{background:var(--tint);border-color:var(--blue)}
html[data-theme] body .back-to-top{position:fixed;bottom:24px;right:24px;z-index:45;width:44px;height:44px;border:1px solid var(--line-strong);border-radius:50%;background:var(--surface);color:var(--blue);-webkit-text-fill-color:var(--blue);box-shadow:var(--shadow);font:500 1.35rem/1 var(--sans);display:grid;place-items:center;padding:0}
html[data-theme] body .back-to-top[hidden]{display:none!important}
body:has(.theme-toggle-floating) .back-to-top{bottom:82px}
html[data-theme] body .back-to-top:hover{background:var(--tint);border-color:var(--blue)}
.back-to-top:focus-visible{outline:3px solid var(--gold);outline-offset:4px}
html.theme-transition,html.theme-transition :is(body,main,aside,header,footer,section,article,nav,a,button,input,select,textarea,p,h1,h2,h3,span,div){transition:background-color .18s ease,color .18s ease,border-color .18s ease!important}
@media(max-width:900px){.manual-worked-example ol>li.manual-example-step{display:block}.manual-example-step>p{padding:12px 0 0;border:0}.manual-chapter-heading{padding:12px 16px 18px}}
@media(max-width:600px){.manual-learning-box{padding:20px 16px!important}.manual-course .manual-section-title{padding-left:36px!important}.manual-section-title::before{font-size:.8rem}.manual-chapter-navigation{grid-template-columns:1fr;gap:12px}.manual-chapter-navigation .next{grid-column:1}.chapter-direction strong{font-size:1rem}.chapter-formula-watermark{max-width:85%;font-size:2.5rem}.back-to-top{right:16px!important;bottom:16px!important}body:has(.theme-toggle-floating) .back-to-top{bottom:78px!important}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}html.theme-transition,html.theme-transition *{transition:none!important}}
@media print{.manual-chapter-navigation,.back-to-top,.chapter-formula-watermark,.exercise-difficulty{display:none!important}.manual-chapter-heading{padding:0!important;border:0;background:none}.manual-learning-box{break-inside:avoid}.manual-worked-example ol>li.manual-example-step{display:block}.manual-example-step>p{padding-left:0;border:0}.manual-final-result{break-inside:avoid}.manual-sign-chart rect{fill:white!important;stroke:#68798f!important}.manual-sign-chart text{fill:#14243c!important}}

/* Soft paper and quiet depth across the two themes. */
@media screen{
 html[data-theme="light"]{--paper:#faf7ef;--surface-highlight:#ffffffeb}
 html[data-theme="dark"]{--surface-highlight:#ffffff12}
 html[data-theme="dark"] body{background-color:var(--paper);background-image:linear-gradient(155deg,#0e1726 0%,#111e30 48%,#152333 100%);background-repeat:no-repeat;min-height:100vh}
 :is(.card,.annual-formulary-card,.account-card,.exam-card,.progress-metrics article){box-shadow:inset 0 1px 0 var(--surface-highlight),var(--shadow)}
}
/* Marginal notes stay in the reading order and collapse into the text on mobile. */
.reading-annotation{margin:24px 0}.reading-annotation>p{margin-top:0}
.reading-annotation .margin-annotation{margin:16px 0!important;font-size:.9rem}
@media(min-width:1500px){
 .reading-annotation{display:grid;grid-template-columns:minmax(0,1fr) 185px;gap:24px;align-items:start}
 .reading-annotation .margin-annotation{padding:12px 14px!important;margin:0!important;border-radius:0!important;border-width:0 0 0 2px!important;background:transparent!important;box-shadow:none!important}
 .reading-annotation .margin-annotation p{font-size:.82rem!important;line-height:1.65!important;margin:0}
 .margin-annotation>.manual-box-label{font-size:.63rem;letter-spacing:.04em}
}
.notation-key{padding:20px 22px;margin:22px 0;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.notation-key h2{font:600 .82rem/1.5 var(--sans);letter-spacing:.06em;text-transform:uppercase;margin:0 0 14px;color:var(--muted)}
.notation-key dl{margin:0;display:grid;gap:0}.notation-key dl>div{display:grid;grid-template-columns:105px minmax(0,1fr);gap:18px;align-items:baseline;padding:9px 0;border-top:1px solid var(--line)}
.notation-key dt{font:500 1.15rem/1.5 var(--math);color:var(--blue)}.notation-key dd{margin:0;font:.9rem/1.65 var(--sans);color:var(--body)}
.notation-legend .notation-symbol{font:600 1.45rem/1.4 var(--math);color:var(--blue)!important;text-align:center;min-width:70px}
.formula-with-domain{margin:24px 0;border:1px solid var(--line-strong);border-radius:10px;overflow:hidden;background:var(--surface)}
.formula-with-domain>.number-formula,.formula-with-domain>.explanation-pair{margin:0!important;border-radius:0!important;padding:18px 22px!important;border:0!important}
.formula-with-domain>.math-condition{margin:0!important;padding:11px 18px!important;border:0!important;border-top:1px solid var(--line)!important;background:var(--surface)!important;color:var(--body)!important;font:.85rem/1.65 var(--sans)!important}
.measured-value{white-space:nowrap;font-variant-numeric:tabular-nums}.measurement-unit{font-family:var(--sans);font-size:.86em;font-style:normal;letter-spacing:.015em;color:var(--muted)}
/* Reading tables: a hover aid, not a selected or correct state. */
@media(hover:hover){html[data-theme] body .refined-table tbody tr:hover{background:var(--tint);box-shadow:inset 2px 0 0 var(--blue)}}
.refined-table-scroll,.number-formula,.aligned-calculation,.sheet-table{scrollbar-width:thin;scrollbar-color:var(--line-strong) var(--surface)}
:is(.refined-table-scroll,.number-formula,.aligned-calculation,.sheet-table)::-webkit-scrollbar{height:9px;width:9px}
:is(.refined-table-scroll,.number-formula,.aligned-calculation,.sheet-table)::-webkit-scrollbar-track{background:var(--surface);border-radius:10px}
:is(.refined-table-scroll,.number-formula,.aligned-calculation,.sheet-table)::-webkit-scrollbar-thumb{background:var(--line-strong);border:2px solid var(--surface);border-radius:10px}
:is(.refined-table-scroll,.number-formula,.aligned-calculation,.sheet-table)::-webkit-scrollbar-thumb:hover{background:var(--muted)}
/* Real answer state and current position are distinguished by shape as well as color. */
html[data-theme] body .exam-nav{display:grid;grid-template-columns:repeat(10,minmax(38px,1fr));gap:9px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
html[data-theme] body .exam-nav a{position:relative;display:grid;place-items:center;min-width:0;min-height:44px;padding:9px;border:1px dashed var(--line-strong);border-radius:50%;background:var(--surface);color:var(--body);font-variant-numeric:tabular-nums;text-decoration:none}
html[data-theme] body .exam-nav a.answered{border-style:solid;border-radius:9px;background:var(--tint);color:var(--blue)}
.exam-nav a.answered::after{content:'✓';position:absolute;right:2px;bottom:0;font:700 .58rem/1 var(--sans);color:var(--blue)}
html[data-theme] body .exam-nav a[aria-current]{outline:2px solid var(--blue);outline-offset:3px;font-weight:700;border-style:solid;color:var(--ink)}
html[data-theme] body .exam-nav a:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.stable-action{width:var(--action-width)!important;max-width:100%!important;min-height:44px;box-sizing:border-box}
/* These are authored pedagogical tips, with no invented speaker attribution. */
.editorial-advice{position:relative;padding:26px 28px 22px 48px!important;border:0!important;border-top:1px solid var(--line)!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:transparent!important}
.editorial-advice::before{content:'“';position:absolute;left:10px;top:15px;font:400 3.2rem/1 var(--serif);color:var(--gold-ink);opacity:.7}
.editorial-advice h2{font:500 1.2rem/1.4 var(--serif)}
.editorial-advice>p,.teacher-tip.editorial-advice{font-family:var(--serif);font-size:1.05rem!important;line-height:1.8!important}
/* A contact card and comparable formats for the existing private lesson offer. */
.private-course-page .teacher-intro{display:grid;grid-template-columns:68px minmax(0,1fr) 230px;gap:24px;align-items:start;padding:30px;border:1px solid var(--line);border-top:3px solid var(--gold);border-radius:14px;background:var(--surface);box-shadow:var(--shadow)}
.private-course-page .teacher-monogram{display:grid;place-items:center;width:64px;height:64px;border-radius:50%;font:500 2rem/1 var(--serif);background:var(--tint);color:var(--blue);border:1px solid var(--line-strong)}
.private-course-page .teacher-intro h2{font:500 1.9rem/1.3 var(--serif);margin:0 0 12px}
.private-course-page .teacher-intro p{font-size:.95rem;line-height:1.7}
.teacher-contact{display:flex;flex-direction:column;gap:13px;border-left:1px solid var(--line);padding-left:22px;min-width:0}
.contact-caption{font:600 .72rem/1.5 var(--sans);text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
.contact-location{font:.9rem/1.65 var(--sans);color:var(--body)}
html[data-theme] body .teacher-email{font:600 .9rem/1.5 var(--sans);color:var(--blue);text-underline-offset:4px;overflow-wrap:anywhere}
.private-course-page .private-formats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.private-course-page .private-formats>section{display:flex;flex-direction:column;padding:28px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:inset 0 1px 0 var(--surface-highlight)}
.private-course-page .private-formats h2{font:500 1.55rem/1.35 var(--serif)}
.private-course-page .price-pending{margin-top:auto;padding-top:18px;border-top:1px solid var(--line);font-size:.9rem;color:var(--muted)}
.private-course-page .private-formats ul{padding-left:20px;margin-bottom:24px}
/* A document-like summary, retaining the existing price and payment availability. */
html[data-theme] .billing .order-summary{padding:28px;border:1px solid var(--line);border-top:3px solid var(--gold);border-radius:12px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}
.order-summary .subscription-price{padding:18px 0 24px;border-bottom:1px solid var(--line);margin-bottom:8px}
.order-summary .summary-line{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px;padding:14px 0;border-bottom:1px solid var(--line);align-items:baseline;font-size:.9rem}
.order-summary .summary-line>span{color:var(--muted)}.order-summary .summary-line>strong{color:var(--ink);text-align:right;font-variant-numeric:tabular-nums}
.order-summary .zero-note{padding:14px 0;font-size:.85rem!important;line-height:1.75;color:var(--body)}
html[data-theme] body .payment-choice{border-color:var(--line-strong);background:var(--surface);color:var(--ink);border-radius:10px}
html[data-theme] body .payment-choice:has(input:checked){border-color:var(--blue);background:var(--tint);color:var(--ink)}
html[data-theme="dark"] .payment-choice :is(.paypal-word,.twint-word){color:var(--ink)}
/* The real missing-page response shares the same identity and themes. */
.missing-page .missing-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(180px,.8fr);gap:40px;align-items:center;margin:40px 0 70px}
.missing-page h1{max-width:18ch}.missing-page .missing-copy p{max-width:48ch;font-size:1rem;line-height:1.8}
.missing-page .missing-art{position:relative;border:1px solid var(--line);border-radius:18px;background:var(--surface);padding:24px;color:var(--blue)}
.missing-art .missing-number{font:500 clamp(3.5rem,9vw,6rem)/1 var(--serif);letter-spacing:-.03em;text-align:center;color:var(--blue)}
.missing-art svg{display:block;width:100%;height:auto;background:transparent;border:0;color:var(--blue)}
.missing-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:26px}
@media(max-width:900px){.private-course-page .teacher-intro{grid-template-columns:60px minmax(0,1fr);padding:24px}.teacher-contact{grid-column:1/-1;border-left:0;border-top:1px solid var(--line);padding:18px 0 0;gap:8px}.exam-nav{grid-template-columns:repeat(5,minmax(38px,1fr))!important}}
@media(max-width:600px){.private-course-page .private-formats{grid-template-columns:1fr}.private-course-page .teacher-intro{gap:16px}.private-course-page .private-formats>section{padding:22px}.notation-key{padding:17px}.notation-key dl>div{grid-template-columns:75px minmax(0,1fr);gap:12px}.editorial-advice{padding:22px 16px 20px 37px!important}.missing-page .missing-layout{grid-template-columns:1fr;gap:24px;margin:24px 0 40px}.missing-art{max-width:320px;width:100%;justify-self:center}.missing-actions{flex-direction:column}.missing-actions a{text-align:center}}
@media print{.reading-annotation{display:block}.margin-annotation{break-inside:avoid}.teacher-contact{border-color:#888}.missing-art{display:none}.formula-with-domain,.notation-key{break-inside:avoid}.measurement-unit{color:#334b67!important}.editorial-advice::before{color:#526075}.stable-action{width:auto!important}}
/* Compact navigation tools use the site's existing, tested theme colors. */
.study-toolbar{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:7px;padding:12px 0;margin:0 0 18px;border-bottom:1px solid var(--line);font:.82rem/1.5 var(--sans)}
html[data-theme] body :is(.study-button,.study-action,.study-chapter-info,.study-dialog button,.study-correction-link){font-family:var(--sans);background:var(--surface);color:var(--blue);-webkit-text-fill-color:var(--blue);border:1px solid var(--line-strong);border-radius:8px;padding:9px 12px;min-height:42px;text-decoration:none;font-size:.84rem;line-height:1.5;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}
html[data-theme] body :is(.study-button,.study-action,.study-chapter-info,.study-dialog button,.study-correction-link):hover{background:var(--tint);border-color:var(--blue)}
html[data-theme] body :is(.study-button,.study-dialog button)[aria-pressed="true"]{background:var(--tint);color:var(--ink);-webkit-text-fill-color:var(--ink);border-color:var(--blue);box-shadow:inset 0 -2px 0 var(--blue)}
html[data-theme] body :is(.study-toolbar button,.study-dialog button,.study-dialog a,.study-progress-tile,.study-term):focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.study-toolbar>.study-button:first-child{margin-right:auto}
html[data-theme] body .study-resume{display:block;padding:14px 18px;margin:0 0 20px;border:1px solid var(--line);border-left:3px solid var(--blue);border-radius:8px;background:var(--surface);color:var(--blue);text-decoration:none;font:.9rem/1.6 var(--sans)}
html[data-theme] body .study-chapter-info{width:100%;margin-top:7px;min-height:38px;font-size:.79rem}
.study-dialog{width:min(740px,calc(100vw - 32px));max-height:88dvh;padding:0!important;border:1px solid var(--line-strong);border-radius:16px;background:var(--surface);color:var(--ink);box-shadow:0 25px 90px #0005;overflow:auto}
.study-dialog::backdrop{background:#071323b8;backdrop-filter:blur(4px)}
.study-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 24px;border-bottom:1px solid var(--line);background:var(--surface);position:sticky;top:0;z-index:2}
.study-dialog-head h2{margin:0;font:500 1.55rem/1.35 var(--serif);color:var(--ink)}
.study-dialog-body{padding:24px}.study-dialog-body p{color:var(--body)}.study-dialog-body h3{font-size:1.05rem;margin:24px 0 12px}
.study-dialog .study-search-label{display:block;font-size:.85rem;margin-bottom:7px;color:var(--body)}
.study-dialog input[type="search"]{width:100%;font-size:1rem!important}
.study-filters,.study-size-choices{display:flex;flex-wrap:wrap;gap:7px;margin:16px 0}
.study-result-count,.study-help-note{font-size:.83rem!important;color:var(--muted)!important}
.study-results{list-style:none;padding:0;margin:12px 0}.study-results li{border-top:1px solid var(--line)}
.study-results a{display:flex;flex-direction:column;gap:6px;padding:15px 10px;color:var(--ink);text-decoration:none;border-radius:6px}
.study-results a:hover{background:var(--tint)}.study-result-meta{font:.72rem/1.5 var(--sans);color:var(--muted);letter-spacing:.04em}.study-result-chapter{font-size:.85rem;color:var(--body)}
.study-results strong{font:500 1.13rem/1.4 var(--serif)}.study-empty{padding:22px 0;font:.95rem/1.7 var(--sans);color:var(--muted)}
.study-topics{padding-left:22px;color:var(--body)}.study-topics li{margin:8px 0;line-height:1.65}
.study-favorite-row{display:flex;align-items:center;gap:14px;justify-content:space-between;padding:12px 0;border-top:1px solid var(--line)}
.study-favorite-row>a{color:var(--blue);font-size:.95rem;line-height:1.6;text-decoration:none}.study-favorite-row button{flex:none}
.study-personal-links{display:grid;gap:8px}.study-personal-links>a{padding:12px 14px;background:var(--surface);border:1px solid var(--line);border-radius:8px;color:var(--blue);text-decoration:none;font:.95rem/1.5 var(--sans)}
.study-personal-links>a:hover{background:var(--tint)}.study-personal-links>button{justify-content:flex-start!important;font-size:.95rem!important}
.study-toc-links{display:grid;gap:5px}.study-toc-links>a{display:block;padding:12px;color:var(--blue);border-left:2px solid var(--line);text-decoration:none;line-height:1.6}
.study-toc-links>a:hover{background:var(--tint);border-color:var(--blue)}
.study-mobile-toc{display:none!important}
html[data-theme] body .study-term{display:inline;padding:0;min-height:0;border:0;border-bottom:1px dotted var(--blue);border-radius:0;background:transparent;color:inherit;-webkit-text-fill-color:currentColor;font:inherit;line-height:inherit;cursor:help}
.study-term:hover{border-bottom-style:solid;color:var(--blue)!important}.study-glossary-definition{font:1.1rem/1.85 var(--sans)}
.study-zoom-button{display:flex!important;margin:12px 0 0 auto}
.study-dialog:has(.study-enlarged){width:min(1080px,calc(100vw - 24px))}
.study-enlarged{margin:0!important;padding:0!important;border:0!important;background:var(--surface)!important}
.study-enlarged :is(svg,img){width:100%!important;height:auto!important;max-height:66dvh;object-fit:contain;background:var(--surface)!important;border:0!important}
.study-enlarged figcaption{margin:14px 0 0;font:.9rem/1.6 var(--sans);color:var(--body)}
.study-correction-link{margin-top:14px!important;font-size:.8rem!important}
.study-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:200;max-width:min(580px,calc(100vw - 40px));padding:13px 20px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink);box-shadow:var(--shadow-lift);font:.9rem/1.55 var(--sans);pointer-events:none}
.study-toast[hidden]{display:none}
.study-progress-map{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
html[data-theme] body .study-progress-tile{display:flex;flex-direction:column;gap:10px;padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--body);text-decoration:none;font-size:.85rem}
.study-progress-tile strong{font:500 1.05rem/1.5 var(--serif);color:var(--ink)}.study-progress-tile small{font-size:.78rem;color:var(--muted)}
.study-mini-bar{height:5px;border-radius:10px;background:var(--line);overflow:hidden;display:block;margin-top:auto}.study-mini-bar i{display:block;height:100%;border-radius:10px;background:var(--year-accent)}
html[data-theme] body .study-progress-tile:hover{border-color:var(--blue);background:var(--tint)}
html[data-reading-size="normal"]{--reading-scale:1}html[data-reading-size="comfort"]{--reading-scale:1.12}html[data-reading-size="large"]{--reading-scale:1.24}
html:is([data-reading-size="comfort"],[data-reading-size="large"]) :is(.number-lesson,.formula-sheet) :is(p,li,dd,dt){font-size:calc(1rem * var(--reading-scale))!important}
html:is([data-reading-size="comfort"],[data-reading-size="large"]) :is(.number-lesson,.formula-sheet) :is(.number-formula,.step-math,.sheet-formula,.formula-lines){font-size:calc(1.2rem * var(--reading-scale))!important}
html:is([data-reading-size="comfort"],[data-reading-size="large"]) .number-lesson .answer-options label>span{font-size:calc(1.06rem * var(--reading-scale))!important}
html:is([data-reading-size="comfort"],[data-reading-size="large"]) :is(.exam-question,.exam-option){font-size:calc(1rem * var(--reading-scale))!important}
html.study-focus :is(.site-sidebar,.billing-header,.account-header,.lesson-outline,main>footer,.chapter-ending,.course-breadcrumb){display:none!important}
html.study-focus .reading-layout{display:block!important}
html.study-focus :is(.billing-shell,.account-shell){max-width:1060px!important;margin:auto!important;padding-inline:24px!important}
html.study-focus body>main,html.study-focus main.number-lesson,html.study-focus main.formula-sheet{margin-inline:auto!important;max-width:960px!important;width:100%!important}
html.study-focus .study-toolbar{position:sticky;top:0;z-index:20;background:var(--paper);padding-block:10px}
.help-page .help-intro{max-width:65ch}.help-index{display:flex;flex-wrap:wrap;gap:9px;margin:24px 0}.help-index a{color:var(--blue);padding:8px 12px;border:1px solid var(--line);border-radius:7px;text-decoration:none;font-size:.85rem}
.help-page main>section{padding:24px;margin:20px 0;border:1px solid var(--line);border-radius:12px;background:var(--surface);scroll-margin-top:20px}.help-page h2{font:500 1.5rem/1.4 var(--serif)}.help-page p,.help-page li{font-size:1rem;line-height:1.8}
@media(max-width:1199px){.study-mobile-toc{display:inline-flex!important}}
@media(max-width:800px){.study-progress-map{grid-template-columns:repeat(2,minmax(0,1fr))}.study-toolbar{gap:6px}.study-toolbar button{padding:8px 10px!important}.study-dialog-head,.study-dialog-body{padding:18px}.study-dialog-head h2{font-size:1.3rem}}
@media(max-width:520px){.study-progress-map{grid-template-columns:1fr}.study-favorite-row{align-items:flex-start}.study-dialog{max-height:92dvh}.study-dialog-head{gap:10px}.study-toast{bottom:76px;width:calc(100vw - 36px)}.help-page main>section{padding:20px 17px}}
@media(prefers-reduced-motion:reduce){.study-dialog,.study-toast,.study-progress-tile{transition:none!important;animation:none!important}}
@media print{.study-toolbar,.study-resume,.study-toast,.study-dialog,.study-chapter-info,.study-zoom-button,.study-correction-link,.study-progress-map{display:none!important}.study-term{border:0!important;color:inherit!important}.help-page main>section{break-inside:avoid}html:is([data-reading-size="comfort"],[data-reading-size="large"]) :is(.number-lesson,.formula-sheet) :is(p,li,dd,dt){font-size:10.5pt!important}html:is([data-reading-size="comfort"],[data-reading-size="large"]) :is(.number-lesson,.formula-sheet) :is(.number-formula,.step-math,.sheet-formula,.formula-lines){font-size:12pt!important}}

/* Resource navigation and personal revision, September 2026. */
.study-breadcrumb{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font:.8rem/1.6 var(--sans);margin:0 0 16px!important;color:var(--muted)}
.study-resource-tabs{display:flex;flex-wrap:wrap;gap:7px;padding:10px 0;margin:12px 0 20px;border-bottom:1px solid var(--line)}
html[data-theme] body .study-resource-tabs a[aria-current="page"]{background:var(--tint);color:var(--ink);-webkit-text-fill-color:var(--ink);border-color:var(--blue);box-shadow:inset 0 -3px 0 var(--blue);font-weight:700}
.study-result-preview{display:block;margin-top:6px;font:.85rem/1.55 var(--sans);color:var(--body)}
html[data-theme] body .study-dialog :is(.study-year-filter,.study-note-input){width:100%;max-width:100%;background:var(--surface);color:var(--ink);-webkit-text-fill-color:var(--ink);border:1px solid var(--line-strong);border-radius:8px;padding:12px;font:1rem/1.6 var(--sans);color-scheme:light}
html[data-theme="dark"] body .study-dialog :is(.study-year-filter,.study-note-input){color-scheme:dark}
.study-dialog .study-year-filter{margin-bottom:4px}.study-dialog label[for="study-search-year"]{margin-top:16px}.study-note-input{display:block;margin:12px 0;resize:vertical;min-height:170px}
.study-section-actions,.study-question-actions,.study-step-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:18px;padding-top:12px;border-top:1px solid var(--line)}
html[data-theme] body .study-report{font:.78rem/1.5 var(--sans);color:var(--muted);-webkit-text-fill-color:var(--muted);text-decoration:underline;text-underline-offset:3px;padding:8px 4px;min-height:36px;display:inline-flex;align-items:center}
.study-question-actions .study-report,.study-section-actions .study-report{margin-left:auto}
.study-page-report{margin:22px 0;text-align:right}.study-step-status{font:.78rem/1.5 var(--sans);color:var(--muted)}
.study-step-controls{margin:8px 0 16px;border-top:0;padding-top:0}
.study-step-controls [hidden],.number-question>ol>li[hidden],.number-question>.number-formula[hidden]{display:none!important}
.study-exercise-nav{margin:18px 0 25px;padding:14px 18px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.study-exercise-nav summary{cursor:pointer;font:.9rem/1.6 var(--sans);font-weight:600;color:var(--ink)}
.study-exercise-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(54px,1fr));gap:7px}
html[data-theme] body .study-exercise-grid a[data-answered="true"]{background:var(--tint);color:var(--ink);-webkit-text-fill-color:var(--ink);border-color:var(--blue)}
.study-comparison-dialog{width:min(1220px,calc(100vw - 24px))}.study-comparison{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}.study-comparison>section{min-width:0}.study-comparison>section+section{border-left:1px solid var(--line);padding-left:24px}.study-comparison .number-question{margin:0!important;padding:16px!important;box-shadow:none!important}.study-comparison .answer-options{grid-template-columns:1fr!important}.study-comparison .number-formula{overflow-x:auto}.study-comparison input:disabled{opacity:1}.study-comparison label{opacity:1!important}.study-comparison li{margin:10px 0}
.study-teaching-panel{border-left:3px solid var(--blue)!important;padding-left:22px!important}
.study-teaching-panel[data-teaching-kind="Erreur fréquente"]{border-left-style:dashed!important;border-left-color:var(--gold)!important}
.study-teaching-label{display:inline-flex;align-items:center;font:700 .75rem/1.5 var(--sans);letter-spacing:.03em;color:var(--blue);background:var(--tint);border:1px solid var(--line);border-radius:5px;padding:4px 9px;margin-bottom:12px}
.study-teaching-panel[data-teaching-kind="Exemple"]{border-left-color:var(--gold)!important}
.study-teaching-panel[data-teaching-kind="Méthode"]{border-left-style:double!important;border-left-width:4px!important}
html[data-theme] body :is(.study-report,.study-resource-tabs a,.study-exercise-nav summary,.study-note-input,.study-year-filter):focus-visible{outline:3px solid var(--gold);outline-offset:3px}
@media(max-width:760px){.study-comparison{grid-template-columns:1fr}.study-comparison>section+section{border-left:0;border-top:1px solid var(--line);padding-left:0;padding-top:12px}.study-section-actions,.study-question-actions{align-items:flex-start}.study-question-actions .study-report,.study-section-actions .study-report{margin-left:0}.study-resource-tabs{gap:5px}.study-teaching-panel{padding-left:14px!important}}
@media print{
 @page{size:A4;margin:16mm}
 .study-resource-tabs,.study-section-actions,.study-question-actions,.study-step-controls,.study-exercise-nav,.study-page-report,.study-report{display:none!important}
 html[data-theme] body,html[data-theme] body main{background:white!important;color:#182230!important;-webkit-text-fill-color:#182230!important}
 html[data-theme] body .number-question>.number-formula[hidden]{display:block!important}
 html[data-theme] body .number-question>ol>li,html[data-theme] body .number-question>ol>li[hidden]{display:list-item!important}
 .number-question,figure,.number-formula,.sheet-formula,.study-teaching-panel{break-inside:avoid;page-break-inside:avoid}
 h1,h2,h3,h4{break-after:avoid;page-break-after:avoid}p,li{orphans:3;widows:3}
 .number-lesson,.formula-sheet{max-width:none!important;width:auto!important;margin:0!important;padding:0!important}
 .number-formula,.sheet-formula{white-space:normal!important;overflow:visible!important}svg,img{max-width:100%!important}
 html[data-theme] body .study-teaching-label{background:#f0f3f6!important;color:#182230!important;-webkit-text-fill-color:#182230!important;border-color:#8b95a3}
}

/* Fifteen visual finishes: consistent scale, rhythm and optical alignment. */
/* 1. Keep related tools together and retain visible text labels. */
.study-toolbar[data-composed]{gap:8px 14px;padding:10px 0 12px;margin-bottom:16px;align-items:center}
.study-tool-group{display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0}
.study-tools-navigation{margin-right:auto}.study-tools-reading{padding-inline:12px;border-inline:1px solid var(--line)}
html[data-theme] body .study-toolbar[data-composed] .study-button{padding:7px 10px;min-height:38px;font-size:.78rem;border-radius:7px;background:var(--surface);color:var(--blue);-webkit-text-fill-color:var(--blue)}
html[data-theme] body .study-toolbar[data-composed] .study-button[aria-pressed="true"]{background:var(--tint);color:var(--ink);-webkit-text-fill-color:var(--ink)}
[data-tool-icon]::before{content:attr(data-tool-icon);font-size:.92em;line-height:1;opacity:.8;flex:none}
/* 2. Four related accents, limited to chapter and year landmarks. */
html[data-theme="light"] [data-academic-year="1"],html[data-theme="light"] .year[data-year="1"]{--year-accent:#345d8f;--year-wash:#edf3fa}
html[data-theme="light"] [data-academic-year="2"],html[data-theme="light"] .year[data-year="2"]{--year-accent:#286b72;--year-wash:#edf5f4}
html[data-theme="light"] [data-academic-year="3"],html[data-theme="light"] .year[data-year="3"]{--year-accent:#57588b;--year-wash:#f1f0f8}
html[data-theme="light"] [data-academic-year="4"],html[data-theme="light"] .year[data-year="4"]{--year-accent:#785b2e;--year-wash:#f7f3ea}
html[data-theme="dark"] [data-academic-year="4"],html[data-theme="dark"] .year[data-year="4"]{--year-accent:#dfbd86;--year-wash:#302c25}
/* 3. Roman numerals share a measured, centered footprint. */
.cardnum .roman-number{display:inline-flex;justify-content:center;min-width:2.2em;font-variant-numeric:lining-nums;letter-spacing:.035em;line-height:1.25}
.manual-chapter-heading .chapter-number{align-self:start;display:inline-flex;align-items:center;justify-content:center;min-width:1.5em;font-weight:400;letter-spacing:-.025em;line-height:1.12;color:var(--year-accent,var(--blue))}
/* 4. Preserve the revised SVG wordmark's native proportions at every size. */
.brand-picture img{object-fit:contain;object-position:left center}.site-sidebar .brand{margin-right:0}
/* 5. A compact opening with a comfortable reading measure. */
.elegant-chapter-opening{gap:18px!important;padding:18px 0 20px!important;margin-bottom:16px!important;border-bottom:1px solid var(--line)!important}
.elegant-chapter-opening h1{font-size:clamp(1.85rem,2.7vw,2.75rem)!important;line-height:1.17!important;letter-spacing:-.025em;text-wrap:balance;margin:0!important}
.elegant-resource>.billing-intro{max-width:67ch;line-height:1.75;margin-block:14px 20px;color:var(--body)}
.elegant-chapter-opening .chapter-formula-watermark{font-size:clamp(1.4rem,2vw,2rem);opacity:.12;max-width:30%;overflow:hidden}
/* 6. Shared card rows, retaining every title in full. */
#catalogue .chapter-with-formulary{display:flex;flex-direction:column;min-width:0}
#catalogue .chapter-with-formulary>.card{flex:1;display:flex;flex-direction:column;align-items:stretch;width:100%;height:auto;min-width:0}
#catalogue .card .cardtop{min-height:34px;align-items:center;justify-content:flex-end;margin-bottom:14px}
#catalogue .card .cardtop .cardnum{max-width:100%}
#catalogue .card h3{min-height:3.1em;line-height:1.5;text-wrap:pretty;margin:0 0 11px;font-size:1.03rem}
#catalogue .card .cardfoot{margin-top:auto;padding-top:18px}
#catalogue .chapter-with-formulary>.formulary-link{margin-top:8px}
/* 7. A quiet common frame, with no cropping of mathematical drawings. */
#catalogue .chapter-miniature{display:flex;align-items:center;justify-content:center;min-height:140px;margin-bottom:18px;padding:12px 14px;border-radius:10px;border:1px solid var(--line);box-shadow:inset 0 1px 0 #ffffff12}
#catalogue .chapter-miniature .math-illustration{height:112px;width:100%;object-fit:contain}
.elegant-resource figure:not(.study-enlarged){border:1px solid var(--line);border-radius:12px;padding:18px;background:var(--surface);box-shadow:0 3px 12px #14243c05}
.elegant-resource figure:not(.study-enlarged)>svg{display:block;max-width:100%;height:auto;margin-inline:auto}
.elegant-resource figcaption{margin-top:12px;padding-top:10px;line-height:1.6;font-size:.82rem;color:var(--muted);text-align:center}
/* 8. Consistent equation rhythm; expression text and answer controls stay intact. */
.elegant-resource :is(.number-formula,.step-math,.sheet-formula){font-variant-numeric:lining-nums tabular-nums;font-feature-settings:"lnum" 1,"tnum" 1;line-height:1.8;letter-spacing:.005em;padding-block:14px;max-width:100%;overflow-x:auto}
.elegant-resource .aligned-calculation{row-gap:8px;align-items:baseline}
.elegant-resource :is(.typeset-fraction,.typeset-power){vertical-align:middle}
/* 9. A fine geometric pause at the start of each main section. */
.elegant-section-heading{position:relative;padding-top:22px!important;margin-top:30px!important;text-wrap:balance}
.elegant-section-heading::before{content:"";position:absolute;top:0;left:0;width:54px;height:1px;background:var(--line-strong)}
.elegant-section-heading::after{content:"";position:absolute;top:-2px;left:58px;width:5px;height:5px;background:var(--year-accent,var(--blue));transform:rotate(45deg)}
/* 10. A measured progression from page to inset to raised surface. */
html[data-theme="light"]{--surface-raised:#ffffff;--elegant-inset:#f2f5f8;--elegant-shadow:0 4px 16px #17345808}
html[data-theme="dark"]{--surface-raised:#1c2c41;--elegant-inset:#111d2d;--elegant-shadow:0 4px 18px #0002}
html[data-theme] .study-exercise-nav,html[data-theme] .study-resource-tabs{background:var(--elegant-inset)}
.study-resource-tabs{padding:8px;border:1px solid var(--line);border-radius:10px}
html[data-theme] .study-dialog,html[data-theme] .chapter-ending{background:var(--surface-raised);box-shadow:var(--elegant-shadow)}
/* 11. A common button scale with explicit paired foregrounds. */
html[data-theme] body :is(.study-button,.study-action,.study-chapter-info,.study-dialog button,.study-correction-link){border-radius:8px;gap:7px;line-height:1.45;min-height:42px;font-weight:500;text-align:center}
html[data-theme] body .lesson-primary-action{background:linear-gradient(135deg,#f3dba9,#eac98b);color:#392d1b;-webkit-text-fill-color:#392d1b;border:1px solid #c5a263;border-radius:8px;padding:11px 18px;font:600 .9rem/1.5 var(--sans);display:inline-flex;align-items:center;justify-content:center;min-height:44px;text-decoration:none}
html[data-theme] body .lesson-primary-action:hover{background:#f5dfb7;color:#392d1b;-webkit-text-fill-color:#392d1b}
/* 12. Dialogs with a consistent header, field and result rhythm. */
.study-dialog{border-radius:14px;scrollbar-gutter:stable}.study-dialog-head{padding:18px 22px;gap:14px}.study-dialog-head h2{font-size:clamp(1.2rem,2vw,1.5rem);line-height:1.35;text-wrap:balance}
.study-dialog-body{padding:22px}.study-dialog-body>h3{margin-top:24px}.study-results>li+li{margin-top:8px}
.study-results a{padding:14px 16px!important;border-radius:9px!important}.study-result-meta{letter-spacing:.015em;line-height:1.55}.study-result-preview{line-height:1.65;margin-top:8px}
.study-note-input{min-height:190px;line-height:1.75!important;padding:16px!important}
/* 13. Small, finite transitions with an explicit reduced-motion alternative. */
@keyframes elegant-dialog-arrival{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.study-dialog[open]{animation:elegant-dialog-arrival .16s ease-out}
@media(hover:hover){.study-button,.study-action,.study-dialog button,.study-resource-tabs a,.lesson-primary-action{transition:background-color .14s ease,border-color .14s ease,box-shadow .14s ease}.study-results a:hover{box-shadow:inset 3px 0 0 var(--blue)}}
/* 14. Compact layouts keep labels readable and targets comfortable. */
@media(max-width:760px){
 .study-toolbar[data-composed]{display:grid;grid-template-columns:1fr;gap:8px;padding-block:8px}
 .study-tool-group{gap:6px}.study-tools-navigation{margin-right:0}.study-tools-reading{padding:8px 0;border-inline:0;border-block:1px solid var(--line)}
 html[data-theme] body .study-toolbar[data-composed] .study-button{min-height:42px;flex:1 1 auto;padding:8px 10px;font-size:.79rem}
 .elegant-chapter-opening{padding:12px 0 16px!important;gap:12px!important}.elegant-chapter-opening h1{font-size:clamp(1.65rem,6.7vw,2.15rem)!important;overflow-wrap:anywhere}
 .elegant-resource figure:not(.study-enlarged){padding:12px}.elegant-section-heading{margin-top:24px!important;padding-top:18px!important}
 .study-dialog-head,.study-dialog-body{padding:16px}.study-dialog-head{gap:10px}.study-dialog-head .study-close{flex:none}
 .study-result-preview{font-size:.82rem}.study-note-input{min-height:165px}.study-resource-tabs .study-button{flex:1 1 85px}
 #catalogue .card h3{min-height:0}.chapter-ending-resources>a{flex:1 1 100%}
}
@media(min-width:761px) and (max-width:1100px){.study-tools-personal{width:100%;padding-top:7px;border-top:1px solid var(--line)}}
/* 15. One clear primary action at the end of a lesson. */
.chapter-ending{padding:22px 24px;margin-top:32px;border-top:2px solid var(--year-accent,var(--blue));border-radius:12px}
.chapter-ending>h2{font-size:1.35rem;margin-bottom:8px;text-wrap:balance}.lesson-next-objective{margin:0 0 18px;max-width:62ch;font:.92rem/1.7 var(--sans);color:var(--body)}
.chapter-ending-resources{align-items:center;gap:10px}.chapter-ending .chapter-ending-next{margin-top:18px;padding-top:14px}.chapter-ending-next a{font-size:.85rem}
@media(prefers-reduced-motion:reduce){.study-dialog[open]{animation:none!important}.study-button,.study-action,.study-dialog button,.study-resource-tabs a,.lesson-primary-action{transition:none!important}}
@media print{.study-tool-group{display:none!important}.elegant-section-heading{padding-top:0!important;margin-top:6mm!important}.elegant-section-heading::before,.elegant-section-heading::after{display:none!important}.elegant-chapter-opening{padding:0!important;border:0!important}.elegant-resource figure:not(.study-enlarged){box-shadow:none;border-color:#a9b4c2;background:white}.elegant-resource :is(.number-formula,.step-math,.sheet-formula){overflow:visible}.study-dialog[open]{animation:none!important}}

/* Footer contact is an accent action: never use the theme's heading color as its fill. */
html[data-theme] body footer .footer-contact a{
 background:var(--accent-action-fill,#eadbbb);border-color:var(--accent-action-fill,#eadbbb);
 color:var(--accent-action-ink,#14243c);-webkit-text-fill-color:var(--accent-action-ink,#14243c);
 font-weight:600;opacity:1;text-shadow:none
}
html[data-theme] body footer .footer-contact a:is(:hover,:focus-visible,:active){
 background:var(--accent-action-hover,#f5e9d2);border-color:var(--accent-action-hover,#f5e9d2);
 color:var(--accent-action-ink,#14243c);-webkit-text-fill-color:var(--accent-action-ink,#14243c)
}
html[data-theme] body footer .footer-contact a :is(span,strong,b,small,svg){color:inherit;-webkit-text-fill-color:inherit}
html[data-theme] body footer .footer-contact a:focus-visible{outline:3px solid var(--blue);outline-offset:4px}

/* Complete night-theme surfaces: nested content must not retain a light fill. */
@media screen{
 html[data-theme="dark"] body a{color:var(--blue)}
 html[data-theme="dark"] body :is(.walkthrough li,.subscription-account,.method-explanation,.suite-chapter-list>.annual-formulary-card>a:first-child,.power-nav a,.interval-links a,.foundation-links>a){
  background:var(--surface);color:var(--body);border-color:var(--line)
 }
 html[data-theme="dark"] body .walkthrough .step-math{color:var(--ink)}
 html[data-theme="dark"] body .walkthrough li>p{color:var(--body)}
 html[data-theme="dark"] body :is(.power-nav a,.interval-links a,.foundation-links>a){color:var(--blue);-webkit-text-fill-color:var(--blue)}
 html[data-theme="dark"] body :is(.power-nav a,.interval-links a,.foundation-links>a):is(:hover,:focus-visible,[aria-current]){background:var(--tint);color:var(--ink);-webkit-text-fill-color:var(--ink)}
}
@media screen{
 html[data-theme="dark"] body :is(.foundation-example,.sheet-grid article){background:var(--surface);color:var(--body);border-color:var(--line)}
 html[data-theme="dark"] body .teacher-intro .experience-years{color:var(--gold)}
 html[data-theme="dark"] svg :is([fill="#ebeef2"],[fill="#edeff3"]){fill:var(--surface-raised)}
 html[data-theme="dark"] svg [fill="#eedda9"]{fill:var(--champagne-soft)}
}
@media screen{
 html[data-theme="dark"] body .sheet-key{background:var(--year-wash,var(--tint));color:var(--ink);-webkit-text-fill-color:var(--ink);border-color:var(--line)}
}
@media screen{
 html[data-theme="dark"] body :is(.interval-explorer,.power-map>a,.source-card){background:var(--surface);color:var(--body);border-color:var(--line)}
 html[data-theme="dark"] body .foundation-controls :is(label,output){color:var(--body)}
 html[data-theme="dark"] body .home-method .method-number{color:var(--gold)}
 html[data-theme="dark"] body .source-updated{color:var(--muted)}
}
@media screen{
 html[data-theme="dark"] body .subscription-account small{color:var(--muted)}
}
@media screen{
 html[data-theme="dark"] mark.concept-keyword{background:linear-gradient(transparent 48%,var(--champagne-soft) 48%,var(--champagne-soft) 92%,transparent 92%);color:inherit}
}
@media screen{
 html[data-theme="dark"] body :is(.power-controls label,.power-controls output,.interval-slider,.interval-slider output){color:var(--body)}
 html[data-theme="dark"] body .power-map>a :is(b,span){color:var(--blue)}
 html[data-theme="dark"] body .source-card :is(h3,summary){color:var(--ink)}
 html[data-theme="dark"] body .source-card .source-pages{color:var(--muted)}
}
/* The subscription summary uses a themed surface in both appearances. */
@media screen{
 html[data-theme] .billing .order-summary h2{color:var(--ink)}
 html[data-theme] .billing .order-summary :is(p,.price-currency){color:var(--body)}
 html[data-theme] .billing .order-summary :is(.eyebrow,.price-period){color:var(--muted)}
 html[data-theme] .billing .order-summary .demo-link{color:var(--blue);-webkit-text-fill-color:var(--blue)}
}
@media screen{
 html[data-theme="light"] .annual-cover .eyebrow{color:var(--blue)}
}
@media screen{
 html[data-theme="light"]{--math-tangent:var(--brand-orange)}
 html[data-theme="light"] .calculation-equals{color:var(--blue)}
}
@media screen{
 html[data-theme="light"]{--muted:#59677a}
 html[data-theme] body.private-course-page .teacher-intro h2{color:var(--ink)}
 html[data-theme] body.private-course-page .teacher-intro :is(p,b){color:var(--body)}
 html[data-theme] body.private-course-page .teacher-intro .experience-years{color:var(--math-tangent)}
}
@media screen{
 html[data-theme="light"] body .sheet-key{background:#14243c;color:#f1f5fb;-webkit-text-fill-color:#f1f5fb}
 html[data-theme="light"] .sheet-heading>span{color:var(--gold-ink)}
}
@media screen{
 html[data-theme] .payment-brands span{color:inherit}
}

/* Sixty improvements: active recall, personal organisation and reading comfort. */
@media screen{
 body .learning-clinic{margin:2rem 0;padding:clamp(1.1rem,3vw,2rem);border:1px solid var(--line);border-inline-start:4px solid var(--gold);border-radius:16px;background:var(--surface);color:var(--body);box-shadow:0 8px 24px rgba(0,0,0,.035)}
 body .learning-clinic :is(h2,h3,strong){color:var(--ink)}
 body .learning-clinic p,body .learning-clinic li{color:var(--body);max-width:76ch;line-height:1.8}
 body .learning-clinic .learning-kicker{font:700 .7rem/1.5 var(--font-sans,Arial,sans-serif);letter-spacing:.12em;color:var(--muted);margin:0 0 .65rem}
 body .learning-steps{display:grid;gap:.65rem;padding-inline-start:1.8rem;margin:1.2rem 0}
 body .learning-steps li{padding-inline-start:.4rem}
 body .learning-steps li::marker{color:var(--blue);font-weight:700}
 body .learning-caution{padding:.9rem 1rem;background:var(--surface-raised,var(--surface));border:1px solid var(--line);border-radius:10px}
 body .learning-recall{padding:1rem;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--body)}
 body .learning-recall h3{font-size:1rem;margin:0 0 .5rem}
 body .learning-recall details{border-top:1px solid var(--line);padding-top:.75rem}
 body .learning-recall summary{cursor:pointer;color:var(--blue);font-weight:650;padding:.45rem 0}
 body .study-collection-filters,body .study-reading-settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr));gap:.8rem;margin:1rem 0}
 body .study-field{display:flex;flex-direction:column;gap:.4rem;font-size:.85rem;font-weight:600;color:var(--body)}
 body .study-dialog :is(input[type=search],input[type=file],input[readonly],select){max-width:100%;min-width:0;padding:.65rem .8rem;background:var(--surface);color:var(--ink);-webkit-text-fill-color:var(--ink);border:1px solid var(--line);border-radius:9px;font:inherit}
 body .study-dialog input[type=file]::file-selector-button{background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:.5rem;border-radius:6px;margin-right:.5rem}
 body .study-save-status{font-size:.85rem;color:var(--blue);min-height:1.5em}
 body .study-history-link{display:block;padding:.8rem 0;color:var(--blue);border-bottom:1px solid var(--line)}
 body .study-shortcuts dt{font-weight:700;color:var(--ink);margin-top:1rem}
 body .study-shortcuts dd{margin:.3rem 0;color:var(--body);line-height:1.6}
 body .study-exercise-assist,body .study-test-assist{padding:1rem;margin:1rem 0;background:var(--surface);color:var(--body);border:1px solid var(--line);border-radius:12px}
 body .study-exercise-assist>button,body .study-test-assist>button{margin:.25rem .4rem .25rem 0}
 body .study-exercise-assist p,body .study-test-assist p{color:var(--body)}
 body .study-exercise-status{font-weight:700;margin:0}
 body .study-group-counts{font-size:.8rem;line-height:1.7;color:var(--muted);margin-top:.7rem}
 body .number-question.study-current-exercise{outline:3px solid var(--blue);outline-offset:4px;scroll-margin-top:6rem}
 body .number-question[hidden]{display:none!important}
 body .study-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;border-radius:8px}
 body .study-table-cue{font-size:.8rem;color:var(--muted);margin:.4rem 0 1rem}
 body .study-table-cue[hidden]{display:none}
 body .study-print-heading{display:none}
 html[data-study-width="wide"] body main.elegant-resource{max-width:1200px!important;width:100%}
 html[data-study-width="wide"] body.has-reading-outline .billing-shell{max-width:1460px}
 html[data-study-spacing="airy"] body main.elegant-resource :is(p,li){line-height:2}
 html[data-study-contrast="strong"]{--line:#74849a}
 html[data-study-contrast="strong"][data-theme="dark"]{--line:#9aacbf}
 html[data-study-contrast="strong"] body main :is(p,li,label){font-weight:500}
 html[data-study-contrast="strong"] body main a:not([class*="button"]):not([class*="btn"]){text-decoration:underline;text-underline-offset:.2em;text-decoration-thickness:2px}
 html[data-study-contrast="strong"] body :is(.study-button,.study-year-filter,.learning-clinic,.study-exercise-assist){border-width:2px}
 body :is(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--blue);outline-offset:4px}
 html[data-study-motion="reduced"]{scroll-behavior:auto!important}
 html[data-study-motion="reduced"] *,html[data-study-motion="reduced"] *::before,html[data-study-motion="reduced"] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
 body .improvements-grid{display:grid;gap:1rem;grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr))}
 body .improvements-group{padding:1.25rem;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--body)}
 body .improvements-group h2{font-size:1.3rem;color:var(--ink)}
 body .improvements-group li{line-height:1.7;padding:.3rem 0;color:var(--body)}
}
@media (pointer:coarse){html[data-theme] body :is(button,select,summary,.study-button,.study-resource-tabs a,.study-exercise-grid a,.exam-nav a){min-height:44px!important}html[data-theme] body .study-exercise-grid a,html[data-theme] body .exam-nav a{min-width:44px!important}}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}body *,body *::before,body *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{
 .study-print-heading{display:block!important;border-bottom:1pt solid #555;padding-bottom:8pt;margin-bottom:14pt;color:#111;background:#fff;font-size:10pt}
 .study-print-heading span{display:block;font-size:8pt;overflow-wrap:anywhere}
 .study-exercise-assist,.study-test-assist,.study-table-cue{display:none!important}
 .study-table-scroll{overflow:visible!important}
 .learning-clinic{border:1pt solid #aaa;padding:12pt;margin:14pt 0;color:#111;background:#fff}
 .learning-clinic details>p{display:block!important}
 .learning-clinic details::details-content{content-visibility:visible!important;display:block!important}
 .learning-clinic .learning-caution,.learning-clinic .learning-recall{break-inside:avoid}
 .number-question[hidden]{display:block!important}
}
@media screen{html[data-theme="dark"] body #number-result{color:var(--ink)}}

/* Study companions and optional tools, 100-improvement edition. */
@media screen{
 body .study-practice-guide{margin:1rem 0 1.5rem;padding:1rem 1.25rem;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--body)}
 body .study-practice-guide>summary{font-weight:650;line-height:1.6;cursor:pointer;color:var(--ink)}
 body .study-practice-guide h2{font-size:1.15rem;color:var(--ink);margin:1.2rem 0 .5rem}
 body .study-practice-guide :is(p,li){color:var(--body);font-size:1rem;line-height:1.75}
 body .study-practice-guide .learning-caution{padding:.85rem 1rem;background:var(--surface-raised);border-left:3px solid var(--gold);border-radius:8px}
 body .study-search-hit{background:var(--champagne-soft);color:var(--ink);padding:0 .1em;border-radius:3px;font-weight:650}
 body .study-recent-queries{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center;margin:.8rem 0}
 body .study-recent-queries:empty{display:none}
 body .study-session-list{padding:0;list-style:none;display:grid;gap:.8rem;counter-reset:study-session}
 body .study-session-row{padding:1rem;background:var(--surface);color:var(--body);border:1px solid var(--line);border-radius:10px;counter-increment:study-session}
 body .study-session-row>a{display:block;color:var(--blue);font-weight:600;line-height:1.6}
 body .study-session-row>a::before{content:counter(study-session) '. ';color:var(--muted);font-variant-numeric:tabular-nums}
 body .study-session-check{display:flex;align-items:center;gap:.6rem;margin:.7rem 0;color:var(--body);font-size:.9rem;cursor:pointer}
 body .study-session-check input{width:20px;height:20px;min-height:20px!important;accent-color:var(--blue)}
 body .study-session-actions{display:flex;flex-wrap:wrap;gap:.4rem}
 body .study-work-clock{font:600 clamp(2.5rem,8vw,4rem)/1.2 var(--sans);font-variant-numeric:tabular-nums;letter-spacing:.04em;color:var(--ink);margin:1.3rem 0}
 body .study-timer-badge{font-variant-numeric:tabular-nums;white-space:nowrap}
 body .study-formulary-preview{margin-top:1rem;display:grid;gap:1rem}
 body .study-formulary-preview .sheet-section{margin:0;padding:1rem;background:var(--surface);color:var(--body);border:1px solid var(--line);border-radius:10px}
 body .study-formulary-preview :is(p,li){color:var(--body)}
 body .study-formulary-preview :is(h2,h3,.sheet-formula){color:var(--ink)}
 body .study-formulary-preview .sheet-formula{background:var(--surface-raised);font-size:1.1rem;line-height:1.8;overflow-wrap:anywhere}
 body .study-formula-index{border:1px solid var(--line);background:var(--surface);color:var(--body);border-radius:10px;padding:.9rem 1.1rem;margin:1rem 0}
 body .study-formula-index summary{cursor:pointer;color:var(--ink);font-weight:600}
 body .study-formula-index nav{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.8rem}
 body .study-notion-index h3{color:var(--ink);border-bottom:1px solid var(--line);padding-bottom:.4rem;margin:1.2rem 0 .3rem}
 body .study-notion-index a{display:block;padding:.7rem .2rem;line-height:1.5;color:var(--blue);border-bottom:1px solid var(--line)}
 body .study-sublesson-nav{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.7rem 1.2rem;margin:1rem 0;padding:1rem 0;border-bottom:1px solid var(--line);font-size:.9rem}
 body .study-sublesson-nav>span{flex-basis:100%;color:var(--muted)}
 body .study-sublesson-nav a{color:var(--blue);max-width:100%;overflow-wrap:anywhere}
 html[data-study-tools="compact"] .study-tools-personal,html[data-study-tools="compact"] .study-tools-reading>:not(.study-focus-toggle){display:none!important}
 html[data-study-font="serif"] body main.elegant-resource :is(p,li){font-family:Georgia,'Times New Roman',serif}
 html[data-study-paragraphs="airy"] body main.elegant-resource p{margin-top:1.3em!important;margin-bottom:1.3em!important}
 html[data-study-paragraphs="airy"] body main.elegant-resource .study-help-note{margin-top:.7em!important;margin-bottom:.7em!important}
 body .improvements-backlink{display:inline-block;margin:.75rem 0 1.5rem;color:var(--blue)}
}
@media(max-width:520px){body .study-session-actions button{flex:1 1 auto}body .study-sublesson-nav{flex-direction:column}body .study-practice-guide{padding:.9rem 1rem}body .study-formulary-preview .sheet-formula{font-size:1rem}body .appearance-options{flex-wrap:wrap}}
@media print{.study-practice-guide,.study-formula-index,.study-sublesson-nav,.study-timer-badge{display:none!important}}
@media screen{
 body .study-formulary-preview .sheet-heading{display:flex;align-items:baseline;gap:.7rem;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:.65rem;margin-bottom:.8rem}
 body .study-formulary-preview .sheet-heading h2{margin:0;font:500 1.25rem/1.4 var(--serif)}
 body .study-formulary-preview .formula-lines{display:grid;gap:.6rem;padding:1rem;border:1px solid var(--line);border-radius:8px}
 body .study-formulary-preview .sheet-note{padding-left:.8rem;border-left:2px solid var(--gold);font-size:.9rem;line-height:1.7}
 body .study-formulary-preview .sheet-definitions dd{margin:.25rem 0 .75rem;color:var(--body)}
 body .study-formulary-preview .sheet-grid{display:grid;gap:.8rem}
 body .study-formulary-preview .sheet-grid article{padding:.85rem;background:var(--surface-raised);color:var(--body);border-radius:8px}
 body .study-formulary-preview .sheet-table{overflow-x:auto;max-width:100%}
 body .study-formulary-preview table{width:100%;border-collapse:collapse}
 body .study-formulary-preview :is(th,td){padding:.6rem;text-align:left;border-bottom:1px solid var(--line);color:var(--body)}
 body .study-formula-index .study-field{margin:1rem 0 .5rem}
 body .study-formula-index input{padding:.65rem .8rem;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;width:100%;box-sizing:border-box}
 body .study-formula-index a[hidden]{display:none!important}
}

/* Companion applications, error diagnosis and selected print previews. */
@media screen {
 html[data-theme] body .study-transfer{margin:1.2rem 0 1.6rem;border:1px solid var(--line-strong);border-left:3px solid var(--gold);border-radius:12px;background:var(--surface);color:var(--body);overflow:hidden}
 html[data-theme] body .study-transfer>summary{padding:1rem 1.2rem;min-height:48px;cursor:pointer;color:var(--ink);font:600 1.03rem/1.6 var(--sans)}
 body .study-transfer-label{display:block;font:.74rem/1.6 var(--sans);letter-spacing:.05em;text-transform:uppercase;color:var(--muted);margin-bottom:.3rem}
 html[data-theme] body .study-transfer-body{padding:.2rem 1.2rem 1.2rem;color:var(--body);background:var(--surface)}
 html[data-theme] body .study-transfer :is(p,li){color:var(--body);line-height:1.8}
 html[data-theme] body .study-transfer .study-help-note{font-size:.86rem;color:var(--muted)}
 html[data-theme] body .study-transfer .study-transfer-prompt{background:var(--surface-raised);color:var(--ink);padding:.8rem 1rem;border-radius:8px;border:1px solid var(--line);font-size:1.04rem}
 html[data-theme] body .study-transfer-answer{border-top:1px solid var(--line);padding:.8rem 0 0}
 html[data-theme] body .study-transfer-answer>summary{cursor:pointer;color:var(--blue);font-weight:600;min-height:44px;display:list-item;padding:.45rem .2rem}
 html[data-theme] body .study-transfer .study-transfer-result{font-weight:650;color:var(--ink)}
 html[data-theme] body .study-correction-index{padding:1rem 1.2rem;background:var(--surface);color:var(--body);border:1px solid var(--line);border-radius:12px;margin:1rem 0}
 body .study-correction-index>summary{cursor:pointer;color:var(--ink);font-weight:600;min-height:44px;padding:.4rem 0}
 body .study-correction-jump{display:flex;flex-wrap:wrap;align-items:end;gap:.8rem;margin:1rem 0}
 body .study-correction-jump input{max-width:10rem}
 body .study-correction-groups{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0 1.5rem}
 body .study-correction-results{display:grid;max-height:24rem;overflow:auto;border-top:1px solid var(--line);overscroll-behavior:contain}
 html[data-theme] body .study-correction-results>a{display:block;padding:.8rem .3rem;border-bottom:1px solid var(--line);color:var(--blue);line-height:1.6}
 body .study-inline-tools{display:flex;gap:.5rem;margin-top:.8rem}
 html[data-theme] body .study-print-preview{margin-top:1.2rem;padding:1.1rem;background:var(--surface);color:var(--body);border:1px solid var(--line);border-radius:10px;overflow-wrap:anywhere}
 html[data-theme] body .study-print-preview :is(p,li,small){color:var(--body)}
 html[data-theme] body .study-print-preview :is(h2,h3,.number-formula){color:var(--ink)}
 html[data-theme] body .study-print-preview :is(.number-question,.sheet-section){background:var(--surface);color:var(--body);border-color:var(--line);max-width:100%;margin:1rem 0}
 body .study-print-document-head{border-bottom:2px solid var(--line);margin-bottom:1.2rem;padding-bottom:.8rem}
 body .study-print-document-head p{font-size:.85rem;line-height:1.6}
 body .study-print-checks{margin:1rem 0;padding:.5rem 0}
 body .study-plan-links small{display:block;font-size:.75rem;overflow-wrap:anywhere}
 body .study-worksheet-exercise{padding:1rem 0;border-bottom:1px solid var(--line)}
 body .study-writing-lines>div{height:1.8rem;border-bottom:1px solid var(--line-strong)}
 body .study-symbol-list>div{border-bottom:1px solid var(--line);padding:.8rem 0}
 html[data-theme] body .study-symbol-list dt{font-weight:650;color:var(--ink);line-height:1.65}
 html[data-theme] body .study-symbol-list dd{margin:.4rem 0 0;color:var(--body);line-height:1.7}
 html[data-study-guide="line"] body main .study-reading-marker{background:var(--tint)!important;color:var(--ink)!important;box-shadow:-4px 0 0 var(--blue);border-radius:3px;padding-left:.6rem;padding-right:.4rem}
 html[data-study-guide="line"] body main .study-readable-line{cursor:text}
 html[data-study-background="plain"] body,html[data-study-background="plain"] body main{background-image:none!important}
 html[data-study-background="plain"] body::before,html[data-study-background="plain"] body::after,html[data-study-background="plain"] body main::before,html[data-study-background="plain"] body main::after{background-image:none!important}
 html[data-study-background="plain"] body main :is(.hero,.manual-chapter-heading,.learning-preview,.sheet-section,.number-note,.number-formula,.study-transfer,.chapter-opening){background-image:none!important}
 body :is(.study-result-count,.study-step-status,.study-exercise-status,.study-group-counts){font-variant-numeric:tabular-nums;line-height:1.65;min-height:1.65em}
 body .study-work-clock{min-width:5ch;text-align:center;inline-size:fit-content}
 body .study-timer-badge{min-inline-size:12ch;text-align:center}
 body .study-improvement-search{max-width:38rem;margin:1.5rem 0 .5rem}
 body .study-formula-sections{display:grid;grid-template-columns:minmax(0,1fr);gap:1.2rem}
 body .study-formula-sections>.sheet-section{min-width:0;margin:0}
 body .study-math-overflow{outline-offset:4px;scrollbar-width:thin;overscroll-behavior-x:contain}
 body .study-math-overflow:focus-visible{outline:3px solid var(--blue)}
 body .study-transfer summary:focus-visible,body .study-correction-index summary:focus-visible{outline:3px solid var(--blue);outline-offset:-3px;border-radius:6px}
 body .study-formula-comparison>.sheet-section{margin:0;min-width:0;padding:1rem;background:var(--surface);color:var(--body);border:1px solid var(--line);border-radius:10px}
}
.study-print-document{display:none}
@media screen and (min-width:1200px){html[data-study-columns="two"] body .study-formula-sections{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}html[data-study-columns="two"] body .study-formula-sections .sheet-grid{grid-template-columns:minmax(0,1fr)}}
@media screen and (max-width:600px){body .study-correction-jump{align-items:stretch;flex-direction:column}body .study-correction-jump input{max-width:none}body .study-print-preview{padding:.75rem}body .study-transfer>summary{padding:.9rem 1rem}body .study-transfer-body{padding:0 1rem 1rem}}
@media print{
 .study-correction-index,.study-inline-tools,.study-transfer-label,.study-improvement-search{display:none!important}
 .study-transfer{border:1px solid #b4bac0;padding:4mm;margin:5mm 0;break-inside:auto;background:white!important;color:#182b40!important}
 .study-transfer summary{font-weight:bold}.study-transfer-answer>summary{display:none}
 .study-transfer :is(p,span){color:#182b40!important;background:transparent!important}
 .study-reading-marker{box-shadow:none!important;background:transparent!important}
 .study-formula-sections{display:block!important}
 html.study-selective-print body>*:not(#study-print-document){display:none!important}
 html.study-selective-print body{display:block!important;background:#fff!important;margin:0!important;padding:0!important}
 html.study-selective-print body::before,html.study-selective-print body::after{display:none!important}
 html.study-selective-print #study-print-document{display:block!important;position:static!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important}
 html.study-selective-print #study-print-document *{color:#182b40!important;-webkit-text-fill-color:#182b40!important;background:transparent!important;box-shadow:none!important;text-shadow:none!important;overflow:visible!important}
 html.study-selective-print #study-print-document .study-print-preview{border:0!important;margin:0!important;padding:0!important;font:11pt/1.6 Arial,sans-serif}
 html.study-selective-print #study-print-document :is(header,section,article){display:block!important;max-width:none!important}
 html.study-selective-print #study-print-document :is(h2,h3){break-after:avoid}
 html.study-selective-print #study-print-document .study-print-document-head{border-bottom:1pt solid #687684;padding-bottom:4mm;margin-bottom:6mm}
 html.study-selective-print #study-print-document .study-print-document-head p{font-size:9pt;overflow-wrap:anywhere}
 html.study-selective-print #study-print-document :is(.sheet-section,.number-question){border:0!important;padding:0!important;margin:5mm 0!important;break-inside:auto}
 html.study-selective-print #study-print-document .study-plan-links small{display:block;font-size:8pt;overflow-wrap:anywhere}
 html.study-selective-print #study-print-document .study-writing-lines>div{height:9mm;border-bottom:.5pt solid #9aa5af;break-inside:avoid}
 html.study-selective-print #study-print-document .study-worksheet-exercise{break-before:page}
 html.study-selective-print #study-print-document .study-worksheet-exercise:first-of-type{break-before:auto}
 html.study-selective-print #study-print-document a{text-decoration:none!important}
 html.study-selective-print #study-print-document a::after{content:none!important}
}
@media screen{
 html[data-theme] body :is(.study-correction-index,.study-dialog,.study-improvement-search) input:not([type=checkbox]):not([type=radio]){background:var(--surface);color:var(--ink);-webkit-text-fill-color:var(--ink);border:1px solid var(--line-strong);border-radius:8px;padding:.65rem .8rem;min-height:44px;font:inherit;max-width:100%;min-width:0}
 html[data-theme] body .study-correction-index h3{color:var(--ink);font-size:1rem}
}

.academy-navigation{display:grid;gap:4px;padding:10px 0;border-top:1px solid var(--line)}.academy-navigation a{color:var(--ink);font-weight:650;padding:8px;border-radius:8px;text-decoration:none}.academy-navigation a:hover{background:var(--tint);color:var(--ink)}

/* Branding must retain its own geometry in compact headers. */
.brand .brand-picture{min-width:0;max-width:100%}
.brand-picture.brand-unavailable .brand-image{display:none}
.brand .brand-fallback{display:block;margin:0;padding:10px 0;font:600 1.1rem/1.3 var(--serif);letter-spacing:-.025em;white-space:normal;color:var(--ink);-webkit-text-fill-color:var(--ink)}
@media(max-width:720px){
 aside.site-sidebar.compact-navigation>.brand{min-width:0;max-width:100%;margin:0;align-self:center}
 .compact-navigation .brand-picture{max-width:none;line-height:normal}
 .compact-navigation .brand-image{aspect-ratio:363 / 145;object-fit:contain}
 .compact-navigation .mobile-nav-actions{min-width:0;align-items:center;justify-content:flex-end}
 .compact-navigation .mobile-menu-toggle,.compact-navigation .theme-toggle{min-width:44px;min-height:44px;flex-shrink:0}
}
@media(max-width:480px){
 aside.site-sidebar.compact-navigation{grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:12px 16px}
 aside.site-sidebar.compact-navigation>.brand{width:170px}
 .compact-navigation .mobile-nav-actions{gap:8px}
 .compact-navigation .mobile-account{display:none!important}
 .compact-navigation .mobile-menu-toggle{padding-inline:12px}
}
@media(max-width:520px){
 body .welcome-appearance{width:100%;max-width:100%}
 body .welcome-appearance .appearance-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;max-width:100%;box-sizing:border-box}
 body .welcome-appearance .appearance-choice{min-width:0;width:100%;padding:10px 6px;gap:5px}
 body .welcome-appearance .appearance-choice>.ui-icon{width:18px;height:18px;flex-shrink:0}
}
@media(max-width:380px){body .welcome-appearance .appearance-choice>.ui-icon{display:none}}

/* Shared navigation: the pupil stays in their own year. */
html body .skip-link,
html body .simple-year,
html body .picker-controls:has(#year-select){display:none!important}

/* Chapter catalogue: two direct choices, with supporting links below. */
#catalogue article.card{cursor:default;text-decoration:none}
#catalogue article.card:hover{transform:none}
#catalogue .card h3{margin-bottom:20px;text-decoration:none}
:is(#catalogue, .pdf-course) .chapter-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:auto;padding-top:4px}
:is(#catalogue, .pdf-course) .chapter-card-actions a{display:flex;align-items:center;justify-content:center;min-height:46px;padding:10px 8px;border:1px solid var(--simple-line,#b7c4d2);border-radius:9px;font-size:14px;font-weight:700;line-height:1.4;text-decoration:none!important;transition:background .15s,color .15s;box-sizing:border-box}
:is(#catalogue, .pdf-course) .chapter-card-actions .chapter-theory-button{background:var(--accent-action-fill);border-color:var(--accent-action-fill);color:var(--accent-action-ink)!important;-webkit-text-fill-color:var(--accent-action-ink)}
:is(#catalogue, .pdf-course) .chapter-card-actions .chapter-exercises-button{background:transparent;color:var(--simple-ink,#172d49)!important}
:is(#catalogue, .pdf-course) .chapter-card-actions a:hover{filter:brightness(.92)}
:is(#catalogue, .pdf-course) .chapter-card-actions a:focus-visible{outline:3px solid var(--brand-orange);outline-offset:3px}
:is(#catalogue, .pdf-course) .chapter-card-actions .chapter-theory-button:hover{background:var(--accent-action-hover);border-color:var(--accent-action-hover)}
:root[data-theme=dark] :is(#catalogue, .pdf-course) .chapter-card-actions .chapter-exercises-button{border-color:#65788e;color:#e8edf4!important}

/* Semester sheets: MathML ink overflow must not create vertical scrollbars.
   Keep horizontal scrolling for long equations and room for tall fractions. */
@media screen {
  body .revision-pack p,
  body .revision-pack math[display="block"] {
    overflow-x: auto;
    overflow-y: hidden;
    padding-block: .3em;
    scrollbar-width: thin;
  }
  body .revision-pack :is(p,math[display="block"],.pack-table)::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }
}
