/* ============================================================
   MathOCR 子页面（关于 / 联系 / 帮助中心）
   依赖 style.css 的设计变量与基础组件
   ============================================================ */

[hidden] { display: none !important; }

/* ---------- 子页头部 ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 52px 0 58px;
  background: linear-gradient(180deg, #fbfbff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.page-hero-bg::before,
.page-hero-bg::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
}
.page-hero-bg::before {
  width: 480px; height: 480px;
  background: radial-gradient(circle, #c7d2fe, transparent 68%);
  top: -230px; left: -110px; opacity: .55;
}
.page-hero-bg::after {
  width: 420px; height: 420px;
  background: radial-gradient(circle, #bae6fd, transparent 68%);
  top: -80px; right: -120px; opacity: .4;
}
.page-hero .container { position: relative; }
.page-hero .container > *:not(.page-hero-mark) { position: relative; z-index: 1; }

/* 右上角品牌水印 */
.page-hero-mark {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic; font-weight: 700;
  font-size: clamp(88px, 12vw, 168px);
  line-height: 1; letter-spacing: -.05em;
  color: rgba(79, 70, 229, .062);
  pointer-events: none; user-select: none; z-index: 0;
}

.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted-2);
  margin-bottom: 22px;
}
.breadcrumb a { color: var(--muted); transition: color .18s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span[aria-current] { color: var(--ink-2); font-weight: 600; }

.page-hero h1 {
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.2;
  letter-spacing: -.032em;
  font-weight: 800;
  margin-bottom: 16px;
  max-width: 780px;
}
.page-hero-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.85;
  max-width: 660px;
}
.page-hero .eyebrow { margin-bottom: 12px; }

.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 100px; padding: 6px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.hero-chip i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); display: block;
}

/* 导航当前页 */
.nav-links a.is-active { color: var(--primary); font-weight: 650; }

/* ---------- 通用正文 ---------- */
.sub-section { padding: 80px 0; }
.sub-section.tight { padding: 56px 0; }
.sub-section.soft { background: var(--bg-soft); }

.prose p { font-size: 15.5px; color: var(--ink-2); line-height: 1.95; margin-bottom: 18px; }
.prose p:last-child { margin-bottom: 0; }
.prose h3 { font-size: 19px; font-weight: 720; margin: 30px 0 10px; letter-spacing: -.01em; }
.prose h3:first-child { margin-top: 0; }
.prose strong { color: var(--ink); font-weight: 680; }
.prose ul { margin: 6px 0 20px; }
.prose ul li {
  position: relative; padding-left: 20px;
  font-size: 15px; color: var(--ink-2); line-height: 1.9; margin-bottom: 9px;
}
.prose ul li::before {
  content: ""; position: absolute; left: 4px; top: 13px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--primary);
  opacity: .65;
}

.split-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: start; }
.split-head { max-width: 640px; margin-bottom: 44px; }
.split-head h2 {
  font-size: clamp(26px, 3.2vw, 34px); font-weight: 780;
  letter-spacing: -.03em; line-height: 1.3; margin-bottom: 12px;
}
.split-head p { font-size: 15.5px; color: var(--muted); line-height: 1.8; }

.quote-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 16px;
  padding: 26px 26px 24px;
  box-shadow: var(--shadow-sm);
}
.quote-card p {
  font-size: 16px; line-height: 1.9; color: var(--ink);
  font-weight: 550; margin-bottom: 14px;
}
.quote-card footer { font-size: 12.5px; color: var(--muted); }
.quote-card footer strong { color: var(--ink-2); font-weight: 650; }

.fact-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 24px 24px 8px;
  box-shadow: var(--shadow-sm);
}
.fact-card h3 { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.fact-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.fact-row:last-child { border-bottom: none; }
.fact-row span { color: var(--muted); }
.fact-row strong { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- 原则 / 卡片网格 ---------- */
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #c7d2fe; }
.info-card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.info-card p { font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.info-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 16px;
}

/* ---------- 时间线 ---------- */
.milestones { position: relative; margin-top: 8px; }
.milestones::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: linear-gradient(var(--primary), #e0e7ff);
  border-radius: 2px;
}
.milestone { position: relative; padding-left: 36px; margin-bottom: 28px; }
.milestone:last-child { margin-bottom: 0; }
.milestone::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px #eef2ff;
}
.milestone h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 5px; }
.milestone p { font-size: 14px; color: var(--muted); line-height: 1.8; }

