/* TypeScript in Production. No framework, remote fonts, or CSS build step.
   Low-specificity theme tokens allow the existing renderer's DesignCSS overrides. */
:root {
  color-scheme: light;
  --bg: #fafcff; --surface: #f0f5fc; --surface-2: #e3ecf9; --ink: #162a43;
  --muted: #526781; --line: #d8e3f0; --accent: #2861d9; --accent-text: #2256ba;
  --accent-soft: #e6efff; --header-bg: rgba(250,252,255,.97); --code-bg: #eef4fc;
  --font-size: 16px; --measure: 47rem; --radius: 7px; --shadow: 0 18px 70px #102c5526;
}
:root:where([data-theme="dark"]) {
  color-scheme: dark;
  --bg: #0c1523; --surface: #131f32; --surface-2: #1c2c44; --ink: #eaf1fc;
  --muted: #9dafc7; --line: #2a3a52; --accent: #77a9ff; --accent-text: #a9c9ff;
  --accent-soft: #172f55; --header-bg: rgba(12,21,35,.97); --code-bg: #131f32;
  --shadow: 0 18px 70px #0008;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0c1523; --surface: #131f32; --surface-2: #1c2c44; --ink: #eaf1fc;
    --muted: #9dafc7; --line: #2a3a52; --accent: #77a9ff; --accent-text: #a9c9ff;
    --accent-soft: #172f55; --header-bg: rgba(12,21,35,.97); --code-bg: #131f32;
    --shadow: 0 18px 70px #0008;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 100px; scrollbar-gutter: stable; }
body { margin: 0; font: var(--font-size)/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
body:has(dialog[open]) { overflow: hidden; }
::selection { color: var(--ink); background: var(--accent-soft); }
a { color: var(--accent-text); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
main:focus { outline: none; }
h1,h2,h3,h4 { line-height: 1.2; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem,4vw,3.4rem); font-weight: 730; margin: 0 0 20px; }
h2 { font-size: 1.6rem; margin: 0 0 12px; }
h3 { font-size: 1.2rem; margin: 0 0 10px; }
p { margin: 0 0 16px; }
.shell { width: min(100%,1240px); margin-inline: auto; padding-inline: 32px; }
main.shell { padding-top: 36px; padding-bottom: 76px; min-height: calc(100vh - 270px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; background: var(--bg); border: 2px solid var(--accent); border-radius: 6px; padding: 10px 16px; }
.skip-link:focus { top: 12px; }
.muted, .meta { color: var(--muted); }
.meta { font-size: .79rem; line-height: 1.6; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--accent-text); font: 600 .7rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .055em; text-transform: uppercase; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lede { font-size: 1.1rem; line-height: 1.65; color: var(--muted); max-width: 43rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 20px; width: fit-content; min-height: 46px; padding: 10px 20px; border: 1px solid transparent; border-radius: 7px; background: #2256ba; color: #fff; font-size: .88rem; font-weight: 600; line-height: 1.5; text-decoration: none; }
.button:hover { background: #194696; text-decoration: none; }
.button span { font-size: 1.15rem; }
.icon-button { width: 40px; height: 40px; display: inline-grid; place-items: center; border: 0; border-radius: 6px; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--ink); background: var(--surface); }
kbd { font: .72rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--bg); }

/* The header stays useful without JavaScript: menu links are never hidden by default. */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--header-bg); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand-name { font-size: 1.1rem; font-weight: 740; letter-spacing: -.045em; }
.brand-logo { width: 35px; height: 35px; display: block; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-fallback { font-size: 1.8rem; line-height: 1; font-weight: 850; color: var(--accent-text); letter-spacing: -.15em; padding-right: 8px; }
.brand-fallback span { font-size: .9rem; }
#site-menu { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex: 1; }
.nav-links,.nav-tools { display: flex; align-items: center; gap: 20px; }
.nav-links a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; color: var(--muted); font-size: .84rem; font-weight: 550; border-bottom: 2px solid transparent; padding-top: 2px; }
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.nav-tools { gap: 12px; }
.nav-search { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; min-height: 38px; padding: 6px 10px; text-decoration: none; font-size: .8rem; }
.nav-search svg { width: 16px; height: 16px; }
.nav-search kbd { margin-left: 16px; font-size: .65rem; }
.theme-switch { display: flex; align-items: center; gap: 1px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; }
.theme-switch button { display: inline-grid; place-items: center; width: 31px; height: 31px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 4px; }
.theme-switch svg { width: 16px; height: 16px; }
.theme-switch button:hover { background: var(--surface); color: var(--ink); }
.theme-switch button[aria-pressed="true"] { color: var(--accent-text); background: var(--accent-soft); }
.menu-toggle { display: none; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); padding: 8px 10px; gap: 7px; align-items: center; font-size: .83rem; }

/* Shared article and listing primitives; TypeScript homepage composition follows below. */
.home-intro { padding: 12px 0 36px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.intro-eyebrow { margin-bottom: 16px; }
.status-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.home-intro h1 { max-width: 900px; margin-bottom: 12px; font-size: clamp(2.25rem,4.3vw,3.4rem); }
.home-intro .lede { margin-bottom: 0; max-width: none; font-size: 1rem; }
.home-layout { display: grid; grid-template-columns: minmax(0,1fr) 232px; gap: 48px; align-items: start; }
.notes-column { min-width: 0; }
.featured-note { display: grid; grid-template-columns: 1.2fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 36px; }
.featured-copy { min-width: 0; padding: 27px 26px; display: flex; flex-direction: column; }
.featured-label { display: flex; justify-content: space-between; }
.featured-copy h2 { font-size: clamp(1.3rem,2vw,1.7rem); line-height: 1.22; margin: 0 0 14px; }
.featured-copy h2 a { color: var(--ink); text-decoration: none; }
.featured-copy h2 a:hover { color: var(--accent-text); }
.featured-copy>p:not(.eyebrow) { color: var(--muted); font-size: .85rem; line-height: 1.65; }
.featured-bottom { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .73rem; }
.featured-bottom time { color: var(--muted); }
.featured-bottom a { text-decoration: none; font-weight: 650; }
.featured-bottom a span { margin-left: 4px; }
.featured-media { display: block; min-height: 260px; background: #122645; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-no-cover { grid-template-columns: 1fr; }
.featured-no-cover .featured-copy { padding: 28px 32px; }
.section-heading { display: flex; gap: 20px; align-items: baseline; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: 1.03rem; font-weight: 700; letter-spacing: -.015em; }
.section-heading>a { font-size: .8rem; text-decoration: none; }
.note-list { list-style: none; margin: 0; padding: 0; }
.note-row { padding: 24px 0; border-bottom: 1px solid var(--line); }
.note-row.has-cover { display: grid; grid-template-columns: minmax(0,1fr) 142px; gap: 28px; align-items: center; }
.note-row-body { min-width: 0; }
.note-row .eyebrow { font-size: .65rem; margin-bottom: 8px; }
.note-row h2 { font-size: 1.26rem; line-height: 1.32; letter-spacing: -.025em; margin-bottom: 9px; }
.note-row h2 a { color: var(--ink); text-decoration: none; }
.note-row h2 a:hover { color: var(--accent-text); }
.note-summary { font-size: .87rem; line-height: 1.65; color: var(--muted); margin-bottom: 10px; }
.note-row .meta { font-size: .73rem; margin-bottom: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.note-thumbnail { display: block; border-radius: 8px; background: var(--surface); overflow: hidden; border: 1px solid var(--line); }
.note-thumbnail img { width: 100%; aspect-ratio: 1.45; object-fit: cover; }
.updated-label { font-size: .69rem; color: var(--muted); padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; }
.home-sidebar { position: sticky; top: 112px; }
.topic-panel { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.topic-panel h2,.sidebar-follow h2 { font-size: .91rem; letter-spacing: -.015em; margin: 0 0 15px; }
.topic-panel nav { display: flex; flex-direction: column; gap: 2px; }
.topic-panel a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; padding: 7px 10px; margin-left: -10px; text-decoration: none; color: var(--muted); font-size: .84rem; border-radius: 5px; }
.topic-panel a:hover,.topic-panel a[aria-current] { color: var(--accent-text); background: var(--accent-soft); }
.topic-count { font: .7rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); }
.sidebar-follow { padding-top: 27px; }
.sidebar-follow>svg { color: var(--accent-text); width: 19px; margin-bottom: 13px; }
.sidebar-follow h2 { margin-bottom: 9px; }
.sidebar-follow p { color: var(--muted); font-size: .82rem; }
.sidebar-follow a { font-size: .8rem; text-decoration: none; font-weight: 550; }

/* Listings and crawlable pagination. */
.page-head { padding: 18px 0 28px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .76rem; color: var(--muted); margin-bottom: 30px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-text); }
.title-row { display: flex; align-items: baseline; gap: 20px; }
.title-row h1 { margin-bottom: 12px; }
.page-head .lede { margin-bottom: 0; }
.term-row { display: flex; flex-wrap: wrap; gap: 9px; padding-bottom: 27px; border-bottom: 1px solid var(--line); }
.chip { display: inline-flex; gap: 8px; align-items: center; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); text-decoration: none; font-size: .76rem; }
.chip span { opacity: .7; font-size: .7rem; }
.chip:hover,.chip[aria-current] { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }
.listing-column { max-width: 980px; }
.listing-column .note-row { padding-block: 28px; }
.listing-column .note-row.has-cover { grid-template-columns: minmax(0,1fr) 175px; }
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 28px; font-size: .78rem; }
.pager a { text-decoration: none; color: var(--muted); }
.pager-step { display: inline-flex; min-height: 40px; align-items: center; gap: 10px; }
.pager a:hover { color: var(--accent-text); }
.pager-off { color: var(--muted); opacity: .55; }
.pager-pages { display: flex; align-items: center; gap: 6px; padding: 0; margin: 0; list-style: none; }
.pager-pages a { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: 6px; }
.pager-pages a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); border-color: var(--line); font-weight: 700; }
.pager-gap { padding: 6px; color: var(--muted); }
.empty-state { padding: 40px 0; color: var(--muted); }
.empty-state h2 { color: var(--ink); font-size: 1.2rem; }

