/* =========================================================
   华体会赛场 · shared site kit  (/assets/site.css)
   1 reset  2 tokens  3 typography  4 utilities  5 components
   6 header  7 rail  8 footer  9 motion  10 responsive
   ========================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 118px;
}

body,
h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }

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

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

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

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

hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* 2 ---------- tokens ---------- */
:root {
  --ink-green: #0C2A24;
  --ink-deep: #081C18;
  --paper: #F6F1E4;
  --paper-bright: #FCFAF3;
  --orange: #E4572E;
  --orange-text: #B23A12;
  --blue: #1F5FD6;
  --blue-deep: #17499f;
  --mist: #8FA69B;
  --line: #C9C2B0;
  --highlight: #FFE9C7;

  --rail-w: 0px;

  --font-display: "Helvetica Neue", "Arial Narrow", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-section: "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --font-body: -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", "Courier New", monospace;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --shadow-soft: 0 1px 2px rgba(8, 28, 24, .16), 0 10px 26px rgba(8, 28, 24, .1);
  --line-dark: rgba(201, 194, 176, .22);
  --line-dark-soft: rgba(201, 194, 176, .14);
}

/* 3 ---------- typography ---------- */
body {
  padding-left: var(--rail-w);
  background: var(--ink-green);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  font-weight: 400;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-section);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: .01em;
}

h1 { font-size: clamp(30px, 5vw, 58px); line-height: 1.12; }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: clamp(19px, 2vw, 24px); }
h4 { font-size: 17px; }

::selection { background: var(--orange); color: var(--paper-bright); }

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

/* 4 ---------- utilities ---------- */
.container {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: clamp(18px, 3.4vw, 48px);
}

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

.section { padding-block: clamp(40px, 6vw, 84px); }

.grid { display: grid; gap: clamp(18px, 2.4vw, 36px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--7-4 { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }

.prose {
  max-width: 70ch;
  font-size: 16.5px;
  line-height: 1.85;
  color: inherit;
}
.prose > * + * { margin-top: 1.05em; }
.prose h3 { margin-top: 1.9em; }
.prose ul, .prose ol { list-style: disc; padding-left: 1.35em; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .45em; }
.prose a { border-bottom: 1px solid var(--line); }
.prose a:hover { border-color: var(--orange); color: var(--orange-text); }
.prose strong { font-weight: 700; }

.mono {
  font-family: var(--font-mono);
  letter-spacing: .08em;
}

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .22em;
  color: var(--orange-text);
}

.on-dark { color: var(--paper); }
.on-dark .eyebrow { color: var(--orange); }
.on-dark .prose { color: rgba(246, 241, 228, .86); }

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--highlight);
  color: var(--ink-deep);
  font-size: 13px;
  letter-spacing: .06em;
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.is-synced {
  background: var(--highlight);
  color: var(--ink-deep);
  transition: background .2s var(--ease);
}

