/* ==========================================================================
   加拿大品牌站 · Site Kit  /assets/site.css
   Index Atlas — 纸质索引 × 加拿大地理肌理
   1. Reset & 设计令牌   2. 基础排版   3. 头部   4. 页脚
   5. 通用组件           6. 图片容器   7. 动效与无障碍
   ========================================================================== */

/* ---------- 1. Reset & 设计令牌 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  --head-h: 76px;
}

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

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

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

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

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

:root {
  /* 品牌色 */
  --maple: #C8102E;
  --maple-deep: #8E0B20;
  --glacier: #2E6E8E;
  --glacier-bright: #1B9AAA;
  --glacier-pale: #DCE9F0;
  --cream: #F7F3EA;
  --paper: #FFFDF6;
  --pine: #1F3D33;
  --ink: #14181A;
  --fog: #6B7378;
  --linen: #D8A24A;

  /* 线与层 */
  --line: rgba(20, 24, 26, 0.16);
  --line-strong: rgba(20, 24, 26, 0.34);
  --line-invert: rgba(247, 243, 234, 0.20);
  --cream-90: rgba(247, 243, 234, 0.90);
  --cream-70: rgba(247, 243, 234, 0.70);
  --cream-55: rgba(247, 243, 234, 0.55);

  /* 尺寸与节奏 */
  --shell: 1200px;
  --shell-narrow: 780px;
  --gutter: clamp(18px, 4vw, 56px);
  --radius: 2px;

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 240ms;
  --t-slow: 420ms;

  /* 字体 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas,
    "PingFang SC", monospace;
}

/* ---------- 2. 基础排版 ---------- */
body {
  padding-top: var(--head-h);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-nav-open { overflow: hidden; }

::selection {
  background: var(--glacier-pale);
  color: var(--pine);
}

#main-content { scroll-margin-top: calc(var(--head-h) + 16px); }

:focus-visible {
  outline: 2px solid var(--glacier-bright);
  outline-offset: 3px;
  border-radius: 1px;
}

.site-foot :focus-visible { outline-color: var(--linen); }

.skip-link {
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 300;
  padding: 11px 20px;
  background: var(--pine);
  color: var(--cream);
  font-size: 13px;
  letter-spacing: 0.12em;
  border-radius: var(--radius);
  transform: translateY(-180%);
  transition: transform var(--t-fast) var(--ease);
}

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

/* 排版元件 */
.display {
  font-size: clamp(40px, 7.4vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.h2 {
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 800;
}

.h3 {
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.45;
  letter-spacing: 0.005em;
  font-weight: 700;
}

.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.85;
  color: var(--fog);
  max-width: 34em;
}

.prose { max-width: 38em; }
.prose p + p { margin-top: 1.1em; }
.prose h2, .prose h3 { margin-top: 1.8em; margin-bottom: 0.6em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--glacier);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: currentColor;
}

.label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--fog);
  font-variant-numeric: tabular-nums;
}

/* ---------- 3. 头部 ---------- */
.site-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(247, 243, 234, 0.74);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid transparent;
  transition: background var(--t-slow) var(--ease),
    border-color var(--t-slow) var(--ease),
    box-shadow var(--t-slow) var(--ease);
}

.site-head.is-stuck {
  background: var(--cream);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: var(--line);
  box-shadow: 0 1px 18px rgba(20, 24, 26, 0.06);
}

.head-inner {
  max-width: var(--shell);
  margin-inline: auto;
  min-height: var(--head-h);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding-inline: var(--gutter);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  background: var(--maple);
  border-radius: 1px;
  box-shadow: inset 0 0 0 1px rgba(247, 243, 234, 0.32);
  transition: transform var(--t-fast) var(--ease);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--cream);
}

.brand:hover .brand-mark { transform: rotate(45deg); }

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-sub {
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--fog);
  white-space: nowrap;
}

/* 主色导航 */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.8vw, 26px);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 30px);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 0;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ink);
  transition: color var(--t-fast) var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  background: var(--maple);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 280ms var(--ease), background var(--t-fast) var(--ease);
}

.nav-link:hover { color: var(--glacier); }
.nav-link:hover::after {
  transform: scaleX(1);
  background: var(--glacier-bright);
}

.nav-link[aria-current="page"] {
  font-weight: 700;
  color: var(--ink);
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-num {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--linen);
  font-variant-numeric: tabular-nums;
}

.nav-foot-note { display: none; }

/* 头部工具区 */
.head-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}

.head-save {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fog);
  white-space: nowrap;
}

