:root {
  color-scheme: light;
  --paper: #faf9f6;
  --ink: #302f2c;
  --muted: #69665f;
  --line: #e6e3dc;
  --orange: #a84e1d;
  --surface: #f0eee8;
  --inline-code: #efede7;
  --link-line: #c8c3b8;
  --selection: #f2dcc5;
  --frame: #b7ab96;
  --control-line: #bdb7ac;
  --highlight: #f3dfbd40;
  --code-keyword: #965027;
  --code-string: #506b4c;
  --code-number: #695b95;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --serif: Georgia, "Times New Roman", serif;
}
@media screen {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #1e211f;
    --ink: #e8e5dc;
    --muted: #b0afa5;
    --line: #3b403a;
    --orange: #efa76d;
    --surface: #282d28;
    --inline-code: #30362e;
    --link-line: #71796b;
    --selection: #5a4230;
    --frame: #7b806f;
    --control-line: #747b6b;
    --highlight: #efa76d14;
    --code-keyword: #efb487;
    --code-string: #afc298;
    --code-number: #ceb6ee;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 32px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
::selection { background: var(--selection); }
a { color: inherit; text-decoration-color: var(--link-line); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--orange); text-decoration-color: currentColor; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 5px; border-radius: 1px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 500; }
img { max-width: 100%; height: auto; }
.site { max-width: 724px; padding: 0 32px; margin: 0 auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 60px 0 0; margin-bottom: 76px; font-size: 13px; }
.site-header a, .site-footer a, .social-links a { text-decoration: none; }
.site-header a, .site-footer a, .social-links a, .back-link { display: inline-flex; align-items: center; min-height: 36px; }
.site-header nav, .site-footer nav { display: flex; gap: 22px; }
.site-name { font-family: var(--mono); letter-spacing: -.5px; }
.site-name::after { content: ''; display: inline-block; width: 4px; height: 4px; margin-left: 8px; background: var(--orange); }
.site-header nav { color: var(--muted); margin-left: auto; }
.theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; padding: 9px; color: var(--muted); border: 0; background: transparent; border-radius: 50%; }
.theme-toggle:hover { color: var(--orange); background: var(--surface); }
.theme-toggle:active { transform: scale(.92); }
.theme-toggle svg { display: block; width: 18px; height: 18px; }
.theme-moon { display: none; }
[data-theme="dark"] .theme-sun { display: none; }
[data-theme="dark"] .theme-moon { display: block; }
.site-header [aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); }
.intro { display: grid; grid-template-columns: minmax(0, 1fr) 156px; column-gap: 30px; margin-bottom: 58px; }
.intro h1 { grid-column: 1; margin-bottom: 14px; font: 48px/1.2 var(--serif); letter-spacing: -1.7px; }
.intro > p { grid-column: 1; max-width: 390px; color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.social-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 21px; font-size: 13px; }
.cat-perch { grid-column: 2; grid-row: 1 / 3; position: relative; align-self: center; height: 144px; }
.perch-scene { position: absolute; inset: 0 6px 44px; border-bottom: 2px solid var(--frame); }
.perch-window { position: absolute; width: 96px; height: 84px; bottom: 0; right: 8px; color: var(--frame); }
.window-glass { fill: var(--surface); }
.window-frame { stroke: var(--frame); stroke-width: 1.5; }
.window-night { display: none; }
[data-theme="dark"] .window-day { display: none; }
[data-theme="dark"] .window-night { display: block; }
.perch-books { position: absolute; width: 32px; height: 40px; left: 10px; bottom: 0; }
.perch-cat { position: absolute; bottom: -2px; right: 6px; width: 48px; height: 48px; image-rendering: pixelated; }
.cat-awake { opacity: 0; }
.cat-wake { position: absolute; bottom: 0; left: 0; height: 44px; width: 100%; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; font: 11px/24px var(--mono); color: var(--muted); }
.cat-wake:hover { color: var(--orange); }
.cat-perch:not(.is-away):has(button:is(:hover, :focus-visible)) .cat-nap, .cat-perch.is-petted .cat-nap { opacity: 0; }
.cat-perch:not(.is-away):has(button:is(:hover, :focus-visible)) .cat-awake, .cat-perch.is-petted .cat-awake { opacity: 1; }
.cat-perch.is-away .perch-cat { opacity: 0; }
.cat-pet { position: absolute; bottom: 44px; right: 12px; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 5px; background: transparent; cursor: pointer; }
.cat-perch.is-away :is(.cat-pet, .pet-heart, .pet-message) { display: none; }
.pet-heart { position: absolute; right: 22px; bottom: 50px; width: 12px; height: 12px; color: var(--orange); opacity: 0; }
.is-petted .pet-heart { opacity: 1; animation: cat-heart 1.8s ease-out; }
.is-petted .cat-awake { transform: rotate(-7deg); transform-origin: bottom; }
.pet-message, .box-message { position: absolute; top: -14px; right: 0; padding: 0 5px; font: 10px/20px var(--mono); color: var(--muted); background: var(--paper); pointer-events: none; }
@keyframes cat-heart { 0% { transform: translateY(5px) scale(.8); } 35%, 80% { transform: translateY(-6px); } 100% { transform: translateY(-12px); opacity: 0; } }
.cat-wake:disabled { cursor: default; color: var(--muted); }
.perch-caption { position: absolute; bottom: 0; width: 100%; text-align: center; font: 11px/24px var(--mono); color: var(--muted); }
.social-links a:hover, .site-header a:hover, .site-footer a:hover { text-decoration: underline; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 23px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-heading h2 { font-size: 14px; margin: 0; }
.section-heading > span { font: 11px var(--mono); }
.quiet, .eyebrow { color: var(--muted); }
.year-group { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; margin-bottom: 22px; }
.year-label { margin: 0; padding-top: 8px; color: var(--muted); font: 11px/1.8 var(--mono); }
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li a { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 10px 0; min-height: 44px; text-decoration: none; font-size: 15px; line-height: 1.6; }
.post-list li a > span { position: relative; text-underline-offset: 4px; }
.post-list li a > span::before { content: ''; position: absolute; left: -18px; top: .6em; width: 6px; height: 6px; border-top: 1px solid var(--orange); border-right: 1px solid var(--orange); transform: rotate(45deg); opacity: 0; }
.post-list li a:is(:hover, :focus-visible) > span::before { opacity: 1; }
.post-list li a:hover > span { text-decoration: underline; }
.post-list time { flex-shrink: 0; font: 11px var(--mono); color: var(--muted); }
.writing-more { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.writing-more a, .cat-pick { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; }
.cat-pick { padding: 0; border: 0; background: transparent; color: var(--muted); font: 11px var(--mono); }
.cat-pick:hover { color: var(--orange); text-decoration: underline; text-underline-offset: 4px; }
.site-footer { margin-top: 68px; padding: 20px 0 110px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; color: var(--muted); font-size: 11px; }
.site-footer nav { gap: 18px; flex-wrap: wrap; }
.page-heading, .post-heading { margin-bottom: 40px; }
.page-heading h1 { font: 36px/1.3 var(--serif); letter-spacing: -.7px; margin-bottom: 10px; }
.page-heading p { font-size: 14px; color: var(--muted); }
.page-heading .eyebrow { font-family: var(--mono); font-size: 12px; }
.cat-box { --box-front: #d6b58b; --box-side: #bb9368; --box-flap: #e0c49d; --box-inside: #806449; --box-line: #957351; position: relative; width: 160px; height: 154px; margin: 14px 0 32px; }
.box-scene { position: relative; height: 110px; }
.box-drawing { position: absolute; width: 160px; height: 110px; inset: 0; }
.box-cat { position: absolute; width: 64px; height: 64px; left: 48px; top: 0; transform: translateY(23px); image-rendering: pixelated; }
.box-drawing { pointer-events: none; }
.is-open .box-cat { transform: translateY(-8px); }
.box-knock { position: absolute; inset: 0; padding: 0 0 8px; display: flex; align-items: flex-end; justify-content: center; border: 0; background: transparent; width: 100%; color: var(--muted); font: 11px/24px var(--mono); }
.box-knock:hover { color: var(--orange); }
.box-message { top: -22px; right: -18px; }
.pagination { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 36px; font-size: 12px; }
.pagination > span { min-width: 65px; }
.pagination > span:nth-child(2) { text-align: center; }
.pagination > span:last-child { text-align: right; }
.pagination a { display: inline-flex; align-items: center; min-height: 44px; }
.back-link { font-size: 12px; color: var(--muted); text-decoration: none; }
.post-heading h1 { margin: 24px 0 14px; font: clamp(30px, 4vw, 40px)/1.25 var(--serif); letter-spacing: -.8px; text-wrap: balance; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 11px; }
.prose { overflow-wrap: break-word; line-height: 1.85; font-size: 16px; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.4em; }
.prose h2 { font-size: 23px; letter-spacing: -.5px; line-height: 1.45; margin: 2em 0 .8em; }
.prose h3 { font-size: 18px; margin: 1.8em 0 .6em; }
.prose h4 { font-size: 16px; }
.prose a { overflow-wrap: anywhere; }
.prose li { margin: .35em 0; }
.prose img, .prose video { max-width: 100%; height: auto; display: block; margin: 1.5em auto; }
.prose iframe { max-width: 100%; }
.prose figure { margin: 24px 0; }
.prose figcaption { text-align: center; font-size: 12px; color: var(--muted); }
.prose blockquote { border-left: 2px solid var(--frame); padding-left: 24px; margin: 28px 0; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.table-scroll { overflow-x: auto; max-width: 100%; margin: 24px 0; }
.prose table { border-collapse: collapse; font-size: 13px; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.prose code { font-family: var(--mono); font-size: .82em; background: var(--inline-code); border-radius: 2px; padding: 2px 4px; }
.prose pre { overflow: auto; max-width: 100%; padding: 20px; background: var(--surface); border-radius: 3px; line-height: 1.7; font-size: 13px; tab-size: 4; }
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose .highlight { overflow: auto; background: var(--surface); border-radius: 3px; }
.prose .highlight pre { margin: 0; }
.prose .highlight table { width: max-content; min-width: 100%; }
.prose .highlight pre { overflow: visible; max-width: none; }
.prose .highlight td { padding: 0; border: 0; }
.prose .highlight .gutter { color: var(--muted); user-select: none; }
.prose .highlight .gutter pre { padding-right: 0; }
.prose .sourceCode { max-width: 100%; }
.prose .sourceCode .kw, .prose .sourceCode .cf, .prose .keyword { color: var(--code-keyword); }
.prose .sourceCode .st, .prose .string { color: var(--code-string); }
.prose .sourceCode .co, .prose .comment { color: var(--muted); }
.prose .sourceCode .dv, .prose .sourceCode .fl, .prose .number { color: var(--code-number); }
.prose .math.display, .prose mjx-container[display="true"] { display: block; overflow-x: auto; overflow-y: hidden; max-width: 100%; padding: 6px 0; }
.prose .js-plotly-plot { max-width: 100%; overflow: hidden; color-scheme: light; background: white; color: #302f2c; border-radius: 3px; }
.article-chart { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.article-chart .chart-title { padding: 12px 16px; color: var(--ink); background: var(--surface); font-size: 13px; text-align: left; }
.chart-canvas { width: 100%; height: 470px; }
.chart-status { padding: 16px; margin: 0 !important; color: var(--muted); font-size: 13px; }
.chart-retry { margin: 0 16px 16px; padding: 8px 14px; min-height: 44px; border: 1px solid var(--control-line); border-radius: 4px; background: var(--paper); }
.code-block { position: relative; }
.code-block pre { padding-top: 36px; }
.code-block .highlight pre { padding-top: 36px; }
.copy-code { position: absolute; top: 3px; right: 8px; min-width: 44px; min-height: 32px; border: 0; background: var(--surface); color: var(--muted); font-size: 11px; padding: 4px 8px; }
.copy-code:hover { color: var(--orange); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 40px; font-size: 11px; color: var(--muted); }
.post-neighbors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px; }
.post-neighbors a { display: flex; flex-direction: column; gap: 8px; text-decoration: none; font-size: 13px; }
.post-neighbors .quiet { font-size: 11px; }
.discussion { font-size: 13px; margin-top: 36px; }
summary { color: var(--muted); padding: 10px 0; min-height: 44px; }
summary:hover { color: var(--orange); }
.discussion[open] summary { margin-bottom: 20px; }
.post-contents { margin: -12px 0 32px; font-size: 13px; border-bottom: 1px solid var(--line); }
.post-contents ul { padding-left: 20px; list-style: none; }
.post-contents > nav > ul { padding-left: 0; }
.post-contents a { display: inline-block; padding: 7px 0; }
.comments-status { margin: 10px 0; }
.comments-retry, .search-retry { border: 1px solid var(--line); background: transparent; border-radius: 4px; padding: 8px 14px; min-height: 44px; font-size: 13px; }
.topic-list, .project-list, .search-results { list-style: none; margin: 0; padding: 0; }
.topic-list li a { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; text-decoration: none; font-size: 14px; border-bottom: 1px solid var(--line); }
.topic-list .quiet { font: 11px/2 var(--mono); }
.project-list li { margin-bottom: 28px; }
.project-list a { display: inline-block; padding: 8px 0; font-size: 15px; }
.project-list a span { color: var(--muted); font-size: 12px; }
.project-list p { font-size: 13px; margin: 6px 0 0; }
.bird { margin: 0 0 56px; }
.bird > a { display: block; }
.bird img { display: block; width: 100%; border-radius: 2px; }
.bird figcaption { margin-top: 16px; }
.bird h2 { margin: 0 0 5px; font-size: 16px; }
.bird p { margin-bottom: 8px; font-size: 13px; }
.bird .quiet { font-size: 11px; }
.bird details { font-size: 12px; margin-top: 14px; }
.bird details p { margin-top: 8px; }
.search input { width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--control-line); border-radius: 0; background: transparent; color: var(--ink); font-size: 18px; }
.search input::placeholder { color: var(--muted); }
.search-field { display: flex; gap: 16px; align-items: center; }
.search-field input { min-width: 0; }
.search-clear { border: 0; background: transparent; text-decoration: underline; text-underline-offset: 4px; min-width: 44px; min-height: 44px; padding: 0; font-size: 12px; }
#search-status { margin: 14px 0 12px; font-size: 13px; }
.search-browse { font-size: 13px; margin: 12px 0 32px; color: var(--muted); }
.search-results li { margin-bottom: 28px; }
.search-results a { font-size: 15px; }
.search-results p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; top: 8px; left: 8px; padding: 8px 14px; background: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.reading-guide { position: fixed; top: 50%; left: calc(50% + 398px); width: 44px; transform: translateY(-50%); z-index: 5; }
.reading-track { position: absolute; left: 5px; top: 0; height: calc(100% - 44px); width: 1px; background: var(--line); }
.reading-fill { display: block; width: 1px; height: var(--reading-progress, 0%); background: var(--orange); }
.reading-cat { position: absolute; width: 28px; height: 28px; max-width: none; left: -33px; top: var(--reading-progress, 0%); transform: translateY(-50%); image-rendering: pixelated; }
.reading-sections { display: flex; flex-direction: column; }
.reading-sections a { position: relative; display: flex; align-items: center; height: var(--section-height, 28px); min-height: 24px; padding-left: 5px; text-decoration: none; }
.reading-sections a::before { content: ''; width: 8px; height: 1px; background: var(--control-line); }
.reading-sections a[aria-current]::before { width: 15px; height: 2px; background: var(--orange); }
.reading-sections a > span { pointer-events: none; position: absolute; right: 100%; top: 50%; transform: translateY(-50%); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 5px 10px; width: max-content; max-width: 240px; font: 11px/1.5 var(--mono); color: var(--ink); opacity: 0; }
.reading-guide:not(.labels-hidden) .reading-sections a:is(:hover, :focus-visible) > span { opacity: 1; pointer-events: auto; }
.reading-top { min-height: 44px; display: flex; align-items: center; gap: 7px; color: var(--muted); font: 10px var(--mono); text-decoration: none; }
.is-cat-mode .reading-guide { display: none; }
@media (max-width: 1100px), (max-height: 560px) { .reading-guide { display: none; } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .theme-toggle, .cat-launch { transition: background-color .16s, transform .16s; }
  .post-list li a > span::before { transition: opacity .12s; }
  .post-list li a:focus-visible > span::before { transition: none; }
}
@media (prefers-reduced-motion: no-preference) { .box-cat { transition: transform .22s ease-out; } }
@media (max-width: 600px) {
  .site { padding: 0 24px; }
  .site-header { padding-top: 22px; margin-bottom: 38px; gap: 4px 16px; flex-wrap: wrap; }
  .site-header nav { order: 2; width: 100%; justify-content: space-between; gap: 16px; font-size: 13px; margin-left: 0; }
  .theme-toggle { width: 44px; height: 44px; }
  .site-header a, .site-footer a, .social-links a { min-height: 44px; }
  .intro { margin-bottom: 44px; grid-template-columns: minmax(0, 1fr) 112px; column-gap: 20px; }
  .intro h1 { grid-column: 1 / -1; font-size: 34px; letter-spacing: -1px; margin-bottom: 20px; }
  .intro > p { margin-bottom: 12px; }
  .cat-perch { grid-row: 2; height: 114px; align-self: start; margin-top: -16px; }
  .perch-books { left: 0; }
  .perch-cat { right: 0; }
  .cat-pet { right: 6px; }
  .perch-window { right: 0; width: 78px; height: 68px; }
  .year-group { grid-template-columns: 1fr; gap: 3px; margin-bottom: 22px; }
  .year-label { font-size: 10px; }
  .post-list li a { font-size: 14px; padding: 10px 0; gap: 14px; }
  .post-list li a > span::before { left: -17px; }
  .post-list time { font-size: 11px; }
  .prose { font-size: 16px; }
  .prose pre { padding-right: 14px; padding-left: 14px; font-size: 12px; }
  .prose ul, .prose ol { padding-left: 24px; }
  .post-heading h1 { font-size: 32px; }
  .site-footer { margin-top: 48px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reading-cat { display: none; }
}
@media print {
  body { background: white; }
  .site { max-width: none; padding: 0; }
  .site-header, .site-footer, .cat-explorer, .cat-perch, .cat-pick, .reading-guide, .back-link, .post-neighbors, .discussion, .post-contents, .copy-code { display: none !important; }
  .prose pre { white-space: pre-wrap; }
}
