/* haloboy.de — shared styles.

   Everything is self-hosted: no web fonts, no CDN, no analytics. That is
   partly taste and partly law — embedding Google Fonts alone transmits the
   visitor's IP address to a third country and has been held to breach the
   GDPR (LG München I, 3 O 17493/20). A privacy notice claiming "no data
   goes to third parties" has to be true of the page it sits on.
*/

:root {
  color-scheme: light dark;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef0f4;
  --text: #14161a;
  --text-muted: #5b616b;
  --border: #d9dce2;
  --accent: #2f5fd8;
  --accent-text: #ffffff;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(0 0 0 / .05);
  --radius: 14px;
  --measure: 42rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --surface: #171a20;
    --surface-2: #1e222a;
    --text: #e8eaee;
    --text-muted: #98a0ac;
    --border: #2b303a;
    --accent: #7aa2ff;
    --accent-text: #0a0d14;
    --shadow: 0 1px 2px rgb(0 0 0 / .5);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

/* ── shell ─────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .inner,
main,
.site-footer .inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-top: 1rem; padding-bottom: 1rem;
}

.wordmark {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 650; font-size: 1.05rem;
  color: var(--text); text-decoration: none;
}
.wordmark .dot {
  width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--accent);
}

.site-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a {
  font-size: .95rem; color: var(--text-muted); text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--text); text-decoration: underline;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: .9rem; color: var(--text-muted);
}
.site-footer .inner {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.25rem; padding-bottom: 1.25rem;
}
.site-footer a { color: var(--text-muted); }

/* ── typography ────────────────────────────────────────────────── */

h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.2; margin: 0 0 .6rem; }
h2 { font-size: 1.3rem; margin: 2.4rem 0 .7rem; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }

.lede { font-size: 1.1rem; color: var(--text-muted); margin: 0 0 2rem; }
.prose { max-width: var(--measure); }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose li { margin-bottom: .35rem; }
.prose h2:first-of-type { margin-top: 1.5rem; }

.small { font-size: .9rem; }
.muted { color: var(--text-muted); }

/* ── cards ─────────────────────────────────────────────────────── */

.cards {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin: 1.5rem 0 0; padding: 0; list-style: none;
}

.card {
  display: flex; flex-direction: column;
  padding: 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card p { margin: 0 0 .9rem; font-size: .95rem; color: var(--text-muted); }
.card .card-links { margin-top: auto; display: flex; gap: .9rem; flex-wrap: wrap; }
.card .card-links a { font-size: .88rem; }

.tag {
  /* The card is a flex column, so a plain inline-block would be stretched
     to the full card width by the default align-items: stretch. */
  display: inline-block; align-self: flex-start;
  padding: .1rem .5rem; margin-bottom: .6rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ── notices ───────────────────────────────────────────────────── */

.note {
  padding: .85rem 1rem;
  margin: 1.25rem 0;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  font-size: .95rem;
}
.note strong { display: block; margin-bottom: .2rem; }

/* Fields the operator has to fill in before going live. Loud on purpose:
   an unfinished imprint is worse than none at all. */
.todo {
  padding: .2rem .45rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em;
  color: #7a3d00;
  background: #ffe9c7;
  border: 1px dashed #c98a2e;
  border-radius: 5px;
}
@media (prefers-color-scheme: dark) {
  .todo { color: #ffd79a; background: #3a2a10; border-color: #8a6420; }
}

/* ── data tables in the privacy notices ────────────────────────── */

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

table {
  width: 100%; min-width: 34rem;
  border-collapse: collapse;
  font-size: .93rem;
}
th, td {
  padding: .55rem .7rem;
  text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--border);
}
th { font-weight: 600; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }

/* ── misc ──────────────────────────────────────────────────────── */

.toc {
  padding: 1rem 1.15rem;
  margin: 1.5rem 0 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.toc ol { margin: .4rem 0 0; padding-left: 1.2rem; }
.toc li { margin-bottom: .2rem; }
.toc a { color: var(--text); }

.updated { font-size: .88rem; color: var(--text-muted); margin-top: 2.5rem; }

.skip-link {
  position: absolute; left: -999px;
  padding: .6rem 1rem;
  background: var(--accent); color: var(--accent-text);
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; top: 0; z-index: 10; }
