/* ============================================================
   hybrid.okweb.eu.org — shared stylesheet
   Skeleton: web-prototype-taste-editorial (clone-derived)
   Preset: 11 Build 奢侈极简 — 70%+ 留白 / 字重对比 / 单一强调色
   ============================================================ */

:root {
  --canvas: #FBFBFA;
  --surface: #FFFFFF;
  --ink: #1A1A19;
  --muted: #706F6C;
  --faint: #9B9A96;
  --hairline: #EAEAEA;
  --accent: #A2401C;
  --accent-soft: #F7EAE4;
  --pale-red-bg: #FDEBEC;  --pale-red-fg: #9F2F2D;
  --pale-blue-bg: #E1F3FE; --pale-blue-fg: #1F6C9F;
  --pale-green-bg: #EDF3EC; --pale-green-fg: #346538;
  --pale-yellow-bg: #FBF3DB; --pale-yellow-fg: #956400;
  --display: 'Instrument Serif', 'Noto Serif SC', 'Songti SC', 'SimSun', Georgia, serif;
  /* body 用系统 CJK sans 栈：CJK sans webfont 体积以 MB 计，
     系统栈（苹方/雅黑）是中文站点的工程正解；display 用自托管衬线 */
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
          'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei',
          'Noto Sans SC', 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); color: var(--accent); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.wrap--narrow { max-width: 840px; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hairline); text-underline-offset: 3px; transition: text-decoration-color 200ms ease; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--canvas);
  padding: 10px 16px; font-size: 13px; z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ============ NAV (floating pill) ============ */
.nav {
  position: sticky; top: 16px; z-index: 50;
  margin: 16px auto 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  max-width: 940px;
  padding: 10px 12px 10px 20px;
  background: rgba(251, 251, 250, 0.82);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border: 1px solid var(--hairline);
  border-radius: 999px;
}
.nav .brand {
  font-family: var(--display);
  font-size: 21px; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap;
}
.nav .brand em { font-style: italic; color: var(--muted); font-size: 0.72em; letter-spacing: 0; }
.nav .brand .brand-mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.nav ul {
  list-style: none; display: flex; gap: 4px; margin: 0; padding: 0;
  align-items: center;
}
.nav ul a {
  display: inline-block;
  color: var(--ink); text-decoration: none;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.02em;
  padding: 8px 12px; border-radius: 999px;
  transition: background 160ms ease;
}
.nav ul a:hover { background: rgba(0,0,0,0.045); }
.nav ul a[aria-current="page"] { background: var(--ink); color: var(--canvas); }
.nav .nav-toggle {
  display: none;
  font: 500 13px/1 var(--sans);
  padding: 9px 14px; border-radius: 999px;
  background: transparent; border: 1px solid var(--hairline);
  color: var(--ink); cursor: pointer;
}

/* ============ HERO ============ */
.hero { padding: 104px 0 88px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
  padding: 5px 11px; border: 1px solid var(--hairline);
  border-radius: 999px; background: var(--surface);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--pale-green-fg); }
.hero h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(42px, 6.4vw, 84px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 26px 0 0;
  max-width: 22ch;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--muted); }
.hero .lede {
  font-size: 18px; color: var(--muted);
  max-width: 54ch; margin: 26px 0 0;
  line-height: 1.7;
}
.hero .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 38px; }

.btn {
  display: inline-block;
  font: 500 14px/1 var(--sans); letter-spacing: 0.02em;
  padding: 13px 22px; border-radius: 8px;
  cursor: pointer; text-decoration: none;
  transition: transform 200ms cubic-bezier(0.16,1,0.3,1), box-shadow 200ms ease, background 200ms ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--ink); color: var(--canvas); border: 1px solid var(--ink); }
