/* Shared typography roles. Layout and colour remain in the existing system.
   Fraunces is a real 500 instance with SOFT=0 / WONK=0 baked into the asset;
   only its optical-size axis remains variable. See fonts/font-manifest.json. */
@font-face {
 font-family:"Fraunces";src:url("/fonts/fraunces-500-optical-latin.woff2") format("woff2");
 font-style:normal;font-weight:500;font-display:swap;
}
@font-face {
 font-family:"Manrope";src:url("/fonts/manrope-400-700-latin.woff2") format("woff2");
 font-style:normal;font-weight:400 700;font-display:swap;
}
/* X-height and vertical metrics measured from the delivered assets and these
   local fallback faces. System fallbacks remain available when neither exists. */
@font-face {
 font-family:"Manrope Fallback";src:local("Arial");font-weight:400 500;
 size-adjust:104.14%;ascent-override:102.36%;descent-override:28.81%;line-gap-override:0%;
}
@font-face {
 font-family:"Manrope Fallback";src:local("Arial Bold");font-weight:600 700;
 size-adjust:104.14%;ascent-override:102.36%;descent-override:28.81%;line-gap-override:0%;
}
@font-face {
 font-family:"Fraunces Fallback";src:local("Georgia");font-weight:500;
 size-adjust:100.12%;ascent-override:97.68%;descent-override:25.47%;line-gap-override:0%;
}
:root {
 --font-body:"Manrope","Manrope Fallback",Arial,Helvetica,system-ui,sans-serif;
 --font-editorial:"Fraunces","Fraunces Fallback",Georgia,"Times New Roman",serif;
 --text-page:clamp(2rem,1.65rem + 1.5vw,3rem);
 --text-editorial:clamp(1.625rem,1.45rem + .65vw,2rem);
 --text-heading:clamp(1.125rem,1.06rem + .3vw,1.375rem);
 --text-body:1rem;
 --text-reading:clamp(1.0625rem,1.03rem + .13vw,1.125rem);
 --text-control:clamp(.9375rem,.91rem + .12vw,1rem);
 --text-meta:.875rem;
 --text-eyebrow:.75rem;
 --weight-body:400;--weight-label:500;--weight-heading:600;--weight-emphasis:700;
 --weight-editorial:500;
 --leading-page:1.12;--leading-editorial:1.2;--leading-heading:1.35;
 --leading-body:1.6;--leading-reading:1.65;--leading-control:1.4;--leading-meta:1.5;
 --tracking-page:-.02em;--tracking-editorial:-.01em;--tracking-body:0;
 --tracking-eyebrow:.06em;
 --measure-reading:66ch;
 font-family:var(--font-body);font-size:100%;font-weight:var(--weight-body);
 line-height:var(--leading-body);letter-spacing:var(--tracking-body);
 font-synthesis:none;font-optical-sizing:auto;
}
body {font-size:var(--text-body)}
.large-text {font-size:118.75%}
button,input,select,textarea {font-family:var(--font-body)}
strong,b {font-weight:var(--weight-emphasis)}
/* Functional headings are the default, including tables, dialogs and cards.
   Expressive titles are assigned to the explicit editorial roles below. */
