/* Shared styles for the support, privacy and terms pages.
   System fonts only, no external resources, light and dark mode. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f3f5fa;
  --text: #16181d;
  --muted: #565d6d;
  --border: #dce0e9;
  --accent: #2f5bff;
  --note-bg: #eef2ff;
  --note-border: #2f5bff;
  --draft-bg: #fff4d6;
  --draft-border: #c99400;
  --draft-text: #3d2c00;
  --todo-bg: #ffe08a;
  --todo-text: #2e2100;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #181b22;
    --text: #e8eaf0;
    --muted: #a3a9b7;
    --border: #2b303b;
    --accent: #8ea6ff;
    --note-bg: #161d38;
    --note-border: #8ea6ff;
    --draft-bg: #2e2508;
    --draft-border: #b38600;
    --draft-text: #ffe7a3;
    --todo-bg: #5c4600;
    --todo-text: #fff1c2;
  }
}

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

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

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

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

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

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

/* Header and navigation */

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

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

.brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
}

/* Content */

main {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0.5rem 0 0.5rem;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.5rem;
}

h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  margin: 1.75rem 0 0.4rem;
}

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

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

li + li {
  margin-top: 0.35rem;
}

.lead {
  font-size: 1.1875rem;
  color: var(--muted);
}

.meta {
  color: var(--muted);
  font-size: 0.9375rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05em 0.3em;
}

/* Boxes */

.draft,
.note,
.summary {
  border-radius: 10px;
  padding: 0.875rem 1rem;
  margin: 1rem 0 1.5rem;
}

.draft {
  background: var(--draft-bg);
  border: 2px solid var(--draft-border);
  color: var(--draft-text);
}

.note {
  background: var(--note-bg);
  border-left: 5px solid var(--note-border);
  font-size: 1.125rem;
}

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
}

.draft > :first-child,
.note > :first-child,
.summary > :first-child {
  margin-top: 0;
}

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

/* Placeholders for facts that are still missing */

mark.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  border-radius: 3px;
  padding: 0 0.2em;
  font-weight: 600;
}

/* Footer */

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

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

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