/* 57探花 站级样式表：纸白底资料索引气质，单强调色朱砂。 */

:root {
  --bg: #f6f3ec;
  --surface: #ffffff;
  --surface-2: #ece6da;
  --text: #201a14;
  --text-muted: #5c5142;
  --accent: #a83a24;
  --accent-ink: #fff7ee;
  --border: #d8d0be;
  --rule: #c9c0ac;
  --ring: #a83a24;
  --ok: #2e6b45;
  --warn: #8a5a12;
  --danger: #9e2b1e;
  --info: #2a5b85;
  --cta-bg: #1f1a14;
  --cta-ink: #fff7ee;
  --cta-rule: #c4573a;
  --cta-wash: rgba(196, 92, 58, 0.55);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-1: 0 1px 2px rgba(32, 26, 20, 0.06);
  --shadow-2: 0 2px 6px rgba(32, 26, 20, 0.08);
  --shadow-3: 0 10px 24px rgba(32, 26, 20, 0.1);

  --container: 1120px;
  --container-narrow: 720px;

  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --ease-cta: cubic-bezier(0.22, 0.68, 0.28, 1);
  --dur: 180ms;
  --cta-loop: 2.8s;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  padding-bottom: 112px;
}

h1,
h2,
h3,
h4 {
  font-family: Georgia, "Songti SC", "SimSun", "Times New Roman", serif;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-4);
}

h1 {
  font-size: 32px;
  line-height: 1.25;
}

h2 {
  font-size: 23px;
  line-height: 1.35;
}

h3 {
  font-size: 18px;
  line-height: 1.5;
}

p {
  margin: 0 0 var(--space-4);
}

p:last-child,
ul:last-child,
ol:last-child,
table:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.25em;
}

li {
  margin-bottom: var(--space-2);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

a:hover {
  color: var(--text);
  text-decoration: underline;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

a:active {
  transform: translateY(1px);
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-5);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--surface);
  color: var(--text);
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  z-index: 20;
}

.skip-link:focus {
  top: var(--space-3);
}

/* ---------------------------------------------------------------- header */

.site-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-head__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  padding-block: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
}

.brand__mark {
  display: block;
  width: 170px;
  height: 51px;
  border-radius: var(--radius-sm);
}

.nav {
  flex: 1 1 320px;
}

.nav__list {
  display: flex;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  padding-bottom: var(--space-1);
}

.nav__list li {
  margin: 0;
  flex: 0 0 auto;
}

.nav__list a {
  display: block;
  color: var(--text);
  font-size: 15px;
  padding: var(--space-2) var(--space-1);
  border-bottom: 2px solid transparent;
}

.nav__list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ------------------------------------------------------------------ main */

main {
  display: block;
}

.page-head {
  padding-block: var(--space-6) var(--space-5);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-6);
}

.page-head__crumbs {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.page-head__crumbs a {
  color: var(--text-muted);
}

.page-head__crumbs a:hover {
  color: var(--accent);
}

.page-head h1 {
  margin-bottom: var(--space-3);
}

.lede {
  max-width: var(--container-narrow);
  font-size: 17px;
  color: var(--text);
  margin: 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--space-7);
  align-items: start;
  padding-bottom: var(--space-7);
}

.layout__side {
  position: sticky;
  top: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5) var(--space-5);
  font-size: 15px;
}

.layout__side h2 {
  font-size: 16px;
  margin-bottom: var(--space-3);
}

.side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-list li {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.side-list li:first-child {
  border-top: 0;
}

.side-list a {
  display: block;
  padding: var(--space-2) 0;
  color: var(--text);
  font-size: 15px;
}

.side-list a:hover {
  color: var(--accent);
}

.prose {
  max-width: var(--container-narrow);
}

section {
  padding-block: var(--space-5);
}

section + section {
  border-top: 1px solid var(--rule);
}

section:first-child {
  padding-top: 0;
}

section h2 {
  margin-bottom: var(--space-3);
}

.note {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-size: 16px;
  color: var(--text);
}

.note strong {
  color: var(--accent);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
}

.chip {
  display: inline-block;
  background: var(--surface-2);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 2px var(--space-3);
  font-size: 14px;
}

.chip--accent {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
}

/* --------------------------------------------------------------- number list */

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rank;
}

.rank-list > li {
  counter-increment: rank;
  position: relative;
  padding: var(--space-4) 0 var(--space-4) var(--space-7);
  border-top: 1px solid var(--rule);
  margin: 0;
}

.rank-list > li:first-child {
  border-top: 0;
  padding-top: 0;
}

.rank-list > li::before {
  content: counter(rank, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: var(--space-4);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  color: var(--accent);
}

.rank-list > li:first-child::before {
  top: 0;
}

.rank-list h3 {
  margin-bottom: var(--space-2);
}

.rank-list p {
  margin-bottom: 0;
  color: var(--text);
}

/* ------------------------------------------------------------------- facts */

.fact-list {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.fact-list > div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--rule);
}

.fact-list dt {
  color: var(--text-muted);
  font-size: 15px;
}

