/* maltelandwehr.de — minimal, content-first, no framework, no JS */

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5c5c5c;
  --rule: #e4e4e4;
  --link: #0b5cad;
  --link-hover: #083e75;
  --accent: #0b5cad;
  --code-bg: #f5f5f5;
  --max: 44rem;
  --wide: 62rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --fg: #e8e8e8;
    --muted: #a0a0a0;
    --rule: #2e2e2e;
    --link: #6fb3f2;
    --link-hover: #9ccbf7;
    --accent: #6fb3f2;
    --code-bg: #1e1e1e;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---------- skip link (a11y) ---------- */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--fg);
  color: var(--bg);
  padding: .6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.wrap--wide { max-width: var(--wide); }

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

.site-header {
  border-bottom: 1px solid var(--rule);
  padding-block: 1.1rem;
  margin-bottom: 2.5rem;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .75rem 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  color: var(--fg);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { color: var(--link); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: .95rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: .25em;
}

/* ---------- typography ---------- */

main { padding-bottom: 4rem; }

h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 2.25em 0 .6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  margin-top: 0;
}

h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p, ul, ol, blockquote, table, figure { margin: 0 0 1.25em; }

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

strong { font-weight: 650; }

ul, ol { padding-left: 1.4em; }
li { margin-bottom: .4em; }
li > ul, li > ol { margin-top: .4em; margin-bottom: .4em; }

blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.1em;
  margin-left: 0;
  color: var(--muted);
  font-style: italic;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 3em 0;
}

code {
  background: var(--code-bg);
  padding: .15em .4em;
  border-radius: 3px;
  font-size: .9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

/* ---------- lede ---------- */

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2em;
}

/* ---------- media ---------- */

img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

figure { margin-inline: 0; }

figcaption {
  font-size: .88rem;
  color: var(--muted);
  margin-top: .5em;
}

/* ---------- tables ---------- */

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

th, td {
  text-align: left;
  padding: .55em .7em;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th { font-weight: 650; }

.table-scroll { overflow-x: auto; margin-bottom: 1.25em; }

.row-group th {
  font-weight: 650;
  background: var(--rule);
}

.u-sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- article list ---------- */

.post-list { list-style: none; padding: 0; }

.post-list li {
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}

.post-list a {
  font-weight: 600;
  font-size: 1.08rem;
  text-decoration: none;
}
.post-list a:hover { text-decoration: underline; }

.post-list p {
  margin: .35em 0 0;
  color: var(--muted);
  font-size: .95rem;
}

/* ---------- key facts / callout ---------- */

.facts {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2em;
}
.facts ul { margin-bottom: 0; }

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 3rem;
  font-size: .9rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  align-items: baseline;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }

.site-footer .copyright { margin-right: auto; }

/* ---------- redirect stub ---------- */

.redirect-note {
  max-width: var(--max);
  margin: 20vh auto;
  padding-inline: 1.25rem;
  text-align: center;
}

/* ---------- print ---------- */

@media print {
  .site-header, .site-footer { display: none; }
  body { font-size: 11pt; }
  a { color: inherit; text-decoration: underline; }
}
