/* ==========================================================================
   PRISM 2.0 — 我看AR · 编辑部视觉系统
   Light-first editorial system. Category-aware. Zero third-party CSS deps.
   ========================================================================== */

/* ---------- 01 Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #F4F4EF;
  --bg-elev: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #ECECE6;
  --surface-3: #E4E4DC;
  --ink: #15171C;
  --ink-2: #575D68;
  --ink-3: #878D98;
  --line: #DFDFD8;
  --line-strong: #C6C7BF;
  --header: rgba(244, 244, 239, .88);
  --scrim: rgba(6, 8, 13, .58);
  --shadow: 0 1px 0 rgba(21, 23, 28, .03), 0 18px 40px -30px rgba(21, 23, 28, .32);
  --shadow-lift: 0 1px 0 rgba(21, 23, 28, .04), 0 28px 54px -28px rgba(21, 23, 28, .38);
  --cat: #0F8A7A;
  --cat-soft: rgba(15, 138, 122, .10);
  --cat-line: rgba(15, 138, 122, .30);
  --brand-teal: #0F8A7A;
  --brand-sky: #0E7FC4;
  --brand-violet: #5A44D6;
  --brand-rose: #D94475;
  --gold: #A9741A;
  --grad-spectrum: linear-gradient(118deg, #0F8A7A 0%, #0E7FC4 48%, #5A44D6 100%);
  --font-sans: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --fs-display: clamp(2.75rem, 4.6vw, 4rem);
  --fs-h1: clamp(2.1rem, 3.2vw, 2.75rem);
  --fs-h2: clamp(1.5rem, 2.1vw, 1.875rem);
  --fs-h3: 1.125rem;
  --fs-body: 1.0625rem;
  --fs-sm: .9375rem;
  --fs-xs: .8125rem;
  --fs-2xs: .6875rem;
  --lh-body: 1.9;
  --container: 1280px;
  --nav-h: 64px;
  --prose-width: 44rem;
  --toc-w: 240px;
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-7: 28px;  --sp-8: 32px;
  --sp-9: 36px; --sp-10: 40px; --sp-12: 48px; --sp-14: 56px;
  --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;
  --ease: cubic-bezier(.22, .68, .26, 1);
  --dur-fast: 140ms;
  --dur: 240ms;
  --dur-slow: 520ms;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090D;
  --bg-elev: #0B0D12;
  --surface: #101318;
  --surface-2: #161A21;
  --surface-3: #1D222B;
  --ink: #ECEEF3;
  --ink-2: #A3AAB7;
  --ink-3: #707887;
  --line: #23262E;
  --line-strong: #343945;
  --header: rgba(8, 9, 13, .86);
  --scrim: rgba(2, 3, 6, .66);
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 20px 44px -30px rgba(0, 0, 0, .9);
  --shadow-lift: 0 1px 0 rgba(0, 0, 0, .4), 0 30px 60px -28px rgba(0, 0, 0, 1);
  --cat: #2DE2C5;
  --cat-soft: rgba(45, 226, 197, .12);
  --cat-line: rgba(45, 226, 197, .34);
  --brand-teal: #2DE2C5;
  --brand-sky: #38BDF8;
  --brand-violet: #9D8BFF;
  --brand-rose: #FF7EA4;
  --gold: #F5C462;
  --grad-spectrum: linear-gradient(118deg, #2DE2C5 0%, #38BDF8 48%, #7B61FF 100%);
}

/* 栏目色：浅色用深一档，深色用亮一档 */
[data-cat="meta"] { --cat: #6D4AE0; --cat-soft: rgba(109, 74, 224, .10); --cat-line: rgba(109, 74, 224, .28); }
[data-cat="vr"]   { --cat: #0B7FBF; --cat-soft: rgba(11, 127, 191, .10); --cat-line: rgba(11, 127, 191, .28); }
[data-cat="ar"]   { --cat: #0E8274; --cat-soft: rgba(14, 130, 116, .10); --cat-line: rgba(14, 130, 116, .28); }
[data-cat="xr"]   { --cat: #5A44D6; --cat-soft: rgba(90, 68, 214, .10); --cat-line: rgba(90, 68, 214, .28); }
[data-cat="mr"]   { --cat: #C03567; --cat-soft: rgba(192, 53, 103, .10); --cat-line: rgba(192, 53, 103, .28); }
[data-cat="industry"] { --cat: #2D5C9E; --cat-soft: rgba(45, 92, 158, .10); --cat-line: rgba(45, 92, 158, .28); }

[data-theme="dark"][data-cat="meta"] { --cat: #A78BFA; --cat-soft: rgba(167, 139, 250, .13); --cat-line: rgba(167, 139, 250, .32); }
[data-theme="dark"][data-cat="vr"]   { --cat: #38BDF8; --cat-soft: rgba(56, 189, 248, .12); --cat-line: rgba(56, 189, 248, .32); }
[data-theme="dark"][data-cat="ar"]   { --cat: #2DE2C5; --cat-soft: rgba(45, 226, 197, .12); --cat-line: rgba(45, 226, 197, .32); }
[data-theme="dark"][data-cat="xr"]   { --cat: #9D8BFF; --cat-soft: rgba(157, 139, 255, .13); --cat-line: rgba(157, 139, 255, .32); }
[data-theme="dark"][data-cat="mr"]   { --cat: #FF7EA4; --cat-soft: rgba(255, 126, 164, .12); --cat-line: rgba(255, 126, 164, .32); }
[data-theme="dark"][data-cat="industry"] { --cat: #7FA8FF; --cat-soft: rgba(127, 168, 255, .12); --cat-line: rgba(127, 168, 255, .32); }

/* ---------- 02 Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  line-height: 1.6;
  letter-spacing: .006em;
  text-autospace: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
ul { list-style: none; }
::selection { background: var(--cat-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--cat); outline-offset: 3px; border-radius: 3px; }
[hidden] { display: none !important; }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 300;
  padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--ink); color: var(--bg);
  font-size: var(--fs-xs); font-weight: 650;
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus { transform: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-8); }
.section { padding-block: var(--sp-14); }
.section--tight { padding-block: var(--sp-10); }
.grid { display: grid; gap: var(--sp-5); }
.grid--main { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-10); align-items: start; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- 03 Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--header);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: var(--sp-5); height: 100%; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand__logo { display: block; height: clamp(30px, 3vw, 38px); width: auto; }
.brand__logo--onDark { display: none; }
[data-theme="dark"] .brand__logo--onLight { display: none; }
[data-theme="dark"] .brand__logo--onDark { display: block; }

.nav__menu { display: flex; align-items: center; gap: 2px; margin-left: var(--sp-4); }
.nav__link {
  position: relative;
  display: inline-flex; align-items: center;
  height: 34px; padding: 0 11px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav__link.is-active { color: var(--ink); font-weight: 700; }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 1px;
  height: 2px; border-radius: 2px; background: var(--cat);
}
.nav__right { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  border: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.icon-btn:hover { color: var(--ink); background: var(--surface-2); border-color: var(--line); }
.icon-btn svg { width: 17px; height: 17px; }
.nav__toggle { display: none; }
.nav__rss {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  font-size: var(--fs-2xs); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-2);
  transition: all var(--dur-fast) var(--ease);
}
.nav__rss:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface); }
.nav__rss svg { width: 14px; height: 14px; }

/* ---------- 04 Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: var(--fs-xs); font-weight: 650;
  letter-spacing: -.002em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.btn svg { width: 15px; height: 15px; }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -18px rgba(0, 0, 0, .55); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--line-strong); background: var(--surface); }
.btn--cat { background: var(--cat); color: #fff; }
.btn--sm { height: 32px; padding: 0 12px; font-size: var(--fs-2xs); }
.btn--block { width: 100%; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--fs-2xs); font-weight: 650;
  letter-spacing: .01em;
  white-space: nowrap;
}
.pill--cat { color: var(--cat); background: var(--cat-soft); border-color: var(--cat-line); }
.pill--glass { color: #fff; background: rgba(10, 12, 18, .42); border-color: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pill--gold { color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); border-color: color-mix(in srgb, var(--gold) 30%, transparent); }
.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.dot--live { background: #E5484D; box-shadow: 0 0 0 3px rgba(229, 72, 77, .16); animation: pulse 2.2s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .38; } }

/* ---------- 05 Cover / media ---------- */
.cover {
  position: relative; overflow: hidden;
  background: #070A12;
  isolation: isolate;
}
.cover__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease);
}
.cover__scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 6, 12, .12) 0%, rgba(4, 6, 12, .05) 38%, rgba(4, 6, 12, .58) 72%, rgba(4, 6, 12, .86) 100%);
}
.cover__scrim--soft { background: linear-gradient(180deg, rgba(4, 6, 12, .06) 0%, rgba(4, 6, 12, .0) 55%, rgba(4, 6, 12, .28) 100%); }
.cover__grid { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ratio { position: relative; }
.ratio--16x9 { aspect-ratio: 16 / 9; }
.ratio--4x3 { aspect-ratio: 4 / 3; }
.ratio--21x9 { aspect-ratio: 21 / 9; }
.ratio--5x4 { aspect-ratio: 5 / 4; }

/* category art fallback for live theme (JS sets --art) */
.cover:not(:has(img)) {
  background-image: var(--art, none);
  background-size: cover;
  background-position: center;
}
.cover:not(:has(img))::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4, 6, 12, .05), rgba(4, 6, 12, .42));
}

/* ---------- 06 Home hero ---------- */
.hero { padding-top: var(--sp-6); }
.grid--hero { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: var(--sp-4); }
.hero-card {
  position: relative; display: flex; align-items: flex-end;
  min-height: 472px; border-radius: var(--r-xl); overflow: hidden;
  background: #070A12; isolation: isolate;
}
.hero-card .cover__img { position: absolute; inset: 0; z-index: 0; }
.hero-card .cover__scrim {
  background: linear-gradient(180deg, rgba(4, 6, 12, .22) 0%, rgba(4, 6, 12, .06) 30%, rgba(4, 6, 12, .55) 64%, rgba(4, 6, 12, .92) 100%);
}
.hero-card__body { position: relative; z-index: 2; padding: var(--sp-8); width: 100%; }
.hero-card__pills { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.hero-card__title {
  color: #fff;
  font-size: clamp(1.75rem, 2.7vw, 2.35rem);
  line-height: 1.28; font-weight: 750; letter-spacing: -.028em;
  text-wrap: balance;
  text-shadow: 0 1px 2px rgba(4, 8, 16, .32), 0 10px 34px rgba(4, 8, 16, .28);
  max-width: 19ch;
}
.hero-card__title a { color: #fff; }
.hero-card__desc {
  margin-top: var(--sp-3);
  max-width: 52ch;
  color: rgba(238, 242, 250, .78);
  font-size: var(--fs-xs); line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-card__foot {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-top: var(--sp-6); padding-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: rgba(238, 242, 250, .72);
  font-size: var(--fs-xs);
}
.hero-card__foot .avatar { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); }
.hero-card__foot .sep { width: 1px; height: 12px; background: rgba(255,255,255,.25); }
.hero-card__foot .read-time { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }

.hero-side { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.hero-mini {
  position: relative; display: flex; align-items: flex-end;
  min-height: 228px; border-radius: var(--r-lg); overflow: hidden;
  background: #070A12; isolation: isolate;
}
.hero-mini .cover__img { position: absolute; inset: 0; z-index: 0; }
.hero-mini__body { position: relative; z-index: 2; padding: var(--sp-5); width: 100%; }
.hero-mini__meta {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: var(--sp-2);
  color: rgba(238, 242, 250, .72); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .03em;
}
.hero-mini__title {
  color: #fff; font-size: 1.0625rem; line-height: 1.45; font-weight: 700; letter-spacing: -.012em;
  text-shadow: 0 1px 2px rgba(4, 8, 16, .45), 0 6px 22px rgba(4, 8, 16, .3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-mini:hover .cover__img, .hero-card:hover .cover__img { transform: scale(1.025); }

/* ---------- 07 Ticker ---------- */
.ticker {
  display: flex; align-items: center;
  height: 46px; margin-top: var(--sp-6);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.ticker__label {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  align-self: stretch; padding: 0 var(--sp-5) 0 0;
  background: var(--bg);
  color: var(--ink); font-size: var(--fs-2xs); font-weight: 750;
  letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 12px 0 18px -12px var(--bg);
}
.ticker__viewport { position: relative; flex: 1; min-width: 0; overflow: hidden; align-self: stretch; }
.ticker__viewport::before, .ticker__viewport::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 2; pointer-events: none;
}
.ticker__viewport::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ticker__viewport::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.ticker__track { display: inline-flex; align-items: center; height: 100%; width: max-content; animation: ticker-scroll 56s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { display: inline-flex; align-items: center; gap: 10px; padding-right: var(--sp-8); font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; }
.ticker__item:hover { color: var(--cat); }
.ticker__item time { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--ink-3); }
.ticker__item::after { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); margin-left: var(--sp-4); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- 08 Section head ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-5); margin-bottom: var(--sp-6); }
.sec-head__eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cat);
}
.sec-head__eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--cat); }
.sec-head__title { margin-top: 7px; font-size: var(--fs-h2); line-height: 1.25; font-weight: 750; letter-spacing: -.025em; }
.sec-head__sub { margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); }
.sec-head__link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.sec-head__link svg { width: 14px; height: 14px; transition: transform var(--dur-fast) var(--ease); }
.sec-head__link:hover { color: var(--cat); }
.sec-head__link:hover svg { transform: translateX(3px); }

/* ---------- 09 Filter bar ---------- */
.filter {
  display: flex; align-items: center; gap: var(--sp-4);
  min-height: 52px; margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
}
.filter__tabs {
  position: relative;
  display: flex; align-items: center; gap: 2px;
  min-width: 0; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-block: 8px;
}
.filter__tabs::-webkit-scrollbar { display: none; }
.filter__tabs.is-scrollable { -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 30px), transparent 100%); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 30px), transparent 100%); }
.filter__tabs.is-scrollable::after {
  content: ""; position: sticky; right: 0; flex: 0 0 34px;
  align-self: stretch; margin-left: -34px;
  background: linear-gradient(270deg, var(--bg), transparent);
  pointer-events: none;
}
.filter__tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border-radius: var(--r-sm);
  font-size: var(--fs-xs); font-weight: 650; color: var(--ink-2);
  white-space: nowrap; scroll-snap-align: start;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.filter__tab .count { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--ink-3); }
