/* 法易 - 智能普法助手 全局样式（纯 CSS，适配 Tailwind CDN 场景） */
:root {
  --legal-dark: #12263f;
  --legal-main: #24577f;
  --legal-light: #6b9abd;
  --legal-gold: #b68a3c;
  --legal-paper: #f3f6fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #dbe3ee;
  --text: #172033;
  --muted: #5d6b7c;
  --success: #257a5e;
  --warning: #b7791f;
  --danger: #b74b4b;
  --shadow-sm: 0 8px 24px rgba(16, 35, 63, 0.08);
  --shadow-md: 0 18px 45px rgba(16, 35, 63, 0.14);
  --shadow-lg: 0 28px 70px rgba(16, 35, 63, 0.18);
}

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

body {
  font-family: 'Inter', 'Microsoft YaHei', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(182, 138, 60, 0.11), transparent 28rem),
    linear-gradient(180deg, #eef3f8 0%, #f9fbfd 38%, #f3f6fa 100%);
  overflow-x: hidden;
}

main {
  flex: 1;
}

/* 导航链接（减少边框线条，更多留白） */
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.72rem;
  border-radius: 0.45rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
}

.nav-link.is-active {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 -2px 0 rgba(244, 216, 159, 0.95);
}

#mobile-menu a.is-active {
  color: #ffffff;
  font-weight: 700;
}

.app-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* 按钮：统一视觉、增加呼吸感 */
.btn-primary,
.btn-secondary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.58rem 1.2rem;
  border-radius: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn-primary {
  color: #ffffff;
  background-color: var(--legal-main);
  box-shadow: 0 10px 20px rgba(36, 82, 122, 0.22);
}

.btn-primary:hover {
  background-color: var(--legal-dark);
  box-shadow: 0 14px 28px rgba(16, 35, 63, 0.26);
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--legal-main);
  background-color: rgba(255, 255, 255, 0.92);
  border-color: rgba(36, 82, 122, 0.22);
}

.btn-secondary:hover {
  color: #ffffff;
  background-color: var(--legal-main);
}

.btn-outline {
  color: #243449;
  background-color: #ffffff;
  border-color: var(--border);
}

.btn-outline:hover {
  background-color: #f3f4f6;
}

/* 区块：增加上下留白，减轻拥挤感 */
.section {
  padding-top: 2.25rem;
  padding-bottom: 2.75rem;
}

@media (min-width: 768px) {
  .section {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
  }
}

.section-title {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  text-align: center;
  color: var(--legal-dark);
  letter-spacing: 0;
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1rem;
}

.page-hero {
  padding: 2.2rem 0 1.25rem;
  background:
    linear-gradient(135deg, rgba(18, 38, 63, 0.98), rgba(36, 87, 127, 0.92)),
    linear-gradient(180deg, #ffffff, #f3f6fa);
  color: #ffffff;
}

.page-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: 2rem;
  align-items: end;
}

.page-hero__eyebrow {
  margin: 0 0 0.65rem;
  color: #f2d59a;
  font-size: 0.78rem;
  font-weight: 800;
}

.page-hero h1 {
  margin: 0;
  font-family: 'Noto Serif SC', 'SimSun', serif;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0;
}

.page-hero__lead {
  max-width: 42rem;
  margin: 0.85rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
}

.page-hero__panel {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.8rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.page-hero__panel strong {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.page-hero__panel span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 1.9rem;
  }
}

