/* Shared styles for /privacy and /terms. Static, no scripts, no external assets. */

:root {
  color-scheme: dark;
  --bg: #0e0b0a;
  --surface: #17120f;
  --border: #2c231d;
  --text: #ece3d6;
  --muted: #a3968a;
  --accent: #d8a64a;
  --accent-hover: #ecc176;
  --strong: #f6eee3;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: var(--accent-hover);
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Main */

main {
  padding-top: 2.25rem;
  padding-bottom: 3rem;
}

h1 {
  color: var(--accent);
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
}

h2 {
  color: var(--accent);
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
  scroll-margin-top: 1rem;
}

/* an entry's heading on /changes links to itself, so one change can be linked to; it keeps the heading's look */
h2 > a[href^='#'] {
  color: inherit;
  text-decoration: none;
}

h2 > a[href^='#']:hover {
  text-decoration: underline;
}

h3 {
  color: var(--text);
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.45rem;
}

li::marker {
  color: var(--muted);
}

strong {
  color: var(--strong);
  font-weight: 600;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.muted {
  color: var(--muted);
}

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}

.summary > :last-child {
  margin-bottom: 0;
}

.summary h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.toc h2 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding-left: 1.6rem;
}

.toc li {
  margin-bottom: 0.2rem;
}

.toc a {
  text-decoration: none;
}

.toc a:hover,
.toc a:focus-visible {
  text-decoration: underline;
}

address {
  font-style: normal;
}

.nowrap {
  white-space: nowrap;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.site-footer .wrap {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

@media (min-width: 640px) {
  body {
    font-size: 1.0625rem;
  }

  h1 {
    font-size: 2.4rem;
  }

  .wrap {
    padding: 0 1.5rem;
  }
}

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

  .site-nav,
  .toc {
    display: none;
  }

  a {
    text-decoration: underline;
  }
}
