/* china.meta-guide.com — self-contained stylesheet.
   China-proofing rule: no external fonts, no external anything.
   System stack covers Latin + CJK on every platform. */

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --accent: #a31f24;      /* cinnabar */
  --accent-fg: #ffffff;
  --rule: #e3e0da;
  --surface: #f7f5f2;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --fg: #e8e5e0;
    --muted: #a39e96;
    --accent: #e05a4e;
    --accent-fg: #171513;
    --rule: #322f2b;
    --surface: #201d1a;
  }
}

/* Travel-disruption holidays interleaved into the trade-show calendar. These are
   NOT database records — they are planning context for a reader deciding when to
   travel, so they are styled as an interruption to the numbered list rather than
   as another numbered entry in it. Two severities, two tints, both themes. */
:root {
  --holiday-severe-bg: #fbeeec;
  --holiday-severe-edge: #a31f24;
  --holiday-mod-bg: #fbf5e8;
  --holiday-mod-edge: #9a7420;
}
@media (prefers-color-scheme: dark) {
  :root {
    --holiday-severe-bg: #2b1e1c;
    --holiday-severe-edge: #e05a4e;
    --holiday-mod-bg: #262019;
    --holiday-mod-edge: #d0a24c;
  }
}
.cal-holiday {
  margin: 0.75rem 0;
  padding: 0.55rem 0.85rem;
  background: var(--holiday-severe-bg);
  border-left: 3px solid var(--holiday-severe-edge);
  border-radius: 0 3px 3px 0;
  font-size: 0.93rem;
}
.cal-holiday.moderate {
  background: var(--holiday-mod-bg);
  border-left-color: var(--holiday-mod-edge);
}
/* The severity grouping is lost once the holidays are placed chronologically,
   so each one carries its own label rather than relying on colour alone —
   colour is the fast signal, the tag is the accessible one. */
.cal-holiday .cal-tag {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  color: var(--holiday-severe-edge);
  margin-right: 0.45rem;
}
.cal-holiday.moderate .cal-tag { color: var(--holiday-mod-edge); }
.cal-legend { font-size: 0.85rem; color: var(--muted); margin: 0.4rem 0 1rem; }

* { box-sizing: border-box; }

html {
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
    sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  font-size: 1.0625rem;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* header */
.site-header {
  border-bottom: 2px solid var(--accent);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 0.85rem;
}
.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.active { color: var(--accent); font-weight: 600; }

/* breadcrumbs */
.crumbs {
  margin: 1.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* content */
main { padding-bottom: 3rem; }
article h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin: 1.2rem 0 1rem;
  letter-spacing: -0.01em;
}
h2 { font-size: 1.4rem; margin-top: 2.2rem; }
h3 { font-size: 1.15rem; margin-top: 1.8rem; }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

article img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

article ul, article ol { padding-left: 1.4rem; }
article li { margin: 0.35rem 0; }

article blockquote {
  margin: 1.2rem 0;
  padding: 0.1rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  color: var(--muted);
}

article hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.2rem 0;
}

/* tables scroll inside their own container on small screens */
article table {
  border-collapse: collapse;
  width: 100%;
  display: block;
  overflow-x: auto;
  font-size: 0.95rem;
}
article th, article td {
  border: 1px solid var(--rule);
  padding: 0.45rem 0.65rem;
  text-align: left;
  vertical-align: top;
}
article th { background: var(--surface); }

/* search page */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.search-form { margin: 1.2rem 0 0.4rem; }
#q {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 0.65rem 0.8rem;
  color: var(--fg);
  background: var(--bg);
  border: 2px solid var(--rule);
  border-radius: 5px;
}
#q:focus { outline: none; border-color: var(--accent); }
.search-status {
  font-size: 0.85rem;
  color: var(--muted);
  min-height: 1.2em;
  margin: 0.4rem 0 1rem;
}
.search-results { list-style: none; padding: 0; margin: 0; }
.search-hit {
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}
.search-hit-title {
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
}
.search-hit-title:hover { text-decoration: underline; }
.search-hit-excerpt {
  margin: 0.3rem 0 0.2rem;
  font-size: 0.95rem;
}
.search-hit-excerpt mark {
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}
.search-hit-url {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* company record (database entry pages) */
.record {
  margin: 1.4rem 0 2rem;
  padding: 1rem 1.1rem 1.1rem;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
  font-size: 0.95rem;
}
.record dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.9rem;
}
.record dt:first-of-type { margin-top: 0; }
.record dd { margin: 0.15rem 0 0; }
.record-zh { font-size: 1.15rem; font-weight: 600; }

/* Two labelled fields sitting side by side, because together they answer one
   question. `record-names` is the name and its reading; `record-pair` is the
   same mechanism generalised — on event records it carries Held and Cadence,
   which are both "when". The wrapper carries the row's bottom margin because
   each dt inside is now first-of-type within its own group and so has no
   margin-top of its own. */
.record-names,
.record-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0 3rem;
  margin-bottom: 0.9rem;
}
/* `record-names` opens the list, so it needs no space above it; `record-pair`
   never does — Held/Cadence follow City, Website/Weibo follow the registry key —
   and its inner dt is first-of-type within its own group, so the 0.9rem every
   other row gets from `.record dt` is suppressed exactly where it is needed.
   Restated on the wrapper rather than unpicked on the dt: the grouping is what
   suppressed it, so the grouping is what should put it back. */
.record-pair { margin-top: 0.9rem; }
/* Kept at the size and weight Marcus approved on sight (31 Jul 2026): lighter
   than the hanzi it reads, because it is a pronunciation and not a second name. */
.record-pinyin { font-size: 0.9rem; font-weight: 400; color: var(--muted); }
/* The Weibo uid joins the registry key and the ticker in monospace because it is
   the same kind of thing: an identifier a record can be resolved on, not a
   contact detail. It is linked where those two are not — a uid resolves to a
   profile a reader can open and judge, which is the one mitigation available for
   the weakest-provenance field on the card. */
.record-uscc,
.record-ticker,
.record-weibo {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.record-note { color: var(--muted); font-size: 0.85rem; }
.record-restr, .record-restr a { font-size: 0.9rem; }
.record-none { color: var(--muted); font-style: italic; }
.record-sites { list-style: none; padding: 0; margin: 0; }
.record-sites li { margin: 0.1rem 0; }

/* daily video embed (homepage) */
.daily-video { margin: 1.8rem 0; }
.daily-video video {
  display: block;
  width: 100%;
  border-radius: 6px;
  background: #000;
}
.daily-caption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer .wrap { padding-top: 1rem; padding-bottom: 1.4rem; }
.site-footer a { color: var(--muted); }

@media (max-width: 34rem) {
  body { font-size: 1rem; }
  article h1 { font-size: 1.55rem; }
}
