:root {
  --blue: #002fa7;
  --blue-900: #001d66;
  --blue-700: #0646d8;
  --blue-100: #edf3ff;
  --cyan: #00a7c8;
  --mint: #18a77a;
  --amber: #f0a51a;
  --coral: #f0645a;
  --violet: #6b5dd3;
  --ink: #101522;
  --text: #2f3747;
  --muted: #6c7484;
  --line: #dfe4ec;
  --paper: #ffffff;
  --soft: #f5f7fb;
  --soft-2: #eef1f6;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--text);
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", "PingFang SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: var(--blue);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.brand {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: #fff;
  color: var(--blue);
  border-radius: var(--radius);
  font-weight: 900;
  padding: 4px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.03rem;
}

.brand small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: var(--radius);
  text-align: left;
  padding: 0 14px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.nav-item:hover,
.nav-item.is-active {
  background: #fff;
  color: var(--blue);
}

.nav-button {
  font-weight: 850;
}

.side-map {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    rgba(255, 255, 255, 0.07);
}

.side-map .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.side-route-map {
  display: grid;
  gap: 7px;
}

.side-route-step {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  text-align: left;
}

.side-route-step:hover {
  background: #fff;
  color: var(--blue);
}

.side-route-step span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.side-route-step:hover span {
  background: var(--blue);
  color: #fff;
}

.sidebar-block {
  margin-top: auto;
  display: grid;
  gap: 9px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.sidebar-block a {
  color: rgba(255, 255, 255, 0.88);
}

.sidebar-block a:hover {
  color: #fff;
}

.content {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 2.1rem;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 1.48rem;
  line-height: 1.25;
}

h3 {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.3;
}

.top-actions {
  flex: 0 1 420px;
}

.search-box {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 47, 167, 0.12);
}

.hero-band {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: stretch;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-900) 100%);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.hero-copy h2 {
  color: #fff;
  max-width: 720px;
  font-size: 2rem;
}

.hero-copy p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  margin: 16px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary-link,
.secondary-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 800;
}

.primary-link {
  background: #fff;
  color: var(--blue);
}

.secondary-link {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
}

.hero-visual {
  min-height: 100%;
  margin: 0;
  background: #f8fafc;
  padding: 28px;
  display: grid;
  place-items: center;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.drawn-cover {
  --accent: var(--blue);
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 190px;
  display: grid;
  align-content: end;
  gap: 8px;
  overflow: hidden;
  border: 3px solid var(--accent);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(0, 47, 167, 0.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.06) 1px, transparent 1px) 0 0 / 28px 28px,
    #f9fbff;
  color: var(--ink);
  padding: 22px;
  transform: rotate(-0.35deg);
}

.drawn-cover::before,
.drawn-cover::after {
  content: "";
  position: absolute;
  border: 3px solid var(--accent);
  border-radius: 50%;
  opacity: 0.18;
}

.drawn-cover::before {
  width: 180px;
  height: 180px;
  right: -50px;
  top: -42px;
}

.drawn-cover::after {
  width: 130px;
  height: 130px;
  left: -38px;
  bottom: -42px;
}

.cover-kicker,
.drawn-cover em,
.drawn-cover strong,
.cover-symbol,
.cover-caption {
  position: relative;
  z-index: 1;
}

.cover-kicker {
  width: max-content;
  border: 1px solid rgba(0, 47, 167, 0.24);
  border-radius: 999px;
  color: var(--accent);
  background: #fff;
  font-size: 0.75rem;
  font-weight: 950;
  padding: 3px 9px;
}

.drawn-cover strong {
  max-width: 90%;
  color: var(--ink);
  font-size: 1.42rem;
  line-height: 1.18;
}

.drawn-cover em {
  color: var(--accent);
  font-style: normal;
  font-weight: 850;
}

.cover-symbol {
  position: absolute;
  right: 20px;
  top: 54px;
  width: clamp(66px, 28%, 120px);
  aspect-ratio: 1;
  transform: rotate(-5deg);
  opacity: 0.9;
}

.cover-symbol svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(5px 5px 0 rgba(0, 47, 167, 0.1));
}

.cover-caption {
  width: max-content;
  color: #4f5d72;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 850;
  padding: 2px 8px;
}

.cover-sketch {
  position: absolute;
  inset: 26px 28px 92px;
  z-index: 0;
}

.cover-sketch::before {
  content: "";
  position: absolute;
  left: 4%;
  right: 3%;
  top: 58%;
  border-top: 5px solid var(--accent);
  border-radius: 50%;
  transform: rotate(-5deg);
}

.cover-sketch span {
  position: absolute;
  width: 58px;
  height: 42px;
  border: 3px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  box-shadow: 6px 6px 0 rgba(0, 47, 167, 0.12);
}

.cover-stage-foundation {
  --accent: #002fa7;
}

.cover-stage-static {
  --accent: #0646d8;
}

.cover-stage-dynamic {
  --accent: #254f91;
}

.cover-stage-information {
  --accent: #345f7c;
}

.cover-stage-advanced {
  --accent: #193c73;
}

.cover-stage-applications {
  --accent: #315a95;
}

.sketch-2::before {
  top: 46%;
  transform: rotate(7deg);
}

.sketch-2 span {
  border-radius: 50%;
}