/* 5 ---------- components ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: .05em;
  border: 1px solid transparent;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--orange); color: var(--paper-bright); }
.btn--solid:hover { background: var(--orange-text); }
.btn--blue { background: var(--blue); color: var(--paper-bright); }
.btn--blue:hover { background: var(--blue-deep); }
.btn--outline { border-color: var(--line); color: var(--ink-green); }
.btn--outline:hover { border-color: var(--orange); color: var(--orange-text); }
.btn--ghost { border-color: rgba(246, 241, 228, .38); color: var(--paper); }
.btn--ghost:hover { border-color: var(--orange); color: var(--highlight); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: .14em;
  border: 1px solid currentColor;
  color: var(--ink-green);
  background: transparent;
}
.tag--orange { color: var(--orange-text); border-color: var(--orange); }
.tag--blue { color: var(--blue); }
.tag--mist { color: var(--mist); border-color: var(--line); }

.card {
  background: var(--paper-bright);
  border: 1px solid var(--line);
  color: var(--ink-green);
  padding: clamp(18px, 2.4vw, 28px);
  transition: border-color .24s var(--ease), transform .24s var(--ease), box-shadow .24s var(--ease);
}
.card:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}
.card--dark {
  background: var(--ink-green);
  border-color: rgba(201, 194, 176, .26);
  color: var(--paper);
}
.card--dark:hover { border-color: var(--orange); }
.card-title {
  font-family: var(--font-section);
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.42;
}
.card-meta {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--orange-text);
}
.card--dark .card-meta { color: var(--orange); }

.figure { display: block; margin: 0; }
.figure-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink-green);
  border: 1px solid var(--line);
}
.figure-media img,
.figure-media picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-media--portrait { aspect-ratio: 3 / 4; }
.figure-media--square { aspect-ratio: 1 / 1; }
.figure-media--wide { aspect-ratio: 21 / 9; }
.figure-media--placeholder {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(201, 194, 176, .16) 0 1px,
    transparent 1px 16px
  );
}
.figure-caption {
  margin-top: 10px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  font-size: 12px;
  line-height: 1.7;
  color: var(--mist);
}

.breadcrumbs { padding-block: clamp(14px, 2vw, 22px); }
.breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--mist);
}
.breadcrumbs-item { display: inline-flex; align-items: center; }
.breadcrumbs-item::after {
  content: "/";
  margin-left: 8px;
  color: var(--line);
}
.breadcrumbs-item:last-child::after { content: none; }
.breadcrumbs-link {
  color: inherit;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.breadcrumbs-link:hover { color: var(--orange-text); border-color: currentColor; }
.breadcrumbs-current { color: var(--ink-green); }
.breadcrumbs--on-dark .breadcrumbs-current { color: var(--paper); }
.breadcrumbs--on-dark .breadcrumbs-link:hover { color: var(--highlight); }

.drawer { border-top: 1px solid var(--line); }
.drawer:last-of-type { border-bottom: 1px solid var(--line); }
.drawer-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  text-align: left;
  font-family: var(--font-section);
  font-size: 17px;
  line-height: 1.5;
  color: inherit;
  transition: color .2s var(--ease);
}
.drawer-trigger:hover { color: var(--orange-text); }
.drawer-mark {
  position: relative;
  flex: none;
  width: 12px;
  height: 12px;
}
.drawer-mark::before,
.drawer-mark::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform .24s var(--ease);
}
.drawer-mark::before { left: 0; right: 0; top: 5.25px; height: 1.5px; }
.drawer-mark::after { top: 0; bottom: 0; left: 5.25px; width: 1.5px; }
.drawer[data-open] .drawer-mark::after { transform: scaleY(0); }
.drawer-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s var(--ease);
}
.drawer[data-open] .drawer-panel { grid-template-rows: 1fr; }
.drawer-inner { overflow: hidden; }
.drawer-body {
  padding: 0 2px 20px;
  font-size: 15px;
  line-height: 1.85;
  color: inherit;
}

.toc { border-left: 1px solid var(--line); padding-left: 16px; }
.toc-list { display: flex; flex-direction: column; gap: 2px; }
.toc-link {
  display: block;
  padding: 6px 0 6px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--mist);
  border-left: 2px solid transparent;
  margin-left: -18px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.toc-link:hover { color: var(--ink-green); }
.toc-link[aria-current="true"] {
  color: var(--ink-green);
  border-left-color: var(--orange);
  font-weight: 600;
}

/* 6 ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ink-deep);
  color: var(--paper);
  border-bottom: 1px solid var(--line-dark);
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

.header-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 40px);
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding: 14px clamp(16px, 3vw, 40px);
  transition: padding .26s var(--ease);
}

.site-header[data-condensed] .header-bar { padding-block: 8px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--orange);
  background:
    linear-gradient(135deg, transparent 45%, var(--orange) 45%, var(--orange) 55%, transparent 55%),
    linear-gradient(135deg, transparent 68%, rgba(201, 194, 176, .5) 68%, rgba(201, 194, 176, .5) 72%, transparent 72%);
  transition: background-color .24s var(--ease);
}
.brand:hover .brand-mark { background-color: rgba(228, 87, 46, .16); }
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  line-height: 1.1;
  letter-spacing: .03em;
  color: var(--paper);
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: .14em;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 10px;
  border: 1px solid rgba(201, 194, 176, .42);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .12em;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--orange); color: var(--highlight); }
.nav-toggle-bars {
  position: relative;
  width: 16px;
  height: 11px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform .24s var(--ease);
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }
.site-header[data-open] .nav-toggle-bars::before { transform: translateY(4.75px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { transform: translateY(-4.75px) rotate(-45deg); }
.nav-toggle-label { font-family: var(--font-mono); }

.header-panel {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 36px);
  margin-left: auto;
  min-width: 0;
}

.site-nav { min-width: 0; }
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 26px);
}
.nav-item { flex: none; }
.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 2px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: .09em;
  color: rgba(246, 241, 228, .72);
  transition: color .2s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 1px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .24s var(--ease);
}
.nav-link:hover { color: var(--paper); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current="page"] {
  color: var(--paper);
  font-weight: 600;
}
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .07em;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.tool--query { background: var(--blue); color: var(--paper-bright); }
.tool--query:hover { background: var(--blue-deep); }
.tool--version {
  font-family: var(--font-mono);
  letter-spacing: .14em;
  color: var(--paper);
  border-color: rgba(201, 194, 176, .45);
}
.tool--version:hover { border-color: var(--orange); color: var(--highlight); }

.header-deck {
  overflow: hidden;
  max-height: 250px;
  opacity: 1;
  background: var(--ink-green);
  border-top: 1px solid var(--line-dark-soft);
  transition: max-height .3s var(--ease), opacity .26s var(--ease);
}
.site-header[data-condensed] .header-deck {
  max-height: 0;
  opacity: 0;
}
.deck-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding: 16px clamp(16px, 3vw, 40px) 26px;
}
.deck-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px 15px;
  background: rgba(246, 241, 228, .04);
  border: 1px solid rgba(201, 194, 176, .24);
  border-left: 2px solid var(--orange);
  transition: transform .24s var(--ease), border-color .24s var(--ease), background-color .24s var(--ease);
}
.deck-card:nth-child(1) { margin-top: 0; }
.deck-card:nth-child(2) { margin-top: 10px; }
.deck-card:nth-child(3) { margin-top: 20px; }
.deck-card:hover {
  transform: translateY(-4px);
  border-color: var(--orange);
  background: rgba(246, 241, 228, .07);
}
.deck-index {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: .18em;
  color: var(--orange);
}
.deck-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: .02em;
  color: var(--paper);
}
.deck-note {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--mist);
}
.deck-link {
  align-self: flex-start;
  margin-top: 4px;
  padding-bottom: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: .14em;
  color: var(--highlight);
  border-bottom: 1px solid rgba(255, 233, 199, .38);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.deck-card:hover .deck-link { color: var(--orange); border-color: var(--orange); }

/* 7 ---------- frame rail ---------- */
.frame-rail { display: none; }

