/* string 官网 · Slate
   令牌与 App 一致（shared/BRAND.md）：瓷白背景、鸢尾蓝强调色、石墨文字；卡片 16 / 控件 12 / 图标 11 / 大图块 30。
   颜色与圆角只在 :root 定义，其余规则一律引用变量。 */

:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --text: #202832;
  --text-2: #657084;
  --accent: #5368D9;
  --accent-strong: #4356C4;
  --accent-soft: #ECEFFC;
  --mark: #4A5CF5; /* App 图标底色，只用于品牌标记方块 */
  --separator: #E6EAF1;
  --online: #26845C;
  --danger: #BE4A44;
  --danger-soft: #FCF1F0;
  --online-soft: #E7F3EC;
  --separator-strong: #C9D0DD;
  --code-surface: #F1F3F7;

  --radius-card: 16px;
  --radius-control: 12px;
  --radius-icon: 11px;
  --radius-hero: 30px;

  --shadow-near: 0 1px 2px rgb(32 40 50 / 0.04);
  --shadow-far: 0 8px 24px rgb(32 40 50 / 0.06);
  --shadow-lift: 0 18px 48px rgb(83 104 217 / 0.16);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --container: 1120px;
  --gutter: 24px;
  --header-h: 64px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* 组件的 display 设置不能盖过 hidden 属性 */
[hidden] {
  display: none !important;
}

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 14px;
  background: var(--surface);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-far);
  z-index: 10;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- 按钮 ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-control);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  border: 1px solid transparent;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}

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

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

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--separator);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
}

.button.disabled {
  background: var(--accent-soft);
  color: var(--text-2);
  cursor: default;
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgb(247 248 250 / 0.85);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 0.5px solid var(--separator);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

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

.brand-tile {
  width: 32px;
  height: 32px;
  border-radius: 7px; /* 与图标同比例，约 22% */
  background: var(--mark);
  display: grid;
  place-items: center;
}

.brand-tile svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #fff;
  stroke-width: 11.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-word {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

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

.site-nav a,
.mobile-menu a {
  color: var(--text-2);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
}

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

.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-control);
  color: var(--text);
  cursor: pointer;
  place-items: center;
}

.menu-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.mobile-menu {
  margin: 0;
  inset: calc(var(--header-h) + 8px) 12px auto auto;
  width: min(280px, calc(100vw - 24px));
  padding: 8px;
  border: 0.5px solid var(--separator);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-far), var(--shadow-near);
}

.mobile-menu:is(:popover-open, .is-open) {
  display: grid;
}

/* 不支持 popover 时由 site.js 去掉属性，菜单自己定位到顶栏下方 */
.mobile-menu:not([popover]) {
  position: fixed;
  z-index: 6;
}

.mobile-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  color: var(--text);
}

.mobile-menu a:hover,
.mobile-menu a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
}

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
    --header-h: 58px;
  }

  .site-nav {
    display: none;
  }

  .menu-button {
    display: grid;
  }
}

/* ---------- 通用区块 ---------- */

.section {
  padding-block: 88px;
}

.section.tight {
  padding-block: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.pulse {
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

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

  html {
    scroll-behavior: auto;
  }
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
  margin-top: 14px;
}

.section-head p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 18px;
}

.card {
  background: var(--surface);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-near), var(--shadow-far);
}

.icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}

.icon-box svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fine {
  color: var(--text-2);
  font-size: 14px;
}

/* ---------- 首页：主视觉 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 72px 40px;
}

/* 与 App 控制台一致：右上角一根极淡的品牌连线水印 */
.hero::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -80px;
  width: 620px;
  height: 620px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M70.05 29.98C53.53 29.75 50.63 35.22 50 50S46.47 70.25 29.95 70.02' fill='none' stroke='%23ECEFFC' stroke-width='11.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(30px, 9vw, 68px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 22px;
}

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

