/* ==========================================================================
   UNICODE · 设计系统
   奶白纸感 + 深海军蓝 + 橙色点睛 + 贴纸 / 轨道语言
   ========================================================================== */

:root {
  --bg: #fafcff;
  --paper: #ffffff;
  --ink: #10243b;
  --ink-2: #2b4159;
  --muted: #77879b;
  --line: #e4eaf2;
  --line-soft: #eef2f8;
  --orange: #e9642c;
  --orange-2: #f0804a;
  --orange-soft: #fcece3;
  --navy: #0c2137;
  --navy-2: #132d47;
  --green: #2e7d5b;
  --green-soft: #eaf6f0;
  --red: #c74b37;
  --red-soft: #fbedeb;
  --radius: 22px;
  --shadow: 0 26px 60px -36px rgba(16, 36, 59, 0.38);
  --shadow-soft: 0 14px 34px -24px rgba(16, 36, 59, 0.3);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --display: "Arial Rounded MT Bold", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Code", Consolas, "SFMono-Regular", "Courier New", monospace;
  --header-h: 78px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 500px at 88% -8%, rgba(233, 100, 44, 0.06), transparent 60%),
    radial-gradient(700px 500px at 0% 20%, rgba(46, 90, 136, 0.05), transparent 60%);
}

img { max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: rgba(233, 100, 44, 0.22); }

:focus-visible {
  outline: 3px solid rgba(233, 100, 44, 0.42);
  outline-offset: 2px;
  border-radius: 6px;
}

.container {
  width: min(1200px, calc(100% - 64px));
  margin: 0 auto;
}
.container-wide {
  width: min(1440px, calc(100% - 40px));
  margin: 0 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;
}

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.accent { color: var(--orange); }
.nowrap { white-space: nowrap; }

/* --------------------------------------------------------------------------
   品牌 / 导航
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 252, 255, 0.88);
  border-bottom: 1px solid rgba(228, 234, 242, 0.7);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 34px;
}

/* 让顶部 logo 和首页大标题左对齐，而不是缩进到 1200 容器里 */
.site-header .header-inner {
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  flex: none;
  line-height: 1;
  padding: 6px 0;
}


.brand-word {
  font-family: var(--display);
  font-weight: 800;
  font-size: 31px;
  letter-spacing: -0.055em;
  color: var(--ink);
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}

.brand-i {
  position: relative;
  display: inline-block;
  margin: 0 0.06em;
}

.brand-dot {
  position: absolute;
  left: 50%;
  top: 0.07em;
  width: 0.24em;
  height: 0.24em;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px var(--bg);
  transform: translateX(-50%);
}

.site-footer .brand-dot { box-shadow: 0 0 0 3px var(--navy); }

.brand-sub {
  margin-top: 7px;
  font-size: 8.5px;
  letter-spacing: 0.27em;
  color: var(--muted);
  font-weight: 700;
  padding-left: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.main-nav a {
  position: relative;
  padding: 10px 13px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
  transition: color 0.18s ease, background 0.18s ease;
}
.main-nav a:hover { color: var(--orange); background: rgba(233, 100, 44, 0.06); }
.main-nav a.is-active { color: var(--ink); }
.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2px;
  border-radius: 4px;
  background: var(--orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease;
}
.site-header.menu-open .menu-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.site-header.menu-open .menu-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 10px 0 22px;
}
.mobile-panel .container { display: flex; flex-direction: column; gap: 2px; }
.mobile-panel a:not(.btn) {
  text-decoration: none;
  padding: 12px 4px;
  font-weight: 600;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-panel a.is-active { color: var(--orange); }
.mobile-panel .btn { margin-top: 14px; justify-content: center; }

/* --------------------------------------------------------------------------
   按钮 / 标签 / 通用元件
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 16px 30px -18px rgba(233, 100, 44, 0.9);
}
.btn-primary:hover { background: #d9561f; box-shadow: 0 20px 34px -18px rgba(233, 100, 44, 0.95); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1b3550; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: #cfd9e6; background: #fff; }

.btn-ghost-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.5); }

.btn-sm { min-height: 40px; padding: 0 17px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.link-arrow:hover { color: var(--orange); border-color: var(--orange); }
.link-arrow::after { content: "→"; transition: transform 0.18s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.23em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.4;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft);
  flex: none;
}
.eyebrow.light { color: rgba(255, 255, 255, 0.58); }
.eyebrow.light::before { box-shadow: 0 0 0 4px rgba(233, 100, 44, 0.16); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 7px;
  background: #f2f6fb;
  color: var(--ink-2);
  border: 1px solid var(--line-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.tag-orange { background: var(--orange-soft); border-color: #f7d8c7; color: #b34918; }
.tag-dark { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.76); }
.tag-green { background: var(--green-soft); border-color: #cde8db; color: var(--green); }
.tag-red { background: var(--red-soft); border-color: #f1d3cd; color: var(--red); }

.dots { display: inline-flex; gap: 3px; align-items: center; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: #d6dee9; }
.dots i.on { background: var(--orange); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: 42px;
  overflow: hidden;
}

/* 首页：一屏视觉入口，不滚动 */
body[data-page="home"] { height: 100svh; overflow: hidden; }
body[data-page="home"] .home-hero {
  position: relative;
  height: calc(100svh - var(--header-h));
  overflow: hidden;
}
.home-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 15% top;
  z-index: 0;
}
.home-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;
  height: 100%;
  padding-top: clamp(18px, 3.4vh, 34px);
}
.home-hero .hero-single { padding-top: 0; }
.home-hero h1 {
  font-size: clamp(42px, 5.2vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 800;
  margin: 14px 0 16px;
}

.hero-code {
  margin: 16px 0 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.7;
  color: var(--ink-2);
}
.hero-code-line { display: block; }
.hero-code .tok-fn { color: var(--orange); }
.hero-code .tok-str { color: var(--green); }
.hero-code .tok-kw { color: var(--orange); }
.hero-code .tok-num { color: var(--ink); }
.hero-code .tok-punc { color: var(--muted); }

.hero-hello {
  font-family: var(--display) !important;
  font-size: clamp(66px, 9vw, 132px) !important;
  font-weight: 800 !important;
  line-height: 0.86 !important;
  letter-spacing: -0.065em !important;
  margin: 0 0 22px !important;
  color: var(--ink);
}
@media (min-width: 2200px) {
  .site-header .header-inner { width: min(1800px, calc(100% - 40px)); }
  .home-hero-inner { width: min(1800px, calc(100% - 40px)); }
}
.hero-cursor {
  display: inline-block;
  width: 0.09em;
  height: 0.68em;
  margin-left: 0.08em;
  background: var(--orange);
  vertical-align: -0.03em;
  animation: heroBlink 1.05s steps(1) infinite;
}
@keyframes heroBlink { 50% { opacity: 0; } }
.home-hero .hero-lead {
  max-width: 560px;
  font-size: 15px;
  line-height: 1.7;
}
.home-hero .hero-actions { margin-top: 20px; }
.home-hero .hero-proof { margin-top: 16px; }
.home-hero .hero-stats { margin-top: 18px; padding-top: 14px; max-width: 540px; }
@media (max-height: 720px) {
  .home-hero .hero-proof, .home-hero .hero-stats { display: none; }
  .home-hero h1 { font-size: clamp(34px, 4.6vw, 54px); }
  .home-hero .hero-lead { font-size: 13.5px; }
}
@media (max-width: 920px) {
  .home-bg {
    top: auto;
    bottom: 0;
    height: 46%;
    object-fit: cover;
    object-position: center 58%;
  }
  .home-hero-inner { padding-top: 18px; }
}
@media (max-width: 920px) and (max-height: 640px) {
  .home-hero .home-bg { height: 36%; }
}

.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: end;
  padding-top: 20px;
  position: relative;
  z-index: 2;
}

.hero-single {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding-top: 20px;
}

.hero h1 {
  margin: 18px 0 22px;
  font-size: clamp(45px, 5.5vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  font-weight: 800;
  max-width: 780px;
}

.hero h1 .hero-mark {
  position: relative;
  display: inline-block;
  color: var(--orange);
  white-space: nowrap;
}
.hero h1 .hero-mark::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 0.03em;
  height: 0.075em;
  border-radius: 999px;
  background: rgba(233, 100, 44, 0.26);
  z-index: -1;
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 590px;
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  max-width: 540px;
}
.hero-stats > div { min-width: 90px; }
.hero-stats strong {
  display: block;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.05em;
}
.hero-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof span::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-soft);
  box-shadow: inset 0 0 0 1px #cde8db;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 8.4l2.5 2.4 5-5.2' fill='none' stroke='%232e7d5b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-card-wrap {
  position: relative;
  padding-bottom: 22px;
}

.today-card {
  position: relative;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 23px 23px 20px;
  box-shadow: var(--shadow);
  transform: rotate(-1.8deg);
  transition: transform 0.3s ease;
}
.today-card:hover { transform: rotate(0deg) translateY(-3px); }

.today-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.today-top .eyebrow { font-size: 9px; letter-spacing: 0.18em; }
.today-top .eyebrow::before { width: 6px; height: 6px; box-shadow: 0 0 0 3px var(--orange-soft); }

.today-card h3 {
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 12px 0 16px;
}

.check-list { display: flex; flex-direction: column; gap: 10px; }
.check-list li {
  position: relative;
  padding-left: 27px;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid #cfdae7;
  background: #fff;
}
.check-list li.done { color: var(--muted); text-decoration: line-through; text-decoration-color: #c9d4e1; }
.check-list li.done::before {
  background: var(--orange);
  border-color: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 8.4l2.5 2.4 5-5.2' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
}

.progress-line {
  height: 5px;
  border-radius: 999px;
  background: #eef2f8;
  overflow: hidden;
  margin: 19px 0 8px;
}
.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), var(--orange-2));
}

.today-card .tiny { display: flex; justify-content: space-between; color: var(--muted); }

.today-orbit {
  position: absolute;
  width: 300px;
  height: 130px;
  border: 1px dashed #e2b79f;
  border-radius: 50%;
  right: -42px;
  top: -28px;
  transform: rotate(-16deg);
  opacity: 0.65;
  z-index: 1;
  pointer-events: none;
}
.today-orbit::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  right: 25px;
  top: 10px;
  box-shadow: 0 0 0 4px var(--bg);
}

.hero-art {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  overflow: hidden;
}
@media (min-width: 1400px) {
  .hero-art { margin-top: -150px; }
}
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1.005);
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 90px;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