.filter__tab:hover { color: var(--ink); background: var(--surface-2); }
.filter__tab.is-active { color: var(--cat); background: var(--cat-soft); }
.filter__tab:first-child.is-active { color: var(--ink); background: var(--surface-2); }
.filter__tab.is-active .count { color: var(--cat); opacity: .72; }
.filter__sort { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; font-size: var(--fs-2xs); color: var(--ink-3); }
.filter__sort select {
  height: 32px; padding: 0 26px 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23878D98' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  color: var(--ink-2); font-size: var(--fs-2xs); cursor: pointer;
  appearance: none; -webkit-appearance: none;
}
.filter__sort select:focus { outline: 2px solid var(--cat); outline-offset: 2px; }

/* ---------- 10 Cards / feed ---------- */
.feed { display: flex; flex-direction: column; gap: var(--sp-4); }

.post-feature {
  display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  overflow: hidden; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.post-feature:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.post-feature__cover { min-height: 302px; }
.post-feature__body { display: flex; flex-direction: column; justify-content: center; padding: var(--sp-8); }
.post-feature__meta { display: flex; align-items: center; gap: 8px; margin-bottom: var(--sp-3); }
.post-feature__title { font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.38; font-weight: 750; letter-spacing: -.022em; }
.post-feature__title a:hover { color: var(--cat); }
.post-feature__desc {
  margin-top: var(--sp-3); color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.78;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-feature__foot { display: flex; align-items: center; gap: 10px; margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); font-size: var(--fs-2xs); color: var(--ink-3); }
.post-feature__foot .author__meta a { color: var(--ink-3); }
.post-feature__foot .author__meta a:hover { color: var(--cat); }
.post-feature__foot .read { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }

.post-row {
  display: grid; grid-template-columns: 232px minmax(0, 1fr);
  gap: var(--sp-5); padding: var(--sp-4);
  border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.post-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.post-row:hover .cover__img { transform: scale(1.035); }
.post-row__cover { width: 100%; border-radius: var(--r-xs); min-height: 144px; min-width: 0; }
.post-row__body { display: flex; flex-direction: column; justify-content: center; padding-right: var(--sp-3); }
.post-row__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.post-row__title { font-size: 1.0625rem; line-height: 1.48; font-weight: 700; letter-spacing: -.012em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-row__title a:hover { color: var(--cat); }
.post-row__desc { margin-top: 6px; font-size: var(--fs-xs); line-height: 1.65; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.post-row__foot { display: flex; align-items: center; gap: 10px; margin-top: var(--sp-3); font-size: var(--fs-2xs); color: var(--ink-3); }
.post-row__foot .read { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }

.post-card {
  display: flex; flex-direction: column;
  overflow: hidden; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.post-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card:hover .cover__img { transform: scale(1.035); }
.post-card__cover .cover__img, .post-row__cover .cover__img, .post-feature__cover .cover__img { filter: saturate(.9) contrast(1.03); }
.post-card__cover { border-radius: 0; }
.post-card__cover .cat-tag {
  position: absolute; left: 12px; top: 12px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 9px; border-radius: 5px;
  background: rgba(8, 10, 16, .48); border: 1px solid rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; font-size: 10px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
}
.post-card__cover .cat-tag .dot { background: var(--cat); }
.post-card__body { display: flex; flex-direction: column; flex: 1; padding: var(--sp-5); }
.post-card__title { font-size: 1.0625rem; line-height: 1.48; font-weight: 700; letter-spacing: -.012em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__title a:hover { color: var(--cat); }
.post-card__desc { margin-top: 7px; font-size: var(--fs-xs); line-height: 1.68; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card__foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: var(--sp-4); font-size: var(--fs-2xs); color: var(--ink-3); }
.post-card__foot .read { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }

/* category grid featured item */
.grid--cat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
.post-card--feature { grid-column: 1 / -1; flex-direction: row; }
.post-card--feature .post-card__cover { flex: 0 0 52%; min-height: 320px; border-radius: 0; }
.post-card--feature .post-card__body { justify-content: center; padding: var(--sp-8); }
.post-card--feature .post-card__title { font-size: clamp(1.4rem, 2.1vw, 1.75rem); line-height: 1.36; -webkit-line-clamp: 3; }
.post-card--feature .post-card__desc { font-size: var(--fs-sm); line-height: 1.75; -webkit-line-clamp: 3; max-width: 48ch; }
.post-card--feature .post-card__foot { margin-top: var(--sp-5); }

/* ---------- 11 Sidebar ---------- */
.sidebar { position: sticky; top: calc(var(--nav-h) + var(--sp-5)); display: flex; flex-direction: column; gap: var(--sp-4); }
.side-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.side-card__head { display: flex; align-items: center; justify-content: space-between; padding: 13px var(--sp-4); border-bottom: 1px solid var(--line); }
.side-card__title { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 750; letter-spacing: .01em; }
.side-card__title::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--cat); }
.side-card__more { font-size: var(--fs-2xs); color: var(--ink-3); }
.side-card__more:hover { color: var(--cat); }

.author-card { padding: var(--sp-6) var(--sp-5) 0; text-align: center; }
.author-card__avatar { width: 60px; height: 60px; margin: 0 auto var(--sp-3); border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); }
.author-card__name { font-size: var(--fs-sm); font-weight: 750; }
.author-card__bio { margin-top: 6px; font-size: var(--fs-2xs); line-height: 1.7; color: var(--ink-2); }
.author-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: var(--sp-5); border-top: 1px solid var(--line); }
.author-card__stat { padding: 12px 4px; border-right: 1px solid var(--line); }
.author-card__stat:last-child { border-right: 0; }
.author-card__stat b { display: block; font-family: var(--font-mono); font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.author-card__stat span { display: block; margin-top: 2px; font-size: 10px; color: var(--ink-3); letter-spacing: .04em; }

.hot-list { padding: 4px 0 6px; }
.hot-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 9px var(--sp-4); transition: background var(--dur-fast) var(--ease); }
.hot-item:hover { background: var(--surface-2); }
.hot-item__rank { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-3); padding-top: 2px; font-variant-numeric: tabular-nums; }
.hot-item:nth-child(1) .hot-item__rank { color: var(--gold); }
.hot-item:nth-child(2) .hot-item__rank, .hot-item:nth-child(3) .hot-item__rank { color: var(--cat); }
.hot-item__title { font-size: var(--fs-xs); line-height: 1.5; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hot-item:hover .hot-item__title { color: var(--cat); }
.hot-item__meta { margin-top: 3px; font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.cat-nav { padding: 5px 0 7px; }
.cat-nav__item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px var(--sp-4); transition: background var(--dur-fast) var(--ease); }
.cat-nav__item:hover { background: var(--surface-2); }
.cat-nav__glyph {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 6px; font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  color: var(--cat); background: var(--cat-soft); border: 1px solid var(--cat-line);
}
.cat-nav__name { font-size: var(--fs-xs); font-weight: 650; }
.cat-nav__desc { display: none; }
.cat-nav__count { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.ad-box { position: relative; border-style: dashed; }
.ad-box__art { aspect-ratio: 16 / 9; background: #070A12; }
.ad-box__art img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.ad-box__body { padding: var(--sp-4); text-align: center; }
.ad-box__label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.ad-box__title { margin-top: 7px; font-size: var(--fs-xs); font-weight: 700; }
.ad-box__desc { margin-top: 5px; font-size: var(--fs-2xs); line-height: 1.65; color: var(--ink-3); }
.ad-box .btn { margin-top: var(--sp-4); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: var(--sp-4); }
.tag-cloud .pill { height: 26px; }
.archive-list { padding: 4px 0 8px; }
.archive-list__item { display: flex; align-items: center; justify-content: space-between; padding: 8px var(--sp-4); font-size: var(--fs-xs); color: var(--ink-2); }
.archive-list__item:hover { color: var(--cat); background: var(--surface-2); }
.archive-list__item span { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); }

/* ---------- 12 Archive hero ---------- */
.archive-hero {
  position: relative;
  padding: var(--sp-12) 0 var(--sp-10);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.archive-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 380px at 82% -10%, var(--cat-soft), transparent 70%);
}
.archive-hero__inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: var(--sp-12); align-items: center;
}
.archive-hero__main { min-width: 0; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: var(--fs-2xs); color: var(--ink-3); margin-bottom: var(--sp-6); }
.breadcrumb a:hover { color: var(--cat); }
.breadcrumb__sep { color: var(--line-strong); }
.archive-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--cat);
}
.archive-hero__eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--cat); }
.archive-hero__title {
  margin-top: var(--sp-3);
  font-family: var(--font-serif);
  font-size: var(--fs-display); font-weight: 700;
  line-height: 1.12; letter-spacing: -.02em;
}
.archive-hero__title .en {
  display: block; margin-top: 8px;
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 500;
  letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3);
}
.archive-hero__desc { margin-top: var(--sp-4); max-width: 42ch; font-size: var(--fs-sm); line-height: 1.8; color: var(--ink-2); }
.archive-hero__stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: var(--sp-7); }
.archive-hero__stat { padding: 0 var(--sp-6); border-left: 1px solid var(--line); }
.archive-hero__stat:first-child { padding-left: 0; border-left: 0; }
.archive-hero__stat-num { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.archive-hero__stat-label { margin-top: 4px; font-size: var(--fs-2xs); color: var(--ink-3); letter-spacing: .04em; }
.archive-hero__art { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #070A12; box-shadow: var(--shadow) }
.archive-hero__art img { width: 100%; height: 100%; object-fit: cover; }
.archive-hero__art .art-label {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,.78); font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
}
.archive-hero__art .art-label .dot { background: var(--cat); }
.archive-hero__art .art-index {
  position: absolute; right: 14px; top: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: rgba(255,255,255,.55);
}
.archive-hero__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(4,6,12,.55)); }