.section-desc {
  max-width: 46rem;
  margin: 0 auto 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

.section-kicker {
  color: var(--legal-gold);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 输入框：更大内边距、圆角，视觉更轻 */
.input-field {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  color: #111827;
  font-size: 0.95rem;
  background-color: #ffffff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.input-field::placeholder {
  color: #9ca3af;
}

.input-field:focus {
  outline: none;
  border-color: var(--legal-main);
  box-shadow: 0 0 0 3px rgba(91, 141, 184, 0.16);
}

.home-hero {
  position: relative;
  min-height: min(760px, calc(100vh - 64px));
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: var(--legal-dark);
}

.home-hero__media {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-legal-tech.png');
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}

.home-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 20, 38, 0.92) 0%, rgba(16, 35, 63, 0.84) 38%, rgba(16, 35, 63, 0.34) 72%, rgba(16, 35, 63, 0.18) 100%),
    linear-gradient(180deg, rgba(16, 35, 63, 0.16), rgba(16, 35, 63, 0.46));
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 3rem;
  padding: 5.5rem 0 4rem;
}

.home-hero__content {
  max-width: 45rem;
  color: #ffffff;
}

.home-hero__eyebrow {
  display: inline-flex;
  margin: 0 0 1.1rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.45rem;
  color: #f4d89f;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 700;
}

.home-hero h1 {
  margin: 0;
  font-family: 'Noto Serif SC', 'SimSun', serif;
  font-size: clamp(2.3rem, 5.3vw, 4.7rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;
}

.home-hero h1 span {
  display: block;
}

.home-hero__lead {
  max-width: 40rem;
  margin: 1.2rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.home-hero__metrics {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.home-hero__metrics div {
  padding: 1rem 1.15rem;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.home-hero__metrics div:last-child {
  border-right: 0;
}

.home-hero__metrics strong {
  display: block;
  color: #ffffff;
  font-size: 1.45rem;
  line-height: 1.1;
}

.home-hero__metrics span {
  display: block;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.home-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.home-flow__item {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.7rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
}

.home-flow__item b {
  display: block;
  color: #f2d59a;
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
}

.home-flow__item span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
}

.workflow-band {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.workflow-panel {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  padding: 1.15rem;
}

.workflow-panel h3 {
  margin: 0 0 0.55rem;
  color: var(--legal-dark);
  font-size: 1.05rem;
  font-weight: 800;
}

.workflow-steps {
  display: grid;
  gap: 0.65rem;
}

.workflow-step {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.7rem;
  align-items: start;
}

.workflow-step i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #eef4f8;
  color: var(--legal-main);
  font-style: normal;
  font-weight: 800;
  font-size: 0.82rem;
}

.workflow-step strong {
  display: block;
  color: var(--legal-dark);
  font-size: 0.9rem;
}

.workflow-step span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.workflow-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.proof-metric {
  border-radius: 0.65rem;
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e7edf4;
}

.proof-metric strong {
  display: block;
  color: var(--legal-dark);
  font-size: 1.45rem;
  line-height: 1.05;
}

.proof-metric span {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.home-workbench {
  background: #f6f8fb;
}

/* 文书/流程类型按钮：更轻量的边框与留白 */
.doc-type-btn,
.flow-type-btn,
.mediation-tab-btn,
.sim-role-btn,
.sim-scene-btn,
.domain-btn {
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background-color: #ffffff;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.doc-type-btn:hover,
.flow-type-btn:hover,
.mediation-tab-btn:hover,
.sim-role-btn:hover,
.sim-scene-btn:hover,
.domain-btn:hover {
  border-color: var(--legal-main);
  color: var(--legal-main);
  box-shadow: 0 4px 10px rgba(44, 82, 130, 0.12);
}

.doc-type-btn.active,
.flow-type-btn.active,
.mediation-tab-btn.active,
.sim-role-btn.active,
.sim-scene-btn.active,
.domain-btn.active {
  background-color: var(--legal-main);
  border-color: var(--legal-main);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(44, 82, 130, 0.25);
}

/* OCR 拖拽区 */
.ocr-dropzone.dragover {
  border-color: var(--legal-main);
  background-color: rgba(74, 144, 199, 0.08);
}

.ocr-result:empty::before {
  content: '识别结果将显示在这里';
  color: #9ca3af;
}

/* 文书编辑器占位 */
#doc-editor[data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: #9ca3af;
}

/* 流程步骤：卡片化 + 箭头，保持层次 */
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem;
}

.flow-step {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 0.9rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
  font-size: 0.9rem;
}

.flow-step .step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background-color: var(--legal-main);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.flow-arrow {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: var(--legal-light);
}

/* 劳动仲裁全流程可视化 */
.labor-flow-container {
  min-height: 140px;
  padding: 0.5rem 0;
}
.labor-flow-svg {
  display: block;
  max-width: 100%;
  height: auto;
}
.labor-node {
  cursor: pointer;
  outline: none;
}
.labor-node rect {
  transition: fill 0.2s ease, filter 0.2s ease;
}
.labor-node:hover rect,
.labor-node:focus rect {
  fill: var(--legal-dark);
  filter: url(#labor-node-shadow) brightness(1.08);
}
.labor-detail h4 {
  color: var(--legal-main);
}

/* 风险评估仪表盘（简易圆形） */
.risk-gauge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--legal-main) 0% var(--p, 0%), #e5e7eb var(--p, 0%) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.risk-gauge::after {
  content: '';
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--legal-paper);
}

/* 风险维度条形（可视化） */
.risk-dim-bar {
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  overflow: hidden;
}
.risk-dim-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--legal-main);
  transition: width 0.4s ease;
}
.risk-dim-fill.low { background: #22c55e; }
.risk-dim-fill.mid { background: var(--legal-gold); }
.risk-dim-fill.high { background: #ef4444; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* 类案卡片：更大圆角与柔和阴影，降低密度感 */
.case-card {
  position: relative;
  display: block;
  min-height: 10.2rem;
  padding: 1.15rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.case-card::after {
  content: '进入';
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  color: var(--legal-main);
  font-size: 0.78rem;
  font-weight: 800;
}

.case-card:hover {
  border-color: rgba(36, 82, 122, 0.32);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.case-card h4 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--legal-dark);
}

.case-card .case-meta {
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  color: var(--legal-gold);
  font-weight: 700;
}

.case-card .case-summary {
  font-size: 0.9rem;
  color: var(--muted);
}

.account-panel {
  box-shadow: 0 8px 24px rgba(16, 35, 63, 0.06);
}

.tool-frame {
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.tool-frame__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid #e7edf4;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.tool-frame__header h3 {
  margin: 0;
  color: var(--legal-dark);
  font-size: 1rem;
  font-weight: 800;
}

.tool-frame__header p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #eef4f8;
  color: var(--legal-main);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.88fr);
  gap: 1.25rem;
}

