:root {
  --ink: #12100F;
  --panel: #1C1816;
  --teal-deep: #0A2A33;
  --paper: #F4EDE2;
  --paper-2: #E3D9C8;
  --line: #C9C0B2;
  --text: #E9E2D6;
  --blue: #3FB6C8;
  --blue-glow: #7FE3F0;
  --jade: #2FBF8F;
  --gold: #E8B85C;
  --orange: #E2542C;
  --font-display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "SFMono-Regular", "Roboto Mono", "Cascadia Mono", "Courier New", monospace;
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

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

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 200;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--text);
  border-bottom: 1px solid rgba(201, 192, 178, 0.18);
}

.header-utility {
  background: linear-gradient(90deg, var(--teal-deep), var(--ink) 48%, var(--panel));
  border-bottom: 1px solid rgba(201, 192, 178, 0.16);
  overflow: hidden;
  max-height: 68px;
  transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
}

.header-utility .header-inner {
  min-height: 44px;
}

.header-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(233, 226, 214, 0.55);
  white-space: nowrap;
}

.edition-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

.edition-code {
  color: var(--gold);
  letter-spacing: 0.04em;
}

.edition-meta {
  color: rgba(233, 226, 214, 0.5);
  letter-spacing: 0.08em;
}

.header-nav-layer {
  position: relative;
  background: var(--panel);
}

.header-nav-layer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}

.site-header[data-scrolled="true"] .header-utility {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  border-bottom-color: transparent;
}

.site-header[data-scrolled="true"] .header-nav-layer {
  background: rgba(28, 24, 22, 0.96);
}

.site-header[data-scrolled="true"] .header-nav-layer::after {
  transform: scaleX(1);
}

.site-header[data-scrolled="true"] .header-inner {
  min-height: 54px;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(16px, 2.4vw, 36px);
  flex: 1;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 28px);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 18px 0;
  color: rgba(233, 226, 214, 0.68);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--blue-glow);
}

.nav-link[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--blue);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--gold);
  color: var(--gold);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--gold);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(201, 192, 178, 0.35);
  background: transparent;
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle-line {
  display: block;
  width: 20px;
  height: 1px;
  background: currentColor;
}

.site-footer {
  background: var(--ink);
  color: var(--text);
  border-top: 1px solid rgba(201, 192, 178, 0.18);
}

.footer-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--gold), rgba(232, 184, 92, 0.25) 60%, transparent);
}

.footer-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px clamp(20px, 4vw, 72px) 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.2fr;
  gap: 40px;
}

.footer-brand {
  min-width: 0;
}

.footer-title {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-note {
  margin: 0;
  max-width: 36ch;
  color: rgba(233, 226, 214, 0.68);
  line-height: 1.8;
}

.footer-col {
  min-width: 0;
}

.footer-heading {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.footer-list {
  display: grid;
  gap: 10px;
}

.footer-link {
  color: rgba(233, 226, 214, 0.78);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--blue-glow);
}

.footer-contact {
  display: grid;
  gap: 12px;
}

.footer-contact-item {
  display: grid;
  gap: 2px;
  margin: 0;
  font-size: 14px;
  color: rgba(233, 226, 214, 0.82);
}

.footer-contact-label {
  color: var(--line);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.footer-meta {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid rgba(201, 192, 178, 0.22);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(233, 226, 214, 0.55);
  font-size: 12px;
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 72px);
  padding-right: clamp(20px, 4vw, 72px);
}

.container--narrow {
  max-width: 860px;
}

.container--reading {
  max-width: 720px;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 32%) minmax(0, 68%);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.split-layout--reverse {
  grid-template-columns: minmax(0, 60%) minmax(280px, 40%);
}

.anchor-rail {
  position: sticky;
  top: 104px;
  align-self: start;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(201, 192, 178, 0.18);
  padding: clamp(20px, 3vw, 32px);
}

.panel--paper {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper-2);
}

.panel--teal {
  background: var(--teal-deep);
  border-color: rgba(63, 182, 200, 0.25);
}

.card {
  background: var(--panel);
  border: 1px solid rgba(201, 192, 178, 0.18);
  padding: clamp(18px, 2.4vw, 28px);
}

.card--paper {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper-2);
}

