/* ── China City Compass — numbeo 风格极简样式 ── */
/* Reasonix generated 2026-05-20 */

:root {
  --bg: #fff; --text: #1a1a1a; --muted: #888;
  --accent: #2563eb; --accent-light: #dbeafe;
  --warn: #f59e0b; --warn-light: #fef3c7;
  --border: #e5e7eb; --row-stripe: #f9fafb;
  --high: #16a34a; --medium: #f59e0b; --low: #ef4444;
  --max-w: 960px; --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.6; color: var(--text); background: var(--bg);
  max-width: var(--max-w); margin: 0 auto; padding: 0 16px;
}

/* ── Header ── */
header { padding: 20px 0; border-bottom: 2px solid var(--accent); margin-bottom: 24px; }
header .logo { font-size: 1.4em; font-weight: 700; color: var(--accent); text-decoration: none; }
header .logo span { color: var(--text); font-weight: 400; font-size: 0.7em; }
header nav { float: right; margin-top: 4px; }
header nav a { margin-left: 20px; text-decoration: none; color: var(--text); font-size: 0.9em; }
header nav a:hover { color: var(--accent); }
header::after { content: ""; display: table; clear: both; }

/* ── Typography ── */
h1 { font-size: 1.8em; margin: 16px 0 8px; }
h2 { font-size: 1.3em; margin: 32px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.1em; margin: 20px 0 8px; }
h4 { font-size: 1em; margin: 12px 0 4px; color: var(--muted); }
a { color: var(--accent); }

/* ── Tables (numbeo style) ── */
table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 0.93em; }
table caption { font-weight: 600; text-align: left; margin-bottom: 6px; font-size: 0.95em; color: var(--muted); }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--row-stripe); font-weight: 600; white-space: nowrap; }
tr:nth-child(even) td { background: var(--row-stripe); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Score bar (pure CSS) ── */
.score-bar { display: inline-flex; align-items: center; gap: 8px; }
.score-bar .bar { width: 120px; height: 14px; background: var(--border); border-radius: 7px; overflow: hidden; }
.score-bar .bar .fill { height: 100%; border-radius: 7px; background: var(--accent); }
.score-bar .val { font-weight: 600; min-width: 45px; text-align: right; }

/* ── Confidence badges ── */
.conf { display: inline-block; font-size: 0.75em; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.conf-high { background: #dcfce7; color: #166534; }
.conf-medium { background: #fef9c3; color: #854d0e; }
.conf-low { background: #fee2e2; color: #991b1b; }

/* ── Data quality ── */
.estimated { color: var(--muted); }
.estimated::after { content: " ⚠"; font-size: 0.8em; }
.unavailable { color: var(--muted); font-style: italic; }
.unavailable::after { content: " 暂缺"; font-size: 0.75em; }

/* ── Warning banner ── */
.banner { padding: 12px 16px; border-radius: var(--radius); margin: 16px 0; font-size: 0.9em; }
.banner-warn { background: var(--warn-light); border-left: 4px solid var(--warn); }
.banner-low { background: #fee2e2; border-left: 4px solid var(--low); }

/* ── Cards ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 16px 0; }
.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--text); }
.card:hover { border-color: var(--accent); background: var(--accent-light); }
.card .card-title { font-weight: 600; font-size: 1em; }
.card .card-sub { font-size: 0.82em; color: var(--muted); margin-top: 4px; }

/* ── Search ── */
.search-box { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
.search-box input { flex: 1; min-width: 180px; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius); font-size: 1em; }
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-box button { padding: 10px 20px; background: var(--accent); color: #fff; border: none; border-radius: var(--radius); cursor: pointer; font-size: 1em; }

/* ── Footer ── */
footer { margin: 48px 0 24px; padding-top: 20px; border-top: 2px solid var(--border); font-size: 0.82em; color: var(--muted); }
footer a { color: var(--muted); text-decoration: none; margin-right: 16px; }
footer a:hover { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 600px) {
  body { padding: 0 10px; }
  h1 { font-size: 1.4em; }
  header nav { float: none; margin-top: 8px; }
  header nav a { margin-left: 0; margin-right: 14px; }
  th, td { padding: 6px 8px; font-size: 0.85em; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
