:root {
  color-scheme: light;
  --bg: #f8f9f6;
  --ink: #202c26;
  --muted: #5d6860;
  --subtle: #63736a;
  --rule: #dce2da;
  --accent: #32644c;
  --soft: #eef1eb;
  --grid: #e9ede6;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --gutter: 5.1rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151c18; --ink: #dce5dc; --muted: #acb7ad;
    --subtle: #a0b2a4; --rule: #303d33; --accent: #a1c6a6;
    --soft: #1c261f; --grid: #202b23;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151c18; --ink: #dce5dc; --muted: #acb7ad;
  --subtle: #a0b2a4; --rule: #303d33; --accent: #a1c6a6;
  --soft: #1c261f; --grid: #202b23;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--serif); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button, a, input { touch-action: manipulation; }
button { color: inherit; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 20; background: var(--bg); padding: 8px 12px; border: 1px solid var(--accent); font-family: var(--mono); font-size: 12px; }
.page { width: min(100% - 64px, 736px); margin: 0 auto; position: relative; }
.masthead { padding-top: 70px; }
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.masthead__name { margin: 0; font-size: 28px; font-weight: 500; line-height: 1.2; letter-spacing: -.035em; text-decoration: none; }
a.masthead__name:hover { color: var(--accent); }
.masthead__tools { display: flex; align-items: center; gap: 25px; }
.pixel-art { display: grid; place-items: center; flex-shrink: 0; width: 78px; height: 48px; padding: 2px; border: 0; background: none; color: var(--accent); }
.js .pixel-art { cursor: pointer; }
.pixel-art svg { display: block; width: 73px; height: 43px; fill: currentColor; shape-rendering: crispEdges; }
.pixel-art:hover { color: var(--ink); }
.theme-btn { display: none; place-items: center; width: 32px; height: 32px; padding: 7px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--subtle); }
.js .theme-btn { display: grid; }
.theme-btn svg { width: 16px; height: 16px; shape-rendering: crispEdges; }
.theme-btn:hover { background: var(--soft); border-color: var(--rule); color: var(--accent); }
.nav { display: flex; gap: 26px; margin-top: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.nav a { position: relative; text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: -21px; left: 0; right: 0; height: 2px; background: var(--accent); }
.intro { margin-top: 36px; max-width: 650px; font-size: 19px; line-height: 1.65; text-wrap: pretty; }
.intro p { margin: 0; }
.section { margin-top: 40px; padding-top: 21px; border-top: 1px solid var(--rule); }
.section--first { margin-top: 34px; padding-top: 0; border-top: 0; }
.label { display: flex; align-items: center; gap: 9px; margin: 0 0 19px; color: var(--subtle); font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .13em; line-height: 1.6; text-transform: uppercase; }
.label::before { content: ""; width: 4px; height: 4px; background: var(--accent); opacity: .7; }
.index { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: var(--gutter) minmax(0, 1fr); align-items: baseline; }
.index .row { padding: 7px 0; }
.row__meta { font-family: var(--mono); font-size: 11px; color: var(--subtle); font-variant-numeric: tabular-nums; letter-spacing: .015em; }
.row__body { display: block; min-width: 0; line-height: 1.52; }
.row__link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .23em; text-decoration-color: var(--rule); transition: color 120ms ease, text-decoration-color 120ms ease; }
.row__link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.more { margin: 20px 0 0 var(--gutter); font-family: var(--mono); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.more a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); }
.more a::after { content: "↗"; color: var(--accent); font-size: 13px; }
.more a:hover { color: var(--accent); }
.page-title { margin: 0 0 26px; font-size: 26px; line-height: 1.3; font-weight: 500; letter-spacing: -.02em; }
.index--detailed .row { padding: 24px 0; }
.index--detailed .row:first-child { padding-top: 0; }
.row--ruled + .row--ruled { border-top: 1px solid var(--rule); }
.row__sub { display: block; margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.row__sub--meta { font-family: var(--mono); font-size: 10px; letter-spacing: .025em; color: var(--subtle); }
.row__sub strong { font-weight: 600; color: var(--ink); }
.research-filter { display: flex; align-items: center; gap: 10px; min-height: 42px; margin: -4px 0 30px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.research-filter:focus-within { border-color: var(--accent); }
.filter-label { display: flex; flex: 0 0 16px; color: var(--subtle); }
.filter-label svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.research-filter input { width: 100%; min-width: 0; padding: 4px 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); outline: 0; font-family: var(--mono); font-size: 11px; }
.research-filter input::placeholder { color: var(--subtle); opacity: 1; }
.filter-count { flex-shrink: 0; font: 10px var(--mono); color: var(--subtle); }
.filter-empty { font-size: 15px; color: var(--muted); padding: 12px 0 30px; }
.article__header { margin-bottom: 32px; }
.article__meta { display: flex; gap: 20px; margin: 0 0 12px; font-family: var(--mono); color: var(--subtle); font-size: 10px; letter-spacing: .04em; }
.article__title { margin: 0; font-size: 32px; line-height: 1.25; font-weight: 500; letter-spacing: -.03em; }
.article-body { line-height: 1.75; }
.article-body > :first-child { margin-top: 0; }
.article-body h1, .article-body h2, .article-body h3 { margin: 2.3em 0 .7em; font-size: 21px; font-weight: 500; line-height: 1.3; letter-spacing: -.015em; }
.article-body a { text-underline-offset: .18em; text-decoration-color: var(--rule); }
.article-body a:hover { color: var(--accent); }
.article-body img { display: block; max-width: 100%; height: auto; margin: 28px auto; background: #fff; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body pre { position: relative; max-width: 100%; margin: 24px 0; padding: 36px 20px 20px; background: var(--soft); border: 1px solid var(--rule); overflow: auto; line-height: 1.7; tab-size: 4; }
code { font-family: var(--mono); font-size: .82em; }
pre code { font-size: 12px; }
.copy-code { position: absolute; top: 9px; right: 12px; padding: 1px 3px; border: 0; background: var(--soft); color: var(--subtle); font: 9px var(--mono); letter-spacing: .05em; cursor: pointer; }
.copy-code:hover { color: var(--accent); }
.article .more { margin-left: 0; margin-top: 36px; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 50px; padding: 22px 0 40px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 10px; letter-spacing: .025em; color: var(--subtle); }
.site-footer p { margin: 0; }
.site-footer__links { display: flex; gap: 23px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
@media (min-width: 1250px) { .page { width: 736px; } }
@media (max-width: 560px) {
  :root { --gutter: 4.25rem; }
  body { font-size: 16px; }
  .page { width: calc(100% - 40px); }
  .masthead { padding-top: 35px; }
  .masthead__name { font-size: 25px; }
  .masthead__tools { gap: 10px; }
  .pixel-art { width: 60px; height: 40px; }
  .pixel-art svg { width: 55px; height: 33px; }
  .nav { margin-top: 20px; }
  .intro { font-size: 18px; margin-top: 28px; }
  .section { margin-top: 32px; }
  .row__meta { font-size: 10px; }
  .row__sub { font-size: 13px; }
  .row__sub--meta { font-size: 10px; }
  .research-page .row, .article-page .row { grid-template-columns: 2.5rem minmax(0, 1fr); }
  .article__title { font-size: 28px; }
  .site-footer { margin-top: 40px; padding-bottom: 30px; }
}
@media (max-width: 360px) {
  .masthead__name { font-size: 23px; }
  .masthead__row { gap: 8px; }
  .masthead__tools { gap: 4px; }
  .site-footer { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .masthead__tools, .research-filter, .copy-code { display: none !important; } .page { width: 100%; } .masthead { padding-top: 0; } body { color: #000; background: #fff; } a { text-decoration: none; } .site-footer { padding-bottom: 0; } }