.form-panel,
.result-panel {
  border: 1px solid #e3eaf2;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(16, 35, 63, 0.07);
}

.form-panel {
  padding: 1.1rem;
}

.result-panel {
  overflow: hidden;
}

.panel-title {
  margin: 0 0 0.85rem;
  color: var(--legal-dark);
  font-size: 1rem;
  font-weight: 800;
}

.doc-editor-shell {
  min-height: 460px;
  background:
    linear-gradient(90deg, rgba(219, 227, 238, 0.45) 1px, transparent 1px),
    linear-gradient(180deg, #f7f9fc, #eef3f8);
  background-size: 34px 34px, auto;
}

.document-paper {
  max-width: 760px;
  min-height: 420px;
  margin: 0 auto;
  box-shadow: 0 18px 45px rgba(16, 35, 63, 0.14);
}

#doc-export-pdf,
#doc-export-word {
  min-height: 2.35rem;
  padding: 0.42rem 0.72rem;
  border-radius: 0.48rem;
  font-size: 0.82rem;
  line-height: 1;
  gap: 0.35rem;
}

#doc-export-pdf::before,
#doc-export-word::before {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.28rem;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
}

#doc-export-pdf::before {
  content: 'P';
  background: var(--danger);
}

#doc-export-word::before {
  content: 'W';
  background: var(--legal-main);
}

.history-strip {
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.54);
}

.ai-generated-badge {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.75rem 0.9rem;
  border: 1px solid #fde68a;
  border-radius: 0.75rem;
  background: #fffbeb;
  color: #78350f;
  font-size: 0.85rem;
}

