/* =========================================================
   山河图志 — 中国地形与地理界线
   Editorial atlas · warm paper / ink green / cinnabar
   ========================================================= */

:root {
  --paper: #f3ecdf;
  --paper-deep: #e9decc;
  --card: #faf5ea;
  --ink: #1e2b24;
  --ink-soft: #46544b;
  --muted: #737b71;
  --jade: #2f5d4c;
  --jade-deep: #173b31;
  --terra: #c48c65;
  --gold: #d9c18d;
  --sage: #a4bba0;
  --cinnabar: #b74b32;
  --blue: #4f7f8c;
  --line: rgba(30, 43, 36, .14);
  --line-strong: rgba(30, 43, 36, .24);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Hiragino Sans GB", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .72, .25, 1);
  --gutter: clamp(20px, 4vw, 64px);
  --wrap: min(1320px, calc(100vw - var(--gutter) * 2));
  --shadow: 0 30px 70px -50px rgba(25, 38, 31, .45);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

::selection {
  background: var(--cinnabar);
  color: #fff8ec;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

svg { max-width: 100%; }

.wrap { width: var(--wrap); margin-inline: auto; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -90px;
  left: 10px;
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-size: 13px;
  transition: top .2s ease;
}
.skip-link:focus { top: 10px; }

.micro-hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cinnabar);
  box-shadow: 0 0 0 0 rgba(183, 75, 50, .5);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(183, 75, 50, .45); }
  50% { box-shadow: 0 0 0 7px rgba(183, 75, 50, 0); }
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(243, 236, 223, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  transition: box-shadow .3s ease;
}

.site-header.is-scrolled { box-shadow: 0 10px 30px -25px rgba(30, 43, 36, .55); }

.header-inner {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  flex-shrink: 0;
}

.brand-mark svg { width: 25px; height: 25px; }

.brand-copy { display: flex; flex-direction: column; line-height: 1.25; }

.brand-copy strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .15em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .16em;
  margin-top: 3px;
}

.header-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.quick-nav {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: nowrap;
}

.quick-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(250, 245, 234, .52);
  color: var(--ink-soft);
  font-size: 10.5px;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.quick-nav a:hover {
  color: var(--ink);
  background: rgba(30, 43, 36, .07);
  border-color: var(--line-strong);
}

.quick-nav a.is-current {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.nav-divider {
  width: 1px;
  height: 15px;
  margin: 0 4px;
  background: var(--line-strong);
}

.quick-nav a:focus-visible {
  outline: 2px solid var(--cinnabar);
  outline-offset: 2px;
}

/* =========================================================
   INTRO PAGE
   ========================================================= */

.intro-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(42px, 5.6vw, 78px) 0 clamp(42px, 5vw, 68px);
  background:
    radial-gradient(circle at 78% 18%, rgba(217, 193, 141, .24), transparent 32%),
    linear-gradient(180deg, #f7f0e4 0%, var(--paper) 58%, #efe4d3 100%);
}

.intro-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: center;
}

.intro-hero-copy { max-width: 650px; }

.intro-hero h1 {
  font-family: var(--serif);
  font-size: clamp(64px, 7.8vw, 112px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.07em;
  margin: 22px 0 8px;
}

.intro-subtitle {
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: clamp(21px, 2.35vw, 31px);
  font-weight: 600;
  letter-spacing: -.025em;
}

.intro-lead {
  max-width: 34em;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.95;
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.intro-hero-visual {
  width: 100%;
  max-width: 560px;
  justify-self: end;
}

.intro-steps {
  padding: clamp(54px, 7vw, 100px) 0 clamp(50px, 6vw, 80px);
  background: #f6efe3;
  border-top: 1px solid var(--line);
}

.intro-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(30px, 7vw, 110px);
  margin-bottom: 30px;
}

.intro-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: .15em;
}

.intro-kicker span {
  color: var(--cinnabar);
  border: 1px solid rgba(183, 75, 50, .35);
  padding: 2px 6px;
  font-size: 8.5px;
}

.intro-section-head h2 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.05em;
}

.intro-section-head > p {
  max-width: 420px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.85;
}

.intro-steps .stair-card { min-height: 190px; }
.intro-steps .stair-card p { margin-top: 11px; }

.step-boundary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.step-boundary > div {
  padding: 15px 24px 16px 0;
}

.step-boundary > div + div {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.step-boundary span {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: .08em;
  margin-bottom: 3px;
}

.step-boundary strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
}

.intro-impact {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
}

.intro-impact::before {
  content: "影响";
  display: inline-block;
  margin-right: 9px;
  padding: 1px 5px;
  color: var(--cinnabar);
  border: 1px solid rgba(183, 75, 50, .3);
  font-size: 8px;
  letter-spacing: .08em;
}

.intro-footer {
  padding: 20px 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: .04em;
}

.intro-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  min-height: calc(100svh - 75px);
  padding: clamp(44px, 6vw, 96px) 0 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(217, 193, 141, .24), transparent 32%),
    linear-gradient(180deg, #f7f0e4 0%, var(--paper) 55%, #eee3d2 100%);
}

.hero-contours {
  position: absolute;
  inset: -10% -6% -10% 20%;
  pointer-events: none;
  opacity: .7;
  background-image:
    repeating-radial-gradient(ellipse at 81% 25%, transparent 0 49px, rgba(47, 93, 76, .12) 50px 51px),
    repeating-radial-gradient(ellipse at 92% 92%, transparent 0 68px, rgba(183, 75, 50, .09) 69px 70px);
  -webkit-mask-image: linear-gradient(100deg, transparent 5%, #000 48%, #000 100%);
  mask-image: linear-gradient(100deg, transparent 5%, #000 48%, #000 100%);
}

.hero::after {
  content: "山 河";
  position: absolute;
  top: 15%;
  right: -1%;
  transform: translateX(22%);
  font-family: var(--serif);
  font-size: clamp(160px, 23vw, 360px);
  line-height: .8;
  letter-spacing: -.12em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(30, 43, 36, .065);
  pointer-events: none;
  white-space: nowrap;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  gap: clamp(36px, 5.5vw, 86px);
  align-items: center;
}

.hero-copy { max-width: 680px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: .14em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--cinnabar);
  flex-shrink: 0;
}

.eyebrow span {
  color: var(--cinnabar);
  border: 1px solid rgba(183, 75, 50, .4);
  padding: 2px 7px;
  font-size: 9px;
  letter-spacing: .12em;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(64px, 8.9vw, 132px);
  line-height: .98;
  letter-spacing: -.075em;
  margin: 28px 0 26px;
}

.hero h1 em {
  display: inline-block;
  font-style: normal;
  color: var(--cinnabar);
  position: relative;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 3%;
  right: 0;
  bottom: .03em;
  height: .06em;
  background: var(--cinnabar);
  opacity: .25;
  transform: rotate(-1deg);
}

.lede {
  max-width: 34em;
  color: var(--ink-soft);
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.9;
  letter-spacing: .015em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  transition: transform .25s var(--ease), background .25s ease, color .25s ease;
}

.btn-primary {
  background: var(--ink);
  color: #f8f1e4;
  font-size: 13px;
  letter-spacing: .08em;
  padding: 14px 20px 14px 24px;
}

.btn-primary svg { width: 19px; height: 19px; transition: transform .25s var(--ease); }
.btn-primary:hover { background: var(--jade-deep); transform: translateY(-2px); }
.btn-primary:hover svg { transform: translateX(4px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: .08em;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color .2s ease, border-color .2s ease;
}

.text-link span { color: var(--cinnabar); }
.text-link:hover { color: var(--cinnabar); border-color: var(--cinnabar); }

.hero-menu-link {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  padding: 0 0 4px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .1em;
}
.hero-menu-link span { color: var(--cinnabar); }
.hero-menu-link:hover { color: var(--cinnabar); border-color: var(--cinnabar); }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: clamp(38px, 5vw, 64px);
  border-top: 1px solid var(--line-strong);
  padding-top: 21px;
  max-width: 570px;
}

.hero-facts div { display: flex; flex-direction: column; gap: 4px; }

.hero-facts dt {
  font-family: Georgia, var(--serif);
  font-size: clamp(27px, 2.7vw, 38px);
  line-height: 1;
  color: var(--cinnabar);
  letter-spacing: -.05em;
}

.hero-facts dt span {
  font-family: var(--sans);
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .08em;
  margin-left: 3px;
}

.hero-facts dd {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  letter-spacing: .04em;
}

.hero-visual {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 560px;
  z-index: 1;
}

.terrain-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line-strong);
  padding: 13px;
  box-shadow: 0 36px 80px -52px rgba(24, 38, 30, .6);
  transform: rotate(1.2deg);
}