/* ---------- 13 Pagination (live-theme compatible) ---------- */
.pagination { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-block: var(--sp-12); }
.pagination__meta { font-size: var(--fs-2xs); color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.pagination__inner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
/* Typecho 把页码包在 <span> 里，部分 span 还带 .page-btn。用 display:contents
   拆掉多余的盒子，统一只给内层 <a> 上样式，避免「双层按钮」错位。 */
.pagination__inner > span { display: contents; }
.pagination__inner > span > a,
.pagination__inner > a {
  display: inline-grid; place-items: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--fs-xs); font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.pagination__inner > span > a:hover,
.pagination__inner > a:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.pagination__inner > span.is-active > a,
.pagination__inner > span.page-btn.is-active > a {
  color: #fff; background: var(--ink); border-color: var(--ink);
}
[data-theme="dark"] .pagination__inner > span.is-active > a,
[data-theme="dark"] .pagination__inner > span.page-btn.is-active > a { color: #0A0B10; background: var(--ink); border-color: var(--ink); }
.pagination__inner > span > a:not([href]) { border-color: transparent; background: none; color: var(--ink-3); min-width: 24px; padding: 0; }
.pagination__inner > span.page-btn > a { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: auto; padding-inline: 12px; white-space: nowrap; }
.pagination__inner > span.page-btn > a svg { width: 14px; height: 14px; }
.pagination__inner .pagination__gap { color: var(--ink-3); }
.page-btn { /* live-theme fallback when .page-btn sits on <a> */ }

/* ---------- 14 Article ---------- */
.article-head { padding-top: var(--sp-9); }
.article-head__inner { max-width: 56rem; }
.article-head .breadcrumb { margin-bottom: var(--sp-5); }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp-4); }
.article-title {
  font-size: var(--fs-h1); line-height: 1.3; font-weight: 750;
  letter-spacing: -.03em; text-wrap: balance;
}
.article-lead { position: relative; margin-top: var(--sp-5); padding-left: var(--sp-4); max-width: 52ch; font-size: 1.0625rem; line-height: 1.82; color: var(--ink-2); }
.article-lead::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 2px; border-radius: 2px; background: var(--cat); }
.article-meta {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  margin-top: var(--sp-6); padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
.article-meta__left { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.article-meta__left .avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); }
.author__name { font-size: var(--fs-xs); font-weight: 700; }
.author__meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: var(--fs-2xs); color: var(--ink-3); }
.article-meta__right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.article-meta__right .icon-btn { width: 34px; height: 34px; }
.article-cover { margin-top: var(--sp-8); border-radius: var(--r-lg); overflow: hidden; background: #070A12; }
.article-cover .cover__img { width: 100%; height: 100%; }
.article-cover figcaption { padding: 10px 4px 0; font-size: var(--fs-2xs); color: var(--ink-3); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--toc-w); gap: var(--sp-10); padding-top: var(--sp-10); align-items: start; }
.article-main { min-width: 0; }
.prose { max-width: var(--prose-width); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink); letter-spacing: .012em; }
.prose > p { margin-bottom: 1.15em; }
.prose > p:first-of-type { font-size: 1.08em; color: var(--ink); }
.prose h2 {
  position: relative; margin: 2em 0 .7em; padding-left: 16px;
  font-size: 1.625rem; line-height: 1.4; font-weight: 750; letter-spacing: -.02em;
}
.prose h2::before { content: ""; position: absolute; left: 0; top: .32em; bottom: .32em; width: 3px; border-radius: 2px; background: var(--cat); }
.prose h3 { margin: 1.7em 0 .6em; font-size: 1.25rem; line-height: 1.5; font-weight: 700; }
.prose h3::before { content: "# "; color: var(--cat); font-family: var(--font-mono); font-weight: 500; }
.prose a { color: var(--cat); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; text-decoration-color: var(--cat-line); text-decoration-skip-ink: auto; }
.prose a:hover { text-decoration-color: var(--cat); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; margin-bottom: .5em; }
.prose ul > li::before { content: ""; position: absolute; left: -1.1em; top: .72em; width: 5px; height: 5px; border-radius: 1px; background: var(--cat); }
.prose ol { list-style: decimal; }
.prose ol > li { margin-bottom: .5em; padding-left: .2em; }
.prose ol > li::marker { color: var(--cat); font-family: var(--font-mono); font-size: .85em; }
.prose blockquote {
  margin: 1.6em 0; padding: .1em 0 .1em 20px;
  border-left: 3px solid var(--cat);
  color: var(--ink-2); font-size: .96em; line-height: 1.8;
}
.prose blockquote p { margin-bottom: .7em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose figure { margin: 2.2em 0; }
.prose figure img { width: 100%; border-radius: var(--r-md); }
.prose figcaption { margin-top: 10px; font-size: var(--fs-2xs); line-height: 1.65; color: var(--ink-3); }
.prose .callout {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px;
  margin: 1.8em 0; padding: 16px 18px;
  border: 1px solid var(--line); border-left: 3px solid var(--cat);
  border-radius: var(--r-sm); background: var(--surface);
  font-size: var(--fs-xs); line-height: 1.75;
}
.prose .callout strong { display: block; margin-bottom: 2px; }
.prose code { padding: .16em .4em; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); font-family: var(--font-mono); font-size: .86em; color: var(--cat); }
.prose pre { margin: 1.6em 0; padding: 18px; border-radius: var(--r-md); background: #0A0C11; border: 1px solid #23262E; overflow-x: auto; }
.prose pre code { padding: 0; background: none; border: 0; color: #DDE3EE; font-size: .86em; }
.prose table { width: 100%; margin: 1.6em 0; border-collapse: collapse; font-size: var(--fs-xs); line-height: 1.7; }
.prose th { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line-strong); background: var(--surface-2); font-weight: 700; }
.prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.prose td:first-child { color: var(--ink); }
.prose .table-wrap { overflow-x: auto; }

.article-foot { max-width: var(--prose-width); margin-top: var(--sp-12); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; padding-block: var(--sp-5); border-top: 1px solid var(--line); }
.author-box { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--sp-4); align-items: center; margin-top: var(--sp-6); padding: var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.author-box__avatar { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); }
.author-box__name { font-size: var(--fs-sm); font-weight: 750; }
.author-box__bio { margin-top: 4px; font-size: var(--fs-2xs); line-height: 1.65; color: var(--ink-2); }