/* Article. Everything needed to read the post is already in the HTML. */
.article-breadcrumb { margin-top: 6px; margin-bottom: 28px; }
.article-layout { display: grid; grid-template-columns: minmax(0,var(--measure)) minmax(175px,1fr); gap: 72px; }
.article-main { min-width: 0; }
.post-head h1 { font-size: clamp(2rem,3.7vw,3.05rem); line-height: 1.12; }
.post-head .lede { font-size: 1.08rem; margin-bottom: 22px; }
.post-byline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; color: var(--muted); font-size: .74rem; line-height: 1.8; padding-bottom: 27px; }
.author-name { color: var(--ink); text-decoration: none; font-weight: 650; }
.post-cover { margin: 0 0 30px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.post-cover img { width: 100%; max-height: 410px; object-fit: cover; }
.article-sidebar { position: sticky; top: 116px; height: fit-content; padding-top: 8px; }
.toc { margin-bottom: 30px; }
.toc h2 { font-size: .7rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 15px; color: var(--muted); }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li { font-size: .79rem; line-height: 1.5; }
.toc li[data-level="3"] { padding-left: 12px; font-size: .74rem; }
.toc a { display: block; padding: 8px 0 8px 15px; margin-left: -1px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.toc a:hover,.toc a[aria-current] { border-left-color: var(--accent); color: var(--accent-text); }
.discussion-link { display: flex; align-items: center; gap: 8px; font-size: .77rem; font-weight: 550; text-decoration: none; padding-top: 22px; border-top: 1px solid var(--line); }
.discussion-link svg { width: 17px; height: 17px; }
.correction-link { display: block; margin-top: 12px; font-size: .72rem; color: var(--muted); text-decoration: none; }
.prose { font-size: 1.02rem; line-height: 1.85; overflow-wrap: anywhere; }
.prose>p { margin-bottom: 21px; }
.prose h2 { font-size: 1.62rem; margin-top: 40px; margin-bottom: 15px; scroll-margin-top: 10px; }
.prose h3 { font-size: 1.24rem; margin-top: 30px; margin-bottom: 12px; }
.prose h4 { font-size: 1.08rem; margin-top: 24px; margin-bottom: 10px; }
.prose ul,.prose ol { padding-left: 24px; margin-bottom: 24px; }
.prose li { padding-left: 4px; margin-bottom: 8px; }
.prose a { font-weight: 500; }
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; padding: 2px 5px; border-radius: 4px; background: var(--surface-2); }
.prose pre { position: relative; overflow-x: auto; background: var(--code-bg); border: 1px solid var(--line); border-radius: 9px; padding: 46px 22px 23px; margin: 24px 0; font-size: .88rem; line-height: 1.75; max-width: 100%; }
.prose pre code { padding: 0; background: none; border-radius: 0; font-size: 1em; overflow-wrap: normal; }
.code-copy { position: absolute; top: 10px; right: 10px; min-height: 29px; border: 1px solid var(--line); border-radius: 4px; padding: 3px 9px; color: var(--muted); background: var(--bg); font-size: .7rem; }
.code-copy:hover { color: var(--accent-text); border-color: var(--accent); }
.copy-status { font-size: .72rem; color: var(--muted); }
.prose blockquote { margin: 27px 0; padding: 14px 21px; border-left: 3px solid var(--accent); border-radius: 0 7px 7px 0; color: var(--muted); background: var(--accent-soft); }
.prose blockquote>:last-child { margin-bottom: 0; }
.prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; margin-block: 25px; font-size: .88rem; }
.prose th,.prose td { border-bottom: 1px solid var(--line); padding: 11px 15px; text-align: left; min-width: 130px; }
.prose th { background: var(--surface); font-weight: 650; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 35px 0; }
.prose figure { margin: 28px 0; }
.prose figure img { border-radius: 8px; }
.prose figcaption { font-size: .8rem; color: var(--muted); margin-top: 10px; }
.post-foot { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.terms { display: flex; flex-wrap: wrap; gap: 7px; }
.related { margin-top: 48px; }
.related .note-row h2 { font-size: 1.13rem; }
.related .note-row.has-cover { grid-template-columns: minmax(0,1fr) 112px; }

/* Guest comments, intentionally plain text. Approved comments are server data. */
.comments { margin-top: 50px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; scroll-margin-top: 100px; }
.comments .section-heading { border-bottom: 0; padding-bottom: 15px; gap: 12px; }
.comments .section-heading h2 { font-size: 1.2rem; }
.comments .section-heading .meta { font-size: .71rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { border-bottom: 1px solid var(--line); padding-block: 18px; }
.comment-header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; font-size: .84rem; }
.comment-header time { color: var(--muted); font-size: .72rem; }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .88rem; margin: 9px 0 0; }
.comment-reply { margin-top: 15px; margin-left: 20px; padding-left: 16px; border-left: 2px solid var(--accent); }
.comments-status { color: var(--muted); font-size: .84rem; margin-bottom: 22px; }
.comment-form { display: grid; gap: 17px; }
.comment-name-field { max-width: 300px; }
.field-footer { display: flex; gap: 20px; justify-content: space-between; margin-top: -9px; color: var(--muted); font-size: .72rem; }
.field-footer p { margin: 0; }
.character-count { white-space: nowrap; }

