@charset "UTF-8";

:root {
  color-scheme: light;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --bg: #edf3f8;
  --surface: #fff;
  --ink: #203748;
  --muted: #576b78;
  --line: #dfe6ec;
  --button: #f5f8fa;
  --link: #315d77;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171e24;
  --surface: #202a32;
  --ink: #e5edf3;
  --muted: #b3c0ca;
  --line: #41505c;
  --button: #293640;
  --link: #b4d4e9;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 Arial, Helvetica, sans-serif;
}
.header-backdrop {
  position: fixed;
  top: calc(0px - var(--safe-top));
  left: 0;
  right: 0;
  height: calc(66px + var(--safe-top) + var(--safe-top));
  background: var(--bg);
  z-index: 1;
  pointer-events: none;
}
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 30px; line-height: 1.25; margin-bottom: 16px; }
h2 { font-size: 21px; line-height: 1.35; margin-bottom: 18px; }
button, input, select { font: inherit; }
button, select {
  color: var(--ink);
  background: var(--button);
  border: 1px solid var(--line);
  border-radius: 4px;
  min-height: 44px;
}
button { cursor: pointer; padding: 7px 12px; }
button:hover, select:hover { border-color: var(--muted); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; }

.page {
  width: min(940px, calc(100% - 48px));
  margin: 40px auto 0;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  margin-bottom: 28px;
}
.brand { position: fixed; top: calc(22px + var(--safe-top)); left: calc(24px + var(--safe-left)); z-index: 2; line-height: 1.4; font-size: 24px; font-weight: 700; color: var(--ink); text-decoration: none; }
.theme-toggle {
  position: fixed;
  top: calc(18px + var(--safe-top));
  right: calc(24px + var(--safe-right));
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
}
.theme-toggle:hover { background: var(--surface); }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
.site-footer {
  width: min(940px, calc(100% - 48px));
  margin: 16px auto 28px;
  text-align: right;
  font-size: 12px;
}
.site-footer a { color: var(--muted); }
.home-page { padding-bottom: calc(64px + var(--safe-bottom)); }
.home-page .page { width: 100%; }
.home-page .site-header { margin-bottom: 32px; }
.home-page .site-footer {
  position: fixed;
  right: calc(18px + var(--safe-right));
  bottom: calc(12px + var(--safe-bottom));
  z-index: 2;
  width: auto;
  margin: 0;
  padding: 2px 6px;
  background: var(--bg);
}

