:root {
  /* Night-paper editorial — shared site tokens (semantic names kept).
     --paper = page ground (ink), --ink = primary text (bone). */
  color-scheme: dark;
  --night-ink: #12141A;
  --night-bone: #F2EDE4;
  --night-verdigris: #2F6F6A;
  --night-copper: #B87333;
  --night-fog: #8B93A7;

  --ink: var(--night-bone);
  --paper: var(--night-ink);
  --panel: #181B24;
  --panel-2: #1E222C;
  --muted: var(--night-fog);
  --line: rgba(242, 237, 228, 0.10);
  --grid: rgba(242, 237, 228, 0.035);
  --accent: var(--night-verdigris);
  --accent-soft: rgba(47, 111, 106, 0.22);
  --warn: var(--night-copper);
  --code-bg: #0A0C10;
  --code-fg: #E8E2D8;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --gutter: clamp(16px, 3.5vw, 36px);
  --section-space: clamp(28px, 4vw, 56px);
  --max: 1120px;
  --article-max: 760px;
  --radius: 8px;
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Optional light theme: add class="theme-light" on <html> or <body>. */
.theme-light {
  color-scheme: light;
  --ink: #1A1C22;
  --paper: #F2EDE4;
  --panel: #FAF7F1;
  --panel-2: #ffffff;
  --muted: #5C6578;
  --line: rgba(18, 20, 26, 0.12);
  --grid: rgba(18, 20, 26, 0.05);
  --accent: #2F6F6A;
  --accent-soft: rgba(47, 111, 106, 0.14);
  --warn: #B87333;
  --code-bg: #1A1C22;
  --code-fg: #F2EDE4;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(47, 111, 106, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(184, 115, 51, 0.07), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.75;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-underline-offset: 4px; }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.skip-link { position: absolute; left: 16px; top: -100px; padding: 10px 14px; background: var(--ink); color: var(--paper); z-index: 10; font-family: var(--mono); font-size: 13px; }
.skip-link:focus { top: 10px; }

.site-header, .hero, .section, footer, .machine-rail {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 5;
}
h1.brand,.brand {
  flex-shrink: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.brand span { color: var(--accent); margin-left: 2px; font-family: var(--sans); font-size: 0.75em; font-weight: 500; }
nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--sans); font-size: 13px; }
nav a {
  display: inline-flex; align-items: center; min-height: 36px;
  text-decoration: none; color: var(--muted); font-weight: 500;
}
nav a:hover, .text-link:hover, .read-more:hover, .breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }

.machine-rail {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--sans); font-size: 12px; color: var(--muted);
}
.machine-rail a {
  color: var(--muted); text-decoration: none;
  border: 1px solid transparent; padding: 2px 6px; border-radius: var(--radius);
}
.machine-rail a:hover { color: var(--ink); border-color: var(--line); background: var(--panel); }
.machine-rail .rail-label { opacity: .7; margin-right: 2px; }

.hero { padding-block: clamp(24px, 4vw, 40px) 12px; }
.hero-compact { padding-block: clamp(20px, 3vw, 32px) 8px; }
.eyebrow {
  font-family: var(--sans); font-size: 12px; letter-spacing: .06em;
  font-weight: 500; margin: 0 0 12px; line-height: 1.5; color: var(--muted);
  text-transform: none;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: 0.01em; line-height: 1.3; margin: 0; font-weight: 600;
}
.hero em { font-style: normal; color: var(--accent); }
.lede {
  max-width: 44em; font-size: clamp(15px, 1.4vw, 17px);
  margin: 12px 0 16px; color: var(--muted); line-height: 1.85;
}
.meta {
  font-family: var(--sans); font-size: 13px; font-weight: 400;
  margin: 0 0 16px; color: var(--muted);
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 16px;
  background: var(--accent); color: var(--night-bone);
  text-decoration: none; font-family: var(--sans); font-size: 13px; font-weight: 600;
  border: 1px solid var(--accent); border-radius: var(--radius);
}
.button:hover { background: transparent; color: var(--accent); }
.text-link {
  display: inline-flex; align-items: center; min-height: 40px;
  font-family: var(--sans); font-size: 13px; font-weight: 500; text-decoration: none; color: var(--muted);
}

.section { padding-block: var(--section-space); }
.section-tight { padding-block: clamp(20px, 3vw, 36px); }
.section-heading {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 10px 20px; margin-bottom: 18px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.section-heading .eyebrow { margin: 0; }
.section-heading h2, .product-section h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: 0.01em; line-height: 1.35; margin: 0; font-weight: 600;
}