.hero-scroll {
  display: flex;
  justify-content: center;
  margin-top: -24px;
  position: relative;
  z-index: 2;
}
.hero-scroll span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 700;
}
.hero-scroll span::before {
  content: "";
  width: 1px;
  height: 26px;
  background: linear-gradient(var(--muted), transparent);
}

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */

.marquee {
  margin-top: 38px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  padding: 14px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 44s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group {
  display: flex;
  align-items: center;
  gap: 30px;
  padding-right: 30px;
}
.marquee-group span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #8b99aa;
  white-space: nowrap;
}
.marquee-group i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   通用 section
   -------------------------------------------------------------------------- */

.section { padding: 104px 0; }
.section.tight { padding: 74px 0; }
.section.soft { background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(246, 249, 253, 0.8)); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 44px;
}
.section-head h2 {
  margin-top: 12px;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 800;
  max-width: 760px;
}
.section-head > p:not(.eyebrow) { max-width: 480px; color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.section-head .head-link { flex: none; padding-bottom: 6px; }

/* --------------------------------------------------------------------------
   轨道卡片
   -------------------------------------------------------------------------- */

.tracks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.track-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 40px 38px 34px;
  min-height: 430px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.track-card:hover { transform: translateY(-4px); }

.track-c {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 30px 60px -40px rgba(12, 33, 55, 0.9);
}
.track-c::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.2px 1.2px at 18% 22%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.5px 1.5px at 78% 12%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 64% 42%, rgba(255,255,255,.32), transparent),
    radial-gradient(1.5px 1.5px at 88% 66%, rgba(255,255,255,.36), transparent),
    radial-gradient(120% 90% at 100% 100%, rgba(233, 100, 44, 0.2), transparent 55%);
  pointer-events: none;
}

.track-cpp {
  background: linear-gradient(150deg, #fff8f1, #fff 64%);
  border: 1px solid #f1ddcd;
  color: var(--ink);
  box-shadow: 0 30px 60px -46px rgba(16, 36, 59, 0.45);
}

.track-letter {
  position: absolute;
  right: 16px;
  top: -46px;
  font-family: var(--display);
  font-size: 270px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.08em;
  opacity: 0.075;
  pointer-events: none;
  user-select: none;
}
.track-cpp .track-letter { opacity: 0.06; font-size: 230px; top: -34px; right: 12px; }

.track-label {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.5);
}
.track-cpp .track-label { color: #b08a70; }

.track-card h3 {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-weight: 800;
}
.track-card h3 em { font-style: normal; color: var(--orange); }

.track-card .track-desc {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  max-width: 360px;
  font-size: 14.5px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.65);
}
.track-cpp .track-desc { color: var(--muted); }

