/*
 * Wend's legal pages on wendmap.com: the privacy policy and the data-deletion
 * instructions (privacy.html, data-deletion.html). Store reviewers and the
 * people who use Wend read them, on phones as much as on desktops. The home
 * pages beside them have their own site.css.
 *
 * Plain on purpose. The pages have no script at all and their
 * Content-Security-Policy allows styles only from this site, so everything
 * here is a stylesheet rule: no inline styles, no web fonts (the system's
 * own, so nothing is fetched from anyone else), no theme switch (the system's
 * light or dark setting, through prefers-color-scheme). The colours echo the
 * admin console's and the home page's, so the sites read as one.
 */

:root {
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, 'Cascadia Mono', 'Segoe UI Mono', Menlo, Consolas, monospace;

  --bg: #f5f7fa;
  --surface: #ffffff;
  --border: #e4e8ee;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --link: #1d4ed8;
  --link-visited: #6d28d9;
  --code-bg: #f1f5f9;
  --note-bg: #eaf1ff;
  --note-border: #bfd3fb;
  --focus: rgba(37, 99, 235, 0.45);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f1a;
    --surface: #111827;
    --border: #233044;
    --text: #e6ebf3;
    --text-2: #c3cddb;
    --muted: #8d9bb0;
    --link: #93b8fb;
    --link-visited: #c4b5fd;
    --code-bg: #1a2333;
    --note-bg: rgba(59, 130, 246, 0.12);
    --note-border: rgba(96, 165, 250, 0.35);
    --focus: rgba(96, 165, 250, 0.6);
  }
}

*,
*::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: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* One readable column with a 16 px gutter at any width: no sideways scroll on a 360 px phone. */
.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 16px;
}

/* ------------------------------------------------------------------ header */

.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site .page {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}
.brand img {
  display: block;
  border-radius: 8px;
}
.site nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}
.site nav a[aria-current='page'] {
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

/* ------------------------------------------------------------------ content */

main {
  padding-top: 8px;
  padding-bottom: 48px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  color: var(--text);
}
h1 {
  font-size: 1.875rem;
  letter-spacing: -0.01em;
  margin: 28px 0 8px;
}
h2 {
  font-size: 1.3rem;
  margin: 40px 0 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
h3 {
  font-size: 1.0625rem;
  margin: 24px 0 6px;
}
/* A heading reached through a contents link is not hidden under the browser's own toolbar. */
h2,
h3 {
  scroll-margin-top: 16px;
}

p,
ul,
ol {
  margin: 0 0 12px;
}
ul,
ol {
  padding-inline-start: 1.4em;
}
li {
  margin: 4px 0;
}
li > ul,
li > ol {
  margin: 4px 0 0;
}

.lead {
  font-size: 1.0625rem;
  color: var(--text-2);
}

/* Who, how to reach them, since when. */
.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 16px;
  margin: 16px 0 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
  min-width: 0;
}

.contents {
  margin: 20px 0 0;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.contents h2 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 0;
  margin: 0 0 6px;
  padding: 0;
}
.contents ol {
  margin: 0;
}

.note {
  margin: 16px 0;
  padding: 12px 16px;
  background: var(--note-bg);
  border: 1px solid var(--note-border);
  border-radius: 10px;
}
.note > :last-child {
  margin-bottom: 0;
}

/* Steps to follow in the app: numbered, a little more air between them. */
.steps li {
  margin: 8px 0;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}
a:visited {
  color: var(--link-visited);
}
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Host names and paths: long ones (ftp-stud.hs-esslingen.de) break rather than widen the page. */
code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

/* An app label, as it reads on screen. */
.ui {
  font-weight: 600;
}

/* ------------------------------------------------------------------ footer */

.foot {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}
.foot .page {
  padding-top: 16px;
  padding-bottom: 32px;
}
.foot p {
  margin: 0 0 6px;
}

@media print {
  .site nav,
  .contents {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  a {
    color: #000;
  }
}
