/* CCD Camera 支持站样式。原本依赖 Tailwind preflight 做重置，静态化后只补回实际用到的几条。 */
h1, h2, h3, h4, h5, h6, p { margin: 0; }

:root {
  --bone: #f1eadb;
  --paper: #faf6ed;
  --charcoal: #1d1d1b;
  --muted: #666159;
  --line: #c9bfac;
  --accent: #c74f28;
  --dark-surface: #292925;
}

* { box-sizing: border-box; }

html { background: var(--bone); }

body {
  margin: 0;
  color: var(--charcoal);
  background:
    linear-gradient(rgba(29, 29, 27, 0.035) 1px, transparent 1px),
    var(--bone);
  background-size: 100% 32px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 4px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.site-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; min-height: 100vh; }
.site-header, footer { display: flex; align-items: center; justify-content: space-between; }
.site-header { min-height: 88px; border-bottom: 1px solid var(--charcoal); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 13px/1 ui-monospace, "SFMono-Regular", monospace; letter-spacing: .14em; }
.wordmark-mark { display: grid; place-items: center; width: 44px; height: 44px; color: var(--paper); background: var(--charcoal); letter-spacing: .06em; }
nav { display: flex; gap: 28px; }
nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: 14px; text-decoration: none; }
nav a:hover { color: var(--accent); }