.btn-primary:hover { background: #2A2A28; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid #D8D7D4; }
.btn-ghost:hover { border-color: var(--ink); text-decoration: none; }
.btn-link { background: transparent; border: none; color: var(--ink); padding: 13px 0; font: 500 14px/1 var(--sans); cursor: pointer; text-decoration: none; }
.btn-link::after { content: ' →'; color: var(--muted); }
.btn-link:hover::after { color: var(--accent); }

/* ============ SECTION SCAFFOLD ============ */
.section { padding: 96px 0; border-top: 1px solid var(--hairline); }
.section--tight { padding: 72px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 44px; flex-wrap: wrap; }
.section-head h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(30px, 3.8vw, 46px);
  line-height: 1.18; letter-spacing: -0.02em;
  margin: 0; max-width: 20ch;
  text-wrap: balance;
}
.section-head .section-note { color: var(--muted); font-size: 14.5px; max-width: 38ch; margin: 0; line-height: 1.6; }
.kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--faint);
  display: block; margin-bottom: 14px;
}

/* ============ CHIP ============ */
.chip {
  display: inline-block; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; margin-right: 6px;
}
.chip--green  { background: var(--pale-green-bg);  color: var(--pale-green-fg); }
.chip--blue   { background: var(--pale-blue-bg);   color: var(--pale-blue-fg); }
.chip--red    { background: var(--pale-red-bg);    color: var(--pale-red-fg); }
.chip--yellow { background: var(--pale-yellow-bg); color: var(--pale-yellow-fg); }

/* ============ COUPLING DIAGRAM (brand motif) ============ */
.coupling {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--hairline); background: var(--surface);
  max-width: 560px;
}
.coupling .node {
  flex: 1; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px; justify-content: center;
}
.coupling .node .node-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.coupling .node .node-name { font-family: var(--display); font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.coupling .node--num .node-name { font-family: var(--mono); font-size: 16px; font-weight: 500; }
.coupling--tri .node { padding: 14px 10px; text-align: center; }
.coupling--tri .node .node-tag { font-size: 9.5px; }
.coupling--tri .node .node-name { font-size: 14px; }
.coupling--tri .link-line { flex: 0 0 30px; }
.coupling .link-line {
  align-self: center; flex: 0 0 56px; height: 1px;
  background: var(--ink); position: relative;
}
.coupling .link-line::before, .coupling .link-line::after {
  content: ''; position: absolute; top: 50%; width: 7px; height: 1px; background: var(--ink);
}
.coupling .link-line::before { left: 0; transform: translateY(-140%) rotate(18deg); }
.coupling .link-line::after  { right: 0; transform: translateY(-140%) rotate(-18deg); }
.coupling .link-line .tick {
  position: absolute; left: 50%; top: 50%;
  width: 5px; height: 5px; border-radius: 999px;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

/* ============ TWO-LAYER (双层架构) ============ */
.layers { display: grid; grid-template-columns: 5fr 4fr; gap: 0; border: 1px solid var(--hairline); background: var(--hairline); }
.layers .layer { background: var(--surface); padding: 36px 38px; }
.layers .layer + .layer { border-left: 1px solid var(--hairline); }
.layer .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); display: flex; justify-content: space-between; margin-bottom: 20px; }
.layer h3 { font-family: var(--display); font-size: 27px; font-weight: 500; letter-spacing: -0.015em; margin: 0 0 10px; line-height: 1.25; }
.layer p { font-size: 14.5px; color: var(--muted); margin: 0 0 22px; line-height: 1.65; max-width: 40ch; }
.layer .layer-links { display: flex; flex-direction: column; border-top: 1px solid var(--hairline); }
.layer .layer-links a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 2px; border-bottom: 1px solid var(--hairline);
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink);
  transition: padding-left 180ms cubic-bezier(0.16,1,0.3,1);
}
.layer .layer-links a:hover { padding-left: 10px; color: var(--accent); }
.layer .layer-links a .arrow { color: var(--faint); font-family: var(--mono); font-size: 12px; }

/* ============ CONTRAST PAIRS (是不是什么) ============ */
.pair-grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
.pair-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--hairline); }
.pair-row > div { padding: 20px 0 20px; border-bottom: 1px solid var(--hairline); }
.pair-row > div + div { border-left: 1px solid var(--hairline); padding-left: 24px; }
.pair-row > div:nth-child(odd) { padding-right: 24px; }
.pair-row .pair-label { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); margin-bottom: 8px; }
.pair-row p { margin: 0; font-size: 14.5px; line-height: 1.6; }
.pair-row .strike { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 1px; }