.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); margin-top: var(--sp-6); }
.pager__item { display: flex; flex-direction: column; gap: 8px; padding: var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); transition: all var(--dur) var(--ease); }
.pager__item:hover { border-color: var(--line-strong); background: var(--surface-2); }
.pager__label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); color: var(--ink-3); }
.pager__label svg { width: 13px; height: 13px; }
.pager__title { font-size: var(--fs-xs); line-height: 1.55; font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pager__item--next { text-align: right; }
.pager__item--next .pager__label { justify-content: flex-end; }

/* live theme pager markup compatibility: spans are direct children */
.pager > .pager__label:nth-child(1) { grid-column: 1; grid-row: 1; }
.pager > .pager__title:nth-child(2) { grid-column: 1; grid-row: 2; }
.pager > .pager__label:nth-child(3) { grid-column: 2; grid-row: 1; justify-content: flex-end; }
.pager > .pager__title:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; }
.pager > .pager__title { padding: 0; border: 0; background: none; }
.pager > .pager__title .pager__item { display: block; padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.pager > .pager__title .pager__item:hover { border-color: var(--line-strong); background: var(--surface-2); }

/* TOC + reading tools */
.article-rail { position: sticky; top: calc(var(--nav-h) + var(--sp-5)); display: flex; flex-direction: column; gap: var(--sp-4); }
.rail-card { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.rail-card__head { padding: 12px var(--sp-4); border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.toc { max-height: 44vh; overflow-y: auto; padding: 6px 0 10px; }
.toc__list { border-left: 0; }
.toc__link { display: block; padding: 6px var(--sp-4) 6px 14px; border-left: 2px solid transparent; font-size: var(--fs-2xs); line-height: 1.55; color: var(--ink-3); }
.toc__link:hover { color: var(--ink); }
.toc__link.is-active { color: var(--cat); border-left-color: var(--cat); font-weight: 650; }
.toc__link--sub { padding-left: 24px; }
.rail-actions { display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px; gap: 4px; }
.rail-actions__btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: var(--r-xs); color: var(--ink-3); font-size: 9px; }
.rail-actions__btn:hover { background: var(--surface-2); color: var(--ink); }
.rail-actions__btn svg { width: 16px; height: 16px; }
.rail-actions__btn.is-active { color: var(--cat); background: var(--cat-soft); }

/* ---------- 15 About / 404 / search ---------- */
.page-hero { padding: var(--sp-16) 0 var(--sp-10); border-bottom: 1px solid var(--line); }
.page-hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: var(--fs-2xs); letter-spacing: .16em; text-transform: uppercase; color: var(--cat); }
.page-hero__eyebrow::before { content: ""; width: 20px; height: 1px; background: var(--cat); }
.page-hero__title { margin-top: var(--sp-3); font-family: var(--font-serif); font-size: var(--fs-display); line-height: 1.18; letter-spacing: -.02em; }
.page-hero__desc { margin-top: var(--sp-4); max-width: 48ch; font-size: var(--fs-sm); line-height: 1.85; color: var(--ink-2); }
.page-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: var(--sp-12); padding-block: var(--sp-12); }
.page-grid h2 { margin-top: 1.8em; font-size: 1.35rem; font-weight: 750; }
.page-grid h2:first-child { margin-top: 0; }
.page-grid p { margin-top: 1em; font-size: var(--fs-sm); line-height: 1.9; color: var(--ink-2); }
.page-aside { display: flex; flex-direction: column; gap: var(--sp-4); }
.stat-block { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.stat-block__item { padding: var(--sp-5); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-block__item:nth-child(2n) { border-right: 0; }
.stat-block__item:nth-last-child(-n+2) { border-bottom: 0; }
.stat-block__item b { display: block; font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; }
.stat-block__item span { display: block; margin-top: 3px; font-size: var(--fs-2xs); color: var(--ink-3); }

.sponsor-bar { display: flex; align-items: center; gap: var(--sp-5); padding: var(--sp-6); border: 1px solid var(--gold-line, color-mix(in srgb, var(--gold) 32%, transparent)); border-radius: var(--r-md); background: color-mix(in srgb, var(--gold) 5%, transparent); }
.sponsor-bar__text { flex: 1; }
.sponsor-bar__label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.sponsor-bar__title { margin-top: 4px; font-size: 1.0625rem; font-weight: 750; }
.sponsor-bar__desc { margin-top: 4px; font-size: var(--fs-2xs); color: var(--ink-2); }

.error-page { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 62vh; text-align: center; padding: var(--sp-16) 0; }
.error-code { font-family: var(--font-mono); font-size: clamp(6rem, 16vw, 12rem); line-height: .9; font-weight: 500; letter-spacing: -.06em; color: var(--cat); opacity: .22; }
.error-title { margin-top: var(--sp-2); font-family: var(--font-serif); font-size: 2rem; font-weight: 700; }
.error-desc { margin-top: var(--sp-3); max-width: 38ch; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.8; }
.error-page .btn { margin-top: var(--sp-6); }

/* ---------- 16 Search / drawer / to-top ---------- */
.search-panel { position: fixed; inset: 0; z-index: 200; display: grid; place-items: start center; padding-top: 14vh; background: rgba(8, 9, 13, .58); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease); }
.search-panel.is-open { opacity: 1; visibility: visible; }
.search-panel__box { width: min(620px, calc(100% - 32px)); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 40px 100px -30px rgba(0,0,0,.5); padding: var(--sp-5); transform: translateY(-8px); transition: transform var(--dur) var(--ease); }
.search-panel.is-open .search-panel__box { transform: none; }
.search-field { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.search-field svg { width: 18px; height: 18px; color: var(--ink-3); }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; font-size: var(--fs-sm); }
.search-field input::placeholder { color: var(--ink-3); }
.search-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-4); }
.search-hint__label { font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.drawer { position: fixed; inset: 0; z-index: 210; pointer-events: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(6, 8, 12, .55); opacity: 0; transition: opacity var(--dur) var(--ease); }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); padding: var(--sp-5); background: var(--bg); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform var(--dur) var(--ease); overflow-y: auto; overscroll-behavior: contain; }
.drawer.is-open { pointer-events: auto; }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); }
.drawer__list { display: flex; flex-direction: column; gap: 2px; }
.drawer__list a { display: flex; align-items: center; justify-content: space-between; padding: 12px; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 650; color: var(--ink-2); }
.drawer__list a:hover { background: var(--surface-2); color: var(--ink); }
.drawer__list a span { font-family: var(--font-mono); font-size: 10px; font-weight: 500; color: var(--ink-3); }
.drawer__actions { display: flex; gap: 8px; margin-top: var(--sp-5); }
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(8px); transition: all var(--dur) var(--ease); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--cat); border-color: var(--cat-line); }
.progress { position: fixed; top: 0; left: 0; z-index: 120; width: 0; height: 2px; background: var(--cat); transition: width 90ms linear; }
.toast { position: fixed; left: 50%; bottom: 32px; z-index: 300; transform: translate(-50%, 12px); padding: 10px 16px; border-radius: var(--r-sm); background: var(--ink); color: var(--bg); font-size: var(--fs-xs); opacity: 0; visibility: hidden; transition: all var(--dur) var(--ease); }
.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------- 17 Comments ---------- */
.comments { max-width: var(--prose-width); margin-top: var(--sp-12); padding-top: var(--sp-8); border-top: 1px solid var(--line); }
.comments__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: var(--sp-5); }
.comments__title { font-size: 1.25rem; font-weight: 750; }
.comments__count { font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--ink-3); }
.comment-list { display: flex; flex-direction: column; gap: var(--sp-5); }
.comment { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
.comment__avatar { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); }
.comment__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment__name { font-size: var(--fs-xs); font-weight: 700; }
.comment__time { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); }
.comment__body { margin-top: 6px; font-size: var(--fs-xs); line-height: 1.75; color: var(--ink-2); }
.comment-form { margin-top: var(--sp-6); padding: var(--sp-5); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.comment-form__row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); margin-bottom: var(--sp-3); }
.field input, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); font-size: var(--fs-xs); outline: 0; }
.field textarea { min-height: 112px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--cat); }
.comment-form .btn { margin-top: var(--sp-3); }

