/* yixiantian.club — 全站样式。底色浅、正文深、强调色只用在 CTA、标签和表头。 */

:root {
  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --surface-2: #F7F8FC;
  --text: #23262F;
  --text-muted: #5F6577;
  --line: #E6E9F0;
  --line-strong: #D3D8E4;
  --accent: #E0234E;
  --accent-deep: #B01B41;
  --accent-soft: #FF778F;
  --accent-light: #FFAAB9;
  --accent-tint: #FFE7ED;
  --accent-ink: #FFFFFF;
  --on-accent-soft: #4A1420;
  --link: #C21F45;
  --scrim: rgba(35, 38, 47, 0.45);
  --shadow-1: 0 4px 8px rgba(79, 125, 183, 0.08);
  --shadow-2: 0 10px 24px rgba(176, 27, 65, 0.32);
  --radius: 4px;
  --radius-lg: 6px;
  --radius-pill: 24px;
  --wrap: 1120px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: anywhere;
  padding-bottom: calc(108px + env(safe-area-inset-bottom));
}

h1 { font-size: 30px; line-height: 1.28; margin: 0 0 12px; font-weight: 700; }
h2 { font-size: 22px; line-height: 1.35; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 18px; line-height: 1.4; margin: 0 0 8px; font-weight: 600; }
p { margin: 0 0 12px; }
ul, ol { list-style: none; margin: 0 0 12px; padding: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
img { display: block; max-width: 100%; height: auto; }
table { border-collapse: collapse; }
strong { font-weight: 700; }

.yx-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.yx-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ------------------------------------------------------------------ 顶栏 */

.yx-topbar { position: sticky; top: 0; z-index: 70; background: var(--accent); }
.yx-topbar__bar { display: flex; align-items: center; gap: 8px; max-width: var(--wrap); margin: 0 auto; padding: 7px 12px; }
.yx-topbar__menu {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent-deep);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.yx-topbar__brand { flex: 0 0 auto; color: var(--accent-ink); font-size: 21px; font-weight: 700; padding: 0 4px; }
.yx-topbar__brand:hover { text-decoration: none; }
.yx-search {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-pill);
  height: 36px;
  padding: 0 4px 0 14px;
}
.yx-search input { flex: 1 1 auto; min-width: 0; height: 34px; border: 0; background: transparent; color: var(--text); font-size: 15px; }
.yx-search input::placeholder { color: var(--text-muted); }
.yx-search button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--link);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.yx-search__msg {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 6px 16px 10px;
  font-size: 14px;
  color: var(--accent-ink);
}
.yx-search__msg[hidden] { display: none; }
.yx-search__msg a { color: var(--accent-ink); text-decoration: underline; }

.yx-nav__list { display: flex; flex-wrap: wrap; gap: 2px 6px; max-width: var(--wrap); margin: 0 auto; padding: 0 12px 8px; }
.yx-nav__link { display: block; padding: 6px 12px; border-radius: var(--radius-pill); color: var(--accent-ink); font-size: 15px; }
.yx-nav__link:hover { background: var(--accent-deep); text-decoration: none; }
.yx-nav__link[aria-current="page"] { background: var(--accent-ink); color: var(--accent); font-weight: 600; }
.yx-scrim { position: fixed; inset: 0; z-index: 74; background: var(--scrim); border: 0; }
.yx-scrim[hidden] { display: none; }

/* ------------------------------------------------------------------ 首页头屏 */

.yx-hero { position: relative; background: var(--accent); color: var(--accent-ink); overflow: hidden; padding: 18px 0 22px; }
.yx-hero__deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.yx-hero__deco img { position: absolute; height: auto; }
.yx-hero__deco1 { right: 0; top: -10px; width: 120px; opacity: 0.4; }
.yx-hero__deco2 { left: 50%; bottom: -8px; width: 104px; opacity: 0.8; }
.yx-hero__deco3 { left: 50%; top: -60px; width: 92px; opacity: 0.5; }
.yx-hero__inner { position: relative; z-index: 1; }
.yx-hero__brand { font-size: 25px; font-weight: 700; margin: 0 0 4px; }
.yx-hero__line { font-size: 15px; line-height: 1.6; margin: 0 0 14px; max-width: 34em; color: var(--accent-ink); }
.yx-hero__fast { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0 0 2px; }
.yx-hero__fast a { position: relative; display: block; padding: 2px 0 8px; color: var(--accent-ink); font-size: 14px; }
.yx-hero__fast a:hover { text-decoration: none; }
.yx-hero__fast a[aria-current="page"] { font-size: 22px; font-weight: 600; }
.yx-hero__fast a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: var(--accent-light);
}

