/* ColourChecker · Base Styles
   Cold-lab aesthetic: paper ground, charcoal ink, monospaced numerals,
   hairline scales, zero corner radius, violet only at punctuation. */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv01", "tnum";
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans-en);
  font-size: var(--fs-body);
  line-height: 1.5;
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
a:hover { color: var(--violet); border-bottom-color: var(--violet); }

hr { border: 0; border-top: var(--hairline); margin: 0; }

/* ───── Typography primitives ───── */
.mono, code, pre, .val, .tick {
  font-family: var(--font-mono);
  font-feature-settings: "tnum", "ss01";
  letter-spacing: 0;
}

.tick {
  font-size: var(--fs-micro);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cn { font-family: var(--font-sans-cn); }
.cn-serif { font-family: var(--font-serif-cn); }
.en-serif { font-family: var(--font-serif-en); font-style: italic; }

h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.015em; }
h1 { font-size: var(--fs-hero); line-height: 0.98; }
h2 { font-size: var(--fs-h2); line-height: 1.1; }
h3 { font-size: var(--fs-h3); line-height: 1.25; }

p { margin: 0 0 1em 0; text-wrap: pretty; }

/* ───── Layout primitives ───── */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.scale-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: var(--hairline);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.scale-bar .section-id {
  color: var(--ink);
  font-weight: 500;
}

.section {
  padding: var(--space-8) 0;
  border-top: var(--hairline);
}
.section:first-of-type { border-top: 0; }

.bilingual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: start;
}
.bilingual > .en { border-right: var(--hairline); padding-right: var(--space-6); }
.bilingual > .cn { padding-left: 0; }

.lang-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

/* ───── Nav ───── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  border-bottom: var(--hairline);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
}
.nav .brand {
  font-family: var(--font-sans-en);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.nav .brand::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--violet);
}
.nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-5);
  margin: 0; padding: 0;
}
.nav ul li { text-align: center; }
.nav ul a {
  color: var(--ink-2);
  border-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.1;
}
.nav ul a .en-label {
  font-family: var(--font-sans-en);
  font-size: 13px;
  letter-spacing: 0.01em;
}
.nav ul a .cn-label {
  font-family: var(--font-sans-cn);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.12em;
}
.nav ul a:hover .en-label,
.nav ul a:hover .cn-label { color: var(--violet); }
.nav ul a.current { border-bottom: 2px solid var(--violet); padding-bottom: 2px; }
.nav ul a.current .en-label { color: var(--ink); }

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 20px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  border-radius: 0;
}
.btn:hover { background: var(--ink); color: var(--paper); border-bottom-color: var(--ink); }
.btn-violet { background: var(--violet); color: var(--paper); border-color: var(--violet); }
.btn-violet:hover { background: var(--violet-ink); border-color: var(--violet-ink); color: var(--paper); }
.btn::after { content: "›"; font-size: 18px; line-height: 1; }

/* ───── Footer ───── */
.foot {
  padding: var(--space-6) 0 var(--space-5);
  border-top: var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.foot-l { display: flex; flex-direction: column; gap: 6px; }
.foot .beian a { color: var(--ink-3); border-bottom: 0; }
.foot .beian a:hover { color: var(--violet); }
@media (max-width: 640px) {
  .foot { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
}

/* ───── Responsive ───── */
@media (max-width: 820px) {
  .bilingual { grid-template-columns: 1fr; gap: var(--space-6); }
  .bilingual > .en { border-right: 0; border-bottom: var(--hairline); padding-right: 0; padding-bottom: var(--space-5); }
  .nav ul { gap: var(--space-4); }
}

/* ───── Utilities ───── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.muted { color: var(--ink-3); }
.ink-2 { color: var(--ink-2); }
.violet { color: var(--violet); }
.upper { text-transform: uppercase; letter-spacing: 0.06em; }

/* Spectrum strip — the subtle "光谱" hint, never loud */
.spectrum {
  height: 2px;
  background: linear-gradient(
    90deg,
    #3D1F5A 0%,
    #4D2B8C 8%,
    #2962BF 22%,
    #2DA6A0 38%,
    #6FB33B 52%,
    #E0C029 66%,
    #D67728 78%,
    #BA2F2F 92%,
    #7A1B1B 100%
  );
  opacity: 0.85;
}

/* Measurement dot — tiny cross-hair used as section markers */
.xhair {
  display: inline-block;
  width: 10px; height: 10px;
  background:
    linear-gradient(var(--ink), var(--ink)) center/100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center/1px 100% no-repeat;
}