.track-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.track-tags li {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}
.track-cpp .track-tags li { border-color: #eed9c9; color: #8a6753; background: rgba(255, 255, 255, 0.6); }

.track-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: auto;
  padding-top: 34px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.52);
}
.track-meta b { color: #fff; font-size: 19px; margin-right: 3px; }
.track-cpp .track-meta { color: var(--muted); }
.track-cpp .track-meta b { color: var(--ink); }

.track-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13.5px;
  font-weight: 700;
}
.track-cpp .track-link { border-top-color: #f1e1d5; }
.track-link span:last-child {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, background 0.2s ease;
}
.track-card:hover .track-link span:last-child { transform: translateX(3px); background: var(--orange); }
.track-cpp .track-link span:last-child { background: #fff; border: 1px solid #f0dfd2; }
.track-cpp:hover .track-link span:last-child { background: var(--orange); border-color: var(--orange); color: #fff; }

.track-orbit {
  position: absolute;
  width: 380px;
  height: 170px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  right: -110px;
  bottom: 84px;
  transform: rotate(-18deg);
  pointer-events: none;
}
.track-orbit::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  left: 34px;
  top: 26px;
  box-shadow: 0 0 0 5px rgba(233, 100, 44, 0.12);
}
.track-cpp .track-orbit { border-color: rgba(233, 100, 44, 0.26); }

/* --------------------------------------------------------------------------
   诊断板块
   -------------------------------------------------------------------------- */

.diagnose-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 60px;
  align-items: center;
  background: var(--navy);
  color: #fff;
  border-radius: 34px;
  padding: 58px 56px;
  box-shadow: 0 40px 80px -50px rgba(12, 33, 55, 0.85);
}
.diagnose-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.4px 1.4px at 12% 24%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.2px 1.2px at 82% 18%, rgba(255,255,255,.45), transparent),
    radial-gradient(1.6px 1.6px at 72% 78%, rgba(255,255,255,.34), transparent),
    radial-gradient(1.2px 1.2px at 28% 84%, rgba(255,255,255,.26), transparent),
    radial-gradient(60% 70% at 100% 0%, rgba(233, 100, 44, 0.2), transparent 60%);
  pointer-events: none;
}
.diagnose-copy { position: relative; z-index: 1; }
.diagnose-copy h2 {
  margin: 14px 0 18px;
  font-size: clamp(32px, 3.7vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  font-weight: 800;
  max-width: 520px;
}
.diagnose-copy p { color: rgba(255, 255, 255, 0.62); font-size: 14.5px; line-height: 1.85; max-width: 480px; }
.diagnose-copy .btn { margin-top: 28px; }

.gap-card {
  position: relative;
  z-index: 1;
  background: #fff;
  color: var(--ink);
  border-radius: 24px;
  padding: 27px 26px 24px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
  transform: rotate(1.6deg);
  transition: transform 0.3s ease;
}
.gap-card:hover { transform: rotate(0); }
.gap-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.gap-head h3 { font-size: 18px; letter-spacing: -0.02em; }
.gap-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 16px 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}
.gap-score strong { font-family: var(--display); font-size: 48px; line-height: 1; letter-spacing: -0.05em; }
.gap-score span { color: var(--muted); font-size: 12px; font-weight: 600; }
.gap-bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 72px 1fr 34px; gap: 10px; align-items: center; font-size: 12px; }
.bar-row .bar-label { font-weight: 600; color: var(--ink-2); }
.bar-track { height: 7px; border-radius: 999px; background: #eef2f8; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.bar-fill.low { background: #d98a63; }
.bar-row .bar-num { color: var(--muted); font-family: var(--mono); font-size: 11px; text-align: right; }
.gap-card .tiny { margin-top: 16px; color: var(--muted); display: flex; justify-content: space-between; }

/* --------------------------------------------------------------------------
   方法 / 步骤
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.steps.steps-3 { grid-template-columns: repeat(3, 1fr); }
.step {
  position: relative;
  padding: 30px 28px 6px 0;
  border-right: 1px solid var(--line);
}
.step:last-child { border-right: 0; }
.step::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 5px var(--bg);
}
.step:first-child::before { box-shadow: 0 0 0 5px var(--orange-soft); }
.step-num {
  font-family: var(--display);
  font-size: 42px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: var(--ink);
  opacity: 0.16;
}
.step h3 { margin-top: 16px; font-size: 18px; letter-spacing: -0.02em; }
.step p { margin-top: 8px; color: var(--muted); font-size: 13.5px; line-height: 1.75; max-width: 240px; }

/* --------------------------------------------------------------------------
   7 天计划
   -------------------------------------------------------------------------- */

.plan-head-actions { display: flex; align-items: center; gap: 18px; }

.plan-toggle {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.plan-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  transition: background 0.18s ease, color 0.18s ease;
}
.plan-toggle button.is-active { background: var(--ink); color: #fff; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

.plan-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 17px 18px;
  min-height: 242px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.plan-card:hover { transform: translateY(-3px); border-color: #f0c6ae; box-shadow: var(--shadow-soft); }
.plan-card .day {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--orange);
}
.plan-card .day small { font-family: var(--font); font-size: 9px; letter-spacing: 0.16em; color: var(--muted); margin-left: 3px; }
.plan-card h4 { margin: 9px 0 13px; font-size: 14.5px; line-height: 1.45; letter-spacing: -0.01em; min-height: 42px; }
.plan-card li {
  position: relative;
  padding-left: 11px;
  margin-bottom: 7px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.plan-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d6dee9;
}
.plan-card .time {
  margin-top: auto;
  padding-top: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #a5b2c2;
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: space-between;
}
.plan-card:last-child { background: var(--orange-soft); border-color: #f5d3c0; }
.plan-card:last-child .day { color: var(--orange); }

/* --------------------------------------------------------------------------
   题库预览 / 题目卡片
   -------------------------------------------------------------------------- */

.q-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.inline-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px dashed #d7e1ec;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.inline-note a { color: var(--ink); font-weight: 700; text-decoration: none; white-space: nowrap; }
.inline-note a:hover { color: var(--orange); }

.q-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.q-card:hover { transform: translateY(-3px); border-color: #f0c6ae; box-shadow: var(--shadow-soft); }
.q-card .q-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 14px; }
.q-card h4 { font-size: 16px; line-height: 1.5; letter-spacing: -0.015em; }
.q-card .q-snippet {
  margin-top: 13px;
  padding: 12px 13px;
  border-radius: 10px;
  background: #f5f8fc;
  border: 1px solid #edf2f8;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: #4c6278;
  max-height: 76px;
  overflow: hidden;
  white-space: pre;
  -webkit-mask-image: linear-gradient(#000 66%, transparent);
  mask-image: linear-gradient(#000 66%, transparent);
}
.q-card .q-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 17px;
  font-size: 11px;
  color: var(--muted);
}
.q-card .q-foot b { color: var(--orange); font-weight: 800; flex: none; }
.q-card .q-foot span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 230px;
}

/* --------------------------------------------------------------------------
   速查 / 深色面板
   -------------------------------------------------------------------------- */

.cheat-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 56px;
  align-items: center;
  background: var(--navy);
  border-radius: 34px;
  padding: 56px;
  color: #fff;
  box-shadow: 0 40px 80px -50px rgba(12, 33, 55, 0.85);
}
.cheat-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.3px 1.3px at 20% 18%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 76% 28%, rgba(255,255,255,.35), transparent),
    radial-gradient(1.4px 1.4px at 64% 84%, rgba(255,255,255,.25), transparent),
    radial-gradient(50% 60% at 0% 100%, rgba(233, 100, 44, 0.18), transparent 60%);
  pointer-events: none;
}
.cheat-copy { position: relative; z-index: 1; }
.cheat-copy h2 { margin: 14px 0 18px; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.15; letter-spacing: -0.045em; font-weight: 800; }
.cheat-copy p { color: rgba(255, 255, 255, 0.6); font-size: 14.5px; line-height: 1.85; max-width: 420px; }
.cheat-copy .btn { margin-top: 26px; }
.cheat-sheet {
  position: relative;
  z-index: 1;
  background: #071828;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 26px 50px -30px rgba(0, 0, 0, 0.7);
  transform: rotate(1.2deg);
}
.cheat-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  letter-spacing: 0.14em;
  font-weight: 700;
}
.cheat-sheet-head .lights { display: flex; gap: 5px; }
.cheat-sheet-head .lights i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.cheat-sheet pre {
  margin: 0;
  padding: 19px 20px 22px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.9;
  color: #c9d8e8;
  overflow-x: auto;
}
.cheat-sheet pre .c1 { color: #7fd1b9; }
.cheat-sheet pre .c2 { color: #ffb38a; }
.cheat-sheet pre .c3 { color: #8fb8e8; }
.cheat-sheet pre .c4 { color: #f2cf86; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  list-style: none;
  cursor: pointer;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 400;
  font-size: 18px;
  flex: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.faq details[open] summary::after { content: "−"; background: var(--orange); border-color: var(--orange); color: #fff; transform: rotate(180deg); }
.faq details p { max-width: 800px; margin: 12px 0 2px; color: var(--muted); font-size: 14px; line-height: 1.85; }

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
  padding: 88px 0 28px;
  margin-top: 40px;
}
.footer-orbit {
  position: absolute;
  width: 900px;
  height: 380px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  right: -260px;
  top: -160px;
  transform: rotate(-12deg);
  pointer-events: none;
}
.footer-orbit::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  left: 90px;
  bottom: 55px;
  box-shadow: 0 0 0 6px rgba(233, 100, 44, 0.12);
}
.footer-cta { position: relative; z-index: 1; }
.footer-cta h2 {
  margin: 16px 0 28px;
  font-size: clamp(38px, 5.4vw, 74px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  font-weight: 800;
  max-width: 850px;
}
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.footer-simple {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding-top: 10px;
}
.footer-links { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.footer-links a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.footer-links a:hover { color: var(--orange-2); }
.footer-links span { color: rgba(255, 255, 255, 0.36); font-size: 11px; }

.footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 40px;
  margin-top: 66px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand .brand-word { font-size: 38px; color: #fff; }
.footer-brand p { margin-top: 16px; color: rgba(255, 255, 255, 0.48); font-size: 13px; line-height: 1.8; }
.footer-col h4 {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 16px;
  font-weight: 800;
}
.footer-col a, .footer-col .footer-note {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 10px;
  transition: color 0.18s ease;
}
.footer-col a:hover { color: var(--orange-2); }
.footer-note { color: rgba(255, 255, 255, 0.36) !important; font-size: 11.5px !important; margin-top: 16px; }
.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.34);
  font-size: 11px;
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   内页页头
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 62px 0 54px;
  border-bottom: 1px solid var(--line);
}
.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 40px;
  align-items: end;
}
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb span { opacity: 0.5; }
.page-hero h1 {
  margin: 16px 0 16px;
  font-size: clamp(44px, 5.8vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 800;
}
.page-hero h1 em { font-style: normal; color: var(--orange); }
.page-hero .lead { max-width: 680px; color: var(--ink-2); font-size: 15.5px; line-height: 1.85; }
.page-hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 26px; }
.page-stat strong { display: block; font-family: var(--display); font-size: 28px; line-height: 1; letter-spacing: -0.04em; }
.page-stat span { display: block; margin-top: 5px; font-size: 10.5px; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.page-hero-side { position: relative; display: flex; justify-content: flex-end; }
.page-badge {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 1px dashed #d9c1b2;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-8deg);
}
.page-badge::before {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.page-badge strong {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-size: 66px;
  line-height: 1;
  letter-spacing: -0.08em;
}
.page-badge .badge-dot {
  position: absolute;
  top: 12px;
  right: 34px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 5px var(--orange-soft);
}
.page-badge .badge-label {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   知识地图
   -------------------------------------------------------------------------- */

.chapter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.chapter-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 24px 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.chapter-card:hover { border-color: #edc8b4; box-shadow: var(--shadow-soft); }
.chapter-top { display: flex; gap: 15px; align-items: flex-start; }
.chapter-num {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--orange);
  min-width: 40px;
}
.chapter-title-wrap { min-width: 0; }
.chapter-title-wrap h3 { font-size: 19px; line-height: 1.35; letter-spacing: -0.025em; }
.chapter-title-wrap .en { margin-top: 4px; font-size: 8.5px; letter-spacing: 0.16em; color: #a3b0c0; font-weight: 800; }
.chapter-card .brief { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.chapter-freq {
  margin-left: auto;
  flex: none;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #b34918;
  background: var(--orange-soft);
  border: 1px solid #f6d6c4;
  border-radius: 999px;
  padding: 3px 8px;
}
.chapter-freq.mid { color: var(--muted); background: #f3f6fa; border-color: var(--line); }

.chapter-card details { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.chapter-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.chapter-card summary::-webkit-details-marker { display: none; }
.chapter-card summary::after { content: "+"; color: var(--muted); font-size: 16px; font-weight: 400; }
.chapter-card details[open] summary::after { content: "−"; }
.chapter-detail { padding-top: 12px; }
.chapter-detail h5 {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: #a3b0c0;
  font-weight: 800;
  margin-bottom: 8px;
}
.chapter-detail ul { margin-bottom: 14px; }
.chapter-detail li {
  position: relative;
  padding-left: 13px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 5px;
}
.chapter-detail li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--orange);
}
.chapter-detail .trap li::before { background: var(--red); }
.chapter-detail .trap li { color: #7b5a52; }
.chapter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
}
.chapter-actions a { text-decoration: none; font-weight: 700; color: var(--ink); }
.chapter-actions a:hover { color: var(--orange); }
.chapter-actions span { color: var(--muted); font-size: 10.5px; }

/* 高频失分点 */
.trap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.trap-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.trap-card:hover { transform: translateY(-2px); border-color: #efc9b5; }
.trap-card .idx {
  display: inline-flex;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--red-soft);
  color: var(--red);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  align-items: center;
  justify-content: center;
}
.trap-card h3 { margin: 12px 0 8px; font-size: 15px; line-height: 1.45; letter-spacing: -0.015em; }
.trap-card p { color: var(--muted); font-size: 12.5px; line-height: 1.75; }
.trap-card code {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #b34918;
  background: var(--orange-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

/* 代码模板 */
.code-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.code-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.code-item .code-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.code-item .code-item-head h3 { font-size: 14.5px; letter-spacing: -0.015em; }
.code-item .code-item-head span { font-size: 9px; letter-spacing: 0.12em; color: var(--muted); font-weight: 800; }
.code-item .code-block { margin: 0; border-radius: 0; }
.code-item .code-block pre { max-height: 330px; }

/* --------------------------------------------------------------------------
   代码块
   -------------------------------------------------------------------------- */

.code-block {
  position: relative;
  background: #0a1c2e;
  border-radius: 14px;
  overflow: hidden;
  margin: 14px 0;
  border: 1px solid rgba(12, 33, 55, 0.9);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
.code-head .code-lang {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #7f95ab;
  font-weight: 800;
}
.code-copy {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #a8bacd;
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 6px;
  transition: background 0.18s ease, color 0.18s ease;
}
.code-copy:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.code-block pre {
  margin: 0;
  padding: 16px 18px;
  overflow: auto;
  color: #d5e2f0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  tab-size: 4;
  -webkit-overflow-scrolling: touch;
}
.code-block code { font-family: inherit; }
.tok-kw { color: #ff9d70; }
.tok-str { color: #a9d9a1; }
.tok-com { color: #6a8097; font-style: italic; }
.tok-num { color: #f3ca82; }
.tok-pre { color: #7fc8e8; }
.tok-fn { color: #d9c0ff; }

/* --------------------------------------------------------------------------
   题库页
   -------------------------------------------------------------------------- */

.practice-hero { padding: 34px 0 10px; }
.practice-hero-grid { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.practice-hero h1 { font-size: clamp(40px, 5.2vw, 66px); line-height: 1.04; letter-spacing: -0.05em; margin: 14px 0 14px; }
.practice-hero p { max-width: 620px; color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.practice-hero .hero-actions { margin-top: 22px; }

.mode-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  margin: 0 0 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.mode-tabs a {
  padding: 9px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}
.mode-tabs a.is-active { background: var(--ink); color: #fff; }
.mode-tabs a:hover { color: var(--ink); }
.mode-tabs a.is-active:hover { color: #fff; }

.mode-panel { display: none; padding-bottom: 30px; }
.mode-panel.is-active { display: block; }

.practice-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 26px 0 6px;
}

body[data-mode="diagnose"] .practice-hero .practice-hero-grid,
body[data-mode="exam"] .practice-hero .practice-hero-grid,
body[data-mode="wrong"] .practice-hero .practice-hero-grid { display: none; }
body[data-mode="diagnose"] .practice-hero,
body[data-mode="exam"] .practice-hero,
body[data-mode="wrong"] .practice-hero { padding-top: 34px; padding-bottom: 0; }

.practice-note {
  align-self: end;
  max-width: 320px;
  margin-left: auto;
  padding: 20px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.practice-note p { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.75; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 30px 0 8px; }
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  min-height: 88px;
}
.stat-card .stat-label { font-size: 10px; letter-spacing: 0.12em; color: var(--muted); font-weight: 800; }
.stat-card strong { display: block; margin-top: 6px; font-family: var(--display); font-size: 28px; line-height: 1; letter-spacing: -0.04em; }
.stat-card strong small { font-family: var(--font); font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat-card.orange strong { color: var(--orange); }

.practice-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-bottom: 2px;
}
.practice-tabs-row .tabs button span { color: inherit; opacity: 0.7; font-size: 10px; }
.reset-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px 0;
}
.reset-btn:hover { color: var(--red); }
.practice-body { padding: 0 0 90px; }

.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 15px 0;
  background: rgba(250, 252, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.seg {
  display: inline-flex;
  padding: 3px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  gap: 2px;
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 13px;
  border-radius: 999px;
  transition: background 0.16s ease, color 0.16s ease;
}
.seg button.is-active { background: var(--ink); color: #fff; }
.seg.orange button.is-active { background: var(--orange); }

.select-wrap { position: relative; display: inline-flex; }
.select-wrap select {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 34px 9px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}
.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px 9px 34px;
  font-size: 12.5px;
  color: var(--ink);
}
.search-box input::placeholder { color: #a9b5c4; }
.search-box::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-50%);
}
.search-box::after {
  content: "";
  position: absolute;
  left: 24px;
  top: calc(50% + 4px);
  width: 5px;
  height: 1.5px;
  background: var(--muted);
  transform: rotate(45deg);
}

.filter-count { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }

.tabs {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease;
}
.tabs button.is-active { background: var(--orange); color: #fff; }

.q-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }

.list-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 19px 20px 16px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.list-card .row, .list-card h3, .list-card .snippet, .list-card .foot { min-width: 0; }
.list-card h3 { overflow-wrap: anywhere; }
.list-card:hover { transform: translateY(-2px); border-color: #edc8b4; box-shadow: var(--shadow-soft); }
.list-card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-card .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.list-card h3 { font-size: 15.5px; line-height: 1.45; letter-spacing: -0.015em; }
.list-card .snippet {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  color: #6b7f93;
  background: #f6f9fc;
  border: 1px solid #eef3f8;
  border-radius: 8px;
  padding: 8px 10px;
  white-space: pre;
  overflow: hidden;
  max-height: 50px;
  -webkit-mask-image: linear-gradient(#000 62%, transparent);
  mask-image: linear-gradient(#000 62%, transparent);
}
.list-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 3px; }
.list-card .status { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #d8e0ea; }
.status-dot.ok { background: var(--green); }
.status-dot.bad { background: var(--red); }
.list-card .go {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.list-card .go:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.list-card.is-wrong { border-color: #f0d2cb; }
.list-card.is-wrong::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red);
}
.list-card.is-done { border-color: #d6eadf; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 28px; }
.pagination button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.pagination button.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination button[disabled] { opacity: 0.4; cursor: not-allowed; }

.empty-state {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #d8e1ec;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}
.empty-state strong { display: block; color: var(--ink); margin-bottom: 6px; font-size: 16px; }

/* --------------------------------------------------------------------------
   弹窗 / 答题
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}
.modal.is-open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 20, 34, 0.58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(800px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: #fff;
  border-radius: 24px;
  padding: 30px 32px 28px;
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, 0.55);
  animation: modalIn 0.24s ease both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--muted);
  line-height: 1;
}
.modal-close:hover { background: #f4f7fb; color: var(--ink); }

.modal-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; padding-right: 40px; }
.modal-dialog h2 { margin: 15px 0 6px; font-size: 25px; line-height: 1.34; letter-spacing: -0.03em; }
.modal-prompt { color: var(--muted); font-size: 13.5px; line-height: 1.7; margin-top: 6px; }

.option-list { display: flex; flex-direction: column; gap: 9px; margin-top: 18px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  transition: border-color 0.16s ease, background 0.16s ease;
}
.option:hover { border-color: #edc8b4; background: #fffaf6; }
.option .key {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #d6dfe9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  margin-top: 1px;
}
.option.is-selected { border-color: var(--orange); background: var(--orange-soft); }
.option.is-selected .key { background: var(--orange); border-color: var(--orange); color: #fff; }
.option.is-correct { border-color: #9fd3ba; background: var(--green-soft); }
.option.is-correct .key { background: var(--green); border-color: var(--green); color: #fff; }
.option.is-wrong { border-color: #e9b3a9; background: var(--red-soft); }
.option.is-wrong .key { background: var(--red); border-color: var(--red); color: #fff; }
.option[disabled] { cursor: default; }

.code-task-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}
.code-task-note a { color: var(--ink); font-weight: 700; text-decoration: none; }
.code-task-note a:hover { color: var(--orange); }

.sample-test {
  margin-top: 16px;
  border: 1px dashed #d7e1ec;
  border-radius: 14px;
  padding: 16px;
  background: #fbfcfe;
}
.sample-test-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
}
.sample-test-hint { margin-top: 6px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.sample-test-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 11px 0 9px; }
.sample-expect {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 9px;
  white-space: pre-wrap;
  line-height: 1.55;
}
.sample-test .answer-textarea { min-height: 96px; }
.sample-test-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.sample-result {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.7;
}
.sample-result.ok { background: var(--green-soft); border: 1px solid #cde8db; color: var(--green); }
.sample-result.no { background: var(--red-soft); border: 1px solid #f1d3cd; color: var(--red); }
.sample-diff { margin-top: 5px; color: var(--ink-2); }
.sample-diff code { font-family: var(--mono); font-size: 11px; background: rgba(255,255,255,.6); padding: 1px 4px; border-radius: 4px; }

.sample-list { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.sample-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #fbfcfe;
  border: 1px solid var(--line-soft);
}
.sample-box span {
  display: block;
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--muted);
  margin-bottom: 5px;
}
.sample-box pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-all;
}

.answer-area { margin-top: 18px; }
.answer-area label { display: block; font-size: 10.5px; letter-spacing: 0.12em; font-weight: 800; color: var(--muted); margin-bottom: 7px; }
.answer-input, .answer-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
  background: #fbfdff;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.answer-input:focus, .answer-textarea:focus { outline: none; border-color: var(--orange); background: #fff; }
.answer-textarea { min-height: 150px; resize: vertical; line-height: 1.65; }
.answer-hint { margin-top: 8px; font-size: 11.5px; color: var(--muted); }

.feedback {
  margin-top: 18px;
  border-radius: 14px;
  padding: 16px 17px;
  font-size: 13.5px;
  line-height: 1.75;
}
.feedback.ok { background: var(--green-soft); border: 1px solid #cde8db; }
.feedback.no { background: var(--red-soft); border: 1px solid #f1d3cd; }
.feedback .fb-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 13px; margin-bottom: 7px; }
.feedback.ok .fb-title { color: var(--green); }
.feedback.no .fb-title { color: var(--red); }
.feedback .answer-line { margin-top: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.feedback .explain { margin-top: 9px; color: var(--ink-2); }

.self-check { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 16px; }
.self-check h3 { font-size: 13px; margin-bottom: 10px; }
.point-list { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 16px; }
.point-list li { position: relative; padding-left: 20px; font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.point-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 800;
  font-size: 11px;
}
.self-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.modal-foot .progress-text { font-size: 11.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   诊断
   -------------------------------------------------------------------------- */

.diag-hero { padding: 60px 0 30px; }
.diag-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 46px; align-items: center; }
.diag-copy h1 { font-size: clamp(42px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -0.055em; margin: 14px 0 18px; }
.diag-copy p { color: var(--ink-2); font-size: 15px; line-height: 1.9; max-width: 540px; }

.diag-rules { margin-top: 28px; display: flex; flex-direction: column; gap: 11px; }
.diag-rules li { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: var(--ink-2); }
.diag-rules li b {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: #b34918;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.track-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.track-option {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.track-option:hover { transform: translateY(-2px); border-color: #edc8b4; }
.track-option.is-active { border-color: var(--orange); background: var(--orange-soft); }
.track-option .to-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.track-option .to-desc { margin-top: 5px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.track-option .to-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #cfdae7;
  flex: none;
}
.track-option.is-active .to-check { background: var(--orange); border-color: var(--orange); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.2 8.4l2.5 2.4 5-5.2' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 11px; background-position: center; background-repeat: no-repeat; }

.diag-start { margin-top: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.diag-start .tiny { color: var(--muted); }

.diag-preview {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 28px;
  box-shadow: var(--shadow);
  transform: rotate(1.4deg);
}
.diag-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 17px; border-bottom: 1px dashed var(--line); }
.diag-preview-head strong { font-size: 15px; }
.diag-preview .mini-chart { display: flex; align-items: flex-end; gap: 9px; height: 150px; margin: 26px 0 18px; padding: 0 4px; }
.mini-chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 100%; }
.mini-chart .col i { display: block; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #f5a27b, var(--orange)); min-height: 8px; }
.mini-chart .col span { text-align: center; font-size: 9px; color: var(--muted); font-weight: 700; }
.mini-chart .col.low i { background: #e8eef7; }
.diag-preview .tiny { color: var(--muted); line-height: 1.7; }

.diag-stage { display: none; padding: 44px 0 80px; }
.diag-stage.is-active { display: block; }

.diag-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.diag-topbar .diag-title { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; color: var(--muted); }
.diag-topbar .diag-timer { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--ink); }
.diag-topbar .diag-timer.low { color: var(--red); }

.diag-progress { height: 6px; border-radius: 999px; background: #e9eff7; overflow: hidden; margin-bottom: 28px; }
.diag-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--orange-2)); border-radius: inherit; transition: width 0.3s ease; }

.diag-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px;
  box-shadow: var(--shadow-soft);
  max-width: 880px;
  margin: 0 auto;
}
.diag-card .diag-qnum { font-size: 10px; letter-spacing: 0.16em; color: var(--muted); font-weight: 800; }
.diag-card h2 { margin: 10px 0 18px; font-size: 24px; line-height: 1.4; letter-spacing: -0.025em; }
.diag-card .code-block { margin: 16px 0 20px; }
.diag-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; }

.diag-result { padding: 48px 0 90px; display: none; }
.diag-result.is-active { display: block; }
.result-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.result-head h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.08; letter-spacing: -0.05em; margin: 14px 0 14px; }
.result-head p { color: var(--muted); font-size: 14.5px; }
.result-score {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 22px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--orange-soft);
  border: 1px solid #f6d6c4;
  color: #b34918;
}
.result-score strong { font-family: var(--display); font-size: 34px; line-height: 1; }
.result-score span { font-size: 12px; font-weight: 700; }

.gap-report { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; }
.gap-panel { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.gap-panel h2 { font-size: 20px; letter-spacing: -0.025em; margin-bottom: 6px; }
.gap-panel .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 22px; }
.report-bars { display: flex; flex-direction: column; gap: 15px; }
.report-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 12px; align-items: center; font-size: 12px; }
.report-row .label { font-weight: 600; color: var(--ink-2); }
.report-row .track { height: 9px; border-radius: 999px; background: #eef2f8; overflow: hidden; }
.report-row .fill { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.report-row .fill.ok { background: var(--green); }
.report-row .fill.mid { background: #e0a15a; }
.report-row .num { text-align: right; color: var(--muted); font-family: var(--mono); font-size: 11px; }

.next-panel { background: var(--navy); color: #fff; border-radius: 22px; padding: 28px; position: relative; overflow: hidden; }
.next-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 100% 0%, rgba(233,100,44,.22), transparent 60%);
  pointer-events: none;
}
.next-panel h2 { position: relative; font-size: 20px; letter-spacing: -0.025em; margin-bottom: 8px; }
.next-panel p { position: relative; color: rgba(255, 255, 255, 0.6); font-size: 13px; line-height: 1.8; }
.next-list { position: relative; margin: 20px 0 24px; display: flex; flex-direction: column; gap: 10px; }
.next-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
}
.next-list a:hover { background: rgba(255, 255, 255, 0.12); }
.next-list a span:last-child { color: var(--orange-2); }
.next-panel .btn { position: relative; width: 100%; }

/* --------------------------------------------------------------------------
   模拟卷
   -------------------------------------------------------------------------- */

.exam-setup { padding: 30px 0 80px; }
.exam-setup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.exam-option {
  position: relative;
  overflow: hidden;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 26px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.exam-option:hover { transform: translateY(-3px); border-color: #edc8b4; box-shadow: var(--shadow-soft); }
.exam-option .exam-tag { font-size: 9px; letter-spacing: 0.18em; color: var(--orange); font-weight: 800; }
.exam-option h2 { margin: 10px 0 8px; font-size: 26px; letter-spacing: -0.04em; }
.exam-option p { color: var(--muted); font-size: 13px; line-height: 1.75; min-height: 46px; }
.exam-option .exam-meta { display: flex; gap: 16px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--muted); }
.exam-option .exam-meta b { color: var(--ink); font-size: 13px; }
.exam-option .best { position: absolute; right: 20px; top: 20px; font-size: 10px; color: var(--muted); }
.exam-option .best b { color: var(--orange); font-size: 13px; }

.exam-stage { display: none; padding: 30px 0 80px; }
.exam-stage.is-active { display: block; min-height: calc(100vh - var(--header-h)); }
body.exam-active .site-footer, body.diag-active .site-footer,
body[data-mode="exam"] .site-footer, body[data-mode="diagnose"] .site-footer { display: none; }
body.exam-active .exam-stage, body.diag-active .diag-stage { min-height: calc(100vh - var(--header-h)); }

.exam-topbar {
  position: sticky;
  top: var(--header-h);
  z-index: 25;
  background: rgba(250, 252, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 24px;
}
.exam-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.exam-title { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; }
.exam-title small { display: block; font-size: 9px; letter-spacing: 0.14em; color: var(--muted); font-weight: 700; margin-top: 3px; }
.exam-timer { font-family: var(--mono); font-size: 21px; font-weight: 700; letter-spacing: 0.04em; }
.exam-timer.low { color: var(--red); }
.exam-progress-text { font-size: 11px; color: var(--muted); font-weight: 600; }

.exam-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: start; }
.exam-main { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px; }
.exam-main .exam-qhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.exam-main .exam-qhead .num { font-size: 10px; letter-spacing: 0.14em; color: var(--muted); font-weight: 800; }
.exam-main h2 { font-size: 22px; line-height: 1.45; letter-spacing: -0.02em; margin: 6px 0 12px; }
.exam-main .prompt { color: var(--muted); font-size: 13px; line-height: 1.75; }
.exam-main .option-list { margin-top: 18px; }
.exam-main .answer-input { margin-top: 18px; }
.exam-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.exam-nav .mid { display: flex; gap: 8px; }

.palette-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; position: sticky; top: calc(var(--header-h) + 78px); }
.palette-card h3 { font-size: 11px; letter-spacing: 0.12em; color: var(--muted); font-weight: 800; margin-bottom: 12px; }
.palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.palette button {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.palette button.is-answered { background: var(--ink); border-color: var(--ink); color: #fff; }
.palette button.is-current { outline: 2px solid var(--orange); outline-offset: 1px; }
.palette button.is-marked { box-shadow: inset 0 -3px 0 var(--orange); }
.palette-legend { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 10px; color: var(--muted); }
.palette-legend span { display: flex; align-items: center; gap: 6px; }
.palette-legend i { width: 9px; height: 9px; border-radius: 3px; background: #fff; border: 1px solid var(--line); }
.palette-legend i.done { background: var(--ink); border-color: var(--ink); }
.palette-legend i.mark { background: #fff; border-color: var(--line); box-shadow: inset 0 -2px 0 var(--orange); }

.exam-result { display: none; padding: 44px 0 90px; }
.exam-result.is-active { display: block; }
.result-top { display: grid; grid-template-columns: 280px 1fr; gap: 36px; align-items: center; margin-bottom: 40px; }
.score-ring {
  position: relative;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--orange) 0deg, var(--orange) var(--deg, 0deg), #e9eff7 var(--deg, 0deg));
}
.score-ring::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: #fff; }
.score-ring .score-inner { position: relative; text-align: center; }
.score-ring strong { font-family: var(--display); font-size: 58px; line-height: 1; letter-spacing: -0.05em; display: block; }
.score-ring span { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: 0.08em; }
.result-copy h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.045em; line-height: 1.1; margin-bottom: 12px; }
.result-copy p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.result-copy .result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.result-stats { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 22px; }
.result-stats .rs strong { display: block; font-family: var(--display); font-size: 25px; line-height: 1; }
.result-stats .rs span { font-size: 10px; color: var(--muted); letter-spacing: 0.08em; font-weight: 700; }

.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-item { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.review-item.ok { border-left: 4px solid var(--green); }
.review-item.no { border-left: 4px solid var(--red); }
.review-item .review-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 8px; }
.review-item h3 { font-size: 14.5px; line-height: 1.5; }
.review-item .your { margin-top: 8px; font-size: 12px; color: var(--muted); }
.review-item .your b { color: var(--ink-2); font-family: var(--mono); }
.review-item .explain { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); line-height: 1.75; }

/* --------------------------------------------------------------------------
   速查页
   -------------------------------------------------------------------------- */

.cheat-hero { padding: 56px 0 22px; }
.cheat-hero h1 { font-size: clamp(42px, 5.4vw, 68px); line-height: 1.03; letter-spacing: -0.055em; margin: 14px 0 16px; }
.cheat-hero p { max-width: 640px; color: var(--muted); font-size: 14.5px; line-height: 1.85; }

.cheat-tabs { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.cheat-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 17px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}
.cheat-tabs button.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.cheat-content { display: none; padding: 30px 0 80px; }
.cheat-content.is-active { display: block; }

.lib-panel { display: none; padding: 20px 0 90px; }
.lib-panel.is-active { display: block; }

.cheat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cheat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 25px 26px;
  overflow-x: auto;
}
.cheat-card code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: #f1f5fa;
  padding: 1px 5px;
  border-radius: 4px;
}
.cheat-card .code-block { margin-top: 14px; }
.cheat-card .cheat-table { min-width: 380px; }
.cheat-card.wide { grid-column: 1 / -1; }
.cheat-card h2 { font-size: 19px; letter-spacing: -0.025em; margin-bottom: 4px; }
.cheat-card .cheat-sub { color: var(--muted); font-size: 12px; margin-bottom: 16px; }
.cheat-card h3 { font-size: 13px; letter-spacing: -0.01em; margin: 18px 0 8px; }
.cheat-card p { font-size: 13px; color: var(--ink-2); line-height: 1.8; }

.cheat-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cheat-table th, .cheat-table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.cheat-table th { font-size: 9.5px; letter-spacing: 0.1em; color: var(--muted); font-weight: 800; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.cheat-table td:first-child { font-family: var(--mono); color: var(--ink); white-space: nowrap; }
.cheat-table tr:last-child td { border-bottom: 0; }

.trap-list { display: flex; flex-direction: column; gap: 10px; }
.trap-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: #fbfcfe; border: 1px solid var(--line-soft); }
.trap-item .trap-mark { flex: none; width: 19px; height: 19px; border-radius: 50%; background: var(--red-soft); color: var(--red); font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.trap-item .trap-body { font-size: 12.5px; line-height: 1.65; color: var(--ink-2); }
.trap-item .trap-body b { color: var(--ink); }
.trap-item code { font-family: var(--mono); font-size: 11.5px; background: #f1f5fa; padding: 1px 5px; border-radius: 4px; }

.cheat-note {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--orange-soft);
  border: 1px solid #f6d6c4;
  font-size: 12px;
  line-height: 1.7;
  color: #8a4a2c;
}
.cheat-note b { color: #6f351c; }

/* --------------------------------------------------------------------------
   动画
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1120px) {
  .main-nav { gap: 0; }
  .main-nav a { padding: 9px 10px; font-size: 13px; }
  .hero-top { grid-template-columns: minmax(0, 1fr) 310px; gap: 34px; }
  .plan-grid { grid-template-columns: repeat(4, 1fr); }
  .plan-card:nth-child(5) { grid-column: auto; }
  .q-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(3), .step:nth-child(4) { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 30px; }
  .step:nth-child(3)::before, .step:nth-child(4)::before { top: -5px; }
}

@media (max-width: 920px) {
  .container { width: min(100% - 40px, 760px); }
  .practice-note { display: none; }
  .footer-simple { flex-direction: column; align-items: flex-start; gap: 24px; }
  .trap-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .header-actions { margin-left: auto; }
  .menu-toggle { display: flex; }
  .header-cta { display: none; }
  .site-header.menu-open .mobile-panel { display: block; }
  .hero { padding-top: 30px; }
  .hero-top { grid-template-columns: 1fr; gap: 26px; }
  .hero-card-wrap { display: none; }
  .hero h1 { font-size: clamp(42px, 8vw, 62px); }
  .hero-art { margin-top: 20px; }
  .section { padding: 78px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .section-head .head-link { padding-bottom: 0; }
  .tracks-grid { grid-template-columns: 1fr; }
  .track-card { min-height: 380px; }
  .diagnose-panel { grid-template-columns: 1fr; gap: 34px; padding: 40px 28px; }
  .cheat-panel { grid-template-columns: 1fr; gap: 34px; padding: 40px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .page-hero-grid { grid-template-columns: 1fr; }
  .page-hero-side { display: none; }
  .chapter-grid { grid-template-columns: 1fr; }
  .code-list { grid-template-columns: 1fr; }
  .q-list { grid-template-columns: 1fr; }
  .diag-layout { grid-template-columns: 1fr; gap: 30px; }
  .diag-preview { display: none; }
  .gap-report { grid-template-columns: 1fr; }
  .exam-setup-grid { grid-template-columns: 1fr; }
  .exam-layout { grid-template-columns: 1fr; }
  .palette-card { position: static; order: -1; }
  .palette { grid-template-columns: repeat(10, 1fr); }
  .result-top { grid-template-columns: 1fr; text-align: center; }
  .score-ring { margin: 0 auto; }
  .result-copy .result-actions { justify-content: center; }
  .result-stats { justify-content: center; }
  .cheat-grid { grid-template-columns: 1fr; }
  .cheat-card.wide { grid-column: auto; }
  .practice-hero-grid { flex-direction: column; align-items: flex-start; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .mode-tabs { display: flex; width: 100%; }
  .mode-tabs a { flex: 1; text-align: center; padding: 9px 10px; }
  .filter-count { display: none; }
  .filters { position: static; }
  .exam-topbar { position: static; }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 32px); }
  .hero-art img { height: 300px; object-fit: cover; object-position: center 58%; }
  .steps.steps-3 { grid-template-columns: 1fr; }
  .steps.steps-3 .step { border-right: 0; border-top: 1px solid var(--line); padding-top: 28px; }
  .steps.steps-3 .step:first-child { border-top: 0; }
  .container-wide { width: calc(100% - 20px); }
  .header-inner { gap: 12px; }
  .brand-word { font-size: 27px; }
  .brand-sub { font-size: 7.5px; }
  .menu-toggle { width: 38px; height: 38px; }
  .hero h1 { font-size: clamp(38px, 10vw, 52px); }
  .hero-lead { font-size: 14.5px; }
  .hero-actions .btn { flex: 1; min-width: 150px; }
  .hero-proof { gap: 8px 14px; font-size: 11px; }
  .section { padding: 64px 0; }
  .section-head h2 { font-size: 30px; }
  .track-card { padding: 30px 24px 26px; min-height: 360px; }
  .track-card h3 { font-size: 34px; }
  .track-letter { font-size: 200px; }
  .plan-grid { display: grid; grid-auto-flow: column; grid-auto-columns: 244px; grid-template-columns: none; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
  .plan-card { scroll-snap-align: start; }
  .q-grid { grid-template-columns: 1fr; }
  .trap-grid { grid-template-columns: 1fr; }
  .diagnose-panel, .cheat-panel { border-radius: 24px; padding: 30px 22px; }
  .diagnose-copy h2, .cheat-copy h2 { font-size: 30px; }
  .footer-cta h2 { font-size: 38px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; margin-top: 44px; padding-top: 34px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .modal { padding: 10px; }
  .sample-item { grid-template-columns: 1fr; }
  .modal-dialog { padding: 24px 18px 20px; max-height: calc(100vh - 20px); border-radius: 20px; }
  .modal-dialog h2 { font-size: 21px; }
  .diag-card { padding: 22px 18px; }
  .diag-card h2 { font-size: 20px; }
  .result-head h1 { font-size: 38px; }
  .report-row { grid-template-columns: 84px 1fr 36px; }
  .exam-main { padding: 22px 18px; }
  .exam-main h2 { font-size: 19px; }
  .palette { grid-template-columns: repeat(5, 1fr); }
  .exam-topbar-inner { flex-wrap: wrap; gap: 10px; }
  .result-top { gap: 24px; }
  .score-ring { width: 190px; height: 190px; }
  .score-ring strong { font-size: 48px; }
  .cheat-card { padding: 20px 18px; }
  .practice-hero h1 { font-size: 42px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stat-card { padding: 12px 12px; min-height: 76px; }
  .stat-card .stat-label { font-size: 9px; letter-spacing: 0.06em; }
  .stat-card strong { font-size: 23px; }
  .filters { gap: 7px; }
  .search-box { max-width: none; flex-basis: 100%; }
  .modal-foot { flex-direction: column; align-items: stretch; }
  .modal-foot .btn { width: 100%; }
}

@media print {
  .site-header, .site-footer, .filters, .cheat-tabs, .hero-actions, .btn { display: none !important; }
  body { background: #fff; }
  .cheat-content, .lib-panel { display: none !important; padding: 0; }
  .cheat-content.is-active, .lib-panel.is-active { display: block !important; }
  .cheat-hero { padding: 0 0 20px; }
  .cheat-card { break-inside: avoid; box-shadow: none; }
}

/* practice page: compact list */
body[data-page="practice"] .practice-actions,
body[data-page="practice"] .stat-grid,
body[data-page="practice"] .practice-tabs-row,
body[data-page="practice"] .filters {
  display: none;
}
body[data-page="practice"] .list-card { cursor: pointer; }
body[data-page="practice"] .card-arrow {
  color: var(--muted);
  font-size: 15px;
  transition: transform 0.15s ease, color 0.15s ease;
}
body[data-page="practice"] .list-card:hover .card-arrow {
  color: var(--orange);
  transform: translateX(3px);
}


/* 模式切换：稳定滚动条，避免整页宽度跳动 */
html { scrollbar-gutter: stable; }
.mode-panel.is-active { animation: modeIn 0.22s ease both; }
@keyframes modeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mode-panel.is-active { animation: none; }
}


/* Header: square menu button on all widths, text nav hidden */
.site-header .main-nav { display: none; }
.site-header .header-actions { margin-left: auto; }
.site-header .menu-toggle { display: flex; }
.site-header.menu-open .mobile-panel { display: block; }


/* Menu drops over content instead of pushing the page */
.site-header .mobile-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  box-shadow: 0 18px 40px rgba(18, 34, 56, 0.08);
}


/* Practice question card: sticker direction */
body[data-page="practice"] .q-list {
  gap: 22px 20px;
}
body[data-page="practice"] .list-card {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 18px 20px 14px;
  box-shadow: 5px 5px 0 var(--orange);
  overflow: visible;
  transform: rotate(-0.18deg);
}
body[data-page="practice"] .list-card:nth-child(even) {
  transform: rotate(0.18deg);
}
body[data-page="practice"] .list-card::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed #dfe7f0;
  border-radius: 11px;
  pointer-events: none;
}
body[data-page="practice"] .list-card:hover {
  transform: rotate(0) translateY(-3px);
  border-color: var(--ink);
  box-shadow: 7px 7px 0 var(--orange);
}
body[data-page="practice"] .list-card .row {
  padding-left: 34px;
  position: relative;
  z-index: 1;
}
body[data-page="practice"] .list-card h3,
body[data-page="practice"] .list-card .snippet,
body[data-page="practice"] .list-card .foot {
  position: relative;
  z-index: 1;
}
body[data-page="practice"] .list-card h3 {
  font-size: 16.5px;
  letter-spacing: -0.02em;
}
body[data-page="practice"] .list-card .snippet {
  background: #fbfdff;
  border: 1px dashed #d7e2ee;
  border-radius: 8px;
}
body[data-page="practice"] .sticker-tag {
  position: absolute;
  left: -8px;
  top: 12px;
  z-index: 3;
  background: var(--orange);
  color: #fff;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 5px 9px;
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-4deg);
  pointer-events: none;
}
body[data-page="practice"] .list-card .card-arrow {
  color: var(--ink);
  font-weight: 800;
}


/* Sticker card: tag sits above the card, no overlap with meta */
body[data-page="practice"] .q-list { gap: 30px 20px; }
body[data-page="practice"] .list-card .row { padding-left: 0; padding-top: 4px; }
body[data-page="practice"] .sticker-tag {
  left: 16px;
  top: -12px;
}


/* Logo tittle: center over the dotless i stem */
.brand-word .brand-dot { left: calc(50% + 0.035em); }




/* Question-type switch */
.lang-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 26px 0 4px;
}
.lang-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: background .16s ease, color .16s ease;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.is-active { background: var(--ink); color: #fff; }
.lang-note {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  color: var(--muted);
}

/* Handwritten code questions */
body[data-mode="code"] .practice-hero .practice-hero-grid { display: none; }
body[data-mode="code"] .practice-hero { padding-top: 34px; padding-bottom: 0; }
.code-head { display: block; padding: 8px 0 4px; }
.code-head h1 {
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -.055em;
  margin: 12px 0 12px;
}
.code-head-row p { max-width: 680px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.code-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.code-count {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  color: var(--muted);
}
.code-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 20px;
}
.code-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 19px 15px;
  box-shadow: 0 16px 34px -30px rgba(16,36,59,.34);
  min-width: 0;
}
.code-card-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.code-index {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #fff;
  background: var(--orange);
  border-radius: 4px;
  padding: 4px 7px;
  box-shadow: 2px 2px 0 var(--ink);
}
.code-level { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.code-level em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .04em;
  color: var(--muted);
}
.code-level .dots { display: inline-flex; gap: 2px; }
.code-level .dots i { width: 4px; height: 4px; border-radius: 50%; background: #e6edf5; display: block; }
.code-level .dots i.on { background: var(--orange); }
.code-hand {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .14em;
  color: #a9b7c7;
  border: 1px solid #edf2f8;
  border-radius: 4px;
  padding: 2px 5px;
}
.code-card h3 {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: -.025em;
  margin: 12px 0 8px;
}
.code-prompt {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
}
.code-req {
  margin: 10px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.code-req li {
  position: relative;
  padding-left: 13px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
}
.code-req li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e4a084;
}
.code-example {
  margin-top: 12px;
  border: 1px dashed #dfe8f2;
  border-radius: 8px;
  padding: 8px 9px;
  background: #fbfdff;
}
.code-example > span {
  display: block;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .14em;
  color: #a3b2c2;
  margin-bottom: 3px;
}
.code-example pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  color: #60758a;
  white-space: pre-wrap;
}
.code-answer {
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
}
.code-answer summary {
  cursor: pointer;
  list-style: none;
  color: var(--orange);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  user-select: none;
}
.code-answer summary::-webkit-details-marker { display: none; }
.code-answer summary span {
  font-family: var(--mono);
  font-size: 10px;
  color: #b9a394;
  transition: transform .16s ease;
}
.code-answer[open] summary span { transform: rotate(180deg); }
.code-answer-pre {
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 9px;
  background: #0b1d31;
  color: #d8e8f8;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (max-width: 980px) {
  .code-list { grid-template-columns: 1fr; }
  .code-head-row { flex-direction: column; align-items: flex-start; }
}


/* Compile judge workspace */
.judge-head { padding: 8px 0 4px; }
.judge-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.judge-head h1 {
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
  letter-spacing: -.055em;
  margin: 12px 0 12px;
}
.judge-head p:last-child { max-width: 680px; color: var(--muted); font-size: 14px; line-height: 1.8; }

.judge-shell {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
  align-items: start;
}
.judge-problem {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.judge-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.judge-select-row label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
}
#judge-select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: #fbfdff;
  color: var(--ink);
  font-size: 12px;
  outline: none;
}
.judge-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.judge-num {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #fff;
  background: var(--orange);
  border-radius: 4px;
  padding: 4px 7px;
  box-shadow: 2px 2px 0 var(--ink);
}
.judge-level {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 8.5px;
  color: var(--muted);
}
.judge-problem h2 {
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -.03em;
  margin: 10px 0 8px;
}
.judge-prompt { font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.judge-req { margin: 10px 0 0; display: flex; flex-direction: column; gap: 5px; }
.judge-req li {
  position: relative;
  padding-left: 13px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
}
.judge-req li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e4a084;
}
.judge-example {
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px dashed #dfe8f2;
  border-radius: 8px;
  background: #fbfdff;
}
.judge-example > span {
  display: block;
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .14em;
  color: #a3b2c2;
  margin-bottom: 3px;
}
.judge-example pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  color: #60758a;
  white-space: pre-wrap;
}
.judge-ref { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 9px; }
.judge-ref summary {
  cursor: pointer;
  list-style: none;
  color: var(--orange);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.judge-ref summary::-webkit-details-marker { display: none; }
.judge-ref summary span { font-family: var(--mono); color: #b9a394; }
.judge-ref[open] summary span { transform: rotate(180deg); }
.judge-ref pre {
  margin: 9px 0 0;
  padding: 11px;
  border-radius: 8px;
  background: #0b1d31;
  color: #d8e8f8;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.judge-work { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.judge-editor {
  background: #0b1d31;
  border: 1px solid #203e5b;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 22px 44px -34px rgba(6,26,48,.7);
}
.judge-bar {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #081625;
  border-bottom: 1px solid rgba(164,196,226,.12);
}
.judge-window-dots { display: inline-flex; gap: 5px; }
.judge-window-dots i { width: 7px; height: 7px; border-radius: 50%; background: #e9642c; display: block; }
.judge-window-dots i:nth-child(2) { background: #d9ac58; }
.judge-window-dots i:nth-child(3) { background: #4f9077; }
.judge-file { font-family: var(--mono); font-size: 10px; color: #9db8d2; }
.judge-status { margin-left: auto; font-family: var(--mono); font-size: 9px; color: #6e8da9; }
.judge-status.is-busy { color: #ffab82; }
.judge-code-wrap {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  height: 410px;
  background: #081625;
}
.judge-gutter {
  padding: 12px 7px 12px 0;
  overflow: hidden;
  text-align: right;
  color: #466582;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.65;
  white-space: pre;
  user-select: none;
  border-right: 1px solid rgba(164,196,226,.08);
}
#judge-code {
  width: 100%;
  height: 100%;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dceaf9;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  padding: 12px 14px;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}
.judge-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-top: 1px solid rgba(164,196,226,.12);
  background: #0a1a2b;
}
.judge-actions .btn { padding: 8px 16px; font-size: 12px; }
.judge-shortcut { margin-left: auto; font-family: var(--mono); font-size: 9px; color: #5f7d9b; }
.judge-stdin-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.judge-stdin-box label {
  display: block;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 5px;
}
#judge-stdin {
  width: 100%;
  height: 58px;
  resize: vertical;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #f8fbff;
  padding: 7px 9px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-2);
  outline: none;
}
#judge-stdin:focus { border-color: #edc6b3; }

.judge-output-card {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.judge-output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .12em;
  color: var(--muted);
}
#judge-output { padding: 13px; min-height: 70px; }
.judge-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  padding: 8px 10px;
  background: #f8fbff;
  border: 1px dashed #dfe8f2;
  border-radius: 8px;
}
.judge-note.bad { color: var(--red); background: var(--red-soft); border-color: #f3d0c9; }
.judge-pre {
  margin: 9px 0 0;
  padding: 10px 11px;
  background: #f7fafd;
  border: 1px solid #e9f0f7;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink-2);
}
.judge-pre.muted { color: var(--muted); }
.judge-pre.bad { color: var(--red); background: var(--red-soft); border-color: #f3d0c9; }
.judge-metrics { font-family: var(--mono); font-size: 9px; color: var(--muted); }
.judge-verdict {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
}
.judge-verdict.ok { background: #f6fcf9; border: 1px solid #d3e9dd; color: var(--green); }
.judge-verdict.bad { background: #fff8f6; border: 1px solid #f0d2cb; color: var(--red); }
.judge-verdict span { font-family: var(--mono); font-size: 10px; }
.judge-case { margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 10px; }
.judge-case.ok { border-color: #d3e9dd; }
.judge-case.bad { border-color: #f0d2cb; }
.judge-case-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--muted);
}
.judge-case.ok .judge-case-head strong { color: var(--green); }
.judge-case.bad .judge-case-head strong { color: var(--red); }
.judge-case-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 7px; }
.judge-case-grid span { font-family: var(--mono); font-size: 8px; letter-spacing: .1em; color: #9aabba; }
.judge-case-grid pre {
  margin: 3px 0 0;
  padding: 6px 7px;
  border-radius: 5px;
  background: #f7fafd;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--ink-2);
}
@media (max-width: 980px) {
  .judge-head-row { flex-direction: column; align-items: flex-start; }
  .judge-shell { grid-template-columns: 1fr; }
  .judge-code-wrap { height: 330px; }
  .judge-case-grid { grid-template-columns: 1fr; }
}


/* Practice: language + type controls */
.practice-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 26px 0 4px;
}
.practice-controls .lang-note { margin-left: auto; }
.type-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.type-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 15px;
  font-size: 11.5px;
  font-weight: 700;
  transition: background .16s ease, color .16s ease;
}
.type-switch button:hover { color: var(--ink); }
.type-switch button.is-active { background: var(--orange); color: #fff; }
#code-view { margin-top: 18px; }
.code-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--muted);
}
.code-card { transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.code-card:hover { transform: translateY(-3px); border-color: #edc7b5; box-shadow: var(--shadow-soft); }
.code-card .code-open {
  margin-top: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.code-card .code-open:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.code-card .code-open span { color: var(--orange); }
.code-card .code-open:hover span { color: #ffb08b; }

/* Per-question code modal */
.code-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}
.code-modal.is-open { display: block; }
.code-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 21, 36, 0.58);
  backdrop-filter: blur(5px);
}
.code-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  height: min(88vh, 900px);
  margin: 6vh auto 0;
  background: #f7f9fc;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(4, 16, 29, .35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.code-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.code-modal-meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--orange);
}
.code-modal-head h2 {
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -.025em;
  margin-top: 3px;
}
.code-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  flex: none;
}
.code-modal-close:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.code-modal-body {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  min-height: 0;
  flex: 1;
}
.code-modal-problem {
  overflow: auto;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #fff;
}
.code-modal-work {
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.code-modal-work .judge-code-wrap { height: 330px; }
.code-modal-work .judge-output-card { margin-top: 0; }
.code-modal-work #judge-output { max-height: 220px; overflow: auto; }
body.code-modal-open { overflow: hidden; }
@media (max-width: 980px) {
  .code-modal-dialog {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
  }
  .code-modal-body {
    display: block;
    overflow: auto;
  }
  .code-modal-problem { max-height: none; border-right: 0; border-bottom: 1px solid var(--line); }
  .code-modal-work { overflow: visible; }
  .code-modal-work .judge-code-wrap { height: 300px; }
}


/* Code cards use the same sticker language as choice cards */
body[data-page="practice"] #code-view .code-list { gap: 30px 20px; margin-top: 20px; }
body[data-page="practice"] .code-card {
  position: relative;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 27px 20px 14px;
  box-shadow: 5px 5px 0 var(--orange);
  transform: rotate(-0.18deg);
  overflow: visible;
}
body[data-page="practice"] .code-card:nth-child(even) { transform: rotate(0.18deg); }
body[data-page="practice"] .code-card::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed #dfe7f0;
  border-radius: 11px;
  pointer-events: none;
}
body[data-page="practice"] .code-card:hover {
  transform: rotate(0) translateY(-3px);
  border-color: var(--ink);
  box-shadow: 7px 7px 0 var(--orange);
}
body[data-page="practice"] .code-card > * { position: relative; z-index: 1; }
body[data-page="practice"] .code-card .code-index {
  position: absolute;
  left: 16px;
  top: -20px;
  z-index: 3;
  padding: 5px 9px;
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-4deg);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
  background: var(--orange);
}
body[data-page="practice"] .code-card .code-card-top { padding-top: 12px; }
body[data-page="practice"] .code-card .code-open {
  margin-top: 12px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 0 0;
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  text-align: left;
}
body[data-page="practice"] .code-card .code-open:hover { background: transparent; color: var(--orange); }
body[data-page="practice"] .code-card .code-open span { color: var(--orange); }


/* Syntax-highlight overlay */
.judge-editor-area {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.judge-highlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  padding: 12px 14px;
  color: #dceaf9;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  tab-size: 2;
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
}
.judge-editor-area #judge-code {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #fff;
  background: transparent;
}
.judge-editor-area #judge-code::selection {
  background: rgba(240, 128, 74, .34);
}
.judge-highlight .tok-kw { color: #ff9b70; }
.judge-highlight .tok-type { color: #82b9e8; }
.judge-highlight .tok-str { color: #9ed3aa; }
.judge-highlight .tok-num { color: #f1cf98; }
.judge-highlight .tok-com { color: #6886a2; font-style: italic; }
.judge-highlight .tok-pre { color: #d8a0ff; }
.judge-highlight .tok-fn { color: #7dc4a5; }
.judge-highlight .tok-punc { color: #8fa7bd; }


body[data-page="practice"] .code-card { cursor: pointer; padding-bottom: 28px; }
body[data-page="practice"] .code-card-enter {
  position: absolute;
  right: 19px;
  bottom: 12px;
  z-index: 2;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  transition: transform .16s ease, color .16s ease;
}
body[data-page="practice"] .code-card:hover .code-card-enter {
  color: var(--orange);
  transform: translateX(3px);
}
body[data-page="practice"] .code-card:focus-visible {
  outline: 3px solid rgba(233, 100, 44, .42);
  outline-offset: 4px;
}


/* Fullscreen buttons */
.modal-fullscreen { right: 60px; font-size: 15px; }
.code-modal-head-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.code-modal-fullscreen { font-size: 15px; }
.modal-dialog:fullscreen,
.modal-dialog.is-fullscreen {
  width: 100vw;
  max-width: none;
  max-height: none;
  height: 100vh;
  border-radius: 0;
  padding: 32px 40px;
  overflow: auto;
}
.code-modal-dialog:fullscreen,
.code-modal-dialog.is-fullscreen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  border-radius: 0;
}

/* Slightly smaller run control */
.code-modal-work .judge-actions .btn {
  min-height: 0;
  height: 34px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 12px;
  box-shadow: none;
}
.code-modal-work .judge-actions .btn-primary {
  background: var(--orange);
  border-color: var(--orange);
}
.code-modal-work .judge-actions { padding: 9px 12px; }

/* Stronger contrast inside the code window */
.code-modal-problem .judge-prompt {
  color: #334a61;
  font-size: 13px;
}
.code-modal-problem .judge-req li {
  color: #50667c;
  font-size: 12px;
}
.code-modal-problem .judge-example > span {
  color: #70869a;
}
.code-modal-problem .judge-example pre {
  color: #40576d;
  font-size: 11px;
}
.code-modal-problem .judge-level {
  color: #5f7589;
}
.code-card .code-prompt { color: #3f566c; }
.code-card .code-example pre { color: #4d6479; }
.code-card .code-level em { color: #60758a; }
.judge-highlight .tok-com { color: #8ea7c0; }
.judge-highlight .tok-punc { color: #a5b8ca; }


/* Larger, vertically resizable code area */
.code-modal-work .judge-code-wrap {
  height: 460px;
  min-height: 240px;
  max-height: 56vh;
}
.judge-resize {
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ns-resize;
  touch-action: none;
  background: #0a1a2b;
  border-top: 1px solid rgba(164,196,226,.1);
  outline: none;
}
.judge-resize em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
  color: #5f7d9b;
  opacity: .45;
  margin-left: 8px;
}
.judge-resize:hover em { opacity: 1; }
.judge-resize span {
  width: 42px;
  height: 3px;
  border-radius: 99px;
  background: #2e4b67;
  transition: background .15s ease, width .15s ease;
}
.judge-resize:hover span,
.judge-resize:focus-visible span {
  width: 54px;
  background: var(--orange);
}

/* Consistent scrollbars */
html { scrollbar-width: thin; scrollbar-color: #c9d5e2 transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #c9d5e2;
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: #e9642c;
  background-clip: content-box;
}
#judge-code { scrollbar-width: thin; scrollbar-color: #2c4a66 #081625; }
#judge-code::-webkit-scrollbar { width: 10px; height: 10px; }
#judge-code::-webkit-scrollbar-track { background: #081625; }
#judge-code::-webkit-scrollbar-thumb {
  background: #2c4a66;
  border: 2px solid #081625;
  border-radius: 99px;
}
#judge-code::-webkit-scrollbar-thumb:hover { background: #e9642c; }
.code-modal-problem,
.code-modal-work,
#judge-output {
  scrollbar-width: thin;
  scrollbar-color: #c9d5e2 transparent;
}


/* Syntax colors in the reference-code block */
.judge-ref-pre .tok-kw { color: #ff9b70; }
.judge-ref-pre .tok-type { color: #82b9e8; }
.judge-ref-pre .tok-str { color: #9ed3aa; }
.judge-ref-pre .tok-num { color: #f1cf98; }
.judge-ref-pre .tok-com { color: #8ea7c0; font-style: italic; }
.judge-ref-pre .tok-pre { color: #d8a0ff; }
.judge-ref-pre .tok-fn { color: #7dc4a5; }
.judge-ref-pre .tok-punc { color: #a5b8ca; }


.fs-expand, .fs-collapse { width: 15px; height: 15px; display: block; }
.fs-collapse { display: none; }
[data-fullscreen].is-on .fs-expand { display: none; }
[data-fullscreen].is-on .fs-collapse { display: block; }
.code-modal-close { display: flex; align-items: center; justify-content: center; }


/* Choice chapter picker */
.chapter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
}
.chapter-row label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
}
#chapter-picker {
  width: min(280px, 100%);
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  padding: 8px 10px;
  outline: none;
}
#chapter-picker:focus { border-color: #edc6b3; }
body[data-mode="diagnose"] .code-lang { display: none; }


/* Custom chapter menu */
.chapter-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 0;
}
.chapter-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
}
.chapter-drop { position: relative; width: min(300px, 100%); }
.chapter-trigger {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  padding: 7px 10px 7px 11px;
  text-align: left;
}
.chapter-trigger:hover { border-color: #edc6b3; }
.chapter-trigger svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.chapter-drop.is-open .chapter-trigger { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(233,100,44,.1); }
.chapter-drop.is-open .chapter-trigger svg { transform: rotate(180deg); }
.chapter-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-height: min(70vh, 420px);
  overflow: auto;
  z-index: 40;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 44px -22px rgba(16,36,59,.4);
}
.chapter-drop.is-open .chapter-menu { display: block; }
.chapter-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  text-align: left;
  padding: 8px 9px;
  font-size: 12px;
  line-height: 1.4;
}
.chapter-menu button:hover { background: #f4f8fc; color: var(--ink); }
.chapter-menu button.is-active { background: var(--orange-soft); color: var(--orange); font-weight: 700; }


/* Library cards: same sticker language as practice */
body[data-page="library"] .chapter-card,
body[data-page="library"] .cheat-card {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--orange);
  overflow: visible;
}
body[data-page="library"] .chapter-card::after,
body[data-page="library"] .cheat-card::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed #dfe7f0;
  border-radius: 11px;
  pointer-events: none;
}
body[data-page="library"] .chapter-card:hover,
body[data-page="library"] .cheat-card:hover {
  border-color: var(--ink);
  box-shadow: 7px 7px 0 var(--orange);
  transform: translateY(-2px);
}
body[data-page="library"] .cheat-card.wide { box-shadow: 5px 5px 0 var(--orange); }


/* About */
.about-hero { padding: 64px 0 26px; }
.about-hero h1 {
  font-family: var(--display);
  font-size: clamp(58px, 8vw, 104px);
  line-height: .9;
  letter-spacing: .01em;
  line-height: 1.02;
  margin: 12px 0 14px;
}
.about-hero p:last-child { max-width: 620px; color: var(--ink-2); font-size: 16px; line-height: 1.8; }
.about-content { padding: 22px 0 80px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.about-card {
  position: relative;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 22px 22px 20px;
  box-shadow: 5px 5px 0 var(--orange);
}
.about-card::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed #dfe7f0;
  border-radius: 11px;
  pointer-events: none;
}
.about-card > * { position: relative; z-index: 1; }
.about-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
  background: var(--orange);
  border-radius: 4px;
  padding: 4px 8px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-3deg);
}
.about-card h2 { font-size: 20px; letter-spacing: -.025em; margin: 12px 0 8px; }
.about-card p { color: var(--ink-2); font-size: 13px; line-height: 1.8; margin-top: 7px; }
.about-card ul { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.about-card li { position: relative; padding-left: 14px; color: var(--ink-2); font-size: 12.5px; line-height: 1.65; }
.about-card li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.about-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
@media (max-width: 800px) {
  .about-hero { padding-top: 42px; }
  .about-grid { grid-template-columns: 1fr; }
}


body[data-page="library"] .chapter-card { cursor: pointer; }
body[data-page="library"] .chapter-card:focus-visible {
  outline: 3px solid rgba(233,100,44,.42);
  outline-offset: 4px;
}


/* Page controls sit above the question list so they are visible immediately */
body[data-page="practice"] #choice-view > .pagination,
body[data-page="practice"] #code-view > .pagination {
  margin: 30px 0 6px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  justify-content: center;
  flex-wrap: wrap;
}


/* Practice quick tools */
.practice-tools {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.practice-tools .tools-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.practice-tools .tools-row + .tools-row { margin-top: 9px; }
.practice-tools .tabs.compact { gap: 2px; }
.practice-tools .tabs.compact button {
  font-size: 11px;
  padding: 7px 10px;
}
.practice-tools .search-box { flex: 1 1 230px; min-width: 180px; }
.practice-tools .search-box input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  padding: 0 11px;
  outline: none;
}
.practice-tools .search-box input:focus { border-color: #edc6b3; }
.practice-tools #level-filter {
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  padding: 0 9px;
  outline: none;
}
.practice-tools .tool-stats {
  margin-left: auto;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}
.practice-tools .tool-stats b { color: var(--ink-2); font-weight: 800; }
.practice-tools .filter-count { color: var(--muted); font-size: 10px; }
.practice-tools .reset-btn {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 700px) {
  .practice-tools .tool-stats { margin-left: 0; white-space: normal; width: 100%; }
  .practice-tools .reset-btn { margin-left: 0; }
}


.pagination .page-info {
  padding: 0 8px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.pagination .page-info b { color: var(--ink); font-weight: 800; }
.pagination .page-jump {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 4px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}
.pagination .page-jump input {
  width: 46px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  text-align: center;
  outline: none;
}
.pagination .page-jump input:focus { border-color: #edc6b3; }


/* Code question pass/fail badge */
.code-status {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
.code-status.is-none { color: #97a6b7; background: #f7fafc; }
.code-status.is-pass { color: #237a4b; background: #eaf8f0; border-color: #bfe7cf; }
.code-status.is-fail { color: #b34918; background: #fff1e9; border-color: #f4c7b2; }


/* Wrong-answer book */
.wrong-page { padding: 52px 0 82px; }
.wrong-page .section-head { margin-bottom: 24px; }
.wrong-page h1 {
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 78px);
  line-height: .95;
  letter-spacing: -.045em;
  margin-top: 10px;
}
.wrong-page #wrong-count { align-self: flex-end; padding-bottom: 8px; }


/* Library knowledge pages */
.knowledge-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cheat-section {
  grid-column: auto;
  padding: 28px 26px 26px;
}
.cheat-section > h2 {
  font-size: 25px;
  letter-spacing: -.03em;
}
.cheat-section > .cheat-sub { margin-bottom: 18px; }
.cheat-topic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.cheat-topic {
  min-width: 0;
  padding: 16px 15px 14px;
  border: 1px dashed #dce6f0;
  border-radius: 12px;
  background: #fbfdff;
}
.cheat-topic h3 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: -.01em;
}
.cheat-topic p { margin: 8px 0 0; }
.cheat-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.cheat-list li {
  position: relative;
  padding-left: 13px;
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.65;
}
.cheat-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .65em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--orange);
}
.cheat-code {
  margin: 10px 0 0;
  padding: 12px 13px;
  overflow-x: auto;
  border-radius: 9px;
  background: #0b1d31;
  color: #dceaff;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.65;
  white-space: pre;
  tab-size: 2;
}
.cheat-topic .cheat-table { margin-top: 4px; }
.cheat-topic .cheat-note { margin-top: 9px; }
@media (max-width: 820px) {
  .cheat-topic-grid { grid-template-columns: 1fr; }
  .cheat-section { padding: 21px 17px; }
}


.about-card a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
  word-break: break-all;
}
