/* Shared reading roles; loaded by the existing marks layer on every page,
   including methods, versions and no-JS documents. */
:root {
 --layout-body:"Space Grotesk","PingFang TC","Microsoft JhengHei","Noto Sans CJK TC",system-ui,sans-serif;
 --layout-heading:"Noto Serif TC","Songti TC",serif;
 --layout-h1:clamp(32px,calc(26px + 1.5vw),48px);
 --layout-h2:clamp(24px,calc(21px + .75vw),32px);
 --layout-h3:clamp(20px,calc(18px + .42vw),24px);
 --layout-text:clamp(16px,calc(15px + .21vw),18px);
 --layout-description:var(--layout-text); /* one paragraph style: descriptions match body text */
 --layout-leading:1.75;
 --layout-title-gap:16px; --layout-paragraph-gap:12px;
 --layout-section-gap:clamp(32px,5vw,56px);
}
:root:lang(en){--layout-heading:"Space Grotesk","IBM Plex Sans",system-ui,sans-serif;--layout-leading:1.65}

body{font-family:var(--layout-body);font-size:var(--layout-text);line-height:var(--layout-leading)}
body :is(h1,h2,h3,h4){font-family:var(--layout-heading);font-weight:650}
body h1{font-size:var(--layout-h1);line-height:1.3}
body h2{font-size:var(--layout-h2);line-height:1.35}
body h3{font-size:var(--layout-h3);line-height:1.4}
body :is(.page-hero__intro,.intro,.sub){font-family:var(--layout-body);font-size:var(--layout-description);line-height:var(--layout-leading)}
body :is(.ed3-module,.home-method) > p{font-family:var(--layout-body);font-size:var(--layout-text);font-weight:400;line-height:var(--layout-leading);max-width:68ch;margin-bottom:var(--layout-paragraph-gap)}
body[data-copy-page="ed3-benchmark-methods"] main{margin:24px 40px;max-width:68ch;padding:0}
body[data-copy-page="ed3-benchmark-methods"] main>h1{margin:0 0 var(--layout-title-gap)}
body[data-copy-page="ed3-benchmark-methods"] main>p{margin:0 0 var(--layout-paragraph-gap);font-family:var(--layout-body);font-size:var(--layout-text);line-height:var(--layout-leading)}
body:has(main>.grid>.card) main>h1{font-size:var(--layout-h1)}
body:has(main>.grid>.card) :is(.lead,.card p){font-family:var(--layout-body);font-size:var(--layout-description);line-height:var(--layout-leading)}
body:has(main>.grid>.card) .card h2{font-size:var(--layout-h2)}
@media(max-width:700px){
 :root{--layout-h1:32px;--layout-h2:24px;--layout-h3:20px;--layout-text:16px;--layout-description:16px}
 body[data-copy-page="ed3-benchmark-methods"] main{margin:24px 20px}
}
/* Standalone English documents load the local Plex family through fonts.css.
   Live sea pages keep their existing Space Grotesk first choice. */
html:lang(en) body:not(.cb-shell){--layout-body:"IBM Plex Sans","Helvetica Neue",Arial,"PingFang TC","Microsoft JhengHei",system-ui,sans-serif}
/* Page descriptions use the body-text colour as well, so every page has one paragraph style. */
:root[data-cb-theme] .cb-shell :is(.page-hero__intro,.cb-page-intro,.cb-skin .intro,.cb-skin .sub):not(.page-hero__fig){color:var(--ink)!important}
/* When woven copy draws its visible text in an overlay (its root is made position:relative), keep the transparent base layer transparent so text is not painted twice (it looked bold). The models page hides overlays and paints the base. No :has() here: on the DeepSeek page it froze the main thread for about a minute. */
.cb-shell:not(.model-cards-page) [data-copy-woven][style*="position: relative"] > :is(copy-line,copy-text,pkg-value,layout-text)[style*="color: transparent"]{color:transparent!important}
/* That rule also catches the overlay itself when the woven root is a copy-text/copy-line element (its inline border-color: transparent matches), so there the base layer is what paints. Its value slots (numbers, model names) were left transparent and vanished on the cases page; let them paint with the surrounding text. */
.cb-shell:not(.model-cards-page) :is(copy-line,copy-text,pkg-value,layout-text)[data-copy-woven][style*="position: relative"] :is(copy-line,copy-text,pkg-value,layout-text)[style*="color: transparent"]:is([data-pkg],[data-copy],[data-backoffice-slot],[data-backoffice-fragment]){color:inherit!important}
/* DeepSeek profile modules put the paint overlay on the block (p, h2, axis label) and leave the woven pieces as transparent markers beneath it; cb-sea.css forces every marker to inherit the text colour, so those pages painted each sentence twice (looked bold: 150 zh / 145 en). Keep those base markers transparent there; the overlay paints the text once. Overlays themselves are excluded. */
.cb-shell.cb-deepseek :is(copy-line,copy-text,pkg-value,layout-text)[style*="color: transparent"]:not([data-copy-paint]):not([data-copy-paint] *){color:transparent!important}
/* First-screen title and summary rise from the very first frame (CSS, not script),
   so nothing already shown is faded back down. Reduced motion keeps them still. */
@keyframes cb-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media (prefers-reduced-motion:no-preference){
 .cb-shell main :is(.page-hero h1,h1.cb-title,.page-hero__fig,.page-hero__intro),
 body[data-copy-page="ed3-benchmark-methods"] main>:is(h1,p:first-of-type){animation:cb-rise .5s cubic-bezier(.2,.7,.2,1) backwards}
 .cb-shell main .page-hero__intro,
 body[data-copy-page="ed3-benchmark-methods"] main>p:first-of-type{animation-delay:.08s}
}
/* The 68ch reading width is for prose; list items that hold layout blocks (case cards) keep their full row. */
:root[data-cb-theme] .cb-shell .cb-content li:has(> :is(div,table,figure,section,ul,ol)){max-width:none!important}
/* Models: reading notes open at the top of each card; the collapsed summary adds one line each for cases and performance. */
#model-cards .mc-card-body>.mc-howto{margin:4px 0 20px}
#model-cards .mc-sum-tag+.mc-sum-tag::before{content:"・";margin:0 .1em;opacity:.6}
:lang(en) #model-cards .mc-sum-tag+.mc-sum-tag::before{content:"·";margin:0 .45em}
/* The sticky wordmark also covers the strip's left padding, so scrolled links never show beside it. */
html body .ed3-nav .inner>.brand::before{content:"";position:absolute;top:0;bottom:0;right:100%;width:48px;background:inherit}
/* Reserve the wordmark's width (330×80) before the image loads so the nav strip is laid out once. */
:root[data-cb-theme] .ed3-nav .brand .cb-wordmark{aspect-ratio:auto 330/80}