.section-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.section-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px;
  padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; font-family: var(--sans); font-size: 13px; font-weight: 500;
  background: var(--panel);
}
.section-chip span { color: var(--muted); font-weight: 500; }
.section-chip.empty { color: var(--muted); border-style: dashed; background: transparent; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  border: 0;
  background: transparent;
}
.card {
  min-width: 0; padding: 20px 18px;
  border: 1px solid var(--line);
  display: flex; flex-direction: column; background: var(--panel);
  border-radius: var(--radius);
  box-shadow: none;
  transition: border-color .2s ease, background .2s ease;
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--panel) 88%, var(--accent-soft));
}
.card:nth-child(3n) { border-right: 1px solid var(--line); }
.card.featured {
  background: color-mix(in srgb, var(--accent-soft) 40%, var(--panel));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.card h3 {
  font-family: var(--serif); font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.45; letter-spacing: 0.01em; margin: 0 0 10px; font-weight: 600;
}
.card h3 a { text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card > p:not(.meta) { font-size: 14px; margin: 0; color: var(--muted); line-height: 1.75; }
.coming, .read-more {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  margin-top: auto; padding-top: 18px; color: var(--accent); text-decoration: none;
}

.principles-block { border-top: 1px solid var(--line); }
.principles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0; padding: 0; max-width: none; gap: 0;
  border: 1px solid var(--line); background: var(--panel);
}
.principles div {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 14px; border-right: 1px solid var(--line);
}
.principles div:last-child { border-right: 0; }
.principles dt {
  font-family: var(--mono); font-size: 13px; color: var(--accent); font-weight: 700; margin: 0;
}
.principles dd {
  margin: 0; font-family: var(--mono); font-size: 12px; font-weight: 550;
  line-height: 1.6; color: var(--muted);
}
.principles-compact { margin: 0; }
.statement-quiet {
  max-width: 48em; margin: 16px 0 0; padding: 12px 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--panel); color: var(--muted);
  font-size: 14px; line-height: 1.8;
}

.product-section {
  background: var(--panel); color: var(--ink);
  padding: var(--section-space) max(var(--gutter), calc((100% - (var(--max) - 2 * var(--gutter))) / 2));
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 20px 40px; border-block: 1px solid var(--line);
}
.product-section .eyebrow { color: var(--muted); }
.product-copy { font-size: 15px; line-height: 1.85; color: var(--muted); }
.product-copy p { margin: 0; }
.product-compact { gap: 16px 28px; padding-block: clamp(22px, 3vw, 40px); }
.product-compact h2 { font-size: clamp(18px, 2vw, 22px); }
.light {
  background: transparent; color: var(--ink); border-color: var(--line); margin-top: 14px;
}
.light:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.facts span {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 8px; font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.source-note {
  grid-column: 1 / -1; border-top: 1px dashed var(--line);
  padding-top: 12px; color: var(--muted); font-family: var(--mono); font-size: 11px; margin: 0;
}

.faq { max-width: 920px; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; min-height: 40px; align-items: center; gap: 16px;
  font-family: var(--serif); font-size: clamp(15px, 1.7vw, 18px); font-weight: 600;
  list-style: none; display: flex; justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex-shrink: 0; font-family: var(--mono); font-size: 18px; font-weight: 400; color: var(--muted); }
details[open] summary::after { content: "−"; }
.faq details p { max-width: 42em; margin: 10px 24px 6px 0; color: var(--muted); font-size: 15px; }
.faq a { color: var(--accent); }

footer {
  border-top: 1px solid var(--line); padding-block: 18px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px 16px; font-family: var(--sans); font-size: 12px; color: var(--muted);
}
footer a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; }
footer a:hover { color: var(--accent); }