.terrain-card-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 3px 4px 12px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.terrain-card-head .coord { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.terrain-card-head .coord i { width: 26px; height: 1px; background: var(--line-strong); position: relative; }
.terrain-card-head .coord i::after {
  content: ""; position: absolute; right: 0; top: -2px;
  border-left: 4px solid var(--line-strong);
  border-top: 2.5px solid transparent;
  border-bottom: 2.5px solid transparent;
}

.terrain-art {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: #f8f1e4;
}

.terrain-art .art-step {
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: .13em;
  fill: rgba(29, 43, 35, .62);
}

.terrain-art .art-place {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .04em;
  fill: #28372d;
}

.terrain-art .art-place-small { font-size: 15px; letter-spacing: .08em; }

.terrain-art .art-alt {
  font-family: var(--sans);
  font-size: 8.2px;
  letter-spacing: .05em;
  fill: rgba(41, 51, 43, .62);
}

.terrain-art .axis text {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .16em;
  fill: rgba(29, 43, 35, .62);
}

.terrain-art .elevation-scale text {
  font-family: Georgia, serif;
  font-size: 7px;
  fill: rgba(29, 43, 35, .5);
}

.terrain-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  padding: 12px 4px 1px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: .04em;
}

.terrain-legend span { display: inline-flex; align-items: center; gap: 6px; }

.swatch { width: 11px; height: 7px; display: inline-block; border-radius: 1px; }
.swatch-one { background: var(--terra); }
.swatch-two { background: var(--gold); }
.swatch-three { background: var(--sage); }

.floating-note {
  position: absolute;
  left: -54px;
  top: 100px;
  max-width: 300px;
  padding: 17px 22px;
  background: var(--ink);
  color: #f7efdf;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: .02em;
  box-shadow: 0 20px 50px -30px rgba(22, 35, 27, .8);
  transform: rotate(-2.3deg);
}

.floating-note::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  width: 34px;
  height: 2px;
  background: var(--cinnabar);
}

.floating-note span {
  display: block;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .1em;
  color: rgba(245, 237, 223, .56);
}

.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: clamp(30px, 4vw, 58px);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .16em;
}

.hero-foot i {
  width: 52px;
  height: 1px;
  background: var(--line-strong);
  position: relative;
}

.hero-foot i::after {
  content: "";
  position: absolute;
  right: 0;
  top: -2px;
  border-left: 4px solid var(--line-strong);
  border-top: 2.5px solid transparent;
  border-bottom: 2.5px solid transparent;
}

/* =========================================================
   COMMON SECTIONS
   ========================================================= */

.section {
  position: relative;
  padding: clamp(80px, 10vw, 142px) 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, .75fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: end;
  margin-bottom: clamp(38px, 5vw, 64px);
}

.section-index {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.section-index span {
  font-family: Georgia, serif;
  font-size: 12px;
  color: var(--cinnabar);
  letter-spacing: 0;
}

.section-index::after {
  content: "";
  width: 44px;
  height: 1px;
  background: var(--line-strong);
}

.section-title {
  font-family: var(--serif);
  font-size: clamp(38px, 4.6vw, 66px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.055em;
}

.section-intro {
  padding-bottom: 8px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
}

.section-intro p + p { margin-top: 14px; }

/* =========================================================
   ATLAS
   ========================================================= */

.atlas-section { background: #f6efe3; }

.atlas-shell {
  background: var(--card);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.noscript-note {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #f5e5d8;
  color: var(--cinnabar);
  font-size: 12px;
}

.atlas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 245, 234, .82);
}

.layer-switch { display: flex; flex-wrap: wrap; gap: 6px; }

.layer-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  padding: 7px 11px;
  font-size: 11px;
  letter-spacing: .03em;
  color: var(--ink-soft);
  transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

.layer-btn:hover { border-color: var(--line-strong); background: rgba(30, 43, 36, .045); }

.layer-btn.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #f6eee0;
}

.layer-btn .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-step { background: var(--gold); }
.dot-terrain { background: var(--terra); }
.dot-mountain { background: #6b5033; }
.dot-river { background: var(--blue); }
.dot-boundary { background: var(--cinnabar); }
.layer-btn.is-on .dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .15); }

.toolbar-note {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .12em;
}

.atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  align-items: stretch;
}

.map-stage {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 62% 37%, rgba(255, 250, 240, .95) 0%, rgba(243, 234, 218, .85) 56%, #ece0cc 100%);
}

.map-scroll {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.china-map {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  touch-action: manipulation;
}

.map-compass {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink-soft);
  opacity: .7;
  pointer-events: none;
}

.map-compass span {
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: .1em;
  margin-bottom: 2px;
}

.map-compass svg { width: 30px; height: 30px; }

.map-legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 108px;
  padding: 10px 12px;
  background: rgba(250, 245, 234, .9);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: .02em;
}

.legend-title {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .18em;
  margin-bottom: 1px;
}

.map-legend > span:not(.legend-title) { display: flex; align-items: center; gap: 7px; }

.legend-band { width: 13px; height: 7px; display: inline-block; }
.band-one { background: var(--terra); }
.band-two { background: var(--gold); }
.band-three { background: var(--sage); }
.legend-line {
  display: inline-block;
  width: 15px;
  height: 0;
  border-top: 1.5px dashed var(--cinnabar);
}

.scs-inset {
  position: absolute;
  right: 16px;
  bottom: 18px;
  z-index: 3;
  width: 108px;
  padding: 7px 7px 4px;
  border: 1px solid var(--line-strong);
  background: rgba(248, 241, 229, .88);
  box-shadow: 0 8px 24px -18px rgba(30, 43, 36, .45);
}

.scs-inset > span {
  display: block;
  padding-left: 2px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: .08em;
}

.scs-inset svg { display: block; width: 100%; height: auto; }

.map-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 8;
  max-width: 220px;
  padding: 7px 10px;
  background: var(--ink);
  color: #f8f0e1;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: .03em;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 14px));
  transition: opacity .15s ease;
  white-space: nowrap;
}

.map-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--ink);
}

.map-tooltip.is-visible { opacity: 1; }

.map-scroll-hint {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 6px;
  z-index: 5;
  margin: 0;
  padding: 4px 8px;
  transform: translateX(-50%);
  background: rgba(243, 236, 223, .9);
  color: var(--ink-soft);
  font-size: 8px;
  letter-spacing: .05em;
  white-space: nowrap;
}

