/* Layout idea: a scholar's notebook page. Brush-weight 敬畏 set vertically in the margin like a hanging scroll,
   the English argument beside it; everything else is quiet ruled sections, with one cinnabar seal as the only loud mark. */
/* Fonts are served from this site, never from Google: no visitor's address
   goes to a third party to draw a page, and nothing depends on a service that
   is slow or blocked in mainland China. Latin files are Fontsource 5.3.0's
   latin subsets; Noto Serif SC is cut to the characters the pages use by
   scripts/subset_han.sh, and tests/fonts.test.mjs fails when a page gains one
   the cut lacks. Licences: /fonts/LICENSES.txt. */
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif SC"; src: url("/fonts/noto-serif-sc-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Serif SC"; src: url("/fonts/noto-serif-sc-900.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

:root {
  --paper: #f2f3f0;
  --paper-2: #e8eae5;
  --ink: #15171b;
  --ink-2: #4b5058;
  --rule: #d2d6cf;
  --accent: #245a63;
  --seal: #b3261e;
  --font-display: "Instrument Serif", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-han: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111316; --paper-2: #181b1f; --ink: #e8e9e5; --ink-2: #a2a8ae;
    --rule: #2b3036; --accent: #86b9c0; --seal: #e05a4e; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111316; --paper-2: #181b1f; --ink: #e8e9e5; --ink-2: #a2a8ae;
  --rule: #2b3036; --accent: #86b9c0; --seal: #e05a4e; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[data-lang="en"] .t[lang="zh-CN"], html[data-lang="zh"] .t[lang="en"] { display: none; }
html[data-lang="zh"] body { line-height: 1.8; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header */
header.top { border-bottom: 1px solid var(--rule); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.mark { display: flex; align-items: baseline; gap: 10px; font-family: var(--font-display); font-size: 22px; text-decoration: none; color: var(--ink); }
.mark .han { font-family: var(--font-han); font-weight: 600; font-size: 16px; color: var(--ink-2); letter-spacing: 0.08em; }
.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; gap: 2px; }
.lang button {
  font: 500 13px/1 var(--font-body); color: var(--ink-2); background: transparent;
  border: 0; border-radius: 999px; padding: 7px 12px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Hero */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 56px; padding: 64px 0 56px; align-items: start; }
.scroll {
  writing-mode: vertical-rl; font-family: var(--font-han); font-weight: 900;
  font-size: clamp(96px, 14vw, 168px); line-height: 1; letter-spacing: 0.04em; color: var(--ink);
  position: relative; padding-left: 8px;
}
.scroll small {
  display: block; font-size: 15px; font-weight: 600; letter-spacing: 0.3em; color: var(--ink-2);
  margin-right: 14px; font-family: var(--font-han);
}
.seal {
  position: absolute; bottom: -12px; left: -34px; width: 58px; height: 58px;
  background: var(--seal); color: var(--paper); border-radius: 4px;
  display: grid; grid-template-columns: 1fr 1fr; place-items: center;
  writing-mode: horizontal-tb; font-size: 21px; font-weight: 900; line-height: 1; padding: 5px;
  transform: rotate(-3deg); animation: stamp 700ms 300ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes stamp { from { transform: rotate(-3deg) scale(1.25); } to { transform: rotate(-3deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .seal { animation: none; } }
.eyebrow { font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 20px; }
h1 {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.05; letter-spacing: -0.01em; margin: 0 0 24px; text-wrap: balance;
}
html[data-lang="zh"] h1 { font-family: var(--font-han); font-weight: 600; font-size: clamp(32px, 4.4vw, 50px); line-height: 1.3; letter-spacing: 0.02em; }
h1 em { font-style: italic; color: var(--accent); }
.lede { font-size: 19px; color: var(--ink-2); max-width: 58ch; margin: 0 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 3px; text-decoration: none;
  font: 500 15px/1.2 var(--font-body); border: 1px solid var(--ink);
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.ghost { color: var(--ink); }

/* Status strip */
.status { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper-2); }
.status .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-top: 14px; padding-bottom: 14px; font: 400 13px/1.5 var(--font-mono); color: var(--ink-2); }
.status b { color: var(--ink); font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; }

/* Sections */
section.block { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 56px 0; border-bottom: 1px solid var(--rule); }
section.block > h2 {
  font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 0; text-wrap: balance;
}
html[data-lang="zh"] section.block > h2 { font-family: var(--font-han); font-weight: 600; font-size: 24px; }
section.block > h2 .no { display: block; font: 500 12px/1 var(--font-mono); color: var(--ink-2); letter-spacing: 0.1em; margin-bottom: 10px; }
.body p { margin: 0 0 16px; max-width: 65ch; }
.body p:last-child { margin-bottom: 0; }
.body ul { margin: 0 0 16px; padding-left: 20px; max-width: 65ch; }
.body li { margin-bottom: 8px; }
.hero.policy { grid-template-columns: 1fr; padding-bottom: 24px; }

.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--rule); }
.way { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.way + .way { border-left: 1px solid var(--rule); }
.way h3 { margin: 0; font-size: 18px; font-weight: 600; }
.way p { margin: 0; color: var(--ink-2); font-size: 15px; }
.way dl { margin: auto 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.way dt { font-family: var(--font-mono); color: var(--ink-2); }
.way dd { margin: 0; }
.chip { align-self: flex-start; font: 500 11px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 8px; border-radius: 2px; border: 1px solid currentColor; }
.chip.open { color: var(--accent); }
.chip.soon { color: var(--ink-2); }
.chip.pending { color: var(--seal); }

ul.rights { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; }
ul.rights li { padding-left: 18px; border-left: 2px solid var(--accent); font-size: 15px; }
ul.rights b { display: block; font-size: 16px; margin-bottom: 2px; }

ol.time { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
ol.time::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: var(--rule); }
ol.time li { position: relative; padding: 28px 16px 0 0; font-size: 14px; }
ol.time li::before { content: ""; position: absolute; top: 2px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink-2); }
ol.time li.now::before { background: var(--accent); border-color: var(--accent); }
ol.time time { display: block; font: 500 13px/1.3 var(--font-mono); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
ol.time span { color: var(--ink-2); }

.join { background: var(--ink); color: var(--paper); border-radius: 4px; padding: 32px; display: grid; gap: 16px; }
.join p { margin: 0; max-width: 60ch; }
.join .addr { font: 500 18px/1.3 var(--font-mono); word-break: break-all; }
.join a { color: var(--paper); }
.join .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.join button {
  font: 500 14px/1 var(--font-body); background: transparent; color: var(--paper);
  border: 1px solid var(--paper); border-radius: 3px; padding: 10px 14px; cursor: pointer;
}
.join .note { font-size: 14px; opacity: 0.75; }

details { border-top: 1px solid var(--rule); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 500; list-style-position: outside; }
details p { margin: 10px 0 0; color: var(--ink-2); max-width: 65ch; }

footer { padding: 40px 0 56px; font: 400 13px/1.6 var(--font-mono); color: var(--ink-2); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .scroll { writing-mode: horizontal-tb; font-size: 88px; display: flex; align-items: flex-end; gap: 16px; }
  .scroll small { margin: 0 0 10px; letter-spacing: 0.12em; }
  .seal { left: auto; right: 0; bottom: 6px; }
  section.block { grid-template-columns: 1fr; gap: 20px; padding: 40px 0; }
  .ways { grid-template-columns: 1fr; }
  .way + .way { border-left: 0; border-top: 1px solid var(--rule); }
  ul.rights { grid-template-columns: 1fr; }
  ol.time { grid-template-columns: 1fr; gap: 18px; }
  ol.time::before { left: 5px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  ol.time li { padding: 0 0 0 28px; }
}