@media (min-width: 640px) and (max-width: 1023px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card.featured { grid-column: 1 / -1; }
  .product-section { gap: 16px; }
  .section-heading { display: block; }
  .section-heading .eyebrow { margin-bottom: 8px; }
  .principles { grid-template-columns: 1fr; }
  .principles div { border-right: 0; border-bottom: 1px solid var(--line); }
  .principles div:last-child { border-bottom: 0; }
}
@media (max-width: 639px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 8px; padding-block: 12px; }
  nav { width: 100%; justify-content: flex-start; gap: 4px 12px; }
  .cards, .product-section, .principles { grid-template-columns: minmax(0, 1fr); }
  .principles div { border-right: 0; border-bottom: 1px solid var(--line); }
  .principles div:last-child { border-bottom: 0; }
  .facts, .source-note { grid-column: auto; }
  .section-heading { display: block; margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Article / collection / admin */
h1 { line-height: 1.45; overflow-wrap: anywhere; }
.article-page {
  width: min(100%, var(--article-max));
  margin-inline: auto;
  padding: var(--section-space) var(--gutter);
}
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px; color: var(--muted);
  font-family: var(--sans); font-size: 13px;
}
.breadcrumbs a { color: inherit; text-decoration: none; }
.article-page h1 {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: 0.01em; margin: 0 0 16px; font-weight: 600;
}
.article-summary {
  font-size: 16px; padding: 14px 16px; line-height: 1.75;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-toc, .revision-log {
  margin-top: 28px; padding-block: 14px;
  border-block: 1px dashed var(--line);
  font-family: var(--mono); font-size: 13px;
}
.article-toc h2, .revision-log h2 {
  font-family: var(--serif); font-size: 15px; margin: 0 0 10px; color: var(--muted);
  letter-spacing: 0.02em; text-transform: none; font-weight: 600;
}
.article-toc ol { padding-left: 1.2em; margin: 0; }
.article-toc a { text-decoration: none; color: var(--muted); }
.article-toc a:hover { color: var(--accent); }
.prose {
  font-family: var(--sans);
  font-size: 16.5px; line-height: 1.95; overflow-wrap: anywhere;
  margin-top: 8px;
}
.prose h2, .prose h3 {
  font-family: var(--serif); margin-top: 2em; line-height: 1.45;
  letter-spacing: 0.01em; font-weight: 600;
}
.prose h2 { font-size: 1.15em; padding-top: 8px; border-top: 1px solid var(--line); }
.prose a { color: var(--accent); }
.prose pre {
  overflow-x: auto; padding: 14px 16px;
  background: var(--code-bg); color: var(--code-fg);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--mono); font-size: 13px; line-height: 1.65;
}
.prose code { font-family: var(--mono); font-size: .92em; }
.prose :not(pre) > code {
  padding: 1px 5px; border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 80%, var(--accent-soft));
}
.prose img { max-width: 100%; height: auto; display: block; margin-block: 20px; border: 1px solid var(--line); }
.prose blockquote {
  border-left: 3px solid var(--line); padding-left: 16px; margin-inline: 0; color: var(--muted);
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--sans); font-size: 12px; }
.tags a {
  text-decoration: none; border: 1px solid var(--line); padding: 4px 10px;
  border-radius: 999px; color: var(--muted); background: var(--panel);
}
.tags a:hover { border-color: var(--accent); color: var(--accent); }

.search-form, .admin-toolbar, .pagination, .admin-login {
  display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-block: 18px;
}
.search-form label { flex: 1 1 160px; }
.empty-state {
  padding: 18px 16px; border: 1px dashed var(--line); background: var(--panel);
  font-family: var(--sans); font-size: 14px; color: var(--muted);
  border-radius: var(--radius);
}
.empty-state.compact { padding: 12px 14px; }
button, input, select, textarea { font: inherit; }
button {
  min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); background: var(--panel); cursor: pointer; font-family: var(--sans); font-size: 13px;
}
button:disabled { opacity: .6; cursor: wait; }
label { display: block; font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--muted); }
input, select, textarea {
  display: block; width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; margin-top: 6px;
  border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--panel);
  font-family: var(--sans); font-size: 14px;
}
textarea { resize: vertical; line-height: 1.65; font-family: var(--mono); }
.admin-page { max-width: 1440px; padding: 32px var(--gutter); margin-inline: auto; }
.admin-login label { flex: 1 1 260px; }
.admin-layout { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 24px; }
.admin-layout > *, .form-grid > * { min-width: 0; }
.admin-layout form > label, .publish-panel > label { margin-block: 14px; }
.article-select { width: 100%; text-align: left; margin-bottom: 8px; overflow-wrap: anywhere; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.publish-panel { border-block: 1px solid var(--line); padding-block: 20px; margin-block: 28px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-family: var(--sans); color: var(--ink); }
.checkbox-label input { width: 18px; height: 18px; min-height: 18px; flex-shrink: 0; margin: 0; }
#message { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; }
.error-message { color: #c0392b; }
#history p { font-size: 12px; overflow-wrap: anywhere; font-family: var(--mono); }
#preview-frame { width: 100%; height: 900px; border: 1px solid var(--line); background: var(--paper); }
[hidden] { display: none !important; }
@media (max-width: 767px) {
  .admin-layout, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .article-summary { font-size: 15px; }
  .prose { font-size: 16px; }
}


/* ===== Knowledge index console (home) ===== */
.page-home .machine-rail { display: none; }
.console { width: min(100%, var(--max)); margin-inline: auto; padding-inline: var(--gutter); padding-bottom: 40px; }
.console-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.console-hero-copy {
  padding: clamp(22px, 3vw, 36px);
  border-right: 1px solid var(--line);
}
.console-hero-copy .eyebrow { color: var(--accent); letter-spacing: .06em; text-transform: none; }
.console-hero-copy h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  font-weight: 600;
}
.console-hero-copy .lede { margin: 0 0 14px; max-width: 36em; color: var(--muted); }
.prompt { color: var(--accent); font-weight: 700; margin-right: 6px; }

.feed-board {
  background: var(--panel-2);
  color: var(--ink);
  padding: clamp(18px, 2.5vw, 28px);
  font-family: var(--mono);
  border-left: 1px solid var(--line);
}
.feed-board-title {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
}
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li + li { border-top: 1px solid var(--line); }
.feed-list a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  padding: 10px 2px;
  text-decoration: none;
  color: inherit;
}
.feed-list a:hover { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.feed-list code {
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--accent);
  font-size: 12px;
}
.feed-list .path {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
}
.feed-list .desc { font-size: 11px; color: var(--muted); }
.feed-hint {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.feed-hint a { color: var(--accent); }

.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.7fr);
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.panel { min-width: 0; padding: 0; }
.panel + .panel, .panel-side { border-left: 1px solid var(--line); }
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 4%, var(--panel));
}
.panel-head h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -.01em;
}
.path-label { color: var(--accent); margin-right: 8px; }
.panel-link {
  font-family: var(--mono); font-size: 11px; color: var(--muted); text-decoration: none;
}
.panel-link:hover { color: var(--accent); }
.panel .section-nav { margin: 10px 14px; }
.panel .empty-state { margin: 14px; }

