/* The public legal pages: privacy policy, terms, how to delete an account (English, and Croatian under /legal/hr/).
   One stylesheet, no external font, no script. Light and dark follow the phone. Served by the static-file CSP in Program.cs
   (style-src 'self'), so nothing here may import a stylesheet or load anything from another origin. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1f2430;
  --muted: #5b6173;
  --accent: #512bd4;
  --card: #f6f5fc;
  --border: #e2e0f0;
  --note: #fff6e0;
  --note-border: #f1d58a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --fg: #e5e7eb;
    --muted: #9aa3b5;
    --accent: #a78bfa;
    --card: #111a2e;
    --border: #1f2937;
    --note: #2b2210;
    --note-border: #6b5413;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.25rem max(1rem, env(safe-area-inset-right)) 3rem max(1rem, env(safe-area-inset-left));
}

a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

/* the three pages and the other language, always at the top */
.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
  padding-bottom: .75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
}
.topnav .lang { margin-left: auto; }
.topnav [aria-current="page"] { color: var(--fg); font-weight: 600; text-decoration: none; }

h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 .25rem; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2.25rem 0 .5rem; }
h3 { font-size: 1.05rem; line-height: 1.35; margin: 0 0 .35rem; }
p, ul, ol { margin: .6rem 0; }
ul, ol { padding-left: 1.3rem; }
li { margin: .25rem 0; }

.updated { color: var(--muted); margin: 0 0 1rem; font-size: .95rem; }

.summary, .item, .note, .contact {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: .85rem 1rem;
  margin: 1rem 0;
}
.item { margin: .75rem 0; }
.item p:first-of-type { margin-top: 0; }
.item > :last-child, .summary > :last-child, .note > :last-child, .contact > :last-child { margin-bottom: 0; }
.note { background: var(--note); border-color: var(--note-border); }

/* the one place that names the person responsible and the address to write to (change it here, per page) */
.contact { border-left: 4px solid var(--accent); }
.contact .label { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 .15rem; }
.contact .who { font-weight: 600; margin: 0; }

dl { margin: .5rem 0 0; }
dt { font-weight: 600; margin-top: .5rem; }
dd { margin: 0 0 0 0; }

ol.steps { counter-reset: step; list-style: none; padding-left: 0; }
ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.4rem;
  margin: .6rem 0;
}
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: .05rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.7rem;
  text-align: center;
}

code { font: .9em ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; overflow-wrap: anywhere; }

footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .9rem; }

@media (max-width: 30rem) {
  body { font-size: 17px; }
  h1 { font-size: 1.5rem; }
  .topnav .lang { margin-left: 0; }
}