.fact-list dd {
  margin: 0;
}

/* ------------------------------------------------------------------ tables */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 16px;
}

caption {
  caption-side: top;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
}

tbody tr:hover {
  background: var(--surface-2);
}

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

/* ------------------------------------------------------------------- cards */

.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry-grid li {
  margin: 0;
}

.entry {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.entry:hover {
  border-color: var(--accent);
}

.entry__name {
  display: block;
  font-family: Georgia, "Songti SC", serif;
  font-size: 17px;
  color: var(--text);
  margin-bottom: var(--space-1);
}

.entry:hover .entry__name {
  color: var(--accent);
}

.entry__note {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.region-grid li {
  margin: 0;
}

.region-grid a {
  display: block;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  text-align: center;
  min-height: 44px;
  line-height: 1.7;
}

.region-grid a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.group-title {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  font-weight: 600;
}

/* --------------------------------------------------------------------- faq */

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
}

.faq details:last-child {
  margin-bottom: 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.faq summary:hover {
  color: var(--accent);
}

.faq__a {
  padding-top: var(--space-3);
  color: var(--text);
}

.faq__a p {
  margin-bottom: var(--space-2);
}

/* ------------------------------------------------------------------- links */

.next-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.next-links li {
  border-top: 1px solid var(--rule);
  margin: 0;
  padding: var(--space-3) 0;
}

.next-links li:first-child {
  border-top: 0;
  padding-top: 0;
}

.next-links span {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
}

/* 同区省市 / 相邻城市链接 */
.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-2);
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
}

.link-list li {
  margin: 0;
}

.link-list a {
  display: block;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

.link-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ------------------------------------------------------------------ footer */

.site-foot {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-block: var(--space-6);
  font-size: 15px;
}

.site-foot__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-6);
}

.site-foot__brand a {
  font-family: Georgia, "Songti SC", serif;
  font-size: 19px;
  color: var(--text);
}

.site-foot__brand a:hover {
  color: var(--accent);
}

.site-foot__tag {
  margin: var(--space-2) 0 0;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 320px;
}

.site-foot__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-foot__nav li {
  margin: 0;
}

.site-foot__nav a {
  color: var(--text-muted);
}

.site-foot__nav a:hover {
  color: var(--accent);
}

/* ------------------------------------------------- CTA: single fixed button */

.site-cta {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(500px, calc(100vw - 32px));
  min-height: 58px;
  padding: var(--space-3) var(--space-6);
  background: var(--cta-bg);
  color: var(--cta-ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.site-cta:hover,
.site-cta:focus-visible {
  background: var(--cta-bg);
  color: var(--cta-ink);
  text-decoration: none;
}

.site-cta:active {
  transform: translateX(-50%) translateY(1px);
}

.site-cta__label {
  position: relative;
  z-index: 2;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* 常驻动效：通道一 —— 索引线从左侧画出（朱砂细线） */
.site-cta::before {
  content: "";
  position: absolute;
  left: var(--space-5);
  right: var(--space-5);
  bottom: 9px;
  height: 2px;
  background: var(--cta-rule);
  transform-origin: left center;
  transform: scaleX(1);
  animation: cta-index-rule var(--cta-loop) var(--ease-cta) infinite;
  z-index: 1;
}

@keyframes cta-index-rule {
  0% {
    transform: scaleX(0);
    opacity: 0.4;
  }
  26% {
    transform: scaleX(1);
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* 常驻动效：通道二 —— 朱砂印泥在按钮表面洇开一层极淡的色，只动 opacity */
.site-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 170% at 16% 50%, var(--cta-wash) 0%, rgba(31, 26, 20, 0) 62%);
  opacity: 0.18;
  animation: cta-seal-bloom var(--cta-loop) var(--ease-cta) infinite;
  animation-delay: -1.4s;
  z-index: 0;
}

@keyframes cta-seal-bloom {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 0.2;
  }
  72% {
    opacity: 0.18;
  }
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-cta::before,
  .site-cta::after {
    animation: none;
  }

  .site-cta::before {
    transform: scaleX(1);
    opacity: 1;
  }

  .site-cta::after {
    opacity: 0.16;
  }

  a:active {
    transform: none;
  }
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 1280px) {
  .region-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .layout__side {
    position: static;
  }

  .site-foot__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .region-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-cta {
    left: 14px;
    right: 14px;
    width: auto;
    transform: none;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .site-cta:active {
    transform: translateY(1px);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
    padding-bottom: 128px;
  }

  h1 {
    font-size: 25px;
  }

  h2 {
    font-size: 20px;
  }

  .wrap {
    padding-inline: var(--space-4);
  }

  .brand__mark {
    width: 136px;
    height: 41px;
  }

  .region-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact-list > div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
  }

  .site-cta {
    min-height: 54px;
    padding: var(--space-3) var(--space-4);
  }

  .site-cta__label {
    font-size: 15px;
    letter-spacing: 0.01em;
  }

  .rank-list > li {
    padding-left: var(--space-6);
  }
}
