/* Article-specific figures. Masthead, type, reading width and theme come from Aligned. */
.aligned-body--math{--font-ui:var(--flagship-ui);--font-serif:var(--flagship-ui);--paper:var(--flagship-page);--ink:var(--flagship-ink);--muted:var(--flagship-muted);--accent:#b25d35}
html{scroll-padding-top:100px}
.aligned-math [id]{scroll-margin-top:100px}
.math-skip{position:fixed;top:-100px;left:20px;padding:12px;background:var(--flagship-page);z-index:1000}.math-skip:focus{top:10px}
.aligned-body--math :is(button,input,summary,a):focus-visible{outline:2px solid var(--flagship-link);outline-offset:5px}
.aligned-body--math .math-reading{display:block;max-width:46rem;margin-inline:auto;padding:0}
.aligned-body--math .math-reading .aligned-feature-paragraph{max-width:none}
.aligned-feature-byline a{text-decoration:none}.aligned-feature-byline a:hover{text-decoration:underline}
.article-cover{max-width:64rem;margin:2.75rem auto 3.5rem}
.article-cover img{display:block;width:100%;height:auto;max-height:560px;object-fit:cover;object-position:center 48%}
.article-cover figcaption{margin-top:.8rem;color:var(--flagship-muted);font:400 .75rem/1.5 var(--flagship-ui)}
.reading-heading{font:650 1.5rem/1.2 var(--flagship-ui);letter-spacing:-.025em;margin:3rem 0 1.5rem}
.visual-method{font:400 .8rem/1.65 var(--flagship-ui);max-width:80ch;margin-top:22px;color:var(--flagship-muted)}
.visual-method summary{cursor:pointer;width:fit-content;padding:8px 0}.visual-method p{margin:9px 0 0}
.math-figure{max-width:52rem;margin:3.5rem auto 4rem;padding-block:1.5rem;border-block:1px solid var(--flagship-rule);color:var(--flagship-ink);font-family:var(--flagship-ui)}
.math-figure h2{font:650 clamp(1.3rem,2.5vw,1.8rem)/1.15 var(--flagship-ui);letter-spacing:-.03em;margin:0 0 1.5rem}
.math-figure figcaption{color:var(--flagship-muted);font:400 .8125rem/1.6 var(--flagship-ui);max-width:80ch;margin-top:1.5rem}
.math-figure a,.math-author a{color:var(--flagship-link);text-underline-offset:3px}
.math-unit-panels{display:grid;grid-template-columns:1fr 1fr;gap:2rem}.math-unit-panels>div+div{border-left:1px solid var(--flagship-rule);padding-left:2rem}
.math-unit-panels h3{font-size:.85rem;font-weight:600;margin:0;text-align:center}
.math-unit svg{display:block;width:100%;max-width:360px;margin:auto;overflow:visible}.math-unit svg text{fill:var(--flagship-muted);font:14px var(--flagship-ui)}
.math-line-accent{stroke:#b65e36;stroke-width:2;fill:none}.math-line-guide{stroke:#b65e36;stroke-width:1.8;fill:none;opacity:.85}.math-point{fill:var(--flagship-ink);stroke:var(--flagship-page);stroke-width:3}
.math-fermat-statement{text-align:center;padding:1.5rem 0 2rem}.math-fermat-equation{font:400 clamp(2rem,4vw,3rem)/1.3 Georgia,serif;letter-spacing:.025em;margin:0}.math-fermat-equation sup{font-size:.6em}.math-fermat-statement>p:last-child{font-size:.85rem;color:var(--flagship-muted);margin:.75rem 0 0}
.math-proof-path{display:grid;grid-template-columns:repeat(3,1fr);list-style:none;padding:1.5rem 0;margin:0;border-block:1px solid var(--flagship-rule);gap:2rem;counter-reset:step}.math-proof-path li{position:relative;counter-increment:step;padding-top:1.8rem}.math-proof-path li::before{content:'0' counter(step);position:absolute;top:0;color:#b65e36;font-size:.7rem;letter-spacing:.05em}.math-proof-path li+li:after{content:'→';position:absolute;left:-1.55rem;top:2rem;color:var(--flagship-muted)}
.math-proof-path strong{font-size:.875rem;font-weight:600;display:block;margin-bottom:.5rem;line-height:1.35}.math-proof-path span{font-size:.8rem;color:var(--flagship-muted);line-height:1.5;display:block}
.math-lean-line{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding-top:1.4rem;font-size:.75rem;color:var(--flagship-muted)}.math-lean-line code{font-size:.9rem;color:var(--flagship-ink)}
.math-author{max-width:46rem;margin:4rem auto 0;padding:2rem 0;border-top:1px solid var(--flagship-rule);font-family:var(--flagship-ui)}.math-eyebrow{font-size:.7rem;font-weight:650;text-transform:uppercase;letter-spacing:.05em;color:var(--flagship-muted);margin:0 0 1rem}.math-author h2{font-size:1.4rem;letter-spacing:-.025em;margin:0 0 1rem}.math-author>p:not(.math-eyebrow){font-size:1rem;line-height:1.65;max-width:66ch}.math-author nav{display:flex;flex-wrap:wrap;gap:1.4rem;margin-top:1.5rem;font-size:.8rem}
.math-footer{max-width:86rem;margin:4rem auto 0;border-top:1px solid var(--flagship-rule);padding:2.5rem max(1.25rem,var(--aligned-gutter)) 3rem;display:flex;align-items:center;gap:2rem;font-family:var(--flagship-ui)}.math-footer .aligned-publication-mark{position:static;transform:none;font-size:2.5rem}.math-footer p{font-size:.8rem;color:var(--flagship-muted)}.math-footer>a:last-child{margin-left:auto;font-size:.75rem}
.cycle-experience{max-width:64rem;border-block:1px solid var(--flagship-rule);margin:3.5rem auto 4rem;padding:2rem 0 1.5rem;background:var(--flagship-page);color:var(--flagship-ink)}.cycle-intro h2{font-size:clamp(1.8rem,3.5vw,2.6rem);font-weight:650;letter-spacing:-.035em}.cycle-intro>p{font-size:1rem;color:var(--flagship-secondary)}.cycle-loops button,.cycle-insight{border-color:var(--flagship-rule)}.cycle-mark{border-color:var(--flagship-muted)}.cycle-reveal:disabled{border-color:var(--flagship-rule);color:var(--flagship-muted)}.cycle-reveal:hover:not(:disabled){background:var(--flagship-secondary)}.cycle-insight p{font:500 1.15rem/1.5 var(--flagship-ui)}
html[data-aligned-feature-theme=night] .math-line-accent,html[data-aligned-feature-theme=night] .math-line-guide{stroke:#dc986e}
@media(max-width:700px){html{scroll-padding-top:90px}.aligned-math [id]{scroll-margin-top:90px}.article-cover{margin:2rem 0 2.5rem}.article-cover img{height:300px}.article-cover figcaption{font-size:.7rem}.math-figure{margin:2.5rem 0;padding:1.25rem 0}.math-unit-panels{gap:1.25rem;grid-template-columns:1fr}.math-unit-panels>div+div{border-left:0;padding-left:0;border-top:1px solid var(--flagship-rule);padding-top:1.25rem}.math-unit svg{max-width:320px}.math-proof-path{grid-template-columns:1fr;gap:1.5rem;padding:1.25rem 0}.math-proof-path li{padding-top:0;padding-left:2rem}.math-proof-path li::before{left:0;top:.15rem}.math-proof-path li+li:after{display:none}.math-proof-path strong{margin-bottom:.25rem}.math-lean-line{align-items:flex-start;flex-direction:column;gap:.5rem}.math-author{margin-top:3rem}.math-footer{align-items:flex-start;flex-wrap:wrap;gap:1rem;margin-top:2rem}.math-footer p{margin:0;padding-top:.6rem}.math-footer>a:last-child{width:100%;margin:0}.cycle-experience{padding:1.5rem 0;margin:2.5rem 0}.cycle-intro h2{max-width:none}.cycle-loops{column-gap:18px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@media print{.aligned-publication-header,.math-footer,.cycle-actions,.ns-controls,.math-timeline__controls{display:none}.article-cover img{max-height:350px}.cycle-experience,.ns-experience,.math-figure{break-inside:avoid}}

.math-unit-panels>div>p{font-size:.8125rem;color:var(--flagship-muted);line-height:1.5;text-align:center;max-width:30ch;margin:.75rem auto 0}
.ns-experience{max-width:64rem;margin-inline:auto}.ns-intro h2{font-weight:650}

/* Restore the original cover-led opening while retaining the Aligned masthead. */
@font-face{font-family:MathInter;src:url('fonts/inter-latin-wght-normal.woff2') format('woff2');font-weight:100 900;font-display:swap}
.aligned-body--math .aligned-feature-hero.math-hero{display:block;max-width:72rem;padding:clamp(3.75rem,6.7vw,6rem) 0 3.2rem;text-align:center}
.aligned-body--math .math-hero .aligned-feature-hero__meta{display:none}
.aligned-body--math .math-hero h1{font:570 clamp(3.4rem,6.4vw,6rem)/1.03 MathInter,var(--flagship-ui);letter-spacing:-.04em;max-width:17ch;margin:0 auto;text-wrap:balance}
.aligned-body--math .math-hero .aligned-feature-dek{font:420 clamp(1.45rem,2.4vw,2rem)/1.3 'Newsreader Variable',Georgia,serif;max-width:44ch;margin:2rem auto 1.8rem;letter-spacing:-.01em;color:var(--flagship-secondary);text-wrap:balance}
.aligned-body--math .math-hero .aligned-feature-byline{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;text-align:center;gap:.4rem 1rem}.aligned-body--math .math-hero .aligned-feature-byline span:first-child{display:inline-block;margin:0;font-size:.8rem}
.aligned-body--math .math-hero+.article-cover{max-width:72rem;margin:0 auto 3.5rem}.aligned-body--math .math-hero+.article-cover img{max-height:600px}
@media(max-width:700px){.aligned-body--math .aligned-feature-hero.math-hero{padding:3rem 0 2rem}.aligned-body--math .math-hero h1{font-size:clamp(2.75rem,10.5vw,4.3rem);max-width:13ch;letter-spacing:-.035em}.aligned-body--math .math-hero .aligned-feature-dek{font-size:1.45rem;max-width:30ch;margin:1.5rem auto}.aligned-body--math .math-hero+.article-cover{margin-bottom:2.5rem}.aligned-body--math .math-hero+.article-cover img{height:330px}}

.cycle-lesson{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1.25rem;margin-top:1.75rem;padding:1rem 0;border-block:1px solid var(--flagship-rule)}
.cycle-lesson p{font:400 .875rem/1.6 var(--flagship-ui);margin:0;max-width:60ch;color:var(--flagship-secondary)}
.cycle-lesson button{font:500 .8rem/1.2 var(--flagship-ui);min-height:44px;border:1px solid var(--flagship-rule);color:var(--flagship-ink);background:transparent;padding:.75rem 1rem;cursor:pointer}.cycle-lesson button:first-child{background:var(--flagship-ink);color:var(--flagship-page);border-color:var(--flagship-ink)}
.cycle-loops button{font-size:.78rem}.cycle-loops button>svg{width:34px}.cycle-workspace{grid-template-columns:minmax(0,1fr) 250px}
@media(max-width:700px){.cycle-lesson{grid-template-columns:1fr auto;gap:1rem}.cycle-lesson p{grid-column:1/-1;grid-row:2}.cycle-lesson button:first-child{justify-self:start}.cycle-loops button{font-size:.72rem;gap:6px}.cycle-loops button>svg{width:28px}.cycle-mark{width:12px;height:12px}.cycle-loops{column-gap:12px}}
.math-problem-brief,.math-result-note{font:400 .95rem/1.65 var(--flagship-ui);color:var(--flagship-secondary);max-width:76ch;margin:1.5rem 0}.math-problem-brief strong,.math-result-note strong{font-weight:650;color:var(--flagship-ink)}.math-result-note{padding-top:1.25rem;border-top:1px solid var(--flagship-rule)}.math-problem-brief a,.math-result-note a{color:var(--flagship-link);text-underline-offset:3px}@media(max-width:700px){.math-problem-brief,.math-result-note{font-size:.875rem}}

.aligned-body--math .math-contributor-credentials{font-family:var(--flagship-ui);font-size:.8rem;line-height:1.6;color:var(--flagship-muted);text-align:center;margin:.65rem 0 0;text-wrap:balance}
