/* AI Knowledge Lab — light editorial */
:root {
  --bg: #f7f5f0;
  --bg-elev: #ffffff;
  --bg-soft: #efece5;
  --line: #ddd7cb;
  --line-soft: #e8e3d8;
  --text: #1f242b;
  --text-dim: #5a616c;
  --text-faint: #8a9099;
  --accent: #9a7428;
  --accent-soft: rgba(154, 116, 40, 0.10);
  --teal: #3f7a68;
  --teal-soft: rgba(63, 122, 104, 0.10);
  --danger: #b45445;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  --max: 1120px;
  --prose: 42rem;
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--accent); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: #7a5a1c; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--text);
}
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin: 0 0 0.75rem; }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); margin: 2.25rem 0 0.85rem; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 0.6rem; }
p { margin: 0 0 1.1rem; }
ul, ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }
code, kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
}
pre {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  border-radius: var(--radius);
  margin: 0 0 1.4rem;
}
pre code { background: none; border: none; padding: 0; }
blockquote {
  margin: 0 0 1.4rem;
  padding: 0.85rem 1.1rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text-dim);
}
hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.prose-wrap {
  width: min(100% - 2rem, var(--prose));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(247, 245, 240, 0.9);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.85rem 0;
}
.brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: inherit;
  min-width: 0;
}
.brand:hover { color: inherit; }
.brand__logo {
  display: block;
  height: 2.35rem;
  width: 2.35rem;
}

.brand__tag {
  display: block;
  position: relative;
  height: 1.35rem;
  min-width: 12rem;
  max-width: min(42vw, 20rem);
  overflow: hidden;
  font-size: 0.72rem;
  line-height: 1.35rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}
.brand__rotate {
  display: block;
  position: relative;
  height: 100%;
}
.brand__item {
  position: absolute;
  left: 0;
  top: 0;
  height: 1.35rem;
  line-height: 1.35rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}
.brand__item.is-active {
  opacity: 1;
  transform: translateY(0);
}
.brand__item.is-exit {
  opacity: 0;
  transform: translateY(-0.45em);
}
@media (prefers-reduced-motion: reduce) {
  .brand__item { transition: none; }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.85rem;
  align-items: center;
  justify-content: flex-end;
}
.nav a {
  color: var(--text-dim);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover {
  color: var(--text);
}
.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
  border-bottom-color: transparent;
  box-shadow: inset 0 -1px 0 rgba(196,163,90,0.55);
}
.nav__search {
  font-size: 0.86rem;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.nav__search:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  font-family: var(--sans);
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line-soft);
}
.hero__kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.hero__title { margin-bottom: 1rem; max-width: 18ch; }
.hero__lead {
  font-size: 1.08rem;
  color: var(--text-dim);
  max-width: 38rem;
  margin-bottom: 1.5rem;
}
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1.25rem 0 0; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-size: 0.78rem;
  border-radius: 999px;
}
.pill--accent { border-color: rgba(196,163,90,0.35); color: var(--accent); background: var(--accent-soft); }

