/* =========================================================
   /assets/site.css — 188电子站共享样式
   1. Reset  2. Tokens  3. Base  4. Utilities
   5. Buttons  6. Header  7. Footer  8. Shared components
   9. Media  10. Responsive  11. Motion
   ========================================================= */

/* ---------- 1. 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, ul, ol { margin: 0; }

ul, ol { 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; }

:where(h1, h2, h3, h4) {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* ---------- 2. Tokens ---------- */
:root {
  --paper: #F7F4EC;
  --paper-deep: #E7E3DA;
  --ink: #1B2A4A;
  --ink-deep: #0F1B30;
  --cyan: #00C2A8;
  --cyan-soft: #8FE8DC;
  --orange: #FF6B35;
  --clay: #B4573A;
  --moss: #6B7F5E;
  --stone: #5C6570;
  --white: #FFFFFF;

  --line: rgba(27, 42, 74, 0.14);
  --line-strong: rgba(27, 42, 74, 0.38);
  --line-dark: rgba(247, 244, 236, 0.16);

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

  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 48px);

  --shadow: 0 1px 0 rgba(27, 42, 74, 0.05), 0 8px 18px rgba(15, 27, 48, 0.06);
  --shadow-lift: 0 1px 0 rgba(27, 42, 74, 0.08), 0 10px 20px rgba(15, 27, 48, 0.13);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 180ms;
}

/* ---------- 3. Base ---------- */
body {
  background-color: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(231, 227, 218, 0.55) 0, rgba(247, 244, 236, 0) 420px);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--cyan-soft);
  color: var(--ink-deep);
}

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

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

/* ---------- 4. Utilities ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.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: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--ink-deep);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 1px solid var(--cyan);
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--orange);
}

.h-xl {
  font-weight: 900;
  font-size: clamp(2.6rem, 9vw, 9rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.h-lg {
  font-weight: 900;
  font-size: clamp(1.9rem, 4.4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.h-md {
  font-weight: 800;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.h-sm {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.btn:hover {
  background: var(--ink-deep);
  border-color: var(--ink-deep);
}

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

.btn--index {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-deep);
}

.btn--index:hover {
  background: var(--cyan-soft);
  border-color: var(--cyan-soft);
}

.btn--cyan {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-deep);
}

.btn--cyan:hover {
  background: var(--cyan-soft);
  border-color: var(--cyan-soft);
  color: var(--ink-deep);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--paper-deep);
  border-color: var(--ink);
  color: var(--ink);
}

.btn--sm {
  padding: 8px 12px;
  font-size: 13px;
}

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 236, 0.97);
  border-bottom: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
}

.site-header__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.site-header__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cyan);
  transition: width 120ms linear;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand nav actions";
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 14px var(--gutter);
  transition: padding var(--dur) var(--ease);
}

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

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__mark {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand__mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(247, 244, 236, 0.34);
  pointer-events: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  line-height: 1.05;
}

.brand__name {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand__line {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--stone);
  white-space: nowrap;
  transition: opacity var(--dur) var(--ease);
}

.site-header[data-condensed] .brand__line {
  opacity: 0.45;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.nav-toggle__text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.nav {
  grid-area: nav;
  justify-self: center;
  min-width: 0;
  max-width: 100%;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__item {
  flex: 0 0 auto;
}

.nav__link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--stone);
  transform: translateY(-0.35em);
}

.nav__label {
  display: inline-block;
}

.nav__link:hover {
  background: var(--paper-deep);
  color: var(--ink-deep);
}

.nav__link:hover .nav__idx {
  color: var(--clay);
}

.nav__link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

.nav__link[aria-current="page"] {
  color: var(--ink-deep);
  font-weight: 700;
  background: rgba(0, 194, 168, 0.12);
  border-bottom-color: var(--cyan);
}

.nav__link[aria-current="page"] .nav__idx {
  color: var(--cyan);
}

.site-header__actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- 7. Footer ---------- */
.site-footer {
  margin-top: clamp(48px, 8vw, 96px);
  background-color: var(--ink-deep);
  background-image:
    repeating-linear-gradient(
      90deg,
      rgba(247, 244, 236, 0.055) 0,
      rgba(247, 244, 236, 0.055) 1px,
      transparent 1px,
      transparent 96px
    );
  color: rgba(247, 244, 236, 0.86);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--cyan) 0,
    var(--cyan) 88px,
    var(--line-dark) 88px,
    var(--line-dark) 100%
  );
}

.site-footer__inner {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) minmax(190px, 1fr);
  gap: clamp(24px, 4vw, 48px);
  padding-bottom: clamp(32px, 4vw, 48px);
}

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

.brand--footer .brand__mark {
  background: transparent;
  border: 1px solid var(--line-dark);
  color: var(--paper);
}

.brand--footer .brand__mark::after {
  border-color: rgba(0, 194, 168, 0.55);
}

.brand--footer .brand__name {
  color: var(--paper);
}

.brand--footer .brand__line {
  color: rgba(247, 244, 236, 0.55);
}

.footer-brand__note {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(247, 244, 236, 0.72);
}

.footer-meta {
  margin-top: 22px;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line-dark);
  padding-top: 16px;
}

.footer-meta__row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.footer-meta__row dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(247, 244, 236, 0.44);
  padding-top: 1px;
}

.footer-meta__row dd {
  color: rgba(247, 244, 236, 0.86);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

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

.footer-col__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--paper);
}

.footer-col__idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cyan);
}

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

