/* RAW Matcher — 站点样式
   Input:  纯静态 HTML 页面（index.html, index-en.html, guide-*.html, privacy*.html）
   Output: 全站视觉样式，零外部依赖（替代 cdn.tailwindcss.com 生产用法）
   Pos:    设计基础层；改色/间距只动这里，页面不写内联样式
*/

:root {
  --ink: #0b2545;
  --ink-soft: #3d5a7a;
  --ink-faint: #6b839d;
  --blue-50: #eaf4fd;
  --blue-200: #b7dcf8;
  --blue-400: #7cb8e8;
  --blue-600: #2f7ac4;
  --blue-800: #14507f;
  --surface: #ffffff;
  --line: rgba(11, 37, 69, 0.12);
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1120px;
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06), 0 2px 8px rgba(11, 37, 69, 0.05);
  --shadow-md: 0 4px 14px rgba(11, 37, 69, 0.09), 0 12px 36px rgba(11, 37, 69, 0.07);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  background-color: var(--blue-50);
  background-image:
    radial-gradient(120% 90% at 88% 4%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(168deg, #f6fbff 0%, #d8ecfb 38%, var(--blue-200) 72%, var(--blue-400) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

picture {
  display: contents;
}

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

a {
  color: var(--blue-800);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--blue-600);
}

h1,
h2,
h3,
h4 {
  line-height: 1.22;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem);
  font-weight: 750;
}

h3 {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

code,
kbd {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(11, 37, 69, 0.07);
  border-radius: 5px;
  padding: 0.1em 0.38em;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.section {
  padding-block: clamp(48px, 7vw, 92px);
}

.section--tight {
  padding-block: clamp(32px, 4.5vw, 56px);
}

.lede {
  font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue-800);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.32em 0.85em;
  margin-bottom: 1.1rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(11, 37, 69, 0.08);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  margin-left: auto;
  font-size: 0.93rem;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 550;
}

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

.lang-switch {
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3em 0.85em;
  background: #fff;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 780px) {
  .nav-links {
    gap: 1rem;
  }
  .nav-links .hide-sm {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(40px, 6vw, 80px) clamp(36px, 5vw, 64px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

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

.hero h1 {
  margin-bottom: 0.45em;
}

.hero .lede {
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.22rem);
  font-weight: 450;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  margin-top: 1.9rem;
}

.appstore-badge img {
  height: 52px;
  width: auto;
}

.text-link {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(20, 80, 127, 0.35);
  padding-bottom: 1px;
}

.text-link:hover {
  border-bottom-color: var(--blue-600);
}

.hero-shot {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.below-hero {
  margin-top: 1.6rem;
  font-size: 0.88rem;
  color: var(--ink-faint);
}

/* ---------- Cards & grids ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow-sm);
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
}

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

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

@media (max-width: 860px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.card h3 {
  margin-bottom: 0.4em;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card ul {
  padding-left: 1.15em;
  margin: 0 0 1em;
}

.card li {
  margin-bottom: 0.35em;
}

/* 步骤卡 */

.step {
  position: relative;
  padding-top: 2.6rem;
}

.step-num {
  position: absolute;
  top: -14px;
  left: clamp(18px, 2.4vw, 26px);
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(160deg, var(--blue-600), var(--blue-800));
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(20, 80, 127, 0.28);
}

/* ---------- 格式网格 ---------- */

.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 1.4rem;
}

.format-grid span {
  display: block;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6em 0.4em;
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.88rem;
  color: var(--ink);
}

/* ---------- 表格 ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  padding: 0.75em 1em;
  border-bottom: 1px solid rgba(11, 37, 69, 0.08);
  vertical-align: top;
}

th {
  background: var(--blue-50);
  font-weight: 700;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 620px) {
  .table-wrap td,
  .table-wrap th {
    white-space: nowrap;
  }
}

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

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 1.15rem;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  padding: 1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

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

.faq summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--blue-600);
  line-height: 1;
  flex: none;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0 0 1.05rem;
  color: var(--ink-soft);
}

/* ---------- 文章页 ---------- */

.article {
  max-width: 780px;
  margin-inline: auto;
  padding-block: clamp(30px, 4vw, 52px) clamp(50px, 7vw, 90px);
}

.article h1 {
  font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.7rem);
}

.article h2 {
  margin-top: 2.2em;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem);
}

.article h3 {
  margin-top: 1.6em;
}

.article p,
.article li {
  color: var(--ink-soft);
}

.article li {
  margin-bottom: 0.5em;
}

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

.article .lead {
  font-size: 1.12rem;
  color: var(--ink);
}

.article figure {
  margin: 1.8rem 0;
}

.article figure img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.article figcaption {
  font-size: 0.86rem;
  color: var(--ink-faint);
  margin-top: 0.6rem;
}

.callout {
  background: #fff;
  border-left: 4px solid var(--blue-600);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.2rem;
  margin: 1.6rem 0;
  box-shadow: var(--shadow-sm);
}

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

.callout--warn {
  border-left-color: #e08c2a;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 1.2rem;
}

.breadcrumb a {
  color: var(--ink-faint);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.meta {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 1.6rem;
}

/* ---------- CTA 区块 ---------- */

.cta-box {
  background: linear-gradient(158deg, #ffffff 0%, #eaf4fd 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3.4vw, 40px);
  box-shadow: var(--shadow-md);
}

.cta-box h2 {
  margin-bottom: 0.35em;
}

.cta-box--split {
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 1.5rem 2rem;
  align-items: center;
}

@media (max-width: 720px) {
  .cta-box--split {
    grid-template-columns: 1fr;
  }
}

.cta-box .cta-row {
  margin-top: 1.4rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid rgba(11, 37, 69, 0.1);
  background: rgba(255, 255, 255, 0.6);
  padding-block: 2.4rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.copyright {
  margin-top: 1.2rem;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
