@charset "UTF-8";

:root {
  color-scheme: dark;
  --paper: #101217;
  --surface: #171a21;
  --wash: #1d212a;
  --ink: #edf0f5;
  --muted: #a0a9b9;
  --rule: #303641;
  --accent: #91baff;
  --green: #91dbba;
  --amber: #eac17d;
  --rust: #c9b2ff;
  --python: #93caff;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: #c9dcff; }
a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 23px; border-bottom: 1px solid var(--rule); }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 650; letter-spacing: -.4px; text-decoration: none; }
.mark { display: inline-grid; place-items: center; width: 27px; height: 27px; border: 1px solid #657dab; border-radius: 7px; color: var(--accent); }
nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav [aria-current] { color: var(--ink); }
nav [aria-current] { text-decoration: underline; text-underline-offset: 8px; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.035em; font-weight: 600; }
h1 { font-size: clamp(34px, 5vw, 60px); margin: 0 0 22px; }
h2 { font-size: 24px; margin: 1.8em 0 .75em; }
h3 { font-size: 19px; margin: 1.5em 0 .6em; }
.eyebrow, .label { font: 11px/1.7 var(--mono); text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); }
.eyebrow { margin: 0 0 18px; }
.meta { color: var(--muted); font: 12px/1.6 var(--mono); }
.lede { color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 640px; }
.hero { display: grid; grid-template-columns: 1.6fr 1fr; align-items: start; gap: 72px; padding: 78px 0 70px; }
.hero h1 { max-width: 680px; }
.hero .lede { margin-bottom: 28px; max-width: 570px; }
.arrow-link { font-size: 13px; font-weight: 500; text-decoration: none; }
.margin-note { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 26px; }
.margin-note h2 { margin: 14px 0; font-size: 25px; }
.margin-note p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.margin-note .label { color: var(--green); }
.orbit { display: block; width: 100%; height: 75px; color: var(--accent); margin-bottom: 18px; }
.section-heading { border-top: 1px solid var(--rule); display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding-top: 22px; margin-bottom: 8px; }
.section-heading h2 { font-size: 18px; margin: 0; }
.entry { display: grid; grid-template-columns: 145px 1fr; gap: 25px; padding: 27px 0; border-bottom: 1px solid var(--rule); }
.entry h2, .entry h3 { font-size: 23px; margin: 0 0 12px; }
.entry h2 a, .entry h3 a { color: var(--ink); text-decoration: none; }
.entry p { color: var(--muted); max-width: 680px; font-size: 15px; margin: 0 0 14px; }
.entry .meta { font-size: 11px; padding-top: 5px; line-height: 1.9; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--surface); color: var(--muted); padding: 3px 9px; border: 1px solid var(--rule); border-radius: 5px; font: 11px/1.6 var(--mono); text-decoration: none; }
.page { max-width: 790px; margin: 52px auto 80px; }
.article-header { padding-bottom: 26px; margin-bottom: 30px; border-bottom: 1px solid var(--rule); }
.article-header h1 { font-size: clamp(30px, 4vw, 44px); }
.article-header .lede { font-size: 16px; margin-bottom: 0; }
.article-header .meta { margin-top: 22px; }
.prose { max-width: 740px; }
.prose p { margin: 0 0 1.25em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .5em; }
.prose blockquote { border-left: 2px solid var(--accent); padding: 8px 0 8px 22px; margin: 28px 0; color: var(--muted); }
.prose blockquote p:last-child { margin-bottom: 0; }
code { font: .85em/1.6 var(--mono); color: #c8d8f5; background: var(--wash); border-radius: 4px; padding: 2px 5px; overflow-wrap: anywhere; }
pre { padding: 20px; background: #14171e; border: 1px solid var(--rule); border-radius: 8px; overflow: auto; line-height: 1.65; }
pre code { color: #d3dbee; background: none; padding: 0; overflow-wrap: normal; }
pre.highlight { margin: 0; }
.highlighter-rouge { margin-bottom: 24px; }
.highlight .c, .highlight .c1, .highlight .cm { color: #91a0b4; }
.highlight .k, .highlight .kd, .highlight .kn { color: #c9b2ff; }
.highlight .s, .highlight .s1, .highlight .s2 { color: #91dbba; }
.highlight .nf, .highlight .nb { color: #93caff; }
table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; margin: 26px 0; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-size: 11px; font-weight: 500; background: var(--surface); }
.note { padding: 22px; background: var(--surface); border: 1px solid var(--rule); border-left: 2px solid var(--accent); border-radius: 7px; font-size: 14px; margin: 30px 0; }
.note p:last-child { margin-bottom: 0; }
.site-footer { border-top: 1px solid var(--rule); padding-block: 25px 35px; margin-top: 60px; display: flex; justify-content: space-between; gap: 20px; font-size: 11px; color: var(--muted); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer span { padding-inline: 8px; }
.skip { position: absolute; top: -100px; left: 20px; z-index: 10; background: var(--paper); padding: 10px; }
.skip:focus { top: 10px; }
mjx-container[display] { overflow-x: auto; overflow-y: hidden; padding-block: 8px; max-width: 100%; }


/* Compact public notes */
.idea-intro { max-width: 760px; padding: 44px 0 29px; }
.idea-intro h1 { font-size: clamp(30px, 4.2vw, 47px); line-height: 1.15; margin: 0 0 18px; }
.idea-intro p:not(.eyebrow) { max-width: 700px; color: var(--muted); font-size: 16px; line-height: 1.75; margin: 0; }
.idea-list { border-top: 1px solid var(--rule); }
.idea-feature { display: block; padding: 24px 0; text-decoration: none; max-width: 800px; }
.idea-feature h2 { margin: 9px 0 11px; font-size: 25px; }
.idea-feature p { margin: 0 0 13px; color: var(--muted); font-size: 15px; max-width: 690px; }
.read-link { font-size: 12px; color: var(--accent); }
.idea-threads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 20px 0 23px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.idea-threads h3 { font-size: 15px; margin: 0 0 7px; font-weight: 550; color: #c7d8f5; }
.idea-threads p { font-size: 12px; color: var(--muted); line-height: 1.75; margin: 0; }
.reading-note { max-width: 780px; font-size: 13px; color: var(--muted); margin: 25px 0; }
.reading-note p { margin: 0 0 10px; }
.page { margin-block: 36px 55px; }
.article-header { padding-bottom: 20px; margin-bottom: 24px; }
.article-header h1 { font-size: clamp(28px, 3.5vw, 39px); margin-bottom: 14px; }
.prose h2 { font-size: 21px; margin: 1.5em 0 .6em; }
.prose { font-size: 15px; line-height: 1.8; }
.prose p { margin-bottom: 1em; }
.site-footer { margin-top: 38px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; gap: 26px; padding-block: 40px; }
  .hero h1 br { display: none; }
  .orbit { display: none; }
  .margin-note h2 br { display: none; }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 36px); }
  .site-header { align-items: flex-start; flex-direction: column; gap: 15px; padding-block: 18px; }
  nav { gap: 20px; font-size: 11px; }
  body { font-size: 15px; line-height: 1.75; }
  .page { margin: 28px auto 45px; }
  .article-header h1 { font-size: 29px; }
  .article-header .lede { font-size: 15px; }
  .lede { font-size: 16px; }
  .entry { grid-template-columns: 1fr; gap: 6px; padding-block: 19px; }
  .entry h2, .entry h3 { font-size: 21px; }
  .site-footer { flex-direction: column; gap: 0; }
  .section-heading { align-items: flex-start; }
  pre { padding: 14px; }
  .idea-intro { padding-block: 30px 25px; }
  .idea-intro h1 { font-size: 34px; }
  .idea-intro h1 br { display: none; }
  .idea-feature h2 { font-size: 23px; }
  .idea-threads { gap: 20px; grid-template-columns: 1fr; padding-block: 18px; }
  .idea-threads > div { display: grid; grid-template-columns: 90px 1fr; align-items: baseline; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Measured profiles: one compact figure, three views of the same work. */
.profile-comparison { margin: 18px 0 26px; }
.profile-context { color: var(--muted); font-size: 13px; line-height: 1.7; }
.profile-tabs { display: flex; flex-wrap: wrap; gap: 5px; border-bottom: 1px solid var(--rule); padding-bottom: 9px; margin-bottom: 17px; }
.profile-tabs[hidden], .profile-plot[hidden] { display: none; }
.profile-tabs button { font: inherit; font-size: 12px; line-height: 1.5; padding: 7px 10px; background: transparent; border: 1px solid transparent; border-radius: 5px; color: var(--muted); cursor: pointer; }
.profile-tabs button[aria-selected="true"] { color: var(--ink); background: var(--wash); border-color: var(--rule); }
.profile-tabs button:hover { color: var(--ink); }
.profile-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.profile-plot { margin: 0; }
.profile-plot img { display: block; width: 100%; height: auto; }
.profile-plot figcaption, .profile-limit { font-size: 12px; line-height: 1.7; color: var(--muted); }
.profile-plot figcaption p { margin: 8px 0; }

/* Mesh-gradient band: a canvas hero for notes whose argument is about memory.
   The CSS backdrop shows until a frame has been drawn, so a device without
   WebGL 2 (or without scripting) still gets an intentional panel. */
.mesh-band {
  position: relative;
  margin: 26px 0 30px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(120% 160% at 18% 28%, rgba(145, 219, 186, .22), transparent 62%),
    radial-gradient(110% 150% at 78% 62%, rgba(201, 178, 255, .20), transparent 60%),
    radial-gradient(90% 130% at 52% 92%, rgba(147, 202, 255, .16), transparent 58%),
    var(--paper);
}
.mesh-band canvas { display: block; width: 100%; height: auto; aspect-ratio: 740 / 220; max-height: 170px; opacity: 0; transition: opacity .7s ease; }
.mesh-band[data-ready] canvas { opacity: 1; }
.mesh-band noscript img { display: block; width: 100%; height: auto; }
.mesh-band figcaption { padding: 10px 14px 12px; border-top: 1px solid var(--rule); background: var(--surface); font-size: 12px; line-height: 1.7; color: var(--muted); }
.mesh-band figcaption p { margin: 0 0 6px; }
.mesh-band-credit { display: block; margin-top: 6px; font: 11px/1.6 var(--mono); color: #6f7b8f; }
.mesh-band-credit a { color: #6f7b8f; }
.mesh-band-credit a:hover { color: var(--muted); }
.profile-scale { color: var(--ink); }
.profile-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 11px; }
.profile-links a { text-decoration: none; }
.profile-values { margin-block: 12px; }
.profile-values summary { cursor: pointer; }
.profile-values table { font-variant-numeric: tabular-nums; margin: 12px 0; font-size: 12px; }
.profile-values th, .profile-values td { padding: 8px 10px; }
.profile-limit { border-top: 1px solid var(--rule); padding-top: 12px; }
