:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --paper: #fffdf8;
  --ink: #24211d;
  --muted: #6d655c;
  --line: #ded7ca;
  --accent: #2f6f6a;
  --accent-strong: #1f5551;
  --warn: #9a5a22;
  --shadow: 0 16px 40px rgba(41, 35, 26, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  line-height: 1.75;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  flex: 1 1 360px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
}

.topbar nav a.active,
.topbar nav a:hover {
  background: #e8eee9;
  color: var(--accent-strong);
}

.site-search {
  background: #ede8dc;
  border-bottom: 1px solid var(--line);
}

.site-search-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(240px, 620px) 1fr;
  align-items: center;
  gap: 12px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
}

.site-search label {
  color: var(--ink);
  font-weight: 700;
}

.site-search input {
  width: 100%;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid #cfc6b6;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.site-search input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(47, 111, 106, 0.18);
}

.search-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-results {
  position: absolute;
  top: calc(100% - 4px);
  left: 64px;
  z-index: 20;
  width: min(720px, calc(100vw - 32px));
  max-height: min(540px, calc(100vh - 170px));
  overflow: auto;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-result {
  display: block;
  padding: 12px;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}

.search-result:hover {
  background: #edf3ee;
}

.search-result strong,
.search-result span,
.search-result small {
  display: block;
}

.search-result span {
  color: var(--accent-strong);
  font-size: 13px;
}

.search-result small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.55;
}

.search-empty {
  padding: 14px;
  color: var(--muted);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.hero {
  padding: clamp(34px, 6vw, 72px) 0 32px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-weight: 700;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.stats div {
  min-width: 160px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stats strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.stats span {
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 24px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.city-card {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.city-card h2 {
  margin: 2px 0 14px;
  font-size: 22px;
}

.city-meta {
  color: var(--muted);
  font-size: 14px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  background: #eef3ee;
  border: 1px solid #d5e2d8;
  border-radius: 6px;
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 14px;
}

.pill:hover {
  background: #dfece2;
}

.doc {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 44px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.breadcrumb {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
}

.directory-nav {
  display: grid;
  gap: 14px;
  margin: 0 0 30px;
  padding: 16px;
  background: #f3efe5;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.dir-group {
  display: grid;
  gap: 8px;
}

.dir-group span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dir-group p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dir-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  background: var(--paper);
  border: 1px solid #d6ccb9;
  border-radius: 6px;
  color: var(--accent-strong);
  font-size: 14px;
  line-height: 1.25;
  text-decoration: none;
}

.nav-pill:hover {
  background: #e7efe7;
  border-color: #c2d3c4;
}

.doc h1,
.doc h2,
.doc h3,
.doc h4 {
  line-height: 1.3;
  letter-spacing: 0;
}

.doc h1 {
  margin: 0 0 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--line);
  font-size: clamp(30px, 5vw, 46px);
}

.doc h2 {
  margin-top: 40px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 25px;
}

.doc h3 {
  margin-top: 28px;
  font-size: 20px;
}

.doc h4 {
  margin-top: 22px;
  font-size: 17px;
}

.doc p,
.doc li {
  font-size: 16px;
}

.doc hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.doc code {
  padding: 0.1em 0.35em;
  background: #eee8dc;
  border-radius: 4px;
}

.doc pre {
  overflow: auto;
  padding: 16px;
  background: #27231e;
  color: #fff7e9;
  border-radius: 8px;
}

.table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  background: #fffefa;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #eee9dd;
  font-weight: 700;
}

tr:last-child td {
  border-bottom: 0;
}

.missing-link {
  color: var(--warn);
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
}

@media (max-width: 680px) {
  .topbar {
    position: static;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
  }

  .brand {
    font-size: 15px;
    line-height: 1.3;
  }

  .topbar nav {
    flex: 1 1 100%;
    justify-content: flex-start;
    gap: 6px;
  }

  .topbar nav a {
    min-height: 30px;
    padding: 0 9px;
    font-size: 14px;
  }

  .site-search-inner {
    grid-template-columns: 1fr;
  }

  .search-results {
    left: 0;
    width: 100%;
  }

  main {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .doc {
    padding: 18px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