.hero { display: grid; grid-template-columns: minmax(280px, .82fr) 1.18fr; align-items: center; gap: clamp(40px, 8vw, 100px); padding: clamp(64px, 10vw, 128px) 0 80px; }
.viewfinder { position: relative; aspect-ratio: 3 / 4; max-height: 560px; overflow: hidden; background: var(--dark-surface); box-shadow: 18px 18px 0 rgba(199, 79, 40, .18); }
.viewfinder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* 四角标记、红点和读数要压在画面上，所以标记本身升一层 */
.corner, .rec-dot, .viewfinder-copy { z-index: 1; }
.viewfinder-copy { text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.corner { position: absolute; width: 32px; height: 32px; border-color: rgba(250, 246, 237, .75); border-style: solid; }
.corner-tl { top: 24px; left: 24px; border-width: 1px 0 0 1px; }
.corner-tr { top: 24px; right: 24px; border-width: 1px 1px 0 0; }
.corner-bl { bottom: 24px; left: 24px; border-width: 0 0 1px 1px; }
.corner-br { right: 24px; bottom: 24px; border-width: 0 1px 1px 0; }
.rec-dot { position: absolute; top: 32px; left: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.viewfinder-copy { position: absolute; right: 32px; bottom: 32px; color: rgba(250, 246, 237, .78); font: 11px/1 ui-monospace, "SFMono-Regular", monospace; letter-spacing: .12em; }
/* balance 让各行长度接近，避免最后一行只剩两个字孤零零地挂着 */
.hero-copy h1, .document-header h1 { margin: 0; font-family: Georgia, "Songti SC", "Times New Roman", serif; font-weight: 500; letter-spacing: -.035em; text-wrap: balance; }
.hero-copy h1 { font-size: clamp(38px, 4.6vw, 58px); line-height: 1.14; text-wrap: initial; }
.eyebrow, .document-updated, .section-number, footer { font: 11px/1.4 ui-monospace, "SFMono-Regular", monospace; letter-spacing: .12em; }
.eyebrow { margin: 0 0 24px; color: var(--accent); font-weight: 700; }
.lede { max-width: 660px; margin: 28px 0 0; color: var(--muted); font-size: 18px; line-height: 1.75; }
.english-copy { font-size: 15px; }

.destination-list { border-top: 1px solid var(--charcoal); }
.destination { display: grid; grid-template-columns: 64px 1fr 44px; gap: 20px; align-items: start; padding: 28px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.destination:hover .destination-copy strong, .destination:focus-visible .destination-copy strong { color: var(--accent); }
.destination-index { padding-top: 6px; color: var(--accent); font: 11px/1 ui-monospace, "SFMono-Regular", monospace; }
.destination-copy { display: grid; grid-template-columns: minmax(180px, .55fr) minmax(180px, .45fr) 1.3fr; align-items: baseline; gap: 24px; }
.destination-copy strong { font-family: Georgia, "Songti SC", serif; font-size: 27px; font-weight: 500; }
.destination-copy span { font-size: 15px; }
.destination-copy small { color: var(--muted); font-size: 14px; line-height: 1.55; }
.destination-arrow { font-size: 22px; }
.privacy-note { display: flex; gap: 14px; align-items: baseline; margin: 48px 0 96px; padding: 20px 24px; color: var(--paper); background: var(--charcoal); }
.privacy-note p { margin: 0; line-height: 1.65; }
.status-light { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.document-layout { display: grid; grid-template-columns: minmax(260px, .72fr) 1.28fr; gap: clamp(56px, 9vw, 120px); padding: 96px 0 120px; }
.document-header { position: sticky; top: 40px; align-self: start; }
.document-header h1 { font-size: clamp(46px, 6vw, 72px); }
.document-summary { margin: 28px 0; color: var(--muted); font-size: 18px; line-height: 1.7; }
.document-updated { color: var(--muted); }
.document-toc { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.document-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.document-toc li { counter-increment: toc; }
.document-toc a { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 7px 0; color: var(--muted); font-size: 14px; line-height: 1.5; text-decoration: none; }
.document-toc a::before { content: counter(toc, decimal-leading-zero); font: 11px/1.7 ui-monospace, "SFMono-Regular", monospace; letter-spacing: .1em; }
.document-toc a:hover { color: var(--accent); }
.document-body section { scroll-margin-top: 24px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.document-body { border-top: 1px solid var(--charcoal); }
.document-body section { display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: 32px 0 40px; border-bottom: 1px solid var(--line); }
.section-number { padding-top: 7px; color: var(--accent); }
.document-body h2 { margin: 0 0 16px; font-family: Georgia, "Songti SC", serif; font-size: 27px; font-weight: 500; }
.document-body p { margin: 0 0 16px; color: #37342f; font-size: 16px; line-height: 1.78; }
.document-body p[lang="en"] { margin-left: -14px; padding-left: 14px; border-left: 2px solid var(--line); color: #5c564c; font-size: 14px; }
.document-body a { color: #8d3217; font-weight: 600; }

footer { min-height: 96px; color: var(--muted); border-top: 1px solid var(--charcoal); }

@media (max-width: 780px) {
  .site-shell { width: min(100% - 32px, 620px); }
  .site-header { min-height: 72px; }
  .wordmark-mark { width: 40px; height: 40px; }
  nav { gap: 10px; }
  nav a { padding: 0 6px; font-size: 13px; }
  .hero, .document-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; gap: 56px; }
  .viewfinder { width: min(76vw, 380px); justify-self: center; }
  .destination { grid-template-columns: 36px 1fr 28px; gap: 12px; }
  .destination-copy { grid-template-columns: 1fr; gap: 6px; }
  .destination-copy small { margin-top: 6px; }
  .document-layout { padding-top: 56px; gap: 48px; }
  .document-header { position: static; }
  .document-toc { display: none; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .destination-copy strong { transition: color 160ms ease; }
}

@media (prefers-color-scheme: dark) {
  :root { --bone: #1b1a18; --paper: #25231f; --charcoal: #f1eadb; --muted: #bdb5a8; --line: #4d4942; --dark-surface: #0d0d0c; }
  body { background-color: var(--bone); }
  .wordmark-mark, .privacy-note { color: #1d1d1b; background: var(--charcoal); }
  .document-body p { color: #ddd5c7; }
  .document-body p[lang="en"] { color: #b8b0a3; }
  .document-body a { color: #f28b62; }
}

@media print {
  .site-header nav, .viewfinder { display: none; }
  .site-shell { width: 100%; }
  .document-layout { display: block; padding: 24px 0; }
  .document-header { position: static; margin-bottom: 40px; }
}
