/* ============================================================
   stands-anbo.com.cn — Site Kit / assets/site.css
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --night: #0B1B2B;
  --night-deep: #06121f;
  --terrace: #2A3138;
  --concrete: #D7DBDE;
  --orange: #FF4A17;
  --yellow: #FFC61A;
  --green: #17B26A;
  --cyan: #23D3C0;
  --violet: #7A5CFF;
  --paper: #F5F3EF;
  --ink: #1C2429;
  --muted: #5C666E;

  --rail-w: 96px;
  --topbar-h: 56px;
  --gutter: clamp(16px, 4vw, 48px);
  --max-w: 1320px;
  --radius: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --line: rgba(215, 219, 222, 0.16);
  --shadow: 0 22px 48px -22px rgba(4, 12, 22, 0.72);

  --font-sans: "Inter", "Source Han Sans SC", "Noto Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo,
    Consolas, "Liberation Mono", monospace;
}

html[data-scrolled] {
  --topbar-h: 40px;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 24px);
}

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

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

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

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

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

table {
  border-collapse: collapse;
  width: 100%;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

#main-content:focus {
  outline: none;
}

/* ---------- 3. Page shell ---------- */
body {
  min-height: 100vh;
  padding-top: var(--topbar-h);
  padding-left: var(--rail-w);
  background: var(--night);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 300;
  transform: translate(-50%, -180%);
  padding: 11px 20px;
  border-radius: 10px;
  background: var(--orange);
  color: var(--night);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- 5. Header ---------- */
.site-header {
  position: relative;
  z-index: 60;
}

/* 5.1 顶部赛季状态条 */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  z-index: 60;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(6, 18, 31, 0.99), rgba(11, 27, 43, 0.95));
  border-bottom: 1px solid var(--line);
  transition: height 0.24s var(--ease);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--orange) 0 128px,
    var(--cyan) 128px 184px,
    transparent 184px
  );
  pointer-events: none;
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 var(--gutter) 0 calc(var(--rail-w) + 20px);
}

.topbar__status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--concrete);
  white-space: nowrap;
  overflow: hidden;
}

.topbar__status b {
  color: var(--cyan);
  font-weight: 700;
}

.status-dot {
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--green);
  transform: rotate(45deg);
  box-shadow: 0 0 0 3px rgba(23, 178, 106, 0.18);
  animation: stand-pulse 2.4s var(--ease) infinite;
}

@keyframes stand-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(23, 178, 106, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(23, 178, 106, 0.04); }
}

.topbar__quick {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: none;
}

.topbar__quick a {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--paper);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.topbar__quick a:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.topbar__quick a:last-child {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--night);
}

.topbar__quick a:last-child:hover {
  background: #ff6a3d;
  border-color: #ff6a3d;
  color: var(--night);
}

.topbar__mobile-brand {
  display: none;
  align-items: center;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--paper);
}

/* 5.2 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--terrace);
  color: var(--paper);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.18s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease);
}

.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-5px) rotate(-45deg);
}

/* 5.3 左侧竖向导航轨 */
.rail {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  z-index: 55;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 6px 22px;
  background: linear-gradient(180deg, #0c1f33 0%, var(--night) 46%, var(--night-deep) 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  transition: top 0.24s var(--ease);
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(215, 219, 222, 0.055) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(215, 219, 222, 0.04) 0 1px, transparent 1px 26px);
  opacity: 0.7;
}

.rail__brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 4px 0 16px;
}

.rail__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--orange);
  color: var(--night);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%);
  transition: transform 0.24s var(--ease);
}

.rail__brand:hover .rail__mark {
  transform: translateY(-2px);
}

.rail__brandtext {
  writing-mode: vertical-rl;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: var(--concrete);
}

.rail__list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.rail__list li {
  width: 100%;
}

.rail__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 12px 0;
  border-radius: 12px;
  color: rgba(245, 243, 239, 0.62);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.rail__link span {
  writing-mode: vertical-rl;
  white-space: nowrap;
}

.rail__link:hover {
  color: var(--paper);
  background: rgba(215, 219, 222, 0.08);
}

.rail__link[aria-current="page"] {
  color: var(--night);
  background: var(--orange);
  box-shadow: 0 10px 24px -12px rgba(255, 74, 23, 0.9);
}

