:root {
  color-scheme: light;
  --paper: #f7f3eb;
  --surface: #fffdf7;
  --soft: #eee7da;
  --ink: #303c36;
  --muted: #60695f;
  --rule: #d9d2c4;
  --accent: #9e4d35;
  --sage: #506a57;
  --serif: Georgia, "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --display: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #202a28;
  --surface: #29332f;
  --soft: #303c36;
  --ink: #ede8dc;
  --muted: #b2baad;
  --rule: #48564c;
  --accent: #e5ad91;
  --sage: #b9cbb4;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--soft); color: var(--accent); }
[hidden] { display: none !important; }
.shell { width: min(1160px, calc(100% - 112px)); margin-inline: auto; }
.mono, .eyebrow { font-family: var(--mono); }
.eyebrow { margin: 0 0 12px; font-size: 11px; line-height: 1.7; letter-spacing: .12em; color: var(--accent); }
.little-star { font-size: 24px; font-weight: 400; color: var(--accent); line-height: 1; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 100; padding: 12px 20px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 15px; }
.site-header { min-height: 104px; display: flex; align-items: center; gap: 26px; border-bottom: 1px solid var(--rule); }
.brand { flex-shrink: 0; width: 154px; display: block; color: var(--ink); }
.brand-signature { display: block; width: 100%; aspect-ratio: 204 / 78; background: currentColor; -webkit-mask: var(--signature) center / contain no-repeat; mask: var(--signature) center / contain no-repeat; }
.site-nav { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-left: auto; font-size: 13px; }
.site-nav a { padding-block: 13px; position: relative; }
.site-nav [aria-current="page"] { color: var(--accent); }
.site-nav [aria-current="page"]::after { content: ""; position: absolute; bottom: 4px; left: calc(50% - 2px); width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.appearance-toggle { display: flex; gap: 7px; align-items: center; min-height: 42px; border: 0; border-left: 1px solid var(--rule); background: none; padding: 0 0 0 22px; color: var(--muted); font-size: 11px; }
.appearance-symbol { font-size: 20px; line-height: 1; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 8%; align-items: center; padding-block: 86px 90px; }
.hero-copy { min-width: 0; }
.hero-copy .eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; font-size: 10px; letter-spacing: .16em; }
.home-hero h1 { font: 400 clamp(52px, 6.3vw, 88px)/1.3 var(--display); letter-spacing: -.025em; margin: 0 0 32px; }
.home-hero h1 span { display: block; }
.hero-accent { color: var(--accent); padding-left: .6em; }
.hero-quote { font: 16px/2.05 var(--serif); max-width: 330px; color: var(--muted); margin: 0 0 27px .3em; text-wrap: pretty; }
.underlined-link { display: inline-flex; gap: 18px; align-items: center; border-bottom: 1px solid var(--accent); padding-block: 4px; font-size: 12px; }
.hero-photo { margin: 0 20px 0 0; position: relative; padding: 0 0 0 13px; isolation: isolate; }
.hero-photo::before { content: ''; position: absolute; inset: 8px -5px 43px 10px; background: var(--soft); border: 1px solid var(--rule); transform: rotate(-4deg); z-index: -1; pointer-events: none; }
.home-image { display: block; }
.photo-mat { padding: 12px 12px 26px; background: var(--surface); border: 1px solid var(--rule); box-shadow: 0 16px 32px #303c3610; transform: rotate(2deg); }
.hero-photo img { display: block; width: 100%; height: 386px; object-fit: cover; object-position: 50% 72%; }
.hero-photo figcaption { margin-top: 26px; text-align: right; color: var(--muted); }
.hero-photo figcaption em { font: italic 12px Georgia, serif; }
.featured-section { padding-top: 32px; border-top: 1px solid var(--rule); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 27px; }
.section-heading .eyebrow { margin-bottom: 9px; }
.section-heading h2 { font: 400 27px/1.5 var(--display); margin: 0; letter-spacing: .04em; }
.featured-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; }
.featured-story { min-width: 0; min-height: 330px; }
.featured-story.with-image { display: grid; grid-template-columns: .86fr 1fr; background: var(--surface); border: 1px solid var(--rule); padding: 10px; }
.featured-image { position: relative; overflow: hidden; background: var(--soft); }
.featured-image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 51% 52%; transition: transform .5s; }
.featured-image:hover img { transform: scale(1.035); }
.featured-copy { display: flex; flex-direction: column; padding: 23px 23px 16px; }
.featured-copy .eyebrow { font-family: var(--sans); display: flex; justify-content: space-between; gap: 8px; font-size: 11px; letter-spacing: .08em; }
.featured-copy h3 { font: 400 28px/1.6 var(--display); margin: 7px 0 15px; text-wrap: balance; }
.feature-description { color: var(--muted); font-size: 13px; line-height: 1.95; margin: 0 0 22px; }
.feature-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 17px; font-size: 11px; }
.feature-bottom time { font: 11px var(--mono); color: var(--muted); }
.feature-bottom a { border-bottom: 1px solid currentColor; }
.without-image { background: #263739; color: #efece1; position: relative; overflow: hidden; isolation: isolate; }
.without-image::before { content: ''; position: absolute; inset: 0; background: url('night-lines.svg') right center / auto 100% no-repeat; opacity: .42; z-index: -1; pointer-events: none; }
.without-image .featured-copy { height: 100%; padding: 34px 36px 27px; }
.without-image .eyebrow { color: #d9af88; }
.without-image h3 { font: italic 54px/1.2 Georgia, serif; letter-spacing: -.035em; margin-top: 19px; }
.feature-quote { font: 18px/1.7 Georgia, serif; color: #d0d8cc; margin: 15px 0 30px; max-width: 290px; }
.without-image .feature-bottom { border-top: 1px solid #ffffff30; color: #f0d4b9; }
.without-image time { color: #c6d0ca; }
.image-unavailable.with-image { grid-template-columns: 1fr; }
.image-unavailable .featured-image { display: none; }
.recent-section { margin-top: 88px; scroll-margin-top: 30px; }
.post-list { border-top: 1px solid var(--rule); }
.post-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) minmax(0, 200px) 22px; gap: 28px; align-items: center; border-bottom: 1px solid var(--rule); padding: 29px 0; }
.post-row time { font: 13px/1.5 var(--mono); color: var(--muted); }
.post-row time small { display: block; font-size: 11px; margin-top: 6px; }
.post-row h3 { font: 400 22px/1.6 var(--serif); margin: 0; overflow-wrap: anywhere; }
.post-row p { font-size: 13px; line-height: 1.9; color: var(--muted); margin: 8px 0 0; max-width: 640px; }
.post-taxonomy { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 12px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.post-taxonomy a { max-width: 100%; overflow-wrap: anywhere; }
.post-taxonomy a::before { content: "#"; color: var(--sage); margin-right: 4px; }
.post-arrow { font: 18px Georgia, serif; color: var(--accent); }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; padding-block: 28px; font-size: 12px; }
.pagination > :last-child { text-align: right; }
.pagination .mono { color: var(--muted); font-size: 11px; }
.home-note { display: flex; align-items: baseline; gap: 24px; padding: 30px 0 46px; margin-top: 8px; }
.home-note p { font: 18px/1.8 var(--serif); color: var(--muted); margin: 0; text-wrap: pretty; }
.home-note > a { margin-left: auto; flex-shrink: 0; }
.site-footer { padding-block: 36px 42px; border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 25px; color: var(--muted); font-size: 12px; }
.footer-name { color: var(--ink); font: italic 21px Georgia, var(--serif); }
.footer-links { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; font-size: 11px; }
.archive-page { padding-block: 60px 80px; min-height: 65vh; }
.archive-page h1 { font: 400 clamp(30px, 4vw, 50px)/1.5 var(--display); margin: 0; }
.reading-page { padding-top: 28px; padding-bottom: 65px; }
.reading-topline { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.reading-topline .mono { font-size: 10px; letter-spacing: .08em; }
.post-header { max-width: 720px; margin: 56px auto 44px; }
.post-kicker { display: flex; gap: 14px; font-size: 11px; letter-spacing: .1em; color: var(--accent); }
.post-header h1 { font: 400 clamp(32px, 4.4vw, 51px)/1.48 var(--display); margin: 20px 0 28px; letter-spacing: .015em; overflow-wrap: anywhere; text-wrap: balance; }
.post-meta { display: flex; gap: 17px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 23px; }
.post-meta button { margin-left: auto; background: transparent; color: var(--ink); border: 1px solid var(--rule); border-radius: 24px; padding: 7px 16px; font-size: 12px; min-height: 40px; }
.post-meta button:hover { border-color: var(--accent); }
.reading-grid { position: relative; }
.article { min-width: 0; max-width: 720px; margin-inline: auto; }
.article-outline { position: absolute; right: calc(50% + 400px); top: 0; bottom: 0; width: 140px; font-size: 12px; color: var(--muted); }
.article-outline details { position: sticky; top: 32px; }
.article-outline summary { display: flex; justify-content: space-between; cursor: pointer; color: var(--accent); font-size: 11px; padding: 6px 0 13px; border-bottom: 1px solid var(--rule); }
.article-outline nav { margin-top: 12px; max-height: 65vh; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.article-outline ol { list-style: none; margin: 0; padding: 0; }
.article-outline ol ol { padding-left: 12px; }
.article-outline a { display: block; padding-block: 5px; line-height: 1.8; overflow-wrap: anywhere; }
.article-outline [aria-current] { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.post-content { font: 18px/2.05 var(--serif); overflow-wrap: break-word; }
.post-content > p { margin: 0 0 1.5em; text-align: justify; }
.post-content > h1, .post-content > h2, .post-content > h3, .post-content > h4 { font-weight: 600; line-height: 1.6; margin: 2em 0 .9em; }
.post-content > h1 { font-size: 1.7em; }
.post-content > h2 { font-size: 1.5em; }
.post-content > h3 { font-size: 1.25em; }
.post-content > h4 { font-size: 1.1em; }
.post-content :where([id]) { scroll-margin-top: 35px; }
.post-content :where(a) { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule); }
.post-content :where(img, video, audio, iframe) { max-width: 100%; }
.post-content > p > img, .post-content > p > a > img { display: block; height: auto; margin: 2em auto; }
.post-content > blockquote { padding: .6em 0 .6em 1.4em; margin: 2em 0; border-left: 2px solid var(--accent); color: var(--sage); }
.post-content > blockquote p { margin: 0; }
.post-content > ul, .post-content > ol { padding-left: 1.5em; }
.post-content :where(pre) { background: var(--soft); padding: 20px; max-width: 100%; overflow-x: auto; font: 13px/1.8 var(--mono); }
.post-content :where(code) { font-family: var(--mono); font-size: .85em; }
.post-content :where(figure.highlight) { margin: 1.8em 0; background: var(--soft); overflow-x: auto; }
.post-content :where(.highlight pre) { margin: 0; padding: 12px; }
.post-content :where(.highlight .gutter) { color: var(--muted); border-right: 1px solid var(--rule); }
.post-content > table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .88em; }
.post-content > table :where(th, td) { border: 1px solid var(--rule); padding: 10px 15px; }
.post-content > hr { border: 0; border-top: 1px solid var(--rule); margin: 3em 0; }
.post-end { margin: 60px auto 35px; max-width: 720px; text-align: center; color: var(--muted); font-size: 12px; }
.post-end > span { font-size: 24px; color: var(--accent); }
.post-tags { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 24px; font-size: 11px; }
.post-navigation { max-width: 720px; margin: 0 auto; padding-top: 28px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.post-navigation a:last-child { text-align: right; }
.post-navigation span { display: block; font-size: 10px; color: var(--muted); margin-bottom: 10px; }
.post-navigation strong { font: 400 16px/1.8 var(--serif); overflow-wrap: anywhere; }
.mode-math .article { max-width: 820px; }
.mode-math .article-outline { right: calc(50% + 438px); width: 128px; }
.mode-math .post-content { font-size: 16px; }
.mode-math .post-header { max-width: 820px; }
.mode-poem .article, .mode-poem .post-header { max-width: 760px; }
.mode-poem .post-header h1 { font-family: Georgia, serif; font-style: italic; }
.mode-poem .post-content { overflow-wrap: normal; }
.focus-reading .site-header, .focus-reading .site-footer, .focus-reading .article-outline, .focus-reading .reading-topline { display: none; }
.focus-reading .post-header { margin-top: 45px; }
.post-content .tikzjax { text-align: center; }
[data-theme="dark"] .post-content .tikzjax > svg { background: #f7f4ed; padding: 12px; }
/* Author-specific compatibility is scoped to the existing work, not all HTML. */
[data-theme="dark"] .white-cat-essay { --cat-ink: #dedfd4; --cat-muted: #b5b8ab; --cat-accent: #d1b989; }
[data-theme="dark"] .white-cat-essay .cat-lead, [data-theme="dark"] .white-cat-essay .cat-ending { color: #dedfd4; }
[data-theme="dark"] .white-cat-essay .cat-reflection { color: #e0d2b6; }
[data-theme="dark"] .about-page { --text-color: #dedfd4; }
[data-theme="dark"] .about-tags span, [data-theme="dark"] .about-subtitle, [data-theme="dark"] .about-assistant-credit { color: var(--muted); }
@media (max-width: 1200px) {
  .shell { width: calc(100% - 72px); }
  .article-outline { position: static; width: auto; margin: 0 auto 30px; max-width: 720px; }
  .article-outline details { position: static; }
  .article-outline nav { max-height: 220px; }
  .mode-math .article-outline { width: auto; max-width: 820px; }
  .home-hero { gap: 6%; padding-block: 70px 76px; }
  .hero-photo img { height: 350px; }
}
@media (max-width: 900px) {
  .post-row { grid-template-columns: 60px minmax(0, 1fr) 18px; gap: 14px 20px; }
  .post-taxonomy { grid-column: 2; justify-content: flex-start; }
  .post-taxonomy:empty { display: none; }
  .post-arrow { grid-column: 3; grid-row: 1; }
  .featured-grid { grid-template-columns: 1.2fr 1fr; gap: 18px; }
  .featured-story.with-image { grid-template-columns: 1fr; }
  .featured-image { height: 200px; }
  .featured-image img { object-position: 50% 60%; }
  .featured-copy { padding: 22px; }
  .without-image .featured-copy { padding: 27px; }
  .without-image h3 { margin-top: 24px; }
  .home-hero h1 { font-size: clamp(44px, 6.3vw, 57px); }
  .hero-photo img { height: 310px; }
}
@media (max-width: 650px) {
  .shell { width: calc(100% - 40px); }
  .site-header { min-height: 80px; gap: 15px; flex-wrap: wrap; padding: 15px 0; }
  .brand { width: 130px; }
  .site-nav { gap: 19px; font-size: 12px; }
  .appearance-toggle { padding-left: 12px; }
  [data-appearance-label] { display: none; }
  .home-hero { padding-top: 36px; padding-bottom: 45px; display: block; }
  .hero-copy .eyebrow { font-size: 10px; margin-bottom: 15px; }
  .home-hero h1 { font-size: clamp(48px, 13.5vw, 76px); line-height: 1.3; margin-bottom: 23px; }
  .hero-accent { padding-left: .45em; }
  .hero-quote { font-size: 15px; max-width: 310px; margin-left: 0; }
  .hero-photo { margin: 35px 12px 0 0; padding-left: 3px; }
  .hero-photo img { height: 265px; object-position: 50% 72%; }
  .photo-mat { padding: 9px 9px 19px; box-shadow: 0 10px 20px #303c3610; }
  .hero-photo figcaption { margin-top: 22px; }
  .section-heading { gap: 12px; margin-bottom: 20px; }
  .section-heading h2 { font-size: 24px; }
  .featured-section { padding-top: 28px; }
  .featured-grid { grid-template-columns: 1fr; gap: 18px; }
  .featured-story.with-image { grid-template-columns: 1fr 1.3fr; min-height: 290px; }
  .featured-image { height: auto; }
  .featured-image img { object-position: 52% 55%; }
  .featured-copy { padding: 16px 14px 12px; }
  .featured-copy h3 { font-size: 22px; }
  .feature-description { font-size: 13px; }
  .featured-copy .eyebrow { font-size: 11px; }
  .feature-bottom { gap: 8px; font-size: 10px; flex-wrap: wrap; }
  .feature-bottom time { font-size: 10px; }
  .without-image { min-height: 285px; }
  .without-image .featured-copy { padding: 26px; }
  .without-image h3 { font-size: 43px; margin-top: 6px; }
  .feature-quote { font-size: 17px; margin-bottom: 24px; }
  .recent-section { margin-top: 45px; }
  .post-row { grid-template-columns: 47px minmax(0, 1fr) 15px; gap: 13px; padding: 21px 0; }
  .post-row time { align-self: start; margin-top: 4px; font-size: 11px; }
  .post-row time small { font-size: 9px; }
  .post-row h3 { font-size: 20px; }
  .post-row p { font-size: 13px; line-height: 1.9; }
  .post-taxonomy { margin-top: -3px; }
  .post-arrow { grid-column: 3; grid-row: 1; }
  .home-note { padding: 16px 0 28px; gap: 12px; flex-direction: column; align-items: flex-start; margin-top: 4px; }
  .home-note p { font-size: 16px; }
  .home-note > a { margin-left: 0; }
  .site-footer { padding-block: 27px 30px; gap: 20px; align-items: flex-start; }
  .footer-name { font-size: 18px; }
  .footer-links { max-width: 125px; text-align: right; font-size: 9px; }
  .reading-page { padding-top: 22px; padding-bottom: 42px; }
  .reading-topline { font-size: 10px; }
  .reading-topline .mono { font-size: 9px; }
  .post-header { margin-top: 32px; margin-bottom: 28px; }
  .post-header h1 { font-size: 33px; margin-block: 15px 21px; }
  .post-meta { gap: 8px 13px; font-size: 10px; }
  .post-meta button { padding: 5px 9px; font-size: 10px; }
  .post-content { font-size: 17px; line-height: 2; }
  .mode-math .post-content { font-size: 15px; }
  .post-content > p { text-align: left; }
  .article-outline { margin-bottom: 25px; }
  .article-outline nav { max-height: 40vh; }
  .post-navigation { gap: 22px; }
  .post-navigation strong { font-size: 14px; }
  .post-end { margin-top: 38px; }
  .archive-page { padding-block: 36px 50px; }
}
@media (max-width: 360px) {
  .site-header { gap: 10px; }
  .brand { width: 112px; }
  .site-nav { gap: 12px; }
  .appearance-toggle { padding-left: 8px; }
  .featured-story.with-image { grid-template-columns: 1fr; }
  .featured-image { height: 195px; }
  .featured-copy h3 { font-size: 25px; }
  .post-meta button { margin-left: 0; }
}
@media (max-width: 560px) {
  .afterlight .white-cat-essay .cat-flow .cat-illustration {
    float: none;
    width: min(100%, 22rem);
    margin: 1.5rem auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-header, .site-footer, .article-outline, .reading-topline, .post-navigation, [data-focus] { display: none; }
  .shell { width: 100%; }
  body { background: white; color: black; }
}
