/* Docs: contents on the left, text on the right. Quiet on purpose; the words are not written yet. */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { min-height: 100vh; }
body::before { background: radial-gradient(760px 380px at 12% -60px, rgba(168,240,224,0.05), transparent 70%); }

/* ---------- top bar ---------- */
.dc-top { position: sticky; top: 0; z-index: 20; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4.4vw, 64px);
  background: rgba(7,8,11,0.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.dc-brand { display: inline-flex; align-items: center; gap: 10px; }
.dc-brand .brand-mark { width: 28px; height: 28px; overflow: visible; }
.dc-brand .arc { stroke: var(--signal); stroke-width: 1.6; fill: none; stroke-linecap: round; opacity: .9; }
.dc-brand .ring { stroke: var(--text-3); stroke-width: 1.2; fill: none; }
.dc-brand .dot { fill: var(--signal); }
.dc-brand b { font: 700 20px/1 var(--f-display); letter-spacing: -0.04em; }
.dc-nav { display: flex; align-items: center; gap: 28px; font: 500 14px/1 var(--f-ui); color: var(--text-2); }
.dc-nav a { transition: color .2s var(--ease); }
.dc-nav a:hover, .dc-nav a[aria-current] { color: var(--text); }

.dc-nav a { white-space: nowrap; }
.lang-tog { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; font: 500 12px/1 var(--f-ui); letter-spacing: .04em; color: var(--text-3); transition: color .2s var(--ease); }
.lang-tog i { font-style: normal; opacity: .5; }
.lang-tog span { transition: color .2s var(--ease); }
.lang-tog span.on { color: var(--text); }
.lang-tog:hover span:not(.on) { color: var(--text-2); }

/* Syne and Manrope have no Chinese glyphs, so Chinese falls back to the system face */
html:lang(zh) {
  --f-display: 'Syne', 'Manrope', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
  --f-ui: 'Manrope', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif;
}
html:lang(zh) .dc-h1, html:lang(zh) .dc-sec h2 { letter-spacing: 0; font-weight: 700; }

/* ---------- layout ---------- */
.dc-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); max-width: 1180px; margin: 0 auto; padding: 0 clamp(24px, 4.4vw, 64px); }

.dc-toc { position: sticky; top: 64px; align-self: start; padding-top: 64px; }
.dc-toc ol { list-style: none; margin: 0; padding: 0; }
.dc-toc a { display: flex; align-items: baseline; gap: 14px; padding: 9px 0 9px 16px; border-left: 1px solid var(--border); font: 500 14px/1.3 var(--f-ui); color: var(--text-2);
  transition: color .2s var(--ease), border-color .2s var(--ease); }
.dc-toc a b { font: 500 11px/1 var(--f-mono); letter-spacing: .08em; color: var(--text-3); transition: color .2s var(--ease); }
.dc-toc a:hover { color: var(--text); }
.dc-toc a.on { color: var(--text); border-left-color: var(--signal); }
.dc-toc a.on b { color: var(--signal); }

.dc-main { padding: 64px 0 40px; min-width: 0; max-width: 720px; }
.dc-h1 { font: 800 clamp(40px, 5vw, 64px)/1 var(--f-display); letter-spacing: -0.05em; margin: 0 0 clamp(28px, 5vh, 56px); }

.dc-sec { scroll-margin-top: 96px; padding: 34px 0 48px; border-top: 1px solid var(--border); }
.dc-sec:last-child { min-height: 46vh; }

/* Two languages in the markup; show the one that matches the page language */
html:lang(zh) .en, html:lang(en) .zh { display: none; }
.dc-n { display: block; margin-bottom: 14px; font: 500 12px/1 var(--f-mono); letter-spacing: .1em; color: var(--signal); }
.dc-sec h2 { font: 800 clamp(26px, 2.6vw, 34px)/1.1 var(--f-display); letter-spacing: -0.045em; margin: 0 0 16px; }
.dc-tbd { font: 400 15px/1.6 var(--f-ui); color: var(--text-3); }