/* ---------- 18 Footer ---------- */
.footer { margin-top: var(--sp-16); border-top: 1px solid var(--line); background: var(--bg-elev); }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: var(--sp-10); padding-block: var(--sp-12); }
.footer__brand { max-width: 34ch; }
.footer__brand .brand__logo { height: 36px; }
.footer__brand-desc { margin-top: var(--sp-4); font-size: var(--fs-2xs); line-height: 1.8; color: var(--ink-3); }
.footer__social { display: flex; gap: 4px; margin-top: var(--sp-4); }
.footer__col-title { font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--sp-4); }
.footer__links { display: flex; flex-direction: column; gap: 9px; }
.footer__links a { font-size: var(--fs-xs); color: var(--ink-2); }
.footer__links a:hover { color: var(--cat); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding-block: var(--sp-5); border-top: 1px solid var(--line); font-size: 10px; color: var(--ink-3); }
.footer__bottom-links { display: flex; gap: var(--sp-4); }
.footer__bottom a:hover { color: var(--cat); }

/* ---------- 19 Motion ---------- */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 20 Responsive ---------- */
@media (max-width: 1200px) {
  .container { padding-inline: var(--sp-6); }
  .grid--main { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-8); }
  .nav__link { padding-inline: 9px; }
  .archive-hero__inner { gap: var(--sp-8); }
}
@media (max-width: 1024px) {
  :root { --nav-h: 60px; }
  .nav__menu { display: none; }
  .nav__toggle { display: inline-grid; }
  .nav__rss { display: none; }
  .grid--main { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--sp-4); margin-top: var(--sp-8); }
  .sidebar .side-card:first-child { grid-row: span 2; }
  .grid--hero { grid-template-columns: minmax(0, 1fr); }
  .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .hero-card { min-height: 420px; }
  .hero-mini { min-height: 190px; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-hero__inner { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .archive-hero__art { max-width: 640px; }
  .archive-hero__desc { max-width: 56ch; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-rail { display: none; }
  .footer__grid { grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--sp-6); }
}
@media (max-width: 768px) {
  :root { --fs-body: 1rem; --nav-h: 56px; --prose-width: 100%; }
  .container { padding-inline: var(--sp-5); }
  .section { padding-block: var(--sp-10); }
  .hero { padding-top: var(--sp-4); }
  .hero-card { min-height: 380px; border-radius: var(--r-lg); }
  .hero-card__body { padding: var(--sp-5); }
  .hero-card__title { font-size: 1.55rem; max-width: none; }
  .hero-card__desc { display: none; }
  .hero-card__foot { margin-top: var(--sp-4); }
  .hero-side { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
  .hero-mini { min-height: 156px; }
  .hero-mini__title { font-size: .95rem; }
  .ticker { margin-top: var(--sp-4); }
  .ticker__label { padding-right: var(--sp-3); }
  .sec-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: var(--sp-5); }
  .sec-head__title { font-size: 1.5rem; }
  .filter { gap: var(--sp-2); }
  .filter__sort { display: none; }
  .post-feature { grid-template-columns: minmax(0, 1fr); }
  .post-feature__cover { min-height: 0; aspect-ratio: 16 / 9; }
  .post-feature__body { padding: var(--sp-5); }
  .post-row { grid-template-columns: 124px minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-3); }
  .post-row__cover { min-height: 92px; height: 92px; aspect-ratio: auto; }
  .post-row__title { font-size: .9375rem; -webkit-line-clamp: 3; }
  .post-row__desc { display: none; }
  .post-row__foot { margin-top: 6px; }
  .grid--2, .grid--3, .grid--4, .grid--cat { grid-template-columns: minmax(0, 1fr); }
  .post-card--feature { flex-direction: column; }
  .post-card--feature .post-card__cover { flex: none; min-height: 0; aspect-ratio: 16 / 9; }
  .post-card--feature .post-card__body { padding: var(--sp-5); }
  .post-card--feature .post-card__title { font-size: 1.25rem; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .sidebar .side-card:first-child { grid-row: auto; }
  .archive-hero { padding: var(--sp-8) 0 var(--sp-7); }
  .archive-hero__title { font-size: 2.5rem; }
  .archive-hero__desc { font-size: var(--fs-xs); }
  .archive-hero__stats { margin-top: var(--sp-5); }
  .archive-hero__stat { padding-inline: var(--sp-4); }
  .archive-hero__stat-num { font-size: 1.2rem; }
  .archive-hero__art { display: none; }
  .article-head { padding-top: var(--sp-6); }
  .article-title { font-size: 1.75rem; line-height: 1.38; }
  .article-lead { font-size: 1rem; }
  .article-meta { flex-wrap: wrap; gap: 12px; }
  .article-meta__right { width: 100%; justify-content: flex-end; margin-left: auto; }
  .article-cover { margin-top: var(--sp-5); border-radius: var(--r-md); }
  .article-layout { padding-top: var(--sp-7); }
  .prose { line-height: 1.85; }
  .prose h2 { font-size: 1.375rem; }
  .prose h3 { font-size: 1.125rem; }
  .author-box { grid-template-columns: auto minmax(0, 1fr); }
  .author-box .btn { grid-column: 1 / -1; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .comment-form__row { grid-template-columns: minmax(0, 1fr); }
  .page-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-8); padding-block: var(--sp-8); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8) var(--sp-6); padding-block: var(--sp-10); }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sponsor-bar { flex-direction: column; align-items: flex-start; }
  .sponsor-bar .btn { width: 100%; }
  .to-top { right: 14px; bottom: 14px; }
}
@media (max-width: 480px) {
  .container { padding-inline: var(--sp-4); }
  .hero-card__foot { gap: 8px; font-size: 10.5px; }
  .hero-card__foot .avatar { width: 22px; height: 22px; }
  .hero-card__foot > span,
  .hero-card__foot .read-time,
  .hero-card__foot .meta,
  .hero-card__foot .author__name,
  .hero-card__foot .author__meta { white-space: nowrap; }
  .hero-card__foot .read-time { margin-left: auto; gap: 4px; }
  .archive-hero__stats { gap: 0; }
  .archive-hero__stat { padding-inline: var(--sp-3); }
  .archive-hero__stat:first-child { padding-left: 0; }
  .post-row { grid-template-columns: 104px minmax(0, 1fr); }
  .post-card__body { padding: var(--sp-4); }
  .filter__tab { height: 32px; padding-inline: 10px; }
  .article-meta__right .icon-btn { width: 32px; height: 32px; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
}


/* ---------- 22 Live Typecho DOM compatibility ----------
   These rules only affect the existing theme's markup, so the same stylesheet
   can be dropped on the live site without touching PHP templates. */
.ticker { border-radius: 0; background: transparent; box-shadow: none; padding: 0; }
.ticker__label { background: var(--bg); }

/* hero mini: live markup has no __body wrapper */
.hero-mini:not(:has(.hero-mini__body)) { display: block; }
.hero-mini:not(:has(.hero-mini__body)) > .hero-mini__title {
  position: absolute; left: var(--sp-5); right: var(--sp-5); bottom: 44px; z-index: 2;
  margin: 0; color: #fff;
}
.hero-mini:not(:has(.hero-mini__body)) > .hero-mini__meta {
  position: absolute; left: var(--sp-5); right: var(--sp-5); bottom: 18px; z-index: 2;
  margin: 0; display: flex; align-items: center; gap: 7px;
  color: rgba(238,242,250,.7); font-size: var(--fs-2xs);
}
.hero-mini:not(:has(.hero-mini__body)) > .hero-mini__meta .meta__sep { width:1px; height:10px; background:rgba(255,255,255,.24); }

/* feed feature: live markup is a vertical card, not cover+body */
.post-feature:not(:has(.post-feature__body)) { display: block; padding: var(--sp-4); }
.post-feature:not(:has(.post-feature__body)) .post-feature__cover {
  aspect-ratio: 21 / 9; min-height: 0; border-radius: var(--r-md); margin-bottom: var(--sp-4);
}
.post-feature:not(:has(.post-feature__body)) .post-feature__title,
.post-feature:not(:has(.post-feature__body)) .post-feature__desc,
.post-feature:not(:has(.post-feature__body)) .post-feature__foot { padding-inline: var(--sp-4); }
.post-feature:not(:has(.post-feature__body)) .post-feature__title { margin-top: 0; font-size: clamp(1.35rem, 2vw, 1.7rem); }
.post-feature:not(:has(.post-feature__body)) .post-feature__desc { -webkit-line-clamp: 2; }
.post-feature:not(:has(.post-feature__body)) .post-feature__foot { border-top: 1px solid var(--line); }

/* archive hero: live stats have no wrapper class */
.archive-hero__inner { max-width: none; }
.archive-hero__art { aspect-ratio: 3 / 2; }
.archive-hero__art img { width: 100%; height: 100%; object-fit: cover; }
.archive-hero__stats > div:not(.archive-hero__stat) { padding: 0 var(--sp-6); border-left: 1px solid var(--line); }
.archive-hero__stats > div:not(.archive-hero__stat):first-child { padding-left: 0; border-left: 0; }

/* live row meta (inline category link before the title) */
.post-row__body > div[style]:first-child { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.post-row__body > div[style]:first-child a {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: 5px; border: 1px solid var(--cat-line); background: var(--cat-soft);
  color: var(--cat); font-size: var(--fs-2xs); font-weight: 650;
}
.post-row__foot .post-row__tags { display: flex; flex-wrap: wrap; gap: 5px; }
.post-row__foot .post-row__tags a { color: var(--ink-3); font-size: var(--fs-2xs); }
.post-row__foot .post-row__tags a:hover { color: var(--cat); }
.post-row__foot .meta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-2xs); color: var(--ink-3); }

