/* WyvernLabs Studios – „Werkstatt“: ruhig, klar, Linien statt Glow. Akzentfarbe kommt aus /theme.css. */

:root {
  --accent: #74c236; --accent-hover: #8fd94c; --accent-ink: #0d0f0b; --accent-rgb: 116, 194, 54;
  --bg: #111311;
  --bg-2: #161816;
  --panel: #191b19;
  --line: #262924;
  --line-strong: #353932;
  --text: #e9eae6;
  --text-2: #c4c7bf;
  --muted: #8e9289;
  --danger: #e5534b;
  --warn: #e3b341;
  --radius: 6px;
  --wrap: 1180px;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: inherit; }
code, pre, .mono { font-family: var(--mono); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 650; }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin: 0 auto; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: var(--radius); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- Knöpfe & Formulare */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; border-radius: var(--radius);
  font: 600 14.5px/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--muted); }
.btn-small { height: 34px; padding: 0 13px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(229, 83, 75, .45); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12.5px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 10px 12px; width: 100%; min-width: 0;
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .18); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); padding: 0; }
.code-input { font-family: var(--mono); font-size: 20px; letter-spacing: 4px; text-align: center; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: inline; margin: 0; }

.notice { border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); background: var(--bg-2); padding: 11px 14px; border-radius: var(--radius); margin: 0 0 16px; font-size: 14.5px; }
.notice-error { border-left-color: var(--danger); }
.notice-warn { border-left-color: var(--warn); }
.notice .inline-form { margin-left: 8px; }

.tag { display: inline-block; font: 600 11.5px/1 var(--mono); padding: 4px 7px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--text-2); vertical-align: middle; }
.tag-beta { color: var(--warn); border-color: rgba(227, 179, 65, .4); }

/* ---------------------------------------------------------------- Kopf & Fuß */

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 5px; }
.brand-mark { width: 22px; height: 22px; border-radius: 5px; background: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a { padding: 8px 11px; border-radius: var(--radius); text-decoration: none; color: var(--text-2); font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.site-nav a:hover { color: var(--text); background: var(--bg-2); }
.site-nav a.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.site-nav .btn { color: var(--accent-ink); margin-left: 6px; }
.site-nav .btn:hover { background: var(--accent-hover); }
.site-nav .nav-admin { color: var(--accent); }
.nav-sep { width: 1px; height: 22px; background: var(--line-strong); margin: 0 6px; }
.nav-toggle, .nav-burger { display: none; }

.site-footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 34px 0 40px; font-size: 14px; color: var(--muted); }
.footer-row { display: grid; grid-template-columns: 1fr auto; gap: 14px 30px; align-items: start; }
.footer-brand strong { color: var(--text); }
.footer-brand p { margin: 4px 0 0; max-width: 46ch; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-copy { grid-column: 1 / -1; margin: 10px 0 0; font-size: 13px; }

/* ---------------------------------------------------------------- Startseite */

.hero { border-bottom: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px); background-size: 100% 64px; background-position: 0 -1px; }
.hero-grid { display: grid; gap: 48px; padding: 88px 0 72px; align-items: center; }
.hero-grid.has-image { grid-template-columns: 1.1fr .9fr; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); max-width: 15ch; letter-spacing: -0.035em; }
.lead { font-size: 1.15rem; color: var(--text-2); max-width: 54ch; margin-top: 20px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero-image { border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); aspect-ratio: 4 / 3; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; }