/* ============ COMPARISON TABLE ============ */
.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); background: var(--surface); }
table.cmp { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 13.5px; }
table.cmp caption { text-align: left; padding: 16px 20px 0; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
table.cmp th, table.cmp td { padding: 13px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); line-height: 1.55; }
table.cmp thead th { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--canvas); border-bottom: 1px solid #DEDDDA; }
table.cmp tbody th { font-weight: 500; white-space: nowrap; }
table.cmp tbody tr:last-child th, table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp td.dim { color: var(--muted); }
table.cmp .yes { color: var(--accent); font-weight: 500; }
table.cmp .no { color: var(--faint); }

/* ============ TIMELINE (工作流程) ============ */
.steps { border-top: 1px solid var(--hairline); }
.step {
  display: grid; grid-template-columns: 88px 1fr; gap: 32px;
  padding: 34px 0; border-bottom: 1px solid var(--hairline);
}
.step .step-no {
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  letter-spacing: 0.08em; padding-top: 6px;
}
.step .step-no b { display: block; font-size: 22px; font-weight: 500; color: var(--ink); letter-spacing: 0; }
.step h3 { font-family: var(--display); font-size: 23px; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 8px; line-height: 1.3; }
.step p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.7; max-width: 62ch; }
.step .step-meta { margin-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.06em; }

/* ============ BENTO (应用领域, uneven) ============ */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: 0;
  border: 1px solid var(--hairline);
  background: var(--hairline);
}
.bento-grid > .cell { background: var(--surface); padding: 26px 28px; }
.cell--hero { grid-column: span 4; grid-row: span 2; padding: 34px 38px; }
.cell--tall { grid-column: span 2; grid-row: span 2; }
.cell--wide { grid-column: span 4; }
.cell--small { grid-column: span 2; }
.cell h3 { font-family: var(--display); font-size: 25px; font-weight: 500; letter-spacing: -0.015em; margin: 0 0 8px; line-height: 1.25; }
.cell h4 { font-size: 15px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.005em; }
.cell p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.65; max-width: 42ch; }
.cell .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); display: block; margin-bottom: 18px; }

/* ============ EN ABSTRACT ============ */
.en-note {
  border: 1px solid var(--hairline); background: var(--surface);
  padding: 26px 30px; max-width: 760px;
}
.en-note .en-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 10px; }
.en-note p { font-family: var(--display); font-style: italic; font-size: 16.5px; line-height: 1.6; color: var(--muted); margin: 0; }

