/* ==========================================================================
   卷医考官网 - 样式表
   移动优先，无第三方依赖，主色与 App 保持一致（医疗青绿）
   ========================================================================== */

:root {
  --brand: #4DB08C;
  --brand-dark: #3F9E7B;
  --brand-soft: #EAF6F1;
  --brand-softer: #F3FAF7;

  --ink: #16211D;
  --text: #3F4A45;
  --muted: #6B7280;
  --line: #E7EDEA;

  --white: #fff;
  --bg: #F6FAF8;
  --cta: #FF7A45;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(22, 45, 38, .08);
  --shadow-sm: 0 4px 14px rgba(22, 45, 38, .06);
  --max: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }

h1, h2, h3 { color: var(--ink); line-height: 1.35; font-weight: 700; }
h1 { font-size: 28px; letter-spacing: -.4px; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
p { color: var(--text); }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 18px; }

/* ---------- 头部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 58px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 17px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand span { letter-spacing: -.2px; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; stroke: var(--ink); }

.site-nav {
  display: none;
  position: absolute; left: 0; right: 0; top: 58px;
  background: var(--white); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 8px 18px 14px;
}
.site-nav.is-open { display: block; }
.site-nav a {
  display: block; padding: 10px 4px; color: var(--text); font-size: 15px;
  border-bottom: 1px solid #F3F6F4;
}
.site-nav a:last-child { border-bottom: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 12px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(77, 176, 140, .28); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }

.btn-cta { background: var(--cta); color: #fff; box-shadow: 0 8px 18px rgba(255, 122, 69, .26); }
.btn-cta:hover { background: #F0693A; color: #fff; }

.btn-ghost { background: var(--white); color: var(--brand-dark); border-color: #CFE7DD; }
.btn-ghost:hover { background: var(--brand-softer); }

.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -10%, #DFF3EA 0%, rgba(223, 243, 234, 0) 62%),
    linear-gradient(180deg, #F4FBF8 0%, #FFFFFF 100%);
  padding: 34px 0 26px;
}
.hero-grid { display: grid; gap: 26px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--white); border: 1px solid #D8EDE4; color: var(--brand-dark);
  font-size: 12.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.hero h1 { margin: 14px 0 10px; }
.hero h1 em { font-style: normal; color: var(--brand-dark); }
.hero-sub { font-size: 15px; color: var(--muted); margin-bottom: 18px; }

.hero-points { list-style: none; display: grid; gap: 8px; margin: 0 0 22px; }
.hero-points li { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; color: var(--text); }
.hero-points svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero-note { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* 手机样机 */
.hero-visual { display: flex; justify-content: center; }
.phone {
  position: relative; width: 228px;
  padding: 9px; border-radius: 30px;
  background: linear-gradient(160deg, #FFFFFF, #E9F3EE);
  box-shadow: 0 26px 50px rgba(22, 60, 45, .18), inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.phone img { width: 100%; border-radius: 22px; }

/* ---------- 通用区块 ---------- */
.section { padding: 40px 0; }
.section-soft { background: var(--bg); }
.section-head { max-width: 640px; margin-bottom: 22px; }
.section-head p { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

/* ---------- 三端入口 ---------- */
.entry-grid { display: grid; gap: 14px; }
.entry {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
  display: flex; gap: 14px; align-items: flex-start;
}
.entry-ico {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft);
}
.entry-ico svg { width: 22px; height: 22px; stroke: var(--brand-dark); }
.entry h3 { margin-bottom: 4px; }
.entry p { font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.entry .btn { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.entry-tag { font-size: 12px; color: #B45309; background: #FFF6ED; border: 1px solid #FFE2C7; padding: 2px 8px; border-radius: 999px; }

/* ---------- 功能 ---------- */
.feature-grid { display: grid; gap: 14px; }
.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.feature-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.feature-ico svg { width: 21px; height: 21px; stroke: var(--brand-dark); }
.feature h3 { margin-bottom: 6px; }
.feature p { font-size: 13.5px; color: var(--muted); }

/* ---------- 截图横滑 ---------- */
.shots-wrap { position: relative; }
.shots {
  display: flex; gap: 14px; overflow-x: auto;
  padding: 6px 18px 16px;
  /* 图片少时居中，溢出时从左侧开始（safe 关键字避免左侧被裁切） */
  justify-content: safe center;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shots::-webkit-scrollbar { height: 0; }
.shots.is-auto { scroll-snap-type: none; }

.shot {
  flex: 0 0 216px; scroll-snap-align: center;
  border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); background: var(--white);
  transition: transform .25s ease, box-shadow .25s ease;
}
.shot:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(22, 45, 38, .12); }
/* 统一裁切比例（450×800 ≈ 9:16），顶部对齐，保证同一行等高 */
/* 高度按 450:800 精确比例换算，保证截图不被裁切 */
.shot img { width: 100%; height: 384px; object-fit: cover; object-position: top center; }
.shot-title {
  display: block; padding: 8px 10px 10px; text-align: center;
  font-size: 12.5px; color: var(--muted);
  border-top: 1px solid #F3F6F4;
}

/* 左右箭头（桌面端显示） */
.shots-arrow {
  position: absolute; top: 42%; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .96); border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(22, 45, 38, .14);
}
.shots-arrow:hover { background: #fff; }
.shots-arrow svg { width: 18px; height: 18px; stroke: var(--ink); }
.shots-arrow.prev { left: 6px; }
.shots-arrow.next { right: 6px; }

/* 指示点 */
.shots-dots { display: flex; justify-content: center; gap: 6px; margin-top: 2px; }
.shots-dots button {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%;
  background: #D3E3DC; cursor: pointer; transition: width .2s ease, background .2s ease;
}
.shots-dots button.is-active { width: 18px; border-radius: 3px; background: var(--brand); }

.shots-hint { font-size: 12.5px; color: var(--muted); padding: 8px 18px 0; text-align: center; }

/* 入场动效（仅一次，尊重 reduced-motion） */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .shot:hover { transform: none; }
}

/* ---------- 数据 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 22px; color: var(--brand-dark); letter-spacing: -.5px; }
.stat span { font-size: 12.5px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; }
.faq-item {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 0 16px; box-shadow: var(--shadow-sm);
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 14px 0;
  font-weight: 600; color: var(--ink); font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; flex: 0 0 10px; width: 10px; height: 10px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p { padding: 0 0 15px; font-size: 14px; color: var(--muted); }

/* ---------- 底部 CTA ---------- */
.cta-box {
  background: linear-gradient(140deg, #4DB08C 0%, #3F9E7B 100%);
  border-radius: 20px; padding: 26px 20px; color: #fff;
  box-shadow: 0 18px 38px rgba(63, 158, 123, .28);
}
.cta-box h2 { color: #fff; margin-bottom: 6px; }
.cta-box p { color: rgba(255, 255, 255, .88); font-size: 14px; margin-bottom: 16px; }
.cta-box .btn-ghost { background: #fff; border-color: #fff; color: var(--brand-dark); }
.cta-box .btn-cta { background: #fff; color: var(--brand-dark); box-shadow: none; }

/* ---------- 页脚 ---------- */
.site-footer { background: #14201B; color: #B9C6C0; padding: 30px 0 26px; margin-top: 40px; }
.footer-top { display: grid; gap: 18px; margin-bottom: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.footer-brand img { width: 30px; height: 30px; border-radius: 8px; }
.footer-desc { font-size: 13px; color: #93A29B; margin-top: 8px; line-height: 1.7; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; }
.footer-links a { color: #B9C6C0; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #26332D; padding-top: 16px;
  font-size: 12.5px; color: #7C8B84; display: grid; gap: 6px;
}
.footer-bottom a { color: #7C8B84; }

/* ---------- 小程序码 ---------- */
.qr-card {
  display: grid; gap: 20px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 20px; padding: 22px; box-shadow: var(--shadow-sm);
}
.qr-info h2 { margin-bottom: 8px; }
.qr-info > p { color: var(--muted); font-size: 14.5px; }
.qr-points { list-style: none; margin: 14px 0 0; display: grid; gap: 8px; }
.qr-points li {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 14px; color: var(--text);
}
.qr-points li::before {
  content: ""; flex: 0 0 6px; width: 6px; height: 6px; margin-top: 8px;
  border-radius: 50%; background: var(--brand);
}
.qr-figure { margin: 0; text-align: center; }
.qr-figure img {
  width: 190px; height: 190px; margin: 0 auto;
  border-radius: 12px; border: 1px solid var(--line); background: #fff;
}
.qr-figure figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ---------- 文档页（协议 / 隐私） ---------- */
.doc { padding: 26px 0 10px; }
.doc-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 18px; }
.doc-head h1 { font-size: 23px; }
.doc-meta { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.doc h2 { font-size: 17px; margin: 26px 0 8px; }
.doc h3 { font-size: 15px; margin: 18px 0 6px; color: var(--ink); }
.doc p, .doc li { font-size: 14.5px; color: var(--text); }
.doc p { margin: 8px 0; }
.doc ul, .doc ol { margin: 8px 0 8px 20px; }
.doc li { margin: 5px 0; }
.doc strong { color: var(--ink); }
.doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--brand-softer); color: var(--ink); font-weight: 600; }
.doc-note {
  background: var(--brand-softer); border: 1px solid #D8EDE4; border-radius: 12px;
  padding: 12px 14px; font-size: 13.5px; color: var(--text); margin: 14px 0;
}
.doc-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; margin-bottom: 14px; }

/* ---------- 响应式 ---------- */
@media (min-width: 640px) {
  h1 { font-size: 34px; }
  .entry-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-top { grid-template-columns: 1.4fr 1fr; align-items: start; }
}

@media (min-width: 900px) {
  body { font-size: 15.5px; }
  .hero { padding: 56px 0 44px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; }
  h1 { font-size: 42px; }
  h2 { font-size: 26px; }
  .section { padding: 60px 0; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .entry-grid { gap: 18px; }
  .phone { width: 300px; }
  .shots { padding: 6px 0 16px; gap: 16px; }
  .shot { flex-basis: 240px; }
  .shot img { height: 427px; }
  .shots-arrow { display: flex; }
  .shots-hint { padding: 10px 0 0; }
  .cta-box { padding: 38px 34px; }
  .qr-card { grid-template-columns: 1fr auto; align-items: center; gap: 34px; padding: 32px 34px; }
  .qr-figure img { width: 220px; height: 220px; }
  .nav-toggle { display: none; }
  .site-nav {
    display: flex !important; position: static; background: transparent;
    border: 0; box-shadow: none; padding: 0; gap: 22px;
  }
  .site-nav a { padding: 0; border: 0; font-size: 14.5px; color: var(--text); }
  .site-nav a:hover { color: var(--brand-dark); }
}