h1,h2,h3,h4,legend {
 font-family:var(--font-body);font-weight:var(--weight-heading);
 font-size:var(--text-heading);line-height:var(--leading-heading);letter-spacing:0;
}
.page-heading h1,.setup-intro h1,.welcome-auth .auth-panel h1,
.module-overview h1,.lesson-content h1,.editorial-hero .hero-copy h2,
.welcome-auth .auth-story h2 {
 font-family:var(--font-editorial);font-weight:var(--weight-editorial);
 font-size:var(--text-page);line-height:var(--leading-page);
 letter-spacing:var(--tracking-page);font-optical-sizing:auto;
 text-wrap:balance;overflow-wrap:anywhere;
}
.discovery-section>.section-heading h2,.home-bottom h2,
.module-detail-grid>section>h2,.setup-card #setup-title-0 {
 font-family:var(--font-editorial);font-weight:var(--weight-editorial);
 font-size:var(--text-editorial);line-height:var(--leading-editorial);
 letter-spacing:var(--tracking-editorial);text-wrap:balance;
}
.hero-photo figcaption {
 font-family:var(--font-editorial);font-weight:var(--weight-editorial);
 font-size:1.125rem;line-height:var(--leading-editorial);letter-spacing:var(--tracking-editorial);
 max-width:calc(100% - 2.25rem);
}
.module-name,.discovery-copy h3,.lesson-card-heading h3,.portfolio-title,
.account-identity h2,.module-outline h2,.review-receipt h2,.search-result h2,
.reading-preview h3,.setup-card h2,.setup-aside-card h2,.help-aside h2 {
 font-family:var(--font-body);font-size:var(--text-heading);font-weight:var(--weight-heading);
 line-height:var(--leading-heading);letter-spacing:0;
}
.hero-copy h2 {max-width:20ch}
.page-heading h1 {max-width:24ch}
.module-overview h1 {max-width:22ch}
.lesson-content h1 {max-width:26ch}
.lead,.hero-copy>p:not(.eyebrow):not(.small),.card p,.help-question p,.help-aside p,
.account-sections p,.setup-card>section>p,.setup-aside-card p,.home-bottom p,
.learning-rhythm p,.data-use p,.setup-summary dd,.resource-body,.note,
.discovery-copy>p:not(.eyebrow):not(.small),.search-result p,.outcome-list p,.module-record p,.orientation-steps p,.setup-help p,
.portfolio-item dd,.review-card dl,.lesson-content .history dd {
 font-size:var(--text-body);font-weight:var(--weight-body);line-height:var(--leading-body);
}
.reading,.example-explanation,.interactive-example>p,
.lesson-stage>p,.lesson-stage>ul,.lesson-stage>ol,.full-reading .reading,
.reading-preview p:not(.eyebrow):not(.small) {
 font-size:var(--text-reading);font-weight:var(--weight-body);
 line-height:var(--leading-reading);max-width:var(--measure-reading);
}
.reading p,.reading li {line-height:var(--leading-reading)}
.reading h2,.reading h3,.interactive-example h2,.example-scene h3,
.activity h2,.activity legend,.goal-card h3,.feedback-callout h2 {
 font-family:var(--font-body);font-size:var(--text-heading);
 font-weight:var(--weight-heading);line-height:var(--leading-heading);letter-spacing:0;
}
.learning-goal blockquote {font-family:var(--font-body);font-size:var(--text-reading);line-height:var(--leading-reading)}
.reading-preview.preview-large-text p:not(.eyebrow):not(.small) {font-size:1.1875rem}
.reading-preview.preview-large-text h3 {font-size:1.5rem}
/* Controls keep a readable size and expand with text; input sizes never dip
   below 1rem, including the mobile search and filter controls. */
button,a.button,.text-link,.sidebar .main-navigation a,.lesson-action,
.staff-links a,.summary-actions button,.staff-shortcuts a,.topic-links a {
 font-size:var(--text-control);font-weight:var(--weight-heading);
 line-height:var(--leading-control);letter-spacing:0;white-space:normal;
}
.sidebar .main-navigation a {font-weight:var(--weight-label);min-height:2.75rem}
.sidebar .main-navigation a[aria-current=page] {font-weight:var(--weight-heading)}
input,textarea,select,.topbar-search input,.filter-bar input,.filter-bar select,
.search-form input {
 font-size:var(--text-body);font-weight:var(--weight-body);line-height:var(--leading-body);
}
input::placeholder,textarea::placeholder {color:var(--muted);opacity:1}
.field label,.filter-bar label,.check-label,.preference-option strong,
.reference>summary,.help-question summary,.orientation-card>summary,.full-reading>summary,
.lesson-details>summary,.goal-inspiration summary,.setup-cancel,.auth-help summary {
 font-size:var(--text-body);font-weight:var(--weight-label);line-height:var(--leading-meta);
}
.small,small,.hint,.source,.breadcrumb,.card-meta,.module-meta,.module-summary-description,
.lesson-effort,.lesson-details,.lock-reason,.save-status,.path-help,.privacy-reminder,
.field-error,.planning-feedback,.action-feedback,.quantity-label,.goal-card .small,
.progress-count>span,.table-progress .progress-count>span,.footer-note,
.search-count,.module-pagination,
.account-identity>p,.account-facts,.help-tip,.setup-save-state,.setup-summary dt,
.character-count,.programme-facts dd,
.setup-nav-hint,.auth-scope,.auth-footnote,.welcome-auth .auth-help ol,
.module-outline li,.lesson-aside a,.setup-progress button,.lesson-path small,
.identity strong,.identity span,.identity .quiet,.topbar .env,.topbar-account,
.topbar>.signout,.table-empty {
 font-size:var(--text-meta);font-weight:var(--weight-label);line-height:var(--leading-meta);
 letter-spacing:0;
}
.field-error,.action-feedback,.note {overflow-wrap:anywhere}
.lesson-path strong {font-size:var(--text-control);font-weight:var(--weight-heading);line-height:var(--leading-control)}
:is(.shell,.welcome-auth) .eyebrow,.welcome-auth .auth-status,.setup-progress .step-number,th {
 font-size:var(--text-eyebrow);font-weight:var(--weight-heading);
 line-height:var(--leading-meta);letter-spacing:var(--tracking-eyebrow);
}
:is(.shell,.welcome-auth) .small {font-size:var(--text-meta);font-weight:var(--weight-label);line-height:var(--leading-meta)}
.tag {font-size:var(--text-meta);font-weight:var(--weight-heading);line-height:var(--leading-meta);white-space:normal}
.stat,.progress-count>strong,.programme-facts dt,.conversion-stat strong {
 font-family:var(--font-body);font-size:2rem;font-weight:var(--weight-heading);
 line-height:var(--leading-heading);font-variant-numeric:tabular-nums;
}
.is-compact .progress-count>strong,.table-progress .progress-count>strong {font-size:1.5rem}
.goal-equation strong,.goal-equation span,.goal-card p,.conversion-stat span {font-size:var(--text-body);line-height:var(--leading-body)}
table {font-size:var(--text-meta);line-height:var(--leading-meta)}
td {overflow-wrap:anywhere}
.art-index {font-family:var(--font-body);font-size:2.8125rem;font-weight:var(--weight-label)}
.nav-icon {font-size:1rem;line-height:1;width:1.125rem;flex-shrink:0}
.disclosure-mark {font-size:1.35rem;line-height:1}
.path-number,.module-num {font-size:var(--text-meta);line-height:1;flex-shrink:0}
.doorway-mark {font-family:var(--font-editorial);font-size:2.5rem;font-weight:var(--weight-editorial)}
.academy-dialog .dialog-close {font-size:1.5rem;line-height:1}
.academy-dialog h2 {font-size:var(--text-heading);line-height:var(--leading-heading)}
/* Necessary reflow for the larger, real font metrics, long names and spacing
   preferences. No essential content is clamped or hidden. */
