/* 样式表：主色取品牌色，压深后作正文与按钮底，配一层米金作描边。 */

:root {
  --bg: #f7f6f7;
  --surface: #ffffff;
  --surface-2: #fbfafb;
  --surface-3: #f1eff1;

  --ink: #1c1a1b;
  --ink-2: #45403f;
  --muted: #6b6462;

  --line: #e6e2e1;
  --line-2: #f0ecec;

  --brand: #c81e3c;
  --brand-2: #8e1b33;
  --brand-soft: #fdeef1;
  --brand-line: #f6c6cf;

  --gold: #cbc7a0;
  --gold-2: #8a8354;

  --header-1: #8e1b33;
  --header-2: #4a0f1d;

  --ok: #1f7a4d;

  /* CTA（库 46 号：拨杆开关） */
  --cta-off: #3d4b47;
  --cta-on: #1f7a4d;
  --cta-knob: #e9eeea;
  --cta-ink: #ffffff;
  --cta-shadow: rgba(30, 45, 40, 0.42);
  --head-hover: rgba(0, 0, 0, 0.24);
  --head-link: rgba(255, 255, 255, 0.82);
  --head-edge: rgba(203, 199, 160, 0.55);
  --head-current: rgba(0, 0, 0, 0.34);

  --on-brand: #ffffff;
  --focus-soft: rgba(200, 30, 60, 0.16);
  --shadow-card: 0 1px 2px rgba(28, 26, 27, 0.04);
  --shadow-soft: 0 2px 6px rgba(28, 26, 27, 0.08);
  --knob-shadow: 0 3px 8px rgba(0, 0, 0, 0.32);
  --cta-shadow-on: 0 8px 20px rgba(31, 122, 77, 0.34);

  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  padding-bottom: 168px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

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

a {
  color: var(--brand);
  text-decoration: none;
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 12px;
}

h2 {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 700;
  margin: 0 0 10px;
}

h3 {
  font-size: 17px;
  line-height: 1.45;
  font-weight: 600;
  margin: 20px 0 8px;
}

p {
  margin: 0 0 14px;
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

strong,
b {
  font-weight: 700;
}

code,
kbd {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

small {
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 10px 14px;
  z-index: 300;
}

.skip-link:focus {
  left: 14px;
  top: 14px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 14px;
}

/* 页头：一条窄的深红带 */

.site-head {
  background: linear-gradient(135deg, var(--header-1), var(--header-2));
  color: var(--on-brand);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  min-height: 46px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--on-brand);
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--on-brand);
  text-decoration: none;
}

.brand img {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
}

.brand .name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand .kind {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 9999px;
  border: 1px solid var(--head-edge);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.head-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin-left: auto;
  font-size: 14px;
}

.head-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  color: var(--head-link);
}

.head-nav a:hover {
  background: var(--head-hover);
  color: var(--on-brand);
  text-decoration: none;
}

.head-nav a[aria-current="page"] {
  background: var(--head-current);
  color: var(--on-brand);
  font-weight: 600;
}

/* 主体 */

main {
  display: block;
  padding: 20px 0 0;
}

.crumb {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
}

.crumb a {
  color: var(--muted);
}

.crumb a:hover {
  color: var(--brand);
}

.lead {
  font-size: 17px;
  color: var(--ink-2);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  overflow: hidden;
}

.card > .card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface-2);
}

.card > .card-head h2,
.card > .card-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-2);
}

/* 分区标记：一个 8px 实心方块 */
.card > .card-head::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 1em;
  border-radius: 2px;
  background: var(--brand);
}

.card > .card-head .count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.card-body {
  padding: 20px;
}

.card-body > :last-child {
  margin-bottom: 0;
}

/* 地址卡（本页独有） */

.addr {
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  background: var(--brand-soft);
  padding: 16px;
}

.addr-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.addr-host {
  flex: 1 1 260px;
  min-width: 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-2);
  overflow-wrap: anywhere;
  user-select: all;
}

.copy-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--on-brand);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms var(--ease);
}

.copy-btn:hover {
  background: var(--brand-2);
  border-color: var(--brand-2);
}

