@font-face {
  font-family: Geist;
  src: url('/fonts/geist-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: optional;
}

:root {
  color-scheme: light;
  --canvas: #F4F8F6;
  --surface: #FFFFFF;
  --surface-muted: #ECF3EF;
  --header: #F8FBF9;
  --ink: #0F1E1B;
  --copy: #374D45;
  --muted: #50645C;
  --accent: #047857;
  --strong-accent: #065F46;
  --accent-soft: #E0F0E7;
  --line: #C3D3CA;
  --line-strong: #879F93;
  --grid: #D9E7E0;
  --focus: #047857;
  --plate: #103B32;
  --plate-ink: #C0F3DF;
  --action: #065F46;
  --action-hover: #084D3B;
  --action-pressed: #103B32;
  --hud-corner: #34D399;
  --code: #10231F;
  --code-line: #32564C;
  --code-ink: #D3EEE4;
  --font-sans: Geist, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', monospace;
  --gutter: clamp(20px, 4.4vw, 64px);
  --wrap: 1240px;
  --masthead-height: 68px;
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --canvas: #070D0C;
  --surface: #0D1615;
  --surface-muted: #11201C;
  --header: #0A1311;
  --ink: #EDF7F1;
  --copy: #B0C7BD;
  --muted: #A0B8AE;
  --accent: #34D399;
  --strong-accent: #81E6BA;
  --accent-soft: #18372D;
  --line: #2B433A;
  --line-strong: #56796B;
  --grid: #152821;
  --focus: #67E1AE;
  --plate: #103B32;
  --plate-ink: #C0F3DF;
  --action: #065F46;
  --action-hover: #086B50;
  --action-pressed: #0B4839;
  --hud-corner: #6EE7B7;
  --code: #0A1512;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--masthead-height) + 22px); }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; min-width: 0; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
p { color: var(--copy); }
button, input { border-radius: 0; font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: transparent; }
img { display: block; width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.mono { font-family: var(--font-mono); font-weight: 500; }
.icon { display: block; flex: none; width: 1.1em; height: 1.1em; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


.skip-link {
  position: fixed;
  z-index: 5;
  inset: 8px auto auto 8px;
  padding: 9px 14px;
  transform: translateY(-160%);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky;
  z-index: 4;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--header);
}
.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: calc(var(--masthead-height) - 1px);
  gap: 24px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 740;
  line-height: 1;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--plate);
  color: var(--plate-ink);
}
.brand-mark .icon { width: 20px; height: 20px; }
.site-nav { display: flex; align-self: stretch; gap: clamp(22px, 2.7vw, 40px); }
.site-nav a {
  position: relative;
  display: grid;
  align-content: center;
  color: var(--copy);
  font-size: .875rem;
  font-weight: 550;
  text-align: center;
  white-space: nowrap;
  transition: color 150ms ease;
}
.site-nav a:focus-visible { outline-offset: -4px; }
.site-nav a[aria-current='page'], .site-nav a:hover { color: var(--strong-accent); }
.site-nav a[aria-current='page']::after {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: var(--accent);
  content: '';
}
.site-controls { display: flex; justify-self: end; align-items: center; gap: 10px; }
.filing-badge {
  flex: none;
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--strong-accent);
  font-size: .68rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: normal;
  white-space: nowrap;
}
.theme-toggle {
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--copy);
}
.theme-toggle { display: grid; width: 38px; place-items: center; padding: 0; transition: background-color 150ms, color 150ms; }
.theme-toggle:hover { background: var(--accent-soft); color: var(--strong-accent); }
.theme-toggle .icon { width: 16px; height: 16px; grid-area: 1 / 1; }
:root:not([data-theme='dark']) .theme-moon, :root[data-theme='dark'] .theme-sun { visibility: hidden; }