.label {
  display: inline-block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.index-label {
  color: var(--line);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.display-heading {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 250;
  font-size: clamp(2.6rem, 6.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.section-heading {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.body-copy {
  max-width: 65ch;
  color: rgba(233, 226, 214, 0.86);
  font-size: 16px;
  line-height: 1.85;
}

.body-copy--ink {
  color: rgba(18, 16, 15, 0.82);
}

.data {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--blue);
  background: transparent;
  color: var(--blue-glow);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--blue);
  color: var(--ink);
}

.btn--gold {
  border-color: var(--gold);
  color: var(--gold);
}

.btn--gold:hover,
.btn--gold:focus-visible {
  background: var(--gold);
  color: var(--ink);
}

.btn--paper {
  border-color: var(--paper);
  color: var(--paper);
}

.btn--paper:hover,
.btn--paper:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.breadcrumbs {
  border-bottom: 1px solid rgba(201, 192, 178, 0.18);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: rgba(233, 226, 214, 0.55);
  font-size: 12px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}

.breadcrumb-link {
  color: inherit;
  text-decoration: none;
}

.breadcrumb-link:hover,
.breadcrumb-link:focus-visible {
  color: var(--blue-glow);
}

.divider {
  height: 1px;
  margin: clamp(40px, 7vw, 96px) 0;
  background: var(--line);
  opacity: 0.35;
}

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--teal-deep);
  border: 1px solid rgba(201, 192, 178, 0.2);
}

.media img,
.media svg,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--wide {
  aspect-ratio: 21 / 9;
}

.media--tall {
  aspect-ratio: 3 / 4;
}

.media--square {
  aspect-ratio: 1 / 1;
}

.media-caption {
  margin-top: 10px;
  color: rgba(233, 226, 214, 0.55);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.visual-band {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  background: linear-gradient(135deg, var(--teal-deep), var(--panel) 55%, var(--ink));
  border-top: 1px solid rgba(201, 192, 178, 0.18);
  border-bottom: 1px solid rgba(201, 192, 178, 0.18);
}

.stack > * + * {
  margin-top: 16px;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 4px rgba(47, 191, 143, 0.12);
  animation: pulse 3.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.gold-rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: linear-gradient(90deg, var(--gold), rgba(232, 184, 92, 0.15));
}

.table-simple {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-simple th,
.table-simple td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(201, 192, 178, 0.2);
}

.table-simple th {
  color: var(--gold);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.table-simple tr:nth-child(even) {
  background: rgba(227, 217, 200, 0.04);
}

.fold {
  border: 1px solid rgba(201, 192, 178, 0.2);
  background: var(--panel);
}

.fold summary {
  padding: 16px 18px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.fold[open] summary {
  border-bottom: 1px solid rgba(201, 192, 178, 0.2);
}

.fold-content {
  padding: 16px 18px;
  color: rgba(233, 226, 214, 0.78);
}

.code-copy {
  color: var(--gold);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.code-copy[data-copied="true"] {
  color: var(--blue-glow);
}

.js-reveal-init [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.48s var(--ease-out), transform 0.48s var(--ease-out);
}

.js-reveal-init [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1120px) {
  .split-layout,
  .split-layout--reverse {
    grid-template-columns: 1fr;
  }

  .anchor-rail {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 20px;
  }

  .grid-12 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .col-3,
  .col-4,
  .col-5 {
    grid-column: span 3;
  }

  .col-6,
  .col-7,
  .col-8,
  .col-9 {
    grid-column: span 6;
  }
}

@media (max-width: 860px) {
  .header-utility {
    max-height: 52px;
  }

  .header-utility .header-inner {
    min-height: 40px;
  }

  .brand-lockup {
    gap: 8px;
  }

  .brand-sub,
  .edition-meta {
    display: none;
  }

  .header-nav-layer .header-inner {
    min-height: 56px;
    padding: 0 18px;
    justify-content: flex-end;
  }

  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - 106px);
    overflow: auto;
    padding: 8px 18px 18px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
  }

  .site-header[data-open="true"] .primary-nav {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid rgba(201, 192, 178, 0.18);
  }

  .nav-link[aria-current="page"] {
    padding-left: 12px;
    border-bottom-color: rgba(201, 192, 178, 0.18);
    box-shadow: inset 3px 0 0 var(--blue);
  }

  .nav-cta {
    width: 100%;
    min-height: 44px;
    margin-top: 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-meta {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .container,
  .header-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-name {
    font-size: 14px;
  }

  .header-nav-layer .header-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .grid-12 {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .col-3,
  .col-4,
  .col-5,
  .col-6,
  .col-7,
  .col-8,
  .col-9,
  .col-12 {
    grid-column: span 1;
  }

  .display-heading {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }

  .body-copy {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .status-dot {
    animation: none;
  }

  .js-reveal-init [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