/* Sections / cards */
.section { padding: 2.75rem 0; }
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 0.75rem;
}
.section__head h2 { margin: 0; font-size: 1.2rem; }
.section__head a { font-size: 0.85rem; color: var(--text-dim); }
.section__head a:hover { color: var(--accent); }
.section__index {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.grid {
  display: grid;
  gap: 1rem;
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.2rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
  height: 100%;
}
a.card:hover {
  border-color: rgba(196,163,90,0.45);
  transform: translateY(-1px);
  color: inherit;
}
.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-faint);
  font-family: var(--mono);
}
.card__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.35;
}
.card__excerpt {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}
.card__tags { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 0.35rem; margin-top: 0.35rem; }
.tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  width: auto;
  height: auto;
  max-width: 100%;
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid rgba(106,158,138,0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
a.tag:hover { color: #8fbfab; border-color: rgba(106,158,138,0.5); }
.tag--stage {
  color: var(--accent, #c4a35a);
  background: rgba(196, 163, 90, 0.12);
  border-color: rgba(196, 163, 90, 0.35);
}
.tag--origin {
  color: var(--text-dim);
  background: transparent;
}
.tag--route {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(106,158,138,0.35);
}
.thought-flow {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: var(--text-dim);
  max-width: 40rem;
}
.thought-card--hold {
  border-style: dashed;
}
.page-hero--bench {
  padding-bottom: 1.2rem;
}
.page-hero--bench .page-hero__desc {
  max-width: 28rem;
}
.bench-stage {
  margin: 0 0 2.5rem;
  padding: 1.4rem 1.35rem 1.25rem;
  background:
    radial-gradient(900px 260px at 8% -20%, rgba(154, 116, 40, 0.14), transparent 50%),
    radial-gradient(700px 220px at 100% 120%, rgba(63, 122, 104, 0.1), transparent 46%),
    var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.bench-queue {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1.15rem;
}
.bench-queue__item {
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius);
  line-height: 1.45;
}
.bench-queue__item:hover {
  border-color: var(--accent);
}
.bench-queue__item.is-on {
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 rgba(154, 116, 40, 0.45);
  background: var(--accent-soft);
}
.bench-queue__stage {
  display: inline-block;
  margin-right: 0.45rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.bench-stage__kicker {
  margin: 0 0 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.bench-line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  max-width: 40rem;
}
.bench-line__aside {
  margin: 0.7rem 0 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 38rem;
}
.bench-stage__play {
  --at: 0;
}
.bench-rail {
  position: relative;
  margin: 1.8rem 0 0.6rem;
  min-height: 7.2rem;
  padding: 0 0.2rem;
}
.bench-rail__line {
  position: absolute;
  left: 6%;
  right: 6%;
  top: 1.15rem;
  height: 2px;
  background: linear-gradient(90deg, var(--line), var(--accent), var(--line));
  opacity: 0.7;
}
.bench-rail__glow {
  display: none;
}
.bench-rail__spark {
  position: absolute;
  left: 6%;
  top: 1.05rem;
  width: 88%;
  height: 4px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent calc(var(--at) * 100% - 8%),
    rgba(154, 116, 40, 0.0) calc(var(--at) * 100% - 4%),
    rgba(154, 116, 40, 0.85) calc(var(--at) * 100%),
    transparent calc(var(--at) * 100% + 6%),
    transparent 100%
  );
  transition: background 0.9s var(--ease);
}
.bench-rail__token {
  position: absolute;
  left: 6%;
  top: 0.72rem;
  width: 88%;
  pointer-events: none;
  z-index: 2;
}
.bench-rail__token span {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: calc(var(--at) * 100% - 0.6rem);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3e2b3, #9a7428 55%, #6d5018);
  box-shadow: 0 0 0 6px rgba(154, 116, 40, 0.16), 0 0 22px rgba(154, 116, 40, 0.45);
  transition: margin-left 0.9s var(--ease);
}
.bench-rail__stops {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  padding-top: 2.3rem;
}
.bench-stop {
  appearance: none;
  font: inherit;
  text-align: center;
  cursor: pointer;
  margin: 0;
  padding: 0.35rem 0.2rem 0.2rem;
  border: 0;
  background: transparent;
  color: var(--text-dim);
}
.bench-stop b {
  display: block;
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}
.bench-stop small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--text-faint);
}
.bench-stop.is-live b {
  color: var(--accent);
}
.bench-stop.is-here b {
  box-shadow: inset 0 -2px 0 var(--accent);
}
.bench-stop.is-ahead {
  opacity: 0.45;
}
.bench-stage__why {
  min-height: 2.6rem;
  margin: 0.15rem 0 0.85rem;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-size: 0.9rem;
}
.bench-stage.is-blocked .bench-stage__why,
.bench-stage__play.is-blocked .bench-stage__why {
  border-left-color: var(--danger);
  background: rgba(180, 84, 69, 0.1);
}
.bench-stage__play.is-shake .bench-rail__token span {
  animation: bench-bump 0.7s var(--ease);
}
@keyframes bench-bump {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(10px); }
  55% { transform: translateX(-6px); }
}
.bench-lamps {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
}
.bench-lamps > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.bench-lamps__k {
  min-width: 5.2rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.bench-lamp {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.55rem 0.18rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--bg);
}
.bench-lamp i {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: 0 0 0 3px rgba(138, 144, 153, 0.12);
}
.bench-lamp em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.66rem;
}
.bench-lamp--pass i { background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.bench-lamp--pass { color: var(--teal); border-color: rgba(63, 122, 104, 0.35); }
.bench-lamp--unpass i { background: var(--danger); box-shadow: 0 0 0 3px rgba(180, 84, 69, 0.12); }
.bench-lamp--unpass { color: var(--danger); border-color: rgba(180, 84, 69, 0.35); }
.bench-lamp--pending i {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: bench-pulse 1.8s ease-in-out infinite;
}
.bench-lamp--pending { color: var(--accent); border-color: rgba(154, 116, 40, 0.4); }
.bench-lamp--stale i { background: var(--text-faint); }
@keyframes bench-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.bench-doors {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
}
.bench-door {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-dim);
  text-decoration: none;
  border-radius: var(--radius);
  min-height: 3.6rem;
}
.bench-door strong {
  font-family: var(--serif);
  font-size: 0.92rem;
  color: var(--text);
}
.bench-door span { font-size: 0.72rem; color: var(--text-faint); }
.bench-door.is-locked {
  opacity: 0.55;
  border-style: dashed;
}
.bench-door.is-open {
  border-color: var(--teal);
  color: var(--teal);
}
.bench-door--hold { cursor: default; }
.bench-door--hold.is-locked {
  opacity: 1;
  border-color: rgba(154, 116, 40, 0.45);
  background: var(--accent-soft);
}
.bench-stage__acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  align-items: center;
  margin-top: 1rem;
  font-size: 0.85rem;
}
.bench-replay {
  appearance: none;
  font: inherit;
  cursor: pointer;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
}
.bench-replay:hover { background: var(--accent-soft); }
.bench-stage__acts a { color: var(--text-dim); }
.bench-stage__acts a:hover { color: var(--accent); }
.bench-stage__empty {
  margin: 1rem 0;
  color: var(--text-dim);
}
@media (max-width: 720px) {
  .bench-line { font-size: 1.25rem; }
  .bench-stop small { display: none; }
  .bench-stop b { font-size: 0.82rem; }
  .bench-doors { grid-template-columns: 1fr 1fr; }
  .bench-lamps__k { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .bench-rail__token span,
  .bench-rail__spark { transition: none; }
  .bench-lamp--pending i { animation: none; }
}
.bench-board {
  margin: 0 0 1.75rem;
  padding: 1.15rem 1.2rem 1rem;
  background:
    radial-gradient(1200px 280px at 10% -10%, rgba(154, 116, 40, 0.08), transparent 55%),
    radial-gradient(900px 240px at 90% 110%, rgba(63, 122, 104, 0.08), transparent 50%),
    var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.bench-board__kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.bench-board h2 {
  margin: 0 0 0.35rem;
}
.bench-board__lead {
  margin: 0 0 0.85rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 40rem;
}
.bench-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  align-items: center;
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.bench-chart {
  width: 100%;
}
.bench-fly {
  width: 100%;
  height: 200px;
  margin: 0 0 0.85rem;
}
.bench-fly:empty {
  display: none;
}
.bench-fly-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
  margin: -0.35rem 0 0.85rem;
  font-size: 0.78rem;
  color: var(--text-faint);
}
.bench-fly:empty + .bench-fly-legend {
  display: none;
}
.bench-fly-legend__note {
  font-size: 0.75rem;
}
@media (max-width: 640px) {
  .bench-fly {
    height: 168px;
  }
}
.bench-pipe__caption {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  color: var(--text-dim);
}
.bench-pipe {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.4rem;
}
.bench-pipe__stage,
.bench-pipe__gate {
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  margin: 0;
  min-width: 7.2rem;
  flex: 1 1 7.2rem;
  padding: 0.7rem 0.7rem 0.75rem;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
}
.bench-pipe__stage:hover,
.bench-pipe__gate:hover {
  border-color: var(--accent);
}
.bench-pipe__stage.is-current {
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 rgba(154, 116, 40, 0.45);
}
.bench-pipe__idx {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.bench-pipe__stage strong,
.bench-pipe__gate strong {
  display: block;
  margin: 0.15rem 0 0.1rem;
  font-family: var(--serif);
  font-size: 1.02rem;
}
.bench-pipe__zh,
.bench-pipe__n {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.bench-pipe__gate {
  background: var(--bg-elev);
  min-width: 8.5rem;
}
.bench-pipe__gate-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.bench-pipe__gate .gate-pill {
  margin: 0.28rem 0.2rem 0 0;
}
.bench-pipe__gate--pass {
  border-color: rgba(63, 122, 104, 0.45);
}
.bench-pipe__gate--unpass {
  border-color: rgba(180, 84, 69, 0.45);
}
.bench-pipe__gate--mix {
  border-color: rgba(154, 116, 40, 0.5);
}
.bench-pipe__arrow {
  align-self: center;
  color: var(--accent);
  font-size: 1.1rem;
  flex: 0 0 auto;
}
.bench-pipe__fork {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
}
.bench-pipe__fork-label {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.bench-pipe__routes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.bench-pipe__routes button {
  appearance: none;
  font: inherit;
  cursor: pointer;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-dim);
  font-size: 0.82rem;
}
.bench-pipe__routes button:hover {
  border-color: var(--teal);
  color: var(--teal);
}
.bench-pipe__routes button.is-hold {
  border-style: dashed;
  color: var(--danger);
}
.gate-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.gate-pill--pass {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(63, 122, 104, 0.35);
}
.gate-pill--unpass {
  color: var(--danger);
  background: rgba(180, 84, 69, 0.1);
  border-color: rgba(180, 84, 69, 0.35);
}
.gate-pill--pending {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(154, 116, 40, 0.4);
}
.gate-pill--stale {
  color: var(--text-dim);
  background: var(--bg-soft);
  border-style: dashed;
}
.thought-gates {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.7rem;
}
.thought-gates--model {
  margin-top: 0.4rem;
}
.thought-gates__label {
  margin: 0 0.25rem 0 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.bench-pipe__model {
  margin-top: 0.85rem;
}
.bench-pipe__model-axes {
  align-items: stretch;
}
.bench-pipe__gate--model {
  flex: 1 1 10rem;
  min-width: 10rem;
  text-align: left;
}
@media (max-width: 720px) {
  .bench-chart { height: 320px; }
}

/* Article page */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 2rem;
}
.page-hero__kicker {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.page-hero__desc { color: var(--text-dim); max-width: 40rem; margin: 0; }
.page-hero__note {
  color: var(--text-faint);
  max-width: 40rem;
  margin: 0.6rem 0 0;
  font-size: 0.88rem;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1.1rem;
  color: var(--text-faint);
  font-size: 0.82rem;
  font-family: var(--mono);
  margin: 0.85rem 0 0;
}
.article-meta > span {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
.article-body {
  padding-bottom: 3rem;
}
.article-body p, .article-body li { color: var(--text-dim); }
.article-body h2 {
  padding-top: 0.5rem;
  border-top: 1px solid var(--line-soft);
  margin-top: 2.5rem;
}
.diagram {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--bg-elev);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-dim);
  white-space: pre;
  overflow-x: auto;
}
.diagram__label {
  display: block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  white-space: normal;
}
.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: var(--radius);
}
.callout__title {
  font-family: var(--serif);
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
  color: var(--accent);
}
.callout p:last-child { margin-bottom: 0; }

/* Thinking lab */
.think-block {
  margin: 0 0 1.5rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.think-block__label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}
.think-block--q { border-left: 3px solid var(--accent); }
.think-block--a { border-left: 3px solid var(--teal); }
.think-block--o { border-left: 3px solid var(--text-faint); }

/* Projects */
.project-section {
  margin: 0 0 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
}
.project-section h2 { margin-top: 0; border: none; padding: 0; }
.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 1.5rem;
}
.arch-cell {
  padding: 0.85rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  font-size: 0.85rem;
}
.arch-cell strong {
  display: block;
  font-family: var(--serif);
  margin-bottom: 0.25rem;
  color: var(--text);
}
.arch-cell span { color: var(--text-dim); font-size: 0.8rem; }

/* Videos */
.video-card {
  overflow: hidden;
}
.video-frame {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #333842, #272b31);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
  position: relative;
}
.video-frame::after {
  content: "▶";
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(247, 245, 240, 0.95);
  color: var(--accent);
}
/* Nothing is recorded yet: drop the play affordance so the frame cannot be
   mistaken for a video that exists. */
.video-frame--planned {
  background: var(--bg-soft);
  border: 1px dashed #c9c0ad;
  color: var(--text-dim);
  padding: 0 1.25rem;
  text-align: center;
}
.video-frame--planned::after {
  content: none;
}
/* Published: a real <video controls> replaces the fake play affordance. */
.video-frame--published {
  padding: 0;
}
.video-frame--published::after {
  content: none;
}
.video-frame--published video {
  display: block;
  width: 100%;
  height: 100%;
  background: #0a1220;
}

/* Search */
.search-box {
  display: flex;
  gap: 0.65rem;
  margin: 1.25rem 0 1.75rem;
}
.search-box input {
  flex: 1;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  font-family: var(--sans);
  font-size: 1rem;
  border-radius: var(--radius);
  outline: none;
}
.search-box input:focus { border-color: var(--accent); }
.search-hint { color: var(--text-faint); font-size: 0.85rem; margin-bottom: 1.25rem; }
.search-empty { color: var(--text-dim); padding: 2rem 0; }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--sans);
}
.filter-btn:hover, .filter-btn.is-active {
  border-color: rgba(196,163,90,0.5);
  color: var(--accent);
  background: var(--accent-soft);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
}
.stat-list { list-style: none; padding: 0; margin: 0; }
.stat-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}
.stat-list span { color: var(--text-faint); }
.stat-list strong { color: var(--text); font-weight: 500; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 2rem 0 2.5rem;
  margin-top: 3rem;
  color: var(--text-faint);
  font-size: 0.82rem;
}
main:has(.hero--compact) + .site-footer {
  margin-top: 4rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--accent); }

