/* ===========================================================
   律表通 (cenosoft.top) 法务页面通用样式
   适用于 privacy.html / terms.html / contact.html
   配色与导航栏已对齐 apply.html（申请账号页）
   =========================================================== */

:root {
  /* 与申请页一致的主色 */
  --c-primary: #0ea5e9;
  --c-primary-2: #2563eb;
  --c-primary-3: #6366f1;
  --c-accent: #087fc2;
  --c-sky: #38bdf8;

  /* 文字 */
  --c-ink: #123760;
  --c-ink-soft: #3b6288;
  --c-ink-mute: #6487a8;

  /* 边框与背景 */
  --c-line: #c8e1f3;
  --c-line-soft: #e0f0fb;
  --c-page-bg: #eef8ff;
  --c-card: rgba(255, 255, 255, 0.82);
  --c-accent-soft: #eaf6ff;

  --maxw: 860px;
}

* { box-sizing: border-box; }

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

/* ---------- 页面背景：与申请页同款浅蓝科技网格 ---------- */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--c-ink);
  font-size: 16px;
  line-height: 1.85;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;

  background:
    radial-gradient(circle at 10% 6%, rgba(125, 211, 252, .46), transparent 26rem),
    radial-gradient(circle at 92% 36%, rgba(96, 165, 250, .25), transparent 28rem),
    var(--c-page-bg);
}

/* 网格线层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 165, 233, .11) 1px, transparent 1px),
    linear-gradient(rgba(14, 165, 233, .11) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* 保证内容在网格之上 */
.site-header, .page-hero, .wrap, .site-footer { position: relative; z-index: 1; }

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

/* ---------- 顶部导航：与申请页 product-nav 一致 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(237, 248, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
  color: var(--c-ink);
}

.site-header .bar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  color: var(--c-ink);
  letter-spacing: 0.5px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand .mark {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .22);
}

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 15px;
  align-items: center;
}

.nav-links a {
  color: var(--c-ink);
  transition: color .25s ease;
}

.nav-links a:hover {
  color: var(--c-accent);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--c-accent);
  font-weight: 600;
}

/* 与 apply-submit 同款按钮 */
.btn-apply {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 7px;
  background: linear-gradient(90deg, #0284c7, #2563eb);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 12px 22px rgba(37, 99, 235, .25);
  transition: all .3s ease;
}

.btn-apply:hover {
  background: linear-gradient(90deg, #0369a1, #1d4ed8);
  transform: translateY(-2px);
}

/* ---------- 页头：改为浅色系，融入同款背景 ---------- */
.page-hero {
  padding: 60px 20px 46px;
  color: var(--c-ink);
}

.page-hero .inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.page-hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.page-hero .kicker::before {
  width: 25px;
  height: 2px;
  background: var(--c-sky);
  content: "";
}

.page-hero h1 {
  font-size: 34px;
  line-height: 1.3;
  margin: 0 0 14px;
  font-weight: 700;
  color: #0b2b4a;
}

.page-hero .meta {
  font-size: 14px;
  color: var(--c-ink-mute);
  margin: 0;
}

/* ---------- 正文容器：与 apply-card 同款卡片 ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 80px;
}

.card {
  position: relative;
  background: var(--c-card);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(125, 211, 252, .8);
  border-radius: 12px;
  padding: 40px 44px;
  box-shadow: 0 24px 55px rgba(37, 99, 235, .16), 10px 12px 0 rgba(125, 211, 252, .25);
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* 扫描光效（与申请页一致） */
.card::before {
  position: absolute;
  top: 0;
  left: -25%;
  width: 16%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, .32), transparent);
  content: "";
  transform: skewX(-18deg);
  animation: formScan 7s linear infinite;
  pointer-events: none;
}

@keyframes formScan {
  from { translate: -180% 0; }
  to { translate: 800% 0; }
}

/* 内容层需在扫描光效之上 */
.card > * { position: relative; z-index: 1; }

/* ---------- 目录 ---------- */
.toc {
  background: rgba(234, 246, 255, .75);
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 0 0 36px;
}

.toc h2 {
  font-size: 15px;
  margin: 0 0 12px;
  color: var(--c-ink);
  letter-spacing: .5px;
  border: 0;
  padding: 0;
  font-weight: 700;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 28px;
  font-size: 14.5px;
  line-height: 2;
}