.ai-badge-icon {
  flex-shrink: 0;
  display: inline-flex;
  width: 2rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.35rem;
  background: var(--legal-gold);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
}

.next-actions {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(8.5rem, max-content));
  gap: 0.65rem;
  align-items: center;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.next-actions > span {
  white-space: nowrap;
  color: var(--muted);
}

.next-actions .btn-primary,
.next-actions .btn-outline,
.next-actions .btn-secondary {
  min-height: 2.55rem;
  padding: 0.48rem 0.9rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  box-shadow: none;
}

.next-actions .btn-primary:hover,
.next-actions .btn-outline:hover,
.next-actions .btn-secondary:hover {
  transform: none;
}

.module-hero-card {
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: #ffffff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.module-hero-card__body {
  padding: 1.1rem;
}

.module-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 1rem;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.insight-card {
  border: 1px solid #e3eaf2;
  border-radius: 0.7rem;
  padding: 0.85rem;
  background: #f8fafc;
}

.insight-card strong {
  display: block;
  color: var(--legal-dark);
  font-size: 1.15rem;
  line-height: 1.1;
}

.insight-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.25rem;
}

.search-shell {
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

/* 加载状态（保留） */
.loading-dots::after {
  content: '';
  animation: loading 1s steps(4, end) infinite;
}

@keyframes loading {
  0%,
  100% {
    content: '';
  }
  25% {
    content: '.';
  }
  50% {
    content: '..';
  }
  75% {
    content: '...';
  }
}

/* 法条溯源：可点击法条蓝色下划线 */
.legal-ref {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
}
.legal-ref:hover {
  color: #1d4ed8;
}

/* 法条溯源弹窗 */
.legal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 100;
}
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.legal-modal-box {
  max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 1.25rem;
}
.legal-modal-close {
  width: 2rem;
  height: 2rem;
  border: none;
  background: #f3f4f6;
  border-radius: 0.375rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

/* ===== 专业合同排版样式 V2.0 ===== */
/* 合同编辑器内专业格式 */
#contract-editor {
  min-height: 400px;
  padding: 16px;
  background: #fff;
}

/* 合同标题 - 黑体三号加粗居中 */
#contract-editor .contract-title {
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 22pt;
  font-weight: bold;
  text-align: center;
  margin: 20px 0 30px;
  padding: 0;
  line-height: 1.4;
  color: #000;
}

/* 一级条款标题 - 黑体四号加粗 */
#contract-editor .contract-heading {
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 14pt;
  font-weight: bold;
  margin: 25px 0 12px;
  padding: 0;
  line-height: 1.6;
  color: #000;
  text-align: left;
}

/* 二级标题 - 宋体小四加粗，顶格 */
#contract-editor .contract-sub-heading-1 {
  font-family: "SimSun", "宋体", serif;
  font-size: 12pt;
  font-weight: bold;
  margin: 12px 0 6px;
  padding-left: 0;
  line-height: 1.6;
  text-indent: 0;
}

/* 三级标题 - 宋体小四加粗，缩进2字符 */
#contract-editor .contract-sub-heading-2 {
  font-family: "SimSun", "宋体", serif;
  font-size: 12pt;
  font-weight: bold;
  margin: 8px 0 4px;
  line-height: 1.6;
  text-indent: 2em;
}

/* 四级标题 - 宋体小四加粗，缩进4字符 */
#contract-editor .contract-sub-heading-3 {
  font-family: "SimSun", "宋体", serif;
  font-size: 12pt;
  font-weight: bold;
  margin: 6px 0 4px;
  line-height: 1.6;
  text-indent: 4em;
}

/* 正文段落 - 宋体小四，1.5倍行距，首行缩进2字符 */
#contract-editor .contract-paragraph {
  font-family: "SimSun", "宋体", serif;
  font-size: 12pt;
  line-height: 1.8;
  margin: 6px 0;
  text-indent: 2em;
  text-align: justify;
  word-break: break-all;
}