.index-wrap { overflow-x: auto; }
.index-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 12px;
}
.index-table th {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--ink) 3%, var(--panel));
  letter-spacing: .02em;
  text-transform: none;
  font-size: 11px;
  font-family: var(--sans);
}
.index-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.index-table tr:hover td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.index-table .col-n { width: 42px; color: var(--accent); }
.index-table .col-path { width: 34%; }
.index-table .col-path a { color: var(--muted); text-decoration: none; }
.index-table .col-path a:hover { color: var(--accent); }
.index-table .col-date { width: 96px; color: var(--muted); white-space: nowrap; }
.index-table .col-title a {
  display: block;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: -.01em;
}
.index-table .col-title a:hover { color: var(--accent); text-decoration: underline; }
.index-summary {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  line-height: 1.55;
  font-family: var(--sans);
}

.tree-stats { list-style: none; margin: 0; padding: 0; font-family: var(--mono); }
.tree-stats li { border-bottom: 1px solid var(--line); }
.tree-stats a, .tree-stats li.empty > span, .tree-stats li.empty {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 8px;
  padding: 10px 14px;
  text-decoration: none;
  color: inherit;
  align-items: center;
}
.tree-stats a:hover { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
.tree-stats code { color: var(--accent); font-size: 12px; }
.tree-stats span { color: var(--muted); font-size: 12px; }
.tree-stats b { font-size: 13px; }
.tree-stats li.empty { color: var(--muted); opacity: .75; }

.tree-stats li.empty a { display: grid; grid-template-columns: 110px 1fr auto; gap: 8px; padding: 10px 14px; text-decoration: none; color: inherit; }
/* empty items are spans from render - fix: they are <li class=empty><a>... */
.principles-stack {
  display: grid;
  grid-template-columns: 1fr;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}
.principles-stack div {
  border-right: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}
.panel-side .statement-quiet {
  margin: 12px 14px;
  font-size: 12px;
}
.mini-product {
  margin: 0 14px 16px;
  padding: 12px;
  border: 1px dashed var(--line);
  font-size: 13px;
  color: var(--muted);
}
.mini-product .eyebrow { margin-bottom: 6px; }
.mini-product p { margin: 0 0 8px; }
.faq-panel {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding-bottom: 8px;
}
.faq-panel details { margin-inline: 14px; }
.page-home .site-header,
.page-home footer {
  border-color: var(--line);
}
.page-home .console-hero,
.page-home .console-grid,
.page-home .faq-panel {
  border-color: var(--line);
  background: var(--panel);
}
.page-home .console-hero-copy {
  border-right-color: var(--line);
  background: var(--panel);
}
.page-home .panel-side {
  border-left-color: var(--line);
  background: var(--panel-2);
}
.page-home .panel-head {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--panel-2) 80%, var(--panel));
}
.page-home .prose,
.article-page .prose {
  color: var(--ink);
}

