/* Shared editorial palette for model details and legal reading pages. */
body.editorial-page { --ink:var(--text-light); --muted:var(--text-muted-dark); --line:var(--line-dark); --neon:var(--brand-accent); --paper:var(--surface-dark); background:var(--surface-dark); }
body.editorial-page main .inner { width:calc(100% - 96px); max-width:1200px; margin-inline:auto; }
body.editorial-page main h2 { letter-spacing:-.03em; line-height:1.2; }
body.editorial-page main .content-section-bar { width:fit-content; position:relative; color:var(--text-dark); }
body.editorial-page main .content-section-bar svg { color:var(--text-dark); }
body.editorial-page main .content-section-bar:before,
body.editorial-page main .content-section-bar:after { content:none; }
body.editorial-page .secondary-cta { border-radius:7px; padding:12px 20px; box-shadow:none; color:inherit; border-color:currentColor; }
/* A dark title and a light, quiet reading surface on both legal pages. */
body.editorial-page.legal-page .hero { background:var(--surface-dark); padding:78px 0 62px; border:0; text-align:center; }
body.editorial-page.legal-page .hero .inner { max-width:1000px; }
body.editorial-page.legal-page .hero .eyebrow { color:var(--brand-accent); font-size:12px; letter-spacing:.14em; }
body.editorial-page.legal-page .hero .eyebrow:before { content:""; display:block; width:54px; height:5px; background:var(--brand-accent); margin:0 auto 23px; }
body.editorial-page.legal-page .hero h1 { color:var(--text-light); font-size:clamp(36px,5.5vw,66px); letter-spacing:-.04em; line-height:1.12; margin:20px auto; }
body.editorial-page.legal-page .hero .lead { color:var(--text-muted-dark); font-size:19px; line-height:1.6; max-width:730px; margin-inline:auto; }
body.editorial-page.legal-page .content { --ink:var(--text-dark); --muted:var(--text-muted-light); --line:var(--line-light); background:var(--surface-light); color:var(--ink); padding:64px 0 88px; }
body.editorial-page.legal-page .content .inner { max-width:900px; }
body.editorial-page.legal-page .legal { max-width:none; gap:22px; }
body.editorial-page.legal-page .legal-section { padding:32px; background:var(--card-light); border:1px solid var(--card-border-light); border-radius:14px; }
body.editorial-page.legal-page .legal-section h2 { color:var(--text-dark); font-size:25px; line-height:1.3; margin:0 0 20px; }
body.editorial-page.legal-page .legal-section :is(p,li) { color:var(--text-muted-light); font-size:16px; line-height:1.75; }
body.editorial-page.legal-page .legal-section :is(strong,a) { color:var(--text-dark); }
body.editorial-page.legal-page .legal-section a:hover { color:#515d12; }
body.editorial-page.legal-page .legal-section li::marker { color:var(--surface-dark); }
/* Model: dark introduction, light applications, alternating technology chapters. */
body.model-page #model { background:var(--surface-dark); padding:75px 0 65px; }
body.model-page #model .ambient-canvas { opacity:.28; }
body.model-page #model:before,body.model-page #model:after { opacity:.18; }
body.model-page #model .kai-product-footer { background:transparent; border-color:var(--line-dark); }
body.model-page .product-overview { background:var(--surface-muted); padding:52px 0; text-align:center; }
body.model-page .product-overview h2 { color:var(--text-dark); font-size:32px; margin:24px 0 20px; }
body.model-page .product-overview p { color:var(--text-muted-light); max-width:850px; margin-inline:auto; line-height:1.7; }
body.model-page .product-overview a { color:var(--surface-dark); }
body.model-page #use-cases { background:var(--surface-light); padding:80px 0; }
body.model-page #use-cases > .inner > h2 { text-align:center; margin-inline:auto; }
body.model-page #use-cases > .inner > h2:not(.content-section-bar) { color:var(--text-dark); font-size:clamp(28px,3vw,42px); max-width:850px; margin-bottom:36px; }
body.model-page #use-cases .edge-case-note { color:var(--text-muted-light); text-align:center; }
body.model-page #technology { background:var(--surface-dark); padding-top:65px; }
body.model-page #technology > .inner { text-align:center; }
body.model-page #technology > section { padding:65px 0; background:var(--surface-dark); border:0; }
body.model-page #technology > section:nth-of-type(even) { background:var(--surface-muted); }
body.model-page :is(#use-cases,#technology > section:nth-of-type(even),.product-overview) { --ink:var(--text-dark); --muted:var(--text-muted-light); --line:var(--line-light); --detail-surface:var(--card-light); --card-border:var(--card-border-light); --card-radius:14px; --card-top:1px solid var(--card-border-light); color:var(--text-dark); }
body.model-page :is(#technology > section:nth-of-type(odd),#deployment) { --ink:var(--text-light); --muted:var(--text-muted-dark); --line:var(--line-dark); --detail-surface:var(--card-dark); --card-border:var(--card-border-dark); --card-radius:12px; --card-top:3px solid var(--brand-accent); color:var(--text-light); }
body.model-page main .detail-card { background:var(--detail-surface); border:1px solid var(--card-border); border-top:var(--card-top); border-radius:var(--card-radius); padding:28px; box-shadow:none; }
body.model-page main :is(h2,h3,h4,strong) { color:var(--ink); }
body.model-page main :is(.section-lead,.area-subtitle,.detail-card p) { color:var(--muted); }
body.model-page #technology .area-intro { padding-bottom:28px; }
body.model-page #technology .area-title { font-size:clamp(30px,3.4vw,46px); }
body.model-page #technology .eyebrow { color:var(--ink); }
body.model-page #technology :is(.fact,.dependency-box,.api-card,.learning-step,.continuity-note,.human-control-box) { background:var(--detail-surface); border:1px solid var(--card-border); border-top:var(--card-top); border-radius:var(--card-radius); color:var(--ink); box-shadow:none; }
body.model-page #technology :is(.fact span,.dependency-box small,.api-card p,.learning-step p,.continuity-note,.human-control-box p,.source-note) { color:var(--muted); }
body.model-page #technology .api-card pre { background:var(--surface-inset); color:var(--text-light); border-radius:8px; }
body.model-page #technology .people-band { border-radius:12px; overflow:hidden; }
body.model-page #technology .people-caption { background:var(--surface-dark); color:var(--text-light); padding:24px; }
body.model-page #technology .people-caption :is(strong,span) { color:var(--text-light); }
body.model-page #deployment { background:var(--surface-dark); padding:80px 0; }
body.model-page #deployment > .inner > h2 { font-size:clamp(30px,3.4vw,44px); }
@media(max-width:760px) {
 body.editorial-page main .inner { width:calc(100% - 40px); }
 body.editorial-page.legal-page .hero { padding:55px 0 42px; }
 body.editorial-page.legal-page .hero .lead { font-size:17px; }
 body.editorial-page.legal-page .content { padding:35px 0 55px; }
 body.editorial-page.legal-page .legal-section { padding:23px; }
 body.editorial-page.legal-page .legal-section h2 { font-size:22px; }
 body.model-page #model { padding:50px 0; }
 body.model-page #use-cases,body.model-page #deployment,body.model-page #technology > section { padding:50px 0; }
 body.model-page main .detail-card { padding:23px; }
 body.model-page main :is(.why-grid,.continuity-grid,.learning-grid,.pillars,.human-cards,.advantage-grid,.condensed-features,.condensed-grid) { grid-template-columns:minmax(0,1fr); }
}

/* Nested code panels use the same dark inset as homepage information boxes. */
body.model-page #technology .api-card code { background:var(--surface-inset); color:var(--text-light); border:1px solid var(--line-dark); box-shadow:none; border-radius:10px; }

body.model-page .product-back-row { display:flex; justify-content:flex-start; text-align:left; }
body.model-page .product-back-row .secondary-cta { display:inline-flex; align-items:center; gap:10px; }
body.model-page .product-back-row svg { flex-shrink:0; }

/* Compact, calm product introduction without the homepage graph. */
body.model-page #model { padding:34px 0 38px; min-height:0; background:var(--surface-dark); }
body.model-page #model::before,body.model-page #model::after { content:none; }
body.model-page #model .kai-identity { max-width:520px; margin:0 auto 14px; }
body.model-page #model .single-model-copy { margin-bottom:0; }
body.model-page #model .single-model-copy > span:first-child { font-size:clamp(22px,2.3vw,30px); margin-bottom:14px; }
body.model-page #model .single-model-copy > span:last-child { max-width:760px; font-size:17px; line-height:1.55; }
body.model-page #model .kai-actions:empty { display:none; }
@media(max-width:760px) { body.model-page #model { padding:24px 0 30px; } body.model-page #model .kai-identity { max-width:380px; } body.model-page #model .single-model-copy > span:last-child { font-size:16px; } }

body.model-page #model .product-back-row { margin-bottom:12px; }
body.model-page #model .product-back-row .secondary-cta { color:var(--text-muted-dark); border:0; padding:6px 0; background:transparent; }
body.model-page #model .product-back-row .secondary-cta:hover { color:var(--brand-accent); }

body.model-page #model .kai-actions { margin-top:24px; }

body.model-page .model-bottom-actions { display:flex; justify-content:center; margin-top:32px; }

/* Shared product-card treatment: dark heading, yellow divider, neutral body. */
body.model-page main .detail-card:has(> .card-heading) {
 --ink:var(--text-dark); --muted:var(--text-muted-light);
 background:var(--card-light); border:1px solid var(--card-border-light);
 border-radius:14px; overflow:hidden; padding:28px;
 display:block; min-width:0;
}
body.model-page main .detail-card > .card-heading {
 background:var(--surface-dark); color:var(--text-light);
 margin:-28px -28px 24px; padding:24px 28px;
 border-bottom:3px solid var(--brand-accent);
}
body.model-page main .detail-card > .card-heading h3 {
 color:var(--text-light); font-size:22px; line-height:1.3; margin:0;
}
body.model-page main .detail-card > .card-heading :is(.tag,.eyebrow) {
 display:block; color:var(--text-muted-dark); margin:0 0 14px;
 background:none; border:0; padding:0; font-size:12px; letter-spacing:.08em;
}
body.model-page main .detail-card > .card-heading .detail-number {
 display:inline-flex; align-items:center; justify-content:center;
 width:34px; height:34px; min-width:34px; min-height:34px; padding:0;
 margin:0 0 16px; border-radius:50%; background:var(--brand-accent);
 color:var(--text-dark); font-size:15px; line-height:1; font-weight:800;
}
body.model-page main .detail-card > p { margin-bottom:0; }
@media(max-width:760px) {
 body.model-page main .detail-card:has(> .card-heading) { padding:24px; }
 body.model-page main .detail-card > .card-heading { margin:-24px -24px 22px; padding:22px 24px; }
}

/* Numbered headings: badge and title on one vertically centered row. */
body.model-page main .detail-card > .card-heading:has(> .detail-number) {
 display:flex; align-items:center; gap:14px;
}
body.model-page main .detail-card > .card-heading > .detail-number {
 flex:0 0 34px; margin:0;
}
body.model-page main .detail-card > .card-heading > h3 { min-width:0; }

/* Compact application headings. */
body.model-page main .detail-card > .card-heading {
 box-sizing:border-box; height:var(--card-heading-height, auto); flex-shrink:0;
 display:flex; flex-direction:column; justify-content:center;
}
body.model-page main .detail-card > .card-heading:has(> .detail-number) {
 flex-direction:row; justify-content:flex-start;
}
body.model-page main .detail-card > .card-heading > * { flex-shrink:0; }
body.model-page main .detail-card > .card-heading > h3 { flex-shrink:1; }
body.model-page #use-cases .card-heading h3[data-i18n="ccase8"] { font-size:20px; }

/* The heading replaces the legacy number/title/body grid in human cards. */
body.model-page main .detail-card > .card-heading > h3 {
 overflow-wrap:anywhere;
}
body.model-page main .detail-card > p { overflow-wrap:anywhere; }

/* Technology chapter navigation sticks only within its chapter group. */
body.model-page .technology-nav {
 position:sticky; top:var(--technology-header-height,84px); z-index:18;
 background:rgba(37,42,44,.96); border-bottom:1px solid var(--line-dark);
 backdrop-filter:blur(18px); margin-top:28px;
}
body.model-page .technology-nav-links {
 display:flex; justify-content:center; gap:32px; padding:16px 20px;
}
body.model-page .technology-nav a {
 position:relative; color:var(--text-light); text-decoration:none;
 font-size:15px; line-height:1.4; font-weight:750; padding:0 0 5px;
}
body.model-page .technology-nav a::after {
 content:""; position:absolute; bottom:0; left:0; right:0; height:2px;
 background:var(--brand-accent); transform:scaleX(0); transition:transform .2s;
}
body.model-page .technology-nav a:is(:hover,.active) { color:var(--brand-accent); }
body.model-page .technology-nav a.active::after { transform:scaleX(1); }
body.model-page #technology > section { scroll-margin-top:calc(var(--technology-header-height,84px) + var(--technology-nav-height,60px) + 12px); }
@media(max-width:500px) {
 body.model-page .technology-nav-links { gap:16px; padding:14px 12px; }
 body.model-page .technology-nav a { font-size:12px; }
}