/* ============ LEDGER (研究台账) ============ */
.ledger-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-btn {
  font: 500 12.5px/1 var(--sans); letter-spacing: 0.02em;
  padding: 8px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--hairline);
  color: var(--muted); cursor: pointer;
  transition: all 160ms ease;
}
.filter-btn:hover { border-color: var(--ink); color: var(--ink); }
.filter-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.entry {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 24px;
  padding: 24px 0; border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.entry .entry-year { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.entry h3 { font-size: 16.5px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.005em; line-height: 1.5; }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { color: var(--accent); }
.entry .entry-meta { font-size: 13px; color: var(--muted); line-height: 1.65; }
.entry .entry-meta .venue { color: var(--ink); }
.entry .entry-links { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; white-space: nowrap; }
.entry .entry-links a { text-decoration: none; border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 10px; background: var(--surface); }
.entry .entry-links a:hover { border-color: var(--accent); color: var(--accent); }
.entry .note { grid-column: 2 / 4; font-size: 13.5px; color: var(--muted); line-height: 1.65; margin-top: 2px; }

.empty-state {
  border: 1px dashed #D8D7D4; background: var(--surface);
  padding: 40px 44px; text-align: left;
}
.empty-state h3 { font-family: var(--display); font-size: 22px; font-weight: 500; margin: 0 0 10px; }
.empty-state p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.7; max-width: 56ch; }

/* ============ MILESTONES (研究时间线) ============ */
.milestones { border-left: 1px solid var(--hairline); padding-left: 36px; margin-left: 6px; }
.milestone { position: relative; padding: 0 0 36px; }
.milestone::before {
  content: ''; position: absolute; left: -41px; top: 7px;
  width: 9px; height: 9px; border-radius: 999px;
  background: var(--canvas); border: 1px solid var(--ink);
}
.milestone--accent::before { background: var(--accent); border-color: var(--accent); }
.milestone .m-year { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.milestone h3 { font-family: var(--display); font-size: 21px; font-weight: 500; margin: 6px 0 6px; letter-spacing: -0.01em; }
.milestone p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.65; max-width: 58ch; }

/* ============ PROSE (long-form) ============ */
.prose { max-width: 68ch; }
.prose h2 { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.22; letter-spacing: -0.018em; margin: 0 0 18px; }
.prose h3 { font-size: 17px; font-weight: 600; margin: 34px 0 10px; letter-spacing: -0.005em; }
.prose p { font-size: 16px; line-height: 1.75; color: var(--ink); margin: 0 0 18px; }
.prose p.dim { color: var(--muted); }
.prose strong { font-weight: 600; }
.prose .definition {
  font-family: var(--display); font-size: 21px; line-height: 1.6; font-weight: 500;
  letter-spacing: -0.005em; color: var(--ink);
  padding: 4px 0 4px 22px; border-left: 2px solid var(--accent);
  margin: 28px 0;
}
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 18px; }
.prose li { font-size: 15.5px; line-height: 1.75; margin-bottom: 8px; }
.prose .refs { font-size: 13px; color: var(--muted); }
.prose .refs li { line-height: 1.65; margin-bottom: 10px; }

/* ============ FOOTER ============ */
footer.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 40px 0 48px;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 96px;
}
footer.site-footer .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer.site-footer a { color: var(--muted); text-decoration: none; }
footer.site-footer a:hover { color: var(--ink); }
footer.site-footer .foot-note { margin-top: 18px; color: var(--faint); letter-spacing: 0.02em; line-height: 1.8; }

/* ============ UTILITIES ============ */
.mt-0 { margin-top: 0 !important; }
.text-muted { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }

/* ============ MOTION ============ */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms cubic-bezier(0.16,1,0.3,1), transform 600ms cubic-bezier(0.16,1,0.3,1); transition-delay: calc(var(--i, 0) * 80ms); }
.reveal.is-in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 920px) {
  .nav { padding-left: 16px; }
  .nav .nav-toggle { display: inline-block; }
  .nav ul {
    display: none;
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border: 1px solid var(--hairline);
    border-radius: 14px; padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  .nav ul.open { display: flex; }
  .nav ul a { padding: 12px 14px; border-radius: 8px; }
  .hero { padding: 72px 0 60px; }
  .section { padding: 64px 0; }
  .layers, .pair-grid, .two-col { grid-template-columns: 1fr; }
  .layers .layer + .layer { border-left: none; border-top: 1px solid var(--hairline); }
  .bento-grid { grid-template-columns: 1fr; }
  .cell--hero, .cell--tall, .cell--wide, .cell--small { grid-column: span 1; grid-row: auto; }
  .step { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .step .step-no { display: flex; gap: 10px; align-items: baseline; padding-top: 0; }
  .step .step-no b { display: inline; }
  .entry { grid-template-columns: 1fr; gap: 8px; }
  .entry .note { grid-column: auto; }
  .section-head { margin-bottom: 32px; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 20px; }
  .hero h1 { font-size: clamp(36px, 10vw, 48px); }
  .pair-row { grid-template-columns: 1fr; }
  .pair-row > div + div { border-left: none; border-top: 1px dashed var(--hairline); padding-left: 0; }
  .pair-row > div:nth-child(odd) { padding-right: 0; }
  .coupling { flex-direction: column; }
  .coupling .link-line { flex: 0 0 40px; width: 1px; height: 40px; }
  .empty-state { padding: 28px 24px; }
}

/* ============ PRINT ============ */
@media print {
  .nav, .btn, .reveal { display: none !important; }
  body { background: #fff; }
  .section { padding: 24px 0; border-top: 1px solid #ccc; }
}
