/* Minimal hand-rolled stylesheet – no framework.
   Green accent for the "Grün und Technik" motto. */

:root {
  --text: #23272a;
  --muted: #6a7377;
  --accent: #2a7a2a;
  --bg: #ffffff;
  --line: #dfe3e5;
  --max: 46rem;
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
  max-width: var(--max);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4 { line-height: 1.25; margin: 2rem 0 .75rem; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; }

a { color: var(--accent); }
a:hover { text-decoration: underline; }

/* header */
header {
  border-bottom: 1px solid var(--line);
  padding-bottom: .75rem;
  margin-bottom: 1.75rem;
}
.site-title {
  display: block;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.05rem;
  margin-bottom: .4rem;
}
.menu {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu a, .menu .dropdown-label {
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.menu a:hover, .menu .dropdown-label:hover { color: var(--accent); }

/* drop-down menus – pure CSS, no JS:
   hover opens on desktop and closes when the pointer leaves the
   label+menu area; the visually hidden checkbox tap-toggles on touch
   (label → :checked, sticky like the old <details>); :focus-within
   keeps the menu open for keyboard users while a child is focused.
   Becomes active as soon as menu entries get children
   (page frontmatter: dropdown: true) */
.menu .dropdown { position: relative; }
.menu .dropdown-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  /* must stay focusable (keyboard), but never intercept clicks –
     label→checkbox forwarding works regardless */
  pointer-events: none;
}
.menu .dropdown-label { display: inline-block; user-select: none; }
.menu .dropdown-label::after { content: " ▾"; font-size: .75em; color: var(--muted); }
.menu .dropdown-toggle:focus + .dropdown-label {
  outline: 1px solid var(--muted);
  outline-offset: 2px;
}
.menu .dropdown:hover .dropdown-menu,
.menu .dropdown-toggle:checked ~ .dropdown-menu,
.menu .dropdown:focus-within .dropdown-menu { display: block; }
.menu .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  /* padding instead of margin: the visual gap stays inside the menu
     box, so the pointer can cross it without the menu closing */
  padding: .5rem .8rem .4rem;
  min-width: 11rem;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 .25rem .6rem rgba(0, 0, 0, .08);
  list-style: none;
  z-index: 20;
}
.menu .dropdown-menu li { margin: .25rem 0; white-space: nowrap; }

/* meta + tags */
.meta { color: var(--muted); font-size: .9rem; }
.tags { font-size: .9rem; color: var(--muted); }
.tag { margin-right: .5rem; }

/* content */
.content img { max-width: 100%; height: auto; }
.content figure { margin: 1.5rem 0; text-align: center; }
.content figcaption {
  color: var(--muted);
  font-size: .9rem;
  margin-top: .35rem;
}
.content table {
  border-collapse: collapse;
  margin: 1.25rem 0;
  max-width: 100%;
}
.content td, .content th {
  border: 1px solid var(--line);
  padding: .35rem .6rem;
  text-align: left;
  vertical-align: top;
}
.content blockquote {
  margin: 1.25rem 0;
  padding: .25rem 0 .25rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.content iframe { max-width: 100%; }

/* lists */
.page-list, .post-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.page-list li, .post-list li {
  padding: .45rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.page-list .meta, .post-list time {
  color: var(--muted);
  font-size: .9rem;
  white-space: nowrap;
}

/* footer */
footer {
  margin-top: 3rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
}
footer .muted { color: var(--muted); font-size: .85rem; }