.sketch-3::before {
  left: 18%;
  right: 18%;
  top: 44%;
  transform: rotate(0deg);
}

.sketch-3 span:nth-child(2),
.sketch-3 span:nth-child(4) {
  height: 76px;
  width: 34px;
}

.sketch-4::before {
  top: 70%;
  border-top-style: dashed;
  transform: rotate(-10deg);
}

.sketch-4 span {
  border-radius: 50% 50% 8px 8px;
}

.sketch-5 span:nth-child(1),
.sketch-5 span:nth-child(3) {
  width: 86px;
  height: 30px;
}

.sketch-5 span:nth-child(2),
.sketch-5 span:nth-child(4) {
  border-radius: 999px;
}

.sketch-6::before {
  top: 38%;
  transform: rotate(14deg);
}

.sketch-6 span {
  width: 46px;
  height: 46px;
  transform: rotate(45deg);
}

.cover-sketch span:nth-child(1) {
  left: 7%;
  top: 18%;
  transform: rotate(-8deg);
}

.cover-sketch span:nth-child(2) {
  left: 34%;
  top: 42%;
  transform: rotate(5deg);
}

.cover-sketch span:nth-child(3) {
  left: 61%;
  top: 22%;
  transform: rotate(-3deg);
}

.cover-sketch span:nth-child(4) {
  right: 4%;
  top: 55%;
  transform: rotate(8deg);
}

.hero-drawn-cover {
  min-height: 300px;
}

.hero-drawn-cover strong {
  font-size: 2rem;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 28px;
}

.metric {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 16px;
  display: grid;
  align-content: center;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.metric span {
  color: var(--blue);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.metric strong {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 30px 0 14px;
  scroll-margin-top: 24px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 10px;
}

.segmented-control {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(74px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.stage-filter {
  grid-template-columns: repeat(7, minmax(56px, 1fr));
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented-control button.is-selected {
  background: var(--blue);
  color: #fff;
}

.lecture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 16px;
}

.lecture-grid.is-compact {
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
}

.lecture-card,
.sandbox-card,
.route-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.lecture-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lecture-thumb {
  aspect-ratio: 16 / 10;
  background: var(--blue-100);
  overflow: hidden;
  padding: 10px;
}

.lecture-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.lecture-body {
  min-width: 0;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.lecture-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.stage-pill {
  max-width: 100%;
  border: 1px solid #cfd8e7;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue);
  padding: 2px 8px;
  white-space: nowrap;
}

.lecture-title {
  min-height: 2.65em;
  margin: 0;
}

.lecture-desc {
  min-height: 4.8em;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.lecture-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 42px;
  gap: 8px;
  margin-top: 2px;
}

.lecture-actions a,
.progress-toggle {
  min-height: 40px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 850;
  font-size: 0.86rem;
}

.lecture-actions a:first-child {
  background: var(--blue);
  color: #fff;
}

.lecture-actions a:nth-child(2) {
  border: 1px solid var(--line);
  color: var(--blue);
  background: #fff;
}

.progress-toggle {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
}

.progress-toggle.is-done {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.sandbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.compact-resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.resource-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.resource-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--blue-100);
  overflow: hidden;
}

.resource-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.resource-body {
  padding: 15px;
}

.resource-card.is-pdf {
  background:
    linear-gradient(135deg, rgba(0, 47, 167, 0.055), transparent 44%),
    #fff;
}

.resource-badge {
  width: max-content;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0 8px;
}

.resource-body h3 {
  margin-bottom: 8px;
}

.resource-body p {
  min-height: 3.2em;
  color: var(--muted);
  font-size: 0.92rem;
}

.resource-body a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-weight: 850;
  padding: 0 13px;
}

.sandbox-card {
  padding: 18px;
  display: grid;
  gap: 10px;
  border-top: 5px solid var(--blue);
}

.sandbox-card p {
  margin: 0;
  color: var(--muted);
}

.sandbox-card a {
  color: var(--blue);
  font-weight: 900;
}

.game-card {
  align-content: start;
}

.game-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.game-card-head button,
.game-run {
  min-height: 34px;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue);
  font-weight: 850;
  padding: 0 10px;
}

.game-run {
  background: var(--blue);
  color: #fff;
}

.game-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.game-field input,
.game-field select {
  min-height: 36px;
  accent-color: var(--blue);
}

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

.game-toggle button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-weight: 850;
}

.game-toggle button.is-selected {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.game-result {
  min-height: 126px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #f8fbff;
  padding: 12px;
}

.score-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--ink);
}

.score-line span {
  color: var(--blue);
  font-weight: 950;
}

.mini-bars {
  display: grid;
  gap: 6px;
  margin: 8px 0;
}

.mini-bars span {
  min-height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0, 47, 167, 0.24) calc(var(--v) * 100%), #fff calc(var(--v) * 100%));
  border: 1px solid #d7e0ef;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 2px 8px;
}

.vote-axis {
  position: relative;
  height: 54px;
  margin: 12px 0;
  border-bottom: 3px solid var(--blue);
}

.vote-axis i,
.vote-axis b {
  position: absolute;
  bottom: -7px;
  transform: translateX(-50%);
}

.vote-axis i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8aa2cf;
}

.vote-axis b {
  bottom: 12px;
  min-width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 0.8rem;
}

