/* ==========================================================================
   亿德体育官网 — 共享样式表 /assets/site.css
   夜场深墨底 + 荧光绿状态语言 + 等宽数据字
   ========================================================================== */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- tokens ---------- */
:root {
  --ink: #041211;
  --stand: #0A2622;
  --panel: #10362F;
  --line: #1E4A42;
  --accent: #3DF08A;
  --warn: #FF8A3D;
  --data: #35D6C4;
  --text: #E9F6F1;
  --muted: #93B4AD;
  --hi: #F2FFF9;

  --rail: 88px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --font-display: "HarmonyOS Sans SC", "Noto Sans SC", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-data: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --shadow-lift: 0 12px 34px rgba(0, 0, 0, .48);
  --shadow-panel: 0 26px 60px rgba(0, 0, 0, .55);
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  color: var(--text);
  background-color: var(--ink);
  background-image:
    radial-gradient(110% 70% at 8% -12%, rgba(61, 240, 138, .10), transparent 62%),
    radial-gradient(80% 60% at 102% 2%, rgba(53, 214, 196, .09), transparent 58%),
    linear-gradient(rgba(30, 74, 66, .26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 74, 66, .26) 1px, transparent 1px);
  background-size: auto, auto, 96px 96px, 96px 96px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-position: 0 0, 0 0, -1px -1px, -1px -1px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

#main-content { display: block; scroll-margin-top: 96px; }

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

::selection { background: rgba(61, 240, 138, .32); color: var(--hi); }

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

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: 16px;
  top: -72px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(4, 18, 17, .94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .site-header { background: var(--ink); }
}

.site-header__bar {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 36px);
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px clamp(16px, 3vw, 40px);
}

/* brand */
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand__link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  background: linear-gradient(150deg, var(--accent), var(--data));
  clip-path: polygon(0 0, 100% 12%, 100% 100%, 0 88%);
}
.brand__pulse {
  position: absolute;
  inset: 7px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 12%, 100% 100%, 0 88%);
  animation: brandPulse 3.4s ease-in-out infinite;
}
@keyframes brandPulse { 0%, 100% { opacity: .9; } 50% { opacity: .3; } }
.brand__text { display: flex; align-items: baseline; gap: 6px; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .02em;
  color: var(--hi);
}
.brand__suffix {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--muted);
}
.brand__tagline {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--muted);
  white-space: nowrap;
}

/* primary command nav */
.cmdnav { min-width: 0; }
.cmdnav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cmdnav__list::-webkit-scrollbar { display: none; }
.cmdnav__item { flex: 0 0 auto; }
.cmdnav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 12px 9px 15px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}
.cmdnav__link::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform .2s ease;
}
.cmdnav__link:hover { color: var(--text); background: rgba(61, 240, 138, .07); }
.cmdnav__link:hover::before { transform: scaleY(1); }
.cmdnav__link[aria-current="page"] { color: var(--hi); background: rgba(61, 240, 138, .12); }
.cmdnav__link[aria-current="page"]::before { transform: scaleY(1); }
.cmdnav__idx {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
  opacity: .6;
}
.cmdnav__link[aria-current="page"] .cmdnav__idx { color: var(--accent); opacity: 1; }

/* command bar utilities */
.cmdbar { display: flex; align-items: center; gap: 10px; justify-self: end; }
.cmdbar__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--stand);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.cmdbar__trigger:hover { border-color: var(--accent); color: var(--text); }
.cmdbar__key {
  font-family: var(--font-data);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid rgba(61, 240, 138, .3);
  background: rgba(61, 240, 138, .12);
  color: var(--accent);
}
.cmdbar__text { letter-spacing: .14em; }

/* mobile toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--stand);
  color: var(--text);
  font-size: 13px;
  letter-spacing: .14em;
  cursor: pointer;
}
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 3px; }
.nav-toggle__bars span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* scroll progress */
.scrollbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.scrollbar__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--data));
  transition: width .1s linear;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn--primary { background: var(--accent); color: var(--ink); }
