/* The legal pages (privacy.html, terms.html): standalone, in the app's colours; light unless dark is picked (page-theme.js). */
:root {
  --bg: #f9f1f6;
  --surface: #ffffff;
  --text: #2a1024;
  --soft: #6b4a61;
  --line: #f0dde8;
  --brand: #d1186f;
  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #140a12;
  --surface: #221220;
  --text: #f7eef4;
  --soft: #bfa8b8;
  --line: #3d2238;
  --brand: #ff4fa3;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, 'Segoe UI', sans-serif;
}

main {
  max-width: 740px;
  margin: 0 auto;
  padding: 32px 16px 72px;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.brand b {
  color: var(--brand);
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  font-size: 14px;
}

nav a[aria-current='page'] {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 36px 0 6px;
}

h2 {
  font-size: 20px;
  margin: 34px 0 8px;
  scroll-margin-top: 16px;
}

h3 {
  font-size: 16px;
  margin: 20px 0 4px;
}

p,
li,
td {
  color: var(--soft);
}

strong {
  color: var(--text);
}

a {
  color: var(--brand);
}

section {
  border-top: 1px solid var(--line);
  margin-top: 30px;
}

li + li {
  margin-top: 6px;
}

.meta {
  margin: 0;
  font-size: 14px;
}

.summary {
  margin-top: 24px;
  padding: 6px 22px 10px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.summary h2 {
  margin-top: 16px;
}

.toc {
  columns: 2 220px;
  font-size: 15px;
}

.toc li {
  break-inside: avoid;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text);
  font-weight: 600;
}

footer {
  margin-top: 48px;
  font-size: 14px;
  color: var(--soft);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
}

.theme-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .i-sun,
:root[data-theme='dark'] .theme-toggle .i-moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .i-sun {
  display: block;
}