.learning-map {
  margin-bottom: 30px;
}

.route-map {
  position: relative;
  min-height: 410px;
  padding: 22px;
  border: 2px solid rgba(0, 47, 167, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(0, 47, 167, 0.05) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.05) 1px, transparent 1px) 0 0 / 34px 34px,
    #fff;
  overflow: hidden;
}

.route-doodle {
  position: absolute;
  inset: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  pointer-events: none;
}

.route-node {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  z-index: 2;
  width: 112px;
  min-height: 72px;
  transform: translate(-50%, -50%) rotate(-1deg);
  border: 1px solid var(--line);
  text-align: left;
  padding: 9px;
  display: grid;
  gap: 5px;
  align-content: start;
  cursor: pointer;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 6px 6px 0 rgba(0, 47, 167, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.route-node:hover {
  transform: translate(-50%, -54%) rotate(0.8deg);
  border-color: var(--blue);
  box-shadow: 0 18px 38px rgba(0, 47, 167, 0.16);
}

.route-node.is-done {
  background: #eef5ff;
  border-color: var(--blue);
}

.route-node span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.route-node strong {
  margin: 0;
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.12;
}

.route-map-large {
  min-height: min(680px, 72vh);
}

.route-map-large .route-node {
  width: 136px;
  min-height: 82px;
}

.route-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(10, 17, 34, 0.52);
  padding: 28px;
  display: grid;
  place-items: center;
}

.route-overlay[hidden] {
  display: none;
}

.route-overlay-panel {
  width: min(1120px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  padding: 22px;
}

.route-overlay-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue);
  font-size: 1.7rem;
  line-height: 1;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed #bac4d4;
  border-radius: var(--radius);
  color: var(--muted);
  background: #fff;
}

@media (max-width: 1080px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .sidebar-block {
    margin-top: 0;
  }

  .hero-band {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 260px;
  }

  .route-map {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 18px;
  }

  .topbar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-row {
    justify-content: stretch;
  }

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

  .top-actions {
    flex-basis: auto;
  }

  .hero-copy {
    padding: 26px;
  }

  .hero-copy h2 {
    font-size: 1.52rem;
  }

  .metric-row {
    grid-template-columns: 1fr 1fr;
  }

  .route-map {
    min-height: 520px;
    padding: 12px;
  }

  .route-node {
    width: 86px;
    min-height: 62px;
    padding: 7px;
  }

  .route-node strong {
    font-size: 0.68rem;
  }

  .route-node span {
    width: 26px;
    height: 26px;
  }

  .lecture-actions {
    grid-template-columns: 1fr;
  }

  .progress-toggle {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .metric-row {
    grid-template-columns: 1fr;
  }

  .route-map {
    min-height: 620px;
  }

  .route-node {
    width: 72px;
    min-height: 54px;
  }

  .route-node strong {
    display: none;
  }
}

.reader-page {
  background: #f3f5f9;
}

.reader-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.reader-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 18px;
  background: var(--blue);
  color: #fff;
}

.reader-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 22px 0;
}

.reader-home {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  color: #fff;
  font-weight: 850;
  font-size: 0.88rem;
}

.reader-home:hover {
  background: #fff;
  color: var(--blue);
}

