:root {
  color-scheme: light;
  --content-width: 1180px;
  --page-gutter: max(clamp(18px, 7vw, 96px), calc((100% - var(--content-width)) / 2));
  --bg: #f5f1e8;
  --panel: #fbf9f4;
  --ink: #201b18;
  --muted: #6e625c;
  --line: #ded4c8;
  --accent: #0d6b66;
  --accent-2: #b88f46;
  --soft: #e8f1ee;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* Long-form reading: warm paper, coffee type and restrained teal links. */
.reading-title, .reading-home { padding:clamp(36px,5vw,64px) var(--page-gutter); background:#faf7f0; border-bottom:1px solid var(--line); }
.reading-title h1 { font-size:clamp(32px,4.6vw,52px); line-height:1.3; margin:16px 0 24px; color:#35251e; }
.reading-title p, .reading-home > p { max-width:72ch; }
.reading-home h1 { max-width:19ch; font-size:clamp(34px,4.7vw,58px); line-height:1.4; color:#35251e; margin:18px 0 28px; }
.reading-home > p:not(.eyebrow), .reading-title > p:not(.eyebrow) { font-size:18px; line-height:1.9; color:#51443b; }
.reading-layout { display:grid; grid-template-columns:200px minmax(0,1fr); max-width:1180px; margin:auto; gap:56px; padding:40px 24px 64px; }
.reading-toc nav { position:sticky; top:140px; display:grid; gap:10px; font-size:14px; line-height:1.7; }
.reading-toc a { color:#67584d; text-decoration:none; padding:5px 0; }
.reading-toc a:hover { color:var(--accent); }
.reading-body { max-width:78ch; min-width:0; font-size:17px; line-height:1.95; }
.reading-body > section { padding-bottom:36px; margin-bottom:36px; border-bottom:1px solid var(--line); scroll-margin-top:145px; }
.reading-body h2 { font-size:clamp(23px,2.2vw,29px); line-height:1.5; color:#39291f; margin:0 0 20px; }
.reading-body h3 { font-size:20px; line-height:1.6; margin:20px 0 12px; }
.reading-body p { margin:0 0 20px; white-space:pre-line; }
.reading-body a { color:var(--accent); text-underline-offset:4px; }
.home-reading { margin:48px auto 64px; padding:0 24px; max-width:1000px; }
.reading-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:24px 0; }
.reading-cards article, .rule-cards article { background:#fcfaf5; border:1px solid var(--line); border-radius:8px; padding:22px; min-width:0; }
.reading-cards h3 { margin:0 0 12px; }
.reading-cards p:last-child, .rule-cards p:last-child { margin-bottom:0; }
.reading-callout { border-left:3px solid var(--accent); padding:22px 24px; margin:28px 0; background:#f1eee5; }
.reading-chain { background:#f1ece1; padding:20px; border-left:3px solid #a78959; line-height:2; }
.reading-next { display:flex; justify-content:space-between; gap:20px; padding-top:20px; border-top:1px solid var(--line); }
.support-nav { display:flex; flex-wrap:wrap; gap:10px; padding:22px var(--page-gutter); border-bottom:1px solid var(--line); }
.support-nav a { display:inline-block; padding:8px 13px; border:1px solid #d7cabc; border-radius:5px; text-decoration:none; font-size:15px; }
.support-nav a[aria-current] { background:#3c2c23; color:#fff; border-color:#3c2c23; }
.support-body { margin:40px auto 64px; padding:0 24px; max-width:1020px; }
.support-body > p, .support-body .rule-cards p { max-width:74ch; }
.rule-cards { display:grid; gap:16px; }
.rule-cards h3 { margin:0 0 14px; }
.rule-boundary { font-size:15px; color:#6a594c; border-top:1px solid var(--line); padding-top:14px; }
.thresholds { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.thresholds article { border-top:2px solid #876b4d; background:#f6f0e6; padding:20px; }
.thresholds strong { font-size:22px; color:#39291f; }
.workflow-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 28px; padding-left:24px; }
.table-scroll { max-width:100%; overflow-x:auto; border:1px solid var(--line); border-radius:6px; margin:18px 0 24px; }
.table-scroll table { border-collapse:collapse; width:100%; min-width:680px; font-size:14px; line-height:1.6; }
.table-scroll caption { text-align:left; padding:15px; font-weight:700; background:#f4ecdf; color:#3c2c23; }
.table-scroll th, .table-scroll td { text-align:left; padding:12px; border-bottom:1px solid var(--line); vertical-align:top; }
.table-scroll thead th { background:#ebe0d2; font-weight:700; }
.table-scroll tbody th { font-weight:600; }
.table-scroll tr:nth-child(even) { background:#faf7f0; }
.reading-body details { margin:14px 0; border:1px solid var(--line); background:#fcfaf5; border-radius:6px; }
.reading-body summary { cursor:pointer; padding:16px 18px; font-weight:600; color:#493529; }
.reading-body details > p, .reading-body details > ol { margin:0 20px 20px; }
.reading-body details > .table-scroll { margin:0 12px 18px; }
.calculator { display:grid; grid-template-columns:1fr 1fr; gap:20px; padding:22px; border:1px solid var(--line); border-radius:8px; background:#fcfaf5; }
.calculator label { display:grid; gap:8px; font-size:15px; }
.calculator input { min-width:0; width:100%; padding:12px; border:1px solid #baa997; border-radius:4px; font:inherit; background:#fffdf8; color:#31241d; }
.calculator output { grid-column:1/-1; color:var(--accent); font-weight:700; }
.source-note { color:#76675a; font-size:13px; padding-top:28px; border-top:1px solid var(--line); }
:focus-visible { outline:2px solid #0d6b66; outline-offset:4px; }
@media(max-width:1000px) { .site-header { gap:15px; } .reading-layout { gap:28px; grid-template-columns:170px minmax(0,1fr); } }
@media(max-width:900px) {
 .reading-layout { display:block; padding:28px 20px 48px; }
 .reading-toc nav { position:static; display:flex; flex-wrap:wrap; gap:8px 16px; margin-bottom:30px; border-bottom:1px solid var(--line); padding-bottom:20px; }
 .reading-toc strong { width:100%; }
 .reading-body { font-size:16px; line-height:1.95; }
 .reading-cards, .thresholds, .calculator { grid-template-columns:1fr; }
 .workflow-list { grid-template-columns:1fr 1fr; }
 .support-nav { padding-inline:20px; gap:8px; }
 .support-nav a { font-size:14px; padding:7px 10px; }
 .static-header .site-nav { flex-wrap:wrap; }
 .static-header .site-nav a { width:auto; }
 .static-main > .reading-title, .static-main > .reading-home { padding-inline:20px; }
 .reading-next { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.7; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px clamp(18px, 4vw, 56px); background: #2b211c; border-bottom: 1px solid #4b3930; color: #fbf9f4; backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 220px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 4px; background: #0d6b66; color: #fbf9f4; box-shadow: inset 0 0 0 1px #b88f46; }
.brand-mark::after { content: "B"; font-family: Georgia, serif; font-size: 21px; font-weight: 700; }
.brand strong, .brand small { display: block; }
.brand small { color: #d8cac0; font-size: 12px; line-height: 1.3; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
.static-header { flex-wrap: wrap; }
.static-header .site-nav { display: flex; position: static; flex-wrap: wrap; background: transparent; }
.site-nav a, .nav-trigger { text-decoration: none; padding: 8px 10px; border-radius: 8px; color: #e9dfd6; font-size: 14px; white-space: nowrap; }
.site-nav a.active, .site-nav a:hover, .nav-item.active > .nav-trigger, .nav-trigger:hover, .nav-item:focus-within > .nav-trigger { background: #0d6b66; color: #fff; }
.header-tools { display: flex; gap: 12px; white-space: nowrap; }
.header-tools .text-link { color: #f5e2b8; }
.nav-mobile-tool { display: none; }
.site-nav a:focus-visible, .button:focus-visible, .filters input:focus-visible, .filters select:focus-visible { outline: 3px solid rgba(196, 72, 45, .32); outline-offset: 2px; }
.site-nav a.icon-link { width: 42px; height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.site-nav a.icon-link svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.site-nav a.icon-link span { display: none; }
.nav-item { position: relative; }
.nav-trigger { display: inline-flex; align-items: center; }
.nav-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px; display: none; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 14px 32px rgba(46, 42, 38, .12); }
.nav-item:hover .nav-menu, .nav-item:focus-within .nav-menu { display: grid; gap: 2px; }
.nav-menu a { display: block; width: 100%; }
.menu-button { display: none; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 12px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); align-items: center; gap: clamp(28px, 5vw, 72px); padding: clamp(48px, 6vw, 76px) var(--page-gutter); border-bottom: 1px solid var(--line); }
.hero h1, .page-title h1 { font-size: clamp(36px, 6vw, 72px); line-height: 1.08; letter-spacing: 0; margin: 0 0 24px; }
.lead { max-width: 760px; color: #3e3832; font-size: clamp(18px, 2vw, 22px); }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.button { display: inline-flex; align-items: center; min-height: 42px; padding: 9px 16px; border-radius: 8px; border: 1px solid #0d6b66; background: #0d6b66; color: #fff; text-decoration: none; font-weight: 700; }
.button.ghost { background: transparent; color: var(--ink); }
.text-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.hero-panel { display: grid; gap: 12px; padding: 24px; border: 1px solid var(--line); background: linear-gradient(145deg, #fffdf8, #f4ead8); border-radius: 8px; }
.hero-panel span, .hero-panel strong, .flow span { display: block; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.62); font-weight: 700; }
.hero-panel strong { background: #2e2a26; color: #fff; }
.section, .page-title { padding: clamp(36px, 6vw, 72px) var(--page-gutter); }
.section > * { max-width: 1180px; }
.section > .card-grid, .section > .timeline, .section > .detail-grid, .section > .image-grid, .section > .flow, .section > .split, .section > .detail-card { max-width: none; }
.page-title { background: var(--panel); border-bottom: 1px solid var(--line); }
.page-title p, .section-lead { max-width: 820px; color: var(--muted); font-size: 18px; }
.breadcrumbs { color: var(--muted); font-size: 14px; margin-bottom: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.2; margin: 0 0 16px; }
h3 { margin: 0 0 10px; line-height: 1.35; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.phase-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.phase-card { padding: 18px; }
.phase-card h2 { font-size: clamp(24px, 2.2vw, 32px); }
.project-grid .project:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
.card, .line-card, .detail-card, .timeline-item { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.card.compact { min-height: 88px; display: flex; align-items: center; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.line-card { margin-bottom: 14px; }
.badge { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; margin: 0 4px 8px 0; border-radius: 999px; background: #f2dfbc; color: #5f3416; font-size: 13px; font-weight: 700; }
.status-canonical { background: #0d6b66; color: #fff; }
.status-current { background: #e8f1ee; color: #07534f; border: 1px solid #0d6b66; }
.status-decision { background: #2b211c; color: #fff; }
.status-experiment { background: #f5e2b8; color: #634814; }
.status-archived, .status-superseded { background: #e6dfd8; color: #655d56; }
.clean-list { margin: 0; padding-left: 20px; }
.clean-list li { margin: 7px 0; }
.detail-card { margin-bottom: 18px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.flow.long { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.timeline { display: grid; gap: 14px; }
.timeline-item time { color: var(--accent); font-weight: 700; }
dl { display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px; margin: 14px 0 0; }
dt { color: var(--muted); }
dd { margin: 0; }
.filters { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-bottom: 0; flex-wrap: wrap; }
.filters.multi { align-items: stretch; }
.filters input, .filters select { flex: 1 1 180px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; background: var(--panel); color: var(--ink); font: inherit; }
.filters input { flex-basis: 280px; }
.filters button { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); margin: 4px; padding: 6px 12px; cursor: pointer; }
.filters button.active { background: #2e2a26; color: #fff; border-color: #2e2a26; }
.empty { border: 1px dashed var(--line); border-radius: 8px; padding: 28px; text-align: center; color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: 2px; }
.article-body { max-width: 880px; margin: 0 auto; padding-inline: clamp(18px, 4vw, 48px); }
.article-body h2 { margin-top: 28px; }
.image-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0 28px; }
.image-frame { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.image-frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--soft); }
.image-frame figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; color: var(--muted); flex-wrap: wrap; }
.capability-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.capability-card:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
.capability-card, .method-card, .contact-box { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.method-card h2 { font-size: 24px; }
.method-card h4 { margin: 18px 0 8px; }
.step-list { margin: 0 0 14px; padding-left: 22px; }
.step-list li { margin: 6px 0; }
.split.mini { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 0; }
.contact-box { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: clamp(20px, 4vw, 42px); align-items: start; max-width: none; }
.contact-box.compact-contact { display: block; max-width: none; padding: 0; border: 0; background: transparent; }
.contact-box.compact-contact p { margin-bottom: 6px; }
.contact-qr { margin: 0; display: grid; justify-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.contact-qr img { width: 100%; background: #fff; }
.contact-qr .wechat-profile { max-width: 180px; justify-self: start; }
.contact-qr .wechat-code { max-width: 260px; }
.contact-qr figcaption { color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.2; text-align: center; }
.copy-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy-row span { min-width: 0; }
.copy-button { min-height: 34px; padding: 5px 12px; border: 1px solid #2e2a26; border-radius: 8px; background: #2e2a26; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.copy-button:focus-visible { outline: 3px solid rgba(196, 72, 45, .32); outline-offset: 2px; }
.search-result[hidden], .project[hidden], .timeline-item[hidden] { display: none; }
.cta-band { margin: clamp(24px, 5vw, 64px) var(--page-gutter); padding: clamp(28px, 5vw, 56px); border-radius: 8px; background: #352f2a; color: #fff; }
.cta-band p { color: #f4ead8; max-width: 760px; }
.site-footer { display: grid; grid-template-columns: 1.3fr 1.1fr .9fr; gap: 24px; padding: 36px var(--page-gutter); border-top: 1px solid var(--line); background: #efe5d8; }
.footer-contact h3 { margin-bottom: 8px; }
.brand-promise { color: var(--accent); font-family: Georgia, "Noto Serif SC", serif; font-size: 17px; font-weight: 700; }
.copyright { grid-column: 1 / -1; color: var(--muted); border-top: 1px solid var(--line); padding-top: 18px; }
.back-top { position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); cursor: pointer; }
[hidden] { display: none !important; }
@media (max-width: 900px) {
  .site-header { align-items: flex-start; }
  .header-tools { display: none; }
  .nav-mobile-tool { display: block; }
  .menu-button { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 18px; right: 18px; top: 68px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; justify-content: flex-start; }
  .site-nav.open { display: grid; grid-template-columns: 1fr; }
  .hero, .split, .site-footer { grid-template-columns: 1fr; }
  .card-grid, .detail-grid, .flow, .flow.long, .image-grid, .capability-list, .method-grid, .split.mini, .contact-box { grid-template-columns: 1fr; }
  .hero-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; gap: 10px; }
  .hero-panel span, .hero-panel strong { padding: 14px; }
  .project-grid .project:last-child:nth-child(3n + 1), .capability-card:last-child:nth-child(3n + 1) { grid-column: auto; }
  .hero { min-height: auto; }
  .brand small { display: none; }
  dl { grid-template-columns: 1fr; }
  .filters, .filters.multi { display: grid; grid-template-columns: 1fr; }
  .site-nav a, .nav-trigger { width: 100%; }
  .nav-item { width: 100%; }
  .nav-menu { position: static; display: grid; min-width: 0; margin: 2px 0 8px 10px; padding: 0 0 0 10px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
  .site-nav a.icon-link { width: 100%; justify-content: flex-start; padding: 8px 10px; height: auto; gap: 8px; }
  .site-nav a.icon-link span { display: inline; }
}

/* Keep nested static views inside the same centered reading column. */
.static-main > .section { padding-inline: 0; }
main { overflow-wrap: anywhere; }
.method-card, .card, .split > *, .site-footer > * { min-width: 0; }
@media (max-width: 900px) {
  .site-nav.open { background: #2b211c; border-color: #4b3930; }
  .static-header .site-nav { left: auto; right: auto; }
}

/* Blueprint, Current and Roles share the established reading system. */
.blueprint-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:24px 0; }
.focus-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr)); gap:20px; }
.focus-card dl { display:grid; grid-template-columns:110px minmax(0,1fr); gap:10px 18px; }
.focus-card dt { font-weight:700; color:var(--accent); }
.focus-card dd { margin:0; overflow-wrap:anywhere; }
.blueprint-principle { color:var(--accent); font-size:clamp(20px,2.5vw,30px); font-weight:700; margin:24px 0; }
.history-notice { margin:24px var(--page-gutter); padding:20px; border-left:4px solid var(--accent); background:var(--panel); }
#decisions .detail-card { margin-bottom:20px; }
.hero-actions > a { border:1px solid var(--accent); padding:9px 16px; border-radius:8px; color:var(--accent); text-decoration:none; font-weight:700; }
.hero-actions > a:first-child { background:var(--accent); color:white; }
#blueprint, #current, #project-map, #decisions, [id^="decision-"] { scroll-margin-top:110px; }
.static-main .hero, .static-main > .section { padding-left:0; padding-right:0; }
.fact-metadata { overflow-wrap:anywhere; }
@media(max-width:1200px) { .site-header { flex-wrap:wrap; } .site-nav { flex-wrap:wrap; } }
@media(max-width:800px) { .blueprint-grid { grid-template-columns:1fr; } .focus-card dl { grid-template-columns:1fr; gap:4px; } .focus-card dd { margin-bottom:12px; } }