/* 每个分句单独成行且不在句中断开，避免「推进工 / 作」这种拆法 */
.hero h1 span {
  display: block;
  white-space: nowrap;
}

.hero-lead {
  margin-top: 22px;
  font-size: clamp(17px, 2vw, 20px);
  color: var(--text-2);
  max-width: 34em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-actions .button {
  min-height: 52px;
  padding-inline: 26px;
}

.hero-meta {
  margin-top: 20px;
}

.phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 560px;
}

.phone {
  width: 252px;
  aspect-ratio: 506 / 1100;
  border-radius: 40px;
  padding: 7px;
  background: #11161c;
  box-shadow: var(--shadow-lift), 0 2px 6px rgb(32 40 50 / 0.12);
  flex: none;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 33px;
  background: var(--bg);
}

/* 两台手机靠负外边距叠压，而不是平移：平移不改变占位宽度，窄屏时会把单栏撑宽 */
.phones .phone.back {
  margin-left: -88px;
  transform: translateY(46px) rotate(4deg);
}

.phones .phone.front {
  transform: rotate(-3deg);
  z-index: 1;
}

@media (max-width: 1040px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .phones {
    min-height: 0;
    padding-bottom: 56px;
  }
}

@media (max-width: 520px) {
  .phone {
    width: 196px;
    border-radius: 32px;
    padding: 6px;
  }

  .phone img {
    border-radius: 27px;
  }

  .phones .phone.back {
    margin-left: -72px;
    transform: translateY(34px) rotate(4deg);
  }
}

/* ---------- Agent 图标带：自动横向滚动，两侧淡出 ---------- */

/* 宽度不超过内容区：一组 6 张卡片约 1200px，可视宽度必须小于一组，循环接缝处才不会露空 */
.marquee {
  max-width: var(--container);
  margin: 16px auto 0;
  padding-block: 12px; /* 给卡片投影留出空间，避免被 overflow 裁掉 */
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}

/* 鼠标悬停或键盘聚焦时暂停，方便看清 */
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  gap: 16px;
  padding: 0 16px 0 0; /* 与 gap 相同，保证两组衔接处间距一致 */
  margin: 0;
  list-style: none;
}

.agent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px 10px 10px;
  border-radius: var(--radius-card);
  background: var(--surface);
  border: 0.5px solid var(--separator);
  box-shadow: var(--shadow-near), var(--shadow-far);
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}

.agent-card img {
  width: 40px;
  height: 40px;
  flex: none;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* 减弱动态效果时不自动滚动，改为可手动横向滑动 */
@media (prefers-reduced-motion: reduce) {
  .marquee {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .marquee-track {
    animation: none;
    padding-inline: 14%;
  }

  .marquee-group[aria-hidden="true"] {
    display: none;
  }
}

@media (max-width: 600px) {
  .marquee-group {
    gap: 12px;
    padding-right: 12px;
  }

  .agent-card {
    padding: 8px 18px 8px 8px;
    font-size: 15px;
  }

  .agent-card img {
    width: 34px;
    height: 34px;
  }
}

/* ---------- 功能区 ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  padding: 28px;
}

.feature h3 {
  font-size: 19px;
  margin-top: 18px;
}

.feature p {
  margin-top: 8px;
  color: var(--text-2);
}

@media (max-width: 920px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

/* 左文右图的展示行 */
.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.showcase + .showcase {
  margin-top: 96px;
}

.showcase.reverse .showcase-media {
  order: -1;
}

.showcase-media {
  display: flex;
  justify-content: center;
  padding: 40px 24px;
  border-radius: var(--radius-hero);
  background: linear-gradient(160deg, var(--accent-soft), var(--bg) 70%);
}

.showcase-media .phone {
  width: min(240px, 100%);
}

.showcase-text h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  margin-top: 14px;
}

.showcase-text > p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 17px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 12px;
}

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.check-list li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--accent-soft) no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235368D9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