.toc {
  display: grid;
  gap: 4px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.toc a {
  display: block;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
  padding: 7px 9px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.toc a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.toc .toc-h3 {
  padding-left: 22px;
  font-size: 0.8rem;
}

.reader-main {
  min-width: 0;
  padding: 30px;
}

.reader-status {
  max-width: 960px;
  margin: 0 auto 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  padding: 14px 16px;
}

.interactive-panel {
  max-width: 980px;
  margin: 0 auto 18px;
  border: 1px solid rgba(0, 47, 167, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 47, 167, 0.08), rgba(255, 255, 255, 0.95)),
    #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  padding: 16px;
}

.interactive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.interactive-head span {
  color: var(--blue);
  font-weight: 950;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.interactive-head button {
  min-height: 34px;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-weight: 850;
  padding: 0 12px;
}

.interactive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.flip-card {
  min-height: 104px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 13px;
  text-align: left;
  display: grid;
  gap: 8px;
  align-content: start;
}

.flip-card strong {
  color: var(--blue);
}

.flip-card span {
  color: transparent;
  text-shadow: 0 0 9px rgba(47, 55, 71, 0.55);
  transition: color 160ms ease, text-shadow 160ms ease;
}

.flip-card.is-open span {
  color: var(--text);
  text-shadow: none;
}

.doc-content {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 34px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.82;
}

.doc-content h1 {
  padding-bottom: 14px;
  border-bottom: 2px solid var(--blue);
}

.doc-content h2 {
  margin-top: 42px;
  padding: 10px 0 10px 14px;
  border-left: 5px solid var(--blue);
  background: linear-gradient(90deg, var(--blue-100), transparent);
  border-radius: 6px;
}

.doc-content h3 {
  margin-top: 28px;
}

.doc-content a {
  color: var(--blue);
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.doc-content img {
  max-width: min(100%, 860px);
  max-height: 720px;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.doc-figure {
  margin: 22px auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.doc-content blockquote {
  margin: 18px 0;
  border-left: 4px solid #b6c4d8;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: #f7f9fc;
  padding: 12px 16px;
}

.callout,
.callout-card,
.detail-card {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.callout-card-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 13px;
  margin: 18px 0;
  padding: 14px;
  border: 1px dashed rgba(0, 47, 167, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(0, 47, 167, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    #fff;
}

.callout-card-group > .callout-card {
  margin: 0;
}

.callout-title,
.detail-title {
  padding: 12px 15px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.callout-card > .callout-title,
.detail-card > .detail-title {
  width: 100%;
  min-height: 48px;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  cursor: pointer;
}

.callout-title i,
.detail-title i {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  font-size: 0.76rem;
  font-style: normal;
  padding: 2px 8px;
}

.callout-content,
.detail-content {
  padding: 14px 15px;
}

.callout-content > :first-child,
.detail-content > :first-child {
  margin-top: 0;
}

.callout-content > :last-child,
.detail-content > :last-child {
  margin-bottom: 0;
}

.detail-card {
  border-color: #c7d4e7;
  background: linear-gradient(180deg, #ffffff, #f9fbff);
}

.detail-card > .detail-title {
  background: #506176;
}

.callout-abstract .callout-content:has(> .callout-card),
.callout-abstract .callout-content:has(> .callout) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  background:
    linear-gradient(90deg, rgba(0, 47, 167, 0.05) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.05) 1px, transparent 1px) 0 0 / 28px 28px;
  border-radius: var(--radius);
}

.callout-abstract .callout-content > .callout,
.callout-abstract .callout-content > .callout-card {
  margin: 0;
  transform: rotate(-0.25deg);
}

.callout-abstract .callout-content > .callout:nth-child(even),
.callout-abstract .callout-content > .callout-card:nth-child(even) {
  transform: rotate(0.35deg);
}

.callout-example .callout-title {
  background: #214d86;
}

.callout-tip .callout-title {
  background: #526173;
}

.callout-note .callout-title {
  background: #2e6db4;
}

.math-display {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid #cfd8e7;
  border-radius: var(--radius);
  background: #f8fbff;
  color: #172033;
  padding: 14px 16px;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 1.08rem;
  text-align: center;
  scrollbar-color: rgba(0, 47, 167, 0.36) transparent;
}

.math-rendered {
  width: max-content;
  min-width: 100%;
  line-height: 1.9;
  display: flex;
  justify-content: center;
  align-items: center;
}

.doc-content mjx-container {
  font-family: "Times New Roman", "Cambria Math", serif !important;
}

.math-display mjx-container[jax="CHTML"][display="true"] {
  margin: 0 !important;
  max-width: none;
}

.equation-line {
  width: max-content;
  max-width: 100%;
  text-align: center;
}

.math-operator {
  display: inline-grid;
  grid-template-rows: auto auto;
  justify-items: center;
  align-items: center;
  margin: 0 0.12em;
  vertical-align: middle;
  line-height: 1.05;
}

.math-operator > span {
  font-style: normal;
}

.math-operator > sub {
  font-size: 0.68em;
  line-height: 1;
}

.math-cal {
  font-family: "Times New Roman", "Cambria Math", serif;
  font-style: italic;
  letter-spacing: 0.02em;
}

.math-overline,
.math-underline,
.math-hat,
.math-tilde,
.math-dot {
  display: inline-block;
  position: relative;
  line-height: 1.15;
}

.math-overline {
  text-decoration: overline;
}

.math-underline {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.math-hat::before {
  content: "^";
  position: absolute;
  left: 50%;
  top: -0.82em;
  transform: translateX(-50%);
  font-size: 0.8em;
}

.math-tilde::before {
  content: "~";
  position: absolute;
  left: 50%;
  top: -0.78em;
  transform: translateX(-50%);
  font-size: 0.9em;
}

.math-dot::before {
  content: ".";
  position: absolute;
  left: 50%;
  top: -0.78em;
  transform: translateX(-50%);
  font-size: 0.95em;
}

.math-source {
  margin-top: 10px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.82rem;
  color: var(--muted);
}

.math-source summary {
  cursor: pointer;
  font-weight: 800;
}

.math-inline {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #172033;
  padding: 0;
  font-family: "Times New Roman", "Cambria Math", serif;
  font-size: 0.96em;
  white-space: nowrap;
}

.math-inline mjx-container {
  margin: 0 0.08em !important;
}

.math-array {
  width: auto;
  margin: 0 auto;
  border-collapse: collapse;
  font-family: "Times New Roman", "Cambria Math", serif;
}

.math-array td {
  border: 0;
  padding: 0.25rem 0.7rem;
  text-align: center;
}

.fraction {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  margin: 0 0.18em;
  vertical-align: middle;
  line-height: 1.08;
}

.fraction > span:first-child {
  border-bottom: 1.6px solid currentColor;
  padding: 0 0.22em 0.08em;
}

.fraction > span:last-child {
  padding: 0.08em 0.22em 0;
}

.sqrt {
  display: inline-flex;
  align-items: baseline;
  gap: 0.08em;
}

.sqrt > span {
  border-top: 1.4px solid currentColor;
  padding-left: 0.1em;
}

.code-block {
  overflow-x: auto;
  border: 1px solid #d7dee9;
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 14px 16px;
}

/* Enhanced infographic site layer */
body {
  background:
    linear-gradient(90deg, rgba(0, 47, 167, 0.035) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.035) 1px, transparent 1px) 0 0 / 36px 36px,
    #f3f6fb;
}

.brand-mark-inline {
  padding: 0;
  overflow: hidden;
}

.sidebar {
  background:
    linear-gradient(180deg, #002fa7 0%, #001d66 100%);
}

.hero-band {
  background:
    linear-gradient(120deg, rgba(0, 47, 167, 0.98), rgba(0, 167, 200, 0.92)),
    linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px) 0 0 / 42px 42px;
}

.hero-visual {
  background:
    linear-gradient(90deg, rgba(0, 47, 167, 0.08) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.08) 1px, transparent 1px) 0 0 / 30px 30px,
    #f8fbff;
}

.section-head {
  border-top: 1px solid rgba(0, 47, 167, 0.08);
  padding-top: 22px;
}

.lecture-card,
.resource-card,
.sandbox-card {
  border-color: rgba(0, 47, 167, 0.14);
  box-shadow: 0 16px 34px rgba(20, 38, 72, 0.09);
}

.arcade-card {
  position: relative;
  min-height: 332px;
  overflow: hidden;
  border-top: 0;
  background:
    linear-gradient(135deg, rgba(0, 47, 167, 0.08), transparent 42%),
    #fff;
}

.arcade-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 47, 167, 0.055) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.055) 1px, transparent 1px) 0 0 / 22px 22px;
  pointer-events: none;
}

.game-difficulty {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.game-poster {
  position: relative;
  z-index: 1;
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 47, 167, 0.16);
  border-radius: var(--radius);
  background: #f8fbff;
}

.game-poster svg {
  width: 96px;
  height: 96px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.game-poster span {
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: rgba(0, 47, 167, 0.24);
  font-size: 2.2rem;
  font-weight: 950;
}

.game-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.game-copy h3 {
  margin: 0;
}

.game-play {
  position: relative;
  z-index: 1;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.route-map {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.route-infographic-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid rgba(0, 47, 167, 0.14);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 26px rgba(20, 38, 72, 0.07);
}

.route-infographic-head h3 {
  margin: 4px 0 0;
}

.route-key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.route-key span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mint);
}

.route-ribbon {
  width: 100%;
  height: 72px;
  margin: -2px 0 -24px;
}

.route-ribbon path:first-child {
  fill: none;
  stroke: rgba(0, 47, 167, 0.28);
  stroke-width: 10;
  stroke-linecap: round;
}

.route-ribbon path:last-child {
  fill: none;
  stroke: rgba(240, 165, 26, 0.38);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 12 12;
}

.route-stage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.route-stage-grid.is-large {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.route-stage-card {
  min-height: 310px;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr auto;
  gap: 10px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 47, 167, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(0, 47, 167, 0.075), transparent 52%),
    #fff;
  box-shadow: 0 16px 34px rgba(20, 38, 72, 0.09);
  padding: 18px;
}

.route-stage-card::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -32px;
  width: 116px;
  height: 116px;
  border: 14px solid rgba(0, 47, 167, 0.12);
  border-radius: 28px;
  transform: rotate(18deg);
}

.route-accent-blue { --accent: var(--blue); }
.route-accent-cyan { --accent: var(--cyan); }
.route-accent-violet { --accent: var(--violet); }
.route-accent-amber { --accent: var(--amber); }
.route-accent-mint { --accent: var(--mint); }
.route-accent-coral { --accent: var(--coral); }

.route-stage-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.route-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 950;
}