/* live sidebar widgets */
.sidebar .widget { padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.sidebar .widget__head { display: flex; align-items: center; justify-content: space-between; padding: 13px var(--sp-4); border-bottom: 1px solid var(--line); }
.sidebar .widget__title { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 750; }
.sidebar .widget__title::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--cat); }
.sidebar .widget__body { padding: 0; }
.sidebar .author-card__stats { display: grid; grid-template-columns: repeat(3,1fr); margin-top: var(--sp-5); border-top: 1px solid var(--line); }
.sidebar .author-card__stats .stat { padding: 12px 4px; border-right: 1px solid var(--line); }
.sidebar .author-card__stats .stat:last-child { border-right: 0; }
.sidebar .stat__num { font-family: var(--font-mono); font-size: 1rem; font-weight: 650; line-height: 1.2; }
.sidebar .stat__label { margin-top: 2px; font-size: 10px; color: var(--ink-3); }
.sidebar .cat-list { padding: 5px 0 7px; }
.sidebar .cat-item { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 7px var(--sp-4); }
.sidebar .cat-item:hover { background: var(--surface-2); }
.sidebar .cat-item__ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--cat-soft); border: 1px solid var(--cat-line); color: var(--cat); font-family: var(--font-mono); font-size: 9px; font-weight: 700; }
.sidebar .cat-item__name { display: block; font-size: var(--fs-xs); font-weight: 650; color: var(--ink); }
.sidebar .cat-item__desc { display: none; }
.sidebar .cat-item__count { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); }
.sidebar .rank-list { padding: 4px 0 6px; }
.sidebar .rank-item { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 8px; padding: 9px var(--sp-4); }
.sidebar .rank-item:hover { background: var(--surface-2); }
.sidebar .rank-item__num { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-3); padding-top: 2px; }
.sidebar .rank-item:nth-child(1) .rank-item__num { color: var(--gold); }
.sidebar .rank-item:nth-child(2) .rank-item__num, .sidebar .rank-item:nth-child(3) .rank-item__num { color: var(--cat); }
.sidebar .rank-item__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-xs); line-height: 1.5; font-weight: 600; }
.sidebar .rank-item:hover .rank-item__title { color: var(--cat); }
.sidebar .rank-item__meta { display: block; margin-top: 3px; font-size: 10px; color: var(--ink-3); }