.section { padding-top: 56px; }
.page-top { padding-top: 44px; }
.section-head { display: flex; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 22px; }
.section-head h2 { font-size: 1.35rem; }
.section-head h2 a { text-decoration: none; }
.section-head > a, .section-head > span { margin-left: auto; font-size: 14px; color: var(--muted); text-decoration: none; }
.section-head > a:hover { color: var(--text); }
.page-title { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 24px; letter-spacing: -0.03em; }
.empty { color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 28px; text-align: center; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card-item { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--bg); transition: border-color .15s; }
.card-item:hover { border-color: var(--line-strong); }
.card-item:hover h3 { color: var(--accent); }
.ci-media { aspect-ratio: 16 / 10; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.ci-media img { width: 100%; height: 100%; object-fit: cover; }
.ci-placeholder { height: 100%; display: grid; place-items: center; color: var(--line-strong); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 24px 24px; }
.ci-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ci-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.ci-meta code { color: var(--accent); font-size: 12.5px; }
.ci-body h3 { font-size: 1.15rem; transition: color .15s; }
.ci-body p { color: var(--text-2); font-size: 14.5px; margin: 0; }
.ci-foot { margin-top: auto; padding-top: 8px; font-size: 13px; color: var(--muted); }

.cat-list { border-top: 1px solid var(--line); }
.cat-row { display: grid; grid-template-columns: minmax(160px, 260px) 1fr auto auto; gap: 20px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.cat-row:hover .cat-name { color: var(--accent); }
.cat-name { font-weight: 650; font-size: 1.05rem; }
.cat-desc { color: var(--muted); font-size: 14.5px; }
.cat-count { font: 13px var(--mono); color: var(--muted); }
.cat-block { margin-bottom: 48px; }

/* ---------------------------------------------------------------- Eintrag */

.product-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.product-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.product-title h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; }
.product .lead { margin-top: 12px; }
.product-cover { margin: 28px 0 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.product-cover img { width: 100%; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.gallery a { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.product .prose { margin-top: 30px; }
.product-side { position: sticky; top: 88px; }
.dl-box { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 20px; background: var(--bg-2); }
.dl-head { display: flex; align-items: center; gap: 10px; }
.dl-label { font-size: 13.5px; color: var(--muted); }
.dl-version { font-size: 1.25rem; color: var(--text); margin-left: auto; }
.dl-date { font-size: 13.5px; color: var(--muted); margin: 4px 0 14px; }
.dl-req { font-size: 13.5px; color: var(--text-2); }
.dl-req span { color: var(--muted); }
.dl-files { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
.dl-files li { display: grid; gap: 4px; }
.dl-files .btn { justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-file-locked { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14.5px; }
.dl-file-meta { font-size: 12.5px; color: var(--muted); }
.dl-file-meta code { font-size: 12px; }
.dl-files.compact { margin-top: 10px; }
.dl-files.compact li { display: flex; gap: 12px; align-items: baseline; font-size: 14px; }
.dl-files.compact a { text-decoration: none; color: var(--accent); }

.changelog { margin-top: 48px; }
.changelog h2 { font-size: 1.35rem; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 4px; }
.release { border-bottom: 1px solid var(--line); }
.release summary { display: flex; align-items: center; gap: 12px; padding: 14px 2px; cursor: pointer; list-style: none; }
.release summary::-webkit-details-marker { display: none; }
.release summary::after { content: "+"; margin-left: auto; color: var(--muted); font-family: var(--mono); }
.release[open] summary::after { content: "–"; }
.release summary code { color: var(--accent); font-size: 15px; }
.release .prose { margin: 0 0 16px; font-size: 15px; }

/* ---------------------------------------------------------------- Fließtext (Markdown) */

.prose { color: var(--text-2); }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text); margin: 1.6em 0 .6em; }
.prose h2 { font-size: 1.4rem; } .prose h3 { font-size: 1.15rem; } .prose h4 { font-size: 1rem; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose code { background: var(--bg-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.prose pre { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; }
.prose pre code { border: 0; padding: 0; background: none; }
.prose blockquote { margin: 1em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* ---------------------------------------------------------------- Anmeldung & Konto */

.auth-wrap { display: grid; place-items: center; padding: 64px 0 20px; }
.auth-card { width: min(420px, 100%); }
.auth-card h1 { font-size: 2rem; margin-bottom: 24px; letter-spacing: -0.03em; }
.auth-alt { font-size: 14.5px; color: var(--muted); margin: 14px 0 0; }
.auth-alt a { color: var(--accent); }

.account .admin-teaser { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 24px; }
.account .admin-teaser p { margin: 4px 0 0; color: var(--muted); }
.account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg); }
.panel h2 { font-size: 1.15rem; margin-bottom: 14px; }
.panel h3 { font-size: 1rem; margin: 4px 0 6px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 12px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv .icon { color: var(--accent); }
details.sub { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
details.sub summary { cursor: pointer; font-size: 14.5px; color: var(--text-2); }
details.sub .form { margin-top: 12px; }
.totp-setup .qr { width: 180px; border-radius: 6px; overflow: hidden; margin: 8px 0; }
.totp-setup .qr svg { display: block; width: 100%; height: auto; }
.secret { word-break: break-all; color: var(--accent); }
.row-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-form input { width: auto; flex: 1; min-width: 140px; }
.recovery { columns: 2; font-size: 15px; line-height: 1.8; margin: 10px 0 0; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.table a { color: var(--accent); text-decoration: none; }
.account-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-top: 24px; flex-wrap: wrap; }
.danger-zone summary { color: var(--danger); }

.error-page { text-align: center; padding-top: 90px; }
.error-code { font: 600 14px var(--mono); color: var(--accent); }

/* ---------------------------------------------------------------- Handy */

@media (max-width: 900px) {
  .hero-grid.has-image { grid-template-columns: 1fr; }
  .hero-grid { padding: 56px 0 48px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-side { position: static; order: -1; }
  .account-grid { grid-template-columns: 1fr; }
  .cat-row { grid-template-columns: 1fr auto; }
  .cat-desc { grid-column: 1 / -1; grid-row: 2; }
  .cat-row > .icon { display: none; }
}

@media (max-width: 760px) {
  .nav-burger { display: grid; place-items: center; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 20px 16px; gap: 2px; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a.active { box-shadow: inset 3px 0 0 var(--accent); }
  .site-nav .btn { margin: 8px 0 0; }
  .nav-sep { display: none; }
  .footer-row { grid-template-columns: 1fr; }
}
