/* TODO: 按需调整 --accent 与间距比例 */

:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --bg-alt: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --border: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --header-h: 3rem;
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1120px;
  --narrow: 720px;
  --space-section: clamp(4rem, 12vw, 7.5rem);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --reveal-y: 20px;
  --reveal-duration: 0.75s;
  --reveal-stagger: 0.08s;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #161617;
    --surface: rgba(29, 29, 31, 0.72);
    --text: #f5f5f7;
    --text-muted: #a1a1a6;
    --border: rgba(255, 255, 255, 0.12);
    --accent: #2997ff;
    --accent-hover: #42a4ff;
  }
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-skip-ink: auto;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  left: 0.75rem;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

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

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

.section--alt {
  background-color: var(--bg-alt);
}

.section__title {
  font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.section__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.0625rem;
  max-width: 40ch;
}

.section__subtitle code {
  font-size: 0.88em;
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text-muted) 12%, transparent);
  font-weight: 500;
}

.section__lead {
  margin: 0;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.25rem);
  color: var(--text-muted);
  line-height: 1.6;
}

.intro-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 3vw, 1.75rem);
}

.intro-lede {
  margin: 0;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.65;
  color: var(--text);
}

.intro-lede strong {
  font-weight: 600;
}

.intro-services__heading {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.intro-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.intro-list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.intro-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

.intro-note {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.intro-note strong {
  font-weight: 600;
  color: var(--text);
}

.intro-callout {
  margin: clamp(1.25rem, 3vw, 1.75rem) 0 clamp(1.5rem, 4vw, 2rem);
  padding: clamp(1.35rem, 3vw, 1.75rem) clamp(1.35rem, 3vw, 1.85rem);
  padding-left: calc(clamp(1.35rem, 3vw, 1.85rem) + 6px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(155deg, #22262e 0%, #14171d 48%, #101318 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 14px 44px rgba(0, 0, 0, 0.22);
  position: relative;
}

.intro-callout::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, #8ec5ff) 100%);
}

.intro-callout__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.1875rem, 1rem + 0.65vw, 1.42rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #f5f5f7;
}

.intro-callout__body {
  margin: 0;
  font-size: clamp(0.9375rem, 0.88rem + 0.2vw, 1.0625rem);
  line-height: 1.68;
  color: #aeaeb7;
}

.intro-callout__highlight {
  display: inline;
  font-weight: 700;
  color: #ffffff;
  padding: 0.1em 0.42em;
  border-radius: 7px;
  background: color-mix(in srgb, var(--accent) 38%, rgba(255, 255, 255, 0.06));
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.intro-callout__body strong {
  font-weight: 700;
  color: #f5f5f7;
}

@media (prefers-color-scheme: dark) {
  .intro-callout {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.07) inset,
      0 18px 56px rgba(0, 0, 0, 0.55);
  }
}

.section__head {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--surface);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--border);
}

.site-header__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.site-logo {
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-logo:hover {
  color: var(--text);
  opacity: 0.8;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--text);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle__bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 0.2rem auto;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.75rem);
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.35rem;
}

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

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    max-height: 0;
    overflow: hidden;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    transition: max-height 0.35s ease;
  }

  .site-nav.is-open {
    max-height: 320px;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem clamp(1.25rem, 4vw, 2rem) 1.5rem;
    gap: 0;
  }

  .site-nav__list a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--border);
  }

  .site-nav__list li:last-child a {
    border-bottom: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle__bar,
  .site-nav {
    transition: none;
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: calc(var(--header-h) + 2rem) 4rem;
}

.hero__inner {
  padding-inline: clamp(1.25rem, 4vw, 2rem);
}

.hero__eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.25rem, 1.4rem + 3.5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero__lead {
  margin: 0 auto 2rem;
  max-width: 36ch;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  color: var(--text-muted);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.4;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, transparent, var(--text-muted));
  animation: scroll-pulse 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll-line {
    animation: none;
  }
}

@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(0.85);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.35rem;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: 980px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--border);
}

.btn--ghost:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent-hover);
}

.btn--large {
  min-height: 3.25rem;
  padding-inline: 2rem;
  font-size: 1.0625rem;
}

.btn:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  .btn:active {
    transform: none;
  }
}

/* Card grid */
.card-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  grid-template-columns: 1fr;
}

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