.btn--primary:hover { background: var(--hi); transform: translateY(-2px); }
.btn--ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--quiet { padding: 8px 12px; color: var(--muted); }
.btn--quiet:hover { color: var(--accent); }

/* ---------- command panel ---------- */
.cmdpanel {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 11vh 16px 24px;
  background: rgba(4, 18, 17, .8);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.cmdpanel__inner {
  width: min(720px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-panel);
}
.cmdpanel__field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cmdpanel__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 17px;
}
.cmdpanel__input::placeholder { color: rgba(147, 180, 173, .7); }
.cmdpanel__input:focus { outline: none; }
.cmdpanel__hint {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
}
.cmdpanel__group { margin-top: 16px; }
.cmdpanel__title {
  margin-bottom: 8px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--accent);
}
.cmdpanel__list { display: grid; gap: 4px; }
.cmdpanel__link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.cmdpanel__link:hover,
.cmdpanel__link:focus-visible {
  background: rgba(61, 240, 138, .08);
  border-color: var(--line);
  color: var(--hi);
}
.cmdpanel__meta {
  margin-left: auto;
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--muted);
}
.cmdpanel__empty { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 120px);
  border-top: 1px solid var(--line);
  background: var(--stand);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: min(420px, 60%);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.foot {
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 64px) clamp(16px, 3vw, 40px) clamp(24px, 3vw, 40px);
}
.foot__top {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(0, 2fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: start;
}
.foot__brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.foot__mark {
  width: 34px;
  height: 34px;
  background: linear-gradient(150deg, var(--accent), var(--data));
  clip-path: polygon(0 0, 100% 12%, 100% 100%, 0 88%);
}
.foot__name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--hi);
}
.foot__desc { max-width: 34ch; font-size: 14px; line-height: 1.8; color: var(--muted); }
.foot__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: clamp(16px, 2vw, 32px);
}
.foot__coltitle {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--accent);
}
.foot__links { display: grid; gap: 9px; }
.foot__link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .18s ease, padding-left .18s ease;
}
.foot__link:hover { color: var(--hi); padding-left: 4px; }
.foot__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.foot__contactitem { display: inline-flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--muted); }
.foot__contactlabel {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--data);
}
.foot__contactvalue { color: var(--text); }
.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--muted);
}
.foot__icp { font-family: var(--font-data); letter-spacing: .08em; }
.foot__copy { font-size: 13px; }
.foot__note { font-size: 12px; }
.to-top {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .12em;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease;
}
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- page shell ---------- */
.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 44px);
  max-width: 1600px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 56px) clamp(16px, 3vw, 40px) clamp(48px, 7vw, 96px);
}
.shell__rail { position: relative; min-width: 0; }
.shell__main { min-width: 0; }
.shell__aside { display: none; min-width: 0; }

/* left rail index */
.rail { position: sticky; top: 88px; display: grid; gap: 14px; }
.rail__title {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--accent);
}
.rail__list { display: grid; gap: 2px; }
.rail__item { display: block; }
.rail__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-left: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.rail__link:hover { color: var(--hi); background: rgba(61, 240, 138, .08); border-left-color: var(--accent); }
.rail__link[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); }
.rail__badge { margin-left: auto; font-family: var(--font-data); font-size: 10px; color: var(--warn); }

/* ---------- typography helpers ---------- */
.wrap { width: 100%; }
.wrap--narrow { max-width: 68ch; }
.lede { max-width: 68ch; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.8; color: var(--text); }
.eyebrow {
  margin-bottom: 10px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--accent);
}

/* ---------- chapters ---------- */
.chapter { margin-bottom: clamp(48px, 7vw, 96px); }
.chapter__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(12px, 2vw, 24px);
  align-items: start;
  margin-bottom: clamp(18px, 2.5vw, 32px);
}
.chapter__num {
  font-family: var(--font-data);
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 700;
  line-height: .85;
  color: var(--accent);
  opacity: .35;
  transition: opacity .6s ease;
}
.chapter.is-inview .chapter__num { opacity: 1; }
.chapter__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 58px);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.02em;
  color: var(--hi);
}
.chapter__note {
  align-self: start;
  justify-self: end;
  padding-top: 6px;
  writing-mode: vertical-rl;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .28em;
  color: var(--muted);
}

