:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-soft: #6b7280;
  --text-mute: #9ca3af;
  --primary: #0d9488;
  --primary-strong: #0f766e;
  --primary-soft: #ccfbf1;
  --primary-tint: #f0fdfa;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 6px 24px rgba(15, 23, 42, .06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); text-decoration: underline; }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* ====== Top bar ====== */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .2px;
  color: var(--text);
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
}
.brand:hover { text-decoration: none; color: var(--text); }

.topnav { display: flex; gap: 18px; }
.topnav a {
  font-size: 14px;
  color: var(--text-soft);
}
.topnav a.active {
  color: var(--primary-strong);
  font-weight: 600;
}

/* ====== Hub (index) ====== */
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hero-title {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}
.hero-meta {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  vertical-align: middle;
}
.hero-desc {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.section-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 8px 4px 12px;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.doc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.doc-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--text);
}
.doc-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f3f4f6;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.doc-card-title {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
}
.doc-card-arrow {
  color: var(--text-mute);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .doc-grid { grid-template-columns: 1fr; }
  .hero { padding: 20px; }
  .hero-title { font-size: 20px; }
}

/* ====== Legal article page ====== */
.crumb {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 14px;
}
.crumb a { color: var(--text-soft); }
.crumb a:hover { color: var(--primary-strong); }
.crumb .sep { margin: 0 6px; color: var(--text-mute); }

.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
}
.article h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
}
.article .meta {
  color: var(--text-mute);
  font-size: 13px;
  margin-bottom: 28px;
}
.article h2 {
  margin: 32px 0 12px;
  font-size: 18px;
  font-weight: 700;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}
.article h3 {
  margin: 22px 0 10px;
  font-size: 16px;
  font-weight: 600;
}
.article p { margin: 0 0 14px; }
.article ul, .article ol { padding-left: 1.4em; margin: 0 0 14px; }
.article li { margin-bottom: 6px; }
.article strong { color: var(--text); }
.article hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
.article blockquote {
  margin: 14px 0;
  padding: 12px 16px;
  background: var(--primary-tint);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  color: var(--text);
}

.placeholder {
  border: 1px dashed var(--border);
  background: #fafafa;
  padding: 24px;
  border-radius: var(--radius-md);
  color: var(--text-mute);
  text-align: center;
  font-size: 13px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-soft);
}
.back-link:hover { color: var(--primary-strong); }

@media (max-width: 640px) {
  .article { padding: 24px 20px; }
  .article h1 { font-size: 22px; }
}

/* ====== Footer ====== */
.footer {
  text-align: center;
  color: var(--text-mute);
  font-size: 12px;
  margin-top: 40px;
}