@media (max-width: 820px) {
  .showcase {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .showcase.reverse .showcase-media {
    order: 0;
  }
}

/* ---------- 步骤 ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  padding: 28px;
  position: relative;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-variant-numeric: tabular-nums;
}

.step h3 {
  font-size: 18px;
  margin-top: 18px;
}

.step p {
  margin-top: 8px;
  color: var(--text-2);
}

@media (max-width: 820px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- 加密示意 ---------- */

.secure-band {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  padding: 48px;
}

.flow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.flow-node {
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}

.flow-node .icon-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 10px;
}

.flow-node .icon-box svg {
  width: 26px;
  height: 26px;
}

.flow-node small {
  display: block;
  color: var(--text-2);
  font-weight: 400;
  font-size: 13px;
}

.flow-line {
  height: 2px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 14px);
}

@media (max-width: 860px) {
  .secure-band {
    grid-template-columns: 1fr;
    padding: 28px;
  }
}

@media (max-width: 480px) {
  .flow {
    grid-template-columns: 1fr;
  }

  .flow-line {
    width: 2px;
    height: 24px;
    margin-inline: auto;
    background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 14px);
  }
}

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

.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-hero);
  background: var(--accent);
  color: #fff;
  padding: 64px 48px;
  text-align: center;
}

.cta::after {
  content: "";
  position: absolute;
  left: -60px;
  bottom: -140px;
  width: 360px;
  height: 360px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M70.05 29.98C53.53 29.75 50.63 35.22 50 50S46.47 70.25 29.95 70.02' fill='none' stroke='white' stroke-opacity='0.12' stroke-width='11.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  pointer-events: none;
}

.cta h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.cta p {
  margin-top: 12px;
  opacity: 0.85;
  font-size: 18px;
}

.cta .button {
  margin-top: 30px;
  background: #fff;
  color: var(--accent);
  min-height: 52px;
  padding-inline: 28px;
}

.cta .button:hover {
  background: var(--accent-soft);
}

@media (max-width: 600px) {
  .cta {
    padding: 48px 22px;
    border-radius: 24px;
  }
}

/* ---------- 普通页面头 ---------- */

.page-head {
  padding-block: 64px 24px;
}

.page-head h1 {
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 800;
  margin-top: 16px;
}

.page-head p {
  margin-top: 14px;
  font-size: 18px;
  color: var(--text-2);
  max-width: 40em;
}

/* ---------- 下载页 ---------- */

.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.platform {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.platform-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.platform-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}

.platform-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform h2 {
  font-size: 22px;
}

.platform-head p {
  color: var(--text-2);
  margin-top: 4px;
}

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin: 0;
  padding: 16px 18px;
  border-radius: var(--radius-control);
  background: var(--bg);
}

.facts dt {
  font-size: 13px;
  color: var(--text-2);
}

.facts dd {
  margin: 2px 0 0;
  font-weight: 600;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.checksum {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--text-2);
}

.checksum code {
  overflow-wrap: anywhere;
  color: var(--text);
}

.platform-action {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.platform-action .button {
  width: 100%;
}

@media (max-width: 760px) {
  .platform-grid {
    grid-template-columns: 1fr;
  }
}

.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  background: var(--accent-soft);
  color: var(--text);
}

.notice .icon-box {
  background: var(--surface);
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.notice .icon-box svg {
  width: 18px;
  height: 18px;
}

/* ---------- 文档 ---------- */

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  padding-block: 48px 88px;
}

.docs-nav {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  font-size: 15px;
}

.docs-nav ul {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
}

.docs-nav-group {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  padding-left: 12px;
}

.docs-nav a {
  display: block;
  padding: 7px 12px;
  border-radius: 10px;
  color: var(--text);
}

.docs-nav a:hover {
  background: var(--surface);
}