.copy-btn[data-state="fail"] {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink-2);
}

.copy-hint {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

.copy-status {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-2);
}

/* chip */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.chips li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border: 1px solid var(--brand-line);
  border-radius: 9999px;
  background: var(--brand-soft);
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 600;
}

.chip-plain {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

/* 判据清单 */

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

.criteria > li {
  counter-increment: crit;
  position: relative;
  padding: 14px 0 14px 46px;
  margin: 0;
  border-bottom: 1px solid var(--line-2);
}

.criteria > li:first-child {
  padding-top: 0;
}

.criteria > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.criteria > li::before {
  content: counter(crit);
  position: absolute;
  left: 0;
  top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  background: var(--brand);
  color: var(--on-brand);
  font-size: 14px;
  font-weight: 700;
}

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

.criteria b {
  display: block;
}

/* 流程清单（首页，可筛选） */

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

.flow > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 14px 0;
  margin: 0;
  border-bottom: 1px solid var(--line-2);
  transition: background 160ms var(--ease);
}

.flow > li:first-child {
  padding-top: 0;
}

.flow > li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.flow .stepno {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 24px;
  padding: 0 8px;
  border-radius: 9999px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 700;
}

.flow .subject {
  flex: 1 1 320px;
  min-width: 0;
  font-size: 17px;
  font-weight: 700;
}

.flow .subject a {
  color: var(--ink);
}

.flow .subject a:hover {
  color: var(--brand);
}

.flow .meta {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--muted);
}

.flow .why {
  flex: 1 1 100%;
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}

/* 筛选条 */

.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line-2);
  background: var(--surface);
}

.filterbar label {
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
}

.input {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}

.input:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-soft);
}

.input::placeholder {
  color: var(--muted);
}

/* 表格 */

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

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

table.data caption {
  text-align: left;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

table.data th,
table.data td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-2);
  line-height: 1.65;
}

table.data thead th {
  background: var(--brand-soft);
  color: var(--brand-2);
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--brand-line);
}

table.data tbody tr:last-child th,
table.data tbody tr:last-child td {
  border-bottom: 0;
}

/* 字段清单 */

.fields {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.fields > li {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  padding: 11px 0;
  margin: 0;
  border-bottom: 1px solid var(--line-2);
}

.fields > li:last-child {
  border-bottom: 0;
}

.fields .k {
  flex: 0 0 8rem;
  font-weight: 700;
}

.fields .v {
  flex: 1 1 18rem;
  min-width: 0;
  color: var(--ink-2);
}

/* 注意块 */

.note {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  font-size: 15px;
  color: var(--ink-2);
}

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

.note.warn {
  border-color: var(--brand-line);
  background: var(--brand-soft);
  color: var(--brand-2);
}

.note.warn strong {
  color: var(--brand-2);
}

/* FAQ */

.faq details {
  border-bottom: 1px solid var(--line-2);
}

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

.faq summary {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 13px 0;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "?";
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 4px;
  border-radius: 9999px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

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

.faq .answer {
  padding: 0 0 14px 28px;
  color: var(--ink-2);
  font-size: 16px;
}

.faq .answer p {
  margin: 0 0 10px;
}

/* 侧栏 */

.cols {
  display: block;
}

.aside {
  margin-top: 16px;
}

.aside .card-body {
  padding: 14px 18px;
}

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

.aside .linklist li {
  margin: 0;
  border-bottom: 1px solid var(--line-2);
}

.aside .linklist li:last-child {
  border-bottom: 0;
}

.aside .linklist a {
  display: block;
  padding: 9px 0;
  font-size: 15px;
  color: var(--ink-2);
}

.aside .linklist a:hover {
  color: var(--brand);
}

.aside .linklist a[aria-current="page"] {
  color: var(--brand);
  font-weight: 700;
}

/* 页脚 */

.site-foot {
  margin-top: 20px;
  padding: 20px 0 64px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.site-foot .cols {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  justify-content: space-between;
}

.site-foot .brandline {
  margin: 0 0 6px;
}

.site-foot .brandline a {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.site-foot h2 {
  margin: 0 0 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.site-foot nav a {
  color: var(--muted);
}

.site-foot nav a:hover {
  color: var(--brand);
}

/* 返回顶部 */

#scrolltop {
  position: fixed;
  right: 16px;
  bottom: 148px;
  z-index: 50;
  display: none;
}

#scrolltop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  box-shadow: var(--shadow-soft);
}

#scrolltop a:hover {
  color: var(--brand);
  border-color: var(--brand-line);
  text-decoration: none;
}

#scrolltop.on {
  display: block;
}

/* 底部固定入口：整钮底色在暗档与亮档之间切换，滑块随之横向位移。3.2 秒一轮。 */

.site-cta {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%);
  width: min(600px, calc(100% - 32px));
  min-height: 58px;
  padding: 20px 24px 20px 68px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cta-ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  background-color: var(--cta-off);
  box-shadow: 0 14px 30px var(--cta-shadow);
  animation: cta-face 3.2s ease-in-out infinite;
}

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

