@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --paper: #fdfbf7;
  --wash: #f5f5f5;
  --ink: #1a1a1a;
  --rule: #e0e0e0;
  --mono: 'Share Tech Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --read: Georgia, 'Songti SC', 'Noto Serif CJK SC', 'SimSun', serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--read);
  font-size: 18px;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
  background-size: 140px 140px;
}

a { color: var(--ink); }

.page { max-width: 1120px; margin: 0 auto; padding: 0 22px; }

/* 页头 */
.mast { border-bottom: 2px solid var(--ink); }

.brand-row { display: flex; align-items: center; padding: 18px 0 4px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 0;
  text-decoration: none;
}

.brand-logo { display: block; height: 30px; width: auto; }

.brand-name {
  font-family: var(--mono);
  font-size: 21px;
  letter-spacing: 0.16em;
  line-height: 1.5;
  border-bottom: 2px solid var(--ink);
}

.nav-row { display: flex; padding: 0 0 12px; }

aside.menu { flex: 1 1 auto; min-width: 0; }

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.menu li { position: relative; }

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-radius: 10px;
  border-bottom: 2px solid transparent;
}

.menu a:hover,
.menu a:focus-visible {
  background: var(--wash);
  border-bottom-color: var(--ink);
}

.drop summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.03em;
  border-radius: 10px;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  list-style: none;
}

.drop summary::-webkit-details-marker { display: none; }

.drop summary::after { content: "+"; margin-left: 8px; }
.drop[open] summary::after { content: "−"; }
.drop[open] summary { background: var(--wash); border-bottom-color: var(--ink); }

.drop-list {
  position: absolute;
  left: 0;
  top: calc(100% - 2px);
  z-index: 20;
  display: block;
  min-width: 210px;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  border-radius: 10px;
  box-shadow: 5px 5px 0 rgba(26, 26, 26, 0.1);
}

.drop-list li { display: block; }
.drop-list a { display: flex; min-height: 42px; border-radius: 6px; border-bottom: 0; }

.cta-item { margin-left: auto; }

.menu a.cta {
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  border-bottom: 3px solid #000;
  padding: 10px 20px;
}

.menu a.cta:hover,
.menu a.cta:focus-visible { background: #333; color: var(--paper); }

/* 两列：左侧目录 + 右侧正文 */
.shell {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  padding: 30px 0 12px;
}

.toc {
  position: sticky;
  top: 18px;
  padding-right: 18px;
  border-right: 1px solid var(--rule);
  font-family: var(--mono);
}

.toc-title {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.22em;
}

.toc hr { border: 0; border-top: 2px solid var(--ink); width: 44px; margin: 0 0 12px; }

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

.toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 0;
  font-size: 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}

.toc a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 正文 */
main { min-width: 0; }

.lead {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
  align-items: center;
  min-height: 45vh;
  padding: 6px 0 26px;
  border-bottom: 2px solid var(--ink);
  scroll-margin-top: 18px;
}

.lead h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4.6vw, 42px);
  line-height: 1.24;
  letter-spacing: 0.01em;
}

.lead-desc { margin: 0; max-width: 34em; font-size: 17px; color: #3b3b3b; }

.lead-art {
  position: relative;
  margin: 0;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--wash);
  border: 1px solid var(--rule);
  border-bottom: 3px solid var(--ink);
  border-radius: 10px;
}

.lead-art img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dot-grid {
  position: absolute;
  inset: -12%;
  opacity: 0.24;
  background-image: radial-gradient(var(--ink) 1px, transparent 1.2px);
  background-size: 11px 11px;
  animation: drift 26s steps(6) infinite alternate;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-11px, -11px); }
}

main > article:not(.lead) {
  padding: 30px 0 26px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 18px;
}

main h2 { margin: 0 0 4px; font-size: 23px; line-height: 1.42; letter-spacing: 0.02em; }

main h2 + hr { border: 0; border-top: 2px solid var(--ink); width: 52px; margin: 0 0 16px; }

main h3 { margin: 26px 0 6px; font-size: 19px; line-height: 1.5; }

main p { margin: 0 0 14px; max-width: 72ch; }

main ul, main ol { margin: 0 0 16px; padding-left: 22px; max-width: 72ch; }
main li { margin: 4px 0; }

main a { text-decoration: underline; text-underline-offset: 3px; }

main > article:not(.lead) figure,
main > article:not(.lead) blockquote {
  margin: 22px 0;
  padding: 14px 18px;
  background: var(--wash);
  border: 1px solid var(--rule);
  border-bottom: 3px solid var(--ink);
  border-radius: 10px;
}

main figure img { display: block; width: 100%; height: auto; border-radius: 6px; }
main blockquote p:last-child { margin-bottom: 0; }

main table {
  display: block;
  overflow-x: auto;
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 16px;
}

main th, main td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; }
main th { background: var(--wash); font-family: var(--mono); font-weight: 400; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 20px 0; }

code, kbd, samp, pre { font-family: var(--mono); font-size: 0.94em; }

pre {
  overflow-x: auto;
  padding: 14px 16px;
  background: var(--wash);
  border: 1px solid var(--rule);
  border-radius: 10px;
}

/* 页脚：单行 */
footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 34px;
  padding: 18px 0 40px;
  border-top: 2px solid var(--ink);
  font-family: var(--mono);
  font-size: 16px;
}

.foot-brand a { text-decoration: none; letter-spacing: 0.14em; border-bottom: 2px solid var(--ink); }

footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  margin: 0;
  padding: 0;
}

footer nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 0; text-decoration: none; }
footer nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

.copy { margin: 0 0 0 auto; color: #4a4a4a; }

/* 断点 */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; gap: 0; padding: 18px 0 8px; }
  .toc {
    order: 2;
    position: static;
    margin-top: 22px;
    padding: 18px 0 0;
    border-right: 0;
    border-top: 1px solid var(--rule);
  }
  .lead { grid-template-columns: 1fr; gap: 18px; min-height: 0; padding-top: 0; }
  .lead-art { aspect-ratio: 16 / 9; }
  .brand-name { font-size: 18px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .page { padding: 0 16px; }
  .cta-item { margin-left: 0; }
  .copy { margin-left: 0; }
  footer { flex-direction: column; align-items: flex-start; }
  .drop-list { min-width: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot-grid { animation: none; }
}</parameter>

button[aria-expanded]{min-width:44px;min-height:44px}