/* ---------- 6. Footer ---------- */
.site-footer {
  position: relative;
  isolation: isolate;
  margin-top: clamp(56px, 7vw, 112px);
  padding-top: 46px;
  padding-bottom: 30px;
  background: linear-gradient(180deg, #07131f, #040d16);
  color: var(--paper);
  clip-path: polygon(0 46px, 100% 0, 100% 100%, 0 100%);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 46px;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    var(--orange) 0 148px,
    rgba(215, 219, 222, 0.16) 148px 100%
  );
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    rgba(215, 219, 222, 0.045) 0 1px,
    transparent 1px 32px
  );
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 82%);
  mask-image: linear-gradient(180deg, #000, transparent 82%);
}

.footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 1.2fr);
  gap: clamp(28px, 4vw, 64px);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 84px) var(--gutter) 0;
}

.footer__slogan {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 900;
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.footer__slogan em {
  font-style: normal;
  color: var(--orange);
}

.footer__desc {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(245, 243, 239, 0.66);
}

.footer__col-title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--cyan);
}

.footer__col-title--spaced {
  margin-top: 30px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer__links a {
  font-size: 14px;
  font-weight: 600;
  color: rgba(245, 243, 239, 0.78);
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.footer__links a:hover {
  color: var(--paper);
  border-bottom-color: var(--orange);
}

.footer__quick {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__quick-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(42, 49, 56, 0.72);
  border: 1px solid var(--line);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

.footer__quick-link:hover {
  transform: translateX(4px);
  border-color: var(--orange);
  background: rgba(255, 74, 23, 0.12);
}

.footer__quick-link strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.footer__quick-link small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(245, 243, 239, 0.52);
}

.footer__quick-arrow {
  flex: none;
  font-size: 18px;
  color: var(--orange);
  transition: transform 0.2s var(--ease);
}

.footer__quick-link:hover .footer__quick-arrow {
  transform: translateX(3px);
}

.footer__meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 30px;
  max-width: var(--max-w);
  margin: clamp(36px, 5vw, 62px) auto 0;
  padding: 22px var(--gutter) 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(245, 243, 239, 0.6);
}

.footer__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer__meta-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(245, 243, 239, 0.38);
}

.footer__meta-item--legal {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(245, 243, 239, 0.5);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(215, 219, 222, 0.06);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--paper);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
    background-color 0.18s var(--ease);
}

.copy-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.copy-btn[data-copied] {
  background: var(--green);
  border-color: var(--green);
  color: #04150d;
}

/* ---------- 7. Layout utilities ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.section--tight {
  padding-block: clamp(28px, 4vw, 56px);
}

.layout-grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 30px);
}

.layout-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.layout-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.layout-grid--asym { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.layout-grid--asym-rev { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }

/* ---------- 8. Type components ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

.kicker::before {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--orange);
  flex: none;
}

.section-title {
  position: relative;
  padding-left: 20px;
  font-size: clamp(1.75rem, 3.4vw, 3rem);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.025em;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.16em;
  bottom: 0.16em;
  width: 2px;
  background: var(--cyan);
}

.section-lead {
  max-width: 42ch;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(245, 243, 239, 0.72);
}

.coord {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.rule {
  height: 0;
  border: 0;
  border-top: 1px solid var(--line);
  position: relative;
  margin-block: clamp(28px, 4vw, 52px);
}

.rule::after {
  content: "";
  position: absolute;
  left: 0;
  top: -2px;
  width: 72px;
  height: 3px;
  background: var(--orange);
}

/* ---------- 9. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.btn--primary {
  background: var(--orange);
  color: var(--night);
}

.btn--primary:hover {
  transform: translateY(-2px);
  background: #ff6134;
}

.btn--ghost {
  border-color: rgba(215, 219, 222, 0.32);
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn--on-paper {
  background: var(--night);
  color: var(--paper);
}

.btn--on-paper:hover {
  transform: translateY(-2px);
  background: #12293f;
}

/* ---------- 10. Cards & tags ---------- */
.card {
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: var(--radius);
  background: var(--terrace);
  border: 1px solid var(--line);
}

