/* 用户协议 / 法律文档版式 */
.page-legal {
  background: #f5f0e8;
  min-height: 100vh;
}

.page-legal .doc-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.legal-doc {
  background: #fff;
  border: 1px solid #e8e0d4;
  border-radius: 4px;
  box-shadow: 0 2px 24px rgba(44, 36, 24, 0.06);
  overflow: hidden;
}

.legal-doc-header {
  padding: 40px 48px 32px;
  border-bottom: 3px double #c9b99a;
  background: linear-gradient(180deg, #faf8f4 0%, #fff 100%);
  text-align: center;
}

.legal-doc-header h1 {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #2c2418;
  margin: 0 0 12px;
}

.legal-doc-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: 0.82rem;
  color: #7a6f5e;
}

.legal-doc-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legal-doc-meta strong {
  font-weight: 600;
  color: #5c5346;
}

.legal-summary {
  margin: 0;
  padding: 20px 48px;
  background: #fff9ed;
  border-bottom: 1px solid #f0e6d4;
  font-size: 0.95rem;
  line-height: 1.75;
  color: #4a4034;
}

.legal-summary strong {
  color: #b45309;
}

.legal-body {
  padding: 36px 48px 48px;
  font-size: 0.94rem;
  line-height: 1.85;
  color: #3d362c;
}

.legal-article {
  margin-bottom: 36px;
}

.legal-article:last-child {
  margin-bottom: 0;
}

.legal-article h2 {
  font-family: "Noto Serif SC", serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: #2c2418;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ebe4d8;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.legal-article-num {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: #8b7355;
  border-radius: 3px;
  padding: 2px 8px;
  letter-spacing: 0.05em;
}

.legal-clauses {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: clause;
}

.legal-clauses li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px dashed #f0ebe3;
  counter-increment: clause;
}

.legal-clauses li:last-child {
  border-bottom: none;
}

.legal-clauses li::before {
  content: counter(clause) ".";
  position: absolute;
  left: 0;
  top: 10px;
  font-weight: 600;
  color: #a0896c;
  font-size: 0.88rem;
}

.legal-fee-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.legal-fee-item {
  text-align: center;
  padding: 16px 12px;
  background: #faf8f4;
  border: 1px solid #ebe4d8;
  border-radius: 6px;
}

.legal-fee-item strong {
  display: block;
  font-size: 1.35rem;
  color: #2c2418;
  margin-bottom: 4px;
}

.legal-fee-item span {
  font-size: 0.78rem;
  color: #7a6f5e;
}

.legal-penalty-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 0.88rem;
}

.legal-penalty-table th,
.legal-penalty-table td {
  border: 1px solid #ebe4d8;
  padding: 12px 16px;
  text-align: left;
}

.legal-penalty-table th {
  background: #faf8f4;
  font-weight: 600;
  color: #5c5346;
  width: 100px;
}

.legal-penalty-table td:first-child {
  font-weight: 700;
  color: #b45309;
  white-space: nowrap;
}

.legal-footer-nav {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.legal-footer-nav a {
  color: var(--accent);
  text-decoration: none;
}

.legal-footer-nav a:hover {
  text-decoration: underline;
}

.login-hub-focus {
  outline: 3px solid #00a6a7;
  outline-offset: 6px;
  border-radius: 12px;
  transition: outline-color 0.3s;
}

@media (max-width: 640px) {
  .legal-doc-header,
  .legal-summary,
  .legal-body {
    padding-left: 24px;
    padding-right: 24px;
  }

  .legal-fee-box {
    grid-template-columns: 1fr;
  }
}
