:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-soft: #f1f7f5;
  --ink: #10231f;
  --muted: #5d6f6a;
  --line: #d9e5e1;
  --teal: #0f766e;
  --teal-dark: #0d4f49;
  --amber: #9a6a16;
  --coral: #9d514b;
  --shadow: 0 18px 42px rgba(7, 35, 31, 0.08);
  --radius: 8px;
  --container: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), rgba(15, 118, 110, 0) 280px),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.62;
}

a { color: inherit; }
h1, h2, p { margin: 0; }
.container { width: min(var(--container), calc(100% - 40px)); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 253, 252, 0.92);
  border-bottom: 1px solid rgba(216, 228, 224, 0.72);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--radius);
  color: #fff;
  background: var(--teal);
  box-shadow: 0 7px 16px rgba(15, 118, 110, 0.18);
  font-size: 15px;
  font-weight: 850;
}

.brand-copy { min-width: 0; }
.eyebrow {
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 740;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-title {
  max-width: 260px;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 730;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-lang="zh"] .brand { gap: 12px; }
body[data-lang="zh"] .brand-copy { display: grid; gap: 2px; }
body[data-lang="zh"] .eyebrow {
  font-size: 10.5px;
  font-weight: 720;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
body[data-lang="zh"] .brand-title {
  font-size: 15.5px;
  font-weight: 740;
  line-height: 1.28;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links[hidden] { display: none !important; }

.nav-links a {
  position: relative;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.48);
  opacity: 0;
  transform: scaleX(0.45);
  transform-origin: center;
}

.nav-links a:hover { color: var(--teal-dark); }
.nav-links a:hover::after { opacity: 0.42; transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--teal-dark); }
.nav-links a[aria-current="page"]::after { opacity: 1; transform: scaleX(1); }

.lang-toggle {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.lang-toggle button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
}

.lang-toggle button.active {
  color: #fff;
  background: var(--teal);
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 740;
  cursor: pointer;
}

.mobile-nav-toggle-icon { display: grid; gap: 4px; }
.mobile-nav-toggle-icon span {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.page {
  width: min(980px, calc(100% - 32px));
  margin: 24px auto 42px;
}

.screen-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.sheet-actions {
  margin: 0 0 18px;
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--teal);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 780;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  border-color: rgba(15, 118, 110, 0.22);
  background: #fff;
  color: var(--teal-dark);
}

.print-sheet {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.print-sheet[hidden] { display: none !important; }

.sheet-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.kicker {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  color: var(--teal-dark);
  background: rgba(15, 118, 110, 0.06);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

h1 {
  max-width: 680px;
  font-family: "Iowan Old Style", "Charter", "Bitstream Charter", Georgia, serif;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: 0;
  text-wrap: balance;
}

body[data-lang="zh"] h1 {
  max-width: 760px;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
  font-size: clamp(31px, 3.8vw, 44px);
  line-height: 1.18;
}

.subtitle {
  margin-top: 8px;
  color: var(--teal-dark);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.35;
}

.lead {
  max-width: 720px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}

.note-chip {
  max-width: 148px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.35;
  text-align: center;
}

.three-grid,
.bottom-grid {
  display: grid;
  gap: 14px;
}

.three-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 14px;
}

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

.guide-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(7, 35, 31, 0.04);
}

.list-card { background: var(--surface-soft); }

.small-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.card-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: #dff1ed;
  color: var(--teal-dark);
  font-weight: 850;
}

.three-grid .guide-card:nth-child(2) .card-mark {
  background: #f4ead2;
  color: var(--amber);
}

.three-grid .guide-card:nth-child(3) .card-mark {
  background: #f5e4e1;
  color: var(--coral);
}

.guide-card h2 {
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.28;
}

.guide-card p,
.guide-card li {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.52;
}

.guide-card ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-card p + ul { margin-top: 9px; }

.guide-card li {
  position: relative;
  padding-left: 18px;
}

.guide-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--teal);
}

