/* Public pages (privacy policy and 404). Same brand tokens as the app and the admin panel. */
:root {
  --bg: #f9f9fc;
  --surface: #ffffff;
  --line: #d9dce4;
  --fg: #191b20;
  --muted: #50545e;
  --primary: #1d5fe0;
  --primary-hover: #174fbf;
  --on-primary: #ffffff;
  --warning: #855400;
  --warning-soft: #fbefd8;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --surface: #17191e;
    --line: #30343d;
    --fg: #e3e5eb;
    --muted: #a9aeb9;
    --primary: #aec6ff;
    --primary-hover: #c8d8ff;
    --on-primary: #0a2a6b;
    --warning: #f2be6b;
    --warning-soft: #392a0a;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.wrap {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.narrow {
  max-width: 44rem;
}

a {
  color: var(--primary);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--primary-hover);
}

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
  background: var(--surface);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

/* Header and footer */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
}

.site-header nav a,
.site-footer a {
  display: inline-block;
  padding: 0.75rem 0.5rem;
}

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

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.site-footer p {
  margin: 0;
}

/* Typography */
h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

/* The first heading under the page title, and the "Privacy policy" heading that starts the policy. */
h2.first {
  margin-top: 1rem;
}

h2.title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

p {
  margin: 0 0 1rem;
}

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

.note {
  background: var(--warning-soft);
  color: var(--warning);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* Privacy policy */
.doc {
  padding-top: 2rem;
}

.doc ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.doc li {
  margin-bottom: 0.375rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
}

thead th {
  background: var(--surface);
}