/* ------------------------------------------------------------------- 焦点条 */

.yx-focus { position: relative; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-1); margin: 0 0 22px; }
.yx-hero .yx-focus { margin: 18px 0 0; box-shadow: 0 10px 26px rgba(35, 38, 47, 0.22); }
.yx-focus__slides { margin: 0; }
.yx-focus__slide { display: none; }
.yx-focus__slide[data-active="true"] { display: block; }
.yx-focus__link { display: block; min-height: 132px; padding: 18px 18px 40px; color: var(--text); }
.yx-focus__link:hover { text-decoration: none; }
.yx-focus__kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--link); }
.yx-focus__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.45; }
.yx-focus__dots { position: absolute; right: 8px; bottom: 6px; display: flex; align-items: center; margin: 0; }
.yx-focus__dots button {
  width: 8px;
  height: 8px;
  padding: 9px;
  box-sizing: content-box;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  background-clip: content-box;
  cursor: pointer;
}
.yx-focus__dots button[aria-current="true"] { width: 18px; background: var(--accent); background-clip: content-box; }

/* ------------------------------------------------------------------ layout */

.yx-main { padding: 22px 0 0; }
.yx-crumb { font-size: 14px; color: var(--text-muted); margin: 0 0 14px; }
.yx-crumb ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; }
.yx-crumb li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.yx-crumb a { color: var(--text-muted); }
.yx-lede { font-size: 17px; line-height: 1.75; color: var(--text-muted); margin: 0 0 24px; }
.yx-section { margin: 0 0 30px; }
.yx-sec-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.yx-sec-hd h2 { margin: 0; padding: 0; border: 0; }
.yx-more { flex: 0 0 auto; padding: 2px 14px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600; }
.yx-more:hover { background: var(--accent-deep); text-decoration: none; }

.yx-list { margin: 0 0 14px; }
.yx-list li { position: relative; padding: 6px 0 6px 18px; }
.yx-list li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-soft); }

.yx-facts { display: grid; gap: 12px; grid-template-columns: 1fr; }
.yx-fact { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 16px 18px; }
.yx-fact p { margin: 0; color: var(--text-muted); }

.yx-tablewrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.yx-table { width: 100%; min-width: 520px; font-size: 15px; }
.yx-table caption { caption-side: top; text-align: left; padding: 14px 16px 6px; font-weight: 700; color: var(--text); }
.yx-table th, .yx-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.yx-table thead th { background: var(--surface-2); color: var(--text); border-top: 0; font-weight: 600; }
.yx-table tbody tr:last-child td { border-bottom: 1px solid var(--line); }

.yx-group { margin: 0 0 18px; }
.yx-group__name { display: inline-block; margin: 0 0 10px; padding: 3px 14px; border-radius: var(--radius-pill); background: var(--accent-tint); color: var(--on-accent-soft); font-size: 15px; font-weight: 700; }
.yx-cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 0; }
.yx-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; }
.yx-card__link { display: block; height: 100%; padding: 14px 16px 16px; color: var(--text); }
.yx-card__link:hover { text-decoration: none; }
.yx-card__tag { display: inline-block; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--accent-tint); color: var(--on-accent-soft); font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.yx-card__title { margin: 0 0 6px; }
.yx-card__body { margin: 0; font-size: 15px; color: var(--text-muted); }

.yx-faq { margin: 0; }
.yx-faq dt { font-weight: 600; margin: 16px 0 0; }
.yx-faq dt:first-child { margin-top: 0; }
.yx-faq dd { margin: 6px 0 0; color: var(--text-muted); }

.yx-links { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 0 0 14px; }
.yx-links li { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: 12px 16px; }
.yx-links a { font-weight: 600; }
.yx-links span { display: block; margin-top: 2px; font-size: 14px; color: var(--text-muted); }