.sheet-footer {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

@media (hover: hover) {
  .nav-links a::after { transition: opacity 170ms ease, transform 170ms ease; }
}

@media (max-width: 900px) {
  .sheet-header,
  .three-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .note-chip {
    max-width: none;
    width: fit-content;
    text-align: left;
  }
}

@media (max-width: 820px) {
  .topbar-inner { min-height: 62px; }
  .nav { position: relative; }
  .lang-toggle {
    min-height: 44px;
    padding: 3px;
  }
  .lang-toggle button {
    min-height: 38px;
    min-width: 48px;
  }
  .mobile-nav-toggle {
    min-height: 44px;
    display: inline-flex;
  }
  .nav-links {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: min(292px, calc(100vw - 40px));
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
  }
  .nav-links a {
    min-height: 44px;
    justify-content: flex-start;
  }

  .page {
    width: min(100% - 28px, 980px);
    margin: 18px auto 32px;
  }

  .screen-actions {
    position: sticky;
    top: 76px;
    z-index: 35;
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 8px;
    margin: 0 0 14px;
    padding: 8px 0;
    background: rgba(246, 248, 247, 0.94);
    backdrop-filter: blur(14px);
  }

  .btn {
    min-height: 44px;
    border-radius: 12px;
    padding: 0 12px;
    font-size: 14px;
  }

  .print-sheet {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .sheet-header,
  .guide-card,
  .sheet-footer {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(7, 35, 31, 0.04);
  }

  .sheet-header {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }

  .kicker {
    min-height: 26px;
    margin-bottom: 11px;
    font-size: 11px;
  }

  h1 {
    max-width: none;
    font-size: 31px;
    line-height: 1.08;
  }

  body[data-lang="zh"] h1 {
    max-width: none;
    font-size: 29px;
    line-height: 1.2;
  }

  .subtitle {
    margin-top: 7px;
    font-size: 16px;
  }

  .lead {
    margin-top: 9px;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .note-chip {
    max-width: none;
    width: fit-content;
    padding: 9px 11px;
    font-size: 12px;
    text-align: left;
  }

  .three-grid {
    margin: 12px 0;
    gap: 10px;
  }

  .bottom-grid {
    gap: 10px;
  }

  .guide-card {
    padding: 15px;
  }

  .card-mark {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    border-radius: 9px;
  }

  .guide-card h2 {
    font-size: 18px;
    margin-bottom: 7px;
  }

  .guide-card p,
  .guide-card li {
    font-size: 14px;
    line-height: 1.5;
  }

  .guide-card ul {
    gap: 6px;
  }

  .sheet-footer {
    gap: 6px;
    margin-top: 12px;
    padding: 14px;
    font-size: 12.5px;
    line-height: 1.45;
  }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, var(--container)); }
  .topbar-inner { gap: 10px; }
  .brand { gap: 9px; }
  .brand-mark { width: 34px; height: 34px; font-size: 14px; }
  .brand .eyebrow { display: none; }
  .brand-title { max-width: 126px; font-size: 14px; }
  body[data-lang="zh"] .brand { gap: 9px; }
  body[data-lang="zh"] .brand-title { font-size: 14px; line-height: 1.22; }
  .lang-toggle button { min-width: 42px; padding: 0 7px; }
  .mobile-nav-toggle { min-width: 38px; padding: 0 9px; }
  .mobile-nav-toggle-text { display: none; }

  .page { width: min(100% - 24px, 980px); }
  .screen-actions { top: 72px; }

  .sheet-actions {
    margin-bottom: 14px;
  }

  h1 { font-size: 29px; }
  body[data-lang="zh"] h1 { font-size: 28px; }
}

@media (max-width: 390px) {
  .screen-actions {
    grid-template-columns: 1fr;
  }
}

@page {
  size: letter;
  margin: 0.42in;
}

@media print {
  :root {
    --line: #cfdad7;
    --text: #111f1c;
    --muted: #3f5350;
  }

  html,
  body {
    width: 100%;
    background: #fff;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.34;
  }

  .topbar,
  .skip-link,
  .screen-actions {
    display: none !important;
  }

  .page {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .print-sheet {
    width: 100%;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .print-sheet[hidden] { display: none !important; }
  .sheet-header { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding-bottom: 9px; }
  .kicker { min-height: 0; margin-bottom: 5px; padding: 0; border: 0; background: transparent; font-size: 8.5pt; }
  h1 { max-width: none; font-size: 23pt; line-height: 1.02; }
  body[data-lang="zh"] h1 { font-size: 20pt; line-height: 1.12; }
  .subtitle { margin-top: 4px; font-size: 11.5pt; }
  .lead { margin-top: 6px; max-width: none; font-size: 9.6pt; line-height: 1.32; }
  .note-chip { width: 106px; padding: 7px; border-radius: 7px; font-size: 8.2pt; }
  .three-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 8px; }
  .bottom-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .guide-card { break-inside: avoid; border-radius: 7px; padding: 8px; box-shadow: none; }
  .card-mark { width: 22px; height: 22px; margin-bottom: 5px; border-radius: 6px; font-size: 9pt; }
  .guide-card h2 { margin-bottom: 4px; font-size: 11.2pt; }
  .guide-card p,
  .guide-card li { font-size: 8.8pt; line-height: 1.28; }
  .guide-card .small-note { margin-top: 4px; font-size: 8pt; line-height: 1.22; }
  .guide-card ul { gap: 3px; }
  .guide-card p + ul { margin-top: 4px; }
  .guide-card li { padding-left: 13px; }
  .guide-card li::before { top: 0.58em; width: 4px; height: 4px; }
  .sheet-footer { gap: 3px; margin-top: 8px; padding-top: 6px; font-size: 8.3pt; line-height: 1.28; }
  a { color: inherit; text-decoration: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
