/* ClueArk legal docs — aligned with public discovery (light paper, charcoal ink) */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #fafafa;
  --ink: #171717;
  --muted: #737373;
  --faint: #a3a3a3;
  --line: #e5e5e5;
  --line-soft: #f5f5f5;
  --btn: #222220;
  --btn-hover: #3a3a37;
  --on-btn: #ffffff;
  --emerald: #059669;
  --notice-bg: #fafafa;
  --max: 720px;
  --shell: 1600px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans SC",
    sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  opacity: 0.75;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .shell {
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .shell {
    padding: 0 40px;
  }
}

/* ── Header (mirrors PublicHeader) ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
}

@media (min-width: 640px) {
  .site-header-inner {
    height: 56px;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-accent {
  font-weight: 600;
}

.brand:hover {
  opacity: 0.9;
}

.brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.header-nav {
  display: none;
  align-items: center;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
}

.header-nav a {
  color: inherit;
  text-decoration: none;
}

.header-nav a:hover {
  color: var(--ink);
  opacity: 1;
}

@media (min-width: 768px) {
  .header-nav {
    display: flex;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.lang-pill:hover {
  color: var(--ink);
  opacity: 1;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: var(--btn);
  color: var(--on-btn);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn-primary:hover {
  background: var(--btn-hover);
  opacity: 1;
  color: var(--on-btn);
}

/* ── Main ── */
.page {
  flex: 1;
  padding: 32px 0 48px;
}

@media (min-width: 640px) {
  .page {
    padding: 40px 0 64px;
  }
}

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

.page-title {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--ink);
}

.page-meta {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.page-meta a {
  color: var(--muted);
}

.page-meta a:hover {
  color: var(--ink);
  opacity: 1;
}

.notice {
  margin: 28px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--notice-bg);
  color: var(--muted);
  font-size: 14px;
}

.notice p {
  margin: 0;
}

.section {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.section:first-of-type {
  margin-top: 32px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.section h2 .num {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 500;
  color: #a3a3a3;
  letter-spacing: 0.04em;
}

.section p,
.section li {
  font-size: 14px;
  color: var(--muted);
}

.section p {
  margin: 0 0 12px;
}

.section p:last-child {
  margin-bottom: 0;
}

.section ul {
  margin: 0;
  padding-left: 1.15rem;
}

.section li {
  margin: 0 0 8px;
}

.section li:last-child {
  margin-bottom: 0;
}

.section li strong {
  color: var(--ink);
  font-weight: 600;
}

.section a {
  color: var(--ink);
  font-weight: 500;
}

.switch-row {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.switch-row a {
  color: var(--ink);
  font-weight: 500;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 20px 0 24px;
  font-size: 11px;
  color: var(--faint);
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .site-footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

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

.footer-nav a:hover {
  color: #404040;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn-primary {
    transition: none;
  }
}