/* SVG map styles */
.china-map .land-shadow { filter: drop-shadow(0 12px 16px rgba(29, 42, 34, .18)); }
.china-map .step-two-fill { fill: var(--gold); }
.china-map .step-one-fill { fill: var(--terra); }
.china-map .step-three-fill { fill: var(--sage); }
.china-map .step-shade { fill: url(#mapShade); pointer-events: none; }
.china-map .province-line {
  fill: none;
  stroke: #26382e;
  stroke-width: .65px;
  stroke-opacity: .25;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.china-map .country-outline {
  fill: none;
  stroke: #24362c;
  stroke-width: 1.75px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.china-map .coast-island {
  fill: var(--gold);
  stroke: #24362c;
  stroke-width: 1.1px;
  vector-effect: non-scaling-stroke;
}

.china-map .step-hit { cursor: pointer; }
.china-map .step-fill { transition: filter .25s ease; }
.china-map .step-fill:hover { filter: brightness(1.015); }
.china-map .step-fill:focus { outline: none; }
.china-map .step-caption {
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .2em;
  fill: #324235;
  opacity: .55;
  pointer-events: none;
}
.china-map .step-caption-num {
  font-family: Georgia, serif;
  font-size: 26px;
  fill: #324235;
  opacity: .17;
  letter-spacing: 0;
}

.china-map .terrain-item { cursor: pointer; }
.china-map .terrain-dot {
  fill: #513a27;
  opacity: .7;
  stroke: #f4ebda;
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
}
.china-map .terrain-label {
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
  fill: #3b2b1f;
  paint-order: stroke;
  stroke: rgba(243, 234, 219, .82);
  stroke-width: 3px;
  stroke-linejoin: round;
  letter-spacing: .025em;
  transition: fill .2s ease;
}
.china-map .terrain-item.is-large .terrain-label {
  font-size: 18px;
  letter-spacing: .09em;
}
.china-map .terrain-item.is-small .terrain-label { font-size: 10.5px; }
.china-map .terrain-hit { fill: transparent; }
.china-map .terrain-item:hover .terrain-label,
.china-map .terrain-item:focus-visible .terrain-label,
.china-map .terrain-item.is-active .terrain-label { fill: var(--cinnabar); }
.china-map .terrain-item:focus { outline: none; }

.china-map .mountain-item { cursor: pointer; }
.china-map .mountain-halo {
  fill: none;
  stroke: rgba(244, 236, 221, .7);
  stroke-width: 4px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.china-map .mountain-line {
  fill: none;
  stroke: #64492f;
  stroke-width: 1.6px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-opacity: .88;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transition: stroke .2s ease, stroke-width .2s ease;
}
.china-map .mountain-label {
  font-family: var(--serif);
  font-size: 12px;
  fill: #453426;
  paint-order: stroke;
  stroke: rgba(242, 233, 217, .9);
  stroke-width: 3px;
  stroke-linejoin: round;
  letter-spacing: .04em;
  pointer-events: none;
  transition: fill .2s ease;
}
.china-map .mountain-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 15px;
  pointer-events: stroke;
  cursor: pointer;
}
.china-map .mountain-item:hover .mountain-line,
.china-map .mountain-item.is-active .mountain-line { stroke: var(--cinnabar); stroke-width: 2.8px; }
.china-map .mountain-item:hover .mountain-label,
.china-map .mountain-item.is-active .mountain-label { fill: var(--cinnabar); }
.china-map .mountain-item:focus { outline: none; }
.china-map .mountain-item:focus-visible .mountain-label { fill: var(--cinnabar); }

.china-map .river-halo {
  fill: none;
  stroke: rgba(244, 236, 221, .8);
  stroke-width: 4px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.china-map .river-line {
  fill: none;
  stroke: #4c7e89;
  stroke-width: 1.35px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transition: stroke .2s ease, stroke-width .2s ease;
}
.china-map .river-label {
  font-family: var(--sans);
  font-size: 10px;
  fill: #35646f;
  paint-order: stroke;
  stroke: rgba(242, 233, 217, .88);
  stroke-width: 3px;
  stroke-linejoin: round;
  letter-spacing: .08em;
  pointer-events: none;
}
.china-map .river-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 13px;
  pointer-events: stroke;
  cursor: pointer;
}
.china-map .river-item { cursor: pointer; }
.china-map .river-item:hover .river-line,
.china-map .river-item.is-active .river-line { stroke: var(--cinnabar); stroke-width: 2.4px; }
.china-map .river-item:hover .river-label,
.china-map .river-item.is-active .river-label { fill: var(--cinnabar); }
.china-map .river-item:focus { outline: none; }

.china-map .boundary-item { cursor: pointer; }
.china-map .boundary-halo {
  fill: none;
  stroke: rgba(247, 239, 225, .92);
  stroke-width: 5px;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.china-map .boundary-line {
  fill: none;
  stroke-width: 2.1px;
  stroke-linecap: round;
  stroke-dasharray: 7 5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  transition: stroke-width .2s ease;
}
.china-map .boundary-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 17px;
  pointer-events: stroke;
  cursor: pointer;
}
.china-map .boundary-badge { pointer-events: none; }
.china-map .boundary-badge circle {
  stroke: rgba(248, 240, 226, .95);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}
.china-map .boundary-badge text {
  font-family: Georgia, serif;
  font-size: 9px;
  fill: #fff8ea;
  text-anchor: middle;
  letter-spacing: -.02em;
}
.china-map .boundary-item:hover .boundary-line,
.china-map .boundary-item.is-active .boundary-line { stroke-width: 3.4px; }
.china-map .boundary-item.is-active .boundary-badge { animation: badgePulse 1.6s infinite; }
.china-map .boundary-item:focus { outline: none; }
.china-map .boundary-item:focus-visible .boundary-badge { filter: drop-shadow(0 0 4px rgba(183, 75, 50, .7)); }

@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .62; }
}

.china-map .city-dot { fill: var(--cinnabar); stroke: #f8f1e4; stroke-width: 1.2px; vector-effect: non-scaling-stroke; }
.china-map .city-label {
  font-family: var(--sans);
  font-size: 9px;
  fill: #7b3d2d;
  paint-order: stroke;
  stroke: rgba(244, 236, 221, .9);
  stroke-width: 2.5px;
}
.china-map .scs-dash {
  fill: none;
  stroke: var(--cinnabar);
  stroke-width: 1.4px;
  stroke-dasharray: 3 4;
  opacity: .8;
  vector-effect: non-scaling-stroke;
}

/* Map side panel */
.map-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 27px 25px 22px;
  border-left: 1px solid var(--line);
  background: #f8f2e6;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cinnabar);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.panel-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.panel-counter {
  font-family: Georgia, serif;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
}

.map-panel h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: -.035em;
  margin: 20px 0 13px;
}

.map-panel > p {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.85;
}

.panel-facts {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.panel-facts li {
  position: relative;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 10px 14px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.panel-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cinnabar);
}

.panel-index {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.panel-index[hidden] { display: none; }

.panel-index > span {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .12em;
}

.panel-index button {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  padding: 4px 0;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.5;
  text-align: left;
  transition: color .2s ease;
}

.panel-index button:hover { color: var(--cinnabar); }

.panel-index i {
  color: var(--cinnabar);
  font-family: Georgia, serif;
  font-size: 8px;
  font-style: normal;
  letter-spacing: .03em;
}

.panel-note {
  margin-top: auto;
  padding-top: 22px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.panel-note span {
  display: block;
  color: var(--cinnabar);
  font-size: 8px;
  letter-spacing: .12em;
  margin-bottom: 4px;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.panel-btn {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .07em;
  border-bottom: 1px solid var(--line-strong);
  line-height: 1.7;
}

.panel-btn:hover { color: var(--cinnabar); border-color: var(--cinnabar); }

.panel-arrow { color: var(--cinnabar); font-size: 14px; }

.map-panel.is-updating h3,
.map-panel.is-updating > p { animation: panelFade .38s var(--ease); }

@keyframes panelFade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   ATLAS INVITE (main page)
   ========================================================= */

.atlas-invite {
  background:
    radial-gradient(circle at 88% 10%, rgba(217, 193, 141, .13), transparent 30%),
    var(--ink);
  color: #f4ebdb;
  border-top: 1px solid rgba(244, 235, 219, .08);
  border-bottom: 1px solid rgba(244, 235, 219, .08);
}

.atlas-invite-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  padding: 25px 0;
}

.atlas-invite-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 235, 219, .22);
  color: #d9b87d;
  flex-shrink: 0;
}

.atlas-invite-mark svg { width: 32px; height: 32px; }

.atlas-invite-copy span {
  display: block;
  color: #d9b87d;
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: .18em;
  margin-bottom: 4px;
}

.atlas-invite-copy h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.3;
}

.atlas-invite-copy p {
  margin-top: 5px;
  color: rgba(244, 235, 219, .5);
  font-size: 10.5px;
  line-height: 1.7;
}

