/* Shared style of the PAISTRY legal pages. Served from /datenschutz/ because
   only the legal paths are routed to this Worker (see wrangler.jsonc). */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --line: #dcdcdc;
  --soft: #f4f4f2;
  --link: #0b57d0;
  --link-visited: #6a3fb5;
  --focus: #0b57d0;
  --measure: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --fg: #ececec;
    --muted: #a8a8a8;
    --line: #3a3a3a;
    --soft: #1f1f1f;
    --link: #8ab4f8;
    --link-visited: #c58af9;
    --focus: #8ab4f8;
  }
}

*,
*::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-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

a:visited {
  color: var(--link-visited);
}

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

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

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

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  border-bottom: 1px solid var(--line);
}

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

.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--fg);
}

.brand:visited {
  color: var(--fg);
}

.lang {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang a {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.lang a[aria-current="page"] {
  color: var(--fg);
  background: var(--soft);
}

main {
  padding: 2rem 0 3rem;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.5rem;
  scroll-margin-top: 1rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.25rem;
  scroll-margin-top: 1rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.35rem;
}

.updated {
  color: var(--muted);
  margin-bottom: 2rem;
}

.toc {
  background: var(--soft);
  border-radius: 6px;
  padding: 1rem 1.25rem;
}

.toc ol {
  margin: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--soft);
  padding: 0.05em 0.3em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

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

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

caption {
  text-align: left;
  font-weight: 600;
  padding: 0 0 0.5rem;
}

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

thead th {
  border-bottom-width: 2px;
}

dl.balance dt {
  font-weight: 600;
  margin-top: 0.75rem;
}

dl.balance dd {
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.5rem 0 2rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0;
}

@media (max-width: 30rem) {
  h1 {
    font-size: 1.55rem;
  }

  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 0.4rem;
  }
}

@media print {
  .site-header nav,
  .site-footer ul {
    display: none;
  }

  a {
    color: inherit;
  }
}