.route-week {
  color: var(--accent);
  font-weight: 950;
}

.route-stage-card h4 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
}

.route-stage-card p,
.route-stage-card strong {
  position: relative;
  z-index: 1;
  margin: 0;
}

.route-stage-card p {
  color: var(--muted);
}

.route-stage-card strong {
  color: #263247;
}

.route-progress {
  position: relative;
  z-index: 1;
  height: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.route-progress span {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--p), #e6edf7 var(--p));
}

.route-progress em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.route-chip-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.route-chip {
  min-height: 32px;
  border: 1px solid rgba(0, 47, 167, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0 10px;
}

.route-chip.is-done {
  background: var(--mint);
  border-color: var(--mint);
  color: #fff;
}

.side-route-step {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.side-route-step small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
  font-weight: 850;
}

.side-route-step:hover small {
  color: var(--blue);
}

.game-page {
  background:
    linear-gradient(90deg, rgba(0, 47, 167, 0.045) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.045) 1px, transparent 1px) 0 0 / 38px 38px,
    #f4f7fb;
}

.game-page[data-accent="blue"] { --accent: var(--blue); }
.game-page[data-accent="cyan"] { --accent: var(--cyan); }
.game-page[data-accent="mint"] { --accent: var(--mint); }
.game-page[data-accent="amber"] { --accent: var(--amber); }
.game-page[data-accent="coral"] { --accent: var(--coral); }
.game-page[data-accent="violet"] { --accent: var(--violet); }

.game-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
}

.game-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 24px 18px;
  background: #001d66;
  color: #fff;
  display: grid;
  align-content: start;
  gap: 22px;
}

.game-brand {
  color: #fff;
}

.game-list {
  display: grid;
  gap: 9px;
}