.grid-surface {
  background-color: var(--canvas);
  background-image:
    linear-gradient(90deg, transparent, var(--canvas) 97%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  border-bottom: 1px solid var(--line);
}
.section-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--strong-accent);
  font-size: .73rem;
  line-height: 1.4;
  letter-spacing: .105em;
  text-transform: uppercase;
}
.section-mark i {
  display: block;
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--accent);
}
.hud-button {
  --corner-size: 10px;
  --corner-stroke: 3px;
  --corner-inset: -2px;
  --corner: var(--hud-corner);
  position: relative;
  display: inline-flex;
  min-height: 46px;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 9px 17px;
  overflow: visible;
  border: 1px solid var(--action);
  border-radius: 0;
  background: var(--action);
  color: #FFFFFF;
  font-size: .895rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  transition: background-color 200ms ease-out, box-shadow 200ms ease-out;
}
.corner-frame { position: relative; }
.hud-button::after, .corner-frame::after {
  position: absolute;
  z-index: 1;
  inset: var(--corner-inset, -1px);
  background:
    linear-gradient(var(--corner), var(--corner)) top left / var(--corner-size) var(--corner-stroke) no-repeat,
    linear-gradient(var(--corner), var(--corner)) top left / var(--corner-stroke) var(--corner-size) no-repeat,
    linear-gradient(var(--corner), var(--corner)) top right / var(--corner-size) var(--corner-stroke) no-repeat,
    linear-gradient(var(--corner), var(--corner)) top right / var(--corner-stroke) var(--corner-size) no-repeat,
    linear-gradient(var(--corner), var(--corner)) bottom left / var(--corner-size) var(--corner-stroke) no-repeat,
    linear-gradient(var(--corner), var(--corner)) bottom left / var(--corner-stroke) var(--corner-size) no-repeat,
    linear-gradient(var(--corner), var(--corner)) bottom right / var(--corner-size) var(--corner-stroke) no-repeat,
    linear-gradient(var(--corner), var(--corner)) bottom right / var(--corner-stroke) var(--corner-size) no-repeat;
  content: '';
  pointer-events: none;
}
.hud-button::after { transition: inset 200ms ease-out, opacity 200ms ease-out; }
:root[data-theme='light'] .hud-button { box-shadow: 0 2px 8px rgb(6 95 70 / .16); }
.hud-button .icon { transition: transform 200ms ease-out; }
.hud-button:is(:hover, :focus-visible) { background-color: var(--action-hover); }
.hud-button:is(:hover, :focus-visible)::after { inset: -6px; }
.hud-button:focus-visible { outline-color: var(--hud-corner); outline-offset: -6px; }
.hud-button:is(:hover, :focus-visible) .icon { transform: translate(2px, -1px); }
.hud-button:active { background-color: var(--action-pressed); }
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  gap: 8px;
  color: var(--strong-accent);
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link .icon { width: 15px; height: 15px; }

.home-writing { padding-block: clamp(38px, 4.45vw, 65px) 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 10px 20px; margin-bottom: 19px; }
.section-heading h2 { font-size: clamp(1.72rem, 3vw, 2.72rem); font-weight: 660; letter-spacing: -.06em; }
.home-story-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(16px, 2.15vw, 32px); }
.feature-card, .latest-panel { min-width: 0; border: 1px solid var(--line); background: var(--surface); }
.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: clamp(20px, 2.25vw, 33px);
  border-top: 2px solid var(--accent);
}
.feature-head, .feature-meta { display: flex; width: 100%; align-items: center; gap: 11px; color: var(--muted); font-size: .74rem; }
.feature-head { justify-content: space-between; gap: 10px 15px; }
.feature-pin { display: inline-flex; align-items: center; gap: 7px; color: var(--strong-accent); letter-spacing: .07em; text-transform: uppercase; }
.feature-pin .icon { width: 16px; height: 16px; }
.feature-link { display: flex; align-items: start; justify-content: space-between; gap: 12px; width: 100%; margin-block: 21px 9px; transition: color 150ms; }
.feature-link:hover { color: var(--accent); }
.feature-link h3 { max-width: 18ch; font-size: clamp(1.58rem, 3.15vw, 2.675rem); font-weight: 650; letter-spacing: -.054em; text-wrap: balance; }
.feature-arrow { width: 22px; height: 22px; margin-top: 5px; color: var(--strong-accent); }
.feature-card > p { max-width: 51ch; padding-bottom: 20px; font-size: .95rem; }
.feature-meta { margin-top: auto; flex-wrap: wrap; }
.topic-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--strong-accent);
  font-size: .73rem;
  line-height: 1.35;
  transition: background-color 150ms;
}
.topic-chip:hover { background: var(--accent-soft); }
.latest-panel { display: flex; flex-direction: column; }
.latest-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.latest-head h3 { font-size: .94rem; font-weight: 680; }
.latest-head > span { color: var(--muted); font-size: .73rem; }
.recent-list { display: flex; flex: 1; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.recent-list li { display: flex; flex: 1; }
.recent-list li + li { border-top: 1px solid var(--line); }
.recent-list a {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  gap: 4px 8px;
  padding: 12px 20px;
  min-height: 61px;
  transition: background-color 150ms;
}
.recent-list a:hover { background: var(--surface-muted); }
.recent-list a:focus-visible { outline-offset: -3px; }
.item-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 7px;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.25;
}
.item-topic { color: var(--strong-accent); }
.item-meta > i { width: 4px; height: 4px; flex: none; border-radius: 50%; background: var(--accent); }
.article-metadata > i { width: 3px; height: 3px; flex: none; background: var(--line-strong); }
.recent-list strong { font-size: .96rem; font-weight: 650; line-height: 1.22; letter-spacing: -.015em; }
.recent-list a > .icon { grid-area: 1 / 2 / 3 / 3; color: var(--strong-accent); }
.home-topics { padding-block: 48px 74px; }
.home-topics h2 { font-size: clamp(1.5rem, 2.55vw, 2.1rem); }
.topic-index { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); list-style: none; }
.topic-index {
  --corner-size: 10px;
  --corner-stroke: 1px;
  --corner: var(--accent);
  --corner-inset: -3px -2px -2px -3px;
}
.topic-index a {
  position: relative;
  display: grid;
  height: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 6px;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  transition: background-color 150ms;
}
.topic-index a:is(:hover, :focus-visible) { background: var(--surface-muted); }
.topic-index a:focus-visible { outline-offset: -3px; }
.topic-index a > .mono { color: var(--muted); font-size: .72rem; }
.topic-index a > .icon { grid-area: 1 / 2 / 3 / 3; color: var(--strong-accent); }

