/* Chinese section (/zh). Chinese system fonts first, then the site font. */
.zh-page { font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Inter, system-ui, sans-serif; background: #f8fafc; color: #1e293b; }
.zh-wrap { max-width: 880px; margin: 24px auto 64px; padding: 0 20px; line-height: 1.8; font-size: 1.02rem; }
.zh-crumb { font-size: .85rem; color: #64748b; margin-bottom: 14px; }
.zh-crumb a { color: #4361ee; text-decoration: none; }

.zh-hero { background: #fff; border: 1px solid #e2e8f0; border-top: 4px solid #1e293b; border-radius: 16px; padding: 28px 24px; margin-bottom: 22px; position: relative; }
.zh-hero::before { content: ""; position: absolute; left: 0; top: -4px; width: 72px; height: 4px; background: #c9a227; border-top-left-radius: 16px; }
.zh-kicker { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: #1e293b; background: #f1f5f9; padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.zh-hero h1 { font-size: clamp(1.6rem, 4.4vw, 2.2rem); font-weight: 800; line-height: 1.3; margin: 0 0 12px; color: #0f172a; }
.zh-lead { color: #475569; margin: 0 0 16px; }

.zh-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.zh-toc a { font-size: .86rem; color: #1e293b; text-decoration: none; background: #f1f5f9; border-radius: 999px; padding: 4px 11px; }
.zh-toc a:hover { background: #e2e8f0; }
.zh-disclaimer a { color: #4361ee; }

.zh-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 22px 22px 18px; margin-bottom: 18px; }
.zh-card h2 { font-size: 1.3rem; font-weight: 750; margin: 0 0 10px; color: #0f172a; }
.zh-card h3 { font-size: 1.05rem; font-weight: 700; margin: 18px 0 6px; color: #0f172a; }
.zh-card p { margin: 0 0 12px; }
.zh-card ul, .zh-card ol { margin: 0 0 12px; padding-left: 1.4em; }
.zh-card li { margin-bottom: 6px; }

.zh-tldr { background: #0f172a; color: #e2e8f0; border-radius: 14px; padding: 18px 22px; margin-bottom: 18px; }
.zh-tldr h2 { color: #fff; font-size: 1.05rem; margin: 0 0 8px; letter-spacing: .04em; }
.zh-tldr ul { margin: 0; padding-left: 1.3em; }
.zh-tldr li { margin-bottom: 4px; }
.zh-tldr strong { color: #fcd34d; }

.zh-warn { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; font-size: .94rem; color: #78350f; margin: 0 0 12px; }

.zh-steps { counter-reset: s; list-style: none; padding: 0 !important; }
.zh-steps li { counter-increment: s; position: relative; padding: 0 0 12px 46px; }
.zh-steps li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 8px; background: #1e293b; color: #fcd34d; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .9rem; }

.zh-table { width: 100%; border-collapse: collapse; font-size: .94rem; margin: 6px 0 12px; }
.zh-table th, .zh-table td { border-bottom: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; vertical-align: top; }
.zh-table th { background: #f1f5f9; font-weight: 700; }
.zh-table .en { color: #64748b; font-size: .85rem; }
.zh-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.zh-formula { font-family: ui-monospace, Menlo, monospace; background: #f1f5f9; border-radius: 10px; padding: 12px 14px; font-size: 1.02rem; margin: 0 0 12px; }

.zh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.zh-grid.zh-grid-2 { grid-template-columns: repeat(2, 1fr); }
.zh-tile strong .en { display: inline; font-weight: 600; color: #94a3b8; font-size: .8rem; margin-left: 4px; }
.zh-tile { display: block; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.zh-tile:hover { border-color: #1e293b; transform: translateY(-2px); }
.zh-tile strong { display: block; font-size: 1.08rem; color: #0f172a; margin-bottom: 4px; }
.zh-tile span { font-size: .9rem; color: #64748b; line-height: 1.6; display: block; }
.zh-tile em { display: inline-block; margin-top: 8px; font-style: normal; font-size: .88rem; font-weight: 700; color: #4361ee; }

.zh-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 20px; border-radius: 10px; background: #1e293b; color: #fff; font-weight: 700; text-decoration: none; box-shadow: inset 0 -3px 0 #c9a227; margin: 4px 8px 4px 0; }
.zh-btn.ghost { background: #fff; color: #1e293b; border: 1.5px solid #cbd5e1; box-shadow: none; }

.zh-branches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 12px; }
.zh-branch { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #e2e8f0; border-top: 3px solid var(--br); border-radius: 10px; padding: 10px 12px; text-decoration: none; color: inherit; background: #fff; }
.zh-branch .branch-ico { font-size: 1.2rem; margin-top: 3px; }
.zh-branch b { display: block; color: var(--br); }
.zh-branch small { color: #64748b; font-size: .82rem; line-height: 1.5; display: block; }

.zh-faq details { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: #fff; }
.zh-faq summary { font-weight: 700; cursor: pointer; }
.zh-faq details p { margin: 8px 0 0; }

.zh-sources { font-size: .86rem; color: #475569; }
.zh-sources li { margin-bottom: 4px; word-break: break-word; }
.zh-sources a { color: #4361ee; }
.zh-disclaimer { display: block; font-size: .84rem; color: #64748b; background: #fff; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 12px 14px; margin-top: 24px; line-height: 1.7; }

/* Recruiting stations */
.rc-station { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.rc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.rc-branches { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-pill { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 700; color: var(--br); border: 1px solid #e2e8f0; border-radius: 999px; padding: 2px 10px; }
.rc-addr { font-family: Inter, system-ui, sans-serif; font-weight: 700; color: #0f172a; margin-top: 6px; }
.rc-note { font-size: .9rem; color: #475569; }
.rc-src { font-size: .78rem; color: #94a3b8; margin-top: 4px; line-height: 1.6; }
.rc-src a { color: #64748b; }

/* Vocabulary: category tabs, pages of 20, list or flashcards */
.vx [hidden] { display: none !important; }
.vx-hero { padding-bottom: 18px; }
.vx-hero .zh-lead { margin: 0; }
.vx { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 18px 20px 20px; }
.vx-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.vx-tab { flex: none; border: 1px solid #e2e8f0; background: #f8fafc; color: #334155; border-radius: 999px; padding: 7px 14px; font-size: .92rem; font-weight: 700; cursor: pointer; }
.vx-tab small { font-weight: 500; color: #94a3b8; margin-left: 2px; }
.vx-tab.on { background: #1e293b; border-color: #1e293b; color: #fff; box-shadow: inset 0 -3px 0 #c9a227; }
.vx-tab.on small { color: #cbd5e1; }
.vx-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 6px; }
.vx-mode { display: inline-flex; background: #f1f5f9; border-radius: 10px; padding: 3px; }
.vx-mode button { border: 0; background: transparent; padding: 6px 16px; border-radius: 8px; font-weight: 700; color: #475569; cursor: pointer; font-size: .9rem; }
.vx-mode button.on { background: #fff; color: #0f172a; box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.vx-bar input { flex: 1 1 200px; min-height: 38px; border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 6px 12px; font-size: .95rem; }
.vx-known { font-size: .85rem; color: #15803d; font-weight: 700; margin-left: auto; }
.vx-note { font-size: .85rem; color: #64748b; margin: 0 0 12px; }
.zh-words { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.zh-word { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; position: relative; }
.zh-word.is-known::after { content: "✓"; position: absolute; top: 8px; right: 10px; color: #16a34a; font-weight: 800; font-size: .85rem; }
.zh-word .w { font-weight: 800; color: #0f172a; font-family: Inter, system-ui, sans-serif; }
.zh-word .c { color: #b45309; font-weight: 700; margin-left: 8px; }
.zh-word .ex { display: block; color: #64748b; font-size: .86rem; line-height: 1.5; margin-top: 3px; font-family: Inter, system-ui, sans-serif; }
.vx-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; font-size: .9rem; color: #475569; }
.vx-pager button { border: 1px solid #cbd5e1; background: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 700; color: #1e293b; cursor: pointer; }
.vx-pager button:disabled { opacity: .35; cursor: default; }
.vx-cards { text-align: center; padding: 6px 0 4px; }
.vx-flash { max-width: 520px; margin: 6px auto 14px; border: 1px solid #e2e8f0; border-top: 4px solid #1e293b; border-radius: 16px; padding: 34px 22px 30px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.06); }
.vx-fw { font-family: Inter, system-ui, sans-serif; font-size: 2rem; font-weight: 800; color: #0f172a; }
.vx-fex { font-family: Inter, system-ui, sans-serif; color: #64748b; font-size: .95rem; line-height: 1.6; margin-top: 10px; }
.vx-fc { margin-top: 16px; font-size: 1.5rem; font-weight: 800; color: #b45309; }
.vx-actions { display: flex; justify-content: center; gap: 10px; }
.vx-actions .zh-btn { min-width: 130px; justify-content: center; }
.vx-done { font-size: 1.05rem; font-weight: 700; color: #15803d; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 0; }
.vx-count { font-size: .85rem; color: #94a3b8; margin: 10px 0 0; }
.zh-hidden { display: none !important; }

@media (max-width: 720px) {
  .zh-wrap { padding: 0 14px; margin-top: 14px; }
  .zh-grid, .zh-grid.zh-grid-2, .zh-branches, .zh-words { grid-template-columns: 1fr; }
  .zh-hero, .zh-card { padding: 18px 16px; }
}

/* "新" badge on recently launched pages (src/whats_new.py) */
.zh-new { display: inline-block; font-size: .72rem; font-weight: 800; line-height: 1; color: #fff; background: #dc2626; padding: 3px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; letter-spacing: .02em; }
.zh-whatsnew { border-color: #fecaca; background: #fff7f7; }
.zh-whatsnew ul { margin: 0; padding-left: 1.2em; }
.zh-whatsnew time { color: #64748b; font-size: .85rem; margin-left: 6px; }
