/*
  Empirical Markets · Unified Research Journal
  Installed at: app/blog/static/css/blog.css
  Load after Bootstrap 5 and static/css/home-landing.css.
  The public brand/nav/buttons are shared with the homepage and pricing page;
  all notebook styles below are scoped to `.post-surface`.
*/
:root {
  --blog-bg:#010516; --blog-nav:#050919; --blog-panel:#090c1a;
  --blog-panel-raised:#10152b; --blog-input:#141a34;
  --blog-border:rgba(100,100,255,.20); --blog-border-strong:rgba(137,150,255,.36);
  --blog-text:#d0d0ff; --blog-heading:#e6ecff; --blog-muted:#a0a0d0;
  --blog-faint:#7887b2; --blog-blue:#77bbff; --blog-indigo:#5b68e1;
  --blog-lavender:#7a80c8; --blog-green:#00cc99;
  --blog-red:#ff7878; --blog-amber:#d9b778;
  --blog-font:'DM Sans',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --blog-mono:'IBM Plex Mono',SFMono-Regular,Consolas,monospace;
  --notebook-bg:#ffffff; --notebook-text:#25324a;
  --notebook-heading:#172b55; --notebook-muted:#526079;
  --notebook-border:#dce3ef; --notebook-link:#2455ad;
  --notebook-code-bg:#f5f7fc; --notebook-code-text:#24324d;
  --notebook-header-bg:#eaf0fa; --notebook-header-hover:#dfe8f7;
  --notebook-header-text:#243f78;
  --syntax-comment:#596579; --syntax-keyword:#6639a6;
  --syntax-string:#116329; --syntax-number:#8a3b12;
  --syntax-function:#1752a1; --syntax-operator:#44536b;
  --syntax-error:#a51d2d;
}
html{scroll-behavior:smooth}
body.em-blog{background:var(--blog-bg);color:var(--blog-text);font-family:var(--blog-font);min-height:100vh;display:flex;flex-direction:column;-webkit-font-smoothing:antialiased}
.em-blog .blog-main{min-width:0;position:relative;flex:1;isolation:isolate}
.em-blog .blog-main a{text-decoration:none}
.em-blog .blog-ambient{position:absolute;inset:0 0 auto;height:960px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse 42% 38% at 73% 19%,rgba(71,87,183,.14),transparent 78%),radial-gradient(ellipse 38% 27% at 10% 21%,rgba(35,72,145,.08),transparent 82%)}
.em-blog .public-links a[aria-current="page"],.em-blog .public-mobile-menu a[aria-current="page"]{color:#f0f4ff}
.em-blog .public-header{z-index:65}
.em-blog :where(a,button,input,summary):focus-visible{outline:2px solid #90c4ff;outline-offset:4px}
.em-blog .blog-footer{border-top:1px solid #262b4b;margin-top:auto;min-height:110px}
.em-blog .blog-footer .public-brand{font-size:11px}
[hidden]{display:none!important}

/* Public research identity */
.blog-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:11px;color:#7482af;font:10px var(--blog-mono);margin:0 0 39px}
.blog-crumbs a{color:#9eaed5}
.blog-crumbs a:hover{color:#c9e2ff}
.blog-crumbs span{color:#4e587f}
.blog-crumbs strong{color:#c6d3f2;font-weight:500}
.blog-eyebrow{display:inline-flex;align-items:center;gap:11px;color:#77bbff;letter-spacing:1.1px;font:10px/1.7 var(--blog-mono)}
.blog-status-dot{width:6px;height:6px;border-radius:50%;background:#77bbff;box-shadow:0 0 12px #77bbff55;display:inline-block;flex:none}
.blog-label{font:10px/1.5 var(--blog-mono);letter-spacing:1.15px;color:#80bfff}
.blog-date{font:10px var(--blog-mono);color:#8b99c3;white-space:nowrap}
.blog-index-hero{padding-top:51px;padding-bottom:95px}
.blog-index-hero-grid{display:grid;grid-template-columns:minmax(0,1.06fr) minmax(330px,.94fr);gap:clamp(28px,5vw,90px);align-items:center}
.blog-index-hero-copy{padding:8px 0 12px}
.blog-index-hero h1{font-size:clamp(48px,5.0vw,77px);letter-spacing:-4px;line-height:1.055;font-weight:600;color:#e8edff;margin:19px 0 20px}
.blog-index-hero h1 span{color:#77bbff}
.blog-index-hero-copy>p{font-size:15px;line-height:1.88;color:#a4afd7;max-width:570px;margin:0}
.blog-hero-points{display:flex;gap:12px 23px;flex-wrap:wrap;margin-top:30px;color:#7f8fbf;font:10px var(--blog-mono)}
.blog-hero-explore{margin-top:32px}
.blog-index-console{background:linear-gradient(145deg,#10162e,#080d1f);border:1px solid #363e6d;border-radius:9px;box-shadow:0 25px 60px #0004;overflow:hidden;min-width:0}
.blog-console-top,.blog-console-bottom{background:#11172e;min-height:43px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 18px;color:#8a9ac6;letter-spacing:.6px;font:9px var(--blog-mono);border-bottom:1px solid #2e345b}
.blog-console-top>span:first-child{display:inline-flex;align-items:center;gap:8px}
.blog-live-dot{height:6px;width:6px;border-radius:50%;background:#00cc99;box-shadow:0 0 10px #00cc9960}
.blog-console-body{padding:29px 31px 28px}
.blog-console-eyebrow{font:9px var(--blog-mono);letter-spacing:1px;color:#83b9ff}
.blog-console-heading{font-size:25px;line-height:1.2;font-weight:600;color:#e5ecff;letter-spacing:-.9px;margin:12px 0 21px}
.blog-console-heading span{color:#7fbbff}
.blog-console-steps{border-top:1px solid #2b3358}
.blog-console-steps>div{display:flex;align-items:center;gap:15px;padding:14px 0;border-bottom:1px solid #283052}
.blog-console-step-no{font:11px var(--blog-mono);color:#83b6ff;display:grid;place-items:center;width:31px;height:31px;background:#172344;border:1px solid #384b79;border-radius:5px;flex:none}
.blog-console-steps>div>span:nth-child(2){flex:1}
.blog-console-steps strong{display:block;color:#dce5ff;font-size:12px;font-weight:600}
.blog-console-steps small{display:block;color:#8594c0;font-size:10px;margin-top:4px}
.blog-console-steps>div>span:last-child{font:16px var(--blog-mono);color:#7189c4}
.blog-console-bottom{border-bottom:none;border-top:1px solid #2e345b;background:#0d132a;color:#7488b6}

/* Lead article */
.blog-section-heading{display:flex;align-items:end;justify-content:space-between;gap:25px;margin-bottom:25px}
.blog-section-heading h2{font-weight:600;font-size:clamp(26px,3vw,38px);letter-spacing:-1.5px;color:#e5ebff;line-height:1.17;margin:12px 0 0}
.blog-section-heading h2 span{color:#77bbff}
.blog-section-heading>p{font-size:12px;color:#909ec8;max-width:335px;line-height:1.75;margin:0 0 4px}
.blog-feature-section{padding-bottom:92px}
.blog-featured-entry{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(290px,.85fr);border:1px solid #3b4779;border-radius:9px;background:linear-gradient(135deg,#121933,#0a0f22);overflow:hidden;box-shadow:0 15px 48px #0003;transition:border-color .18s}
.blog-featured-entry:hover{border-color:#657db6}
.blog-featured-main{padding:32px 36px 30px;min-width:0;display:flex;flex-direction:column}
.blog-feature-top{display:flex;align-items:center;gap:10px;color:#8494c5;font:9px var(--blog-mono);letter-spacing:1px;margin-bottom:26px}
.blog-feature-marker{color:#87bdff;font-size:24px;line-height:1}
.blog-feature-index{color:#6f7fae;margin-left:auto}
.blog-card-tags{display:flex;flex-wrap:wrap;gap:7px}
.blog-topic{display:inline-flex;align-items:center;padding:6px 9px;border-radius:3px;background:#162040;border:1px solid #3b4b80;font:9px/1.3 var(--blog-mono);color:#a9c8fc;max-width:100%;overflow-wrap:anywhere}
.blog-featured-main h3{font-weight:600;line-height:1.25;letter-spacing:-1.2px;font-size:clamp(23px,2.25vw,32px);color:#edf2ff;margin:20px 0 12px}
.blog-featured-main h3 a,.blog-research-card h3 a{color:inherit;text-decoration:none}
.blog-featured-main h3 a:hover,.blog-research-card h3 a:hover{color:#99c8ff}
.blog-featured-main>p{color:#a4b1d7;line-height:1.8;font-size:13px;margin:0 0 23px}
.blog-featured-bottom{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-top:auto;padding-top:22px;border-top:1px solid #303b62}
.blog-read-link{font-weight:600;font-size:12px;color:#8fc0ff;white-space:nowrap}
.blog-read-link span{margin-left:8px}
.blog-notebook-visual{border-left:1px solid #333c65;background:#0b1125;min-width:0;display:flex;flex-direction:column}
.blog-notebook-bar{height:45px;background:#111831;border-bottom:1px solid #323b62;display:flex;align-items:center;gap:6px;padding:0 18px}
.blog-notebook-bar>span{width:6px;height:6px;border:1px solid #6676ad;border-radius:50%}
.blog-notebook-bar strong{font:9px var(--blog-mono);color:#8295c7;margin-left:auto;letter-spacing:.6px}
.blog-notebook-lines{padding:25px 24px 18px;flex:1;display:flex;flex-direction:column;justify-content:center}
.blog-notebook-cell{display:grid;grid-template-columns:48px 1fr;gap:10px;padding:14px 0;min-width:0}
.blog-notebook-cell small{font:10px var(--blog-mono);color:#6177ae;padding-top:4px}
.blog-notebook-cell>div{min-width:0}
.blog-notebook-cell .line{height:6px;border-radius:2px;display:block;margin:8px 0;background:linear-gradient(90deg,#7a9ed1,#465181);opacity:.8}
.blog-notebook-cell .line.code-a{width:69%}.blog-notebook-cell .line.code-b{width:85%;background:linear-gradient(90deg,#8077bc,#51558a)}.blog-notebook-cell .line.code-c{width:46%;background:#526e9e}
.blog-mini-plot{background:#0e1730;border:1px solid #253454;border-radius:5px;padding:12px 9px}
.blog-mini-plot svg{width:100%;height:96px;display:block}
.blog-notebook-caption{color:#6478a4;font:8px var(--blog-mono);letter-spacing:.5px;margin-top:15px}

/* Library: neat, dense research panels */
.blog-library{padding-bottom:105px;scroll-margin-top:110px}
.blog-library-heading{margin-bottom:23px}
.blog-library-toolbar{border:1px solid #31395e;background:#0d1328;border-radius:7px;padding:13px 16px;display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:20px}
.blog-search{width:min(100%,490px);display:flex;align-items:center;gap:11px;border:1px solid #36436f;background:#111930;border-radius:5px;min-height:43px;padding:0 13px;color:#78b9fa}
.blog-search>span:first-child{font-size:25px;line-height:1}
.blog-search input{flex:1;min-width:0;color:#eef2ff;background:transparent;border:0;outline:0!important;font:12px var(--blog-font)}
.blog-search input::placeholder{color:#7e8db9}
.blog-search:focus-within{border-color:#7bb5ef;box-shadow:0 0 0 2px #4d88d533}
.blog-search-key{font:9px var(--blog-mono);color:#7183b2;letter-spacing:.4px}
.blog-result-count{font:10px var(--blog-mono);color:#8d9ec8;white-space:nowrap}
.blog-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.blog-research-card{min-width:0;background:#0c1023;border:1px solid #31375f;border-radius:8px;padding:24px 24px 23px;display:flex;flex-direction:column;min-height:294px;transition:background .16s,border-color .16s,transform .16s}
.blog-research-card:hover{background:#101731;border-color:#5b6da0;transform:translateY(-3px)}
.blog-card-head{display:flex;justify-content:space-between;gap:12px;align-items:center;color:#7a8ab4;font:9px var(--blog-mono);letter-spacing:.55px;margin-bottom:18px}
.blog-card-symbol{color:#7aaff5;font:19px var(--blog-mono)}
.blog-research-card h3{font-size:19px;letter-spacing:-.55px;line-height:1.35;font-weight:600;color:#e4ebff;margin:17px 0 10px}
.blog-research-card>p{font-size:12px;line-height:1.76;color:#99a6ce;margin:0 0 20px}
.blog-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid #2d3458;padding-top:17px;margin-top:auto}
.blog-card-footer>a{color:#85baff;white-space:nowrap;font-size:11px;font-weight:600}
.blog-card-footer>a span{margin-left:6px}
.blog-no-results,.blog-empty-state{text-align:center;padding:70px 20px;border:1px dashed #3b446b;background:#0c1125;border-radius:8px}
.blog-no-results>span,.blog-empty-state>span{color:#7daffc;font-size:33px}
.blog-no-results h3,.blog-empty-state h3{font-weight:600;font-size:20px;color:#e4ebff;margin:12px 0 6px}
.blog-no-results p,.blog-empty-state p{color:#98a6cf;font-size:13px}
.blog-empty-state a{margin-top:10px}
.blog-research-cta{border-top:1px solid #293159;border-bottom:1px solid #293159;background:linear-gradient(130deg,#111833,#090e23)}
.blog-research-cta-inner{display:flex;align-items:center;justify-content:space-between;gap:30px;padding-top:66px;padding-bottom:70px}
.blog-research-cta h2{color:#e8ecff;font-size:clamp(27px,3vw,40px);letter-spacing:-1.3px;line-height:1.2;font-weight:600;margin:12px 0}
.blog-research-cta h2 span{color:#77bbff}
.blog-research-cta p{font-size:12px;line-height:1.8;color:#9aa8d0;max-width:470px;margin:0}
.blog-cta-actions{display:flex;gap:11px;flex-wrap:wrap;justify-content:flex-end}

/* Individual article / notebook reader */
.blog-reading-progress{height:2px;width:100%;position:fixed;top:0;left:0;z-index:100;pointer-events:none}
.blog-reading-progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,#5b68e1,#77bbff)}
.blog-article-container{padding-top:45px;padding-bottom:95px}
.blog-article-crumbs{margin-bottom:25px}
.blog-back-link{color:#85baff!important;font-size:12px;display:inline-flex;align-items:center;gap:12px}
.blog-back-link>span{font:20px var(--blog-mono)}
.blog-article-hero{padding:38px 0 43px;max-width:1060px}
.blog-hero-separator{color:#495985;margin:0 2px}
.blog-article-hero h1{font-weight:600;font-size:clamp(36px,4.0vw,61px);line-height:1.115;letter-spacing:-2.7px;color:#edf1ff;margin:17px 0 18px;overflow-wrap:anywhere}
.blog-article-deck{font-size:clamp(14px,1.36vw,18px);color:#a6b4dc;line-height:1.8;max-width:800px;margin:0 0 22px}
.blog-article-meta{display:flex;align-items:center;flex-wrap:wrap;gap:11px;font:10px var(--blog-mono);color:#8b9bc7;letter-spacing:.25px}
.blog-article-date{display:flex;align-items:center;gap:9px}
.blog-article-date span{color:#8bbfff;font:16px var(--blog-font)}
.blog-meta-divider{width:3px;height:3px;border-radius:50%;background:#626d9e}
.blog-article-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:24px}
.blog-article-layout{display:grid;grid-template-columns:minmax(0,1fr) 254px;align-items:start;gap:24px}
.blog-article-primary{min-width:0}
.blog-article-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:12px 19px;min-height:49px;background:#121831;border:1px solid #3b456d;border-bottom:0;border-radius:8px 8px 0 0;color:#a3b3da;font:9px var(--blog-mono);letter-spacing:.55px}
.blog-article-toolbar>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.blog-toolbar-square{color:#88c4ff;font-size:20px}
.blog-toolbar-separator{color:#56658d}
.blog-toolbar-muted{color:#7888b5}
.blog-code-toggle{border:1px solid #424f78;border-radius:4px;padding:7px 11px;background:#192240;color:#bdd6fd;font:10px var(--blog-mono)}
.blog-code-toggle:hover{background:#233054;border-color:#6a85bb}
.blog-article-primary>.post-surface{border-radius:0 0 8px 8px;box-shadow:0 20px 50px #0004;border:1px solid #bfcbe0}
.blog-article-aside{position:sticky;top:100px;display:grid;gap:15px}
.blog-aside-panel{border:1px solid #343c65;background:#0c1126;border-radius:7px;padding:19px 18px}
.blog-aside-label{font:9px var(--blog-mono);color:#87bfff;letter-spacing:1px;margin-bottom:17px}
.blog-toc-list{display:flex;flex-direction:column;gap:4px;max-height:calc(100vh - 250px);overflow:auto;scrollbar-width:thin}
.blog-toc-list a{padding:9px 9px 9px 11px;border-left:2px solid #343e66;color:#9cadd6;font-size:11px;line-height:1.5;overflow-wrap:anywhere;transition:border-color .15s,background .15s,color .15s}
.blog-toc-list a:hover,.blog-toc-list a.active{color:#cce2ff;border-left-color:#85bdff;background:#141d3b}
.blog-toc-list a.is-subheading{padding-left:22px;color:#8294bf;font-size:10px}
.blog-toc-loading{font-size:11px;line-height:1.6;color:#7586b4}
.blog-side-promo{background:linear-gradient(142deg,#161f40,#0b122a)}
.blog-side-promo-glyph{font-size:32px;color:#81bcff;margin:5px 0 10px}
.blog-side-promo h2{font-size:19px;letter-spacing:-.7px;line-height:1.24;color:#e6edff;font-weight:600;margin:0 0 10px}
.blog-side-promo p{color:#9aaad1;font-size:11px;line-height:1.8;margin:0 0 15px}
.blog-side-promo a{font-size:11px;color:#8ac0ff;display:flex;align-items:center;justify-content:space-between}
.blog-aside-all{color:#88bfff;text-decoration:none;font-size:11px;padding:8px 3px}
.blog-end-note{display:flex;align-items:center;gap:14px;margin-top:24px;padding:21px 23px;background:#101831;border:1px solid #313d6b;border-radius:7px}
.blog-end-mark{color:#82bcff;font-size:27px}
.blog-end-note>div{flex:1}
.blog-end-note strong{color:#e3e9ff;font-size:12px}
.blog-end-note p{font-size:11px;color:#96a5cf;margin:5px 0 0;line-height:1.6}
.blog-end-note>a{font-size:11px;white-space:nowrap;color:#8ac1ff}

/* Notebook content: deliberately *light* and scoped. Retained from the
   existing nbconvert compatibility layer: JupyterLab/classic Notebook cells,
   Pygments, tables, pandas DataFrames, MathJax, Matplotlib/Plotly, widgets.
   This is the article paper only — not the global site theme. */
/* Light notebook surface */

.post-surface {
  color-scheme: light;

  --bs-body-color: var(--notebook-text);
  --bs-body-bg: var(--notebook-bg);
  --bs-border-color: var(--notebook-border);
  --bs-heading-color: var(--notebook-heading);
  --bs-code-color: var(--notebook-link);

  --jp-content-font-color0: var(--notebook-heading);
  --jp-content-font-color1: var(--notebook-text);
  --jp-content-font-color2: var(--notebook-muted);
  --jp-content-font-color3: var(--notebook-muted);
  --jp-content-link-color: var(--notebook-link);
  --jp-content-font-family: var(--blog-font);

  --jp-ui-font-color0: var(--notebook-heading);
  --jp-ui-font-color1: var(--notebook-text);
  --jp-ui-font-color2: var(--notebook-muted);
  --jp-ui-font-color3: var(--notebook-muted);

  --jp-layout-color0: var(--notebook-bg);
  --jp-layout-color1: var(--notebook-bg);
  --jp-layout-color2: var(--notebook-code-bg);
  --jp-layout-color3: var(--notebook-header-bg);
  --jp-border-color1: var(--notebook-border);
  --jp-border-color2: var(--notebook-border);

  --jp-cell-editor-background: var(--notebook-code-bg);
  --jp-cell-editor-active-background: #edf2fc;
  --jp-cell-editor-border-color: var(--notebook-border);
  --jp-cell-inprompt-font-color: var(--notebook-muted);
  --jp-cell-outprompt-font-color: var(--notebook-muted);
  --jp-code-font-family: var(--blog-mono);

  --jp-mirror-editor-variable-color: var(--notebook-code-text);
  --jp-mirror-editor-variable-2-color: var(--syntax-function);
  --jp-mirror-editor-variable-3-color: var(--syntax-function);
  --jp-mirror-editor-comment-color: var(--syntax-comment);
  --jp-mirror-editor-keyword-color: var(--syntax-keyword);
  --jp-mirror-editor-string-color: var(--syntax-string);
  --jp-mirror-editor-string-2-color: var(--syntax-string);
  --jp-mirror-editor-number-color: var(--syntax-number);
  --jp-mirror-editor-operator-color: var(--syntax-operator);
  --jp-mirror-editor-punctuation-color: var(--syntax-operator);
  --jp-mirror-editor-def-color: var(--syntax-function);
  --jp-mirror-editor-builtin-color: var(--syntax-function);
  --jp-mirror-editor-atom-color: var(--syntax-keyword);
  --jp-mirror-editor-meta-color: var(--syntax-comment);
  --jp-mirror-editor-property-color: var(--syntax-function);
  --jp-mirror-editor-attribute-color: var(--syntax-function);
  --jp-mirror-editor-tag-color: var(--syntax-keyword);
  --jp-mirror-editor-error-color: var(--syntax-error);

  min-width: 0;
  color: var(--notebook-text) !important;
  background: var(--notebook-bg) !important;
  border: 1px solid var(--notebook-border);
  border-radius: 12px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, .25);
  font-family: var(--blog-font);
  line-height: 1.76;
  overflow-wrap: break-word;
}

.post-surface.p-4 {
  padding: 2.5rem !important;
}

.post-surface > :first-child {
  margin-top: 0;
}

.post-surface > :last-child {
  margin-bottom: 0;
}

.post-surface ::selection {
  color: #172b55;
  background: #d5e4ff;
}

.post-surface :where(a, button, summary, input, select):focus-visible {
  outline-color: var(--notebook-link);
}

/* Notebook wrappers */

.post-surface :is(
  .jp-Notebook,
  .jp-Cell,
  .jp-MarkdownCell,
  .jp-CodeCell,
  .jp-RenderedHTMLCommon,
  .jp-Cell-outputWrapper,
  .jp-OutputArea,
  .jp-OutputArea-output,
  .text_cell,
  .text_cell_render,
  .cell,
  .output_wrapper,
  .output,
  .output_area,
  .output_html,
  .rendered_html
) {
  color: var(--notebook-text) !important;
  background: transparent !important;
  box-shadow: none;
}

.post-surface .jp-Notebook {
  padding: 0;
}

.post-surface :is(.jp-Cell, .cell) {
  min-width: 0;
  margin: 0 0 1.25rem;
}

.post-surface :is(
  .jp-RenderedHTMLCommon,
  .text_cell_render,
  .rendered_html
) {
  font-family: var(--blog-font);
  line-height: 1.76;
}

/* Notebook prose and headings */

.post-surface :is(p, li) {
  color: var(--notebook-text) !important;
}

.post-surface p {
  margin-bottom: 1.05rem;
}

.post-surface li {
  margin-bottom: .3rem;
}

.post-surface :is(ul, ol) {
  padding-left: 1.6rem;
}

.post-surface :is(strong, b) {
  color: var(--notebook-heading);
}

.post-surface em {
  color: var(--notebook-text);
}

.post-surface :is(h1, h2, h3, h4, h5, h6),
.post-surface :is(
  .jp-RenderedHTMLCommon,
  .text_cell_render,
  .rendered_html
) :is(h1, h2, h3, h4, h5, h6) {
  color: var(--notebook-heading) !important;
  font-family: var(--blog-font);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.post-surface h1 {
  margin: 1.9rem 0 1rem;
  font-size: 2.35rem;
}

.post-surface h2 {
  margin: 2.1rem 0 .9rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--notebook-border);
  font-size: 1.7rem;
}

.post-surface h3 {
  margin: 1.7rem 0 .7rem;
  font-size: 1.25rem;
}

.post-surface h4 {
  margin: 1.5rem 0 .6rem;
  font-size: 1.05rem;
}

.post-surface :is(h5, h6) {
  margin: 1.2rem 0 .5rem;
  font-size: .95rem;
}

.post-surface a {
  color: var(--notebook-link);
  text-decoration: underline;
  text-decoration-color: rgba(36, 85, 173, .35);
}

.post-surface a:hover {
  color: #163a7a;
  text-decoration-color: currentColor;
}

.post-surface hr {
  margin: 1.7rem 0;
  border: 0;
  border-top: 1px solid var(--notebook-border);
  opacity: 1;
}

.post-surface blockquote {
  margin: 1.5rem 0;
  padding: .7rem 1.2rem;
  color: var(--notebook-text);
  background: #f1f5fc;
  border-left: 3px solid #476ab2;
  border-radius: 0 7px 7px 0;
}

.post-surface blockquote p:last-child {
  margin-bottom: 0;
}

.post-surface .anchor-link {
  margin-left: .35rem;
  opacity: .5;
}

.post-surface :is(h1, h2, h3, h4, h5, h6):hover .anchor-link,
.post-surface .anchor-link:focus-visible {
  opacity: 1;
}

/* Inline code */

.post-surface :not(pre) > code {
  padding: .13rem .33rem;
  color: #254d89;
  background: #edf2fa;
  border: 1px solid #dce4f1;
  border-radius: 4px;
  font: .85em var(--blog-mono);
  overflow-wrap: anywhere;
}

.post-surface kbd {
  padding: .15rem .35rem;
  color: #24324d;
  background: #e9eef7;
  border: 1px solid #c7d2e3;
  border-radius: 4px;
  font-family: var(--blog-mono);
}

/* Notebook cell prompts */

.post-surface :is(
  .prompt,
  .input_prompt,
  .output_prompt,
  .jp-InputPrompt,
  .jp-OutputPrompt
) {
  color: var(--notebook-muted) !important;
  font: .72rem/1.6 var(--blog-mono) !important;
  opacity: 1;
}

/* Code input containers */

.post-surface :is(
  .jp-InputArea-editor,
  .jp-InputArea,
  .input_area,
  .code_cell .input
) {
  min-width: 0;
  max-width: 100%;
  color: var(--notebook-code-text) !important;
  background: var(--notebook-code-bg) !important;
  border: 1px solid var(--notebook-border) !important;
  border-radius: 7px;
  box-shadow: none !important;
}

.post-surface .code_cell .input .input_area,
.post-surface .jp-InputArea .jp-InputArea-editor {
  background: transparent !important;
  border: 0 !important;
}

/* Code blocks */

.post-surface pre,
.post-surface .highlight pre,
.post-surface .jp-InputArea-editor pre {
  max-width: 100%;
  margin: .9rem 0;
  padding: 1rem 1.15rem;
  overflow: auto;
  color: var(--notebook-code-text) !important;
  background: var(--notebook-code-bg) !important;
  border: 1px solid var(--notebook-border);
  border-radius: 7px;
  font: .83rem/1.7 var(--blog-mono);
  tab-size: 4;
  white-space: pre;
  overflow-wrap: normal;
}

.post-surface .input_area pre,
.post-surface .jp-InputArea pre,
.post-surface .code_cell .input pre,
.post-surface details.collapsible-code pre {
  margin: 0;
  background: transparent !important;
  border: 0;
  border-radius: 0;
}

.post-surface pre code,
.post-surface .highlight code {
  padding: 0 !important;
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  font: inherit;
  white-space: inherit;
  overflow-wrap: normal;
}

.post-surface :is(.highlight, .hljs) {
  color: var(--notebook-code-text) !important;
  background: transparent !important;
}

.post-surface pre code.hljs {
  display: block;
  overflow-x: visible;
}

/* Scoped token colors override dark Pygments and highlight.js themes. */

.post-surface :is(.highlight, .hljs) span {
  color: var(--notebook-code-text) !important;
}

.post-surface .highlight :is(.c, .ch, .cm, .cp, .cpf, .c1, .cs),
.post-surface .hljs :is(.hljs-comment, .hljs-quote, .hljs-meta) {
  color: var(--syntax-comment) !important;
  font-style: italic;
}

.post-surface .highlight :is(.k, .kc, .kd, .kn, .kp, .kr, .kt),
.post-surface .hljs :is(.hljs-keyword, .hljs-literal, .hljs-selector-tag) {
  color: var(--syntax-keyword) !important;
  font-weight: 600;
}

.post-surface .highlight :is(
  .s, .sa, .sb, .sc, .dl, .sd, .s1, .s2,
  .se, .sh, .si, .sx, .sr, .ss
),
.post-surface .hljs :is(
  .hljs-string,
  .hljs-regexp,
  .hljs-doctag,
  .hljs-template-tag,
  .hljs-template-variable
) {
  color: var(--syntax-string) !important;
}

.post-surface .highlight :is(.m, .mb, .mf, .mh, .mi, .mo, .il),
.post-surface .hljs :is(.hljs-number, .hljs-symbol, .hljs-bullet) {
  color: var(--syntax-number) !important;
}

.post-surface .highlight :is(.nf, .fm, .nc, .nd, .nb, .bp),
.post-surface .hljs :is(
  .hljs-title,
  .hljs-built_in,
  .hljs-type,
  .hljs-attr,
  .hljs-attribute,
  .hljs-property,
  .hljs-name
) {
  color: var(--syntax-function) !important;
}

.post-surface .highlight :is(.o, .ow, .p, .pm),
.post-surface .hljs :is(.hljs-operator, .hljs-punctuation) {
  color: var(--syntax-operator) !important;
}

.post-surface .highlight :is(.err, .gr, .gt),
.post-surface .hljs .hljs-deletion {
  color: var(--syntax-error) !important;
  background: #fff0f1;
}

.post-surface .highlight .hll {
  background: #e7eefb;
}

.post-surface .hljs .hljs-addition {
  color: var(--syntax-string) !important;
  background: #ecf8ee;
}

.post-surface .hljs .hljs-section {
  color: var(--notebook-heading) !important;
  font-weight: 700;
}

.post-surface .hljs .hljs-emphasis {
  font-style: italic;
}

.post-surface .hljs .hljs-strong {
  font-weight: 700;
}

/* Collapsible code headers */

.post-surface details.collapsible-code {
  margin: .85rem 0;
  overflow: hidden;
  background: var(--notebook-code-bg);
  border: 1px solid var(--notebook-border);
  border-radius: 8px;
}

.post-surface details.collapsible-code > summary {
  padding: .7rem 1rem;
  color: var(--notebook-header-text) !important;
  background: var(--notebook-header-bg) !important;
  font: 600 .75rem/1.6 var(--blog-mono);
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.post-surface details.collapsible-code > summary::-webkit-details-marker {
  display: none;
}

.post-surface details.collapsible-code > summary::before {
  display: inline-block;
  margin-right: .7rem;
  color: var(--notebook-header-text);
  content: '\25B8';
  transition: transform .16s ease;
}

.post-surface details.collapsible-code[open] > summary {
  border-bottom: 1px solid var(--notebook-border);
}

.post-surface details.collapsible-code[open] > summary::before {
  transform: rotate(90deg);
}

.post-surface details.collapsible-code > summary:hover {
  color: #172f61 !important;
  background: var(--notebook-header-hover) !important;
}

.post-surface details.collapsible-code > :is(
  .input,
  .input_area,
  .jp-Cell-inputWrapper,
  .jp-InputArea,
  pre
) {
  margin: 0;
  background: var(--notebook-code-bg) !important;
  border: 0 !important;
  border-radius: 0;
}

/* Text and structured outputs */

.post-surface :is(
  .output_area,
  .output_subarea,
  .jp-OutputArea,
  .jp-OutputArea-output
) {
  min-width: 0;
  max-width: 100%;
}

.post-surface .output_scroll {
  max-height: 520px;
  overflow: auto;
}

.post-surface :is(.output_text, .jp-RenderedText) {
  overflow-x: auto;
  color: var(--notebook-text) !important;
  font: .83rem/1.6 var(--blog-mono);
  white-space: pre-wrap;
}

.post-surface .output_text pre,
.post-surface .jp-RenderedText pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-surface .stdout {
  color: var(--notebook-text);
}

.post-surface :is(.stderr, .ansi-red-fg) {
  color: var(--syntax-error) !important;
}

/* Notebook tables */

.post-surface table {
  --bs-table-color: var(--notebook-text);
  --bs-table-bg: var(--notebook-bg);
  --bs-table-striped-color: var(--notebook-text);
  --bs-table-striped-bg: #f5f7fc;
  --bs-table-hover-color: var(--notebook-text);
  --bs-table-hover-bg: #eaf0fc;
  --bs-table-border-color: var(--notebook-border);

  display: block;
  max-width: 100%;
  margin: 1.1rem 0 1.5rem;
  overflow-x: auto;
  color: var(--notebook-text) !important;
  background: var(--notebook-bg) !important;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: .85rem;
  line-height: 1.5;
}

.post-surface table :is(th, td) {
  padding: .6rem .75rem;
  color: var(--notebook-text) !important;
  background-color: var(--notebook-bg);
  border: 1px solid var(--notebook-border);
  vertical-align: top;
  white-space: normal;
}

.post-surface table thead th {
  color: var(--notebook-header-text) !important;
  background-color: var(--notebook-header-bg);
  border-bottom: 1px solid #c5d1e5;
  font-weight: 600;
}

.post-surface table tbody tr:nth-child(even) > :is(td, th) {
  background-color: #f5f7fc;
}

.post-surface table tbody tr:hover > :is(td, th) {
  background-color: #eaf0fc;
}

.post-surface table.dataframe {
  font-family: var(--blog-mono);
  font-size: .75rem;
}

.post-surface table.dataframe tbody th {
  font-weight: 600;
}

/* Math tables must not inherit DataFrame borders or striping. */

.post-surface :is(mjx-container, .MathJax) table {
  display: table;
  max-width: none;
  margin: 0;
  overflow: visible;
  font-size: inherit;
  line-height: inherit;
}

.post-surface :is(mjx-container, .MathJax) :is(
  table, thead, tbody, tr, th, td
) {
  color: inherit !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.post-surface :is(mjx-container, .MathJax) :is(th, td) {
  padding: 0;
  vertical-align: baseline;
  white-space: nowrap;
}

.post-surface :is(.MathJax, .MathJax_Display, mjx-container) {
  color: var(--notebook-text);
}

.post-surface .MathJax_Display,
.post-surface mjx-container[display='true'] {
  max-width: 100%;
  margin: 1.25rem 0;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Plots and media retain their authored colors. */

.post-surface :is(img, video) {
  max-width: 100%;
  height: auto;
}

.post-surface img {
  border-radius: 5px;
}

.post-surface svg {
  max-width: 100%;
}

.post-surface :is(img, svg, canvas) {
  filter: none !important;
}

.post-surface figure {
  max-width: 100%;
  margin: 1.5rem auto;
}

.post-surface figcaption {
  margin-top: .5rem;
  color: var(--notebook-muted);
  font-size: .8rem;
  text-align: center;
}

.post-surface :is(.output_png, .output_svg, .jp-RenderedImage) {
  max-width: 100%;
  overflow-x: auto;
}

.post-surface :is(.plotly-graph-div, .js-plotly-plot, .vega-embed) {
  max-width: 100%;
}

.post-surface iframe {
  max-width: 100%;
  border: 1px solid var(--notebook-border);
  border-radius: 7px;
}

/* Notebook callouts */

.post-surface :is(.alert, .admonition) {
  padding: .9rem 1.1rem;
  color: var(--notebook-text);
  background: #f1f5fc;
  border: 1px solid var(--notebook-border);
  border-left: 3px solid #476ab2;
  border-radius: 7px;
}

.post-surface .alert-info {
  border-left-color: #2455ad;
}

.post-surface .alert-warning {
  border-left-color: #946200;
}

.post-surface .alert-danger {
  border-left-color: var(--syntax-error);
}

.post-surface .alert-success {
  border-left-color: var(--syntax-string);
}

.post-surface .footnotes {
  padding-top: 1rem;
  color: var(--notebook-muted);
  border-top: 1px solid var(--notebook-border);
  font-size: .83rem;
}


/* Final reader adjustments: native form controls and output plots on white. */
.post-surface{color-scheme:light;scroll-margin-top:110px}
.post-surface :is(.jp-OutputArea,.output_area) :is(.plotly,.js-plotly-plot,.vega-embed){max-width:100%;min-width:0}
.post-surface .js-plotly-plot .plotly .main-svg{max-width:none}
.post-surface :is(.jp-RenderedHTMLCommon,.text_cell_render,.rendered_html) :is(h2,h3){scroll-margin-top:110px}
.post-surface .jp-Notebook .jp-Cell .jp-Cell-inputWrapper{min-width:0}
.post-surface .jp-OutputArea-output iframe{max-width:100%}
.post-surface details.collapsible-code>*:not(summary){max-width:100%}

@media(max-width:1230px){
  .blog-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .blog-article-layout{grid-template-columns:minmax(0,1fr) 220px;gap:17px}
  .blog-article-primary>.post-surface.p-4{padding:1.8rem!important}
}
@media(max-width:1030px){
  .blog-index-hero-grid{grid-template-columns:minmax(0,1fr);gap:35px}
  .blog-index-hero-copy>p{max-width:700px}
  .blog-index-console{max-width:800px;width:100%}
  .blog-research-cta-inner{align-items:flex-start;flex-direction:column}
  .blog-cta-actions{justify-content:flex-start}
  .blog-article-layout{grid-template-columns:minmax(0,1fr)}
  .blog-article-aside{position:static;grid-template-columns:1fr 1fr}
  .blog-toc-list{max-height:290px}
  .blog-aside-all{grid-column:1/-1}
}
@media(max-width:700px){
  .blog-index-hero{padding-top:30px;padding-bottom:68px}
  .blog-crumbs{margin-bottom:28px}
  .blog-index-hero h1{font-size:clamp(40px,9vw,52px);letter-spacing:-2.7px}
  .blog-index-hero-copy>p{font-size:14px}
  .blog-hero-points{flex-direction:column;gap:10px}
  .blog-index-console{max-width:100%}
  .blog-console-body{padding:24px 20px}
  .blog-section-heading{align-items:flex-start;flex-direction:column;gap:10px}
  .blog-section-heading>p{max-width:520px}
  .blog-feature-section{padding-bottom:70px}
  .blog-featured-entry{grid-template-columns:1fr}
  .blog-featured-main{padding:26px 23px}
  .blog-notebook-visual{border-left:0;border-top:1px solid #343d65}
  .blog-notebook-lines{padding:14px 22px 18px}
  .blog-card-grid{grid-template-columns:1fr}
  .blog-research-card{min-height:0}
  .blog-library-toolbar{padding:10px}
  .blog-search-key{display:none}
  .blog-library{padding-bottom:70px}
  .blog-research-cta-inner{padding-top:56px;padding-bottom:60px}
  .blog-article-container{padding-top:27px;padding-bottom:70px}
  .blog-article-hero{padding:29px 0 32px}
  .blog-article-hero h1{font-size:clamp(31px,7.7vw,44px);letter-spacing:-1.8px}
  .blog-article-meta{font-size:9px}
  .blog-article-primary>.post-surface.p-4{padding:1.15rem!important}
  .blog-article-toolbar{padding:12px;gap:9px}
  .blog-toolbar-muted{display:none}
  .blog-article-aside{grid-template-columns:1fr}
  .blog-toc-list{max-height:320px}
  .blog-end-note{align-items:flex-start;flex-wrap:wrap}
  .blog-end-note>a{width:100%;margin-left:40px}
  .post-surface :is(.prompt,.input_prompt,.output_prompt,.jp-InputPrompt,.jp-OutputPrompt){display:none}
  .post-surface h1{font-size:1.8rem}
  .post-surface h2{font-size:1.35rem}
  .post-surface pre,.post-surface .highlight pre,.post-surface .jp-InputArea-editor pre{padding:.8rem;font-size:.73rem}
  .post-surface :is(.output_text,.jp-RenderedText){font-size:.73rem}
  .post-surface table{font-size:.75rem}
  .post-surface table :is(th,td){padding:.45rem .55rem}
  .post-surface :is(mjx-container,.MathJax) :is(th,td){padding:0}
}
@media(max-width:390px){
  .blog-article-toolbar>div{font-size:8px}
  .blog-featured-bottom{align-items:flex-start;flex-direction:column}
  .blog-search{width:100%}
  .blog-result-count{font-size:9px}
}
@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}
@media print{
  body.em-blog{background:#fff!important;color:#111!important}
  .public-header,.blog-footer,.blog-reading-progress,.blog-crumbs,.blog-back-link,.blog-article-aside,.blog-article-toolbar,.blog-end-note{display:none!important}
  .blog-main,.blog-article-container,.blog-article-layout,.blog-article-primary{display:block!important;width:100%!important;max-width:none!important;padding:0!important;margin:0!important}
  .blog-article-hero h1,.blog-article-deck,.blog-article-meta{color:#111!important}
  .blog-article-primary>.post-surface{color:#111!important;background:#fff!important;box-shadow:none!important;border:0!important;padding:0!important}
  .post-surface details.collapsible-code{break-inside:avoid}
  .post-surface pre{white-space:pre-wrap;overflow-wrap:anywhere}
}
