:root {
  --bg: #fff;
  --sidebar-bg: #f7f7f5;
  --text: #222426;
  --muted: #6d7175;
  --line: #e3e4e1;
  --soft: #f5f5f2;
  --accent: #2457a7;
  --accent-soft: #eef3fb;
  --accent-strong: #163f7c;
  --warning: #8a5a12;
  --warning-bg: #fff8e8;
  --success: #287653;
  --success-soft: #edf7f2;
  --sidebar-width: 286px;
  --content-width: 880px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.78;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
.layout { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 34px 28px 30px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  z-index: 20;
}
.site-title {
  display: block;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.site-subtitle {
  color: var(--muted);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 14px;
  margin: 1px 0 25px;
}
.stage-summary {
  padding: 13px 14px;
  border: 1px solid #dbe2ec;
  background: #fff;
  border-radius: 10px;
  margin-bottom: 26px;
}
.stage-summary-label, .nav-label {
  color: #8a8d90;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.stage-summary-value { margin-top: 4px; font-weight: 700; font-size: 14px; color: var(--accent-strong); }
.stage-summary-sub { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.nav-label { margin: 22px 0 8px; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list li { margin: 1px 0; }
.nav-list a {
  display: flex;
  gap: 9px;
  align-items: baseline;
  padding: 7px 8px;
  border-radius: 7px;
  color: #4b4f53;
  font-size: 14px;
}
.nav-list a:hover { background: #ececea; color: #111; }
.nav-list a.active { background: #e8edf5; color: #111; font-weight: 650; }
.nav-index { color: #9a9da0; font-variant-numeric: tabular-nums; min-width: 20px; }
.here-badge {
  display: none;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-list a.current-time .here-badge { display: inline-block; }
.sidebar-progress { font-size: 12px; }
.progress-row { display: flex; justify-content: space-between; color: var(--muted); }
.progress-row strong { color: #383d42; }
.progress-track { height: 5px; background: #e5e6e3; border-radius: 999px; overflow: hidden; margin: 9px 0 10px; }
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
.reset-button {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: #777c80;
  font-size: 11px;
  cursor: pointer;
}
.reset-button:hover { background: #ececea; color: #333; }
.sidebar-note { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); color: #8b8f93; font-size: 11px; line-height: 1.55; }

.main { margin-left: var(--sidebar-width); min-height: 100vh; }
.article { width: min(calc(100% - 72px), var(--content-width)); margin: 0 auto; padding: 76px 0 96px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 14px; }
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", "Songti SC", serif; color: #202124; scroll-margin-top: 28px; }
h1 { font-size: clamp(34px, 5vw, 50px); line-height: 1.13; letter-spacing: -.035em; margin: 0 0 20px; }
.lead { max-width: 790px; margin: 0 0 28px; color: #565b60; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 18px; line-height: 1.8; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; letter-spacing: .01em; }

.status-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 28px 0 18px;
  padding: 18px 20px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef3fb 100%);
}
.status-kicker { color: #6882a6; font-size: 10px; letter-spacing: .14em; font-weight: 800; }
.status-title { margin-top: 3px; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 20px; font-weight: 700; color: #24466f; }
.status-desc { color: #5d6f86; font-size: 13px; margin-top: 2px; }
.status-action { flex: 0 0 auto; padding: 8px 12px; border: 1px solid #b9c9df; border-radius: 8px; background: #fff; color: #345c8d; font-size: 12px; font-weight: 650; }
.status-action:hover { background: #f5f8fc; }

.quick-links { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0 48px; }
.quick-links a { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; color: #565b60; font-size: 13px; background: #fff; }
.quick-links a:hover { border-color: #b9c7dc; color: var(--accent); background: var(--accent-soft); }

.chapter { position: relative; margin-top: 72px; scroll-margin-top: 18px; }
.chapter + .chapter { padding-top: 5px; }
.chapter-heading { display: grid; grid-template-columns: 44px 1fr auto; gap: 15px; align-items: start; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.chapter-number { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid #cfd3d7; border-radius: 50%; font-family: Georgia, serif; font-size: 17px; color: #62686d; }
.chapter-kicker { color: #8b9095; font-size: 10px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; margin-top: 1px; }
.chapter-heading h2 { font-size: 30px; line-height: 1.2; margin: 2px 0 0; letter-spacing: -.02em; }
.section-here { display: none; align-self: center; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 750; letter-spacing: .02em; white-space: nowrap; }
.chapter.current-time .section-here { display: inline-block; }
.chapter.current-time .chapter-number { background: var(--accent); border-color: var(--accent); color: #fff; }
.chapter.current-time .chapter-heading { border-bottom-color: #b9cae0; }
.chapter-block { margin-top: 34px; }
.chapter-block h3 { font-size: 21px; margin: 0 0 12px; }
.chapter-block h4 { font-size: 16px; margin: 24px 0 7px; }
.chapter-block p { margin: 10px 0 15px; }

.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 21px 0 24px; }
.meta-item { border-top: 1px solid var(--line); padding-top: 10px; }
.meta-label { color: #95999d; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.meta-value { margin-top: 3px; color: #41464a; font-size: 14px; }

.note, .warning { margin: 18px 0; padding: 14px 17px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; color: #3e4d62; }
.warning { border-left-color: #d19a36; background: var(--warning-bg); color: #684a1f; }
.text-link { color: var(--accent); border-bottom: 1px solid #c8d6e8; }
.text-link:hover { border-bottom-color: var(--accent); }

.info-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 15px; }
.info-row { display: grid; grid-template-columns: 118px 1fr auto; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-key { padding: 10px 14px; color: #7b8085; font-size: 12px; background: #fafaf8; height: 100%; display: flex; align-items: center; }
.info-value { padding: 10px 14px; font-size: 13px; }
.copy-button { margin-right: 10px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #777d82; font-size: 11px; cursor: pointer; }
.copy-button:hover { color: var(--accent); border-color: #b8c7db; background: var(--accent-soft); }

.tasks { display: grid; gap: 8px; margin: 14px 0 22px; }
.task { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 13px 14px; border: 1px solid #e5e6e3; border-radius: 9px; background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.task:hover { border-color: #cfd5dc; background: #fcfcfb; }
.task input { position: absolute; opacity: 0; pointer-events: none; }
.check-ui { position: relative; width: 18px; height: 18px; border: 1.5px solid #969ca1; border-radius: 4px; background: #fff; margin-top: 3px; }
.task input:checked + .check-ui { background: var(--success); border-color: var(--success); }
.task input:checked + .check-ui::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.task:has(input:checked) { background: var(--success-soft); border-color: #cfe6dc; }
.task:has(input:checked) strong { color: #49665a; text-decoration: line-through; text-decoration-color: #90aa9d; }
.task strong { display: block; color: #353a3e; font-size: 14px; line-height: 1.55; }
.task small { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 2px; }
.task.important { border-left: 3px solid #d7a84a; }
.tasks.compact .task { padding-top: 10px; padding-bottom: 10px; }

.guidance-list { display: grid; gap: 8px; margin: 14px 0 22px; }
.guidance-item { display: grid; grid-template-columns: 14px 1fr; gap: 7px; align-items: start; padding: 5px 2px; color: #4f5458; }
.guidance-dot { color: #9a9da0; line-height: 1.55; }
.guidance-item strong { display: block; color: #3f4448; font-size: 14px; line-height: 1.6; font-weight: 650; }
.guidance-item small { display: block; color: var(--muted); font-size: 12px; line-height: 1.55; margin-top: 2px; }
.tasks .guidance-item { margin: 1px 0; padding: 7px 4px; }

.asset-placeholder { display: flex; align-items: center; gap: 12px; margin: 17px 0 4px; padding: 12px 14px; border: 1px dashed #cfd2d3; border-radius: 9px; background: #fafaf8; color: var(--muted); }
.asset-icon { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid #cfd2d3; border-radius: 7px; background: #fff; color: #70767a; font-size: 11px; font-weight: 800; }
.asset-placeholder strong { display: block; color: #4d5256; font-size: 13px; }
.asset-placeholder span { display: block; font-size: 11px; }

.expense-group { margin: 23px 0; padding: 18px 18px 3px; border: 1px solid var(--line); border-radius: 10px; }
.expense-title { font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 18px; }
.choice-card { border: 1px solid #dde1e4; border-radius: 9px; padding: 15px 15px 7px; background: #fbfbfa; }
.choice-label { color: #90969b; font-size: 10px; letter-spacing: .12em; font-weight: 750; }
.choice-card h4 { margin: 2px 0 9px; font-size: 17px; }
.choice-card .task { background: #fff; }

.link-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.mini-card { padding: 14px 15px; border: 1px dashed #ccd0d3; border-radius: 9px; color: #777d81; pointer-events: none; }
.mini-card > span { display: inline-block; font-size: 9px; font-weight: 750; letter-spacing: .1em; color: #979ca0; }
.mini-card strong { display: block; margin-top: 2px; color: #555b5f; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: 15px; }
.mini-card small { display: block; margin-top: 2px; font-size: 11px; }

.footer { color: #9a9da0; font-size: 12px; margin-top: 76px; padding-top: 24px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; transform: translateY(12px); opacity: 0; pointer-events: none; padding: 9px 12px; border-radius: 8px; background: #26292c; color: #fff; font-size: 12px; transition: .18s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.mobile-topbar, .menu-button { display: none; }

@media (max-width: 880px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.07); }
  body.menu-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; height: 56px; padding: 0 18px; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
  .mobile-title { font-family: Georgia, serif; font-weight: 700; }
  .menu-button { display: inline-flex; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
  .article { width: min(calc(100% - 36px), var(--content-width)); padding: 48px 0 70px; }
}

@media (max-width: 650px) {
  h1 { font-size: 36px; }
  .lead { font-size: 17px; }
  .status-card { align-items: flex-start; flex-direction: column; gap: 12px; }
  .status-action { width: 100%; text-align: center; }
  .meta-grid, .choice-grid, .link-cards { grid-template-columns: 1fr; }
  .chapter-heading { grid-template-columns: 40px 1fr; }
  .chapter-heading .section-here { grid-column: 2; justify-self: start; margin-top: -7px; }
  .info-row { grid-template-columns: 88px 1fr auto; }
  .info-key, .info-value { padding-left: 10px; padding-right: 10px; }
  .copy-button { margin-right: 7px; }
}


/* Self-contained rendering hardening */
.guidance-item { grid-template-columns: 14px minmax(0, 1fr); }
.guidance-dot { display: block; align-self: start; margin-top: 0; }
.qr-placeholder { min-height: 84px; }

.qr-code {
    width: 220px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px 0;
}


/* Clickable resource cards */
.mini-card[href] {
  pointer-events: auto;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, opacity .2s ease;
}
.mini-card[href]:hover {
  border-color: #b9c7dc;
  background: var(--accent-soft);
}

/* One-card link rows */
.link-cards.single-link-card {
  grid-template-columns: 1fr;
}

/* Flight reimbursement A/B choice */
.choice-card {
  transition: opacity .2s ease, filter .2s ease;
}
.choice-card.choice-dimmed {
  opacity: .35;
  filter: grayscale(.35);
}
.choice-selector {
  margin-bottom: 14px;
}