.page-intro { padding-block: clamp(43px, 5.55vw, 79px); }
.page-intro h1, .article-hero h1 {
  margin-block: 13px 13px;
  font-size: clamp(2.45rem, 5.45vw, 4.9rem);
  font-weight: 690;
  line-height: 1.04;
  letter-spacing: -.064em;
  text-wrap: balance;
}
.page-intro h1 [lang='zh-CN'], .article-hero h1 [lang='zh-CN'], .section-heading h2 [lang='zh-CN'], .feature-link h3 [lang='zh-CN'] { letter-spacing: -.02em; }
.page-intro p, .article-hero p { max-width: 60ch; font-size: clamp(1rem, 1.05vw + .22rem, 1.13rem); }
.archive-layout { padding-block: clamp(29px, 4vw, 55px) 66px; }
.archive-filters {
  display: grid;
  grid-template-columns: minmax(190px, .83fr) minmax(0, 1.55fr);
  align-items: start;
  gap: 12px clamp(16px, 2.8vw, 42px);
  margin-bottom: 24px;
}
.search-field { position: relative; min-width: 0; }
.search-field .icon { position: absolute; top: 13px; left: 12px; color: var(--strong-accent); pointer-events: none; }
.search-field input {
  width: 100%;
  min-height: 44px;
  padding: 7px 12px 7px 37px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-size: .95rem;
}
.search-field input::placeholder { color: var(--muted); opacity: 1; }
.filter-line, .filter-options { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-line { padding-block: 5px; column-gap: 12px; }
.filter-heading { color: var(--muted); font-size: .73rem; white-space: nowrap; }
.filter-options button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--copy);
  font: 500 .72rem/1.35 var(--font-mono);
  white-space: nowrap;
  transition: background-color 150ms, border-color 150ms;
}
.filter-options button:hover, .filter-options button[aria-pressed='true'] { border-color: var(--accent); background: var(--accent-soft); color: var(--strong-accent); }
.archive-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  min-height: 39px;
  padding: 4px 13px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: .75rem;
}
.archive-list { margin: 0; padding: 0; list-style: none; }
.archive-entry {
  display: grid;
  grid-template-columns: minmax(110px, 165px) minmax(0, 1fr);
  align-items: start;
  gap: 10px clamp(12px, 3.3vw, 48px);
  padding: 23px 13px;
  border-bottom: 1px solid var(--line);
}
.archive-date { display: flex; flex-direction: column; margin-top: 4px; color: var(--muted); font-size: .79rem; }
.archive-date time { color: var(--strong-accent); }
.archive-entry h2 { font-size: clamp(1.23rem, 2.3vw, 1.9rem); font-weight: 650; letter-spacing: -.04em; }
.archive-entry h2 a, .tag-card h2 a { display: inline-flex; align-items: baseline; gap: 7px; }
.archive-entry h2 a:hover, .tag-card a:hover { color: var(--strong-accent); }
.archive-entry h2 .icon, .tag-card h2 .icon { width: .7em; height: .7em; color: var(--strong-accent); }
.archive-entry p { margin-block: 7px 11px; font-size: .96rem; }
.entry-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.archive-empty { padding: 25px 13px; }
.archive-empty h2 { margin-bottom: 7px; font-size: 1.5rem; }
.archive-empty .hud-button { margin-top: 14px; }