.rail-version {
  writing-mode: vertical-rl;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--orange);
  transition: color .2s var(--ease);
}
.rail-version:hover { color: var(--highlight); }

.rail-ticks {
  flex: 1;
  width: 11px;
  margin: 14px 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(201, 194, 176, .55) 0 1px,
    transparent 1px 12px
  );
}

.rail-label {
  writing-mode: vertical-rl;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .32em;
  color: var(--mist);
}

.rail-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin-top: 14px;
  padding: 8px 0;
  color: var(--mist);
  font-size: 10px;
  letter-spacing: .1em;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .24s var(--ease), transform .24s var(--ease), color .2s var(--ease);
}
.rail-top[data-visible] { opacity: 1; pointer-events: auto; transform: none; }
.rail-top:hover { color: var(--highlight); }
.rail-top-icon { font-size: 14px; line-height: 1; }
.rail-top-text { font-family: var(--font-mono); }

/* 8 ---------- footer ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--paper);
  border-top: 1px solid var(--line-dark);
}
.footer-inner {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 40px);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(20px, 3vw, 48px);
  padding: clamp(32px, 5vw, 56px) 0 clamp(24px, 3vw, 36px);
}
.footer-ident {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(21px, 2.6vw, 27px);
  line-height: 1.2;
  letter-spacing: .03em;
  color: var(--paper);
}
.footer-mono {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--orange);
}
.footer-note {
  margin-top: 12px;
  max-width: 26ch;
  font-size: 13px;
  line-height: 1.75;
  color: var(--mist);
}
.footer-note--tight { margin-top: 0; max-width: 30ch; }
.footer-col { min-width: 0; }
.footer-col-title {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--mist);
}
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(246, 241, 228, .78);
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.footer-link:hover { color: var(--highlight); transform: translateX(3px); }
.footer-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 9px 15px;
  background: var(--orange);
  color: var(--paper-bright);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: .07em;
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.footer-action:hover { background: var(--orange-text); transform: translateY(-2px); }

.footer-contact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  padding: 22px 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}
.footer-contact-item { min-width: 0; }
.footer-label {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: .22em;
  color: var(--mist);
}
.footer-value {
  display: block;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--paper);
  overflow-wrap: anywhere;
}
.footer-value--mono { font-family: var(--font-mono); letter-spacing: .03em; }
.footer-contact-note {
  grid-column: 1 / -1;
  padding-top: 14px;
  border-top: 1px dashed var(--line-dark);
  font-size: 12px;
  line-height: 1.8;
  color: var(--mist);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  padding: 18px 0 30px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--mist);
}
.footer-base-strong { color: var(--paper); letter-spacing: .08em; }
.footer-sep {
  width: 1px;
  height: 12px;
  background: var(--line-dark);
}
.footer-meta-link {
  color: var(--mist);
  border-bottom: 1px solid rgba(201, 194, 176, .32);
  padding-bottom: 1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.footer-meta-link:hover { color: var(--highlight); border-color: var(--highlight); }
.footer-version {
  margin-left: auto;
  font-family: var(--font-mono);
  letter-spacing: .16em;
  color: rgba(246, 241, 228, .7);
}

/* 9 ---------- motion ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* 10 ---------- responsive ---------- */
@media (min-width: 1100px) {
  :root { --rail-w: 60px; }
  .frame-rail {
    display: flex;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 80;
    width: var(--rail-w);
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    background: var(--ink-deep);
    border-right: 1px solid var(--line-dark);
  }
}