.anchor-entry {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 20px;
  background: var(--maple);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(142, 11, 32, 0.22);
  transition: background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-fast) var(--ease);
}

.anchor-entry::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cream);
  opacity: 0.85;
}

.anchor-entry:hover {
  background: var(--maple-deep);
  transform: translateY(-1px);
}

.anchor-entry:active {
  transform: translateY(0);
  box-shadow: none;
}

/* 移动开关 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 280ms var(--ease), top 280ms var(--ease);
}

.nav-toggle-bars::before { top: 1px; }
.nav-toggle-bars::after { top: 8px; }

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

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

.nav-toggle-label {
  font-size: 11px;
  letter-spacing: 0.2em;
}

/* 滚动进度 */
.head-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.head-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--glacier-bright);
  transition: width 120ms linear;
}

/* ---------- 4. 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: clamp(56px, 9vw, 120px);
  padding: clamp(48px, 7vw, 88px) 0 0;
  background: var(--pine);
  color: var(--cream-90);
  overflow: hidden;
}

.site-foot::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--maple) 0 16%,
    var(--glacier-bright) 16% 42%,
    var(--linen) 42% 52%,
    transparent 52%
  );
}

.foot-inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.foot-brand {
  padding-bottom: clamp(22px, 3vw, 32px);
  margin-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line-invert);
}

.foot-brand-name {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #FFFFFF;
}

.foot-tagline {
  margin-top: 10px;
  max-width: 32em;
  font-size: 14px;
  line-height: 1.9;
  color: var(--cream-70);
}

.foot-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cream-55);
}

.ver-badge {
  display: inline-block;
  padding: 3px 12px;
  border: 1px solid rgba(216, 162, 74, 0.5);
  border-radius: 999px;
  color: var(--linen);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.foot-meta-item { font-variant-numeric: tabular-nums; }

.foot-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.2fr 0.9fr;
  gap: clamp(24px, 3.4vw, 52px);
  padding-bottom: clamp(32px, 5vw, 56px);
}

.foot-col-title {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-invert);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--linen);
}

.foot-list { display: flex; flex-direction: column; gap: 10px; }

.foot-link {
  display: inline-block;
  font-size: 14px;
  line-height: 1.7;
  color: var(--cream-90);
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

.foot-link:hover {
  color: #FFFFFF;
  border-bottom-color: var(--glacier-bright);
}

.foot-link--more {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--linen);
}

.foot-link--more:hover { color: #FFFFFF; }

.foot-text {
  display: inline-block;
  font-size: 14px;
  line-height: 1.75;
  color: var(--cream-70);
  word-break: break-word;
}

.foot-col--change {
  padding: clamp(18px, 2vw, 26px);
  background: rgba(247, 243, 234, 0.055);
  border: 1px solid rgba(247, 243, 234, 0.13);
  border-left: 2px solid var(--glacier-bright);
  border-radius: var(--radius);
}

.foot-list--notes li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.8;
  color: rgba(247, 243, 234, 0.78);
}

.foot-list--notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 7px;
  height: 1px;
  background: var(--glacier-bright);
}

.foot-list--notes li:first-child {
  color: #FFFFFF;
  font-weight: 600;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line-invert);
}

.foot-copy {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--cream-55);
  font-variant-numeric: tabular-nums;
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--cream);
  color: var(--pine);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  box-shadow: 0 6px 18px rgba(20, 24, 26, 0.14);
  transition: opacity var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    visibility var(--t-fast);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--maple);
  border-color: var(--maple);
  color: var(--cream);
}

.to-top-arrow {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-left: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* ---------- 5. 通用组件 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow { max-width: var(--shell-narrow); }

.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(32px, 4vw, 56px); }
.section--pale { background: var(--glacier-pale); }
.section--pine { background: var(--pine); color: var(--cream); }
.section--pine .eyebrow { color: var(--glacier-bright); }
.section--pine .lede { color: var(--cream-70); }

.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--12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}

.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }

.panel {
  padding: clamp(20px, 2.4vw, 32px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel--pine {
  background: var(--pine);
  color: var(--cream);
  border-color: transparent;
}

.placard {
  font-size: 12px;
  letter-spacing: 0.16em;
  line-height: 1.9;
  color: var(--fog);
}

.panel--pine .placard { color: var(--cream-70); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.btn--primary {
  background: var(--maple);
  color: var(--cream);
}

.btn--primary:hover {
  background: var(--maple-deep);
  transform: translateY(-1px);
}

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

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

.btn--quiet {
  background: var(--glacier-pale);
  color: var(--pine);
}

.btn--quiet:hover {
  background: var(--glacier-bright);
  color: #FFFFFF;
}

.btn--block { display: flex; width: 100%; }

.btn__arrow {
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--fog);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.breadcrumb a { color: var(--glacier); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink); }

/* 章节目录 */
.toc {
  position: sticky;
  top: calc(var(--head-h) + 24px);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.toc-title {
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--fog);
}