.game-list a {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.game-list a.is-active,
.game-list a:hover {
  background: #fff;
  color: var(--blue);
}

.game-list span {
  font-size: 0.72rem;
  font-weight: 900;
  opacity: 0.7;
}

.game-main {
  padding: 28px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.game-hero {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: stretch;
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, var(--blue), var(--accent, var(--cyan)));
  color: #fff;
  padding: 30px;
  box-shadow: var(--shadow);
}

.game-hero h1 {
  color: #fff;
  margin-bottom: 8px;
}

.game-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255,255,255,.82);
}

.game-score-card {
  min-width: 140px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  background: rgba(255,255,255,.12);
}

.game-score-card span {
  font-size: 2.8rem;
  font-weight: 950;
  line-height: 1;
}

.play-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.control-panel,
.arena-panel {
  border: 1px solid rgba(0, 47, 167, 0.14);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 16px 34px rgba(20, 38, 72, 0.09);
  padding: 18px;
}

.control-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.control-panel h2 {
  margin: 0;
}

.arcade-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
}

.arcade-field em {
  justify-self: end;
  color: var(--blue);
  font-style: normal;
}

.arcade-field input {
  width: 100%;
  accent-color: var(--accent, var(--blue));
}

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

.arcade-buttons button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-weight: 850;
}

.arcade-buttons button.is-selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.arena-panel {
  min-height: 520px;
  display: grid;
  gap: 16px;
  align-content: start;
}

.result-panel {
  border-radius: var(--radius);
  background: #f8fbff;
  border: 1px dashed #cbd5e1;
  padding: 14px;
}

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

.tournament-grid article,
.matching-board span,
.pool-arena span {
  border: 1px solid rgba(0, 47, 167, 0.14);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
}

.tournament-grid article span {
  display: block;
  color: var(--blue);
  font-size: 2rem;
  font-weight: 950;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: #e8eef8;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--accent, var(--blue));
}

.matching-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.matching-board span {
  text-align: center;
  color: var(--blue);
  font-size: 1.7rem;
  font-weight: 950;
}

.step-log {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.curve-arena {
  width: 100%;
  min-height: 300px;
}

.curve-arena path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 4;
  stroke-linecap: round;
}

.curve-arena path:nth-child(2) {
  stroke: var(--coral);
}

.curve-arena path:nth-child(3) {
  stroke: var(--cyan);
}

.curve-arena circle {
  fill: var(--amber);
  stroke: #fff;
  stroke-width: 4;
}

.bid-track,
.vote-axis.big {
  position: relative;
  min-height: 150px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(0,47,167,.08) 1px, transparent 1px) 0 0 / 10% 100%,
    #f8fbff;
  border: 1px solid var(--line);
}

.bid-track::before,
.vote-axis.big::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  background: var(--blue);
}

.bid-track span,
.vote-axis.big b,
.vote-axis.big i {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.bid-track span {
  min-width: 44px;
  min-height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--line);
  font-weight: 900;
}

.bid-track span.you {
  background: var(--amber);
  border-color: var(--amber);
  color: #fff;
}

.tree-arena {
  min-height: 300px;
  display: grid;
  grid-template-columns: 1fr 80px 1fr 80px 1fr;
  align-items: center;
}

.tree-arena span {
  min-height: 90px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #f8fbff;
  border: 2px solid rgba(0,47,167,.18);
  color: var(--blue);
  font-weight: 950;
}

.tree-arena i {
  height: 4px;
  background: var(--blue);
}

.pool-arena {
  min-height: 300px;
  display: flex;
  align-items: end;
  gap: 18px;
  padding: 20px;
  border-radius: var(--radius);
  background: #f8fbff;
}

.pool-arena span {
  flex: 1;
  display: grid;
  place-items: end center;
  color: #fff;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.signal-arena {
  min-height: 300px;
  display: grid;
  place-items: center;
  gap: 14px;
  border-radius: var(--radius);
  background: #f8fbff;
}

.signal-arena span {
  width: 80px;
  min-height: 18px;
  align-self: end;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--mint), var(--blue));
}

.signal-arena b {
  color: var(--blue);
  font-size: 2rem;
}

.coord-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.coord-grid span {
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: #e8eef8;
  border: 1px solid var(--line);
}

.coord-grid span.on {
  background: var(--mint);
  border-color: var(--mint);
}