/* Forms post to the existing server; enhancement never invents delivery. */
label { display: grid; gap: 7px; font-size: .82rem; font-weight: 600; }
input,textarea { width: 100%; min-width: 0; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; font-weight: 400; font-size: .9rem; line-height: 1.55; }
input::placeholder,textarea::placeholder { color: var(--muted); opacity: .8; }
input:hover,textarea:hover { border-color: var(--muted); }
input:focus,textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 120px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: .82rem; color: var(--muted); }
.form-status:empty { display: none; }
.form-status:not(:empty) { border-left: 2px solid var(--accent); padding: 10px 13px; background: var(--accent-soft); }
.field-help { color: var(--muted); font-size: .76rem; margin: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-layout { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1fr); gap: 90px; padding: 20px 0 40px; }
.contact-layout .page-head { padding-top: 10px; }
.contact-layout h1 { font-size: clamp(2.4rem,4vw,3.3rem); }
.contact-layout .page-head>p:not(.eyebrow) { color: var(--muted); font-size: .97rem; }
.contact-layout .page-head .lede { margin-bottom: 24px; font-size: 1.1rem; }
.contact-direct { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 35px; display: grid; gap: 5px; }
.contact-direct a { font-size: .9rem; overflow-wrap: anywhere; }
.contact-form { display: grid; align-content: start; gap: 22px; padding: 28px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.subscribe-panel { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 40px; }
.subscribe-panel h2 { font-size: 1.2rem; }
.subscribe-form { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; }
.subscribe-form>label:not(.honeypot) { flex: 1; min-width: 200px; }
.info-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; padding: 22px 0 40px; }
.info-layout .page-head { padding-top: 0; }
.info-layout h1 { max-width: 400px; }
.info-content .prose { font-size: 1.06rem; }
.info-content .prose>:first-child { margin-top: 0; }
.info-links { display: flex; flex-wrap: wrap; gap: 24px; border-top: 1px solid var(--line); padding-top: 25px; margin-top: 30px; font-size: .85rem; }
.independence-note { font-size: .76rem; color: var(--muted); margin-top: 28px; }