.atlas-invite-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border: 1px solid rgba(244, 235, 219, .28);
  color: #f4ebdb;
  font-size: 10px;
  letter-spacing: .08em;
  white-space: nowrap;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.atlas-invite-links {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.atlas-invite-link span { color: #d9b87d; font-size: 14px; transition: transform .25s var(--ease); }
.atlas-invite-link:hover { background: #f4ebdb; color: var(--ink); border-color: #f4ebdb; }
.atlas-invite-link:hover span { transform: translateX(4px); color: var(--cinnabar); }

/* =========================================================
   LEARN PAGE
   ========================================================= */

.learn-intro {
  padding: clamp(32px, 4.5vw, 58px) 0 clamp(28px, 3.8vw, 44px);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 87% 8%, rgba(217, 193, 141, .18), transparent 28%),
    linear-gradient(180deg, #f7f0e4, #f3ecdf);
}

.learn-intro-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(28px, 6vw, 90px);
}

.learn-intro h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.06em;
}

.learn-intro-copy { max-width: 440px; padding-bottom: 4px; }
.learn-intro-copy > p { color: var(--ink-soft); font-size: 12px; line-height: 1.85; }

.learn-intro + .section {
  border-top: 0;
  padding-top: clamp(54px, 7vw, 90px);
}

/* =========================================================
   ATLAS PAGE
   ========================================================= */

.atlas-page { background: #f6efe3; }

.atlas-page-head {
  padding: clamp(30px, 4.6vw, 54px) 0 26px;
  border-bottom: 1px solid var(--line);
}

.atlas-page-head-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(28px, 6vw, 90px);
}

.atlas-breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .12em;
}

.atlas-breadcrumb a { transition: color .2s ease; }
.atlas-breadcrumb a:hover { color: var(--cinnabar); }
.atlas-breadcrumb span { color: var(--cinnabar); }

.atlas-page-head h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 4.4vw, 60px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -.055em;
}

.atlas-page-copy { max-width: 430px; padding-bottom: 5px; }
.atlas-page-copy > p { color: var(--ink-soft); font-size: 12px; line-height: 1.85; }

.atlas-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}

.atlas-meta span {
  border: 1px solid var(--line);
  padding: 3px 7px;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: .04em;
}

.atlas-canvas { padding: 20px 0 46px; }
.atlas-canvas .atlas-shell {
  max-width: 1200px;
  margin-inline: auto;
  box-shadow: 0 28px 68px -56px rgba(30, 43, 36, .55);
}
.atlas-tips,
.atlas-return { max-width: 1200px; margin-inline: auto; }

.atlas-tips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 22px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.atlas-tips > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 2px;
  padding: 16px 24px 17px 0;
}

.atlas-tips > div + div {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.atlas-tips span {
  grid-row: span 2;
  color: var(--cinnabar);
  font-family: Georgia, serif;
  font-size: 11px;
  line-height: 1.5;
}

.atlas-tips h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.atlas-tips p {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.atlas-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .04em;
}

.atlas-footer {
  padding: 20px 0;
  background: var(--ink);
  color: rgba(244, 235, 219, .5);
  font-size: 8.5px;
  letter-spacing: .04em;
}

.atlas-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* =========================================================
   INTERACTIVE PROFILE PAGE
   ========================================================= */

.profile-page { background: #f6efe3; }

.profile-page-head {
  padding: clamp(24px, 3.4vw, 40px) 0 20px;
  border-bottom: 1px solid var(--line);
}

.profile-page-head-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(28px, 6vw, 90px);
}

.profile-page-head h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.06em;
}

.profile-page-copy { max-width: 455px; padding-bottom: 5px; }
.profile-page-copy > p { color: var(--ink-soft); font-size: 12px; line-height: 1.85; }

.profile-canvas-section { padding: 22px 0 46px; }

.profile-reader {
  max-width: 1200px;
  margin-inline: auto;
  background:
    radial-gradient(circle at 15% 0%, rgba(217, 193, 141, .08), transparent 34%),
    var(--jade-deep);
  border: 1px solid rgba(30, 43, 36, .28);
  color: #f3ead8;
  box-shadow: 0 30px 70px -58px rgba(18, 45, 37, .7);
}

.profile-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(243, 234, 216, .13);
  background: rgba(243, 234, 216, .025);
}

.route-switch { display: flex; flex-wrap: wrap; gap: 6px; }

