/* 一楼一凤 — 静态站点样式
   设计 token 取自当前域名目录内的本地 UI 捕获，按提取结果重新实现。
   全站浅色底（A31）。 */

/* ---------------------------------------------------------------- tokens */

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f3f5fd;
  --border: #e5e7eb;
  --border-strong: #dadce0;

  --text: #1f2937;
  --text-2: #4b5563;
  --text-3: #6b7280;
  --text-4: #9ca3af;

  /* 强调填充：CTA 与按钮底色，配 --accent-ink 白字，对比度 ≥ 4.5:1 */
  --accent: #cf1f6b;
  --accent-ink: #ffffff;
  --accent-strong: #b0185f;
  /* 浅底上的文字用粉，与白底、灰底、粉底的对比度均达标 */
  --link: #c2185b;
  --accent-soft: #fdf2f8;
  --accent-2: #f472b6;

  --brand: #635bff;
  --danger: #f23b3b;
  --success: #16a34a;

  --radius: 4.8px;
  --radius-sm: 4px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 28px -16px rgba(16, 24, 40, .16);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);
  --ring: 0 0 0 2px rgba(194, 24, 91, .45);

  --container: 1280px;
  --gutter: 12px;
  --header-h: 80px;
  --cta-h: 58px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

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

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

body {
  margin: 0;
  padding-bottom: calc(var(--cta-h) + 40px);
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

h1 { font-size: 24px; line-height: 1.35; font-weight: 600; margin: 0 0 8px; }
h2 { font-size: 20px; line-height: 1.45; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 17px; line-height: 1.5; font-weight: 600; margin: 0 0 6px; }
p  { margin: 0 0 12px; }
ul, ol { margin: 0 0 12px; padding-left: 20px; }
li { margin-bottom: 4px; }

a { color: var(--link); text-decoration: none; }
a:hover { color: #8e1247; text-decoration: underline; }

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

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

.shell { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--surface); color: var(--text); padding: 10px 16px; border-radius: var(--radius);
}
.skip-link:focus { left: 12px; top: 12px; }

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

.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h); z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-shell {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}

.header-left { display: flex; align-items: center; height: 100%; min-width: 0; }

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { width: 128px; height: auto; display: block; }

.main-nav { display: flex; align-items: stretch; height: 100%; }
.main-nav a {
  display: flex; align-items: center;
  padding: 0 24px; min-height: 44px;
  color: var(--text); font-size: 16px; border-bottom: 2px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.main-nav a:hover { color: var(--link); text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--link); border-bottom-color: var(--accent); }

.header-right { display: flex; align-items: center; justify-content: flex-end; flex: 1; min-width: 0; }

.search { position: relative; flex: 1; max-width: 320px; margin: 0 16px; min-width: 0; }
.search-field { position: relative; display: flex; align-items: center; }
.search-field .icon { position: absolute; left: 10px; color: var(--text-3); pointer-events: none; display: flex; }
.search input {
  width: 100%; height: 40px;
  padding: 0 12px 0 34px;
  font-size: 16px; font-family: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; }

.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 55;
  max-height: 320px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
}
.search-results[hidden] { display: none; }
.search-results a {
  display: block; padding: 10px 12px; color: var(--text); font-size: 14px; line-height: 1.5;
  border-bottom: 1px solid var(--border);
}
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a:focus {
  background: var(--accent-soft); color: var(--link); text-decoration: none;
}
.search-results .empty { padding: 12px; font-size: 14px; color: var(--text-3); }
.search-results .hit-meta { display: block; font-size: 12px; color: var(--text-3); }