/* Search page and accessible native dialog share the same result rows. */
.search-page-head { max-width: 840px; margin-inline: auto; padding-top: 22px; }
.search-page { max-width: 840px; margin-inline: auto; }
.search-form { display: flex; gap: 12px; align-items: center; padding: 7px 8px 7px 17px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; }
.search-form:focus-within { border-color: var(--accent); }
.search-form>svg { width: 19px; height: 19px; color: var(--muted); }
.search-form input { border: 0; background: transparent; border-radius: 3px; padding: 7px 0; min-height: 38px; outline-offset: 1px; }
.search-form button { align-self: stretch; padding: 8px 17px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--ink); font-size: .8rem; font-weight: 600; }
.search-form button:hover { color: var(--accent-text); border-color: var(--accent); }
.search-status { color: var(--muted); font-size: .79rem; margin: 20px 0 8px; }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-hit { padding: 21px 0; border-bottom: 1px solid var(--line); }
.search-results.has-media .search-hit { display: grid; grid-template-columns: 86px minmax(0,1fr); gap: 20px; align-items: start; }
.search-results.has-media .search-hit-body { grid-column: 2; }
.search-hit-media { display: block; overflow: hidden; border-radius: 6px; }
.search-hit-media img { width: 86px; height: 70px; object-fit: cover; background: var(--surface); }
.search-hit h2 { font-size: 1.06rem; letter-spacing: -.025em; line-height: 1.35; margin: 0 0 7px; }
.search-hit h2 a { color: var(--ink); text-decoration: none; }
.search-hit h2 a:hover { color: var(--accent-text); }
.search-hit .eyebrow { font-size: .63rem; margin: 0 0 7px; }
.search-hit-summary { font-size: .83rem; color: var(--muted); line-height: 1.6; margin: 0 0 8px; }
.search-hit .meta { font-size: .7rem; margin: 0; }
.search-dialog { width: min(710px,calc(100% - 32px)); max-height: min(760px,85dvh); padding: 24px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--bg); box-shadow: var(--shadow); overflow-y: auto; }
.search-dialog::backdrop { background: #110c236b; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 20px; }
.dialog-heading h2 { font-size: 1.2rem; margin: 0; }
.search-dialog .search-status { margin-top: 16px; }
.search-dialog .search-hit { padding-block: 17px; }
.search-dialog .search-hit-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.search-foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 20px; font-size: .72rem; color: var(--muted); }
.search-foot a { text-decoration: none; }