.yx-note { background: var(--accent-tint); border-radius: var(--radius-lg); padding: 14px 16px; color: var(--on-accent-soft); font-size: 15px; }
.yx-note a { color: var(--accent-deep); font-weight: 600; text-decoration: underline; }

.yx-regions { margin: 0; }
.yx-region { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); padding: 16px 18px; margin-bottom: 12px; }
.yx-region__blurb { margin: 0 0 10px; font-size: 15px; color: var(--text-muted); }
.yx-region__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.yx-region__list a {
  display: block;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-size: 15px;
}
.yx-region__list a:hover { border-color: var(--accent); color: var(--link); text-decoration: none; }
.yx-region__list em { margin-left: 6px; font-style: normal; font-size: 13px; color: var(--text-muted); }

/* ------------------------------------------------------------------ footer */

.yx-foot { background: var(--surface); margin-top: 30px; padding: 26px 0 30px; }
.yx-foot__grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
.yx-foot__brand { max-width: 30em; }
.yx-foot__logo { font-size: 20px; font-weight: 700; color: var(--text); }
.yx-foot__line { margin: 8px 0 0; font-size: 14px; color: var(--text-muted); }
.yx-foot__title { margin: 0 0 8px; font-size: 15px; font-weight: 700; color: var(--text); }
.yx-foot__list li { margin: 0 0 6px; }
.yx-foot__list a { font-size: 14px; color: var(--text-muted); }
.yx-foot__list a:hover { color: var(--link); }

/* --------------------------------------------------------------- xunfang CTA */

[data-site-cta="xunfang"] {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(92vw, 480px);
  min-height: 56px;
  padding: 10px 26px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
[data-site-cta="xunfang"]:hover { background: var(--accent); color: var(--accent-ink); }
[data-site-cta="xunfang"]::before {
  content: "";
  position: absolute;
  left: 13%;
  right: 13%;
  bottom: 9px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-ink);
  transform-origin: left center;
  transform: scaleX(1);
  animation: yxSlitDraw 3s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}

@keyframes yxSlitDraw {
  0% { transform: scaleX(0); background: var(--accent-soft); opacity: 1; }
  34% { transform: scaleX(1); background: var(--accent-ink); opacity: 1; }
  88% { transform: scaleX(1); background: var(--accent-ink); opacity: 1; }
  100% { transform: scaleX(0); background: var(--accent-soft); opacity: 0; }
}

/* -------------------------------------------------------------- breakpoints */

@media (min-width: 640px) {
  .yx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yx-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yx-foot__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

@media (min-width: 900px) {
  .yx-topbar__menu { display: none; }
  .yx-hero { padding: 24px 0 26px; }
  .yx-hero__brand { font-size: 30px; }
  .yx-focus__link { min-height: 150px; padding: 24px 24px 44px; }
  .yx-focus__title { font-size: 20px; }
}

@media (min-width: 1040px) {
  .yx-main { padding: 30px 0 0; }
  h1 { font-size: 34px; }
  h2 { font-size: 23px; }
  .yx-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yx-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .yx-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  .yx-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(84vw, 320px);
    z-index: 76;
    overflow-y: auto;
    padding: 16px 10px 24px;
    background: var(--surface);
    box-shadow: var(--shadow-1);
    transform: translateX(-100%);
    transition: transform 0.25s ease-out;
  }
  .yx-nav[data-open="true"] { transform: none; }
  .yx-nav__list { display: block; padding: 0; }
  .yx-nav__link { padding: 12px 14px; border-radius: var(--radius); font-size: 16px; color: var(--text); }
  .yx-nav__link:hover { background: var(--surface-2); }
  .yx-nav__link[aria-current="page"] { background: var(--accent-tint); color: var(--on-accent-soft); }
  .yx-hero__fast { gap: 0 18px; }
  [data-site-cta="xunfang"] { font-size: 16px; padding: 10px 18px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-site-cta="xunfang"]::before {
    animation: none;
    transform: scaleX(1);
    opacity: 1;
    background: var(--accent-ink);
  }
  .yx-nav { transition: none; }
}