@media (max-width: 1099px) {
  .header-deck { max-height: 260px; }
  .deck-inner { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .nav-link { font-size: 12.5px; letter-spacing: .05em; }
  .header-tools { gap: 8px; }
  .tool { padding: 6px 10px; font-size: 11.5px; }
  .brand-tag { display: none; }
}

@media (max-width: 959px) {
  .header-bar { padding-block: 12px; }
  .nav-toggle { display: inline-flex; }
  .header-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 70;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    background: var(--ink-deep);
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    box-shadow: 0 18px 40px rgba(8, 28, 24, .45);
  }
  .site-header[data-open] .header-panel { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item + .nav-item { border-top: 1px solid var(--line-dark-soft); }
  .nav-link {
    display: block;
    padding: 14px clamp(16px, 4vw, 24px);
    font-size: 15px;
    letter-spacing: .07em;
    color: rgba(246, 241, 228, .82);
  }
  .nav-link::after { display: none; }
  .nav-link[aria-current="page"] {
    color: var(--highlight);
    box-shadow: inset 2px 0 0 var(--orange);
    background: rgba(228, 87, 46, .12);
  }
  .header-tools {
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px clamp(16px, 4vw, 24px) 20px;
    border-top: 1px solid var(--line-dark-soft);
  }
  .tool { flex: 1 1 auto; padding: 10px 14px; font-size: 13px; }
  .header-deck { display: none; }
  .grid--2, .grid--3, .grid--7-4 { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-version { margin-left: 0; }
}

@media (max-width: 599px) {
  .brand-name { font-size: 17px; }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .footer-contact { grid-template-columns: minmax(0, 1fr); }
  .footer-base { gap: 8px 14px; }
  .footer-sep { display: none; }
  .deck-inner { padding-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .header-deck { transition: none; }
  .rail-top { transition: none; }
}
