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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--ink-0);
  background-image:
    linear-gradient(rgba(30, 58, 49, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 49, 0.18) 1px, transparent 1px);
  background-size: 64px 64px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

:root {
  --ink-0: #0B1A16;
  --ink-1: #12261F;
  --line: #1E3A31;
  --signal: #3FF2D0;
  --deep-teal: #128F7A;
  --gold: #E4B457;
  --gold-soft: #F0D9A6;
  --text: #EAF3EF;
  --muted: #9DB4AC;
  --wine: #4A1F33;
  --indigo: #232A4D;
  --amber: #FF9F45;
  --rail-width: 84px;
  --status-height: 44px;
  --content-max: 1440px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --font-display: "Arial Narrow", "Helvetica Neue Condensed", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html.nav-open {
  overflow: hidden;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  transform: translateY(-160%);
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--signal);
  color: var(--ink-0);
  font-weight: 700;
  transition: transform 0.2s ease;
}

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

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.08s linear;
}

.site-header {
  position: relative;
  z-index: 150;
}

.status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--status-height);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 18px;
  background: rgba(11, 26, 22, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.status-bar__left,
.status-bar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark__glyph {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--signal);
  border-radius: 8px 2px 8px 2px;
  color: var(--signal);
  font-size: 14px;
  font-weight: 900;
}

.brand-mark__text {
  font-size: 15px;
}

.status-bar__tagline {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.status-chip--season {
  color: var(--gold-soft);
  border-color: rgba(228, 180, 87, 0.38);
}

.version-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(63, 242, 208, 0.4);
  border-radius: 999px;
  color: var(--signal);
  font-size: 12px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.status-bar__update {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle__lines {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text);
}

.nav-toggle__lines::before,
.nav-toggle__lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--text);
}

.nav-toggle__lines::before {
  top: -5px;
}

.nav-toggle__lines::after {
  top: 5px;
}

.nav-toggle__label {
  font-size: 12px;
}

.site-nav {
  position: fixed;
  top: var(--status-height);
  left: 0;
  bottom: 0;
  width: var(--rail-width);
  z-index: 140;
  display: flex;
  flex-direction: column;
  padding: 18px 0;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--ink-1), var(--ink-0));
  border-right: 1px solid var(--line);
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 12px 10px 12px 14px;
  border-left: 3px solid transparent;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--text);
  background: rgba(63, 242, 208, 0.05);
}

.site-nav__link[aria-current="page"] {
  color: var(--signal);
  border-left-color: var(--signal);
  background: rgba(63, 242, 208, 0.08);
}

.site-nav__index {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.site-nav__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.site-nav__hint {
  display: none;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.nav-preview {
  position: absolute;
  left: calc(100% + 14px);
  top: 0;
  z-index: 160;
  min-width: 180px;
  padding: 12px;
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-left: 2px solid var(--signal);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.site-nav__item:hover .nav-preview,
.site-nav__item:focus-within .nav-preview {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.nav-preview__title {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-soft);
  font-size: 12px;
}

.nav-preview__item {
  display: block;
  padding: 4px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-nav__actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid var(--line);
}

.site-nav__action {
  padding: 6px 4px;
  border-left: 2px solid transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.site-nav__action:hover,
.site-nav__action:focus-visible {
  color: var(--signal);
  border-left-color: var(--signal);
}

.nav-scrim {
  display: none;
}

#main-content {
  min-height: 60vh;
}

.container {
  width: min(100% - 40px, var(--content-max));
  margin-inline: auto;
}

.container--narrow {
  width: min(100% - 40px, 780px);
  margin-inline: auto;
}

.prose {
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}

.prose p {
  margin-bottom: 1.1em;
}

.prose h2,
.prose h3 {
  margin: 1.6em 0 0.6em;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.prose h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
}

.prose h3 {
  font-size: 20px;
  font-weight: 700;
}

.prose--narrow {
  max-width: 68ch;
}

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

.grid-12 > * {
  min-width: 0;
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--signal);
  color: var(--signal);
}

.btn--signal {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink-0);
}

.btn--signal:hover,
.btn--signal:focus-visible {
  background: var(--deep-teal);
  border-color: var(--deep-teal);
  color: var(--text);
}

.btn--gold {
  border-color: rgba(228, 180, 87, 0.5);
  color: var(--gold-soft);
}

.btn--gold:hover,
.btn--gold:focus-visible {
  background: rgba(228, 180, 87, 0.12);
  border-color: var(--gold);
  color: var(--gold-soft);
}

.btn--ghost {
  border-color: transparent;
  color: var(--muted);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--signal);
}

.breadcrumbs {
  margin: 0 0 24px;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: var(--line);
}

.breadcrumbs__link {
  color: var(--muted);
}

.breadcrumbs__link:hover,
.breadcrumbs__link:focus-visible {
  color: var(--signal);
}

.panel {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: var(--ink-1);
  border: 1px solid var(--line);
}

.panel--wine {
  background: var(--wine);
  border-color: rgba(228, 180, 87, 0.2);
}