@media (min-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 四张 App 展示卡：大屏 2×2，避免 3+1 断行 */
.card-grid.card-grid--quad {
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .card-grid.card-grid--quad {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .card-grid.card-grid--quad {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 仅两张卡：大屏保持两列，不占满三列栅格 */
.card-grid.card-grid--duo {
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .card-grid.card-grid--duo {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .card-grid.card-grid--duo {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card-grid.card-grid--single {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid.card-grid--single {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 960px) {
  .card-grid.card-grid--single {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  .card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }
  .card:hover {
    transform: none;
  }
}

.card__media {
  aspect-ratio: 16 / 10;
  background: color-mix(in srgb, var(--text-muted) 12%, var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
}

.card__media--gallery {
  aspect-ratio: auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: clamp(220px, 36vw, 320px);
  height: clamp(220px, 36vw, 320px);
  padding: 0.5rem 0 0;
  background: linear-gradient(
    165deg,
    color-mix(in srgb, var(--text-muted) 10%, var(--bg)) 0%,
    var(--bg-alt) 55%,
    color-mix(in srgb, var(--accent) 4%, var(--bg-alt)) 100%
  );
}

.card__gallery {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1rem;
  padding: 0.35rem 1rem 0.5rem;
  margin: 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text-muted) 45%, transparent) transparent;
  -webkit-overflow-scrolling: touch;
}

.card__gallery::-webkit-scrollbar {
  height: 5px;
}

.card__gallery::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-muted) 40%, transparent);
  border-radius: 99px;
}

.card__gallery img {
  flex: 0 0 auto;
  height: min(100%, 300px);
  width: auto;
  max-height: calc(100% - 2px);
  max-width: min(220px, 82%);
  object-fit: contain;
  object-position: center;
  scroll-snap-align: center;
  border-radius: 14px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

/* PC / 宽屏截图（商城后台、Web 门户） */
.card__media--gallery-wide {
  min-height: clamp(200px, 26vw, 280px);
  height: clamp(200px, 26vw, 280px);
}

.card__media--gallery-wide .card__gallery {
  align-items: center;
}

.card__media--gallery-wide .card__gallery img {
  height: auto;
  max-height: min(248px, 92%);
  max-width: min(540px, 92%);
  width: auto;
}

@media (prefers-color-scheme: dark) {
  .card__gallery img {
    box-shadow:
      0 4px 6px rgba(0, 0, 0, 0.2),
      0 14px 36px rgba(0, 0, 0, 0.45);
  }
}

.card__gallery-hint {
  margin: 0;
  padding: 0.35rem 1rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .card__gallery {
    scroll-snap-type: none;
  }
}

.card__placeholder {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.card__title {
  margin: 1.25rem 1.25rem 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.card__desc {
  margin: 0 1.25rem 1rem;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.gupiao-cs-showcase--standalone .gupiao-cs-showcase__card-title {
  margin: 1.25rem 1.25rem 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* 期货 / 股票 · 客服坐席独立重点区 */
.gupiao-cs-section__head {
  margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
}

.gupiao-cs-section__head .section__subtitle {
  max-width: 52ch;
}

.gupiao-cs-eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.gupiao-cs-spotlight {
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
  padding: clamp(1.35rem, 3vw, 1.85rem) clamp(1.35rem, 3vw, 1.95rem);
  padding-left: calc(clamp(1.35rem, 3vw, 1.95rem) + 6px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(155deg, #1e2430 0%, #12151c 50%, #0c0e12 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 16px 48px rgba(0, 0, 0, 0.2);
  position: relative;
}

.gupiao-cs-spotlight::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, #8ec5ff) 100%);
}

.gupiao-cs-spotlight__label {
  margin: 0 0 0.75rem;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f5f5f7;
}

.gupiao-cs-spotlight__body {
  margin: 0;
  font-size: clamp(0.9375rem, 0.88rem + 0.2vw, 1.0625rem);
  line-height: 1.7;
  color: #b4b4bd;
}

.gupiao-cs-spotlight__body strong {
  font-weight: 700;
  color: #f5f5f7;
}

.gupiao-cs-spotlight__points {
  margin: 1.15rem 0 0;
  padding: 0 0 0 1.2rem;
  color: #c7c7cd;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.gupiao-cs-spotlight__points li + li {
  margin-top: 0.45rem;
}

@media (prefers-color-scheme: dark) {
  .gupiao-cs-spotlight {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.07) inset,
      0 20px 56px rgba(0, 0, 0, 0.5);
  }
}

/* 与同区块上方「自己的客服系统」说明卡同宽；预览带固定高度，竖屏/横屏截图垂直居中、底边对齐 */
#gupiao-service .gupiao-cs-showcase .card__media--gallery-wide.gupiao-cs-showcase__media {
  min-height: clamp(272px, 34vw, 336px);
  height: clamp(272px, 34vw, 336px);
}

#gupiao-service .gupiao-cs-showcase .card__gallery {
  align-items: center;
  padding-block: 0.5rem;
}

#gupiao-service .gupiao-cs-showcase .card__gallery img {
  flex-shrink: 0;
  width: auto;
  height: auto;
  max-height: min(300px, calc(100% - 12px));
  max-width: min(680px, 88vw);
  object-fit: contain;
  object-position: center center;
}

#gupiao-service .gupiao-cs-showcase .card__gallery img:first-of-type {
  max-width: min(220px, 32vw);
}

@media (max-width: 639px) {
  #gupiao-service .gupiao-cs-showcase .card__gallery img:first-of-type {
    max-width: min(160px, 42vw);
  }
}

.gupiao-cs-showcase__footer {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

.gupiao-cs-showcase__note {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 62ch;
}

.card__link {
  margin: 0 1.25rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
}

.card__link:hover {
  text-decoration: underline;
}

/* Article list */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.article-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.article-card__link {
  display: block;
  padding: 1.35rem 1.5rem;
  text-decoration: none;
  color: inherit;
}

.article-card__block {
  padding: 1.35rem 1.5rem;
}

.article-card.article-card--static {
  cursor: default;
}

.article-card.article-card--static:hover {
  border-color: var(--border);
  background: var(--bg-alt);
}

.article-card__date {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.article-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.article-card__excerpt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* 右侧悬浮：仅 Telegram（纸飞机）快捷入口 */
.tg-fab-aside {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 45;
  pointer-events: none;
}

.tg-fab {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.22);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tg-fab:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.28);
}

.tg-fab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.tg-fab__icon {
  width: 1.55rem;
  height: 1.55rem;
  margin-inline-start: 2px;
  margin-block-start: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .tg-fab {
    transition: none;
  }
}

:root:not(.reduce-motion) .tg-fab:hover {
  transform: scale(1.06);
}

#articles,
#contact,
#gupiao,
#gupiao-service {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

/* CTA */
.cta-section {
  text-align: center;
}

.cta-section__inner {
  padding-block: 0.5rem;
}

.cta-section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cta-section__text {
  margin: 0 auto 1.75rem;
  max-width: 36ch;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.cta-section__hint {
  margin: 1.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cta-section__hint code {
  font-size: 0.8em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: color-mix(in srgb, var(--text-muted) 15%, transparent);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition:
    opacity var(--reveal-duration) cubic-bezier(0.22, 1, 0.36, 1),
    transform var(--reveal-duration) cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

html.reduce-motion .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Footer */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-footer__tg {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.site-footer__tg:hover {
  text-decoration: underline;
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-alt) 85%, transparent);
}

.lang-switcher__btn {
  min-width: 2rem;
  padding: 0.35rem 0.45rem;
  border: none;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  line-height: 1;
}

.lang-switcher__btn:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--text-muted) 10%, transparent);
}

.lang-switcher__btn.is-active {
  background: var(--accent);
  color: #fff;
}

.lang-switcher__btn.is-active:hover {
  color: #fff;
  background: var(--accent-hover);
}

@media (max-width: 767px) {
  .lang-switcher {
    margin-left: auto;
  }

  .site-nav {
    margin-left: 0;
  }
}

@media (min-width: 768px) {
  .site-nav {
    margin-left: auto;
  }
}

/* Gallery → lightbox */
.card__gallery img {
  cursor: zoom-in;
}

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

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(96vw, 1100px);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 3rem 1rem;
}

.lightbox__stage {
  max-height: min(78vh, 820px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: min(78vh, 820px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  background: color-mix(in srgb, var(--bg-alt) 92%, transparent);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__close:hover {
  background: var(--bg-alt);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  background: color-mix(in srgb, var(--bg-alt) 88%, transparent);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__nav:hover:not(:disabled) {
  background: var(--bg-alt);
}

.lightbox__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.lightbox__nav--prev {
  left: 0.35rem;
}

.lightbox__nav--next {
  right: 0.35rem;
}

.lightbox__counter {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@media (max-width: 640px) {
  .lightbox__dialog {
    padding: 2.25rem 1rem 0.75rem;
  }

  .lightbox__nav {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.5rem;
  }

  .lightbox__nav--prev {
    left: 0.15rem;
  }

  .lightbox__nav--next {
    right: 0.15rem;
  }
}