.card--float {
  box-shadow: var(--shadow);
  background: linear-gradient(180deg, #313941, var(--terrace));
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.7;
}

.tag--injury { background: var(--yellow); color: var(--night); }
.tag--live { background: var(--green); color: #04150d; }
.tag--video { background: var(--violet); color: #ffffff; }

/* ---------- 11. Media containers ---------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(120% 90% at 30% 10%, #1d3852 0%, transparent 60%),
    linear-gradient(160deg, #16304a, #0a1725);
  isolation: isolate;
}

.media--wide { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 4 / 5; }
.media--square { aspect-ratio: 1 / 1; }

.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

.media:hover img {
  transform: scale(1.03);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 27, 43, 0.12), rgba(11, 27, 43, 0.44)),
    repeating-linear-gradient(0deg, rgba(245, 243, 239, 0.05) 0 1px, transparent 1px 3px);
}

.media__caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(6, 18, 31, 0.78);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--cyan);
}

/* ---------- 12. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(245, 243, 239, 0.5);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 10px;
  color: rgba(245, 243, 239, 0.26);
}

.breadcrumb a {
  color: rgba(245, 243, 239, 0.74);
  transition: color 0.18s var(--ease);
}

.breadcrumb a:hover {
  color: var(--cyan);
}

/* ---------- 13. Prose ---------- */
.prose {
  max-width: 74ch;
  padding: clamp(24px, 3.4vw, 56px);
  border-radius: 20px;
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.85;
}

.prose > * + * {
  margin-top: 1.2em;
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--ink);
  letter-spacing: -0.02em;
}

.prose h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.prose h3 { font-size: clamp(1.15rem, 1.7vw, 1.4rem); }

.prose a {
  color: #0b6f66;
  border-bottom: 2px solid var(--cyan);
}

.prose a:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  list-style: disc;
}

.prose ol { list-style: decimal; }

.prose li + li { margin-top: 0.5em; }

.prose strong { color: #000000; font-weight: 800; }

.prose blockquote {
  padding: 14px 20px;
  border-left: 3px solid var(--orange);
  background: rgba(28, 36, 41, 0.05);
  border-radius: 0 12px 12px 0;
  color: var(--muted);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(28, 36, 41, 0.08);
}

/* ---------- 14. Anchor index ---------- */
.anchor-index {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 0 14px 14px;
  border-left: 1px solid var(--line);
}

.anchor-index__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(245, 243, 239, 0.58);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.anchor-index__link::before {
  content: attr(data-coord);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
  transition: color 0.2s var(--ease);
}

.anchor-index__link:hover {
  color: var(--paper);
  background: rgba(215, 219, 222, 0.07);
}

.anchor-index__link[aria-current="true"] {
  color: var(--night);
  background: var(--orange);
}

.anchor-index__link[aria-current="true"]::before {
  color: var(--night);
}

/* ---------- 15. Reveal ---------- */
[data-reveal] {
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

html[data-js] [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
}

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

/* ---------- 16. Responsive ---------- */
@media (max-width: 1024px) {
  :root {
    --rail-w: 0px;
  }

  .topbar__inner {
    gap: 12px;
    padding: 0 16px;
  }

  .topbar__quick {
    display: none;
  }

  .topbar__mobile-brand {
    display: inline-flex;
  }

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

  .topbar__status b {
    display: none;
  }

  .rail {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    max-height: 78vh;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom, 0px));
    border-right: 0;
    border-top: 1px solid var(--line);
    border-radius: 22px 22px 0 0;
    background: linear-gradient(180deg, #0c1f33, #07131f);
    box-shadow: 0 -28px 60px rgba(0, 0, 0, 0.55);
    transform: translateY(102%);
    transition: transform 0.3s var(--ease);
    overflow-y: auto;
    z-index: 70;
  }

  .rail[data-open] {
    transform: translateY(0);
  }

  .rail::before {
    display: none;
  }

  .rail__brand {
    flex-direction: row;
    align-items: center;
    align-self: flex-start;
    gap: 12px;
    padding: 0 0 16px;
  }

  .rail__mark {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .rail__brandtext {
    writing-mode: horizontal-tb;
    font-size: 13px;
    letter-spacing: 0.18em;
  }

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

  .rail__link {
    justify-content: flex-start;
    min-height: 52px;
    padding: 14px 16px;
    background: rgba(215, 219, 222, 0.06);
    font-size: 15px;
    letter-spacing: 0.06em;
  }

  .rail__link span {
    writing-mode: horizontal-tb;
  }

  .footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }

  .layout-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .anchor-index {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 0 0;
  }
}

@media (max-width: 900px) {
  .layout-grid--asym,
  .layout-grid--asym-rev {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .topbar__status {
    font-size: 11px;
    letter-spacing: 0.04em;
  }

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

  .footer__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer__meta-item--legal {
    margin-left: 0;
  }

  .layout-grid--2,
  .layout-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .btn {
    width: 100%;
  }
}

/* ---------- 17. Reduced motion ---------- */
@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;
    scroll-behavior: auto !important;
  }

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

  .rail[data-open] {
    transform: none;
  }
}