/* live article aside: TOC card + compact reading tools */
.article-layout > aside { position: sticky; top: calc(var(--nav-h) + var(--sp-5)); display: flex; flex-direction: column; gap: var(--sp-4); }
.article-layout > aside .toc {
  position: static; max-height: 44vh; overflow-y: auto; padding-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
}
.article-layout > aside .toc:has(.toc__list:empty) { display: none; }
.article-layout > aside .toc__title { padding: 12px var(--sp-4); border-bottom: 1px solid var(--line); margin: 0; font-size: 10px; letter-spacing: .16em; }
.article-layout > aside .toc__list { border-left: 0; padding-top: 6px; }
.article-layout > aside .read-actions {
  position: static; margin: 0; padding: 8px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
}
.article-layout > aside .read-actions::before {
  content: "阅读工具"; grid-column: 1 / -1; padding: 2px 0 6px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-3);
}
.article-layout > aside .read-actions__btn { width: 100%; height: 34px; border: 0; border-radius: var(--r-xs); }
.article-layout > aside .read-actions__btn:hover { background: var(--surface-2); }
.article-layout > aside .read-actions__divider,
.article-layout > aside .read-actions > div[style] { display: none; }

/* live article tag strip */
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp-4); }
.article-tags a:not(.pill) { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: var(--fs-2xs); font-weight: 650; }
.article-tags a:not(.pill):hover { color: var(--cat); border-color: var(--cat-line); }
.article-tags > .pill:empty { display: none; }

