/* Long-form reading layout. */
.article-header{max-width:800px;margin:0 auto;padding:64px 0 30px}
.article-header h1{font-size:clamp(30px,4.2vw,44px);line-height:1.4;letter-spacing:-.035em;margin:0 0 20px;overflow-wrap:anywhere}
.article-meta{display:flex;gap:16px;flex-wrap:wrap;color:var(--muted);font-size:13px}
.article-toc{max-width:740px;margin:0 auto 38px;padding:20px 24px;border:1px solid transparent;border-radius:12px;background:#eef2fb}
.article-toc p{margin:0 0 9px;font-size:13px;font-weight:700;color:var(--ink)}
.article-toc ol{margin:0;padding-left:21px;display:grid;gap:5px;font-size:14px}
.article-toc a{color:var(--blue)}
.article-toc a:hover,.article-body a:hover{text-decoration:underline;text-underline-offset:4px}
.article-body{margin-inline:auto;font-size:16px;line-height:1.95;overflow-wrap:break-word}
.article-body h2{font-size:27px;line-height:1.5;margin:58px 0 22px;letter-spacing:-.025em;scroll-margin-top:32px}
.article-body h3{font-size:20px;line-height:1.6;color:var(--ink);margin:32px 0 16px}
.article-body p{margin:0 0 20px}
.article-body strong{color:var(--ink);font-weight:700}
.article-body .accent-text{color:var(--accent,#DF2D3B);font-weight:700}
.article-body .accent-text strong{color:inherit}
.article-body ul,.article-body ol{padding-left:25px;margin:0 0 24px}
.article-body li{margin-bottom:9px}
.article-body blockquote{margin:22px 0;padding:16px 22px;border-left:3px solid #94a9d7;background:#eef2fa;border-radius:0 9px 9px 0;color:#4e628d}
.article-body blockquote p:last-child{margin-bottom:0}
.article-body pre{padding:22px;border:1px solid #dce4f2;background:#edf2fa;border-radius:12px;white-space:pre-wrap;font-size:14px;line-height:1.8;overflow-wrap:anywhere}
.article-body code{font-family:Consolas,'Courier New',monospace;font-size:.9em}
/* Keep comparison tables inside the reading column on narrow screens. */
.article-body .article-table{box-sizing:border-box;min-width:0;width:100%;max-width:100%;margin:24px 0 30px;overflow-x:auto;overscroll-behavior-x:contain;border-radius:10px;background:#f6f8ff;scrollbar-width:thin;scrollbar-color:#bac9e2 #edf2fa}
.article-body .article-table:focus-visible{outline:3px solid #7292f0;outline-offset:3px}
.article-body .article-table table{width:100%;border-collapse:collapse;font-size:14px;line-height:1.75}
.article-body .article-table th,.article-body .article-table td{padding:12px 14px;border-bottom:1px solid #dfe7f5;text-align:left;vertical-align:top}
.article-body .article-table th{background:#e9effb;color:#1e3a70;font-weight:700}
.article-body .article-table tbody tr:last-child td{border-bottom:0}
.article-body .article-table a,.article-body .article-table code{overflow-wrap:anywhere}
.article-body .article-table code{white-space:normal}
@media(max-width:760px){.article-body .article-table table{min-width:540px;font-size:13px}}
.article-body .article-end{margin-top:50px;padding-top:24px;border-top:1px solid var(--line)}
@media(max-width:760px){.article-header{padding-top:42px}.article-body{font-size:15px;line-height:1.95}.article-body h2{font-size:23px;margin-top:42px}.article-body h3{font-size:18px}.article-toc{padding:18px}.article-body pre{padding:16px;font-size:12px}}

.article-header h1,.article-body h2,.article-body h3{color:#1e3a70}

/* Shared reading sidebar for every blog article. */
.article-layout{display:grid;grid-template-columns:minmax(0,1fr) 264px;gap:48px;align-items:start}
.article-layout .article-body{grid-column:1;grid-row:1;min-width:0;width:100%;max-width:none;margin:0}
.article-layout .article-toc{grid-column:2;grid-row:1;position:sticky;top:var(--site-nav-clearance,84px);width:100%;max-width:none;margin:0;padding:18px;max-height:max(0px,calc(100dvh - var(--site-nav-clearance,84px) - 16px))}
.article-page .article-header{max-width:calc(100% - 312px);margin-inline:0}
.article-page.is-pending .article-header{max-width:800px;margin-inline:auto}
.article-page.is-pending .article-layout{display:block}
.article-page.is-pending .article-toc{display:none}
.article-page.is-pending .article-body{max-width:800px;margin-inline:auto}
.toc-disclosure summary{font-size:15px;font-weight:700;color:#1e3a70;cursor:pointer;list-style-position:inside;padding:2px 0}
.toc-disclosure summary:focus-visible{outline:3px solid #7292f0;outline-offset:4px;border-radius:3px}
.toc-progress{padding:13px 0 15px}
.toc-progress-label{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.toc-progress-track{height:3px;background:#dce4f4;border-radius:4px;margin-top:8px;overflow:hidden}
.toc-progress-fill{display:block;height:100%;width:0;background:#4765b6;border-radius:4px}
.toc-nav{max-height:max(0px,calc(100dvh - var(--site-nav-clearance,84px) - 164px));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c0cce3 transparent;scroll-behavior:auto}
.article-toc .toc-nav ol{list-style:none;margin:0;padding:0;display:block;font-size:13px;line-height:1.65}
.article-toc .toc-nav ol ol{margin:3px 0 9px 9px;padding-left:10px;border-left:1px solid #d7e0f0;font-size:12px}
.article-toc .toc-nav li{margin:2px 0}
.article-toc .toc-nav a{display:block;padding:6px 8px;border-radius:5px;color:#667795;overflow-wrap:anywhere}
.article-toc .toc-nav a:hover{background:#e3eaf8;text-decoration:none;color:#1e3a70}
.article-toc .toc-nav a.is-active{color:#1e3a70;background:#dce6fa;font-weight:700}
.article-body h2,.article-body h3{scroll-margin-top:calc(var(--site-nav-clearance,84px) + 16px)}
@media(max-width:999px){
 .article-layout{display:flex;flex-direction:column;gap:28px;max-width:740px;margin-inline:auto}
 .article-page .article-header{max-width:740px;margin-inline:auto}
 .article-layout .article-toc{top:var(--site-nav-clearance,84px);z-index:5;max-height:max(0px,calc(100dvh - var(--site-nav-clearance,84px) - 16px));background:#eef2fb}
 .article-layout .article-body{width:100%}
 .toc-nav{max-height:min(45dvh,max(0px,calc(100dvh - var(--site-nav-clearance,84px) - 164px)))}
 .article-body h2,.article-body h3{scroll-margin-top:calc(var(--site-nav-clearance,84px) + 144px)}
}

/* The knowledge/project flywheel uses the same quiet blue palette as the article. */
.learning-flywheel{margin:28px 0 32px;padding:26px 16px 18px;border:1px solid transparent;border-radius:18px;background:#f0f4fc}
.flywheel-diagram{position:relative;aspect-ratio:720/620;isolation:isolate}
.flywheel-links{position:absolute;inset:0;width:100%;height:100%;overflow:visible;color:#91a7d4;pointer-events:none}
.flywheel-guide{stroke:#d3def2;stroke-width:1;stroke-dasharray:4 8}
.flywheel-arrows{stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.flywheel-core{position:absolute;left:50%;top:50%;translate:-50% -50%;width:36%;aspect-ratio:1;border:1px solid #d3def1;border-radius:50%;background:#e5edfb;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:10px;padding:12px;color:#647ca9}
.flywheel-core>span:first-child{font-size:12px;letter-spacing:.05em}
.article-body .flywheel-core strong{font-size:25px;line-height:1.3;color:#1e3a70;letter-spacing:.04em}
.flywheel-core>span:last-child{font-size:11px;line-height:1.8}
.article-body .flywheel-steps{list-style:none;padding:0;margin:0}
.article-body .flywheel-steps>li{position:absolute;translate:-50% -50%;width:28%;min-height:78px;padding:12px 8px;margin:0;border:1px solid transparent;border-radius:12px;background:#fbfcff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;text-align:center;color:#334f83;font-size:13px;line-height:1.5}
.flywheel-number{display:grid;place-items:center;width:22px;height:22px;background:#e5ecfb;border-radius:50%;font-size:11px;color:#5e7ab5;font-weight:700;font-variant-numeric:tabular-nums}
.flywheel-steps>li:nth-child(1){left:50%;top:9%}
.flywheel-steps>li:nth-child(2){left:83%;top:30%}
.flywheel-steps>li:nth-child(3){left:83%;top:70%}
.flywheel-steps>li:nth-child(4){left:50%;top:91%}
.flywheel-steps>li:nth-child(5){left:17%;top:70%}
.flywheel-steps>li:nth-child(6){left:17%;top:30%}
.learning-flywheel figcaption{margin-top:20px;text-align:center;font-size:12px;line-height:1.7;color:#7b8caa}
@media(max-width:600px){
 .learning-flywheel{padding:20px}
 .flywheel-diagram{aspect-ratio:auto}
 .flywheel-links{display:none}
 .flywheel-core{position:static;translate:none;width:100%;aspect-ratio:auto;border-radius:12px;padding:18px;gap:5px;margin-bottom:20px}
 .flywheel-core>span:last-child br{display:none}
 .article-body .flywheel-core strong{font-size:23px}
 .article-body .flywheel-steps{display:grid;gap:20px}
 .article-body .flywheel-steps>li{position:relative;left:auto;top:auto;translate:none;width:100%;min-height:56px;flex-direction:row;gap:14px;text-align:left;justify-content:flex-start;padding:12px 16px;font-size:14px}
 .flywheel-steps>li:not(:last-child)::after{content:'↓';position:absolute;bottom:-21px;left:24px;color:#92a8d3;font-size:15px;line-height:20px}
 .flywheel-steps br{display:none}
 .learning-flywheel figcaption{margin-top:18px}
}

/* Interactive learning components; each instance keeps its own selected step. */
.learning-flow{margin:28px 0 32px;padding:24px 18px;border:1px solid transparent;border-radius:18px;background:#f0f4fc}
.learning-flow figcaption{display:flex;gap:6px;flex-direction:column;margin:0 0 24px;text-align:left;font-size:12px;color:#7b8caa}
.article-body .learning-flow figcaption strong{font-size:18px;color:#1e3a70}
.flow-step{font:inherit;line-height:1.5;cursor:pointer;appearance:none;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;width:100%;min-height:90px;padding:13px 9px;border:1px solid transparent;border-radius:12px;color:#334f83;background:#fbfcff;text-align:center;transition:background-color 160ms ease,border-color 160ms ease,box-shadow 160ms ease}
.flow-step:hover{background:#edf2ff}
.flow-step:focus-visible,.flow-controls button:focus-visible{outline:3px solid #7292f0;outline-offset:4px}
.flow-step[aria-selected="true"]{background:#dfe9fd;box-shadow:0 3px 12px -8px #4765b6}
.flow-step[aria-selected="true"] .flywheel-number{background:#4765b6;color:#fff}
.article-body .loop-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;padding:0;margin:0;list-style:none}
.article-body .loop-steps>li{position:relative;margin:0;font-size:13px}
.loop-steps>li:not(:last-child)::after{content:'→';position:absolute;right:-12px;top:34px;color:#8ca3cf;pointer-events:none}
.loop-return{margin:14px 0 20px;text-align:center;border-bottom:1px dashed #bccde9;padding-bottom:12px;color:#7b91b8;font-size:12px}
.article-body .learning-flow .flywheel-steps>li{padding:0;border:0;background:transparent;display:block;min-height:0}
.learning-flow .flywheel-arrows>path{transition:stroke 160ms ease}
.learning-flow .flywheel-arrows>path.is-active{stroke:#4765b6;stroke-width:2.8}
.learning-flow .flywheel-diagram+figcaption{text-align:center;margin:20px 0}
.flow-detail{background:#fbfcff;border:1px solid transparent;border-radius:12px;padding:19px 22px;min-height:112px}
.article-body .flow-detail-title{display:block;font-size:15px;color:#1e3a70;margin-bottom:8px}
.article-body .flow-detail p{font-size:14px;line-height:1.9;margin:0;color:#627494}
.flow-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:15px}
.flow-controls[hidden]{display:none}
.flow-controls button{cursor:pointer;font:inherit;font-size:12px;color:#4c69a4;padding:7px 12px;border:1px solid #d3dff2;border-radius:7px;background:#f8faff}
.flow-controls button:hover{background:#e4ecfb}
.flow-status{font-size:12px;color:#7a8dac;font-variant-numeric:tabular-nums}
@media(max-width:600px){
 .article-body .loop-steps{grid-template-columns:1fr;gap:19px}
 .loop-steps .flow-step{flex-direction:row;text-align:left;justify-content:flex-start;padding:12px 16px;min-height:54px}
 .loop-steps>li:not(:last-child)::after{content:'↓';left:25px;right:auto;top:auto;bottom:-20px;line-height:19px}
 .learning-flow .flywheel-steps .flow-step{min-height:56px;flex-direction:row;text-align:left;justify-content:flex-start;padding:12px 16px;font-size:14px}
 .learning-flow{padding:20px 16px}
 .flow-detail{padding:16px;min-height:0}
}
@media(prefers-reduced-motion:reduce){.flow-step,.learning-flow .flywheel-arrows>path{transition:none}}