/* Mobile */
@media (max-width: 860px) {
  .grid--2, .grid--3, .about-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(247, 245, 240, 0.98);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1rem 1rem;
  }
  .nav.is-open { display: flex; }
  .nav a, .nav__search {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .site-header__inner { position: relative; }
}


/* Concise home landing */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.75rem;
}
.entry-card {
  display: block;
  padding: 1.15rem 1.2rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
a.entry-card:hover {
  border-color: rgba(196,163,90,0.45);
  transform: translateY(-1px);
  color: inherit;
}
.entry-card__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}
.entry-card__title {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}
.entry-card__desc {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.highlight-row {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}
.highlight-row__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.85rem;
}
@media (max-width: 860px) {
  .entry-grid { grid-template-columns: 1fr; }
}


/* Compact home */
.hero--compact { padding: 4.5rem 0 2.5rem; border-bottom: none; }
.hero--compact .hero__title { max-width: 18em; }
.hero--compact .hero__lead { max-width: 36rem; margin-bottom: 0.85rem; }
.hero__meta-line {
  margin: 0 0 1.75rem;
  color: var(--text-faint);
  font-size: 0.92rem;
}
.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin: 0 0 0.5rem;
}
.home-links a {
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.1rem;
  font-weight: 500;
}
.home-links a:hover { color: var(--accent); border-color: var(--accent); }
.section--tight { padding: 0 0 3.5rem; }
.home-latest {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}
.home-latest li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.95rem 0;
  margin: 0;
  border-bottom: 1px solid var(--line-soft);
}
.home-latest__kind {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.home-latest a { color: var(--text); }
.home-latest a:hover { color: var(--accent); }
@media (max-width: 640px) {
  .home-latest li { grid-template-columns: 1fr; gap: 0.25rem; }
}

.agent-panel {
  margin: 1.25rem 0 0.25rem;
  padding: 1rem 1.1rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.agent-panel__label {
  margin: 0 0 0.65rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.brand-lead {
  margin: 0.75rem 0 1rem;
  color: var(--text-dim);
  font-size: 1rem;
  letter-spacing: 0.01em;
}


.footer-contacts p { margin: 0 0 0.35rem; }
.footer-label {
  display: inline-block;
  min-width: 3.2rem;
  color: var(--text-faint);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.footer-contacts a { color: var(--accent); }
.footer-contacts a:hover { color: #7a5a1c; }


/* About Me · Route Map */
.hero--route .hero__title--route {
  max-width: 14em;
  margin-bottom: 0.85rem;
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  letter-spacing: -0.01em;
}
.hero--route .hero__lead {
  max-width: 34rem;
  font-size: 1.05rem;
  color: var(--text-dim);
}

.route {
  max-width: 52rem;
  margin: 0.25rem 0 1rem;
}
.route__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem 1.25rem;
  margin: 0 0 1.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line-soft);
}
.route__code {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.route__hint {
  font-size: 0.82rem;
  color: var(--text-faint);
}

.route__spine {
  list-style: none;
  margin: 0;
  padding: 0;
}

.route-stop {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0 1.25rem;
  position: relative;
  margin: 0;
}
.route-stop--fork {
  grid-template-columns: 2rem minmax(0, 1fr) minmax(10rem, 14rem);
  align-items: start;
}

.route-stop__rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100%;
}
.route-stop__dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1.75px solid var(--accent);
  box-sizing: border-box;
  flex-shrink: 0;
  margin-top: 0.45rem;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--bg);
}
.route-stop__dot--work {
  border-color: var(--teal);
}
.route-stop__dot--now {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 7px var(--accent-soft);
}
.route-stop__track {
  flex: 1;
  width: 1.5px;
  min-height: 3.25rem;
  margin-top: 0.35rem;
  background: linear-gradient(180deg, var(--line) 0%, var(--line-soft) 100%);
}
.route-stop--now .route-stop__track { display: none; }

.route-stop__card {
  padding: 0.15rem 0 2.15rem;
  min-width: 0;
}
.route-stop--now .route-stop__card { padding-bottom: 0.5rem; }
.route-stop__phase {
  margin: 0 0 0.25rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.route-stop__city {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.route-stop__note {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 28rem;
}

.route-stop__card--now {
  padding: 0.15rem 0 0.5rem;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.route-stop__card--now .route-stop__city { color: var(--text); }
.route-stop__card--now .route-stop__note { max-width: 36rem; }

.route-branch {
  position: relative;
  margin: 0.15rem 0 2rem;
  padding: 0.85rem 0.95rem 0.95rem;
  background: var(--bg-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--text-dim);
}
.route-branch__line {
  display: none;
  position: absolute;
  left: -5.5rem;
  top: 0.35rem;
  width: 5.25rem;
  height: 3.5rem;
  color: var(--accent);
  opacity: 0.75;
  pointer-events: none;
}
.route-branch__city {
  margin: 0 0 0.25rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.route-branch .route-stop__note { font-size: 0.88rem; }

.route-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
}
.route-badge {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 8.5rem;
  padding: 0.7rem 0.85rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}
.route-badge__label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}
.route-badge__name {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.route-badge__role {
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.35;
}
.route-badge__tags {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  line-height: 1.35;
}

@media (min-width: 860px) {
  .route-stop--fork {
    column-gap: 1.5rem;
  }
  .route-branch {
    margin-top: 0.35rem;
  }
  .route-branch__line {
    display: block;
  }
}

@media (max-width: 859px) {
  .route-stop--fork {
    grid-template-columns: 2rem minmax(0, 1fr);
  }
  .route-branch {
    grid-column: 2;
    margin-top: -1.25rem;
    margin-bottom: 1.75rem;
  }
  
}

.route-stop__dot--intern {
  border-color: var(--text-faint);
  border-style: dashed;
}
.route-badge--intern {
  box-shadow: inset 0 -2px 0 var(--accent-soft);
  background: var(--bg-soft);
}
.route-badge--intern .route-badge__label {
  color: var(--accent);
}

/* Home remodel */
.hero--home .hero__title--home {
  max-width: 16em;
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
}
.hero--home .hero__lead {
  max-width: 38rem;
  font-size: 1.05rem;
  margin-bottom: 1.15rem;
}
.home-belief {
  max-width: 38rem;
  margin: 0 0 0.25rem;
  padding: 0.95rem 1.05rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}
.home-belief a {
  display: inline-block;
  margin-left: 0.35rem;
  font-weight: 500;
  white-space: nowrap;
}
.home-block__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}
.home-block__code {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.home-block__more {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.home-block__more:hover { color: var(--accent); }
.entry-grid--home {
  margin-top: 0;
}
.entry-grid--home .entry-card__title {
  font-size: 1.2rem;
}
.agent-panel--home {
  margin: 0;
  padding: 1.25rem 1.3rem 1.35rem;
  box-shadow: 0 10px 28px rgba(31, 36, 43, 0.04);
}
.agent-panel__lead {
  margin: 0 0 0.85rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  max-width: 36rem;
}
.section--agents { padding-bottom: 4rem; }

.agent-panel__meta {
  margin: -0.35rem 0 1rem;
  padding-left: 1.15rem;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}
.agent-panel__meta strong {
  color: var(--teal);
  font-weight: 500;
}

.agent-howto {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 40rem;
}
.agent-howto--bench {
  padding-left: 1.15rem;
  border-left: 3px solid var(--accent);
}
.agent-howto li { margin-bottom: 0.45rem; }
.agent-howto a { color: var(--text); border-bottom: 1px solid var(--line); }
.agent-howto a:hover { color: var(--accent); border-color: var(--accent); }
.agent-howto code {
  font-size: 0.84em;
}

/* Times · 年度热词 */
.times-year {
  max-width: 36rem;
  margin: 0 0 2.75rem;
  padding: 1.35rem 1.35rem 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.times-year__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin: 0 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.times-year__badge {
  color: var(--accent);
  font-weight: 500;
  margin-right: 0.35rem;
}
.times-year__word {
  margin: 0 0 0.85rem;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.times-year__why {
  margin: 0 0 0.85rem;
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.7;
}
.times-year__note {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.times-archive__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.times-archive__empty {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.times-vote {
  margin: 1.15rem 0 0.85rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line-soft);
}
.times-vote__label {
  margin: 0 0 0.55rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.times-vote__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.times-vote__btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease);
}
.times-vote__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.times-vote__btn.is-active[data-vote="like"] {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: var(--teal);
}
.times-vote__btn.is-active[data-vote="dislike"] {
  background: rgba(180, 84, 69, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}
.times-vote__hint {
  margin: 0.55rem 0 0;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.hero__lead--secondary {
  margin-top: 0.65rem;
  color: var(--text-dim);
  font-size: 0.98rem;
}

/* Comments (GitHub Issues) */
.comments {
  margin: 2.75rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.comments__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}
.comments__status {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--text-faint);
  min-height: 1.2em;
}
.comments__list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}
.comments__empty {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.92rem;
}
.comments__item {
  padding: 0.85rem 0.95rem;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.comments__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.comments__meta strong { color: var(--text); font-weight: 600; }
.comments__issue { color: var(--accent); }
.comments__body {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  word-break: break-word;
}
.comments__form {
  display: grid;
  gap: 0.65rem;
  max-width: 36rem;
}
.comments__form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.comments__form input,
.comments__form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  font: inherit;
}
.comments__form textarea { min-height: 6.5rem; resize: vertical; }
.comments__submit {
  justify-self: start;
  appearance: none;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font: inherit;
  font-weight: 500;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius);
  cursor: pointer;
}
.comments__submit:hover {
  background: var(--accent);
  color: #fff;
}

.article-meta__dates {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  align-items: center;
}
.article-meta__sep {
  opacity: 0.55;
}
.article-meta__rev {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85em;
}
.article-meta__rev:hover {
  text-decoration: underline;
}

.knowledge-status__group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.7rem;
}
.knowledge-status {
  display: inline-flex;
  align-items: center;
  font: 500 11px/1.2 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: var(--bg-soft);
  white-space: nowrap;
}
.knowledge-status--fresh {
  color: var(--teal);
  background: var(--teal-soft);
  border-color: rgba(63, 122, 104, 0.35);
}
.knowledge-status--stale {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(154, 116, 40, 0.35);
}
.knowledge-status--changed,
.knowledge-status--contested {
  color: var(--danger);
  background: rgba(180, 84, 69, 0.08);
  border-color: rgba(180, 84, 69, 0.35);
}
.knowledge-status--archived {
  color: var(--text-faint);
  background: transparent;
}
.knowledge-status__meta {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.knowledge-board {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}
.knowledge-board h2 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}
.knowledge-board__lead,
.knowledge-board__counts {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0 0 0.7rem;
}
.knowledge-board__table {
  overflow-x: auto;
}
.knowledge-board table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.knowledge-board th,
.knowledge-board td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.knowledge-board th {
  color: var(--text-faint);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prose-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1.25rem 0 1.75rem;
  overflow-x: auto;
  display: block;
}
.prose-wrap th,
.prose-wrap td {
  border: 1px solid rgba(40, 36, 28, 0.14);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.prose-wrap thead th {
  background: rgba(40, 36, 28, 0.04);
  font-weight: 600;
}

.article-body .lede {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.7;
}

/* Architecture diagrams (Articles) */
.arch {
  margin: 1.5rem 0 1.75rem;
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.arch__label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.85rem;
  font-family: var(--sans);
}
.arch-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.arch-layer {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid var(--line-soft);
  background: var(--bg);
}
.arch-layer--plane {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.arch-layer--runtime {
  border-style: dashed;
}
.arch-layer__name {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
}
.arch-layer__desc {
  font-size: 0.8rem;
  color: var(--text-faint);
  line-height: 1.45;
}
.arch-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.35rem;
  margin: 0.25rem 0;
}
.arch-flow__node {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
}
.arch-flow__node--goal {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.arch-flow__arrow {
  color: var(--text-faint);
  font-size: 0.85rem;
  user-select: none;
}
.arch-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
@media (max-width: 720px) {
  .arch-split { grid-template-columns: 1fr; }
}
.arch-panel {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg);
}
.arch-panel__title {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.arch-panel ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.arch-panel li { margin: 0.2rem 0; }
.arch-loops {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}
@media (max-width: 840px) {
  .arch-loops { grid-template-columns: 1fr; }
}
.arch-loop {
  padding: 0.75rem 0.8rem;
  border: 1px solid var(--line-soft);
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg);
}
.arch-loop__name {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 0.35rem;
}
.arch-loop__flow {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 0.35rem;
}
.arch-loop__note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-faint);
}


/* About · now playing */
.now-playing {
  margin: 0.5rem 0 1rem;
  padding: 0.85rem 0 0.25rem;
  border: none;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}
.now-playing__label {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.now-playing__body {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}
.now-playing__body > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}
.now-playing__track {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--text);
  line-height: 1.3;
}
.now-playing__artist {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.now-playing__note {
  margin: 0.55rem 0 0;
  max-width: 36rem;
  font-size: 0.9rem;
  color: var(--text-faint);
  line-height: 1.55;
}
.now-playing__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  flex: 0 0 auto;
}
.now-playing__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-dim);
  background: var(--bg);
}
.now-playing__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.now-playing + .now-playing { margin-top: 1rem; }
.now-playing__note--lead {
  margin: 0 0 1rem;
  max-width: 40rem;
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.7;
}
.now-note {
  max-width: 40rem;
}
.now-note > p {
  margin: 0 0 1rem;
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.7;
}
.now-note blockquote {
  margin: 0 0 1rem;
  padding: 0 0 0 0.9rem;
  border-left: 2px solid var(--line);
}
.now-note blockquote p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.75;
}
.now-note cite {
  display: block;
  margin-top: 0.4rem;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.now-reading {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.now-reading__item + .now-reading__item {
  padding-top: 1rem;
  border-top: 1px solid rgba(40, 32, 24, 0.08);
}


.search-card { color: inherit; }
.search-card__main {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  color: inherit;
  flex: 1;
  min-height: 0;
}
.search-card__main:hover { color: inherit; }
.search-card__main:hover .card__title { color: var(--accent); }


/* Projects · GitHub cards */
.project-card {
  gap: 0.55rem;
}
.project-card__stars {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(196,163,90,0.35);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.project-card__star {
  font-size: 0.95rem;
  line-height: 1;
}
.project-card__star-count {
  font-weight: 500;
  color: var(--text);
}
a.project-card:hover .project-card__stars {
  border-color: var(--accent);
}


/* Projects sections */
.projects-section__title {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}
.projects-section__note {
  margin: -0.35rem 0 1.15rem;
  max-width: 42rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted, #5c584f);
}
.section--tight + .section--tight {
  padding-top: 0.5rem;
}


/* Articles · pending pieces */
.card--pending {
  opacity: 0.88;
  border-style: dashed;
  cursor: default;
  pointer-events: none;
}
.card--pending .card__meta span:first-child {
  color: var(--accent);
  letter-spacing: 0.06em;
}
.card--pending .card__title {
  color: var(--text-dim);
}


/* Footer visit counters */
.footer-visits {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  align-items: baseline;
}
.footer-visits strong {
  font-weight: 600;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.footer-visits__sep { opacity: 0.55; }


/* About · research profile: same wrap left edge as hero/route */
.about-profile__inner {
  max-width: 42rem;
}
.about-profile__inner:first-child > h2:first-of-type {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}
.about-profile .callout {
  margin-top: 0.35rem;
}
.about-questions {
  max-width: 52rem;
  margin-top: 2.5rem;
}
.about-questions > h2 {
  margin-top: 0;
}



/* Hot Words · loop flowchart */
.hotwords-flow__lead {
  max-width: 40rem;
  margin: 0 0 1.5rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.65;
}
.hotwords-flow__lead code {
  font-family: var(--mono);
  font-size: 0.84em;
}
.loop-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem;
  position: relative;
}
.loop-flow::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 1.15rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.45;
  pointer-events: none;
}
.loop-flow__step {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 1.15rem 0.7rem 0.85rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 9.5rem;
}
.loop-flow__step.is-current {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
.loop-flow__step.is-done {
  border-color: color-mix(in srgb, var(--teal) 45%, var(--line));
}
.loop-flow__idx {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.loop-flow__name {
  display: block;
  margin: 0.35rem 0 0.1rem;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
}
.loop-flow__zh {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 0.45rem;
}
.loop-flow__step p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim);
}
.hotwords-flow__note {
  margin: 1rem 0 0;
  font-size: 0.86rem;
  color: var(--text-faint);
  max-width: 40rem;
}
@media (max-width: 900px) {
  .loop-flow {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .loop-flow::before { display: none; }
  .loop-flow__step { min-height: 0; }
}

/* Hot Words · observability */
.hotwords-observe__lead {
  max-width: 38rem;
  color: var(--text-dim);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.65;
}
.hotwords-observe__card {
  max-width: 40rem;
  padding: 1.2rem 1.25rem 1.15rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.hotwords-observe__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.hotwords-observe__phase {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hotwords-observe__gates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
}
.hotwords-gate {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-dim);
  background: var(--bg);
}
.hotwords-gate.is-pass { border-color: rgba(63,122,104,0.45); color: var(--teal); }
.hotwords-gate.is-fail { border-color: rgba(180,84,69,0.45); color: var(--danger); }
.hotwords-gate.is-weak { border-color: rgba(154,116,40,0.45); color: var(--accent); }
.hotwords-observe__dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
  margin: 0 0 0.85rem;
}
.hotwords-observe__dl div {
  padding: 0.55rem 0.65rem;
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.hotwords-observe__dl dt {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hotwords-observe__dl dd {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text);
}
.hotwords-observe__note {
  margin: 0 0 0.55rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.55;
}
.hotwords-observe__history { margin-top: 0.85rem; }
.hotwords-observe__hist-label {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hotwords-observe__list {
  margin: 0;
  padding-left: 1.05rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}
.hotwords-observe__list li { margin-bottom: 0.3rem; }
.hotwords-observe__links {
  margin: 0.9rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.8rem;
  color: var(--text-faint);
}
.hotwords-observe__empty {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.9rem;
}
@media (max-width: 640px) {
  .hotwords-observe__dl { grid-template-columns: 1fr; }
}