.footer-col__list a {
  display: inline-block;
  font-size: 14px;
  color: rgba(247, 244, 236, 0.78);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-col__list a:hover {
  color: var(--cyan-soft);
  border-bottom-color: var(--cyan-soft);
}

.footer-col__list a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.footer-col__note {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(247, 244, 236, 0.66);
  margin-bottom: 16px;
}

.footer-col--action {
  display: block;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 18px;
  border-top: 1px solid var(--line-dark);
}

.footer-base__copy,
.footer-base__icp {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: rgba(247, 244, 236, 0.6);
}

.footer-base__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-base__legal a {
  font-size: 12.5px;
  color: rgba(247, 244, 236, 0.72);
  border-bottom: 1px solid var(--line-dark);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.footer-base__legal a:hover {
  color: var(--cyan-soft);
  border-bottom-color: var(--cyan-soft);
}

/* ---------- 8. Shared components ---------- */
.grid {
  display: grid;
  gap: clamp(12px, 1.8vw, 22px);
}

.grid--split {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

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

.section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 18px;
  align-items: start;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.section-head__num {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}

.section-head__title {
  font-weight: 800;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.section-head__note {
  grid-column: 2;
  font-size: 14px;
  line-height: 1.6;
  color: var(--stone);
  max-width: 56ch;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper-deep);
  border: 1px solid var(--line);
}

.tag--cyan {
  background: rgba(0, 194, 168, 0.14);
  border-color: rgba(0, 194, 168, 0.42);
  color: #0A6C60;
}

.tag--orange {
  background: rgba(255, 107, 53, 0.12);
  border-color: rgba(255, 107, 53, 0.42);
  color: #9C3512;
}

.tag--clay {
  background: rgba(180, 87, 58, 0.12);
  border-color: rgba(180, 87, 58, 0.38);
  color: var(--clay);
}

.tag--moss {
  background: rgba(107, 127, 94, 0.14);
  border-color: rgba(107, 127, 94, 0.4);
  color: #4C5C42;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(16px, 2vw, 24px);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.panel:hover {
  border-color: rgba(255, 107, 53, 0.75);
  box-shadow: var(--shadow-lift);
  transform: translateY(-1px);
}

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.panel__title {
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.panel__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--stone);
  white-space: nowrap;
}

.panel__body {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--stone);
}

.breadcrumbs {
  padding-block: 14px 0;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--stone);
}

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

.breadcrumbs__sep {
  color: var(--line-strong);
}

.breadcrumbs__link {
  color: var(--stone);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.breadcrumbs__link:hover {
  color: var(--ink);
  border-bottom-color: var(--cyan);
}

.breadcrumbs__link[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--orange);
}

.prose {
  max-width: 760px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

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

.prose h2 {
  margin-top: 1.9em;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
}

.prose h3 {
  margin-top: 1.5em;
  font-size: 1.15rem;
}

.prose ul {
  display: grid;
  gap: 0.55em;
}

.prose ul > li {
  position: relative;
  padding-left: 1.5em;
}

.prose ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 8px;
  background: var(--cyan);
}

.prose strong {
  font-weight: 700;
  color: var(--ink-deep);
}

/* Tabs */
.tabs {
  display: block;
}

.tabs__list {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line-strong);
  overflow-x: auto;
  scrollbar-width: thin;
}

.tabs__tab {
  flex: 0 0 auto;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--stone);
  background: transparent;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.tabs__tab:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.tabs__tab:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

.tabs__tab[aria-selected="true"] {
  color: var(--ink-deep);
  border-bottom-color: var(--cyan);
  background: rgba(0, 194, 168, 0.1);
}

.tabs__panel {
  padding-top: 20px;
}

.tabs__panel[hidden] {
  display: none;
}

/* TOC */
.toc {
  position: relative;
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}

.toc__list {
  display: grid;
  gap: 4px;
}

.toc__link {
  display: block;
  padding: 5px 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--stone);
  transition: color var(--dur) var(--ease);
}

.toc__link:hover {
  color: var(--ink);
}

.toc__link[aria-current="true"] {
  color: var(--ink-deep);
  font-weight: 700;
  box-shadow: -15px 0 0 -14px var(--cyan);
}

/* Reveal */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ---------- 9. Media ---------- */
.figure {
  display: block;
  margin: 0;
}

.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--line);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.02);
}

.media--21x9 { aspect-ratio: 21 / 9; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3  { aspect-ratio: 4 / 3; }
.media--1x1  { aspect-ratio: 1 / 1; }

.media__stamp {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  padding: 6px 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.figure__cap {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--stone);
}

/* ---------- 10. Responsive ---------- */
@media (max-width: 1024px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand toggle"
      "nav nav";
    column-gap: 12px;
    row-gap: 0;
    padding-block: 10px;
  }

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

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

  .site-header__actions {
    display: none;
  }

  .nav {
    grid-area: nav;
    justify-self: stretch;
    display: none;
    width: 100%;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .site-header[data-open] .nav {
    display: block;
  }

  .nav__list {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .nav__link {
    padding: 9px 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-bottom-width: 2px;
  }

  .nav__link[aria-current="page"] {
    background: rgba(0, 194, 168, 0.14);
  }

  .site-header[data-open] .nav-toggle__bars span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }

  .site-header[data-open] .nav-toggle__bars span:nth-child(2) {
    opacity: 0;
  }

  .site-header[data-open] .nav-toggle__bars span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }

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

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

  .brand__mark {
    width: 36px;
    height: 36px;
    font-size: 12.5px;
  }

  .brand__name {
    font-size: 15.5px;
  }

  .brand__line {
    font-size: 9.5px;
    letter-spacing: 0.05em;
  }

  .nav-toggle__text {
    display: none;
  }

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

  .footer-meta__row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

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

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .section-head__note {
    grid-column: 1;
  }
}

/* ---------- 11. 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;
  }

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