/* Terminal — deliberately local, no external fonts or UI dependencies. */
:root {
  color-scheme: dark;
  --bg: #101411;
  --surface: #151a16;
  --surface-raised: #1b211c;
  --surface-hover: #202922;
  --text: #dce4da;
  --heading: #f1f5ed;
  --muted: #a5b2a6;
  --faint: #93a295;
  --border: #2b362d;
  --accent: #a3e681;
  --accent-tint: #a3e6810c;
  --blue: #91bbdf;
  --amber: #e4c887;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  --body: var(--mono), 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
html[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f5ef;
  --surface: #fafbf7;
  --surface-raised: #eceedf;
  --surface-hover: #e6ebdf;
  --text: #394738;
  --heading: #192919;
  --muted: #63715e;
  --faint: #63715e;
  --border: #d7dece;
  --accent: #386b23;
  --accent-tint: #386b2308;
  --blue: #285f94;
  --amber: #805615;
}
html[data-accent='amber'] { --accent: #edc77c; --accent-tint: #edc77c0c; }
html[data-accent='cyan'] { --accent: #7bdbd3; --accent-tint: #7bdbd30c; }
html[data-theme='light'][data-accent='amber'] { --accent: #89570f; --accent-tint: #89570f08; }
html[data-theme='light'][data-accent='cyan'] { --accent: #146e74; --accent-tint: #146e7408; }
@media (prefers-color-scheme: light) {
  html[data-theme='auto'] { color-scheme: light; --bg: #f4f5ef; --surface: #fafbf7; --surface-raised: #eceedf; --surface-hover: #e6ebdf; --text: #394738; --heading: #192919; --muted: #63715e; --faint: #63715e; --border: #d7dece; --accent: #386b23; --accent-tint: #386b2308; --blue: #285f94; --amber: #805615; --shadow: 0 20px 80px #20301c20; }
  html[data-theme='auto'][data-accent='amber'] { --accent: #89570f; --accent-tint: #89570f08; }
  html[data-theme='auto'][data-accent='cyan'] { --accent: #146e74; --accent-tint: #146e7408; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; scrollbar-color: var(--border) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 1rem; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
body.with-grid { background-image: radial-gradient(var(--border) .65px, transparent .65px); background-size: 16px 16px; }
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; text-decoration: none; text-underline-offset: 4px; transition: color .15s, background .15s, border-color .15s; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
button, input, summary, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, summary:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
button { border: 0; background: none; }
img { max-width: 100%; height: auto; }
svg { display: block; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.45; }
button[hidden], [hidden] { display: none !important; }
.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; top: -100px; left: 20px; z-index: 100; padding: 12px 20px; background: var(--accent); color: var(--bg); }
.skip-link:focus { top: 16px; }
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; z-index: 30; }
.site-shell { max-width: 1200px; margin: 24px auto 28px; border: 0; border-radius: 0; overflow: clip; background: var(--bg); box-shadow: none; }
.navigation { min-height: 76px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.1875rem; font-weight: 700; color: var(--heading); min-width: 0; }
.brand > span:last-child { overflow-wrap: anywhere; }
.brand-symbol { font-size: 1.375rem; color: var(--accent); letter-spacing: -3px; margin-right: 4px; }
.brand-dot { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 5px; margin-left: auto; flex-wrap: wrap; }
.nav-link { color: var(--text); font-size: 1rem; padding: 9px 5px; border: 1px solid transparent; border-radius: 0; white-space: nowrap; }
.nav-link.active { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.search-trigger { padding: 5px 7px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 1rem; min-height: 44px; }
.search-trigger:hover, .icon-button:hover { color: var(--accent); }
kbd { font-family: var(--mono); font-size: 0.875rem; padding: 1px 5px; border: 1px solid var(--border); border-radius: 0; color: var(--muted); }
.icon-button { min-width: 44px; min-height: 44px; padding: 6px; display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; border: 0; font-size: 0.875rem; background: transparent; }
.menu-toggle { display: none; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
#main-content { min-width: 0; padding: 36px 40px 40px 0; }
#main-content:focus { outline: none; }
.workspace-wide { grid-template-columns: minmax(0, 1fr); }
.workspace-wide #main-content { max-width: 800px; width: 100%; margin: auto; padding-inline: 0; }
.sidebar { border-left: 1px solid var(--border); background: transparent; padding: 36px 0 36px 28px; min-width: 0; }
.hero { padding: 0 0 32px; margin-bottom: 35px; border-bottom: 1px dashed var(--border); }
.hero-topline { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-bottom: 30px; }
.eyebrow { color: var(--muted); font-size: 0.875rem; letter-spacing: .025em; }
.terminal-command { color: var(--muted); font-size: 0.875rem; overflow-wrap: anywhere; }
.prompt-user, .prompt-dollar, .heading-dot { color: var(--accent); }
.prompt-path { color: var(--blue); }
.prompt-dollar { margin-right: 8px; }
.hero h1 { margin: 18px 0 15px; font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.3; letter-spacing: -.025em; font-weight: 600; }
.cursor { display: inline-block; height: .95em; width: .46em; margin-left: 10px; background: var(--accent); vertical-align: -.08em; animation: cursor-blink 1.4s step-end 4; }
@keyframes cursor-blink { 0%, 65%, 100% { opacity: 1; } 66%, 99% { opacity: 0; } }
.hero-description { max-width: 65ch; color: var(--text); font-size: 1rem; line-height: 1.85; margin: 0 0 30px; }
.hero-bottom { display: flex; justify-content: space-between; gap: 15px; font-size: 0.875rem; color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 4px; }
.section-heading h2 { font-size: 1rem; font-weight: 500; margin: 0; }
.section-count { color: var(--muted); font-size: 0.875rem; }
.post-card { padding: 27px 0 26px; border-bottom: 1px dashed var(--border); }
.post-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; font-size: 0.875rem; color: var(--muted); }
.meta-separator { color: var(--faint); }
.category-label { display: inline-block; background: transparent; color: var(--accent); border: 0; padding: 1px 0; font-size: 0.875rem; }
.post-card-meta .category-label { margin-left: auto; }
.post-card h3 { font-size: 1.375rem; margin: 12px 0 10px; letter-spacing: -.025em; }
.post-card h3 a { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.post-arrow { color: var(--faint); font-size: 1.25rem; font-weight: 400; transition: color .15s, transform .15s; }
.post-card h3 a:hover .post-arrow { color: var(--accent); transform: translate(2px, -2px); }
.post-excerpt { color: var(--text); font-size: 1rem; line-height: 1.85; margin: 0 0 18px; }
.post-card-bottom { display: flex; align-items: center; gap: 15px; justify-content: space-between; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px 15px; font-size: 0.875rem; color: var(--muted); }
.read-link { font-size: 0.875rem; color: var(--accent); white-space: nowrap; }
.read-link span { margin-left: 7px; }
.panel-heading { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 400; margin: 0 0 23px; color: var(--muted); }
.panel-heading > span:first-child { color: var(--accent); }
.panel-index { margin-left: auto; color: var(--faint); font-size: 0.875rem; }
.profile-main { display: flex; align-items: center; gap: 13px; }
.avatar { width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 0; object-fit: cover; flex-shrink: 0; }
.avatar-placeholder { background: var(--surface-raised); display: grid; place-items: center; color: var(--accent); font-size: 1.375rem; letter-spacing: -3px; padding-right: 4px; }
.profile-main h3 { font-size: 1.125rem; margin: 0 0 2px; overflow-wrap: anywhere; }
.profile-location { font-size: 0.875rem; color: var(--muted); }
.profile-bio { font-size: 0.875rem; color: var(--muted); line-height: 1.9; margin: 17px 0 20px; }
.profile-stats { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 14px 0; }
.profile-stats a { display: flex; flex-direction: row-reverse; justify-content: space-between; gap: 12px; }
.profile-stats a:last-child { border: 0; }
.profile-stats strong { font-weight: 500; font-size: 1rem; color: var(--heading); line-height: 1.5; }
.profile-stats span { color: var(--muted); font-size: 0.875rem; }
.social-links { display: flex; flex-direction: column; gap: 4px; margin-top: 17px; }
.social-links a { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; padding: 6px 0; }
.social-icon { color: var(--muted); font-size: 0.875rem; min-width: 28px; text-align: center; }
.external-arrow { margin-left: auto; color: var(--faint); }
.recent-panel, .topics-panel, .toc-panel { margin-top: 31px; padding-top: 25px; border-top: 1px solid var(--border); }
.recent-list { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; }
.recent-list li { display: flex; gap: 11px; }
.recent-number { font-size: 0.875rem; color: var(--faint); padding-top: 2px; }
.recent-list a { font-size: 0.875rem; line-height: 1.75; display: block; }
.recent-list time { color: var(--muted); font-size: 0.875rem; display: block; margin-top: 4px; }
.sidebar-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 17px; }
.sidebar-tags a { border: 0; font-size: 0.875rem; padding: 5px 0; color: var(--muted); }
.sidebar-tags a:hover { border-color: var(--accent); color: var(--accent); }
.sidebar-tags a span { margin-left: 8px; color: var(--faint); }
.text-link { font-size: 0.875rem; color: var(--muted); }
.sidebar-note { color: var(--muted); font-size: 0.875rem; margin-top: 32px; padding: 17px 0 0; border-top: 1px dashed var(--border); line-height: 2.1; }
.sidebar-note > span:last-child { color: var(--faint); }
.tiny-cursor { display: inline-block; width: 6px; height: 11px; background: var(--faint); vertical-align: -2px; margin-left: 5px; }
.site-footer { border-top: 1px dashed var(--border); padding: 22px 0; color: var(--muted); font-size: 0.875rem; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.footer-prompt { color: var(--accent); margin-right: 9px; font-size: 0.875rem; }
.footer-text { display: block; padding-left: 31px; font-size: 0.875rem; margin-top: 4px; color: var(--faint); }
.footer-credit { white-space: nowrap; }
.footer-credit span { color: var(--faint); padding: 0 7px; }
.footer-social { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; font-size: 0.875rem; margin-bottom: 20px; }
.icp { text-align: center; margin-bottom: 0; }
.visitor-counter { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px dashed var(--border); }
.visitor-counter img { display: block; object-fit: contain; }
.visitor-counter iframe { border: 0; max-width: 100%; }
.counter-label { font-size: 0.875rem; }
.page-heading { padding-bottom: 30px; margin-bottom: 30px; border-bottom: 1px dashed var(--border); }
.page-heading .terminal-command { margin-top: 0; }
.page-heading h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin: 14px 0 10px; letter-spacing: -.035em; }
.page-heading > p:last-child { color: var(--text); font-size: 1rem; margin-bottom: 0; }
.archive-year { font-size: 1.375rem; font-weight: 500; margin: 32px 0 13px; }
.archive-year:first-child { margin-top: 0; }
.archive-year span { font-size: 1rem; color: var(--accent); margin-right: 7px; }
.archive-row { display: flex; gap: 22px; align-items: baseline; border-bottom: 1px solid var(--border); padding: 15px 0; }
.archive-row time { color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.archive-row h3 { margin: 0; font-size: 1rem; font-weight: 400; flex: 1; }
.archive-row-arrow { color: var(--faint); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 27px; font-size: 0.875rem; }
.page-numbers { display: flex; gap: 6px; }
.page-number, .page-numbers .space { min-width: 44px; min-height: 44px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 0; }
.page-number.current { color: var(--accent); text-decoration: underline; }
.page-mobile { display: none; color: var(--muted); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 20px; }
.tag-cloud a { display: flex; align-items: center; gap: 20px; padding: 12px 0; border-bottom: 1px dashed var(--border); background: transparent; font-size: 1rem; }
.tag-cloud a:hover { border-color: var(--accent); background: var(--accent-tint); }
.tag-count { color: var(--muted); font-size: 0.875rem; }
.category-tree-list { list-style: none; padding-left: 22px; margin: 12px 0; border-left: 1px solid var(--border); }
.category-tree > .category-tree-list { padding-left: 0; border: 0; }
.category-tree-item { padding: 9px 0; }
.category-tree-link { color: var(--heading); font-size: 0.9375rem; }
.category-tree-link::before { content: '▱ '; color: var(--accent); }
.category-tree-count { font-size: 0.875rem; color: var(--muted); margin-left: 13px; padding: 3px 8px; background: transparent; }
.empty-state { text-align: center; padding: 65px 20px; }
.empty-symbol { font-size: 2.5rem; color: var(--accent); }
.empty-state h2 { font-size: 1.125rem; font-weight: 500; }
.empty-state p { color: var(--muted); font-size: 0.875rem; }
.article-header { padding-bottom: 25px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.article-back { display: inline-block; margin-bottom: 18px; }
.article-header h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.5; margin: 14px 0 18px; letter-spacing: -.035em; overflow-wrap: anywhere; }
.article-meta { display: flex; flex-wrap: wrap; gap: 7px 18px; color: var(--muted); font-size: 0.875rem; }
.article-categories { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.article-cover { width: 100%; max-height: 480px; object-fit: cover; border-radius: 0; margin-bottom: 25px; }
.prose { font-size: 1.125rem; line-height: 1.85; overflow-wrap: anywhere; max-width: 72ch; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol { margin: 1.3em 0; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { margin: 1.8em 0 .8em; font-weight: 600; scroll-margin-top: 25px; }
.prose h1 { font-size: 1.9em; }
.prose h2 { font-size: 1.5em; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.prose h3 { font-size: 1.2em; }
.prose h4, .prose h5, .prose h6 { font-size: 1em; }
.prose h2::before { content: '# '; color: var(--accent); font-weight: 400; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose a:hover { text-decoration-style: dashed; }
.prose strong { color: var(--heading); }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.8em; }
.prose li > ul, .prose li > ol { margin: .4em 0; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 24px 0; padding: 12px 22px; background: transparent; color: var(--text); }
.prose blockquote > :first-child { margin-top: 0; }
.prose blockquote > :last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px dashed var(--border); margin: 35px 0; }
.prose img { display: block; margin: 24px auto; border-radius: 0; }
.prose img.inline { display: inline; margin: 0; }
.prose figcaption { font-size: 0.875rem; color: var(--muted); text-align: center; }
.prose code, .prose pre { font-family: var(--mono); font-size: .9em; }
.prose :not(pre) > code { background: var(--surface-raised); padding: 2px 5px; color: var(--accent); border-radius: 0; }
.prose pre { overflow: auto; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 0; line-height: 1.8; tab-size: 2; }
.prose pre code { background: transparent; padding: 0; font-size: inherit; color: inherit; }
.prose .highlight { margin: 24px 0; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 0; font-size: 0.875rem; line-height: 1.8; }
.prose .highlight table { display: table; border: 0; margin: 0; width: 100%; overflow: visible; }
.prose .highlight td { border: 0; padding: 0; }
.prose .highlight pre { border: 0; margin: 0; border-radius: 0; padding: 17px; overflow: visible; font-size: 0.9375rem; }
.prose .highlight .gutter { width: 1%; user-select: none; border-right: 1px solid var(--border); color: var(--faint); }
.prose .highlight .gutter pre { padding-right: 12px; padding-left: 12px; text-align: right; }
.prose .highlight figcaption { display: flex; justify-content: space-between; padding: 8px 15px; border-bottom: 1px solid var(--border); text-align: left; }
.code-wrapper { min-width: 0; margin: 24px 0; }
.code-wrapper > .code-toolbar { display: flex; justify-content: flex-end; padding: 5px 8px; border: 1px solid var(--border); border-bottom: 0; background: transparent; }
.code-wrapper > pre, .code-wrapper > .highlight { margin: 0; border-radius: 0; }
.copy-button { font-size: 0.875rem; color: var(--text); padding: 8px 9px; min-height: 44px; }
.copy-button:hover { color: var(--accent); }
.highlight .comment, .highlight .quote, .token.comment, .token.prolog { color: var(--muted); }
.highlight .keyword, .highlight .selector-tag, .highlight .literal, .token.keyword, .token.boolean { color: #c4a7e7; }
.highlight .string, .highlight .attr, .highlight .addition, .token.string, .token.attr-value { color: var(--accent); }
.highlight .number, .highlight .symbol, .highlight .built_in, .token.number, .token.function { color: var(--amber); }
.highlight .title, .highlight .section, .highlight .name, .token.tag, .token.class-name { color: var(--blue); }
.highlight .deletion { color: #e78c86; }
html[data-theme='light'] .highlight .keyword, html[data-theme='light'] .token.keyword { color: #7850a3; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 24px 0; font-size: 1rem; }
.prose th, .prose td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.prose th { color: var(--heading); background: var(--surface-raised); }
.prose video, .prose iframe { max-width: 100%; }
.prose .video-container { position: relative; aspect-ratio: 16 / 9; }
.prose .video-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .headerlink { margin-right: 6px; }
.prose details { border: 1px solid var(--border); padding: 12px 16px; border-radius: 0; }
.prose summary { cursor: pointer; color: var(--accent); }
.toc-panel { position: sticky; top: 25px; }
.desktop-toc { font-size: 0.875rem; max-height: calc(100vh - 110px); overflow-y: auto; scrollbar-width: thin; }
.toc, .toc-child { list-style: none; padding-left: 14px; margin: 0; }
.toc { padding-left: 0; }
.toc-link { display: block; color: var(--muted); padding: 5px 0 5px 10px; border-left: 1px solid var(--border); }
.toc-link.active { color: var(--accent); border-color: var(--accent); background: var(--accent-tint); }
.mobile-toc { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: 0; padding: 12px 16px; margin-bottom: 25px; font-size: 0.875rem; }
.mobile-toc summary { cursor: pointer; color: var(--accent); }
.mobile-toc nav { margin-top: 12px; }
.toc-always-visible { display: block; }
.article-footer { margin-top: 40px; }
.copyright-box { border-left: 2px solid var(--border); background: transparent; border-radius: 0; padding: 18px 20px; font-size: 0.875rem; color: var(--muted); margin-top: 25px; }
.copyright-box p { margin: 0 0 7px; }
.copyright-box strong, .copyright-box a:not(.permalink) { color: var(--text); font-weight: 400; }
.permalink { display: block; overflow-wrap: anywhere; font-size: 0.875rem; }
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-top: 1px solid var(--border); margin-top: 30px; padding-top: 24px; }
.post-navigation a { min-width: 0; }
.post-navigation a:last-child { text-align: right; }
.post-navigation span { color: var(--muted); font-size: 0.875rem; }
.post-navigation strong { display: block; font-size: 0.875rem; font-weight: 400; margin-top: 7px; }
.comments-section { margin-top: 40px; padding-top: 25px; border-top: 1px solid var(--border); }
.comments-section h2 { justify-content: flex-start; font-size: 0.875rem; margin-bottom: 20px; }
.back-top { position: fixed; bottom: 25px; right: 25px; z-index: 10; background: var(--surface-raised); box-shadow: none; }
.not-found { padding: 45px 0 80px; }
.error-code { font-size: clamp(70px, 13vw, 140px); line-height: 1.4; letter-spacing: -.09em; color: var(--accent); }
.error-code .cursor { width: .28em; height: .65em; }
.not-found h1 { font-size: 1.5625rem; }
.not-found > p { color: var(--muted); font-size: 0.875rem; }
.button-primary { display: inline-flex; gap: 30px; align-items: center; margin-top: 20px; padding: 10px 16px; border: 1px solid var(--accent); color: var(--accent); border-radius: 0; }
.button-primary span { font-size: 0.875rem; }
.search-dialog { border: 1px solid var(--accent); background: var(--bg); color: var(--text); padding: 0; width: min(720px, calc(100% - 32px)); max-height: min(720px, 85dvh); margin: 10dvh auto auto; box-shadow: none; }
.search-dialog::backdrop { background: #000b; }
.search-dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.search-dialog-header label { font-size: 0.875rem; }
.search-dialog-header button { border: 0; font-size: 1.5rem; }
.search-input-wrap { display: flex; align-items: center; padding: 18px 22px; gap: 12px; border-bottom: 1px solid var(--border); }
.search-input-wrap > span { color: var(--accent); }
.search-input-wrap input { background: none; color: var(--heading); border: 0; width: 100%; min-width: 0; padding: 6px; border-radius: 0; font-size: 1rem; }
.search-input-wrap input::placeholder { color: var(--muted); }
.search-status { font-size: 0.875rem; color: var(--muted); padding: 16px 22px; margin: 0; }
.search-results { list-style: none; padding: 0 12px 12px; margin: 0; max-height: 46dvh; overflow-y: auto; }
.search-results:empty { padding: 0; }
.search-result { display: block; padding: 14px 12px; border: 1px solid transparent; border-radius: 0; }
.search-result:hover, .search-result:focus { background: var(--surface-raised); border-color: var(--border); }
.search-result h3 { font-size: 1.125rem; margin: 0 0 5px; }
.search-result p { margin: 6px 0 0; font-size: 0.875rem; color: var(--muted); }
.search-result time { font-size: 0.875rem; color: var(--faint); }
.search-result mark { background: var(--accent); color: var(--bg); border-radius: 0; }
.search-dialog-footer { display: flex; justify-content: space-between; padding: 12px 22px; background: var(--surface); border-top: 1px solid var(--border); color: var(--muted); font-size: 0.875rem; }
body.search-open { overflow: hidden; }
/* Plain-text terminal chrome and a consistent, zoom-friendly type scale. */
.session-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 24px; padding: 12px 0; border-bottom: 1px dashed var(--border); color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.session-name > span, .session-path { color: var(--accent); }
.nav-link::before { content: '['; margin-right: 3px; color: var(--muted); }
.nav-link::after { content: ']'; margin-left: 3px; color: var(--muted); }
.category-label::before { content: '['; }
.category-label::after { content: ']'; }
.sidebar-tags a::before { content: '#'; color: var(--accent); }
.panel-heading { color: var(--text); }
.avatar-placeholder { border: 0; background: transparent; }
.sidebar-tags { gap: 8px 16px; }
.tag-list a, .read-link, .text-link, .pagination-direction { display: inline-flex; align-items: center; min-height: 36px; }
.post-card-bottom { align-items: baseline; flex-wrap: wrap; }
.footer-row { flex-wrap: wrap; }
.profile-stats a:hover span, .profile-stats a:hover strong { color: var(--accent); }
.search-result { border: 0; border-bottom: 1px dashed var(--border); }
.search-result:hover, .search-result:focus { background: var(--accent-tint); }
.back-top { background: var(--bg); border: 1px solid var(--border); }
@media (max-width: 1280px) {
  .site-shell { margin: 16px 32px 28px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 980px) {
  .workspace { display: block; }
  #main-content { max-width: 800px; padding: 32px 0; margin-inline: auto; }
  .sidebar { border-left: 0; border-top: 1px dashed var(--border); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 28px 0; }
  .recent-panel, .topics-panel { margin-top: 0; padding-top: 0; border-top: 0; }
  .sidebar-note { align-self: start; margin-top: 0; }
  .toc-panel { display: none; }
  .mobile-toc { display: block; }
  .is-post .sidebar { display: block; }
  .is-post .profile-panel { max-width: 480px; }
  .hero-topline { margin-bottom: 20px; }
}
@media (max-width: 680px) {
  .site-shell { margin: 0 20px; min-height: 100vh; }
  .session-bar { font-size: .875rem; }
  .session-path { width: 100%; }
  .navigation { gap: 6px 12px; padding: 14px 0; }
  .brand { width: 100%; font-size: 1.25rem; }
  .nav-actions { margin-left: 0; flex-wrap: wrap; gap: 4px 14px; }
  .menu-toggle { display: inline-flex; }
  .main-nav { gap: 4px 12px; }
  .js .main-nav { display: none; }
  .js .main-nav.open { display: flex; }
  .nav-link { font-size: 1rem; padding: 9px 0; }
  #main-content { padding: 28px 0; }
  .hero h1 { font-size: clamp(1.75rem, 6vw, 2.25rem); }
  .hero-description, .post-excerpt { font-size: 1rem; }
  .hero { padding-bottom: 24px; margin-bottom: 28px; }
  .section-heading { flex-wrap: wrap; }
  .post-card h3 { font-size: 1.25rem; }
  .post-card-meta { gap: 8px 12px; }
  .post-card-meta .category-label { margin-left: 0; }
  .sidebar { display: block; }
  .sidebar > section + section { margin-top: 28px; padding-top: 24px; border-top: 1px dashed var(--border); }
  .sidebar-note { margin-top: 24px; }
  .footer-row { align-items: flex-start; flex-direction: column; gap: 14px; }
  .footer-credit { padding-left: 0; white-space: normal; }
  .footer-text { padding-left: 0; }
  .prose { font-size: 1.0625rem; }
  .prose pre { padding: 15px; }
  .prose blockquote { padding: 10px 16px; }
  .article-header h1, .page-heading h1 { font-size: 1.75rem; }
  .page-numbers { display: none; }
  .page-mobile { display: block; }
  .archive-row { gap: 14px; }
  .tag-cloud { gap: 8px 20px; }
  .tag-cloud a { font-size: 1rem; gap: 12px; }
  .search-dialog { margin-top: 5dvh; max-height: 90dvh; }
  .search-input-wrap { padding: 14px 16px; }
  .search-input-wrap input { font-size: 1rem; }
  .back-top { right: 12px; bottom: 12px; }
  .tag-list a, .read-link, .text-link, .pagination-direction, .sidebar-tags a, .social-links a { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { :root, html[data-theme] { --bg: white; --surface: white; --surface-raised: #eee; --text: #222; --heading: #000; --muted: #555; --border: #ddd; --accent: #222; } body.with-grid { background: white; } .site-shell { border: 0; margin: 0; max-width: none; box-shadow: none; } .workspace { display: block; } .site-header, .sidebar, .mobile-toc, .article-back, .post-navigation, .comments-section, .back-top, .visitor-counter, .search-dialog, .reading-progress, .code-toolbar { display: none !important; } #main-content { padding: 0; } .prose pre, .prose .highlight, .prose table { overflow: visible; white-space: pre-wrap; } .prose pre code { white-space: pre-wrap; } .prose a { text-decoration: underline; } .prose img { max-height: 600px; object-fit: contain; } h1, h2, h3 { break-after: avoid; } .cursor { display: none; } }