/* body copy */
.dc-sec p { font: 400 15.5px/1.75 var(--f-ui); color: var(--text-2); margin: 0 0 14px; max-width: 40em; }
.dc-sec h3 { font: 700 17px/1.3 var(--f-display); letter-spacing: -0.02em; color: var(--text); margin: 30px 0 10px; }
.dc-sec h2 + h3 { margin-top: 6px; }
.dc-sec ul { list-style: none; margin: 8px 0 14px; padding: 0; max-width: 40em; }
.dc-sec li { position: relative; padding: 5px 0 5px 20px; font: 400 15.5px/1.7 var(--f-ui); color: var(--text-2); }
.dc-sec li::before { content: ''; position: absolute; left: 3px; top: 15px; width: 5px; height: 5px; border-radius: 50%; background: rgba(168,240,224,0.55); }

/* facts: label on the left, value on the right, hairlines between */
.dc-facts { margin: 12px 0 10px; border-top: 1px solid var(--border); max-width: 40em; }
.dc-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.dc-facts dt { font: 500 14px/1.5 var(--f-ui); color: var(--text-3); flex: none; }
.dc-facts dd { margin: 0; text-align: right; font: 500 15px/1.5 var(--f-ui); color: var(--text); }
.dc-sec p.dc-aside { font-size: 13.5px; color: var(--text-3); margin-top: 8px; }

/* things not settled yet */
.dc-note { margin: 18px 0 6px; padding: 14px 18px 8px; max-width: 40em; border: 1px dashed var(--border-hi); border-radius: 12px; }
.dc-note-k { display: block; margin-bottom: 4px; font: 500 11px/1 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); }
.dc-note ul { margin: 4px 0 6px; }
.dc-note li { color: var(--text-2); }
.dc-note li::before { background: var(--text-3); }

/* status line */
.dc-sec p.dc-status { display: flex; gap: 14px; align-items: baseline; padding: 12px 16px; border-left: 2px solid rgba(168,240,224,0.4); background: rgba(168,240,224,0.03); border-radius: 0 10px 10px 0; font-size: 14.5px; }
.dc-status-k { flex: none; font: 500 11px/1 var(--f-ui); letter-spacing: .18em; text-transform: uppercase; color: var(--signal); }
html:lang(zh) .dc-note-k, html:lang(zh) .dc-status-k { letter-spacing: .08em; text-transform: none; }
html:lang(zh) .dc-sec h3 { letter-spacing: 0; font-weight: 700; }
@media (max-width: 899px) { .dc-facts > div { flex-direction: column; gap: 4px; } .dc-facts dd { text-align: left; } }

.dc-foot { display: flex; justify-content: space-between; gap: 16px; max-width: 1180px; margin: 0 auto; padding: 24px clamp(24px, 4.4vw, 64px) 32px; border-top: 1px solid var(--border); font: 500 12px/1 var(--f-ui); color: var(--text-3); }

/* ---------- small screens: contents become a row under the bar ---------- */
@media (max-width: 899px) {
  .dc-wrap { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dc-toc { position: sticky; top: 64px; z-index: 10; padding: 0; margin: 0 calc(-1 * clamp(24px, 4.4vw, 64px)); background: rgba(7,8,11,0.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
  .dc-toc nav { overflow-x: auto; scrollbar-width: none; padding: 0 clamp(24px, 4.4vw, 64px); }
  .dc-toc nav::-webkit-scrollbar { display: none; }
  .dc-toc ol { display: flex; gap: 6px; padding: 10px 0; width: max-content; }
  .dc-toc a { padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; gap: 8px; }
  .dc-toc a.on { border-color: rgba(168,240,224,0.5); }
  .dc-main { padding-top: 40px; }
  .dc-sec { scroll-margin-top: 140px; }
  .dc-nav { gap: 14px; }
}