/* Quiet end of page. */
.message-page { max-width: 750px; margin: 30px auto 50px; text-align: center; padding: 20px 0; }
.message-page .eyebrow { justify-content: center; }
.message-page .lede { margin-inline: auto; }
.message-symbol { display: inline-grid; place-items: center; width: 62px; height: 62px; font-size: 1.6rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); margin-bottom: 24px; }
.error-code { display: block; color: var(--accent-text); font: 700 5rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -.09em; margin-bottom: 25px; }
.message-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 25px; }
.text-link { font-size: .87rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { padding-block: 30px; display: grid; grid-template-columns: 1fr auto; gap: 12px 36px; align-items: start; }
.footer-brand { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .96rem; letter-spacing: -.03em; }
.footer-brand span { color: var(--accent-text); margin-left: 2px; }
.footer-inner p { color: var(--muted); font-size: .76rem; margin: 5px 0 0; }
.site-footer nav { display: flex; gap: 24px; font-size: .78rem; padding-top: 4px; }
.site-footer nav a { color: var(--muted); text-decoration: none; }
.footer-inner .copyright { grid-column: 1/-1; font-size: .68rem; margin-top: 5px; }

@media (max-width: 1120px) {
  .header-inner { gap: 22px; }
  .nav-links { gap: 14px; }
  #site-menu { gap: 18px; }
  .nav-search kbd { display: none; }
  .home-layout { gap: 32px; grid-template-columns: minmax(0,1fr) 200px; }
  .featured-copy { padding: 23px 22px; }
  .article-layout { gap: 42px; }
  .contact-layout,.info-layout { gap: 48px; }
}
@media (max-width: 920px) {
  .header-inner { flex-wrap: wrap; padding-block: 12px; min-height: 68px; gap: 12px; }
  .site-header[data-menu] .menu-toggle:not([hidden]) { display: flex; margin-left: auto; }
  #site-menu { flex-basis: 100%; padding-bottom: 8px; }
  .site-header[data-menu="closed"] #site-menu { display: none; }
  .site-header[data-menu="open"] #site-menu { display: flex; }
  .nav-links a { min-height: 44px; }
  .home-layout { grid-template-columns: minmax(0,1fr); }
  .home-sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-top: 1px solid var(--line); padding-top: 28px; }
  .topic-panel { border-bottom: 0; padding-bottom: 0; }
  .sidebar-follow { padding-top: 0; }
  .article-layout { grid-template-columns: minmax(0,1fr); }
  .article-main { max-width: var(--measure); width: 100%; margin-inline: auto; }
  .article-sidebar { display: none; }
  .post-head h1 { font-size: clamp(2rem,5vw,3rem); }
  .contact-layout,.info-layout { grid-template-columns: 1fr; gap: 16px; max-width: 760px; margin-inline: auto; padding-top: 0; }
  .contact-layout .page-head { padding-bottom: 20px; }
  .info-layout h1 { max-width: none; }
  .info-content { padding-top: 10px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 84px; }
  .shell { padding-inline: 20px; }
  main.shell { padding-top: 22px; padding-bottom: 45px; }
  .header-inner { padding-block: 10px; }
  .brand-name { font-size: 1.02rem; }
  .brand-logo { width: 31px; height: 31px; }
  #site-menu { align-items: stretch; flex-direction: column; gap: 14px; }
  .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; }
  .nav-links a { padding: 6px 10px; border: 0; border-radius: 5px; }
  .nav-links a[aria-current] { background: var(--accent-soft); }
  .nav-tools { justify-content: space-between; }
  .nav-search { min-height: 44px; padding-inline: 13px; flex: 1; }
  .theme-switch button { width: 39px; height: 38px; }
  .home-intro { padding-top: 10px; padding-bottom: 26px; margin-bottom: 25px; }
  .home-intro h1 { font-size: 2.25rem; line-height: 1.13; margin-bottom: 14px; }
  .home-intro .lede { font-size: .93rem; }
  .intro-eyebrow { font-size: .62rem; margin-bottom: 14px; }
  .featured-note { display: flex; flex-direction: column-reverse; margin-bottom: 29px; }
  .featured-media { min-height: 0; height: 175px; }
  .featured-media img { object-position: center; }
  .featured-copy { padding: 22px; }
  .featured-copy h2 { font-size: 1.5rem; }
  .featured-copy>p:not(.eyebrow) { font-size: .88rem; }
  .featured-bottom { font-size: .74rem; padding-top: 6px; }
  .section-heading { gap: 10px; padding-bottom: 13px; }
  .section-heading .meta { font-size: .71rem; }
  .note-row { padding-block: 22px; }
  .note-row.has-cover,.listing-column .note-row.has-cover { grid-template-columns: minmax(0,1fr) 82px; gap: 17px; }
  .note-row h2 { font-size: 1.13rem; line-height: 1.3; }
  .note-row .eyebrow { font-size: .61rem; }
  .note-summary { font-size: .81rem; line-height: 1.6; }
  .note-thumbnail { align-self: start; margin-top: 28px; border-radius: 6px; }
  .note-thumbnail img { aspect-ratio: 1; }
  .home-sidebar { grid-template-columns: 1fr; gap: 30px; }
  .topic-panel nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .sidebar-follow { border-top: 1px solid var(--line); padding-top: 25px; }
  .sidebar-follow>svg { display: none; }
  .page-head { padding-top: 10px; }
  .page-head h1 { font-size: 2.3rem; }
  .title-row { align-items: start; flex-direction: column; gap: 0; }
  .title-row .meta { margin-bottom: 12px; }
  .breadcrumb { margin-bottom: 23px; font-size: .72rem; }
  .pager { font-size: .72rem; gap: 8px; }
  .pager-step { gap: 5px; }
  .pager-pages { gap: 3px; }
  .pager-pages a { width: 30px; height: 34px; }
  .post-head h1 { font-size: 2.13rem; }
  .post-head .lede { font-size: .98rem; }
  .post-byline { font-size: .7rem; }
  .post-cover { margin-bottom: 24px; }
  .prose { font-size: .97rem; }
  .prose h2 { font-size: 1.44rem; margin-top: 33px; }
  .prose pre { margin-inline: -4px; font-size: .8rem; padding-inline: 16px; max-width: calc(100% + 8px); }
  .post-foot { gap: 10px; }
  .comments { padding: 20px 16px; margin-top: 35px; }
  .comments .section-heading { flex-wrap: wrap; gap: 5px; }
  .comment-name-field { max-width: none; }
  .field-footer { font-size: .69rem; gap: 10px; }
  .character-count { display: none; }
  .related .note-row.has-cover { grid-template-columns: minmax(0,1fr) 82px; }
  .contact-layout h1 { font-size: 2.4rem; }
  .contact-form { padding: 21px 18px; gap: 20px; }
  .form-row { grid-template-columns: 1fr; gap: 20px; }
  .contact-direct { margin-top: 24px; padding-top: 20px; }
  input,textarea,.search-form input { font-size: 16px; }
  .search-form { padding-left: 12px; gap: 9px; }
  .search-form button { padding-inline: 11px; }
  .search-form input { width: 100%; }
  .search-dialog { padding: 18px; width: calc(100% - 24px); max-height: 88dvh; }
  .search-results.has-media .search-hit { grid-template-columns: 62px minmax(0,1fr); gap: 13px; }
  .search-hit-media img { width: 62px; height: 59px; }
  .search-hit h2 { font-size: .99rem; }
  .search-hit-summary { font-size: .77rem; }
  .search-dialog .search-hit-summary { display: none; }
  .search-foot { font-size: .67rem; }
  .message-page { margin-block: 16px 25px; }
  .message-page h1 { font-size: 2.2rem; }
  .footer-inner { grid-template-columns: 1fr; padding-block: 25px; gap: 18px; }
  .site-footer nav { gap: 23px; padding-top: 0; }
  .footer-inner .copyright { margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header,.site-footer,.article-sidebar,.comments,.related,.code-copy,.subscribe-panel { display: none !important; }
  :root { --bg: white; --ink: black; --muted: #444; --line: #ccc; --surface: #f5f5f5; --code-bg: #f5f5f5; --accent-text: black; }
  .shell { width: 100%; padding: 0; }
  .article-layout { display: block; }
  .prose pre { white-space: pre-wrap; }
}

/* TypeScript in Production: split opening, topic shortcuts, and thumbnail-led index. */
.header-inner { min-height: 70px; gap: 28px; }
.brand-name { font-size: 1.04rem; letter-spacing: -.025em; }
.brand-logo { width: 34px; height: 34px; flex: 0 0 34px; }
.brand-fallback { font-size: 1.35rem; letter-spacing: -.06em; }
#site-menu { gap: 20px; }
.nav-links { gap: 17px; }
.nav-search kbd { margin-left: 8px; }
.ts-front { display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: 58px; padding-block: 12px 40px; align-items: start; }
.ts-introduction { min-width: 0; }
.home-intro { padding: 4px 0 26px; margin: 0; border: 0; }
.home-intro h1 { font-size: clamp(2.6rem,4.4vw,3.75rem); line-height: 1.06; letter-spacing: -.05em; max-width: 10ch; margin-bottom: 20px; text-wrap: pretty; }
.home-intro .lede { font-size: 1rem; line-height: 1.75; max-width: 36ch; }
.intro-eyebrow { font-size: .63rem; letter-spacing: .035em; margin-bottom: 21px; }
.ts-topics { padding-top: 21px; border-top: 2px solid var(--ink); }
.ts-topics h2 { font-size: .79rem; letter-spacing: 0; margin-bottom: 9px; }
.ts-topics nav { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.ts-topics a { min-height: 43px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 7px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .75rem; line-height: 1.45; color: var(--ink); text-decoration: none; }
.ts-topics a:hover { color: var(--accent-text); }
.ts-topics a>span:last-child { color: var(--accent-text); }
.featured-note { display: flex; flex-direction: column; border-radius: 7px; margin: 0; border: 1px solid var(--line); background: var(--bg); box-shadow: 0 5px 0 var(--accent-soft); }
.featured-media { min-height: 0; height: auto; aspect-ratio: 16/6; overflow: hidden; border-bottom: 1px solid var(--line); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-copy { padding: 24px 28px 25px; }
.featured-copy h2 { font-size: clamp(1.45rem,2.2vw,1.95rem); line-height: 1.22; max-width: 30ch; letter-spacing: -.035em; }
.featured-copy>p:not(.eyebrow) { font-size: .88rem; line-height: 1.7; max-width: 55ch; }
.featured-label { margin-bottom: 12px; font-size: .65rem; }
.featured-bottom { font-size: .73rem; padding-top: 7px; }
.featured-no-cover .featured-copy { padding: 30px; min-height: 330px; }
.ts-front-no-lead { grid-template-columns: 1fr; padding-bottom: 34px; }
.ts-front-no-lead .ts-introduction { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 60px; }
.ts-front-no-lead .ts-topics { align-self: center; }
.ts-front-no-lead .home-intro h1 { max-width: 17ch; }
.ts-article-index { border-top: 2px solid var(--ink); }
.ts-article-index>.section-heading { padding-block: 20px 18px; }
.ts-article-index .section-heading h2 { font-size: 1.13rem; }
.note-row.has-cover,.listing-column .note-row.has-cover { grid-template-columns: 176px minmax(0,1fr); gap: 30px; }
.note-row.has-cover .note-row-body { grid-column: 2; grid-row: 1; }
.note-thumbnail { grid-column: 1; grid-row: 1; border-radius: 5px; }
.note-thumbnail img { aspect-ratio: 16/10; }
.note-row h2 { font-size: 1.35rem; max-width: 47rem; }
.note-summary { max-width: 48rem; }
.note-row .eyebrow { font-size: .62rem; }
.listing-column { max-width: 1050px; }
.ts-follow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; border-top: 1px solid var(--line); margin-top: 38px; padding-top: 23px; }
.ts-follow p { margin: 0; font-size: .86rem; color: var(--muted); }
.ts-follow a { font-size: .8rem; font-weight: 600; text-decoration: none; }
.article-layout { gap: 60px; }
.article-sidebar { border-top: 2px solid var(--accent); padding-top: 21px; }
.prose pre { border-radius: 5px; border-left: 3px solid var(--accent); }
.related .note-row.has-cover { grid-template-columns: 112px minmax(0,1fr); }
.comments { background: var(--bg); border-radius: 6px; border-top: 3px solid var(--accent); }
@media (max-width: 1120px) {
  .header-inner { gap: 19px; }
  .brand-name { font-size: .96rem; }
  #site-menu { gap: 16px; }
  .nav-links { gap: 12px; }
  .nav-tools { gap: 9px; }
  .ts-front { gap: 36px; }
  .ts-topics nav { column-gap: 17px; }
  .featured-copy { padding: 23px; }
  .article-layout { gap: 38px; }
}
@media (max-width: 920px) {
  .header-inner { gap: 12px; }
  .brand-name { font-size: 1.04rem; }
  .article-layout { display: block; }
  .article-main { margin-inline: auto; }
}
@media (max-width: 820px) {
  .ts-front { grid-template-columns: 1fr; gap: 28px; padding-bottom: 32px; }
  .ts-introduction { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 35px; }
  .home-intro { padding-bottom: 0; }
  .home-intro h1 { font-size: 2.9rem; max-width: 10ch; }
  .ts-topics { align-self: start; padding-top: 14px; }
  .ts-topics nav { grid-template-columns: 1fr; }
  .featured-media { aspect-ratio: 16/5; }
  .featured-copy h2 { max-width: 40ch; }
  .ts-front-no-lead .ts-introduction { gap: 35px; }
}
@media (max-width: 600px) {
  .header-inner { min-height: 68px; }
  .brand { min-width: 0; max-width: calc(100% - 94px); white-space: normal; gap: 8px; }
  .brand-name { font-size: .94rem; line-height: 1.18; max-width: 175px; }
  .brand-logo { width: 30px; height: 30px; flex-basis: 30px; }
  .menu-toggle { padding-inline: 9px; }
  .ts-front { padding-top: 3px; gap: 27px; }
  .ts-introduction,.ts-front-no-lead .ts-introduction { display: block; }
  .home-intro { padding-bottom: 25px; }
  .home-intro h1 { max-width: 13ch; font-size: 2.8rem; margin-bottom: 17px; }
  .home-intro .lede { font-size: .94rem; max-width: none; }
  .intro-eyebrow { font-size: .6rem; margin-bottom: 16px; }
  .ts-topics { padding-top: 17px; }
  .ts-topics nav { grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .ts-topics a { min-height: 46px; font-size: .74rem; }
  .featured-note { flex-direction: column; margin-bottom: 0; }
  .featured-media { height: auto; aspect-ratio: 16/7; }
  .featured-copy,.featured-no-cover .featured-copy { padding: 21px 20px; }
  .featured-copy h2 { font-size: 1.5rem; }
  .featured-no-cover .featured-copy { min-height: 0; }
  .ts-article-index>.section-heading { padding-block: 17px; }
  .ts-article-index .section-heading h2 { font-size: 1rem; }
  .note-row.has-cover,.listing-column .note-row.has-cover,.related .note-row.has-cover { grid-template-columns: 76px minmax(0,1fr); gap: 16px; }
  .note-thumbnail { margin-top: 3px; border-radius: 4px; }
  .note-thumbnail img { aspect-ratio: 1; }
  .note-row h2 { font-size: 1.07rem; }
  .note-row .eyebrow { font-size: .6rem; }
  .note-summary { font-size: .8rem; }
  .related .note-row h2 { font-size: 1.05rem; }
  .ts-follow { margin-top: 30px; padding-top: 20px; }
}
@media (max-width: 360px) {
  .brand-name { font-size: .87rem; }
  .brand { gap: 6px; }
  .home-intro h1 { font-size: 2.5rem; }
  .ts-topics nav { column-gap: 13px; }
  .ts-topics a { font-size: .71rem; }
  .note-row.has-cover,.listing-column .note-row.has-cover,.related .note-row.has-cover { grid-template-columns: 62px minmax(0,1fr); gap: 13px; }
}
@media print {
  .ts-front { display: block; }
  .ts-topics,.ts-follow { display: none; }
}

/* Integrate the shared moderated-comment form and Appearance header setting. */
.comment-form button[type="submit"] { justify-self: start; min-height: 44px; padding: 10px 20px; border: 1px solid var(--accent-text); border-radius: 7px; background: var(--accent-text); color: var(--bg); }
.comment-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .84rem; }
.comment-meta time { color: var(--muted); }
.comment-pages { display: flex; justify-content: space-between; gap: 16px; margin-block: 20px; }
.comment-error { padding: 12px; border: 2px solid currentColor; }
.comment-notice { padding: 12px; border: 1px solid var(--accent); }
@media (min-width: 921px) {
  body[data-header="centered"] .header-inner { flex-direction: column; gap: 10px; padding-block: 16px; }
  body[data-header="centered"] #site-menu { flex: none; }
}

/* Language selection */
.language-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.language-switch a { padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; line-height: 1.4; text-decoration: none; color: inherit; }
.language-switch a:hover { border-color: var(--accent); }
.language-switch a[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast, #fff); }