/* ---------- 技术致谢 ---------- */
.tech-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tech-item {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 18px; box-shadow: var(--shadow-sm);
}
.tech-item strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 5px; }
.tech-item span { font-size: 12.5px; color: var(--muted); line-height: 1.7; display: block; }

/* ---------- 底部行动条 ---------- */
.action-strip {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 55%, #1e3a8a 100%);
  border-radius: 22px;
  padding: 46px 44px;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  box-shadow: 0 20px 50px rgba(30, 27, 75, .22);
}
.action-strip h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 750; letter-spacing: -.02em; margin-bottom: 7px; }
.action-strip p { font-size: 14px; color: #c7d2fe; }
.action-strip .btn { flex-shrink: 0; }
.btn-ghost-light {
  background: transparent; color: #fff;
  border-color: rgba(255, 255, 255, .42);
  box-shadow: none;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .8); }

/* ---------- 联系我们 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.contact-card .info-icon { margin-bottom: 14px; }
.contact-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.contact-card p { font-size: 13.5px; color: var(--muted); line-height: 1.8; flex: 1; }
.contact-mail {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; font-size: 13px; font-weight: 650; color: var(--primary);
  word-break: break-all;
}
.contact-mail:hover { text-decoration: underline; }

.contact-main { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }

.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow-sm);
}
.form-card > h3 { font-size: 18px; font-weight: 720; margin-bottom: 6px; }
.form-card > .form-tip { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 22px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .field.full { grid-column: 1 / -1; }
.field select, .field textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: inherit; color: var(--ink);
  background: #fff; outline: none; line-height: 1.6;
  transition: border-color .18s, box-shadow .18s;
}
.field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.field textarea { resize: vertical; min-height: 128px; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.form-note { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 14px; }
.form-status { font-size: 12.5px; min-height: 18px; margin-top: 8px; }
.form-status.ok { color: #059669; }
.form-status.err { color: #dc2626; }

.contact-side { display: flex; flex-direction: column; gap: 18px; }
.hours-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
  font-size: 13px; color: var(--muted);
}
.hours-list li:last-child { border-bottom: none; }
.hours-list strong { color: var(--ink-2); font-weight: 650; }

.tip-list li {
  position: relative; padding-left: 22px;
  font-size: 13.5px; color: var(--muted); line-height: 1.8; margin-bottom: 10px;
}
.tip-list li:last-child { margin-bottom: 0; }
.tip-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--primary); font-weight: 800; font-size: 12px;
}

/* ---------- 帮助中心 ---------- */
.help-toolbar { margin-top: 28px; max-width: 660px; }
.help-search { position: relative; }
.help-search input {
  width: 100%;
  padding: 14px 90px 14px 44px;
  border: 1px solid var(--line); border-radius: 12px;
  font-size: 14.5px; font-family: inherit; color: var(--ink);
  background: #fff; outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s, box-shadow .18s;
}
.help-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.help-search input::placeholder { color: var(--muted-2); }
.help-search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); pointer-events: none;
}
.help-search-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: #f1f5f9; color: var(--muted);
  font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 8px;
}
.help-search-clear:hover { background: #e2e8f0; color: var(--ink); }

.help-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.help-chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; padding: 7px 14px; border-radius: 100px;
  transition: all .18s ease;
}
.help-chip:hover { border-color: var(--primary); color: var(--primary); }
.help-chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.help-layout { display: grid; grid-template-columns: 210px 1fr; gap: 52px; align-items: start; }
.help-layout > * { min-width: 0; }
.help-toc { position: sticky; top: 98px; min-width: 0; }
.help-toc h4 {
  font-size: 11.5px; font-weight: 700; color: var(--muted-2);
  letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px;
}
.help-toc a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13.5px; color: var(--muted); padding: 8px 10px;
  border-radius: 8px; border-left: 2px solid transparent;
  transition: all .16s ease;
}
.help-toc a:hover { background: var(--bg-soft); color: var(--ink); }
.help-toc a.is-active { background: var(--primary-light); color: var(--primary-dark); font-weight: 650; border-left-color: var(--primary); }
.help-toc a em { font-style: normal; font-size: 11.5px; color: var(--muted-2); }
.help-toc-foot { margin-top: 20px; padding: 16px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; }
.help-toc-foot p { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-bottom: 10px; }
.help-toc-foot a { display: inline; padding: 0; border: none; font-size: 12.5px; font-weight: 650; color: var(--primary); }
.help-toc-foot a:hover { background: none; text-decoration: underline; }