.toc a { color: var(--c-ink-soft); }
.toc a:hover { color: var(--c-accent); }

/* ---------- 标题层级 ---------- */
.card h2 {
  font-size: 21px;
  font-weight: 700;
  color: #0b2b4a;
  margin: 42px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-line-soft);
  scroll-margin-top: 96px;
}

.card h2:first-child { margin-top: 0; }

.card h3 {
  font-size: 17px;
  font-weight: 600;
  color: #1d4f78;
  margin: 26px 0 10px;
}

.card p {
  margin: 0 0 14px;
  color: var(--c-ink-soft);
  text-align: justify;
}

.card ul, .card ol {
  margin: 0 0 16px;
  padding-left: 24px;
  color: var(--c-ink-soft);
}

.card li { margin-bottom: 8px; }

.card strong { color: #0b2b4a; font-weight: 600; }

/* ---------- 提示块 ---------- */
.note {
  border-left: 3px solid var(--c-primary);
  background: rgba(224, 242, 254, .7);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 18px 0;
  font-size: 15px;
  color: #1d4f78;
}

.note.warn {
  border-left-color: #f59e0b;
  background: rgba(255, 247, 220, .8);
  color: #6b4a10;
}

.note p:last-child { margin-bottom: 0; }
.note p { color: inherit; }

/* ---------- 信息表格 ---------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 22px;
  font-size: 15px;
}

.info-table th,
.info-table td {
  border: 1px solid var(--c-line-soft);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  background: rgba(234, 246, 255, .8);
  color: #0b2b4a;
  font-weight: 600;
  white-space: nowrap;
  width: 168px;
}

.info-table td { color: var(--c-ink-soft); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: rgba(237, 248, 255, .92);
  border-top: 1px solid var(--c-line);
  color: var(--c-ink-soft);
  padding: 46px 20px 30px;
  font-size: 14px;
}

.site-footer .cols {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.site-footer h4 {
  color: #0b2b4a;
  font-size: 15px;
  margin: 0 0 14px;
  font-weight: 700;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; line-height: 1.7; }
.site-footer a { color: var(--c-ink-soft); }
.site-footer a:hover { color: var(--c-accent); }

.site-footer .bottom {
  max-width: 1120px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--c-line);
  text-align: center;
  font-size: 13px;
  line-height: 1.9;
  color: var(--c-ink-mute);
}

/* ---------- 联系方式卡片 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 22px 0 10px;
}

.contact-item {
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, .72);
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-item:hover {
  border-color: var(--c-sky);
  box-shadow: 0 12px 26px rgba(37, 99, 235, .12);
  transform: translateY(-3px);
}

.contact-item .label {
  font-size: 13px;
  color: var(--c-ink-mute);
  margin: 0 0 6px;
  letter-spacing: .5px;
}

.contact-item .value {
  font-size: 17px;
  font-weight: 600;
  color: #0b2b4a;
  margin: 0;
  word-break: break-all;
}

.contact-item .value a { color: #0b2b4a; }
.contact-item .value a:hover { color: var(--c-accent); }

.contact-item .sub {
  font-size: 13px;
  color: var(--c-ink-mute);
  margin: 6px 0 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .site-header .bar { justify-content: space-between; }
  .page-hero { padding: 40px 18px 36px; }
  .page-hero h1 { font-size: 26px; }
  .card { padding: 26px 20px; }
  .toc ol { columns: 1; }
  .contact-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .info-table th { width: 120px; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .info-table { font-size: 14px; }
  .info-table th,
  .info-table td { padding: 9px 10px; }
  .brand { font-size: 18px; }
  .brand .mark { width: 34px; height: 34px; font-size: 16px; }
}

/* 尊重用户的动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .card::before { animation: none; display: none; }
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- 打印 ---------- */
@media print {
  .site-header, .site-footer, .toc, .btn-apply { display: none; }
  body { background: #fff; }
  body::before { display: none; }
  .wrap { margin: 0; padding: 0; }
  .card {
    border: 0;
    box-shadow: none;
    padding: 0;
    background: #fff;
    backdrop-filter: none;
  }
  .card::before { display: none; }
  .page-hero { padding: 0 0 16px; color: #000; }
  .page-hero h1 { color: #000; }
  .page-hero .kicker, .page-hero .meta { color: #555; }
  .card h2 { page-break-after: avoid; }
}