.plant-grid {
  --preview-height: min(420px, 40vw);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
}
.home-page .plant-grid { justify-content: space-evenly; padding-inline: 24px; }
.plant-card {
  display: flex;
  flex-direction: column;
  flex: none;
  width: min-content;
  min-width: 0;
  color: var(--ink);
  background: var(--surface);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.plant-card:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.card-photo img { width: auto; height: var(--preview-height); max-width: none; }
.card-copy { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card-copy h2 { font-size: 21px; margin-bottom: 10px; }
.variety { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.description { font-size: 15px; line-height: 1.6; margin-bottom: 20px; }
.card-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-top: auto; }

.back-link { display: inline-block; margin-bottom: 22px; font-size: 14px; }
.intro-description { margin-bottom: 26px; }
.video-section { margin-bottom: 28px; }
.player { position: relative; background: #10171b; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.player video { width: 100%; aspect-ratio: 16/9; object-fit: contain; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-y pinch-zoom; }
.player-controls { position: absolute; inset: auto 0 0; color: #fff; background: linear-gradient(transparent, #000c); padding: 22px 12px 6px; opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.player[data-controls-visible] .player-controls { opacity: 1; }
.player[data-controls-visible] .player-controls :is(button, input, select) { pointer-events: auto; }
.seek-row { display: flex; align-items: center; gap: 12px; }
.seek-row input { appearance: none; width: 100%; min-width: 0; min-height: 28px; background: transparent; cursor: pointer; }
.seek-row input::-webkit-slider-runnable-track { height: 2px; background: #ffffff70; }
.seek-row input::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; margin-top: -4px; border: 0; border-radius: 50%; background: #fff; }
.seek-row input::-moz-range-track { height: 2px; background: #ffffff70; }
.seek-row input::-moz-range-progress { height: 2px; background: #fff; }
.seek-row input::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: #fff; }
.seek-row output { color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 86px; text-align: right; }
.button-row { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.button-row button { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; color: #fff; background: transparent; border: 0; padding: 8px; }
.button-row button:hover { background: #ffffff20; }
.player-controls :focus-visible { outline-color: #fff; outline-offset: 1px; }
.speed-label { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.speed-label select { color: #fff; background: transparent; border: 0; border-radius: 0; padding: 4px; }
.speed-label option { color: #203748; background: #fff; }
.player-status { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.player:fullscreen { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.player:fullscreen video { width: 100%; height: 100%; min-height: 0; max-height: 100vh; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 30px; margin: 0; padding: 26px 0; border-block: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 15px; }
.journal { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); column-gap: 40px; align-items: start; }
.fold { min-width: 0; margin-top: 32px; }
.journal-column { min-width: 0; }
.journal > #ergebnisse { grid-column: 1; }
.journal > #setup { grid-column: 2; }
.fold > summary { display: flex; align-items: center; gap: 10px; width: fit-content; min-height: 44px; padding-block: 4px; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2 { margin: 0; }
.fold > summary svg { flex: none; color: var(--muted); transition: transform .18s ease; }
.fold[open]:not([data-closing]) > summary svg { transform: rotate(90deg); }
.fold-body { overflow: hidden; }
.fold-inner { padding-top: 14px; }
.result-photo { width: auto; height: auto; max-height: 560px; margin-top: 24px; border-radius: 6px; }
.count { color: var(--muted); font-size: 16px; font-weight: 400; }
.entries { list-style: none; padding: 0; margin: 0; }
.entry { padding: 18px 0; border-top: 1px solid var(--line); }
.entry-heading { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.entry-heading strong { color: var(--ink); }
.entry p { font-size: 15px; margin: 0; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.text-page { padding-block: 8px 20px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 5; background: var(--surface); padding: 10px; }
.skip-link:focus { top: 10px; }

@media (max-width: 760px) {
  .journal { grid-template-columns: 1fr; gap: 0; }
  .journal > #ergebnisse, .journal > #setup { grid-column: auto; }
}

@media (max-width: 620px) {
  .page { width: calc(100% - 32px); margin-top: 20px; }
  .site-header { margin-bottom: 22px; }
  .theme-toggle { top: calc(10px + var(--safe-top)); right: calc(10px + var(--safe-right)); }
  .brand { top: calc(16px + var(--safe-top)); left: calc(16px + var(--safe-left)); }
  .home-page { padding-bottom: var(--safe-bottom); }
  .home-page .site-footer {
    position: static;
    width: calc(100% - 32px);
    margin: 24px auto 28px;
    padding: 0;
  }
  .home-page .site-header { margin-bottom: 44px; }
  .home-page .plant-grid { padding-inline: 28px; gap: 40px; }
  .site-footer { width: calc(100% - 32px); }
  .plant-grid { flex-direction: column; }
  .home-page .plant-card { width: 100%; max-width: 420px; align-self: center; }
  .home-page .card-photo img { width: 100%; height: auto; max-width: 100%; }
  .card-copy { padding: 18px; }
  h1 { font-size: 27px; }
  .intro-description { font-size: 15px; }
  .player-controls { padding: 16px 8px 4px; }
  .seek-row { gap: 8px; }
  .seek-row output { font-size: 12px; min-width: 80px; }
  .button-row { gap: 2px; }
  .facts { gap: 20px 16px; }
  .facts dd { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
