/* Colors follow the app's design tokens (canvas, text, primary for links) and the logo's wordmark. */
:root {
  --canvas: #F6F4F1;
  --heading: #674C3B;
  --text: #57534D;
  --text-muted: #6B665F;
  --link: #426E61;
  --tint: #E6EFEA;
  --rule: #E9E6E0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #111312;
    --heading: #FAE7D3;
    --text: #B5B0A9;
    --text-muted: #9C978F;
    --link: #8EC2B0;
    --tint: #1F342D;
    --rule: #2A2F2C;
  }
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  text-align: center;
}

.logo {
  display: block;
  width: min(72vw, 320px);
  height: auto;
}

h1 {
  margin: 40px 0 8px;
  color: var(--heading);
  font-size: clamp(2rem, 7vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

p {
  margin: 0 auto;
  max-width: 34ch;
  font-size: 1.125rem;
}

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

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

.legal,
.doc footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  font-size: 0.875rem;
}

.legal {
  margin-top: 40px;
}

/* Languages: every page holds both, in data-l10n blocks. lang.js sets data-lang on <html>
   to show one; without it both show and the switch is hidden. */
html[data-lang="sr"] [data-l10n="en"],
html[data-lang="en"] [data-l10n="sr"],
html:not([data-lang]) .lang-switch {
  display: none;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 16px 0;
}

.lang-switch {
  display: flex;
  gap: 4px;
  margin-left: auto;
  font-size: 0.875rem;
}

.lang-switch a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--link);
}

html[data-lang="sr"] .lang-switch [hreflang="sr"],
html[data-lang="en"] .lang-switch [hreflang="en"] {
  background: var(--tint);
  color: var(--link);
  font-weight: 600;
}

/* Document pages (privacy notice, terms): left-aligned reading column. */
.doc header,
.doc main,
.doc footer {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.doc header {
  padding-top: 24px;
}

.doc .logo {
  width: 96px;
}

.doc main {
  display: block;
  padding-top: 8px;
  padding-bottom: 48px;
  text-align: left;
  overflow-wrap: break-word;
}

.doc h1 {
  margin: 24px 0 4px;
  font-size: clamp(1.75rem, 6vw, 2.25rem);
}

.doc h2 {
  margin: 36px 0 8px;
  color: var(--heading);
  font-size: 1.25rem;
  line-height: 1.3;
}

.doc p,
.doc li {
  max-width: none;
  font-size: 1rem;
}

.doc p {
  margin: 0 0 12px;
}

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

.doc li {
  margin: 0 0 6px;
}

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

.doc .meta {
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

html:not([data-lang]) .doc article + article {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.doc footer {
  padding-top: 24px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
}
