/* Shared styles for the static legal pages (/legal/<lang>.html). Plain CSS: these pages live outside the React app. */
:root {
  --bg: #0b1510;
  --panel: #111f18;
  --border: #1f3a2b;
  --text: #e3ece6;
  --muted: #9db3a5;
  --accent: #46c97a;
  --accent-soft: rgba(70, 201, 122, 0.12);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'PingFang SC', 'Hiragino Sans',
    'Malgun Gothic', 'Microsoft YaHei', sans-serif;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.12em;
  color: var(--text);
  text-decoration: none;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.langs a {
  display: block;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.langs a:hover,
.langs a[aria-current='page'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
}

h1 {
  margin: 28px 0 8px;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1.25;
}

.lead {
  margin: 0 0 20px;
  color: var(--muted);
}

.toc {
  margin: 0 0 32px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
}

section {
  margin-top: 40px;
  scroll-margin-top: 16px;
}

h2 {
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(20px, 4vw, 24px);
  line-height: 1.3;
}

h3 {
  margin: 28px 0 10px;
  font-size: 17px;
  color: var(--accent);
}

p {
  margin: 0 0 10px;
}

.item {
  display: flex;
  gap: 10px;
}

.num {
  flex: none;
  min-width: 2.6em;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.item .num + span {
  flex: 1;
  min-width: 0;
}

.note {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .num {
    min-width: 2.2em;
  }
}

@media print {
  :root {
    --bg: #fff;
    --panel: #fff;
    --border: #ccc;
    --text: #000;
    --muted: #444;
    --accent: #000;
  }

  .langs {
    display: none;
  }
}