.docs-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.docs-content {
  max-width: 760px;
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 24px;
  }

  .docs-nav {
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .docs-nav ul {
    display: contents;
  }

  .docs-nav-group {
    display: none;
  }

  .docs-nav a {
    white-space: nowrap;
    background: var(--surface);
    border: 0.5px solid var(--separator);
    border-radius: 999px;
  }
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 56px;
}

.pager-link {
  display: block;
  padding: 16px 20px;
  border-radius: var(--radius-card);
  border: 0.5px solid var(--separator);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

.pager-link span {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
}

.pager-link.next {
  text-align: right;
}

.pager-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 长文排版：文档、法律页、更新记录共用 */
.prose h1 {
  font-size: clamp(30px, 4.4vw, 40px);
  font-weight: 800;
}

.prose .lead {
  margin-top: 14px;
  font-size: 18px;
  color: var(--text-2);
}

.prose h2 {
  font-size: 24px;
  margin-top: 48px;
  padding-top: 8px;
}

.prose h3 {
  font-size: 18px;
  margin-top: 32px;
}

.prose p,
.prose ul,
.prose ol,
.prose table,
.prose .notice,
.prose pre {
  margin-top: 16px;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 6px;
}

.prose :not(pre) > code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--code-surface);
}

.prose pre {
  padding: 16px 18px;
  border-radius: var(--radius-control);
  background: var(--code-surface);
  overflow-x: auto;
  line-height: 1.6;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--separator);
  vertical-align: top;
}

.prose th {
  font-weight: 600;
  color: var(--text-2);
  font-size: 14px;
  white-space: nowrap;
}

.prose strong {
  font-weight: 650;
}

.prose kbd {
  padding: 1px 6px;
  border: 0.5px solid var(--separator);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
}

.doc-steps {
  list-style: none;
  padding: 0 !important;
  counter-reset: doc-step;
}

.doc-steps > li {
  position: relative;
  padding: 20px 22px 20px 70px;
  background: var(--surface);
  border: 0.5px solid var(--separator);
  border-radius: var(--radius-card);
  counter-increment: doc-step;
}

.doc-steps > li + li {
  margin-top: 12px;
}

.doc-steps > li::before {
  content: counter(doc-step);
  position: absolute;
  left: 22px;
  top: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  display: grid;
  place-items: center;
}

.doc-steps h3 {
  margin: 0;
  font-size: 17px;
}

.doc-steps p {
  margin-top: 6px;
  color: var(--text-2);
}

.doc-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}

.doc-card {
  display: flex;
  gap: 16px;
  padding: 22px;
  color: var(--text);
}

.doc-card:hover {
  color: var(--text);
  border-color: var(--accent);
}

.doc-card h3 {
  margin: 0;
  font-size: 17px;
}

.doc-card p {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 15px;
}

@media (max-width: 640px) {
  .doc-cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq-list details {
  padding: 0;
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 24px;
  font-weight: 600;
  font-size: 17px;
  position: relative;
}

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

.faq-list summary::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}

.faq-list details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq-list .answer {
  padding: 0 24px 22px;
  color: var(--text-2);
}

.faq-list .answer p + p {
  margin-top: 10px;
}

.faq-group {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  margin: 32px 0 4px;
}

/* ---------- 更新记录 ---------- */

.timeline {
  position: relative;
  max-width: 820px;
  display: grid;
  gap: 20px;
}

.release {
  padding: 28px;
}

.release-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
}

.release-head h2 {
  font-size: 22px;
}