.nav-drawer { display: none; position: relative; }
.nav-drawer > summary {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; color: var(--text); cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius);
  list-style: none; margin-left: 8px;
}
.nav-drawer > summary::-webkit-details-marker { display: none; }
.nav-drawer > nav {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 55;
  min-width: 180px; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md); overflow: hidden;
}
.nav-drawer > nav a {
  padding: 12px 16px; min-height: 44px; display: flex; align-items: center;
  color: var(--text); font-size: 16px; border-bottom: 1px solid var(--border);
}
.nav-drawer > nav a:last-child { border-bottom: 0; }
.nav-drawer > nav a:hover {
  background: var(--accent-soft); color: var(--link); text-decoration: none;
}
.nav-drawer > nav a[aria-current="page"] { color: var(--link); }

/* ---------------------------------------------------------------- layout */

main { padding-top: var(--header-h); }

.page-head { padding: 24px 0 8px; }
.crumb { font-size: 16px; color: var(--text-2); margin-bottom: 12px; }
.lede { color: var(--text-2); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.panel-head {
  font-size: 20px; font-weight: 600; color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 12px;
}
.panel-head .icon { color: var(--accent); flex-shrink: 0; display: flex; }

.section { margin-bottom: 24px; }

/* ------------------------------------------------------------ action grid */

.action-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px; text-align: center;
}
.action {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 12px 4px; min-height: 44px;
  color: var(--text-2); border-radius: var(--radius);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.action .icon { color: var(--accent); display: flex; }
.action span { font-size: 14px; line-height: 1.4; }
.action:hover {
  color: var(--link); background: var(--accent-soft); text-decoration: none;
}

/* --------------------------------------------------------------- regions */

.region-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px; text-align: center;
}
.region-chip {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 4px;
  font-size: 14px; color: var(--text-2); border-radius: var(--radius);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.region-chip:hover {
  color: var(--link); background: var(--accent-soft); text-decoration: none;
}

.more-toggle { display: flex; flex-direction: column; align-items: center; padding-top: 16px; }
.more-toggle > summary {
  cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 8px 16px;
  color: var(--link); font-size: 14px; border-radius: var(--radius);
}
.more-toggle > summary::-webkit-details-marker { display: none; }
.more-toggle > summary:hover { background: var(--accent-soft); text-decoration: none; }
.more-toggle[open] .more-close { display: inline; }
.more-toggle[open] .more-open { display: none; }
.more-close { display: none; }
.more-toggle .region-grid { margin-top: 16px; text-align: center; width: 100%; }

/* ------------------------------------------------------------ filter row */

.filter-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 16px; font-size: 16px;
}
.filter-row .marker { color: var(--danger); display: inline-flex; }

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