/* ---------- panels & cards ---------- */
.panel {
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.panel__title { font-size: 16px; font-weight: 800; letter-spacing: .04em; color: var(--hi); }
.panel__body { display: grid; gap: 14px; }

.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.grid--4-5-3 { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); }

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--stand);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .2s ease;
}
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(61, 240, 138, .45);
  box-shadow: var(--shadow-lift);
}
.card:hover::before,
.card:focus-within::before { transform: scaleX(1); }
.card__meta {
  margin-bottom: 8px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}
.card__title { margin-bottom: 8px; font-size: 18px; font-weight: 800; color: var(--hi); }
.card__text { font-size: 14px; line-height: 1.7; color: var(--muted); }

/* ---------- data bits ---------- */
.statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: clamp(12px, 2vw, 22px); }
.stat { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.stat__value {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  line-height: 1;
  color: var(--hi);
}
.stat__unit { margin-left: 4px; font-family: var(--font-data); font-size: 12px; color: var(--muted); }
.stat__label { font-size: 12px; letter-spacing: .12em; color: var(--muted); }

.meter { position: relative; height: 6px; border-radius: 999px; background: rgba(30, 74, 66, .6); overflow: hidden; }
.meter__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--data));
  transition: width .2s ease-out;
}
.meter--warn .meter__fill { background: linear-gradient(90deg, var(--warn), #FFB37D); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 54, 47, .6);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
}
.tag--accent { border-color: rgba(61, 240, 138, .45); background: rgba(61, 240, 138, .1); color: var(--accent); }
.tag--warn { border-color: rgba(255, 138, 61, .45); background: rgba(255, 138, 61, .1); color: var(--warn); }

/* ---------- breadcrumbs ---------- */
.crumbs { margin-bottom: clamp(16px, 2vw, 28px); }
.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
}
.crumbs__item { display: inline-flex; align-items: center; gap: 8px; }
.crumbs__item + .crumbs__item::before { content: "/"; color: var(--line); }
.crumbs__link { color: var(--muted); text-decoration: none; transition: color .18s ease; }
.crumbs__link:hover { color: var(--accent); }

/* ---------- media containers ---------- */
.media { display: grid; gap: 10px; }
.media__frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(140deg, rgba(16, 54, 47, .95), rgba(4, 18, 17, .95)),
    var(--panel);
}
.media__frame--tall { aspect-ratio: 4 / 5; }
.media__frame--wide { aspect-ratio: 21 / 9; }
.media__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(4, 18, 17, .78));
  pointer-events: none;
}
.media__img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.media__caption {
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
}

/* ---------- reveal ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.has-js [data-reveal].is-inview { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .brand__tagline { display: none; }
}

@media (max-width: 1023px) {
  .site-header__bar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .nav-toggle { display: inline-flex; }
  .cmdnav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    max-height: 72vh;
    overflow-y: auto;
    padding: 10px clamp(12px, 3vw, 24px) 16px;
    border-bottom: 1px solid var(--line);
    background: var(--stand);
    box-shadow: 0 24px 40px rgba(0, 0, 0, .5);
  }
  .cmdnav[data-open] { display: block; }
  .cmdnav__list { flex-direction: column; align-items: stretch; gap: 2px; overflow: visible; }
  .cmdnav__link { width: 100%; justify-content: flex-start; padding: 13px 14px; }
  .cmdnav__link::before { left: 0; top: 18%; bottom: 18%; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; }
  .grid--4-5-3 { grid-template-columns: minmax(0, 1fr); }
  .chapter__head { grid-template-columns: auto minmax(0, 1fr); }
  .chapter__note { display: none; }
  .foot__top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .cmdbar__cta { display: none; }
  .cmdpanel { padding-top: 8vh; }
  .foot__bottom { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 1440px) {
  .shell { grid-template-columns: var(--rail) minmax(0, 1fr) minmax(200px, 280px); }
  .shell__aside { display: block; }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .has-js [data-reveal] { opacity: 1; transform: none; }
  .chapter__num { opacity: 1; }
}