/* 表格样式 - 统一边框，表头居中加粗 */
#contract-editor .contract-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 11pt;
}

#contract-editor .contract-table th,
#contract-editor .contract-table td {
  border: 1px solid #333;
  padding: 8px 6px;
  text-align: center;
  vertical-align: middle;
}

#contract-editor .contract-table th {
  font-weight: bold;
  background: #f0f0f0;
  font-family: "SimHei", "黑体", sans-serif;
  font-size: 11pt;
}

#contract-editor .contract-table td {
  font-family: "SimSun", "宋体", serif;
}
.legal-modal-close:hover {
  background: #e5e7eb;
}
.legal-modal.hidden,
.legal-modal-overlay.hidden {
  display: none !important;
}
.legal-modal:not(.hidden) {
  display: flex;
}

/* 打印样式（导出 PDF 时） */
@media print {
  header,
  footer,
  .no-print,
  nav,
  button,
  .btn-primary,
  .btn-secondary,
  .btn-outline,
  .legal-modal-overlay,
  .legal-modal {
    display: none !important;
  }

  body {
    background: #ffffff;
  }

  .section {
    padding: 0.5rem 0;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 1.75rem 0 1rem;
  }

  .page-hero__inner,
  .workflow-band,
  .tool-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .page-hero__panel {
    display: none;
  }

  .workflow-proof,
  .home-flow,
  .insight-grid {
    grid-template-columns: 1fr;
  }

  .next-actions {
    grid-template-columns: 1fr;
  }

  .next-actions .btn-primary,
  .next-actions .btn-outline,
  .next-actions .btn-secondary {
    width: 100%;
  }

  .tool-frame__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-hero {
    min-height: auto;
  }

  .home-hero__shade {
    background: linear-gradient(180deg, rgba(9, 20, 38, 0.88), rgba(16, 35, 63, 0.74));
  }

  .home-hero__inner {
    width: 100%;
    max-width: 1180px;
    padding: 3.5rem 0.9rem 2rem;
  }

  .home-hero__content {
    max-width: 100%;
    min-width: 0;
  }

  .home-hero h1 {
    font-size: clamp(2rem, 10.5vw, 2.7rem);
    line-height: 1.13;
    overflow-wrap: anywhere;
  }

  .home-hero__lead {
    font-size: 0.98rem;
    max-width: min(20.5rem, calc(100% - 1rem));
    line-height: 1.7;
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .home-hero__actions {
    flex-direction: column;
    gap: 0.65rem;
  }

  .home-hero__actions .btn-primary,
  .home-hero__actions .btn-secondary,
  .home-hero__actions .btn-outline {
    width: 100%;
    flex: 0 0 auto;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .home-hero__metrics {
    grid-template-columns: 1fr;
  }

  .home-hero__metrics div {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .home-hero__metrics div:last-child {
    border-bottom: 0;
  }
}

/* 视频通话：本地画面镜像 */
video.mirror {
  transform: scaleX(-1);
}

.legal-doc-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem;
  background: #ffffff;
  color: #111827;
  font-family: "SimSun", "Noto Serif SC", serif;
  font-size: 12pt;
  line-height: 1.85;
}

.legal-doc-title {
  margin: 0 0 1.4rem;
  text-align: center;
  font-family: "SimHei", "Noto Serif SC", serif;
  font-size: 22pt;
  font-weight: 700;
  line-height: 1.35;
}

.legal-doc-heading {
  margin: 1rem 0 0.35rem;
  font-family: "SimHei", "Noto Serif SC", serif;
  font-size: 14pt;
  font-weight: 700;
  line-height: 1.6;
}

.legal-doc-paragraph {
  margin: 0.35rem 0;
  text-indent: 2em;
  text-align: justify;
  word-break: break-word;
}

.legal-doc-signature {
  margin: 0.45rem 0;
  text-align: left;
  white-space: pre-wrap;
}