.toc-list {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}

.toc-link {
  display: block;
  padding: 7px 0 7px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--fog);
  transition: color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}

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

.toc-link[aria-current="location"] {
  color: var(--glacier);
  border-left-color: var(--glacier-bright);
  font-weight: 600;
}

/* ---------- 6. 图片容器基础规则 ---------- */
.media-figure { margin: 0; }

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--glacier-pale);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

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

.media--indexed::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(247, 243, 234, 0.45);
  pointer-events: none;
}

.media--indexed::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  opacity: 0.62;
  pointer-events: none;
  background:
    linear-gradient(var(--cream), var(--cream)) center / 1px 100% no-repeat,
    linear-gradient(var(--cream), var(--cream)) center / 100% 1px no-repeat;
}

.media-caption {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.8;
  color: var(--fog);
}

/* ---------- 7. 动效与无障碍 ---------- */
.will-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--t-slow) var(--ease),
    transform var(--t-slow) var(--ease);
}

.will-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1120px) {
  .head-save { display: none; }
}

@media (max-width: 1024px) {
  .brand-sub { display: none; }
  .foot-grid { grid-template-columns: 1fr 1.4fr 1fr; }
  .foot-col:last-child { grid-column: span 3; }
}

@media (max-width: 940px) {
  html { --head-h: 66px; }

  .site-head { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--cream); border-bottom-color: var(--line); }
  .site-head.is-stuck { box-shadow: 0 1px 14px rgba(20, 24, 26, 0.08); }

  .head-inner {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

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

  .site-head.nav-open {
    background: var(--pine);
    border-bottom-color: transparent;
    box-shadow: none;
  }

  .site-head.nav-open .brand-name { color: var(--cream); }
  .site-head.nav-open .brand-sub { color: var(--cream-55); }
  .site-head.nav-open .brand-mark::after { background: var(--pine); }
  .site-head.nav-open .nav-toggle { color: var(--cream); border-color: rgba(247, 243, 234, 0.35); }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--head-h);
    bottom: 0;
    z-index: 99;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 28px var(--gutter) 64px;
    background: var(--pine);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 280ms var(--ease), transform 280ms var(--ease),
      visibility 280ms var(--ease);
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-item { border-bottom: 1px solid var(--line-invert); }

  .nav-link {
    width: 100%;
    padding: 18px 2px;
    font-size: 20px;
    letter-spacing: 0.08em;
    color: var(--cream);
  }

  .nav-link::after { display: none; }

  .nav-link:hover { color: #FFFFFF; }

  .nav-link[aria-current="page"] {
    color: #FFFFFF;
    box-shadow: inset 0 -2px 0 var(--maple);
  }

  .nav-num { display: inline-block; font-size: 11px; }

  .nav-foot-note {
    display: block;
    margin-top: 30px;
    font-size: 11px;
    letter-spacing: 0.18em;
    line-height: 2;
    color: var(--cream-55);
  }

  .head-tools { display: block; }

  .anchor-entry {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 120;
    width: 64px;
    height: 64px;
    padding: 0 6px;
    display: grid;
    place-content: center;
    border-radius: 50%;
    font-size: 11px;
    line-height: 1.35;
    letter-spacing: 0.06em;
    text-align: center;
    box-shadow: 0 8px 22px rgba(31, 61, 51, 0.26);
  }

  .anchor-entry::after { display: none; }

  .to-top {
    right: 16px;
    bottom: 92px;
    width: 44px;
    height: 44px;
  }

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

  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-4, .col-5, .col-6, .col-7, .col-8 { grid-column: span 6; }

  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-col:last-child { grid-column: span 2; }

  .toc { position: static; }
}

@media (max-width: 640px) {
  html { --head-h: 62px; }

  body { font-size: 16px; }

  .brand-name { font-size: 14px; }

  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-col:last-child { grid-column: span 1; }
  .foot-brand-name { font-size: 22px; }
  .foot-base { flex-direction: column; }
}

@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;
  }

  .will-reveal {
    opacity: 1;
    transform: none;
  }

  .brand:hover .brand-mark { transform: none; }
}