.route-tab {
  border: 1px solid rgba(243, 234, 216, .22);
  background: transparent;
  color: rgba(243, 234, 216, .58);
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .04em;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.route-tab:hover { border-color: rgba(243, 234, 216, .55); color: #f3ead8; }
.route-tab.is-active { background: #f3ead8; border-color: #f3ead8; color: var(--ink); }

.profile-toolbar-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(243, 234, 216, .45);
  font-size: 8.5px;
  letter-spacing: .05em;
  white-space: nowrap;
}

.profile-toolbar-note .pulse-dot { background: #d9b87d; box-shadow: none; animation: none; }
.profile-hint-mobile { display: none; }

.profile-reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  align-items: stretch;
}

.profile-chart-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  padding: 10px 8px 0;
  overflow: hidden;
}

.profile-chart-scroll { overflow: hidden; }

.terrain-profile {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.profile-elevation-readout {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 5px 8px;
  border: 1px solid rgba(243, 234, 216, .16);
  background: rgba(18, 45, 37, .72);
  color: rgba(243, 234, 216, .65);
  font-family: Georgia, var(--sans);
  font-size: 8.5px;
  letter-spacing: .04em;
  pointer-events: none;
}

.profile-elevation-readout.is-active { color: #d9b87d; border-color: rgba(217, 184, 125, .4); }

.profile-page .profile-scroll-hint { display: none; }

/* profile svg */
.terrain-profile .p-grid-line {
  stroke: rgba(243, 234, 216, .1);
  stroke-width: 1;
}
.terrain-profile .p-grid-line.is-zero { stroke: rgba(243, 234, 216, .3); }
.terrain-profile .p-axis-label {
  fill: rgba(243, 234, 216, .44);
  font-family: Georgia, var(--sans);
  font-size: 10.5px;
  letter-spacing: .04em;
}
.terrain-profile .p-axis-title {
  fill: rgba(243, 234, 216, .35);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .12em;
}
.terrain-profile .p-sea-label {
  fill: rgba(114, 170, 184, .72);
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: .08em;
}

.terrain-profile .p-zone { cursor: pointer; }
.terrain-profile .p-zone rect {
  opacity: .035;
  transition: opacity .25s ease;
}
.terrain-profile .p-zone:hover rect,
.terrain-profile .p-zone:focus-visible rect,
.terrain-profile .p-zone.is-active rect { opacity: .11; }
.terrain-profile .p-zone:focus { outline: none; }
.terrain-profile .p-zone-label {
  fill: rgba(243, 234, 216, .58);
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: .13em;
  pointer-events: none;
}

.terrain-profile .p-boundary-line {
  stroke: rgba(217, 184, 125, .45);
  stroke-width: 1;
  stroke-dasharray: 3 7;
}
.terrain-profile .p-boundary-badge { fill: #d9b87d; }
.terrain-profile .p-boundary-label {
  fill: rgba(217, 184, 125, .75);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .025em;
  text-anchor: middle;
}

.terrain-profile .p-area { fill: url(#profileAreaFill); pointer-events: none; }
.terrain-profile .p-surface {
  fill: none;
  stroke: #f3ead8;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  pointer-events: none;
}
.terrain-profile .p-surface-glow {
  fill: none;
  stroke: rgba(243, 234, 216, .1);
  stroke-width: 8;
  stroke-linejoin: round;
  pointer-events: none;
}

.terrain-profile .p-node { cursor: pointer; }
.terrain-profile .p-node-halo { fill: rgba(243, 234, 216, .1); transition: fill .2s ease; }
.terrain-profile .p-node-core {
  fill: #f3ead8;
  stroke: #b74b32;
  stroke-width: 1.8;
  transition: fill .2s ease, r .2s ease;
}
.terrain-profile .p-node-hit { fill: transparent; }
.terrain-profile .p-node-label {
  fill: #f3ead8;
  font-family: var(--serif);
  font-size: 16.5px;
  letter-spacing: .03em;
  text-anchor: middle;
  pointer-events: none;
}
.terrain-profile .p-node-elev {
  fill: rgba(243, 234, 216, .48);
  font-family: Georgia, var(--sans);
  font-size: 8.5px;
  letter-spacing: .04em;
  text-anchor: middle;
  pointer-events: none;
}
.terrain-profile .p-node:hover .p-node-halo,
.terrain-profile .p-node.is-active .p-node-halo { fill: rgba(183, 75, 50, .22); }
.terrain-profile .p-node:hover .p-node-core,
.terrain-profile .p-node.is-active .p-node-core { fill: #b74b32; stroke: #f3ead8; }
.terrain-profile .p-node:hover .p-node-label,
.terrain-profile .p-node.is-active .p-node-label { fill: #d9b87d; }
.terrain-profile .p-node:focus { outline: none; }

.terrain-profile .p-guide {
  opacity: 0;
  transition: opacity .12s ease;
  pointer-events: none;
}
.terrain-profile .p-guide.is-visible { opacity: 1; }
.terrain-profile .p-guide-line { stroke: rgba(243, 234, 216, .25); stroke-width: 1; stroke-dasharray: 2 5; }
.terrain-profile .p-guide-dot { fill: #d9b87d; }

.profile-panel {
  border-left: 1px solid rgba(30, 43, 36, .18);
  background: #f8f2e6;
  color: var(--ink);
}

.profile-step-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.profile-step-btn {
  border: 1px solid var(--line);
  background: transparent;
  padding: 5px 8px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: .03em;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.profile-step-btn:hover,
.profile-step-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #f4ebdb;
}

.profile-route-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 1200px;
  margin: 18px auto 0;
}

.profile-route-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: rgba(250, 245, 234, .55);
  text-align: left;
  transition: background .25s ease, border-color .25s ease, transform .25s var(--ease);
}

.profile-route-card:hover { background: var(--card); border-color: var(--line-strong); transform: translateY(-2px); }
.profile-route-card.is-active { border-color: var(--cinnabar); background: #fbf0e5; }
.profile-route-card:focus-visible { outline: 2px solid var(--cinnabar); outline-offset: 2px; }

.route-card-no {
  color: var(--cinnabar);
  font-family: Georgia, serif;
  font-size: 10px;
  padding-top: 3px;
}

.route-card-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.route-card-copy strong {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.route-card-copy > span { color: var(--muted); font-size: 9.5px; line-height: 1.7; }
.route-card-arrow { margin-left: auto; color: var(--cinnabar); font-size: 14px; }
.profile-route-card.is-active .route-card-arrow { transform: rotate(0); }

.profile-tips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1200px;
  margin: 18px auto 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.profile-tips > div {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 2px;
  padding: 15px 24px 16px 0;
}
.profile-tips > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.profile-tips span {
  grid-row: span 2;
  color: var(--cinnabar);
  font-family: Georgia, serif;
  font-size: 11px;
}
.profile-tips h3 { font-family: var(--serif); font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.profile-tips p { color: var(--muted); font-size: 9.5px; line-height: 1.7; }

.profile-page .atlas-return { max-width: 1200px; margin-inline: auto; }

/* =========================================================
   STAIRCASE / PROFILE
   ========================================================= */

.staircase-section {
  background:
    radial-gradient(circle at 12% 18%, rgba(196, 140, 101, .12), transparent 30%),
    linear-gradient(180deg, #efe5d4, #f3ecdf);
}

.terrain-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 26px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}

.terrain-facts > div {
  padding: 17px 24px 18px 0;
}

.terrain-facts > div + div {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.terrain-facts span {
  display: block;
  color: var(--cinnabar);
  font-size: 8px;
  letter-spacing: .12em;
  margin-bottom: 4px;
}

.terrain-facts strong {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.terrain-facts p {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.75;
}

.profile-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3.2vw, 40px) clamp(18px, 3.6vw, 46px) 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(217, 193, 141, .14), transparent 36%),
    radial-gradient(circle at 10% 100%, rgba(183, 75, 50, .13), transparent 38%),
    var(--jade-deep);
  color: #f3ead8;
  box-shadow: 0 36px 80px -52px rgba(18, 45, 37, .75);
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: repeating-linear-gradient(115deg, transparent 0 31px, rgba(244, 236, 220, .12) 32px 33px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000);
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000);
}

.profile-head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 6px;
}

.profile-kicker {
  display: block;
  color: #d9b87d;
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: .22em;
  margin-bottom: 7px;
}

.profile-head h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 27px);
  font-weight: 600;
  letter-spacing: .015em;
}

.profile-key {
  display: flex;
  gap: 18px;
  padding-top: 4px;
  color: rgba(243, 234, 216, .6);
  font-size: 9px;
  letter-spacing: .05em;
  white-space: nowrap;
}

.profile-key span { display: flex; align-items: center; gap: 6px; }
.profile-key i { display: block; width: 11px; height: 7px; }
.key-peak { background: #d9bf8e; }
.key-basin { border: 1px solid rgba(243, 234, 216, .5); }

.profile-scroll { overflow: visible; }

.profile-scroll-hint {
  display: none;
  margin: 0 0 8px;
  color: rgba(243, 234, 216, .55);
  font-size: 8px;
  letter-spacing: .08em;
  text-align: right;
}

.profile-art {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 2px;
}

.profile-grid path { stroke: rgba(243, 234, 216, .12); stroke-width: 1; }
.profile-grid text {
  fill: rgba(243, 234, 216, .4);
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: .05em;
}

.profile-area { fill: none; stroke: #e9d6b2; stroke-width: 1.9; stroke-linejoin: round; }
.profile-area-fill { pointer-events: none; }

.profile-divisions path {
  stroke: rgba(243, 234, 216, .3);
  stroke-width: 1;
  stroke-dasharray: 3 7;
}
.profile-divisions circle { fill: #d9b87d; }
.profile-divisions text {
  fill: rgba(243, 234, 216, .6);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .1em;
}

.profile-labels .plabel-main {
  fill: #f3ead8;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .05em;
}
.profile-labels .plabel-sub {
  fill: rgba(243, 234, 216, .5);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .03em;
}
.profile-labels .plabel-water {
  fill: rgba(114, 170, 184, .88);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: .08em;
}

.profile-steps path { stroke: rgba(217, 184, 125, .45); stroke-width: 1; stroke-dasharray: 2 5; }
.profile-steps text {
  fill: #d9b87d;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: .13em;
}
.profile-peaks path {
  fill: none;
  stroke: rgba(243, 234, 216, .45);
  stroke-width: 1;
  stroke-linejoin: round;
}

.profile-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(243, 234, 216, .14);
  color: rgba(243, 234, 216, .6);
  font-size: 10px;
  line-height: 1.8;
}

.profile-foot p { max-width: 700px; }
.profile-foot p span {
  color: #d9b87d;
  margin-right: 8px;
  letter-spacing: .08em;
}
.profile-foot strong { color: rgba(243, 234, 216, .88); font-weight: 500; }
.profile-scale { color: rgba(243, 234, 216, .35); font-size: 8px; letter-spacing: .08em; white-space: nowrap; }

.stair-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.stair-card {
  position: relative;
  overflow: hidden;
  min-height: 226px;
  padding: 25px 24px 22px;
  background: rgba(250, 245, 234, .64);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent, var(--jade));
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s ease;
}

.stair-card:hover {
  transform: translateY(-4px);
  background: var(--card);
  box-shadow: 0 20px 40px -34px rgba(30, 43, 36, .5);
}

.stair-one { --accent: var(--terra); }
.stair-two { --accent: #c4a55f; }
.stair-three { --accent: var(--jade); }

.stair-num {
  position: absolute;
  right: 15px;
  bottom: -17px;
  color: var(--accent);
  opacity: .09;
  font-family: var(--serif);
  font-size: 112px;
  line-height: 1;
  pointer-events: none;
}

.stair-head { display: flex; flex-direction: column; gap: 4px; }
.stair-head span { color: var(--ink-soft); font-size: 10px; letter-spacing: .12em; }
.stair-head strong {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -.02em;
  font-weight: 700;
}

.stair-card p {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.8;
}

.stair-tags { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.stair-tags span {
  font-size: 9px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 3px 7px;
}

.mnemonic {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 24px;
  padding: 17px 20px;
  border-left: 2px solid var(--cinnabar);
  background: rgba(183, 75, 50, .055);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.8;
}

.mnemonic span {
  flex-shrink: 0;
  color: var(--cinnabar);
  font-size: 10px;
  letter-spacing: .12em;
  border: 1px solid rgba(183, 75, 50, .38);
  padding: 2px 6px;
  margin-top: 1px;
}

/* =========================================================
   BOUNDARIES
   ========================================================= */

.boundaries-section { background: #f6efe3; }

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.boundary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 322px;
  padding: 24px 23px 19px;
  background: rgba(250, 245, 234, .78);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent, var(--jade));
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s ease;
}

.boundary-card:hover {
  transform: translateY(-4px);
  background: var(--card);
  box-shadow: 0 22px 48px -40px rgba(30, 43, 36, .55);
}

.boundary-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.b-num {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 11px;
  letter-spacing: .07em;
}

.b-swatch {
  width: 43px;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px);
  opacity: .8;
}

.boundary-card h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.35;
}

.b-formula {
  margin-top: 9px;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: .015em;
}

.b-body {
  margin-top: 11px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.85;
}

.b-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.b-chips span {
  padding: 3px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}

.locate-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: auto;
  padding: 13px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .06em;
  text-align: left;
  transition: color .2s ease;
}

.locate-btn span { color: var(--accent); font-size: 13px; transition: transform .2s var(--ease); }
.locate-btn:hover { color: var(--accent); }
.locate-btn:hover span { transform: translate(2px, -2px); }

.card-highlight { background: #fbf0e5; }

.note-card {
  background: var(--ink);
  border-color: var(--ink);
  border-top-color: var(--cinnabar);
  color: #f4ebdb;
  justify-content: flex-start;
}

.note-card:hover { background: #24382e; }
.note-card .note-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(244, 235, 219, .35);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #d9b87d;
  font-family: Georgia, serif;
  font-size: 17px;
  margin-bottom: 20px;
}
.note-card h3 { font-size: 22px; color: #f7efdf; }
.note-card p { margin-top: 13px; color: rgba(244, 235, 219, .64); font-size: 12px; line-height: 1.9; }
.note-card strong { color: #f7efdf; font-weight: 500; }
.note-card .note-small {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(244, 235, 219, .16);
  color: rgba(244, 235, 219, .45);
  font-size: 9.5px;
}

.compare-card {
  margin-top: 28px;
  border: 1px solid var(--line);
  background: var(--card);
}

.compare-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 27px 28px 22px;
  border-bottom: 1px solid var(--line);
}

.compare-kicker {
  display: block;
  color: var(--cinnabar);
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: .2em;
  margin-bottom: 6px;
}

.compare-head h3 {
  font-family: var(--serif);
  font-size: clamp(23px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -.035em;
}

.compare-head p { max-width: 260px; color: var(--muted); font-size: 11px; line-height: 1.75; text-align: right; }
.compare-scroll { overflow-x: auto; }

.compare-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 12px;
}

.compare-table thead th {
  padding: 12px 20px;
  background: var(--jade-deep);
  color: #f4ebdb;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: .08em;
  text-align: left;
}

.compare-table thead th:first-child { color: rgba(244, 235, 219, .55); }

.compare-table tbody th,
.compare-table tbody td {
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.compare-table tbody th {
  width: 25%;
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
  background: rgba(233, 222, 204, .3);
}

.compare-table tbody td { color: var(--ink-soft); }
.compare-table tbody td:last-child { color: var(--jade); }
.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table tbody tr:hover td,
.compare-table tbody tr:hover th { background: rgba(217, 193, 141, .14); }

/* =========================================================
   MOUNTAINS
   ========================================================= */

.mountains-section { background: #f3ecdf; }

.mountain-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}

.mountain-card {
  grid-column: span 2;
  position: relative;
  min-height: 300px;
  padding: 25px 23px 20px;
  background: rgba(250, 245, 234, .45);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  transition: background .25s ease;
}

.mountain-card:nth-child(4),
.mountain-card:nth-child(5) { grid-column: span 3; }

.mountain-card:hover { background: rgba(250, 245, 234, .9); }

.m-orientation { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 24px; }

.m-orientation span {
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: .12em;
}

.orient-line {
  display: block;
  width: 52px;
  height: 10px;
  border-top: 1.5px solid var(--cinnabar);
  position: relative;
  opacity: .75;
}
.orient-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  border-left: 4px solid var(--cinnabar);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}
.orient-line.ne-sw { transform: rotate(-31deg); }
.orient-line.nw-se { transform: rotate(31deg); }
.orient-line.vertical { transform: rotate(90deg); }
.orient-line.arc {
  height: 21px;
  border-top: 0;
  border: 1.5px solid var(--cinnabar);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
}
.orient-line.arc::after { display: none; }

.mountain-card h3 {
  margin: 21px 0 18px;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.045em;
}

.m-list {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2.15;
  color: var(--ink-soft);
}

.mountain-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: inherit;
  border-bottom: 1px dotted rgba(30, 43, 36, .3);
  transition: color .2s ease, border-color .2s ease;
}
.mountain-link:hover { color: var(--cinnabar); border-bottom-color: var(--cinnabar); border-bottom-style: solid; }

.m-note {
  display: block;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: .02em;
  line-height: 1.7;
}

.skeleton-note {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 40px;
  align-items: center;
  margin-top: 36px;
  padding: clamp(28px, 4vw, 46px);
  background: var(--ink);
  color: #f4ebdb;
  overflow: hidden;
}

.skeleton-kicker {
  display: block;
  color: #d9b87d;
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: .2em;
  margin-bottom: 12px;
}

.skeleton-copy h3 {
  font-family: var(--serif);
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -.04em;
}

.skeleton-copy p {
  margin-top: 15px;
  max-width: 620px;
  color: rgba(244, 235, 219, .6);
  font-size: 12.5px;
  line-height: 1.95;
}

.skeleton-diagram {
  position: relative;
  height: 190px;
  border: 1px solid rgba(244, 235, 219, .16);
  background:
    linear-gradient(180deg, rgba(244, 235, 219, .03), rgba(244, 235, 219, .07)),
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(244, 235, 219, .05) 31px 32px);
}

.d-ridge {
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 1px;
  background: rgba(217, 184, 125, .7);
  transform: rotate(-7deg);
}
.d-ridge::before,
.d-ridge::after {
  content: "";
  position: absolute;
  top: -30px;
  border-left: 1px solid rgba(217, 184, 125, .4);
  border-right: 1px solid rgba(217, 184, 125, .4);
  transform: skew(-28deg);
}
.d-ridge::before { left: 28%; width: 46px; height: 34px; }
.d-ridge::after { right: 26%; width: 36px; height: 28px; }

.d-mountain {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  color: #d9b87d;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .1em;
  z-index: 2;
  background: var(--ink);
  padding: 0 8px;
}

.d-basin {
  position: absolute;
  color: rgba(244, 235, 219, .55);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: .06em;
}
.d-basin-a { left: 12%; top: 24%; }
.d-basin-b { right: 11%; bottom: 22%; }

/* =========================================================
   QUIZ
   ========================================================= */

.quiz-section {
  background:
    radial-gradient(circle at 88% 12%, rgba(217, 193, 141, .12), transparent 30%),
    var(--ink);
  color: #f4ebdb;
  border-top-color: rgba(244, 235, 219, .13);
}

.quiz-section .section-index { color: rgba(244, 235, 219, .52); }
.quiz-section .section-index span { color: #d9b87d; }
.quiz-section .section-index::after { background: rgba(244, 235, 219, .2); }
.quiz-section .section-title { color: #f4ebdb; }
.quiz-section .section-intro { color: rgba(244, 235, 219, .56); }

.quiz-shell {
  display: grid;
  grid-template-columns: 308px minmax(0, 1fr);
  min-height: 492px;
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 40px 90px -58px rgba(0, 0, 0, .7);
}

.quiz-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 37px 30px 27px;
  background: var(--jade-deep);
  color: #f4ebdb;
}

.quiz-aside::before {
  content: "测";
  position: absolute;
  right: -18px;
  bottom: -60px;
  font-family: var(--serif);
  font-size: 200px;
  line-height: 1;
  color: rgba(244, 235, 219, .055);
}

.quiz-kicker {
  color: #d9b87d;
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: .2em;
}

.quiz-score {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 23px;
  font-family: Georgia, serif;
}

.quiz-score strong {
  font-size: 80px;
  line-height: .9;
  font-weight: 400;
  letter-spacing: -.07em;
}

.quiz-score span { color: rgba(244, 235, 219, .4); font-size: 18px; }

.quiz-aside > p {
  margin-top: 17px;
  color: rgba(244, 235, 219, .5);
  font-size: 10px;
  letter-spacing: .08em;
}

.quiz-dots { display: flex; gap: 5px; margin-top: 26px; }
.quiz-dots i {
  display: block;
  width: 25px;
  height: 3px;
  background: rgba(244, 235, 219, .16);
  transition: background .3s ease;
}
.quiz-dots i.is-done { background: #d9b87d; }
.quiz-dots i.is-current { background: #f4ebdb; }

.quiz-aside-note {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(244, 235, 219, .16);
  color: rgba(244, 235, 219, .42);
  font-size: 9.5px;
  line-height: 1.8;
}

.quiz-aside-note span {
  display: block;
  color: #d9b87d;
  font-size: 8px;
  letter-spacing: .12em;
  margin-bottom: 5px;
}

.quiz-main { padding: 36px clamp(24px, 4vw, 52px) 32px; }

.quiz-tag {
  display: inline-block;
  color: var(--cinnabar);
  font-size: 9px;
  letter-spacing: .12em;
  border: 1px solid rgba(183, 75, 50, .25);
  padding: 3px 7px;
}

.quiz-progress-bar {
  height: 1px;
  margin: 17px 0 23px;
  background: var(--line);
}
.quiz-progress-bar i {
  display: block;
  width: 20%;
  height: 1px;
  background: var(--cinnabar);
  transition: width .4s var(--ease);
}

.quiz-main h3 {
  max-width: 700px;
  font-family: var(--serif);
  font-size: clamp(21px, 2.4vw, 30px);
  line-height: 1.48;
  letter-spacing: -.025em;
  font-weight: 700;
  min-height: 2.9em;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 23px;
}

.option {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--line);
  background: transparent;
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.option:hover:not(:disabled) { background: #f2e8d7; border-color: var(--line-strong); }

.opt-letter {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 10px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.option.is-correct { background: #e6eee1; border-color: #7c9a7b; }
.option.is-correct .opt-letter { background: #476b50; border-color: #476b50; color: #fff; }
.option.is-wrong { background: #f5dfd6; border-color: #c98270; }
.option.is-wrong .opt-letter { background: var(--cinnabar); border-color: var(--cinnabar); color: #fff; }
.option:disabled { cursor: default; }
.option.is-faded { opacity: .45; }

.quiz-feedback {
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  animation: feedbackIn .35s var(--ease);
}

@keyframes feedbackIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.feedback-title { color: var(--jade); font-family: var(--serif); font-size: 17px; font-weight: 700; }
.quiz-feedback.is-wrong .feedback-title { color: var(--cinnabar); }
.feedback-text { margin-top: 5px; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }

.feedback-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
}

.feedback-foot > span { color: var(--muted); font-size: 9px; letter-spacing: .04em; }

.quiz-next {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #f4ebdb;
  padding: 9px 14px;
  font-size: 10px;
  letter-spacing: .08em;
  transition: background .2s ease;
}
.quiz-next:hover { background: var(--jade); }
.quiz-next span { font-size: 13px; }

.quiz-result { padding: 8px 0 4px; }
.quiz-result .result-kicker {
  display: block;
  color: var(--cinnabar);
  font-size: 9px;
  letter-spacing: .16em;
  margin-bottom: 14px;
}
.quiz-result h3 { min-height: 0; }
.quiz-result p { max-width: 560px; margin-top: 13px; color: var(--ink-soft); font-size: 13px; line-height: 1.85; }
.quiz-result-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 26px;
  font-family: Georgia, serif;
}
.quiz-result-score strong { font-size: 64px; line-height: .9; font-weight: 400; color: var(--cinnabar); }
.quiz-result-score span { color: var(--muted); font-size: 13px; }
.quiz-result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
.quiz-retry {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #f4ebdb;
  padding: 10px 18px;
  font-size: 10px;
  letter-spacing: .07em;
}
.quiz-retry:hover { background: var(--jade); }
.quiz-review {
  border: 1px solid var(--line-strong);
  background: transparent;
  padding: 10px 18px;
  font-size: 10px;
  letter-spacing: .07em;
  color: var(--ink-soft);
}
.quiz-review:hover { border-color: var(--ink); }

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  padding: clamp(58px, 7vw, 86px) 0 25px;
  background: #e9decc;
  border-top: 1px solid var(--line-strong);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr .7fr .9fr .6fr;
  gap: clamp(28px, 4vw, 64px);
}

.footer-brand p {
  max-width: 380px;
  margin-top: 21px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.9;
}

.footer-col h4 {
  margin-bottom: 15px;
  color: var(--ink);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.footer-col p {
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.9;
  margin-bottom: 12px;
}

.footer-col .source-note { color: var(--muted); font-size: 9px; margin-top: 3px; }

.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.footer-links a {
  color: var(--ink-soft);
  font-size: 10.5px;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.footer-links a:hover { color: var(--cinnabar); border-color: var(--cinnabar); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: .06em;
}

/* =========================================================
   REVEAL
   ========================================================= */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1120px) {
  .atlas-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .map-panel { padding: 24px 21px 19px; }
  .map-panel h3 { font-size: 23px; }
  .boundary-grid { grid-template-columns: repeat(2, 1fr); }
  .note-card { grid-column: span 2; min-height: 220px; }
  .footer-grid { grid-template-columns: 1.4fr .8fr 1fr; }
  .footer-links { display: none; }
}

@media (max-width: 960px) {
  .header-inner { height: 66px; }
  .hero { min-height: 0; padding-top: 50px; }
  .hero-grid { grid-template-columns: 1fr; gap: 52px; }
  .hero-copy { max-width: 720px; }
  .hero h1 { font-size: clamp(65px, 14vw, 112px); }
  .hero-visual { justify-self: start; max-width: 560px; }
  .floating-note { left: auto; right: 14px; bottom: -22px; }
  .hero-foot { display: none; }

  .intro-hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .intro-hero-visual { justify-self: start; }
  .intro-section-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .intro-section-head > p { max-width: 620px; }

  .atlas-invite-inner { grid-template-columns: auto minmax(0, 1fr); }
  .atlas-invite-links { grid-column: 2; justify-self: start; }
  .atlas-invite-link { margin-top: 2px; }

  .atlas-page-head-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .atlas-page-copy { max-width: 620px; padding-bottom: 0; }

  .learn-intro-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .learn-intro-copy { max-width: 620px; }

  .profile-page-head-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .profile-page-copy { max-width: 620px; padding-bottom: 0; }
  .profile-reader-layout { grid-template-columns: 1fr; }
  .profile-chart-wrap { padding: 12px 10px 0; }
  .profile-chart-scroll { overflow-x: auto; scrollbar-width: thin; }
  .terrain-profile { width: 860px; max-width: none; }
  .profile-page .profile-scroll-hint { display: block; text-align: right; margin-top: 2px; }
  .profile-panel { border-left: 0; border-top: 1px solid var(--line); }
  .profile-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .profile-toolbar-note { padding-left: 2px; }
  .profile-hint-desktop { display: none; }
  .profile-hint-mobile { display: inline; }

  .section-head { grid-template-columns: 1fr; gap: 24px; }
  .section-intro { max-width: 620px; }

  .atlas-layout { grid-template-columns: 1fr; }
  .map-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr);
    column-gap: 32px;
    padding: 26px;
  }
  .panel-top { grid-column: 1 / -1; }
  .map-panel h3 { grid-column: 1; }
  .map-panel > p { grid-column: 1; }
  .panel-facts { grid-column: 2; grid-row: 2 / span 2; margin-top: 4px; }
  .panel-note { grid-column: 1 / -1; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
  .panel-actions { grid-column: 1 / -1; margin-top: 0; }

  .stair-cards { grid-template-columns: 1fr; }
  .stair-card { min-height: 0; }

  .mountain-grid { grid-template-columns: repeat(4, 1fr); }
  .mountain-card { grid-column: span 2; }
  .mountain-card:nth-child(4),
  .mountain-card:nth-child(5) { grid-column: span 2; }
  .mountain-card:last-child { grid-column: span 4; }

  .skeleton-note { grid-template-columns: 1fr; gap: 26px; }
  .skeleton-diagram { height: 160px; }

  .quiz-shell { grid-template-columns: 240px minmax(0, 1fr); }
  .quiz-aside { padding: 30px 24px 24px; }
  .quiz-score strong { font-size: 64px; }

  .footer-grid { grid-template-columns: 1.3fr 1fr; }
  .footer-col:nth-child(3) { grid-column: 1; }
  .footer-col:nth-child(4) { display: none; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 76px; }
  .hero::after { font-size: 160px; top: 28%; opacity: .65; }
  .hero h1 { font-size: clamp(58px, 17vw, 92px); margin-top: 22px; }
  .lede { font-size: 14.5px; line-height: 1.85; }
  .hero-actions { gap: 18px; }
  .hero-facts { gap: 12px; margin-top: 36px; }
  .hero-facts dt { font-size: 27px; }
  .hero-facts dd { font-size: 9.5px; }
  .terrain-card { transform: none; }
  .floating-note { position: relative; right: auto; bottom: auto; top: auto; margin: 18px 0 0 auto; transform: rotate(-1deg); width: fit-content; }

  .intro-hero { padding: 34px 0 42px; }
  .intro-hero h1 { font-size: clamp(54px, 16vw, 78px); margin-top: 16px; }
  .intro-subtitle { font-size: 20px; }
  .intro-lead { margin-top: 18px; font-size: 13.5px; line-height: 1.9; }
  .intro-actions { gap: 16px; margin-top: 22px; }
  .intro-steps { padding: 48px 0; }
  .intro-section-head { margin-bottom: 22px; }
  .intro-section-head > p { font-size: 11px; }
  .step-boundary { grid-template-columns: 1fr; }
  .step-boundary > div { padding: 14px 0; }
  .step-boundary > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .intro-footer .wrap { flex-direction: column; align-items: flex-start; gap: 5px; }

  .atlas-invite-inner { grid-template-columns: 1fr; gap: 13px; padding: 22px 0; }
  .atlas-invite-mark { width: 44px; height: 44px; }
  .atlas-invite-mark svg { width: 26px; height: 26px; }
  .atlas-invite-links { grid-column: auto; justify-self: start; }
  .atlas-invite-link { justify-self: start; margin-top: 3px; }

  .atlas-page-head { padding: 25px 0 19px; }
  .atlas-page-head h1 { font-size: clamp(33px, 9.7vw, 43px); }
  .atlas-breadcrumb { margin-bottom: 10px; }
  .atlas-page-copy > p { font-size: 11.5px; }
  .atlas-meta { margin-top: 11px; }
  .atlas-canvas { padding: 14px 0 34px; }

  .learn-intro { padding: 26px 0 24px; }
  .learn-intro h1 { font-size: clamp(32px, 9vw, 42px); }
  .learn-intro-copy > p { font-size: 11.5px; }
  .learn-intro + .section { padding-top: 55px; }

  .profile-page-head { padding: 25px 0 19px; }
  .profile-page-head h1 { font-size: clamp(35px, 10.2vw, 45px); }
  .profile-page-copy > p { font-size: 11.5px; }
  .profile-canvas-section { padding: 14px 0 34px; }
  .profile-chart-wrap { padding: 10px 4px 0; }
  .terrain-profile { width: 820px; }
  .profile-elevation-readout { display: none; }
  .profile-panel { padding: 22px 19px 17px; }
  .profile-route-cards { grid-template-columns: 1fr; }
  .profile-tips { grid-template-columns: 1fr; }
  .profile-tips > div { padding: 14px 0; }
  .profile-tips > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }

  .section { padding: 70px 0; }
  .section-title { font-size: clamp(34px, 9vw, 48px); }
  .section-head { margin-bottom: 32px; }

  .atlas-toolbar { align-items: flex-start; flex-direction: column; gap: 9px; padding: 11px; }
  .layer-switch { gap: 4px; }
  .layer-btn { padding: 6px 9px; font-size: 10px; }
  .toolbar-note { align-self: flex-end; }

  .map-scroll { overflow-x: auto; scrollbar-width: thin; }
  .china-map { width: 760px; max-width: none; }
  .map-legend { left: 10px; bottom: 9px; min-width: 98px; padding: 8px 9px; font-size: 8px; }
  .scs-inset { right: 9px; bottom: 9px; width: 82px; }
  .map-compass { top: 9px; right: 9px; width: 30px; }
  .map-compass svg { width: 24px; height: 24px; }
  .map-scroll-hint { display: block; }
  .map-tooltip { max-width: 180px; font-size: 10px; }

  .map-panel { display: flex; padding: 22px 19px 17px; }
  .map-panel h3 { font-size: 23px; margin-top: 16px; }
  .panel-facts { margin-top: 15px; }
  .panel-note { margin-top: 18px; }
  .panel-actions { margin-top: 9px; }

  .profile-card { padding-left: 16px; padding-right: 16px; }
  .terrain-facts { grid-template-columns: 1fr; }
  .terrain-facts > div { padding: 15px 0; }
  .terrain-facts > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .profile-head { flex-direction: column; gap: 10px; }
  .profile-key { display: none; }
  .profile-scroll { overflow-x: auto; scrollbar-width: thin; }
  .profile-scroll-hint { display: block; }
  .profile-art { width: 820px; max-width: none; }
  .profile-foot { flex-direction: column; gap: 8px; }
  .profile-scale { display: none; }

  .boundary-grid { grid-template-columns: 1fr; }
  .note-card { grid-column: span 1; }
  .boundary-card { min-height: 0; }
  .compare-head { align-items: flex-start; flex-direction: column; gap: 10px; padding: 22px 19px 18px; }
  .compare-head p { text-align: left; }

  .mountain-grid { grid-template-columns: 1fr; border-left: 0; }
  .mountain-card,
  .mountain-card:nth-child(4),
  .mountain-card:nth-child(5),
  .mountain-card:last-child { grid-column: span 1; min-height: 0; border-left: 1px solid var(--line-strong); }
  .mountain-card h3 { margin: 16px 0 12px; }

  .quiz-shell { grid-template-columns: 1fr; }
  .quiz-aside { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 20px; padding: 21px 22px; }
  .quiz-kicker { grid-column: 1; }
  .quiz-score { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .quiz-score strong { font-size: 52px; }
  .quiz-aside > p { grid-column: 1; margin-top: 2px; }
  .quiz-dots { grid-column: 1 / -1; margin-top: 15px; }
  .quiz-aside-note { display: none; }
  .quiz-main { padding: 25px 20px 26px; }
  .quiz-main h3 { font-size: 22px; min-height: 0; }
  .quiz-options { margin-top: 18px; }
  .option { font-size: 12.5px; }
  .feedback-foot { align-items: flex-start; flex-direction: column; gap: 12px; }
  .quiz-next { align-self: flex-end; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-col:nth-child(3) { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 35px; }
}

@media (max-width: 600px) {
  html { scroll-padding-top: 112px; }
  .header-inner {
    height: auto;
    min-height: 66px;
    padding: 10px 0 9px;
    flex-wrap: wrap;
    gap: 7px 16px;
  }
  .header-end { width: 100%; margin-left: 0; }
  .quick-nav { width: 100%; justify-content: flex-end; gap: 0; }
  .quick-nav a { padding: 0 7px; }
  .nav-divider { margin: 0 3px; }
}

@media (max-width: 430px) {
  .brand-copy strong { font-size: 18px; }
  .brand-copy small { font-size: 8px; }
  .eyebrow { font-size: 9px; gap: 9px; }
  .eyebrow::before { width: 20px; }
  .hero h1 { font-size: 56px; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .hero-facts div:last-child { grid-column: span 2; border-top: 1px solid var(--line); padding-top: 12px; }
  .hero-facts div:last-child dd { display: inline; margin-left: 6px; }
  .hero-actions .btn-primary { width: 100%; justify-content: space-between; }
  .terrain-legend { gap: 6px 10px; }
  .map-panel h3 { font-size: 21px; }
  .stair-head strong { font-size: 23px; }
  .b-formula { font-size: 12px; }
}
