:root {
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --weight-normal: 400;
  --weight-medium: 600;
  --weight-bold: 700;
  --radius-panel: 28px;
  --radius-control: 16px;
  --content-width: 1100px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 72px;
  --theme-sky-day: #68acd6;
  --theme-sky-night: #1b2945;
  --theme-orb-day: #ffdb72;
  --theme-orb-night: #d4deec;
  --theme-cloud: #ffffff;
  --theme-crater: #9ba8bd;
  --theme-sky-shadow: inset 2px 3px 7px rgba(17,43,64,.35), inset -2px -2px 5px rgba(255,255,255,.35);
  --theme-orb-shadow: inset 1px 1px 2px rgba(255,255,255,.9), inset -1px -2px 3px rgba(125,82,16,.3), 0 2px 5px rgba(17,43,64,.3), 0 0 0 7px rgba(255,255,255,.12), 0 0 0 14px rgba(255,255,255,.08), 0 0 0 21px rgba(255,255,255,.05);
  --theme-crater-shadow: inset 1px 1px 2px rgba(44,57,78,.25);
}
:root {
  --canvas: #ecf0f3;
  --surface: #ecf0f3;
  --ink: #202938;
  --muted: #526174;
  --accent: #2459c4;
  --line: #cbd3de;
  --selection: #dce5f8;
  --raised: 6px 6px 14px rgba(209,217,230,.8), -6px -6px 14px rgba(255,255,255,.85);
  --control-shadow: 3px 3px 7px rgba(209,217,230,.85), -3px -3px 7px rgba(255,255,255,.9);
  --inset: inset 3px 3px 6px rgba(209,217,230,.8), inset -3px -3px 6px rgba(255,255,255,.85);
}
:root[data-theme="dark"] {
  --canvas: #272827;
  --surface: #303231;
  --ink: #f3f4ef;
  --muted: #c4c9c3;
  --accent: #a4c5ef;
  --line: #4d554e;
  --selection: #303b47;
  --raised: inset 0 1px 1px rgba(248,250,240,.12), 6px 8px 16px rgba(0,0,0,.32), -2px -2px 6px rgba(235,241,221,.05);
  --control-shadow: inset 0 1px 1px rgba(248,250,240,.13), 3px 4px 7px rgba(0,0,0,.35), -2px -2px 5px rgba(235,241,221,.05);
  --inset: inset 3px 3px 6px rgba(0,0,0,.4), inset -2px -2px 5px rgba(232,240,219,.06);
}
/* 色彩与材质变量由视觉规范注入，主题切换不改变几何。 */
* { box-sizing: border-box; }
html { scroll-padding-top: var(--space-lg); color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: var(--weight-normal) 16px/1.8 var(--font-body); -webkit-text-size-adjust: 100%; }
::selection { background: var(--selection); color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .25em; }
button { font: inherit; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 4px; }
.page { max-width: calc(var(--content-width) + 2 * var(--space-xl)); padding: 0 var(--space-xl); margin: auto; }
.skip-link { position: absolute; top: var(--space-sm); left: var(--space-md); z-index: 2; padding: var(--space-xs) var(--space-md); background: var(--surface); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.site-header { display: flex; align-items: center; gap: var(--space-lg); padding: var(--space-xl) 0 var(--space-lg); }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.4; margin-right: auto; }
.brand strong { font-size: 21px; font-weight: var(--weight-bold); letter-spacing: .13em; }
.brand span { color: var(--muted); font-size: 12px; letter-spacing: .12em; margin-top: 5px; }
.navigation { display: flex; align-items: center; gap: var(--space-lg); font-size: 14px; color: var(--muted); }
.navigation a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; white-space: nowrap; }
.navigation a:hover { color: var(--accent); }
.theme-toolbar { display: flex; align-items: center; gap: var(--space-sm); flex: none; }
.theme-caption { font-size: 13px; font-weight: var(--weight-medium); color: var(--muted); }
.theme-label-night, [data-theme="dark"] .theme-label-day { display: none; }
[data-theme="dark"] .theme-label-night { display: inline; }
.theme-toggle { display: block; width: 88px; height: 44px; flex: none; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: var(--control-shadow); cursor: pointer; }
.theme-sky { display: block; position: relative; width: 100%; height: 100%; border-radius: inherit; overflow: hidden; background: var(--theme-sky-day); box-shadow: var(--theme-sky-shadow); transition: background-color 260ms ease; }
.theme-orb { position: absolute; width: 34px; height: 34px; top: 4px; left: 4px; border-radius: 50%; background: var(--theme-orb-day); box-shadow: var(--theme-orb-shadow); transition: background-color 260ms ease; }
.theme-clouds, .theme-stars { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--theme-cloud); transition: transform 320ms ease, opacity 240ms ease; }
.theme-stars { opacity: 0; transform: translateY(-8px); }
.theme-clouds { opacity: .95; transform: translateY(0); }
.theme-crater { position: absolute; border-radius: 50%; background: var(--theme-crater); box-shadow: var(--theme-crater-shadow); opacity: 0; transition: opacity 220ms ease; }
.crater-one { width: 11px; height: 11px; left: 6px; top: 15px; }
.crater-two { width: 6px; height: 6px; left: 18px; top: 7px; }
.crater-three { width: 5px; height: 5px; left: 23px; top: 21px; }
[data-theme="dark"] .theme-sky { background: var(--theme-sky-night); }
[data-theme="dark"] .theme-orb { background: var(--theme-orb-night); transform: translateX(44px); }
[data-theme="dark"] .theme-crater { opacity: 1; }
[data-theme="dark"] .theme-clouds { opacity: 0; transform: translateY(24px); }
[data-theme="dark"] .theme-stars { opacity: .95; transform: translateY(0); }
.theme-toggle:active { box-shadow: var(--inset); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 999px; }
.introduction { padding: var(--space-xl) 0 var(--space-2xl); }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: var(--weight-medium); letter-spacing: .12em; margin: 0 0 var(--space-md); }
h1 { font-size: clamp(40px, 5.3vw, 68px); font-weight: var(--weight-medium); line-height: 1.22; letter-spacing: -.055em; margin: 0 0 var(--space-lg); }
h1 span { display: block; }
h1 span:first-child { font-size: .65em; margin-bottom: var(--space-xs); letter-spacing: -.04em; }
.intro-copy { color: var(--muted); white-space: pre-line; font-size: 16px; line-height: 1.9; margin: 0; max-width: 45ch; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--space-2xl); align-items: start; padding-bottom: var(--space-2xl); }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding: 0 4px var(--space-md); }
h2, h3, p { overflow-wrap: anywhere; }
h2 { font-size: 18px; font-weight: var(--weight-medium); line-height: 1.5; margin: 0; }
.section-heading p { font-size: 13px; margin: 0; color: var(--muted); }
.journal-surface { background: var(--surface); box-shadow: var(--raised); border-radius: var(--radius-panel); padding: 0 var(--space-lg); }
.entry + .entry { border-top: 1px solid var(--line); }
.entry summary { list-style: none; padding: var(--space-lg) 0; cursor: pointer; }
.entry summary::-webkit-details-marker { display: none; }
.entry summary > span { display: block; }
.article-meta { display: flex !important; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs); color: var(--muted); font-size: 12px; margin-bottom: var(--space-sm); }
.article-meta time { font-family: var(--font-mono); font-size: 11px; letter-spacing: .02em; }
.article-title { font-size: 22px; font-weight: var(--weight-medium); line-height: 1.55; letter-spacing: -.025em; margin-bottom: var(--space-sm); }
.article-excerpt { color: var(--muted); font-size: 14px; line-height: 1.9; max-width: 48ch; }
.article-read { margin-top: var(--space-md); color: var(--accent); font-size: 13px; font-weight: var(--weight-medium); }
.article-read .read-less, details[open] .read-more { display: none; }
details[open] .read-less { display: inline; }
.entry summary:hover .article-title { color: var(--accent); }
.article-body { padding-bottom: var(--space-lg); border-top: 1px solid var(--line); font-size: 15px; line-height: 1.95; }
.article-body p { margin: var(--space-md) 0 0; }
.article-body a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); margin-top: var(--space-sm); }
.sidebar { padding-top: 50px; }
.sidebar .eyebrow { font-size: 11px; margin-bottom: var(--space-sm); }
.sidebar h2 { font-size: 19px; margin-bottom: var(--space-sm); }
.sidebar p:not(.eyebrow) { font-size: 14px; line-height: 1.95; margin: 0; color: var(--muted); }
.topics { margin-top: var(--space-lg); }
.sidebar h3 { font-size: 13px; font-weight: var(--weight-medium); margin: 0 0 var(--space-sm); }
.topics ul { display: flex; flex-wrap: wrap; column-gap: var(--space-md); row-gap: var(--space-xs); margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.site-footer { padding: var(--space-lg) 0 var(--space-xl); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: var(--space-md); row-gap: var(--space-xs); align-items: center; }
.site-footer p { margin: 0; }
.legal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-md); }
.legal a { display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; }
.legal a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .page { padding-inline: var(--space-lg); }
  .content-grid { grid-template-columns: minmax(0, 1fr) 220px; gap: var(--space-lg); }
  .navigation { gap: var(--space-md); }
  .journal-surface { padding-inline: var(--space-md); }
}
@media (max-width: 680px) {
  .page { padding-inline: var(--space-md); }
  .site-header { flex-wrap: wrap; gap: var(--space-md); padding-top: var(--space-lg); padding-bottom: 0; }
  .navigation { order: 3; width: 100%; gap: var(--space-lg); border-bottom: 1px solid var(--line); padding-bottom: var(--space-xs); }
  .navigation a { min-height: 44px; }
  .introduction { padding: var(--space-xl) 0; }
  h1 { font-size: clamp(34px, 8.2vw, 48px); margin-bottom: var(--space-md); }
  .intro-copy { font-size: 14px; }
  .content-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); padding-bottom: var(--space-xl); }
  .section-heading { display: block; }
  .section-heading p { margin-top: 4px; }
  .article-title { font-size: 20px; }
  .article-excerpt, .article-body { font-size: 14px; }
  .sidebar { padding-top: 0; }
  .about p { max-width: 46ch; }
  .topics { margin-top: var(--space-md); }
  .site-footer { padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) {
  body { background: Canvas; color: CanvasText; }
  .journal-surface, .theme-toggle { border: 1px solid CanvasText; box-shadow: none; background: Canvas; }
  .theme-toggle[aria-checked="true"] { border-color: Highlight; }
  .theme-sky { forced-color-adjust: none; }
  a, .article-read { color: LinkText; }
}