.panel--indigo {
  background: var(--indigo);
  border-color: rgba(63, 242, 208, 0.16);
}

.panel--forest {
  background: linear-gradient(135deg, var(--ink-1), var(--ink-0));
}

.data-block {
  position: relative;
  padding: 18px 20px;
  background: var(--ink-1);
  border-left: 3px solid var(--signal);
}

.data-block__label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.data-block__value {
  color: var(--gold-soft);
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.tag-gold,
.tag-signal,
.tag-muted {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.tag-gold {
  background: rgba(228, 180, 87, 0.12);
  border: 1px solid rgba(228, 180, 87, 0.4);
  color: var(--gold-soft);
}

.tag-signal {
  background: rgba(63, 242, 208, 0.1);
  border: 1px solid rgba(63, 242, 208, 0.4);
  color: var(--signal);
}

.tag-muted {
  border: 1px solid var(--line);
  color: var(--muted);
}

.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-1);
  border: 1px solid var(--line);
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

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

.media-frame__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  background: linear-gradient(transparent, rgba(11, 26, 22, 0.9));
  color: var(--muted);
  font-size: 12px;
}

.zone-wine {
  background: var(--wine);
}

.zone-indigo {
  background: var(--indigo);
}

.zone-forest {
  background: var(--ink-1);
}

.zone-ink {
  background: var(--ink-0);
}

.section-index {
  position: sticky;
  top: calc(var(--status-height) + 24px);
  align-self: start;
}

.section-index__list {
  display: grid;
  gap: 10px;
}

.section-index__link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.section-index__link::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--line);
  transition: width 0.2s ease, background 0.2s ease;
}

.section-index__link[aria-current="true"],
.section-index__link:hover,
.section-index__link:focus-visible {
  color: var(--signal);
}

.section-index__link[aria-current="true"]::before {
  width: 32px;
  background: var(--signal);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.32s ease;
}

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

.site-footer {
  position: relative;
  padding: 48px clamp(20px, 5vw, 64px) 24px;
  background: var(--ink-1);
  border-top: 1px solid var(--line);
}

.footer-track {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(280px, 1.6fr) minmax(240px, 1.2fr);
  gap: 24px 48px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-brand__mark {
  display: inline-block;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.footer-brand__tagline {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.footer-brand__legal {
  margin-top: 24px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.footer-brand__copyright {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.footer-nav {
  display: flex;
  gap: 48px;
}

.footer-nav__group {
  min-width: 120px;
}

.footer-nav__title {
  margin-bottom: 12px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.footer-nav__list {
  display: grid;
  gap: 8px;
}

.footer-nav__link {
  color: var(--muted);
  font-size: 13px;
  transition: color 0.2s ease;
}

.footer-nav__link:hover,
.footer-nav__link:focus-visible {
  color: var(--signal);
}

.footer-contact__title {
  margin-bottom: 12px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.footer-contact__email,
.footer-contact__phone {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}

.footer-contact__phone {
  margin-top: 4px;
}

.footer-contact__address,
.footer-contact__note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.footer-rail {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--content-max);
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer-rail__value {
  color: var(--gold-soft);
  font-family: var(--font-mono);
}

@media (min-width: 900px) {
  #main-content {
    margin-left: var(--rail-width);
    padding-top: var(--status-height);
  }

  .site-footer {
    margin-left: var(--rail-width);
  }
}

@media (max-width: 899px) {
  body {
    background-attachment: scroll;
  }

  .status-bar {
    padding: 0 12px;
  }

  .status-bar__tagline,
  .status-bar__update {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    top: var(--status-height);
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    padding: 20px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    transform: translateX(-100%);
    transition: transform 0.24s ease;
  }

  .site-nav[data-open] {
    transform: translateX(0);
  }

  .site-nav__list {
    gap: 4px;
  }

  .site-nav__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 12px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav__label {
    font-size: 16px;
    writing-mode: horizontal-tb;
  }

  .site-nav__hint {
    display: block;
    margin-left: auto;
  }

  .nav-preview {
    display: none;
  }

  .site-nav__actions {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 20px;
    padding: 16px 0 0;
  }

  .site-nav__action {
    padding: 8px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    text-align: center;
  }

  .site-nav__action:hover,
  .site-nav__action:focus-visible {
    border-color: var(--signal);
  }

  .nav-scrim {
    position: fixed;
    inset: var(--status-height) 0 0;
    z-index: 130;
    display: block;
    background: rgba(11, 26, 22, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .site-nav[data-open] ~ .nav-scrim {
    opacity: 1;
    visibility: visible;
  }

  #main-content {
    margin-left: 0;
    padding-top: var(--status-height);
  }

  .site-footer {
    margin-left: 0;
  }

  .footer-track {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 28px;
  }

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

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

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

@media (max-width: 639px) {
  .grid-12 {
    grid-template-columns: 1fr;
  }

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

  .footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

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

  .scroll-progress {
    transition: none;
  }
}
