/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 234, 241, .9);
  transition: box-shadow .25s;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(23, 19, 38, .07);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .2px;
  white-space: nowrap;
}

.logo-img {
  display: block;
  height: 30px;
  width: auto;
}

.logo-sm {
  font-size: 15px;
  margin-bottom: 8px;
}

.logo-sm .logo-img {
  height: 24px;
}

.nav-links ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: #3E3850;
}

.nav-links a {
  position: relative;
  display: block;
  padding: 6px 0;
  transition: color .2s;
}

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

.nav-links a.is-active {
  color: var(--brand);
  font-weight: 700;
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}

.nav .spacer {
  flex: 1;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  flex: none;
}

.nav-toggle-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-box i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s, opacity .2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box i:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box i:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-box i:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- mobile drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(23, 19, 38, .42);
  backdrop-filter: blur(2px);
}

.drawer-backdrop[hidden] {
  display: none;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(320px, 86vw);
  background: #fff;
  box-shadow: -20px 0 60px rgba(23, 19, 38, .18);
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.2, .7, .3, 1);
  visibility: hidden;
}

.mobile-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--muted);
}

.drawer-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  color: var(--sub);
}

.drawer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.drawer-nav a {
  display: block;
  padding: 12px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #3E3850;
}

.drawer-nav a:hover,
.drawer-nav a:focus-visible {
  background: var(--brand-l);
  color: var(--brand-d);
}

.drawer-extra {
  display: flex;
  gap: 16px;
  padding: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--sub);
}

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

.mobile-drawer > .btn {
  margin-top: auto;
}

body.drawer-open {
  overflow: hidden;
}

body.drawer-open .mobile-bar {
  display: none;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 12px;
  transition: .2s;
  white-space: nowrap;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 11px 20px;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(255, 159, 28, .34);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(255, 159, 28, .42);
}

.btn-primary:disabled {
  opacity: .68;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 11px 18px;
  font-size: 14px;
}

.btn-ghost:hover {
  border-color: #C9D2E0;
}

.btn-xl {
  padding: 16px 28px;
  font-size: 16px;
  border-radius: 14px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12.5px;
  border-radius: 9px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-loading[hidden],
.btn-label[hidden] {
  display: none;
}

.btn.is-loading .btn-label {
  display: none;
}

.btn.is-loading .btn-loading {
  display: inline;
}

.btn.is-loading {
  pointer-events: none;
  opacity: .82;
}

/* ---------- ticker ---------- */
.ticker-sec {
  padding: 8px 0 6px;
}

.ticker {
  background: #1A1233;
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  position: relative;
}

.ticker .tt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #E2E8F0;
  font-size: 12.5px;
  white-space: nowrap;
  font-weight: 700;
}

.ticker .tt .dot {
  background: #A78BFA;
  box-shadow: 0 0 0 4px rgba(167, 139, 250, .18);
}

