/* fixes.css — loaded last. Readability, contrast, link semantics, definition popovers,
   lesson figures, key-word boxes, and glossary layout. Values chosen for an audience that
   includes readers over 60 on phones: 16px minimum body text, 12px minimum labels, 4.5:1 contrast. */

:root{--ink-soft:#3b3550;--label:#4f4b66;--link:#4a33a4;--term:#2e1f73;--sage-line:#d0c9ea}

/* ---------- Type scale ---------- */
html{font-size:16px}
body{font-size:16px;line-height:1.6}
p{color:var(--ink-soft)}
.article-body p,.article-body li,.lesson-body p,.lesson-body li,.wiki-page p,.wiki-definition{font-size:17px;line-height:1.65;color:#25213a}
.article-body p,.lesson-body p{max-width:70ch}
.wiki-definition{font-size:21px;line-height:1.5;color:#1e1a2e}
.article-lede{font-size:19px;line-height:1.5}
.eyebrow,.tag,.term-card-category,.chapter-card-number,.sidebar-label,.wiki-count,.lesson-meta,.article-info,.breadcrumbs,.no-prerequisite,.footer-bottom,.footer-links a,.home-endnote,.quick-start p,.lesson-sources>p,.source-ref,.code-label,.wiki-source-note,.visual-note,.figure-note,.calculator-note,.wiki-editorial,.term-level,.chapter-progress,.reference-type,.search-foot,.sidebar-bottom{font-size:13px!important;line-height:1.5}
.eyebrow,.tag,.chapter-card-number,.sidebar-label{text-transform:none;letter-spacing:0;font-weight:600;color:var(--label)}
.eyebrow{color:#4f3aa6;margin-bottom:14px}
.brand-sub{font-size:10px!important;letter-spacing:1.8px;color:#4f4b66}
.breadcrumbs{color:var(--label)}
.no-prerequisite{color:var(--label)}
.lesson-meta{color:var(--label)}
.article-info{color:var(--label);font-size:13px}
.article-info button{font-size:13px;padding:7px 11px;color:#241b41;border-color:#c9c0e6}
.home-endnote,.home-endnote a{color:#4a33a4}
.footer-bottom,.footer-bottom span{color:#cfccde}
.footer-links a{color:#e6e4f1}
.lesson-sources>p,.wiki-source-note,.wiki-editorial,.visual-note,.figure-note,.calculator-note{color:var(--label)}
.lesson-source p,.reference-entry p{font-size:14px;line-height:1.6}
.sidebar-label{margin:26px 12px 8px}
.library-sidebar nav a,.chapter-nav>summary{font-size:14px}
.library-sidebar .chapter-children a{font-size:13.5px;line-height:1.5}
.quick-start h2{font-size:18px}
.lesson-orientation>strong{font-size:14px;text-transform:none;letter-spacing:0}
.lesson-orientation p{font-size:15px}
.lesson-orientation a{display:block;margin-top:8px;font-size:15px;color:var(--link);text-decoration:underline;text-underline-offset:.18em}
.lesson-code pre code{font-size:13.5px}
.answer-guide>summary{font-size:15px}
.wiki-alphabet button{font-size:14px;min-width:38px;min-height:40px}
.wiki-filter-row label{font-size:14px;color:#241b41}
.wiki-filter-row input,.wiki-filter-row select{font-size:16px}
.search-foot kbd{font-size:12px}
@media (max-width:600px){h1{font-size:clamp(32px,9vw,44px);letter-spacing:-1px} h2{font-size:28px} .article-body p,.article-body li,.lesson-body p,.lesson-body li{font-size:17px}}

/* ---------- Link semantics ----------
   Definition links: dotted underline in ink, open a popover.
   Navigation and reading links: solid underline in blue.
   External links: marked with an arrow. */
.term-link:link,.term-link:visited,.lesson-body a.term-link,.article-body a.term-link,.wiki-page a.term-link{color:var(--term);text-decoration:underline dotted #8270c9;text-decoration-thickness:1.5px;text-underline-offset:.22em;border-radius:2px}
.term-link:hover,.term-link[aria-expanded=true]{background:#ece7fb;text-decoration-style:solid;color:var(--term)}
.lesson-body a:not(.term-link):not(.source-ref):not(.button),.article-body a:not(.term-link):not(.source-ref):not(.button),.wiki-page a:not(.term-link):not(.button):not(.term-card),.key-terms dd a,.wiki-reading a,.wiki-bottom a{color:var(--link);text-decoration:underline;text-underline-offset:.18em;text-decoration-thickness:1px}
.wiki-page a:not(.term-link):not(.button):not(.term-card):hover{text-decoration-thickness:2px}
a[target=_blank]:not(.button):not(.term-card)::after{content:" \2197";font-size:.8em;color:#615c7a;text-decoration:none;display:inline-block;margin-left:1px}
.source-ref::after{content:none!important}

/* ---------- Definition popover ---------- */
.term-pop{position:absolute;z-index:60;background:#fff;border:1px solid #c9c0e6;border-radius:10px;box-shadow:0 12px 32px rgba(21,15,45,.18);padding:14px 16px 16px;max-width:360px;font-size:15px;line-height:1.55;color:#1e1a2e;animation:pop-in .12s ease-out}
@keyframes pop-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.term-pop{animation:none}}
.term-pop-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:6px}
.term-pop-head strong{font-family:var(--serif);font-size:20px;font-weight:400}
.term-pop-close{border:0;background:#efecfa;border-radius:50%;width:32px;height:32px;font-size:14px;color:#2c2153;flex:none}
.term-pop-close:hover{background:#e4ddf7}
.term-pop p{margin:0 0 8px;color:#25213a;font-size:15px}
.term-pop .term-pop-why{color:#4c4661;font-size:14px}
.term-pop-link{display:inline-block;margin-top:4px;font-weight:600;color:var(--link);text-decoration:underline;text-underline-offset:.18em}

/* ---------- Key words box on lessons ---------- */
.key-terms{margin:24px 0 28px;padding:18px 22px;background:#f5f3fc;border:1px solid #d9d3ee;border-left:4px solid #5b44b8;border-radius:6px}
.key-terms h2{font-family:var(--sans);font-size:14px;font-weight:600;letter-spacing:0;color:#4a33a4;margin:0 0 10px}
.key-terms dl{margin:0;display:grid;gap:10px 24px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.key-terms dl>div{margin:0}
.key-terms dt{font-weight:600;font-size:15px;color:#1e1a2e}
.key-terms dt a.term-link{color:#1e1a2e}
.key-terms dd{margin:2px 0 0;font-size:14px;line-height:1.5;color:#433f58}

/* ---------- Lesson figures ---------- */
.lesson-figure{margin:26px 0 30px;padding:20px 22px;background:#fff;border:1px solid var(--sage-line);border-radius:10px}
.lesson-figure figcaption,.concept-exhibit figcaption{font-family:var(--serif);font-size:19px;color:#1e1a2e;margin-bottom:14px}
.figure-flow,.figure-loop,.figure-pair{list-style:none;margin:0;padding:0;display:grid;gap:14px;counter-reset:step}
.figure-flow{grid-template-columns:repeat(auto-fit,minmax(125px,1fr))}
.figure-loop{grid-template-columns:repeat(auto-fit,minmax(125px,1fr))}
.figure-pair{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.figure-flow li,.figure-loop li,.figure-pair li{position:relative;background:#f5f3fc;border:1px solid #d9d3ee;border-radius:8px;padding:14px 14px 14px 16px;min-width:0;counter-increment:step}
.figure-flow li::before,.figure-loop li::before{content:counter(step);position:absolute;top:-11px;left:12px;width:22px;height:22px;border-radius:50%;background:#5b44b8;color:#fff;font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:center}
.figure-flow li strong,.figure-loop li strong,.figure-pair li strong{display:block;font-size:15px;color:#1e1a2e;margin:4px 0 6px}
.figure-flow li span,.figure-loop li span,.figure-pair li span{display:block;font-size:14px;line-height:1.5;color:#433f58}
@media (min-width:700px){
 .figure-flow li:not(:last-child)::after{content:"";position:absolute;right:-14px;top:50%;width:14px;height:1px;background:#9a8ad0}
 .figure-loop li:not(:last-child)::after{content:"";position:absolute;right:-14px;top:50%;width:14px;height:1px;background:#9a8ad0}
 .figure-loop li:last-child::after{content:"↺ repeat";position:absolute;right:12px;bottom:8px;font-size:12px;color:#615c7a}
}
@media (max-width:699px){
 .figure-flow,.figure-loop{grid-template-columns:1fr}
 .figure-flow li:not(:last-child)::after,.figure-loop li:not(:last-child)::after{content:"↓";position:absolute;left:50%;bottom:-16px;color:#9a8ad0;font-size:14px;line-height:1;transform:translateX(-50%)}
 .figure-flow,.figure-loop{gap:20px}
}
.figure-note{margin:14px 0 0;font-size:14px!important;line-height:1.55}
.prob-bars>div,.calib-rows>div{display:flex;align-items:center;gap:14px;margin:8px 0}
.prob-bars span,.calib-rows span{font-size:14px;min-width:88px;color:#1e1a2e}
.calib-rows span{min-width:120px}
.prob-bars i{display:block;background:#c1b3f7;padding:8px 10px;font-style:normal;font-size:13px;border-radius:4px;color:#1e1a2e;min-width:44px}
.calib-rows i{display:block;position:relative;background:#e6e1f7;height:34px;border-radius:4px;font-style:normal;overflow:hidden;min-width:60px}
.calib-rows b{position:absolute;left:0;top:0;bottom:0;background:#5b44b8;color:#fff;font-size:12px;font-weight:600;display:flex;align-items:center;padding-left:8px;white-space:nowrap}
.context-budget>div{font-size:13px}
.lesson-figure .context-budget{margin:0}

/* ---------- Glossary page exhibits ---------- */
.concept-exhibit{margin:26px 0 30px;padding:20px 22px;background:#fff;border:1px solid var(--sage-line);border-radius:10px}
.concept-exhibit p{font-size:15px!important;line-height:1.55;color:#433f58!important;margin:14px 0 0}
.bench-compare,.route-compare,.change-compare,.injection-exhibit{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.bench-compare>div,.route-compare>div,.change-compare>div,.injection-exhibit>div{background:#f5f3fc;border:1px solid #d9d3ee;border-radius:8px;padding:14px 16px;min-width:0}
.bench-compare small,.route-compare small,.change-compare small,.injection-exhibit small{display:block;font-size:12px;font-weight:600;letter-spacing:.4px;color:#4f3aa6;margin-bottom:6px}
.bench-compare b{display:block;font-family:var(--serif);font-size:40px;line-height:1;margin-bottom:8px;color:#1e1a2e}
.bench-compare p,.route-compare p,.change-compare p,.injection-exhibit p{margin:6px 0 0!important;font-size:14px!important}
.route-compare ol{margin:0;padding-left:20px;font-size:14px;color:#25213a;line-height:1.6}
.injection-exhibit .injected{background:#fbf3ea;border-color:#e4cfb4}
.injection-exhibit em{background:#f6dcc3;font-style:normal;padding:0 3px;border-radius:3px}
.concept-exhibit .figure-flow,.concept-exhibit .figure-loop{margin-top:4px}

/* ---------- Glossary index ---------- */
.wiki-index .page-head h1{font-size:clamp(36px,5vw,60px)}
.wiki-index .page-head p{font-size:18px;max-width:62ch}
.wiki-start{margin:0 0 34px;padding:20px 22px;background:#efecfa;border:1px solid #d6cfee;border-radius:10px}
.wiki-start summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px}
.wiki-start summary::-webkit-details-marker{display:none}
.wiki-start summary span{font-size:22px;color:#4f3aa6;line-height:1}
.wiki-start[open] summary span{display:none}
.wiki-start h2{font-size:22px;margin:0 0 4px}
.wiki-start p{font-size:15px;margin-bottom:12px}
.starter-list{margin:0;padding:0;list-style:none;display:grid;gap:6px 18px;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));counter-reset:starter}
.starter-list li{counter-increment:starter;font-size:15px;display:flex;gap:10px;align-items:baseline}
.starter-list li::before{content:counter(starter);font-size:12px;font-weight:600;color:#4f3aa6;min-width:18px}
.starter-list a{color:var(--link);text-decoration:underline;text-underline-offset:.18em}
.term-card-category{display:flex;flex-wrap:wrap;align-items:center;gap:8px;color:var(--label);letter-spacing:0;margin-bottom:8px}
.term-level{display:inline-block;font-size:11px!important;font-weight:600;padding:2px 7px;border-radius:999px;background:#e6e1f7;color:#4a33a4;letter-spacing:0}
.term-level.level-intermediate{background:#e4e9f2;color:#2a4a7a}
.term-level.level-advanced{background:#f2e6dc;color:#7a4a22}
.term-card h2{font-size:19px}
.term-card p{font-size:14px;line-height:1.5;color:#433f58;margin:0}
.wiki-empty{padding:22px;background:#f5f3fc;border:1px solid #d9d3ee;border-radius:8px}
.wiki-empty h3{font-size:19px;margin-bottom:6px}
.wiki-empty p{font-size:15px;margin:0}
.wiki-empty a{color:var(--link);text-decoration:underline}
.link-button{background:none;border:0;padding:0;font:inherit;color:var(--link);text-decoration:underline;cursor:pointer}
.wiki-aliases{font-size:14px!important;color:var(--label)!important;margin-top:-6px}
.wiki-heading-top{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.wiki-visual-cards{list-style:none;padding:0;margin:0;counter-reset:vc}
.wiki-visual-card{counter-increment:vc;text-align:left;padding:16px 16px 16px 18px}
.wiki-visual-card::before{content:counter(vc);display:inline-flex;width:22px;height:22px;border-radius:50%;background:#5b44b8;color:#fff;font-size:12px;font-weight:600;align-items:center;justify-content:center;margin-bottom:8px}
.wiki-visual-card strong{display:block;font-size:15px;margin-bottom:4px}
.wiki-visual-card p{font-size:14px!important;line-height:1.5;color:#433f58!important;margin:0}
.wiki-visual figcaption{font-family:var(--serif);font-size:19px;color:#1e1a2e;margin-bottom:14px}
.wiki-lesson-link{display:inline-block;margin-bottom:18px;font-size:16px}
.wiki-page .wiki-detail-grid h2,.wiki-connections h2,.wiki-reading h2{font-size:24px}
@media (max-width:640px){
 .term-grid{grid-template-columns:1fr!important;gap:8px}
 .term-card{padding:12px 14px;display:grid;grid-template-columns:1fr;gap:2px}
 .term-card h2{font-size:17px;margin:0}
 .term-card p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13.5px}
 .term-card-category{order:3;margin:4px 0 0;font-size:12px!important}
 .wiki-visual-cards{grid-template-columns:1fr!important;gap:10px}
 .wiki-visual-card:not(:last-child)::after{content:none}
 .wiki-filter-row label{min-width:100%}
}

/* ---------- Home lookup ---------- */
.home-lookup{padding:22px 0 6px;border-bottom:1px solid var(--line)}
.lookup-form label{display:block;font-family:var(--serif);font-size:22px;color:#1e1a2e;margin-bottom:10px}
.lookup-row{display:flex;gap:10px;max-width:640px}
.lookup-row input{flex:1;min-width:0;font-size:16px;padding:12px 14px;border:1px solid #c9c0e6;border-radius:6px;background:#fff}
.lookup-form p{font-size:14px;margin:10px 0 0;color:var(--label)}
@media (max-width:480px){.lookup-row{flex-direction:column}.lookup-row .button{width:100%}}

/* ---------- Sidebar and nav ---------- */
.article-aside .eyebrow{font-size:12px!important;letter-spacing:.3px}
.article-aside a{font-size:13px;line-height:1.5}
.library-sidebar nav a.selected{font-weight:600}
.new-tag{font-size:11px!important;text-transform:none;letter-spacing:0}
.header nav{font-size:15px}
.header nav a{color:#31284e}
.lesson-pagination>a span{text-transform:none;letter-spacing:0;font-size:13px;color:var(--label)}
.lesson-pagination>a strong{font-size:15px}
.chapter-pagination a,.wiki-bottom a{font-size:15px}
.library-sidebar{overflow-y:auto}
.map-key{font-size:12px!important;letter-spacing:0;text-transform:none}

/* ---------- Print ---------- */
@media print{.term-pop,.key-terms h2::after{display:none}.term-link{text-decoration:none!important;color:inherit!important}.lesson-figure,.concept-exhibit{break-inside:avoid}}

/* Related-term cards: only the title reads as a link */
.wiki-page a.term-card,.wiki-page a.term-card span,.wiki-page a.term-card p,.wiki-page a.term-card b{text-decoration:none;color:inherit}
.wiki-page a.term-card h2{color:var(--link);text-decoration:underline;text-underline-offset:.18em;text-decoration-thickness:1px}
.wiki-page a.term-card p{color:#433f58}

/* ---------- Plain words and first-look visuals ---------- */
.wiki-plain{margin:18px 0 8px;padding:18px 22px;background:#efecfa;border-left:4px solid #5b44b8;border-radius:6px}
.wiki-plain-label{display:block;font-size:13px;font-weight:600;color:#4a33a4;margin-bottom:6px}
.wiki-plain p{margin:0;font-size:21px!important;line-height:1.5;color:#1e1a2e!important;max-width:60ch}
.wiki-fuller h2{font-size:22px;margin:0 0 8px}
.wiki-fuller .wiki-definition{font-size:17px;line-height:1.6;color:#25213a}
.wiki-deeper{margin:8px 0 26px}
.wiki-deeper>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;margin:0 0 10px}
.wiki-deeper>summary::-webkit-details-marker{display:none}
.wiki-deeper>summary h2{font-size:22px;margin:0}
.wiki-deeper>summary::after{content:"+";font-size:22px;color:#4f3aa6}
.wiki-deeper[open]>summary::after{content:"−"}
.plain-visual{margin:22px 0 26px;padding:22px 24px;background:#fff;border:2px solid #d0c9ea;border-radius:12px}
.plain-visual figcaption{font-family:var(--serif);font-size:22px;color:#1e1a2e;margin-bottom:16px}
.plain-visual .figure-note{font-size:15px!important;color:#433f58;margin-top:16px;line-height:1.55}
.pv-sentence{font-family:var(--serif);font-size:22px;margin:0 0 6px;color:#1e1a2e}
.pv-arrow{font-size:13px;color:#615c7a;margin:0 0 8px}
.chip-row{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
.chip{display:inline-block;padding:10px 14px;background:#e2dcf6;border:1px solid #c1b3f7;border-radius:8px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:18px;color:#1e1a2e}
.chip i{font-style:normal;color:#9a8ad0;font-size:14px;margin-right:2px}
.pv-desk{background:#f3e7cf;border:2px solid #d8c391;border-radius:10px;padding:14px;margin-bottom:12px}
.pv-desk-top{display:flex;flex-wrap:wrap;gap:10px}
.pv-desk-top span,.pv-cabinet>span{display:inline-block;background:#fff;border:1px solid #c9c1a6;border-radius:6px;padding:10px 12px;font-size:15px;color:#1e1a2e}
.pv-desk-label{font-size:13px;color:#6a5a2a;margin-top:10px;width:100%}
.pv-cabinet{background:#eae9ef;border:2px dashed #c9c0e6;border-radius:10px;padding:14px;display:flex;flex-wrap:wrap;gap:10px}
.pv-cabinet>span{opacity:.6}
.pv-cabinet .pv-desk-label{color:#615c7a}
.pv-parts{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.pv-parts>div{background:#f5f3fc;border:1px solid #d9d3ee;border-radius:8px;padding:14px}
.pv-parts b{display:block;font-size:15px;color:#1e1a2e;margin-bottom:6px}
.pv-parts span{font-size:14px;line-height:1.5;color:#433f58}
.pv-compare{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.pv-compare>div{background:#f5f3fc;border:1px solid #d9d3ee;border-radius:8px;padding:14px 16px}
.pv-compare>div.bad{background:#fbf0ec;border-color:#e6c6bb}
.pv-compare>div.good{background:#eeeafb;border-color:#aea9dc}
.pv-compare small{display:block;font-size:12px;font-weight:600;letter-spacing:.4px;color:#4f3aa6;margin-bottom:6px}
.pv-compare .bad small{color:#9a3b22}
.pv-compare p{margin:0 0 8px!important;font-size:16px!important;line-height:1.5;color:#1e1a2e!important}
.pv-compare span{font-size:14px;color:#433f58;line-height:1.5}
.pv-todo{margin:0;padding:0;list-style:none;display:grid;gap:8px;counter-reset:td}
.pv-todo li{counter-increment:td;background:#f5f3fc;border:1px solid #d9d3ee;border-radius:8px;padding:12px 14px 12px 44px;position:relative;font-size:16px;color:#1e1a2e}
.pv-todo li::before{position:absolute;left:14px;top:11px;width:20px;height:20px;border-radius:50%;font-size:12px;display:flex;align-items:center;justify-content:center;font-weight:600}
.pv-todo li.done::before{content:"✓";background:#5b44b8;color:#fff}
.pv-todo li.now::before{content:"…";background:#e9d9a8;color:#5a4200}
.pv-todo li.wait::before{content:"!";background:#e6c6bb;color:#7a2d16}
.pv-todo li b{display:block;font-size:13px;color:#9a3b22;margin-top:4px;font-weight:600}
.pv-dials{display:flex;flex-wrap:wrap;gap:12px;margin:4px 0 8px}
.pv-dials i{width:44px;height:44px;border-radius:50%;border:3px solid #5b44b8;position:relative;background:#f5f3fc;display:block}
.pv-dials i::after{content:"";position:absolute;left:50%;top:4px;width:3px;height:18px;background:#1e1a2e;transform-origin:50% 18px;transform:translateX(-50%) rotate(var(--r))}
.pv-map{position:relative;height:200px;background:#f5f3fc;border:1px solid #d9d3ee;border-radius:8px;overflow:hidden}
.pv-map span{position:absolute;background:#fff;border:1px solid #c1b3f7;border-radius:999px;padding:6px 12px;font-size:14px;color:#1e1a2e;white-space:nowrap;transform:translate(-20%,-50%)}
.pv-bins>div{margin:10px 0}
.pv-bins small{display:block;font-size:13px;color:#433f58;margin-bottom:4px}
.pv-bins i{display:block;background:#c1b3f7;border-radius:4px;padding:8px 10px;font-style:normal;font-size:13px;color:#1e1a2e;max-width:100%}
.pv-doc{background:#fffdf7;border:1px solid #e3dcc3;padding:16px 18px;font-family:var(--serif);font-size:16px;line-height:1.6;color:#2a2a2a;border-radius:4px}
.pv-doc p{margin:0 0 8px!important;font-size:16px!important}
.pv-doc .pv-hidden{background:#f6dcc3;padding:2px 6px;border-radius:3px;color:#5a2a10!important}
.pv-timeline{display:flex;gap:0;border-radius:8px;overflow:hidden;border:1px solid #d9d3ee}
.pv-timeline>div{padding:18px 16px;font-size:15px;line-height:1.5;color:#1e1a2e}
.pv-timeline .before{flex:3;background:#e2dcf6}
.pv-timeline .after{flex:2;background:#eae9ef;color:#615c7a;border-left:3px dashed #9a8ad0}
.pv-timeline b{display:block;font-size:14px;margin-top:4px}
@media (max-width:640px){.plain-visual{padding:16px}.plain-visual figcaption{font-size:19px}.chip{font-size:16px;padding:8px 10px}.pv-sentence{font-size:19px}}

/* ---------- The short version (lessons) ---------- */
.short-version{margin:24px 0 18px;padding:18px 22px;background:#efecfa;border-left:4px solid #5b44b8;border-radius:6px}
.short-version h2{font-family:var(--sans);font-size:14px;font-weight:600;color:#4a33a4;margin:0 0 8px}
.short-version p{margin:0;font-size:19px!important;line-height:1.55;color:#1e1a2e!important;max-width:62ch}

/* ---------- Choose your path map ---------- */
.route-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 16px;font-size:14px;color:var(--label)}
.route-toggle{border:1.5px solid var(--rc,#9a8ad0);background:#fff;color:#1e1a2e;border-radius:999px;padding:6px 12px;font-size:13px;cursor:pointer}
.route-toggle[aria-pressed=true]{background:var(--rc,#5b44b8);color:#fff;border-color:var(--rc,#5b44b8)}
.spire{position:relative;width:100%;aspect-ratio:1/1.05;background:linear-gradient(180deg,#e9e8f5 0%,#f9f8fd 100%);border:1px solid #d0c9ea;border-radius:14px;overflow:visible;margin:0 0 18px}
.spire-lines{position:absolute;inset:0;width:100%;height:100%}
.spire-lines path.mob{display:none}
.spire-lines path{fill:none;stroke:#9f98be;stroke-width:2.5;vector-effect:non-scaling-stroke;stroke-dasharray:6 5;transition:stroke .2s,opacity .2s}
.spire.has-route .spire-lines path{opacity:.25}
.spire.has-route .spire-lines path.on-route{opacity:1;stroke-dasharray:none;stroke-width:4}
.spire-node{position:absolute;left:var(--dx);top:var(--dy);transform:translate(-50%,-50%);width:150px;background:#fff;border:2px solid #c9c0e6;border-radius:12px;padding:10px 10px 10px;text-align:center;cursor:pointer;box-shadow:0 4px 14px rgba(21,15,45,.08);transition:transform .15s,border-color .15s,box-shadow .15s;font:inherit}
.spire-node:hover,.spire-node:focus-visible{transform:translate(-50%,-50%) scale(1.04);border-color:#5b44b8;box-shadow:0 8px 22px rgba(21,15,45,.16);outline:none}
.spire-node.is-selected{border-color:#2e1f73;box-shadow:0 0 0 3px #e2dcf6,0 8px 22px rgba(21,15,45,.16)}
.spire.has-route .spire-node{opacity:.35}
.spire.has-route .spire-node.on-route{opacity:1}
.spire-node.kind-start{background:#2e1f73;color:#fff;border-color:#2e1f73;width:120px}
.spire-node.kind-start .spire-sub{color:#d0cae8}
.spire-node.kind-summit{background:#fdf8e7;border-color:#d8c391}
.spire-node.is-done{border-color:#5b44b8;background:#eeeafb}
.spire-ring{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;background:conic-gradient(#5b44b8 calc(var(--pct,0)*1%),#e6e1f7 0);margin:0 auto 6px}
.spire-ring b{width:34px;height:34px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;color:#1e1a2e}
.kind-start .spire-ring{background:#3b2c86}.kind-start .spire-ring b{background:#2e1f73;color:#fff}
.kind-summit .spire-ring{background:#e9d9a8}.kind-summit .spire-ring b{background:#fdf8e7;color:#5a4200}
.spire-title{display:block;font-weight:600;font-size:14px;line-height:1.25;color:inherit}
.spire-sub{display:block;font-size:11.5px;color:#615c7a;margin-top:3px}
.spire-panel{background:#fff;border:1px solid #d0c9ea;border-radius:12px;padding:18px 22px;margin-bottom:12px}
.spire-panel h2{font-size:24px;margin:0 0 6px}
.spire-panel>p{font-size:15px;color:#433f58}
.spire-lessons{margin:12px 0;padding:0;list-style:none;display:grid;gap:6px}
.spire-lessons li{display:flex;justify-content:space-between;gap:12px;padding:8px 10px 8px 34px;position:relative;background:#f5f3fc;border-radius:6px;font-size:15px}
.spire-lessons li::before{content:"○";position:absolute;left:12px;color:#9a8ad0}
.spire-lessons li.done::before{content:"✓";color:#5b44b8;font-weight:700}
.spire-lessons li a{color:var(--link);text-decoration:underline;text-underline-offset:.18em}
.spire-lessons li span{font-size:13px;color:var(--label);white-space:nowrap}
.spire-actions{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:12px}
@media (max-width:640px){
 .spire{aspect-ratio:1/3}
 .spire-node{left:var(--mx);top:var(--my)}
 .spire-lines path.desk{display:none}.spire-lines path.mob{display:block}
 .spire-node{width:124px;padding:8px 6px}
 .spire-sub{display:none}
 .spire-node.kind-summit .spire-sub,.spire-node.kind-start .spire-sub{display:none}
 .spire-title{font-size:12.5px}.spire-sub{font-size:10.5px}
 .spire-ring{width:36px;height:36px}.spire-ring b{width:28px;height:28px;font-size:11px}
 .spire-node.kind-start{width:96px}
}

/* ---------- Prompt library ---------- */
.prompt-rules{background:#efecfa;border:1px solid #d6cfee;border-radius:10px;padding:18px 22px;margin:0 0 20px}
.prompt-rules h2{font-size:20px;margin:0 0 8px}
.prompt-rules ol{margin:0 0 10px;padding-left:22px;font-size:15px;line-height:1.55}
.prompt-rules p{font-size:14px;margin:0}
.prompt-rules a{color:var(--link);text-decoration:underline}
.prompt-toc{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 26px}
.prompt-toc a{font-size:13.5px;padding:6px 12px;background:#fff;border:1px solid #d0c9ea;border-radius:999px;color:#1e1a2e;text-decoration:none}
.prompt-toc a:hover{border-color:#5b44b8}
.prompt-group{margin:0 0 34px}
.prompt-group h2{font-size:26px;margin:0 0 14px;padding-bottom:8px;border-bottom:1px solid var(--line)}
.prompt-card{background:#fff;border:1px solid #d0c9ea;border-radius:12px;padding:18px 20px;margin:0 0 16px}
.prompt-card h3{font-size:19px;margin:0 0 8px}
.prompt-when,.prompt-check{font-size:15px;line-height:1.55;color:#433f58;margin:0 0 10px}
.prompt-check{margin:12px 0 0;padding:10px 12px;background:#fbf8ef;border-left:3px solid #d8c391;border-radius:4px}
.prompt-box{border:1px solid #d9d3ee;border-radius:8px;overflow:hidden;background:#f2f2f9}
.prompt-box-head{display:flex;justify-content:space-between;align-items:center;padding:6px 10px 6px 14px;background:#e6e1f7;font-size:12px;font-weight:600;color:#4a33a4}
.copy-prompt{font:inherit;font-size:12px;font-weight:600;border:1px solid #9a8ad0;background:#fff;border-radius:6px;padding:4px 10px;cursor:pointer;color:#2e1f73}
.prompt-box pre{margin:0;padding:14px;white-space:pre-wrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:13.5px;line-height:1.55;color:#1e1a2e}

/* ---------- Local AI guide ---------- */
.localai-section{margin:0 0 32px}
.localai-section h2{font-size:26px;margin:0 0 12px}
.localai-section>p{font-size:17px;line-height:1.6;max-width:70ch}
.tier-card{display:grid;grid-template-columns:48px 1fr;gap:14px;background:#fff;border:1px solid #d0c9ea;border-radius:12px;padding:18px 20px;margin:0 0 14px}
.tier-rank{width:40px;height:40px;border-radius:50%;background:#2e1f73;color:#fff;font-family:var(--serif);font-size:22px;display:flex;align-items:center;justify-content:center}
.tier-card h3{font-size:21px;margin:4px 0 6px}
.tier-who{font-size:15px;color:#433f58;margin:0 0 10px}
.tier-card dl{margin:0;display:grid;grid-template-columns:130px 1fr;gap:6px 14px;font-size:15px;line-height:1.55}
.tier-card dt{font-weight:600;color:#4a33a4}
.tier-card dd{margin:0;color:#25213a}
.tier-note{margin:12px 0 0;padding:10px 12px;background:#efecfa;border-radius:6px;font-size:14.5px;color:#1e1a2e}
.localai-steps{padding-left:22px;font-size:16px;line-height:1.6}
.localai-steps li{margin-bottom:8px}
.localai-list{padding-left:22px;font-size:16px;line-height:1.6}
.localai-page a,.prompts-page a{color:var(--link)}
.practice-callouts{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));margin:0 0 24px}
.practice-callouts .practice-callout{margin:0}
@media (max-width:560px){.tier-card{grid-template-columns:1fr}.tier-card dl{grid-template-columns:1fr}.tier-rank{width:34px;height:34px;font-size:18px}}

.wiki-visual figcaption,.concept-exhibit figcaption{text-transform:none;letter-spacing:0}

/* ---------- Libraries: index, groups, anchors ---------- */
.lib-index{margin:0 0 22px;padding:16px 18px;background:#fff;border:1px solid #d0c9ea;border-radius:12px}
.lib-index h2{font-size:15px;font-family:var(--sans);font-weight:600;color:#4a33a4;margin:0 0 8px}
.lib-index-group{border-top:1px solid #e7e2f5;padding:8px 0}
.lib-index-group:first-of-type{border-top:0}
.lib-index-group summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-size:16px;font-weight:600;color:#1e1a2e;padding:6px 0}
.lib-index-group summary::-webkit-details-marker{display:none}
.lib-index-group summary::before{content:"+";margin-right:10px;color:#4f3aa6;font-weight:400}
.lib-index-group[open] summary::before{content:"−"}
.lib-index-group summary span{font-size:12px;font-weight:600;color:#4a33a4;background:#e6e1f7;border-radius:999px;padding:2px 8px}
.lib-index-group ol{margin:0 0 4px;padding-left:26px;font-size:15px;line-height:1.7}
.lib-index-group ol a{color:var(--link);text-decoration:underline;text-underline-offset:.18em}
.lib-group{margin:0 0 12px;background:#fff;border:1px solid #d0c9ea;border-radius:12px;padding:0 16px}
.lib-group>summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0}
.lib-group>summary::-webkit-details-marker{display:none}
.lib-group>summary h2{font-size:21px;margin:0}
.lib-group>summary span{font-size:13px;color:var(--label);white-space:nowrap}
.lib-group>summary::after{content:"+";font-size:22px;color:#4f3aa6;margin-left:auto}
.lib-group[open]>summary::after{content:"−"}
.lib-group .prompt-card{border:0;border-top:1px solid #e7e2f5;border-radius:0;padding:18px 0 20px;margin:0;scroll-margin-top:90px}
.prompt-card.is-target{background:#f5f3fc;box-shadow:inset 4px 0 0 #5b44b8;padding-left:12px}
.lib-top{display:inline-block;margin-top:10px;font-size:13px;color:var(--label)!important}
.recipe-steps{margin:12px 0 0;padding:10px 12px;background:#f5f3fc;border-radius:6px;font-size:14.5px}
.recipe-steps b{display:block;margin-bottom:4px;color:#4a33a4}
.recipe-steps ol{margin:0;padding-left:20px;line-height:1.55}
.recipe-perms{margin:10px 0 0;font-size:14.5px;color:#433f58}
.agent-explainer{margin:0 0 30px}
.agent-explainer h2{font-size:26px;margin:0 0 12px}
.agent-anatomy{margin-top:18px}
.agent-anatomy h3{font-size:20px;margin:0 0 10px}
.agents-page a,.about-author a{color:var(--link)}
.about-author{margin:22px 0 28px;padding:20px 22px;background:#fff;border:1px solid #d0c9ea;border-radius:12px}
.about-author h2{margin-top:0}
.about-author p{font-size:17px;line-height:1.6}

/* ---------- Mobile back button ---------- */
.mobile-back{display:none}
@media (max-width:900px){.mobile-back{display:inline-flex;align-items:center;gap:6px;margin:14px 20px 0;padding:8px 14px;font:inherit;font-size:14px;font-weight:600;color:#2e1f73;background:#efecfa;border:1px solid #d3cbec;border-radius:999px}}

/* ---------- Case & Code brand ---------- */
:root{--brand:#684ec9;--brand-deep:#4a33a4;--brand-ink:#241a5c;--brand-light:#c1b3f7;--brand-wash:#efecfa}
.brand{display:flex;align-items:center;gap:12px}
.brand-logo{width:40px;height:40px;flex:none;border-radius:50%;box-shadow:0 2px 8px rgba(74,51,164,.25)}
.brand>svg{display:none}
@media (max-width:600px){.brand-logo{width:34px;height:34px}}
.library-intro{background:linear-gradient(135deg,#2a1d6e 0%,#4a33a4 55%,#684ec9 100%)!important;border-color:#3b2a8a!important}
.library-intro .eyebrow{color:#d9cffc!important}
.library-intro h1{color:#fff}
.library-intro p{color:#ece7ff!important}
.library-intro .button{background:#fff!important;color:#2e1f73!important;border-color:#fff!important}
.library-intro .button:hover{background:#efecfa!important}
.library-intro .text-link{color:#e4dcff!important}
.intro-detail{display:flex;align-items:center;justify-content:center}
.intro-logo{width:190px;height:190px;border-radius:50%;box-shadow:0 18px 48px rgba(16,5,46,.45),0 0 0 6px rgba(255,255,255,.12)}
@media (max-width:760px){.intro-logo{width:120px;height:120px}}
.button,.button.small{background:#4a33a4;border-color:#4a33a4;color:#fff}
.button:hover{background:#3b2a8a;border-color:#3b2a8a}
.header nav a[aria-current],.header nav a.active{color:#4a33a4}
::selection{background:#d9cffc}
:focus-visible{outline-color:#684ec9}

/* ---------- Local AI: data tables, builds, widgets ---------- */
.data-table{margin:24px 0 28px;padding:18px 20px;background:#fff;border:1px solid #d0c9ea;border-radius:12px}
.data-table figcaption{font-family:var(--serif);font-size:20px;color:#1e1a2e;margin-bottom:12px}
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
.data-table table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.45;min-width:640px}
.data-table th{text-align:left;font-weight:600;color:#2e1f73;background:#f5f3fc;padding:8px 10px;border-bottom:2px solid #d0c9ea;white-space:nowrap}
.data-table td{padding:8px 10px;border-bottom:1px solid #e7e2f5;vertical-align:top;color:#25213a}
.data-table td a{color:var(--link)}
.data-stamp{margin:12px 0 0;font-size:13px!important;color:#4f4b66!important;line-height:1.5}
.data-stamp a{color:var(--link)}
.builds .build-card{border:1px solid #d9d3ee;border-radius:10px;padding:14px 16px;margin:0 0 12px;background:#fdfcff}
.build-card h3{font-size:19px;margin:0 0 2px}
.build-budget{margin:0 0 10px!important;font-size:14px!important;font-weight:600;color:#4a33a4!important}
.build-card dl{margin:0;display:grid;grid-template-columns:150px 1fr;gap:6px 14px;font-size:14.5px;line-height:1.5}
.build-card dt{font-weight:600;color:#4f3aa6}.build-card dd{margin:0;color:#25213a}
@media (max-width:560px){.build-card dl{grid-template-columns:1fr}.build-card dt{margin-top:4px}}
.wide-bars span{min-width:140px}
.widget-card{margin:24px 0 28px;padding:18px 20px;background:#fff;border:2px solid #d0c9ea;border-radius:12px}
.widget-card figcaption{font-family:var(--serif);font-size:21px;color:#1e1a2e;margin-bottom:14px}
.fc-grid{display:grid;gap:10px 14px;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}
.fc-grid label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600;color:#433f58}
.fc-grid input,.fc-grid select{font:inherit;font-size:15px;font-weight:400;padding:8px 10px;border:1px solid #c9c0e6;border-radius:6px;background:#fff;color:#1e1a2e}
.fc-wide{grid-column:1/-1}
.fc-out{margin-top:16px}
.fc-meter p{margin:8px 0 0!important;font-size:15px!important}
.fc-bar{display:flex;height:18px;border-radius:9px;background:#efecfa;overflow:hidden;border:1px solid #d9d3ee}
.fc-bar i{display:block;height:100%}
.fc-bar .w{background:#684ec9}.fc-bar .k{background:#c1b3f7}.fc-bar .o{background:#9a8ad0}
.fc-meter.no .fc-bar{border-color:#e6c6bb}.fc-meter.no b{color:#9a3b22}.fc-meter.ok b{color:#3b2c86}
.fc-results{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));margin-top:14px}
.fc-results>div{background:#f5f3fc;border:1px solid #d9d3ee;border-radius:8px;padding:12px 14px}
.fc-results small{display:block;font-size:12px;font-weight:600;color:#4f3aa6}
.fc-results b{display:block;font-family:var(--serif);font-size:28px;color:#1e1a2e;margin:2px 0}
.fc-results span{font-size:13px;color:#4f4b66}
.fc-results .muted b{color:#9a95b0}
/* Blueprint build */
.bp-stage{border-radius:10px;overflow:hidden;background:#173a8a}
.bp-svg{display:block;width:100%;height:auto}
.bp-line{fill:none;stroke:#fff;stroke-width:2.2;vector-effect:non-scaling-stroke}
.bp-fill{fill:#fff}
.bp-part{transition:transform .9s cubic-bezier(.4,.1,.2,1);transform-box:view-box}
.bp-label{font:600 19px/1.2 system-ui,sans-serif;color:#fff;text-align:center}
.bp-label a.term-link,.bp-label a.term-link:visited{color:#fff!important;text-decoration:underline dotted rgba(255,255,255,.75)!important;background:none}
.bp-label a.term-link:hover{background:rgba(255,255,255,.15)}
.is-in-case .bp-labelbox{opacity:0;transition:opacity .4s}
.is-in-case .bp-part[data-part=case] .bp-labelbox,.is-in-case .bp-part[data-part=psu] .bp-labelbox,.is-in-case .bp-part[data-part=gpu] .bp-labelbox{opacity:1}
.bp-svg[data-socket=open] .lever{transform:rotate(-55deg);transform-origin:175px 105px;transform-box:view-box}
.bp-svg .lever{transition:transform .6s}
.bp-svg[data-socket=open] .socket{stroke-dasharray:5 4}
.bp-arrows path{fill:none;stroke:#fff;stroke-width:2.5;stroke-dasharray:8 7;opacity:0;transition:opacity .4s}
.bp-arrows path.on{opacity:1;animation:bp-dash 1.2s linear infinite}
@keyframes bp-dash{to{stroke-dashoffset:-30}}
.bp-cables path{fill:none;stroke:#c1b3f7;stroke-width:4;stroke-linecap:round;opacity:0;transition:opacity .6s}
.bp-cables.on path{opacity:1}
.is-done .bp-part[data-part=case] .bp-line:first-child{stroke:#c1b3f7;stroke-width:3.5}
@media (prefers-reduced-motion:reduce){.bp-part,.bp-svg .lever{transition:none}.bp-arrows path.on{animation:none}}
.bp-controls{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;margin-top:12px}
.bp-controls button{font:inherit;font-weight:600;font-size:14px;padding:10px 16px;border-radius:999px;border:1px solid #4a33a4;background:#4a33a4;color:#fff;cursor:pointer;white-space:nowrap}
.bp-controls .bp-prev{background:#fff;color:#4a33a4}
.bp-controls button:disabled{opacity:.4;cursor:default}
.bp-text b{font-size:12px;color:#4f3aa6}.bp-text h4{margin:2px 0 4px;font-size:18px;color:#1e1a2e}.bp-text p{margin:0!important;font-size:15px!important;color:#25213a!important;line-height:1.5}
@media (max-width:560px){.bp-controls{grid-template-columns:1fr 1fr}.bp-text{grid-column:1/-1;grid-row:1}.bp-label{font-size:26px}}

.cpu-seated .bp-part[data-part=cpu] .bp-labelbox,.cooler-on .bp-part[data-part=cpu] .bp-labelbox,.cooler-on .bp-part[data-part=ram] .bp-labelbox{opacity:0;transition:opacity .4s}