.release-head time {
  color: var(--text-2);
  font-size: 15px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.release ul {
  margin: 16px 0 0;
  padding-left: 1.3em;
  color: var(--text);
}

.release li + li {
  margin-top: 6px;
}

.release h3 {
  margin-top: 20px;
  font-size: 15px;
  color: var(--text-2);
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 0.5px solid var(--separator);
  background: var(--surface);
  padding-top: 56px;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}

.footer-brand p {
  margin-top: 14px;
  color: var(--text-2);
  max-width: 20em;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 10px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.site-footer ul a {
  color: var(--text-2);
}

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

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-block: 20px 28px;
  border-top: 0.5px solid var(--separator);
  color: var(--text-2);
  font-size: 13px;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ---------- 404 ---------- */

.not-found {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 64px;
}

.not-found .mark-lg {
  width: 112px;
  height: 112px;
  margin: 0 auto 28px;
  border-radius: var(--radius-hero);
  background: var(--mark);
  box-shadow: var(--shadow-lift);
  display: grid;
  place-items: center;
}

.not-found .mark-lg svg {
  width: 112px;
  height: 112px;
  fill: none;
  stroke: #fff;
  stroke-width: 11.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.not-found h1 {
  font-size: 32px;
}

.not-found p {
  margin-top: 10px;
  color: var(--text-2);
}

.not-found .button {
  margin-top: 28px;
}

/* ---------- 问题反馈表单 ---------- */

.container.narrow {
  max-width: 800px;
}

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

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.feedback-form {
  position: relative;
  padding: 32px;
  display: grid;
  gap: 28px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field > label,
.field > legend,
.field > .label {
  font-weight: 600;
  padding: 0;
}

.field > legend {
  margin-bottom: 8px;
}

.req {
  color: var(--danger);
}

.optional {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-2);
  margin-left: 4px;
}

.hint {
  color: var(--text-2);
  font-size: 14px;
  margin-top: -4px;
}

.sub-label {
  display: block;
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 6px;
}

.feedback-form input[type="email"],
.feedback-form input[type="text"],
.feedback-form textarea,
.feedback-form select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 小于 16px 时 iOS 聚焦会自动放大页面 */
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.feedback-form textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.6;
}

.feedback-form select {
  appearance: none;
  padding-right: 40px;
  background: var(--bg) no-repeat right 14px center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23657084' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.feedback-form input:focus,
.feedback-form textarea:focus,
.feedback-form select:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* 只在离开字段或尝试提交后才标红：:user-invalid 为主，.submitted 兜底 novalidate 表单 */
.feedback-form :is(input, textarea):user-invalid,
.feedback-form.submitted :is(input, textarea):invalid {
  border-color: var(--danger);
  background-color: var(--danger-soft);
}

.error-msg {
  display: none;
  color: var(--danger);
  font-size: 14px;
}

.error-msg::before {
  content: "! ";
  font-weight: 700;
}

.field:has(:user-invalid) .error-msg,
.feedback-form.submitted .field:has(:invalid) .error-msg {
  display: block;
}

.field-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.counter {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.counter.over {
  color: var(--danger);
}

/* 问题类型：5 个选项直接平铺成胶囊，不用下拉 */
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented label {
  position: relative;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.segmented span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--separator);
  background: var(--bg);
  font-weight: 500;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.segmented label:hover span {
  border-color: var(--accent);
}

.segmented input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 640px) {
  .feedback-form {
    padding: 22px 18px;
    gap: 24px;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 附件拖放区 */
.dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 26px 20px;
  border: 1.5px dashed var(--separator-strong);
  border-radius: var(--radius-card);
  background: var(--bg);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.dropzone .icon-box {
  margin-bottom: 4px;
}

.dropzone strong {
  color: var(--accent);
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* 文件输入框被视觉隐藏，键盘聚焦时把焦点环画在拖放区上 */
.field:has(#fb-files:focus-visible) .dropzone {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.dropzone.full {
  opacity: 0.55;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.file-list:empty {
  display: none;
}

.file-list::after {
  content: attr(data-summary);
  font-size: 13px;
  color: var(--text-2);
  padding-left: 4px;
}

.file-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 10px;
  border: 0.5px solid var(--separator);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: var(--shadow-near);
}

.file-ext {
  flex: none;
  min-width: 44px;
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
}

.file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.file-size {
  flex: none;
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.file-remove {
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.file-remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.file-remove svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.file-status:empty {
  display: none;
}

.file-status.is-error {
  color: var(--danger);
}

.warn-note {
  font-size: 13px;
  color: var(--text-2);
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--code-surface);
}

/* .field > label 默认加粗；同意条款是正文，需要更高优先级恢复常规字重 */
.field > .check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-weight: 400;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.form-actions .button {
  min-width: 160px;
}

@media (max-width: 640px) {
  .form-actions .button {
    width: 100%;
  }
}

.form-status {
  flex: 1;
  min-width: 200px;
  font-size: 15px;
  color: var(--text-2);
}

.form-status.is-error {
  color: var(--danger);
}

.form-status:empty {
  display: none;
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.upload-progress {
  width: 100%;
  height: 6px;
  margin-top: -16px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--accent-soft);
}

.upload-progress::-webkit-progress-bar {
  background: var(--accent-soft);
}

.upload-progress::-webkit-progress-value {
  background: var(--accent);
}

.upload-progress::-moz-progress-bar {
  background: var(--accent);
}

/* 提交成功 */
.feedback-done {
  padding: 44px 32px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.feedback-done:focus {
  outline: none;
}

.done-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--online-soft);
  color: var(--online);
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.done-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feedback-done h2 {
  font-size: 26px;
}

.feedback-done code {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--code-surface);
  font-size: 15px;
}

.done-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- 顶栏账号入口 ---------- */

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 500;
}

.account-link:hover,
.account-link[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
}

.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}

.account-avatar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.account-avatar.is-signed-in {
  background: var(--accent);
  color: #fff;
}

@media (max-width: 760px) {
  .account-label {
    display: none;
  }

  .account-link {
    padding: 0 4px;
  }
}

/* ---------- 我的账号 ---------- */

.account-stack {
  display: grid;
  gap: 20px;
}

.account-loading {
  padding: 28px;
  color: var(--text-2);
}

.account-error.is-info {
  background: var(--online-soft);
}

.account-signin {
  padding: 44px 32px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
}

.account-signin p {
  color: var(--text-2);
  max-width: 30em;
}

.account-signin .button {
  margin-top: 8px;
}

.mark-tile {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--mark);
  box-shadow: var(--shadow-lift);
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.mark-tile svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: #fff;
  stroke-width: 11.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-profile {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  flex: none;
}

.profile-text {
  flex: 1;
  min-width: 0;
}

.profile-text h2 {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.account-section {
  padding: 24px 28px;
  display: grid;
  gap: 14px;
}

.account-section h2 {
  font-size: 18px;
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}

.switch-row > span {
  display: grid;
  gap: 2px;
}

/* 开关：原生 checkbox + role=switch，外观改为胶囊 */
.switch-row input {
  appearance: none;
  flex: none;
  width: 48px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: var(--separator-strong);
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
}

.switch-row input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-near);
  transition: transform 0.2s;
}

.switch-row input:checked {
  background: var(--accent);
}

.switch-row input:checked::after {
  transform: translateX(20px);
}

.switch-row input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.pref-status:empty {
  display: none;
}

.feedback-history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
}

.feedback-history li {
  padding: 14px 0;
  border-top: 0.5px solid var(--separator);
}

.feedback-history li:first-child {
  border-top: 0;
  padding-top: 0;
}

.history-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.history-top strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.tag.status-replied,
.tag.status-closed {
  background: var(--online-soft);
  color: var(--online);
}

.danger-zone {
  border-color: var(--danger-soft);
}

.button.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.button.danger:hover {
  background: var(--danger);
  color: #fff;
}

.identity-note {
  margin: -8px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  background: var(--accent-soft);
  font-size: 15px;
}

/* 确认对话框（原生 dialog） */
.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 28px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-far), var(--shadow-near);
}

.confirm-dialog::backdrop {
  background: rgb(32 40 50 / 0.35);
}

.confirm-dialog h2 {
  font-size: 20px;
}

.confirm-dialog p {
  margin-top: 10px;
  color: var(--text-2);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