.tags-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(15px, 2.2vw, 31px); padding-block: clamp(34px, 4vw, 57px) 68px; }
.tag-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: clamp(16px, 2.1vw, 28px);
  border: 1px solid var(--line);
  background: var(--surface);
}
.tag-card-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 7px 12px; }
.tag-card-top h2 { font-size: clamp(1.36rem, 2vw, 1.8rem); font-weight: 650; letter-spacing: -.04em; }
.tag-card-top > span { color: var(--strong-accent); font-size: .73rem; white-space: nowrap; }
.tag-card > p { margin-block: 13px 18px; font-size: .96rem; }
.tag-card ul { margin: 0; padding: 0; list-style: none; }
.tag-card li { border-top: 1px solid var(--line); }
.tag-card li a { display: flex; justify-content: space-between; align-items: center; gap: 9px; min-height: 39px; padding-block: 6px; font-size: .875rem; }
.tag-card li .icon { color: var(--strong-accent); }

.article-hero { padding-block: clamp(25px, 3.5vw, 47px) clamp(32px, 4.4vw, 63px); }
.article-hero-content { max-width: 900px; margin-top: 24px; }
.article-hero h1 { max-width: 22ch; font-size: clamp(2.15rem, 4.7vw, 4.2rem); }
.article-metadata { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; margin-top: 18px; color: var(--muted); font-size: .78rem; }
.article-metadata > span:first-child { color: var(--strong-accent); }
.reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(0, 228px);
  justify-content: center;
  align-items: start;
  gap: clamp(32px, 5.2vw, 74px);
  padding-block: clamp(32px, 4.4vw, 60px) 72px;
}
.article-toc {
  position: sticky;
  top: calc(var(--masthead-height) + 24px);
  grid-area: 1 / 2;
  min-width: 0;
  padding: 0 0 0 18px;
  border-left: 1px solid var(--line-strong);
}
.article-toc h2 { margin-bottom: 8px; color: var(--strong-accent); font-size: .73rem; letter-spacing: .075em; text-transform: uppercase; }
.article-toc ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.article-toc a { display: inline-block; min-height: 29px; padding-block: 4px; color: var(--copy); font-size: .88rem; line-height: 1.35; }
.article-toc a:hover { color: var(--strong-accent); text-decoration: underline; text-underline-offset: 3px; }
.article-body { grid-area: 1 / 1; }
.prose { min-width: 0; font-size: clamp(1.025rem, 1.3vw + .3rem, 1.12rem); line-height: 1.78; }
.prose section + section { margin-top: 31px; padding-top: 23px; border-top: 1px solid var(--line); }
.prose section:target > h2 { color: var(--strong-accent); }
.prose h2 { margin: 0 0 12px; color: var(--ink); font-size: clamp(1.35rem, 2.55vw, 1.88rem); font-weight: 660; letter-spacing: -.035em; }
.prose p { max-width: 70ch; margin-bottom: 16px; overflow-wrap: anywhere; }
.prose p a { color: var(--strong-accent); text-decoration: underline; text-underline-offset: 3px; }
.prose > .hud-button { margin-top: 12px; }
.code-block {
  position: relative;
  min-width: 0;
  margin: 18px 0 21px;
  border: 1px solid var(--code-line);
  background: var(--code);
  color: var(--code-ink);
}
.code-block figcaption {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 3px 7px 3px 12px;
  border-bottom: 1px solid var(--code-line);
  color: var(--code-ink);
  font-size: .73rem;
}
.code-file { overflow-wrap: anywhere; }
.code-scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
  color: #B4D6C7;
  font-size: .68rem;
  white-space: nowrap;
  visibility: hidden;
}
.code-block[data-scrollable] .code-scroll-hint { visibility: visible; }
.code-block button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 2px 7px;
  border: 1px solid #628778;
  background: #19352C;
  color: #F4FFFA;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.code-block button { transition: background-color 160ms ease-out, border-color 160ms ease-out; }
