/* China Healthcare Info
   Visual idea: Chinese hospital wayfinding. Signage green carries navigation,
   emergency red is reserved for emergencies, and Chinese characters are set
   large enough to be shown across a counter. Fonts are self-hosted because
   Google Fonts does not load reliably inside mainland China. */

@font-face { font-family: "Atkinson Next"; src: url(/assets/fonts/atkinson-hyperlegible-next-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Next"; src: url(/assets/fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Next"; src: url(/assets/fonts/atkinson-hyperlegible-next-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Atkinson Next"; src: url(/assets/fonts/atkinson-hyperlegible-next-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Next"; src: url(/assets/fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF; }
@font-face { font-family: "Atkinson Next"; src: url(/assets/fonts/atkinson-hyperlegible-next-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --paper: #f5f8f6;
  --surface: #ffffff;
  --ink: #102620;
  --muted: #4e625b;
  --line: #cfdcd7;
  --tint: #e4eeea;
  --sign: #0b5a48;
  --sign-deep: #08473a;
  --sign-ink: #ffffff;
  --sign-soft: #b9e0d2;
  --red: #c4122f;
  --red-ink: #ffffff;
  --link: #0a6650;
  --focus: #e8a400;

  --sans: "Atkinson Next", "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --zh: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 2.0625rem;
  --step-4: clamp(2.25rem, 1.5rem + 3vw, 3.375rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1714;
    --surface: #13201c;
    --ink: #e3ece8;
    --muted: #9fb3ab;
    --line: #2a3d37;
    --tint: #182925;
    --sign: #0f6a55;
    --sign-deep: #0b5444;
    --sign-soft: #a7d8c6;
    --red: #d42a45;
    --link: #7fd1b5;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
}
[lang^="zh"] { font-family: var(--zh); }
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.narrow { max-width: 46rem; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.02em; max-width: 22ch; }
h2 { font-size: var(--step-2); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 1em; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 40em; line-height: 1.5; }
.fine { font-size: var(--step--1); color: var(--muted); max-width: 44em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: var(--step-1); letter-spacing: -0.01em; }
.mark {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; flex: none;
  background: var(--sign); color: var(--sign-ink); border-radius: 6px;
  font-family: var(--zh); font-weight: 700; font-size: 1.15rem; line-height: 1;
}
.site-header ul { display: flex; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding-block: 0.25rem; border-bottom: 2px solid transparent; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { border-bottom-color: var(--sign); }

.sos { background: var(--red); color: var(--red-ink); font-size: var(--step--1); }
.sos .wrap { padding-block: 0.55rem; }
.sos a { color: inherit; }
.sos-num { font-weight: 800; font-size: 1.1em; text-decoration: none; border-bottom: 2px solid currentColor; }

/* ---------- hero + signboard ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5rem); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: 1.1fr 1fr; } }
.hero-note { color: var(--muted); border-left: 3px solid var(--sign); padding-left: 0.9rem; max-width: 34em; }

.signboard {
  background: var(--sign); color: var(--sign-ink);
  border-radius: 10px; padding: 0.5rem 0;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--sign-deep);
}
.signboard-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding: 0.6rem 1.25rem 0.7rem; font-size: var(--step--1); color: var(--sign-soft); border-bottom: 2px solid var(--sign-ink); }
.signboard-head span:first-child { letter-spacing: 0.3em; }
.signboard ul { list-style: none; margin: 0; padding: 0; }
.signboard li + li { border-top: 1px solid color-mix(in srgb, var(--sign-ink) 28%, transparent); }
.signboard a { display: grid; grid-template-columns: 2.25rem 1fr 2.25rem; align-items: center; gap: 0.75rem; padding: 0.8rem 1.25rem; color: inherit; text-decoration: none; }
.signboard a:hover { background: var(--sign-deep); }
.signboard a:focus-visible { outline-offset: -3px; }
.sign-text { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; }
.sign-text .zh { font-size: 1.9rem; font-weight: 700; letter-spacing: 0.08em; line-height: 1.1; }
.sign-text .en { font-size: var(--step-1); font-weight: 700; color: var(--sign-soft); }
.arrow { width: 2rem; height: 2rem; color: var(--sign-ink); }
.arrow-gap { width: 2rem; }
.arrow-up { transform: rotate(-90deg); }
.arrow-left { transform: rotate(180deg); }
.arrow-up-right { transform: rotate(-45deg); }
.arrow-down { transform: rotate(90deg); }
@media (max-width: 30rem) {
  .signboard a { grid-template-columns: 1.75rem 1fr 1.75rem; padding: 0.7rem 1rem; }
  .sign-text { flex-direction: column; gap: 0; }
  .sign-text .zh { font-size: 1.6rem; }
  .sign-text .en { font-size: var(--step-0); }
  .arrow, .arrow-gap { width: 1.6rem; height: 1.6rem; }
}


/* ---------- lists of guides ---------- */
.section-h { font-size: var(--step-2); margin-bottom: 1.25rem; }
.rows { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 2px solid var(--ink); }
.row { display: grid; grid-template-columns: 5.75rem 1fr; gap: 1.25rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.row-sign { padding-top: 0.2rem; }
.row-sign .zh { display: inline-block; font-size: 1.15rem; font-weight: 700; color: var(--sign); writing-mode: horizontal-tb; letter-spacing: 0.05em; }
.row h3 { font-size: var(--step-1); margin-bottom: 0.3rem; }
.row h3 a { color: var(--ink); text-decoration: none; }
.row h3 a:hover { color: var(--link); text-decoration: underline; }
.row p { margin: 0 0 0.35rem; max-width: 46em; }
.meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; color: var(--muted); font-size: var(--step--1); }
.more { font-weight: 700; }
@media (max-width: 34rem) {
  .row { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ---------- topic labels ---------- */
.tag { display: inline-flex; align-items: baseline; gap: 0.5rem; background: var(--sign); color: var(--sign-ink); text-decoration: none; padding: 0.2rem 0.65rem 0.25rem; border-radius: 4px; font-size: var(--step--1); font-weight: 700; margin-bottom: 1rem; }
.tag .zh { font-size: 1.05rem; letter-spacing: 0.06em; }
.tag:hover { background: var(--sign-deep); }
.tag-big { font-size: var(--step-0); padding: 0.35rem 0.9rem; margin-bottom: 0; }
.tag-big .zh { font-size: 1.35rem; }
.topic-block { margin-top: 2.5rem; }
.topic-block h2 { margin-bottom: 1rem; }

.topic-head { display: flex; gap: clamp(1.25rem, 4vw, 2.5rem); align-items: center; margin-bottom: 2rem; flex-wrap: wrap; }
.topic-head h1 { margin-bottom: 0.25rem; }
.topic-sign { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; background: var(--sign); color: var(--sign-ink); border-radius: 10px; padding: 0.9rem 1.4rem; margin: 0; min-width: 8rem; box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--sign-deep); }
.topic-sign .zh { font-size: 2.6rem; font-weight: 700; letter-spacing: 0.1em; line-height: 1.1; }
.topic-sign .py { font-size: var(--step--1); color: var(--sign-soft); }
.narrow .topic-sign { margin-bottom: 1.5rem; }

.crumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: 1.25rem; }
.crumbs a { color: var(--muted); }

/* ---------- article ---------- */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; padding-block: clamp(2rem, 5vw, 3.5rem); }
@media (min-width: 64rem) { .article-wrap { grid-template-columns: minmax(0, 44rem) 15rem; justify-content: space-between; } }
.article { min-width: 0; }
.article-head h1 { max-width: 20ch; font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
.article-head .meta { margin-bottom: 2rem; }

.answer { background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--sign); border-radius: 0 8px 8px 0; padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.answer h2 { font-size: var(--step-0); color: var(--sign); margin-bottom: 0.4rem; }
.answer p { font-size: var(--step-1); line-height: 1.5; margin: 0; }

.facts { margin-bottom: 2.5rem; }
.facts h2 { font-size: var(--step-1); }
.facts ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.facts li { padding: 0.65rem 0 0.65rem 1.6rem; border-bottom: 1px solid var(--line); position: relative; }
.facts li::before { content: ""; position: absolute; left: 0.2rem; top: 1.15rem; width: 0.6rem; height: 0.6rem; background: var(--sign); border-radius: 1px; transform: rotate(45deg); }

.prose { max-width: 44rem; }
.prose h2 { margin-top: 2.5rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
.prose h3 { margin-top: 1.75rem; }
.prose h2 .anchor, .prose h3 .anchor { color: inherit; text-decoration: none; }
.prose h2 .anchor:hover::after, .prose h3 .anchor:hover::after { content: " #"; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.25em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--sign); font-weight: 700; }
.prose blockquote { margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.25rem; border-left: 3px solid var(--line); color: var(--muted); }
.prose code { font-size: 0.92em; background: var(--tint); padding: 0.1em 0.35em; border-radius: 4px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
th, td { text-align: left; padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--tint); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

.callout { background: var(--tint); border-radius: 8px; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.callout > :last-child { margin-bottom: 0; }
.callout-warning { background: color-mix(in srgb, var(--red) 9%, var(--surface)); border-left: 5px solid var(--red); border-radius: 0 8px 8px 0; }

/* phrase cards — designed to be shown to staff on a phone */
.phrases { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.75rem; margin: 1.5rem 0 2rem; }
.phrase { margin: 0; background: var(--surface); border: 1px solid var(--line); border-top: 5px solid var(--sign); border-radius: 0 0 8px 8px; padding: 1rem 1.15rem 0.9rem; display: flex; flex-direction: column; }
.phrase-zh { font-size: 1.75rem; font-weight: 700; line-height: 1.3; margin: 0 0 0.35rem; color: var(--ink); }
.phrase-py { font-size: var(--step--1); color: var(--muted); margin: 0 0 0.6rem; }
.phrase-en { margin-top: auto; padding-top: 0.6rem; border-top: 1px dashed var(--line); font-weight: 700; font-size: var(--step--1); }

.phrase-band { background: var(--tint); border-block: 1px solid var(--line); padding-block: clamp(2.5rem, 6vw, 4rem); }
.band-lede { color: var(--muted); max-width: 40em; }

.faq h2, .sources h2 { margin-top: 2.5rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
.faq h3 { font-size: var(--step-0); margin: 1.5rem 0 0.35rem; }
.faq p { max-width: 44rem; }
.sources ol { padding-left: 1.3rem; font-size: var(--step--1); }
.sources li { margin-bottom: 0.4rem; overflow-wrap: anywhere; }
.article-foot { margin-top: 2.5rem; padding: 1.25rem 1.5rem; background: var(--tint); border-radius: 8px; font-size: var(--step--1); }
.article-foot p:last-child { margin: 0; }

.rail { font-size: var(--step--1); }
@media (min-width: 64rem) { .rail > * { position: sticky; top: 1.5rem; } }
.rail-h { font-size: var(--step--1); color: var(--muted); margin-bottom: 0.5rem; }
.toc ol { list-style: none; margin: 0 0 1.25rem; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 0.3rem 0 0.3rem 0.9rem; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink); text-decoration: none; }
.toc li a:hover { border-left-color: var(--sign); color: var(--link); }
.rail-md { padding-top: 0.75rem; border-top: 1px solid var(--line); }
@media (max-width: 63.99rem) { .rail { order: -1; display: none; } }

.related, .latest { border-top: 1px solid var(--line); }
.empty { color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 2rem; padding-block: 2.5rem 1.5rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { font-size: var(--step-0); margin-bottom: 0.75rem; }
.footer-h { font-size: var(--step--1); color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: var(--step--1); }
.site-footer li { margin-bottom: 0.35rem; }
.copyright { max-width: var(--wrap); margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
@media print {
  .site-header nav, .sos, .rail, .site-footer, .related { display: none; }
  body { background: #fff; color: #000; }
  .phrase { break-inside: avoid; }
}
