/* Stiftung Grastest. Ein Stylesheet, keine externen Schriften, kein JavaScript. */
:root {
  /* Palette "Sand und Aubergine". Alternative "Sand und Nachtblau": --deep: #14233f; --deep-2: #24406e; --glow-1: rgba(120, 170, 255, .40); --glow-2: rgba(240, 160, 21, .38); */
  --bg: #f5f0e7;
  --surface: #fffdfa;
  --ink: #1d1521;
  --muted: #6c6169;
  --line: #e9e0d3;
  --soft: #efe7da;
  --deep: #2c1b35;
  --deep-2: #4d3159;
  --mint: #f4c98a;
  --glow-1: rgba(244, 170, 110, .50);
  --glow-2: rgba(214, 87, 122, .45);
  --indica: #6f55d8;
  --sativa: #e8960c;
  --hybrid: #d6547c;
  --cbd: #3a7fd0;
  --warn: #b5482a;
  --star: #e8960c;
  --tc: var(--hybrid);
  --r: 20px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(45, 27, 53, .05), 0 8px 24px -12px rgba(45, 27, 53, .16);
  --font: "Inter", "Avenir Next", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
.t-indica { --tc: var(--indica); }
.t-sativa { --tc: var(--sativa); }
.t-hybrid { --tc: var(--hybrid); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--deep-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--indica); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 1.6rem; font-weight: 750; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 60ch; }
.note { font-size: .92rem; color: var(--muted); max-width: 68ch; }
main { padding-bottom: 88px; }
.strain > section, .strain-main > section { margin-top: 64px; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; text-decoration: none;
  background: color-mix(in srgb, var(--tc) 14%, #fff); color: color-mix(in srgb, var(--tc) 62%, #000); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 8px; }

/* Kopf */
.top { background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; gap: 10px 28px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { height: 40px; width: auto; }
.brand b { font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--deep); color: var(--mint); font-weight: 800; font-size: 1rem; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; }
.nav a:hover { background: var(--soft); }
.nav a[aria-current] { background: var(--deep); color: #fff; }
.search { margin-left: auto; display: flex; background: var(--soft); border-radius: 999px; padding: 4px; }
.search input { font: inherit; font-size: .95rem; border: 0; background: transparent; color: var(--ink); padding: 6px 12px; width: 180px; min-width: 0; outline-offset: -2px; }
.search button { font: inherit; font-size: .92rem; font-weight: 700; padding: 6px 16px; border: 0; background: var(--deep); color: #fff; border-radius: 999px; cursor: pointer; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; font-size: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Startseite und Listen */
.page-head { padding: 36px 0 4px; }
.page-head.is-home { margin-top: 24px; padding: clamp(32px, 6vw, 72px); border-radius: 32px; color: #fff;
  background: radial-gradient(60% 90% at 88% 10%, var(--glow-1), transparent 70%), radial-gradient(50% 80% at 100% 100%, var(--glow-2), transparent 70%), linear-gradient(135deg, var(--deep), color-mix(in srgb, var(--deep) 80%, #000)); }
.page-head.is-home h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin-bottom: .3em; }
.page-head.is-home .lead { color: rgba(255, 255, 255, .82); }
.hero-search { display: flex; gap: 6px; max-width: 560px; margin-top: 26px; background: var(--surface); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); }
.page-head:not(.is-home) .hero-search { border: 1px solid var(--line); }
.hero-search input { flex: 1; min-width: 0; font: inherit; border: 0; background: transparent; color: var(--ink); padding: 10px 18px; border-radius: 999px; }
.btn, .hero-search button { font: inherit; font-weight: 700; padding: 11px 22px; border: 0; border-radius: 999px; background: var(--deep); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover, .hero-search button:hover { background: var(--deep-2); color: #fff; }
.filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { padding: 9px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 650; text-decoration: none; }
.tabs a[class]::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--tc); margin-right: 8px; }
.tabs a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.sort { display: flex; align-items: center; gap: 8px; font-size: .93rem; color: var(--muted); }
.sort select { font: inherit; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); }
.sort button { font: inherit; font-weight: 650; padding: 8px 14px; border-radius: 999px; background: transparent; color: var(--deep-2); border: 1px solid var(--line); cursor: pointer; }
.count { color: var(--muted); font-size: .93rem; margin: 18px 0 14px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 36px; }
.pager a { font-weight: 700; }
.empty { padding: 64px 0; max-width: 52ch; }
.home-text { margin-top: 72px; }

/* Sortenkachel: Bild oben, Angaben darunter */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(45, 27, 53, .05), 0 18px 36px -14px rgba(45, 27, 53, .22); color: var(--ink); }
.card-img { display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; aspect-ratio: 1 / .86; padding: 18px; overflow: hidden;
  background: radial-gradient(70% 70% at 50% 55%, color-mix(in srgb, var(--tc) 22%, var(--surface)), color-mix(in srgb, var(--tc) 6%, var(--soft))); }
.card-img img { width: 100%; height: 100%; min-height: 0; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(45, 27, 53, .18)); }
.card-img .orb { width: 62%; }
.card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 18px 18px; }
.card-name { font-size: 1.22rem; line-height: 1.2; letter-spacing: -0.015em; margin-top: 6px; }
.card-meta { font-size: .86rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.card-thc { font-size: .95rem; font-weight: 700; margin-top: 4px; }
.card-effects { font-size: .9rem; color: var(--muted); }
.card-terps { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); width: 100%; font-size: .82rem; font-weight: 600; }
.card-terps span { display: inline-flex; align-items: center; gap: 6px; }
.card-terps i { width: 9px; height: 9px; border-radius: 50%; }

/* Diagramme */
.ring, .donut { width: 100%; }
.ring-num { font: 800 21px var(--font); fill: currentColor; letter-spacing: -0.03em; }
.ring-sub { font: 600 9px var(--font); fill: var(--muted); }
.donut-mono { font: 800 26px var(--font); fill: var(--ink); letter-spacing: -0.04em; }
.stars { position: relative; display: inline-block; font-size: 1.25rem; line-height: 1; white-space: nowrap; vertical-align: -2px; }
.stars.sm { font-size: .95rem; vertical-align: -1px; }
.stars::before { content: "★★★★★"; color: #ddd3c4; }
.stars > span { position: absolute; inset: 0 auto 0 0; overflow: hidden; }
.stars > span::before { content: "★★★★★"; color: var(--star); }

/* Sortenseite */
.strain-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 32px; margin-top: 20px; padding: clamp(24px, 5vw, 56px); border-radius: 32px;
  background: radial-gradient(55% 80% at 80% 50%, color-mix(in srgb, var(--tc) 32%, var(--surface)), transparent 75%), color-mix(in srgb, var(--tc) 8%, var(--soft)); }
.strain-hero h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); margin: .2em 0 .1em; }
.aka { color: var(--muted); margin-bottom: .4em; }
.rating-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: .9em; }
.strain-hero-img { display: grid; place-items: center; }
.strain-hero-img img { max-height: 400px; width: auto; object-fit: contain; filter: drop-shadow(0 24px 28px rgba(45, 27, 53, .25)); }
.strain-hero-img .orb { width: min(280px, 80%); background: #fff; border-radius: 50%; box-shadow: var(--shadow); }

.bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-top: 20px !important; }
.tile { background: var(--surface); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tile .ring, .tile .donut { width: 108px; margin-bottom: 14px; }
.tile h2 { font-size: .86rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin: 0 0 2px; }
.tile p { margin: 0; font-weight: 700; }
.tile-num strong { font-size: 3.4rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: auto 0 10px; color: var(--deep); }
.tile-text { grid-column: span 2; justify-content: center; }
.tile-text p + h2 { margin-top: 14px; }
.c-indica { color: var(--indica); }
.c-sativa { color: color-mix(in srgb, var(--sativa) 70%, #000); }

.terp { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; background: var(--deep); color: #fff; border-radius: 32px; padding: clamp(24px, 5vw, 56px); }
.terp .note { color: rgba(255, 255, 255, .72); }
.terp-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; }
.terp-list li { padding-left: 18px; border-left: 4px solid var(--c); }
.terp-list p { margin: 0; font-size: .95rem; color: rgba(255, 255, 255, .8); max-width: 62ch; }
.terp-list p:first-child { font-size: 1.15rem; font-weight: 750; color: #fff; }
.terp-list a { color: #fff; }
.terp-list p:first-child span { font-size: .8rem; font-weight: 700; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 30%, transparent); }

.rings { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 20px; max-width: 900px; }
.rings a { display: flex; flex-direction: column; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; text-align: center; }
.rings .ring { width: 108px; }
.rings a:hover span { text-decoration: underline; }

.bubbles { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.bubbles li { width: calc(150px * var(--s)); aspect-ratio: 1; }
.bubbles a { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; text-decoration: none; text-align: center; line-height: 1.2;
  background: color-mix(in srgb, var(--tc) calc(var(--s) * 22%), #fff); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tc) 25%, transparent); }
.bubbles strong { font-size: calc(1.05rem * var(--s)); }
.bubbles span { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bubbles a:hover { box-shadow: inset 0 0 0 2px var(--tc); }

.bars { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; max-width: 560px; }
.bar { display: grid; grid-template-columns: 150px 1fr 48px; align-items: center; gap: 12px; }
.bar-name { font-weight: 650; }
.bar-track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: 4px; background: var(--tc); }
.bar.neg .bar-track span { background: var(--warn); }
.bar-pct { font-variant-numeric: tabular-nums; font-size: .9rem; color: var(--muted); text-align: right; }

.strain-main { max-width: 760px; }
.lineage { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lineage > span { width: 110px; color: var(--muted); font-size: .92rem; }
.chip { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-weight: 650; font-size: .95rem; }
.chip[class*="t-"]::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--tc); margin-right: 8px; }
.chip:hover { color: var(--deep-2); }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; }
.prose > h2:first-child, .prose > h1:first-child { margin-top: 0; }
article.prose { padding-top: 36px; }

/* Merkmals-Übersichten */
.attr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 24px; }
.attr-item { display: block; padding: 20px 22px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.attr-item strong { font-size: 1.18rem; }
.attr-count { float: right; font-size: .85rem; color: var(--muted); }
.attr-item p { margin: 8px 0 0; font-size: .93rem; color: var(--muted); }

/* Bewertungen */
.notice { padding: 14px 18px; border-radius: var(--r-sm); margin-bottom: 18px; font-weight: 600; }
.notice p { margin: 0; }
.notice.ok { background: #e3f1ee; color: #0f5257; }
.notice.err { background: #fde8e2; color: #7c2b1b; }
.reviews { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; }
.review { padding: 20px 22px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.review-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.review time { color: var(--muted); font-size: .88rem; }
.review p { margin: 0 0 10px; }
.review p:last-child { margin: 0; }
.review-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .82rem; font-weight: 650; padding: 3px 11px; border-radius: 999px; background: #ebe4f3; color: var(--deep); }
.tag.k-negative { background: #fde8e2; color: #7c2b1b; }
.tag.k-flavor { background: #fdf0d2; color: #6b4300; }

.review-form { background: var(--surface); border-radius: var(--r); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); }
.review-form fieldset { border: 0; padding: 0; margin: 0 0 24px; }
.review-form legend, .field label { font-weight: 700; padding: 0; margin-bottom: 10px; display: block; }
.hp { position: absolute; left: -9999px; }
.rate-stars { display: inline-flex; flex-direction: row-reverse; }
.rate-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-stars label { font-size: 2.4rem; line-height: 1; color: #ddd3c4; cursor: pointer; padding: 0 2px; margin: 0; }
.rate-stars label::before { content: "★"; }
.rate-stars input:checked ~ label, .rate-stars label:hover, .rate-stars label:hover ~ label { color: var(--star); }
.rate-stars input:focus-visible + label { outline: 3px solid var(--indica); border-radius: 6px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick legend { width: 100%; }
.pick label { cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick span { display: inline-block; padding: 7px 14px; border-radius: 999px; font-size: .93rem; font-weight: 650; background: var(--soft); }
.pick input:checked + span { background: var(--deep); color: #fff; }
.pick input:focus-visible + span { outline: 3px solid var(--indica); outline-offset: 2px; }
.field textarea, .field input { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); }
.field input { max-width: 320px; }
.check { font-size: .93rem; }

/* Fuß */
.foot { background: var(--deep); color: rgba(255, 255, 255, .75); font-size: .93rem; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 48px; }
.foot-brand { color: #fff; font-weight: 800; font-size: 1.1rem; }
.foot nav { display: flex; flex-direction: column; gap: 8px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { color: var(--mint); }

/* Admin */
.admin table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .93rem; }
.admin th, .admin td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin form.inline { display: inline; }
.admin .btn { padding: 6px 12px; font-size: .9rem; }
.admin .btn.alt { background: var(--surface); color: var(--warn); border: 1.5px solid var(--warn); }
.admin-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.admin-form label { display: block; font-weight: 600; font-size: .9rem; }
.admin-form input, .admin-form select, .admin-form textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; margin-top: 4px; }
.admin-form .wide { grid-column: 1 / -1; }
.score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.score-grid label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 500; }
.score-grid input { width: 70px; margin: 0; }
.admin-nav { display: flex; gap: 16px; flex-wrap: wrap; padding: 20px 0 8px; font-weight: 600; }


@media (max-width: 860px) {
  .foot-in { grid-template-columns: 1fr 1fr; }
  .search { margin-left: 0; width: 100%; }
  .search input { flex: 1; width: auto; }
  .top { position: static; }
  .terp { grid-template-columns: 1fr; }
  .terp-chart { max-width: 220px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav a { padding: 7px 11px; }
  .strain-hero { grid-template-columns: 1fr; }
  .strain-hero-img { order: -1; }
  .strain-hero-img img { max-height: 240px; }
  .strain-hero-img .orb { width: 180px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 12px 12px 14px; }
  .card-name { font-size: 1.05rem; }
  .card-effects { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { padding: 16px; }
  .tile .ring, .tile .donut { width: 88px; }
  .rings { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .rings .ring { width: 88px; }
  .bubbles li { width: calc(112px * var(--s)); }
  .bar { grid-template-columns: 120px 1fr 44px; gap: 8px; }
  .hero-search button { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .card { transition: none; } .card:hover { transform: none; } }
.c-indica, .c-sativa { display: block; white-space: nowrap; }