.page-heading,.section-heading,.lesson-card-heading {flex-wrap:wrap}
.page-heading>div,.module-title-group,.discovery-copy,.hero-copy,.account-sections {min-width:0}
.identity,.lesson-card-heading h3,.module-name,.search-result h2,.discovery-copy h3 {overflow-wrap:anywhere}
.lesson-card .tag {flex-shrink:1}
.lesson-path button {align-items:flex-start;min-width:0;overflow-wrap:anywhere}
.lesson-path button>span:last-child {min-width:0}
.lesson-path {scroll-margin-top:1rem}
.lesson-stage {scroll-margin-top:11rem}
.lesson-toolbar {flex-wrap:wrap}
.hero-photo {min-width:0}
.hero-photo img {position:absolute;inset:0}
.help-question summary,.footer-links a,.section-heading>a,.module-overview-link a,
.module-pagination a,.account-sections a,.home-bottom a:not(.button) {
 min-height:2.75rem;align-content:center;
}
.footer-links a,.module-pagination a {display:inline-flex;align-items:center}
.setup-progress button {height:auto;overflow-wrap:normal}
.setup-progress ol {grid-template-columns:repeat(4,minmax(0,1fr))}
.topbar .env {white-space:normal;max-width:15rem}
.topbar-search {min-width:0}
.topbar .dot {flex-shrink:0}
.hero-copy .actions {gap:1rem}
.hero-copy .actions .button {max-width:100%}
.hero-photo figcaption {overflow-wrap:anywhere}
.table-wrap {max-width:100%}
@media(max-width:1150px) {
 .topbar {flex-wrap:wrap;gap:1rem}
 .topbar .env {flex-basis:100%;max-width:none}
 .topbar-search {max-width:none}
 .hero.editorial-hero {grid-template-columns:1fr}
 .hero-photo {height:16rem;min-height:16rem}
}
@media(max-width:850px) and (min-width:721px) {
 .discovery-grid {grid-template-columns:1fr}
 .discovery-card,.discovery-card:last-child {display:grid;grid-template-columns:6rem minmax(0,1fr);gap:1.25rem}
 .discovery-copy {padding:0}
 .discovery-card .module-art {aspect-ratio:1}
}
@media(max-width:720px) {
 .sidebar .main-navigation a {font-size:var(--text-control)}
 .topbar>.signout {font-size:var(--text-control)}
 .topbar-search {max-width:calc(100% - 5rem)}
 .hero-photo {height:13.125rem;min-height:13.125rem}
 .setup-progress ol {grid-template-columns:repeat(2,minmax(0,1fr))}
 .setup-progress button {min-height:4.75rem}
 .programme-facts {gap:1rem;grid-template-columns:repeat(3,minmax(0,1fr))}
 .lesson-path {position:static}
 .lesson-stage {scroll-margin-top:1rem}
 .discovery-card {grid-template-columns:4.5rem minmax(0,1fr);gap:1rem}
 .discovery-card .module-art {aspect-ratio:1}
 .module>summary {gap:.75rem}
 .module-summary-art {width:2.75rem;flex-shrink:0}
 .module-meta {overflow-wrap:anywhere}
 .module-pagination {flex-wrap:wrap}
 .search-result .tag {max-width:100%}
 .account-facts dd {overflow-wrap:anywhere}
 .hero-photo figcaption {max-width:calc(100% - 1.5rem)}
}