.help-count { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.help-count strong { color: var(--ink-2); font-weight: 700; }

.help-section { margin-bottom: 44px; scroll-margin-top: 96px; }
.help-section:last-of-type { margin-bottom: 0; }
.help-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.help-section-head h2 { font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.help-section-head span {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 100px; padding: 2px 9px;
}
.help-section > p { font-size: 13.5px; color: var(--muted); margin: -6px 0 16px; }

.help-item {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 10px; overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.help-item:hover { border-color: #cdd6f4; }
.help-item[open] { border-color: #c7d2fe; box-shadow: var(--shadow-sm); }
.help-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px 18px; cursor: pointer; list-style: none;
  font-size: 14.5px; font-weight: 620; color: var(--ink);
  transition: color .18s;
}
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary:hover { color: var(--primary); }
.help-item[open] summary { color: var(--primary); }
.help-item summary::after {
  content: "+"; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-soft); color: var(--muted);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 600; line-height: 1;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.help-item[open] summary::after {
  content: "−"; background: var(--primary-light); color: var(--primary);
}
.help-body { padding: 0 18px 18px; }
.help-body p { font-size: 14px; color: var(--ink-2); line-height: 1.9; margin-bottom: 12px; }
.help-body p:last-child { margin-bottom: 0; }
.help-body ul { margin: 4px 0 12px; }
.help-body ul li {
  position: relative; padding-left: 18px;
  font-size: 13.8px; color: var(--ink-2); line-height: 1.85; margin-bottom: 7px;
}
.help-body ul li::before {
  content: ""; position: absolute; left: 4px; top: 12px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2);
}
.help-body code { font-size: 12.5px; }
.help-body kbd { font-size: .82em; }
.help-note {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px;
  padding: 11px 13px; font-size: 13px; color: var(--muted); line-height: 1.75; margin-top: 12px;
}

.help-empty {
  background: #fff; border: 1px dashed var(--line); border-radius: 16px;
  padding: 54px 24px; text-align: center;
}
.help-empty strong { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.help-empty p { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; }

.help-cta {
  margin-top: 40px; padding: 26px 28px;
  background: var(--primary-light); border: 1px solid #dbe3ff; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
}
.help-cta strong { display: block; font-size: 15.5px; font-weight: 720; margin-bottom: 4px; }
.help-cta p { font-size: 13px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .split-2, .contact-main { grid-template-columns: 1fr; gap: 36px; }
  .card-grid-3, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .help-layout { grid-template-columns: 1fr; gap: 0; }
  .help-toc { display: none; }
  .page-hero-mark { display: none; }
}

@media (max-width: 760px) {
  .page-hero { padding: 34px 0 40px; }
  .page-hero-sub { font-size: 15px; }
  .sub-section, .sub-section.tight { padding: 52px 0; }
  .card-grid-3, .card-grid-2, .contact-grid, .tech-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .action-strip { padding: 34px 24px; flex-direction: column; align-items: flex-start; gap: 22px; }
  .action-strip .btn { width: 100%; }
  .help-search input { padding-left: 40px; padding-right: 76px; font-size: 14px; }
  .help-item summary { padding: 15px 15px; font-size: 14px; }
  .help-body { padding: 0 15px 16px; }
  .help-cta { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .help-item summary::after { transition: none; }
}