.site-cta:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.site-cta .cta-label {
  position: relative;
  z-index: 2;
}

.site-cta::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 38px;
  height: 38px;
  margin-top: -19px;
  border-radius: 9999px;
  background: var(--cta-knob);
  box-shadow: var(--knob-shadow);
  --cta-travel: calc(100vw - 82px);
  animation: cta-slide 3.2s ease-in-out infinite;
}

/* 主通道（面）：整钮底色在暗档与亮档之间切换，并伴随一层阴影沉降；
   回声（动）：拨杆滑块在钮内横向位移。滑块在伪元素上，按钮本体不动。 */
@keyframes cta-face {
  0%,
  22% {
    background-color: var(--cta-off);
    box-shadow: 0 14px 30px var(--cta-shadow);
  }
  54%,
  86% {
    background-color: var(--cta-on);
    box-shadow: var(--cta-shadow-on);
  }
  100% {
    background-color: var(--cta-off);
    box-shadow: 0 14px 30px var(--cta-shadow);
  }
}

@keyframes cta-slide {
  0%,
  22% {
    transform: translateX(0);
  }
  54%,
  86% {
    transform: translateX(var(--cta-travel));
  }
  100% {
    transform: translateX(0);
  }
}

/* 断点 */

@media (min-width: 640px) {
  .wrap {
    padding: 0 20px;
  }

  .card-body {
    padding: 22px 24px;
  }

  .filterbar {
    padding: 12px 24px;
  }

  .site-cta {
    padding-left: 68px;
  }

  /* 按钮在这个断点以上固定为 600px，滑块行程按实际几何算出来 */
  .site-cta::before {
    left: 12px;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    --cta-travel: 536px;
  }
}

@media (min-width: 1024px) {
  .cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 268px;
    gap: 20px;
    align-items: start;
  }

  .aside {
    margin-top: 0;
  }

  #scrolltop {
    right: 24px;
  }
}

@media (max-width: 639px) {
  h1 {
    font-size: 21px;
  }

  .card-body {
    padding: 14px;
  }

  .card > .card-head {
    padding: 12px 14px;
  }

  .filterbar {
    padding: 10px 14px;
  }

  .head-nav {
    flex-basis: 100%;
    margin-left: 0;
  }

  .addr-host {
    font-size: 16px;
  }

  .fields > li {
    display: block;
  }

  .fields .k {
    display: block;
    flex: none;
    margin-bottom: 2px;
  }

  .fields .v {
    display: block;
  }

  .criteria > li {
    padding-left: 40px;
  }

  .site-cta {
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
    bottom: calc(48px + env(safe-area-inset-bottom));
    font-size: 16px;
    padding-left: 62px;
  }

  .site-cta::before {
    left: 10px;
    width: 38px;
    height: 38px;
    margin-top: -19px;
    --cta-travel: calc(100vw - 82px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-cta {
    animation: none;
    background-color: var(--cta-on);
  }

  .site-cta::before {
    animation: none;
    transform: translateX(var(--cta-travel));
  }
}