.track-mask {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.track {
  display: flex;
  gap: 0;
  width: max-content;
  /* 未执行脚本时：两份内容整体左移 50%，仍是首尾无缝的匀速循环 */
  animation: scroll 38s linear infinite;
}

/* 单份内容：一条横向的消息流水，宽度由内容决定，不被压缩、不参与拉伸 */
.seq {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

/* --seq-w 由 home.js 按实测的单份内容宽度写入，位移距离与周期同源，
   因此文本长短、条数多少、容器宽窄都不影响滚动速度（恒定 70 像素/秒）。 */
.track.is-synced {
  animation-name: scroll-measured;
  animation-duration: var(--seq-duration, 38s);
}

.ticker:hover .track {
  animation-play-state: paused;
}

.track.is-paused {
  animation-play-state: paused;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes scroll-measured {
  from { transform: translateX(0); }
  to { transform: translateX(calc(-1px * var(--seq-w, 0))); }
}

/* 播报条是首页的核心氛围元素：即使系统开启“减少动态效果”，也保持匀速滚动，
   所以不跟随 base.css 的全局动效关闭规则（那里已用 :not(.track) 豁免）。 */

.item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
  color: #D6CDE8;
  font-size: 12.5px;
  white-space: nowrap;
}

.item .num {
  color: #fff;
  font-weight: 700;
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: .3px;
}

.item .act {
  color: #CFC0F7;
}

/* 时间戳：比主体再暗一档、字号略小，像真实的开通流水 */
.item .tm {
  color: #8E7FB8;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- footer ---------- */
.site-footer {
  padding: 44px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

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

/* 页脚品牌后展示当前访问域名 */
.foot-domain {
  padding: 3px 10px;
  border-radius: 999px;
  background: #F4F0FF;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}

.foot-tagline {
  margin-top: 12px;
  color: var(--muted);
}

.foot-copy {
  margin-top: 8px;
}

/* ---------- mobile bar ---------- */
.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  gap: 10px;
  align-items: center;
}

.mobile-bar .txt {
  flex: 1;
  font-size: 12px;
  color: var(--sub);
  line-height: 1.4;
}

.mobile-bar .txt b {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
}

.mobile-bar .btn {
  padding: 12px 22px;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #1A1233;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  z-index: 120;
  transition: .25s;
  max-width: min(520px, calc(100vw - 36px));
  text-align: center;
  line-height: 1.5;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field label,
.field > span {
  font-size: 12.5px;
  font-weight: 700;
  color: #3E3850;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.field textarea {
  resize: vertical;
  min-height: 132px;
  line-height: 1.7;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #A79FB8;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(104, 64, 200, .10);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #DC2626;
}

.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .10);
}

.field-error {
  margin: 0;
  font-size: 12px;
  color: #B91C1C;
  line-height: 1.5;
}

.field-error:empty {
  display: none;
}

.required {
  color: #DC2626;
}

.optional {
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: -2px;
}

.checkbox {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--sub);
  margin: 16px 0 4px;
  line-height: 1.6;
  cursor: pointer;
}

.checkbox input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--brand);
  flex: none;
}

.checkbox a {
  color: var(--brand-d);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-alert {
  margin: 12px 0 0;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 12.5px;
}

.form-alert[hidden] {
  display: none;
}

/* ---------- page hero / common pages ---------- */
.page-hero {
  padding: 54px 0 44px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #FAF8FE 0%, var(--bg) 100%);
}

.page-hero::before {
  content: "";
  position: absolute;
  right: -12%;
  top: -40%;
  width: 52%;
  height: 130%;
  background: radial-gradient(circle at 50% 50%, rgba(104, 64, 200, .10), transparent 62%);
  pointer-events: none;
}

.page-hero > .wrap {
  position: relative;
}

.page-hero h1 {
  font-size: 42px;
}

.page-hero h1 em {
  font-style: normal;
  color: var(--brand);
}

.page-hero .lede {
  max-width: 660px;
}

.page-hero-compact {
  padding-top: 44px;
  padding-bottom: 34px;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand-l);
  color: var(--brand-d);
  font-size: 12.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 16px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(104, 64, 200, .16);
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.badge-verify {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-l);
  color: var(--brand-d);
  font-size: 11.5px;
  font-weight: 800;
  border-radius: 99px;
  padding: 5px 11px;
}

.section-page {
  padding: 54px 0 70px;
}

.cta-band {
  margin-top: 20px;
  background: linear-gradient(135deg, #1A1233 0%, #2B1B52 60%, #3A2270 100%);
  color: #fff;
  border-radius: 20px;
  padding: 30px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.cta-band::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -70px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 77, 224, .55), transparent 66%);
}

.cta-band h2 {
  color: #fff;
  font-size: 24px;
  margin: 0 0 4px;
}

.cta-band p {
  color: #B9B1CC;
  margin: 0;
  font-size: 13px;
}

.cta-band-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.notice {
  background: var(--accent-l);
  border: 1px solid #FDE2B8;
  color: #7C4A08;
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 12.5px;
  margin-bottom: 16px;
  line-height: 1.7;
}

.notice b {
  color: #5E3606;
}

.empty-hint {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 18px;
}

.empty-hint[hidden] {
  display: none;
}

code {
  font-family: ui-monospace, Consolas, monospace;
  background: #F2EDFC;
  color: var(--brand-d);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: .92em;
}