@media (max-width: 900px) {
  .console-hero, .console-grid { grid-template-columns: 1fr; }
  .console-hero-copy { border-right: 0; border-bottom: 1px solid var(--line); }
  .panel-side { border-left: 0; border-top: 1px solid var(--line); }
  .index-table .col-path { display: none; }
}


/* ===== Night-paper editorial polish (site-wide) ===== */
.section > h1,
.article-page header h1 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.section > .eyebrow {
  color: var(--accent);
}
.read-more:hover { color: var(--night-copper); }
.card.featured h3 a { color: var(--ink); }
a:hover { color: color-mix(in srgb, var(--accent) 80%, var(--ink)); }
.prose a:hover { color: var(--night-copper); }
.site-header .brand:hover { color: var(--accent); }
/* Soften console path labels */
.path-label, .prompt { color: var(--accent); }
.panel-head h2 {
  font-family: var(--serif) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
}
.index-table { font-family: var(--sans); }
.index-table .col-title a { font-family: var(--serif); font-weight: 600; }
.tree-stats { font-family: var(--sans); }
.tree-stats code { color: var(--accent); }
.feed-board { font-family: var(--sans); }
.feed-list code { color: var(--accent); }
.feed-list .path { font-family: var(--serif); }
/* Admin inherits tokens; keep mono for forms but quiet chrome */
.admin-page h1 { font-family: var(--serif); font-weight: 600; }


/* Today hot — blog-owned list */
.hot-block{margin:1.25rem 0 0;padding:1rem 1.1rem;border:1px solid color-mix(in srgb,var(--fog,#8B93A7) 35%,transparent);border-radius:14px;background:color-mix(in srgb,var(--bone,#F2EDE4) 6%,transparent)}
.hot-head{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem;margin-bottom:.65rem}
.hot-kicker{margin:0;font-size:.75rem;letter-spacing:.06em;text-transform:uppercase;color:var(--fog,#8B93A7)}
.hot-more{font-size:.85rem;color:var(--verdigris,#2F6F6A);text-decoration:none}
.hot-list{margin:0;padding-left:1.15rem;display:grid;gap:.45rem}
.hot-item{line-height:1.35}
.hot-link{color:var(--bone,#F2EDE4);text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--verdigris,#2F6F6A) 50%,transparent)}
.hot-link:hover{color:var(--verdigris,#2F6F6A)}
.hot-src{display:inline-block;margin-left:.4rem;font-size:.75rem;color:var(--fog,#8B93A7)}
.hot-empty{margin:0;color:var(--fog,#8B93A7);font-size:.9rem}
.hot-page .hot-list--page{padding-left:0;list-style:none;display:grid;gap:.85rem}
.hot-page .hot-item{display:flex;gap:.75rem;align-items:flex-start}
.hot-n{flex:0 0 1.5rem;opacity:.5;font-variant-numeric:tabular-nums}
.hot-foot{margin-top:1.5rem}
.desk-tile--hot{width:360px;max-height:280px;overflow:auto}
.desk-hot-list{margin:.4rem 0;padding-left:1.1rem;font-size:.85rem;display:grid;gap:.35rem}
.desk-hot-list a{color:inherit}


/* Agent index: present in HTML for Agents, collapsed so humans see the desk first */
.agent-index {
  max-width: 52rem;
  margin: 1.5rem auto 2rem;
  padding: 0.75rem 1rem 1rem;
  border: 1px solid color-mix(in oklab, CanvasText 14%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, Canvas 94%, CanvasText 6%);
}
.agent-index-summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  gap: 0.25rem;
  padding: 0.35rem 0.15rem;
}
.agent-index-summary::-webkit-details-marker { display: none; }
.agent-index-summary-title { font-weight: 600; font-size: 0.95rem; }
.agent-index[open] .agent-index-summary {
  margin-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in oklab, CanvasText 12%, transparent);
  padding-bottom: 0.65rem;
}
.agent-index-head h2 { margin: 0.35rem 0 0.45rem; font-size: 1.2rem; }
.agent-index h3 { margin: 1rem 0 0.4rem; font-size: 1rem; }
.agent-index ol { margin: 0; padding-left: 1.25rem; }
.agent-index li { margin: 0.35rem 0; line-height: 1.45; }
.agent-index .meta { opacity: 0.75; font-size: 0.9em; }
.agent-discovery code { font-size: 0.92em; }
body.page-home.desk-mode .agent-index {
  max-width: min(52rem, calc(100% - 2rem));
  margin: 1rem auto 1.5rem;
}

/* Home SEO h1 uses brand chrome */
h1.brand{margin:0;font:inherit;font-weight:inherit;}
h1.brand a{color:inherit;text-decoration:none;}