.split-bar {
  min-height: 170px;
  display: flex;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.split-bar span {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 950;
}

.split-bar span:first-child {
  background: var(--blue);
}

.split-bar span:last-child {
  background: var(--coral);
}

@media (max-width: 1080px) {
  .route-stage-grid,
  .route-stage-grid.is-large,
  .play-layout,
  .game-shell {
    grid-template-columns: 1fr;
  }

  .game-sidebar {
    position: static;
    height: auto;
  }

  .game-list {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

@media (max-width: 760px) {
  .route-stage-grid {
    grid-template-columns: 1fr;
  }

  .game-hero,
  .route-infographic-head {
    flex-direction: column;
    align-items: stretch;
  }

  .tournament-grid,
  .matching-board {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  overflow-x: auto;
  margin: 18px 0;
}

.doc-content table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.doc-content th,
.doc-content td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  vertical-align: top;
}

.doc-content th {
  background: var(--blue-100);
  color: var(--ink);
}

.missing-link {
  color: #8a95a8;
  text-decoration: underline dotted;
}

@media (max-width: 1020px) {
  .reader-shell {
    grid-template-columns: 1fr;
  }

  .reader-sidebar {
    position: static;
    height: auto;
  }

  .toc {
    display: none;
  }
}

@media (max-width: 700px) {
  .reader-main {
    padding: 16px;
  }

  .doc-content {
    padding: 20px;
    font-size: 16px;
  }

  .interactive-grid {
    grid-template-columns: 1fr;
  }
}

/* Final visual polish layer */
.site-shell {
  background:
    linear-gradient(90deg, rgba(0, 47, 167, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.035) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(180deg, #f8fbff 0%, #eef3fb 100%);
}

.sidebar {
  background:
    linear-gradient(180deg, #002fa7 0%, #001f73 58%, #101522 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 18px 0 40px rgba(0, 29, 102, 0.18);
}

.brand {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.brand-mark {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.nav-item,
.side-route-step,
.sidebar-block {
  backdrop-filter: blur(10px);
}

.nav-item {
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: var(--cyan);
  opacity: 0;
  margin-right: 8px;
  transition: opacity .18s ease;
}

.nav-item:hover::before,
.nav-item.is-active::before {
  opacity: 1;
}

.content {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(245, 249, 255, 0.92)),
    linear-gradient(90deg, rgba(0, 47, 167, 0.035) 1px, transparent 1px) 0 0 / 28px 28px;
}

.topbar {
  border: 1px solid rgba(0, 47, 167, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 28px rgba(20, 38, 72, 0.08);
  padding: 18px;
}

.search-box {
  border: 1px solid rgba(0, 47, 167, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.hero-band {
  position: relative;
  border: 1px solid rgba(0, 47, 167, 0.2);
  background:
    linear-gradient(135deg, rgba(0, 47, 167, 0.98) 0%, rgba(0, 31, 115, 0.98) 55%, rgba(16, 21, 34, 0.98) 100%);
}

.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 24px 24px;
  pointer-events: none;
}

.hero-copy,
.hero-visual {
  position: relative;
  z-index: 1;
}

.hero-copy h2 {
  max-width: 760px;
  text-wrap: balance;
}

.hero-visual {
  background:
    linear-gradient(135deg, #f9fbff, #eaf2ff);
  border-left: 1px solid rgba(255, 255, 255, 0.36);
}

.section-head {
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(0, 47, 167, 0.12);
}

.section-head h2 {
  text-wrap: balance;
}

.lecture-card,
.sandbox-card,
.resource-card,
.case-card,
.route-stage-card {
  border: 1px solid rgba(0, 47, 167, 0.15);
  box-shadow: 0 16px 34px rgba(20, 38, 72, 0.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.lecture-card:hover,
.sandbox-card:hover,
.resource-card:hover,
.case-card:hover,
.route-stage-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 47, 167, 0.34);
  box-shadow: 0 24px 44px rgba(20, 38, 72, 0.13);
}

.drawn-cover {
  min-height: 224px;
  align-content: stretch;
  gap: 0;
  padding: 16px;
  border: 1px solid rgba(0, 47, 167, 0.24);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(232, 242, 255, 0.92)),
    linear-gradient(90deg, rgba(0, 47, 167, 0.08) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.06) 1px, transparent 1px) 0 0 / 24px 24px;
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.72),
    0 16px 30px rgba(0, 47, 167, 0.14);
  transform: none;
}

.drawn-cover::before,
.drawn-cover::after {
  border-radius: 8px;
  border-width: 2px;
  opacity: 0.16;
  transform: rotate(-12deg);
}

.drawn-cover::before {
  width: 154px;
  height: 94px;
  right: -44px;
  top: 46px;
}

.drawn-cover::after {
  width: 110px;
  height: 66px;
  left: -34px;
  bottom: 28px;
  transform: rotate(14deg);
}

.cover-topline,
.cover-copy,
.cover-mini-panel,
.cover-index {
  position: relative;
  z-index: 2;
}

.cover-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.cover-kicker,
.cover-stage-label {
  width: auto;
  border-radius: 999px;
  border: 1px solid rgba(0, 47, 167, 0.18);
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 950;
  padding: 4px 9px;
  line-height: 1.2;
}

.cover-stage-label {
  color: #526176;
}

.cover-copy {
  align-self: end;
  display: grid;
  gap: 3px;
  max-width: 68%;
  margin-top: auto;
}

.drawn-cover strong {
  max-width: 100%;
  font-size: 1.44rem;
  letter-spacing: 0;
}

.drawn-cover em {
  color: #40506a;
  font-size: 0.88rem;
}

.cover-symbol {
  right: 16px;
  top: 58px;
  width: clamp(82px, 30%, 126px);
  padding: 12px;
  border-radius: var(--radius);
  border: 2px solid rgba(0, 47, 167, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(237, 243, 255, 0.92));
  box-shadow: 0 10px 22px rgba(0, 47, 167, 0.12);
  transform: rotate(-3deg);
}

.cover-mini-panel {
  align-self: end;
  display: grid;
  gap: 2px;
  width: min(62%, 260px);
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 47, 167, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.cover-mini-panel span {
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 950;
}

.cover-mini-panel b {
  color: var(--ink);
  font-size: 1rem;
  font-family: "Times New Roman", "Cambria Math", serif;
}

.cover-mini-panel small {
  color: #526176;
  font-size: 0.74rem;
  font-weight: 800;
}

.cover-caption {
  position: absolute;
  right: 16px;
  bottom: 14px;
  letter-spacing: 0;
}

.cover-index {
  position: absolute;
  right: 14px;
  bottom: 24px;
  color: rgba(0, 47, 167, 0.08);
  font-size: clamp(4rem, 10vw, 6.8rem);
  font-weight: 950;
  line-height: 0.75;
}

.cover-sketch {
  z-index: 1;
  opacity: .42;
}

.cover-stage-foundation { --accent: var(--blue); }
.cover-stage-static { --accent: var(--cyan); }
.cover-stage-dynamic { --accent: var(--violet); }
.cover-stage-information { --accent: var(--amber); }
.cover-stage-advanced { --accent: var(--mint); }
.cover-stage-applications { --accent: var(--coral); }

.cover-02 .cover-symbol,
.cover-08 .cover-symbol,
.cover-14 .cover-symbol,
.cover-20 .cover-symbol {
  transform: rotate(3deg);
}

.cover-03 .cover-mini-panel,
.cover-09 .cover-mini-panel,
.cover-15 .cover-mini-panel,
.cover-21 .cover-mini-panel {
  margin-left: 14px;
}

.cover-05 .cover-symbol,
.cover-11 .cover-symbol,
.cover-17 .cover-symbol {
  top: 70px;
}

.cover-06 .cover-copy,
.cover-12 .cover-copy,
.cover-18 .cover-copy {
  max-width: 76%;
}

.game-poster {
  min-height: 150px;
  background:
    linear-gradient(135deg, rgba(0, 47, 167, 0.08), transparent 50%),
    linear-gradient(90deg, rgba(0, 47, 167, 0.06) 1px, transparent 1px) 0 0 / 18px 18px,
    #f8fbff;
}

.game-poster::after {
  content: "PLAY";
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: rgba(0, 47, 167, 0.32);
  font-size: .72rem;
  font-weight: 950;
}

.game-play {
  box-shadow: 0 10px 18px rgba(0, 47, 167, 0.18);
}

.route-infographic-head {
  border: 1px solid rgba(0, 47, 167, 0.14);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
  box-shadow: 0 12px 24px rgba(20, 38, 72, 0.08);
}

.route-board {
  overflow-x: auto;
  border: 1px solid rgba(0, 47, 167, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(236, 244, 255, 0.96)),
    linear-gradient(90deg, rgba(0, 47, 167, 0.05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(180deg, rgba(0, 47, 167, 0.04) 1px, transparent 1px) 0 0 / 22px 22px;
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.62);
}

.route-board svg {
  min-width: 880px;
  width: 100%;
  display: block;
}

.route-board-path,
.route-board-shadow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-board-path {
  stroke: var(--blue);
  stroke-width: 8;
  stroke-dasharray: 14 12;
}

.route-board-shadow {
  stroke: var(--amber);
  stroke-width: 4;
  opacity: .7;
}

.route-board-node {
  --accent: var(--blue);
  cursor: pointer;
}

.route-board-node rect {
  fill: #fff;
  stroke: var(--accent);
  stroke-width: 3;
  filter: drop-shadow(0 12px 16px rgba(18, 51, 107, 0.16));
}

.route-board-node circle {
  fill: var(--accent);
}

.route-board-node text {
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  letter-spacing: 0;
}

.route-board-number {
  fill: #fff;
  font-size: 15px;
  font-weight: 950;
}

.route-board-week {
  fill: var(--accent);
  font-size: 14px;
  font-weight: 950;
}

.route-board-title {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

.route-board-range {
  fill: #5c687b;
  font-size: 13px;
  font-weight: 850;
}

.route-board-node.is-done rect {
  fill: #f2fff9;
}

.route-ribbon path:first-child {
  stroke: var(--blue);
  stroke-width: 9;
}

.route-ribbon path:last-child {
  stroke: var(--amber);
  stroke-width: 4;
  opacity: .85;
}

.route-stage-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.98)),
    linear-gradient(90deg, rgba(0, 47, 167, 0.045) 1px, transparent 1px) 0 0 / 22px 22px;
}

.route-stage-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 72px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  opacity: .26;
}

.route-number {
  border-radius: var(--radius);
  box-shadow: 0 10px 18px rgba(20, 38, 72, 0.16);
}

.route-chip {
  box-shadow: inset 0 0 0 1px rgba(0, 47, 167, 0.08);
}

.case-card .thumb,
.resource-card .thumb {
  background:
    linear-gradient(135deg, rgba(0, 47, 167, 0.08), rgba(255, 255, 255, 0.72)),
    #fff;
}

.reader-shell,
.game-shell {
  background:
    linear-gradient(90deg, rgba(0, 47, 167, 0.035) 1px, transparent 1px) 0 0 / 30px 30px,
    #f7faff;
}

.doc-content,
.game-main {
  box-shadow: 0 18px 42px rgba(20, 38, 72, 0.09);
}

@media (max-width: 760px) {
  .topbar,
  .hero-band {
    border-radius: 0;
  }

  .cover-copy,
  .cover-mini-panel {
    max-width: 100%;
    width: 100%;
  }

  .cover-symbol {
    width: 88px;
    opacity: .42;
  }
}