/* live sec-head bare link */
.sec-head > a:not(.sec-head__link) { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 650; color: var(--ink-2); }
.sec-head > a:not(.sec-head__link):hover { color: var(--cat); }

@media (max-width: 1024px) {
  .article-layout > aside { display: none; }
}
@media (max-width: 768px) {
  .hero-mini:not(:has(.hero-mini__body)) > .hero-mini__title { left: var(--sp-4); right: var(--sp-4); bottom: 40px; }
  .hero-mini:not(:has(.hero-mini__body)) > .hero-mini__meta { left: var(--sp-4); right: var(--sp-4); bottom: 16px; }
  .post-feature:not(:has(.post-feature__body)) { padding: var(--sp-3); }
  .post-feature:not(:has(.post-feature__body)) .post-feature__title,
  .post-feature:not(:has(.post-feature__body)) .post-feature__desc,
  .post-feature:not(:has(.post-feature__body)) .post-feature__foot { padding-inline: var(--sp-2); }
}

/* ---------- 21 Print ---------- */
@media print {
  .nav, .footer, .sidebar, .ticker, .article-rail, .to-top, .progress, .ad-box, .filter { display: none !important; }
  .article-layout { display: block; }
  .prose { max-width: none; font-size: 11.5pt; line-height: 1.7; }
  body { background: #fff; color: #000; }
}