.code-block button:hover { background: #234C3E; }
.code-block button[data-copied] { background: #154A38; border-color: #77E0AE; }
.code-block button:focus-visible, .code-block pre:focus-visible { outline-color: #77E0AE; outline-offset: -2px; }
.copy-label { display: inline-grid; }
.copy-label > span { grid-area: 1 / 1; }
[data-copy-code]:not([data-copied]) .copy-done,
[data-copy-code][data-copied] .copy-ready { visibility: hidden; }
.code-block pre {
  max-width: 100%;
  margin: 0;
  padding: 14px 15px 17px;
  overflow: auto;
  scrollbar-color: #77988C var(--code);
  color: inherit;
  font: 500 clamp(.78rem, 1.05vw + .2rem, .9rem)/1.68 var(--font-mono);
  tab-size: 2;
}
.code-block code { font: inherit; }
.next-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 9px;
  margin-top: 27px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: var(--surface);
  line-height: 1.35;
}
.next-post:hover { background: var(--surface-muted); }
.next-post .mono { color: var(--strong-accent); font-size: .73rem; }
.next-post > .icon { grid-area: 1 / 2 / 3 / 3; color: var(--strong-accent); }
.about-layout { display: grid; grid-template-columns: minmax(0, 730px) minmax(230px, 300px); align-items: start; gap: clamp(27px, 5vw, 76px); padding-block: clamp(34px, 4vw, 57px) 68px; }
.author-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-top: 2px solid var(--accent); background: var(--surface); }
.author-mark { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px; background: var(--plate); color: var(--plate-ink); font-size: 1.8rem; font-weight: 660; line-height: 1; }
.author-card h2 { font-size: 1.6rem; font-weight: 665; letter-spacing: -.04em; }
.author-card p { margin-block: 6px 14px; font-size: .91rem; }
.author-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.missing-actions { padding-block: 34px 70px; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface-muted); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 9px; min-height: 77px; padding-block: 13px; }
.footer-brand { display: grid; justify-items: start; gap: 7px; min-width: 0; }
.footer-records { display: flex; align-items: center; }
.filing-link { color: var(--strong-accent); font-size: .8rem; font-weight: 650; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.filing-link:hover { color: var(--ink); }
.footer-inner small { color: var(--muted); font: 500 .72rem/1.3 var(--font-mono); white-space: nowrap; }
.footer-inner > .text-link { justify-self: end; }

@media (max-width: 960px) {
  .wrap { --gutter: clamp(20px, 3.9vw, 42px); }
  .archive-filters { grid-template-columns: minmax(155px, .75fr) minmax(0, 1.55fr); }
  .section-heading { margin-bottom: 15px; }
  .reading-layout { grid-template-columns: minmax(0, 1fr) minmax(145px, 23%); }
}

@media (max-width: 720px) {
  :root { --masthead-height: 104px; }
  .masthead { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 57px 46px; gap: 0 9px; }
  .site-nav { grid-area: 2 / 1 / 3 / 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
  .site-nav a { font-size: .83rem; }
  .site-nav a[aria-current='page']::after { inset-inline: 15%; }
  .site-controls { grid-area: 1 / 2; gap: 7px; }
  .theme-toggle { width: 40px; }
  .theme-toggle { min-height: 40px; }
  .home-story-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-link h3 { max-width: 19ch; }
  .topic-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-topics { padding-block: 37px 45px; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); justify-content: start; }
  .article-toc { position: static; grid-area: 1 / 1; }
  .article-body { grid-area: 2 / 1; }
  .about-layout { grid-template-columns: minmax(0, 1fr); }
  .author-card { max-width: 350px; }
  .archive-filters { grid-template-columns: minmax(0, 1fr); }
  .archive-entry { grid-template-columns: minmax(0, 1fr); padding: 15px 8px; }
  .archive-date { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; }
  .tags-layout { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 365px) {
  .code-scroll-hint { display: none; }
}

.topic-index a:is(:hover, :focus-visible)::after {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px var(--accent);
  content: '';
  pointer-events: none;
}
:is(.feature-card, .tag-card) { transition: border-color 180ms ease-out; }
:is(.feature-card, .tag-card):is(:hover, :focus-within) { border-color: var(--accent); }
:is(.topic-index a, .feature-link, .recent-list a, .archive-entry h2 a, .tag-card a, .next-post) > .icon {
  transition: transform 180ms ease-out;
}
:is(.topic-index a, .feature-link, .recent-list a, .archive-entry h2 a, .tag-card a, .next-post):is(:hover, :focus-visible) > .icon {
  transform: translate(2px, -2px);
}
[data-reveal='entered'], [data-filter-in] { animation: content-enter 280ms ease-out both; }
@keyframes content-enter {
  from { opacity: .55; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
  .hud-button:is(:hover, :focus-visible) .icon, :is(.topic-index a, .feature-link, .recent-list a, .archive-entry h2 a, .tag-card a, .next-post):is(:hover, :focus-visible) > .icon { transform: none; }
  .hud-button:is(:hover, :focus-visible)::after { inset: -2px; }
}