.card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover {
  border-color: var(--accent-2);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.card h3 { color: var(--text); }
.card .card-meta {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  font-size: 14px; color: var(--text-3); margin: 0 0 8px;
}
.card .card-body { font-size: 14px; color: var(--text-2); margin: 0 0 8px; }
.card .card-foot {
  display: flex; align-items: center; gap: 4px; margin: 0;
  font-size: 14px; color: var(--link); min-width: 0;
}

/* --------------------------------------------------------------- content */

.prose { color: var(--text-2); }
.prose h2 { margin-top: 24px; color: var(--text-2); }
.prose h3 { margin-top: 20px; color: var(--text); }
.prose p { color: var(--text-2); }
.prose strong { color: var(--text); }
.prose > :first-child { margin-top: 0; }

.fact-list { list-style: none; padding: 0; margin: 0; }
.fact-list li {
  display: flex; flex-wrap: wrap; gap: 4px 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.fact-list li:last-child { border-bottom: 0; }
.fact-list .k { color: var(--text-2); flex-shrink: 0; font-weight: 600; }
.fact-list .v { color: var(--text-2); }

.field-row {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 14px; margin-bottom: 6px;
}
.field-row .k { color: var(--text-2); flex-shrink: 0; font-weight: 600; }
.field-row .v { color: var(--text-2); }

.table-wrap { overflow-x: auto; margin-bottom: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
caption { text-align: left; font-size: 14px; color: var(--text-3); padding-bottom: 8px; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--text-2); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
td { color: var(--text-2); }
tbody th { white-space: normal; }

.tabs { display: flex; overflow-x: auto; margin-bottom: 16px; }
.tabs a {
  display: inline-block; padding: 12px 24px; white-space: nowrap;
  font-size: 16px; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--link); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--link); border-bottom-color: var(--accent); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.side-col { display: flex; flex-direction: column; gap: 16px; }

.note {
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px; color: var(--text-2);
}
.note p:last-child { margin-bottom: 0; }
.note .note-title { font-weight: 600; color: var(--text); display: block; margin-bottom: 4px; }

.faq { margin: 0; }
.faq dt { font-weight: 600; color: var(--text); margin-top: 16px; }
.faq dd { margin: 6px 0 0; color: var(--text-2); }
.faq dt:first-child { margin-top: 0; }

.cta-link { display: inline-flex; align-items: center; gap: 4px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .95em; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1px 5px;
}

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

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}
.footer-shell { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-brand { color: var(--link); font-size: 16px; }
.footer-copy { font-size: 14px; color: var(--text-2); }

/* ------------------------------------------------------------------- CTA */

.site-cta {
  position: fixed; bottom: 16px; left: 50%; z-index: 60;
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  width: 480px; max-width: calc(100vw - 32px);
  min-height: var(--cta-h); padding: 12px 24px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 16px; font-weight: 600; line-height: 1.3; text-align: center;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px -8px rgba(207, 31, 107, .5);
  overflow: hidden;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.site-cta:hover, .site-cta:focus-visible {
  background: var(--accent-strong); color: var(--accent-ink); text-decoration: none;
  box-shadow: 0 8px 24px -8px rgba(176, 24, 95, .6);
}
.site-cta:active { background: var(--accent-strong); }

/* 通道一：按钮下沿一条墨线由左向右画出，像印章落下时压出的边 */
.site-cta::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255, 255, 255, .5);
  transform-origin: left center;
  transform: scaleX(0);
  animation: seal-rule-draw 2.8s cubic-bezier(.2, .7, .3, 1) infinite;
}

/* 通道二：纸面洇色，一层极淡的暖色由内向外浅浅晕开 */
.site-cta::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%);
  opacity: 0;
  animation: paper-warm-bloom 2.8s cubic-bezier(.2, .7, .3, 1) infinite;
}

.site-cta > span { position: relative; z-index: 1; }

@keyframes seal-rule-draw {
  0%   { transform: scaleX(0); }
  14%  { transform: scaleX(1); }
  46%  { transform: scaleX(1); opacity: 1; }
  60%  { transform: scaleX(1); opacity: .75; }
  100% { transform: scaleX(0); opacity: 1; }
}

@keyframes paper-warm-bloom {
  0%   { opacity: 0; }
  10%  { opacity: 0; }
  30%  { opacity: .12; }
  56%  { opacity: .12; }
  78%  { opacity: 0; }
  100% { opacity: 0; }
}

/* ------------------------------------------------------------------ misc */

.pager { display: flex; justify-content: center; gap: 8px; padding: 16px 0; font-size: 14px; }
.pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-2);
}
.pager a:hover { border-color: var(--accent); color: var(--link); text-decoration: none; }

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

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .region-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .action-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .action-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); align-items: start; }
  .prose { max-width: 82ch; }
  .panel.prose { max-width: none; }
}

@media (max-width: 1023px) {
  .main-nav { display: none; }
  .nav-drawer { display: block; }
  .brand img { width: 104px; }
  .search { margin: 0 8px; }
}

@media (max-width: 639px) {
  :root { --header-h: 64px; }
  .site-cta {
    left: 12px; right: 12px; width: auto; max-width: none;
    transform: none;
    min-height: 54px; padding: 10px 16px; font-size: 15px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .brand img { width: 78px; }
  .search { max-width: none; margin: 0 6px; }
  .prose { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  /* 降级后的静态状态本身仍成立：墨线停在已完成的位置，洇色停在平稳的值 */
  .site-cta::after { transform: scaleX(1); opacity: 1; }
  .site-cta::before { opacity: .1; }
}
