:root {
  --bg: #f2f2f2;
  --surface: #ffffff;
  --text: #333333;
  --muted: #4a4a4a;
  --accent: #00c26f;
  --accent-deep: #00a85f;
  --accent-ink: #102117;
  --ink-wash: rgba(16, 33, 23, 0.28);
  --cta-lift: rgba(16, 33, 23, 0.16);
  --header: #2b2b37;
  --header-hover: #3a3a4a;
  --tab: #dddddd;
  --tab-ink: #111111;
  --line: #e4e4e4;
  --purple: #663366;
  --nav-muted: rgba(255, 255, 255, 0.86);
  --shadow: #b7b7b7;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  padding-bottom: 120px;
}

h1 {
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 16px;
}

h2 {
  font-size: 24px;
  line-height: 1.3;
  font-weight: 700;
  margin: 28px 0 12px;
}

h3 {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  margin: 18px 0 8px;
}

p { margin: 0 0 14px; }

a { color: var(--purple); }

a:hover { color: var(--accent-ink); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

img { max-width: 100%; height: auto; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  z-index: 50;
}

.skip:focus { top: 8px; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 78px;
  background: var(--header);
  color: var(--surface);
  box-shadow: 0 0 10px 3px var(--shadow);
}

.header-inner,
.wrap,
.footer-inner {
  width: min(1140px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.header-inner {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  width: 172px;
  height: 48px;
  object-fit: contain;
}

.nav-toggle {
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--surface);
  font-size: 16px;
  cursor: pointer;
}

.site-nav {
  display: none;
  position: absolute;
  top: 78px;
  left: 0;
  right: 0;
  background: var(--header);
  padding: 8px 16px 16px;
}

.site-nav.is-open { display: block; }

.site-nav a {
  display: block;
  color: var(--surface);
  text-decoration: none;
  padding: 10px 0;
  font-size: 16px;
  line-height: 1.5;
}

.site-nav a[aria-current="page"] { color: var(--accent); }

.main-offset { padding-top: 78px; }

.wrap { padding-top: 16px; }

.topsw {
  display: flex;
  min-height: 35px;
  margin: 0 0 12px;
}

.topsw a {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--tab);
  color: var(--tab-ink);
  text-decoration: none;
  font-size: 16px;
}

.topsw a.onme {
  background: var(--accent);
  color: var(--accent-ink);
}

.panel {
  background: var(--surface);
  border-radius: 4px;
  padding: 16px;
  margin: 0 0 12px;
}

.panel h2:first-child { margin-top: 0; }

.city-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5em, 1fr));
  gap: 12px 18px;
}

.city-board a {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
}

.city-board a:hover { text-decoration: underline; }

.city-board a span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px;
}

.filter-row label { font-size: 16px; }

.filter-row input {
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  min-height: 44px;
  width: min(100%, 280px);
}

.facts,
.rank { margin: 0 0 14px; padding-left: 1.2em; }

.facts li,
.rank li { margin: 0 0 8px; }

.table-wrap { overflow-x: auto; margin: 0 0 14px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  line-height: 1.5;
}

caption {
  text-align: left;
  font-weight: 700;
  margin: 0 0 8px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
}

td { background: var(--surface); }

.more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.more a { margin: 0; }

.site-footer {
  background: var(--surface);
  color: var(--text);
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.footer-inner { padding: 28px 0 22px; }

.footer-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.footer-line {
  color: var(--muted);
  margin: 8px 0 16px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7em, 1fr));
  gap: 10px 16px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

a[data-site-cta="xunfang"] {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: 480px;
  max-width: calc(100% - 32px);
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 10px 24px var(--cta-lift);
}

a[data-site-cta="xunfang"]:hover,
a[data-site-cta="xunfang"]:focus-visible,
a[data-site-cta="xunfang"]:active {
  color: var(--accent-ink);
  background: var(--accent-deep);
}

a[data-site-cta="xunfang"]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 18% 50%, var(--ink-wash), transparent 62%);
  opacity: 0.35;
  transform: scale(1);
  transform-origin: 18% 50%;
  pointer-events: none;
  animation: paper-ink-soak 2.8s cubic-bezier(.2, .7, .3, 1) infinite;
}

@keyframes paper-ink-soak {
  0% { opacity: 0.15; transform: scale(0.96); }
  38% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.2; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  a[data-site-cta="xunfang"]::before {
    animation: none;
    opacity: 0.45;
    transform: none;
  }
}

@media (min-width: 768px) {
  .header-inner,
  .wrap,
  .footer-inner { width: min(720px, calc(100% - 32px)); }

  .nav-toggle { display: none; }

  .site-nav {
    display: flex;
    position: static;
    background: transparent;
    padding: 0;
    gap: 14px;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .site-nav a {
    display: inline-block;
    padding: 8px 0;
    color: var(--nav-muted);
  }

  .site-nav a[aria-current="page"] { color: var(--accent); }
}

@media (min-width: 992px) {
  .header-inner,
  .wrap,
  .footer-inner { width: min(960px, calc(100% - 32px)); }
}

@media (min-width: 1200px) {
  .header-inner,
  .wrap,
  .footer-inner { width: min(1140px, calc(100% - 32px)); }
}

@media (max-width: 767px) {
  h1 { font-size: 26px; }
  h2 { font-size: 22px; }

  a[data-site-cta="xunfang"] {
    left: 16px;
    right: 16px;
    width: auto;
    transform: none;
    bottom: calc(12px + env(safe-area-inset-bottom));
    min-height: 52px;
  }
}
