:root {
  --bg: #f4f7f8;
  --card: #fff;
  --ink: #1a2b2f;
  --muted: #5b6e74;
  --brand: #143044;
  --brand-2: #1f6f8b;
  --brass: #9a7340;
  --accent: #f4f0e6;
  --border: #d5e0e3;
  --radius: 12px;
  --shadow: 0 1px 3px #14304414;
  color: var(--ink);
  background: var(--bg);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  line-height: 1.4;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body { background: var(--bg); }

a { color: var(--brand); text-decoration: none; }

a:hover { text-decoration: underline; }

.app-shell {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  max-width: none;
  min-height: 100dvh;
  width: 100%;
}

.preview-bar {
  background: #fff7ed;
  border-bottom: 1px solid #fdba74;
  color: #9a3412;
  padding: 0.35rem 0.85rem;
  text-align: center;
}

.preview-bar .zh { font-size: 0.82rem; font-weight: 700; }

.preview-bar .en { color: #7c2d12; font-size: 0.75rem; }

.topbar {
  align-items: center;
  background: var(--brand);
  color: #fff;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  color: #fff;
  display: flex;
  gap: 0.45rem;
  min-width: 0;
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  display: block;
  flex: none;
  height: 32px;
  width: 32px;
}

.brand-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
}

.brand-sub {
  color: #d7ebee;
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
}

.topnav {
  align-items: center;
  display: flex;
  flex: none;
  gap: 0.85rem;
}

.topnav a {
  color: #e8f3f1;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: right;
  text-decoration: none;
}

.topnav a:hover { text-decoration: underline; }

.topnav .en { color: #d7ebee; display: block; font-size: 0.68rem; }

.main { flex: 1; padding: 0.65rem 0.75rem 0.4rem; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 0.55rem;
  padding: 0.75rem 0.8rem;
}

h1 {
  color: var(--brand);
  font-size: 1.28rem;
  margin: 0 0 0.2rem;
}

h2 {
  font-size: 1.02rem;
  margin: 0 0 0.35rem;
}

.eyebrow {
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.15rem;
}

.hero-mark {
  color: var(--brand);
  display: block;
  height: 48px;
  margin: 0 0 0.2rem;
  width: 48px;
}

.bi, .home-lead {
  display: flex;
  flex-direction: column;
  gap: 0.04rem;
  line-height: 1.32;
}

.bi .en, .home-lead .en, .muted .en {
  color: var(--muted);
  font-size: 0.92em;
  font-weight: 400;
}

.home-lead {
  color: var(--muted);
  margin: 0;
}

.side-note {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0.28rem 0 0;
}

.side-note .zh { color: var(--ink); font-weight: 650; }

.section-head { margin: 0.55rem 0 0.3rem; }

.section-head .zh {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 700;
}

.section-head .en {
  color: var(--muted);
  font-size: 0.95rem;
}

.path-picker {
  align-items: stretch;
  display: flex;
  gap: 0.5rem;
}

.path-primary {
  flex: auto;
  min-height: 0;
}

.path-secondary {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
  margin-left: auto;
}

.chip, .btn {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.95rem;
  gap: 0.2rem;
  justify-content: center;
  line-height: 1.25;
  padding: 0.65rem 1.1rem;
  text-align: center;
}

.chip {
  background: var(--brand);
  color: #fff;
  flex-direction: column;
  font-weight: 700;
  padding: 0.7rem 0.9rem;
}

.chip .en, .btn .en { font-size: 0.78rem; font-weight: 500; opacity: 0.88; }

.chip.side {
  background: #fff;
  border: 1px solid var(--brand);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
  min-height: 2rem;
  padding: 0.28rem 0.7rem;
}

.chip.side .en { color: var(--muted); opacity: 1; }

.list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.list li { margin: 0.22rem 0; }

.list .zh { display: block; }

.steps { list-style: decimal; }

.not-here { list-style: disc; }

.stage {
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.stage:first-of-type { border-top: 0; margin-top: 0.15rem; padding-top: 0; }

.stage h3 { font-size: 0.98rem; margin: 0 0 0.35rem; }

.stage h3 .en { color: var(--muted); display: block; font-size: 0.86rem; font-weight: 500; }

.pack-label {
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0.4rem 0 0.15rem;
}

.btn {
  background: var(--brand);
  border: 0;
  color: #fff;
  cursor: not-allowed;
  flex-direction: column;
  font: inherit;
  font-weight: 700;
  opacity: 0.72;
}

.btn .en { color: #d7ebee; }

.cta-note { margin: 0.35rem 0 0; }

.pack-foot { margin-top: 0.45rem; }

.sample-card {
  background: #f7f8f8;
  border-style: dashed;
}

.footer-disclaimer {
  background: #eef4f5;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.5rem 0.9rem 0.6rem;
  text-align: center;
}

.footer-disclaimer p { margin: 0.35rem 0 0; }

.footer-disclaimer .zh { color: var(--muted); display: block; }

.footer-meta { margin-top: 0.45rem; }

.card-grid {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.card-grid > .card { margin-bottom: 0; }

@media (width <= 380px) {
  .path-picker { flex-direction: column; }
  .path-secondary {
    flex-direction: row;
    flex-wrap: wrap;
    margin-left: 0;
  }
}

@media (width >= 640px) {
  .main { padding: 0.7rem 0.9rem 0.45rem; }

  .hero {
    align-items: start;
    column-gap: 1.15rem;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    row-gap: 0.2rem;
  }

  .hero-copy { grid-column: 1; }

  .hero-aside {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .hero-notes { grid-column: 1; margin-top: 0.35rem; }

  .hero .section-head { margin-top: 0; }

  .hero-aside .path-picker { flex-direction: column; align-items: stretch; }

  .hero-aside .path-secondary {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-left: 0;
  }

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

  .stage-grid {
    align-items: start;
    display: grid;
    gap: 0.35rem 1rem;
    grid-template-columns: 0.7fr 1.3fr;
  }

  .stage-grid > .stage {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
  }

  .stage-grid > .stage + .stage {
    border-left: 1px solid var(--border);
    padding-left: 0.9rem;
  }

  .step-row {
    display: grid;
    gap: 0.4rem 0.9rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 0.2rem;
  }

  .step-row > li { margin: 0; }

  .cta-card {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
  }

  .cta-card h2,
  .cta-card .cta-note { margin: 0; }

  .cta-card h2 { flex: 1 1 10rem; }
}

@media (width >= 1024px) {
  .app-shell {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    max-width: 1200px;
  }

  .main { padding: 0.75rem 1rem 0.5rem; }

  .learn-row { grid-template-columns: 0.72fr 1.28fr; }

  .card-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

  .learn-card .steps {
    display: grid;
    gap: 0.3rem 0.9rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 0.25rem;
  }

  .learn-card .steps > li { margin: 0; }

  .pack-split {
    display: grid;
    gap: 0.15rem 0.9rem;
    grid-template-columns: 1fr 1fr;
  }

  .step-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
