/* 
   MLC Product Web Global Styles 
   Mirrored and cleaned from mlcgo.eu entry page 
*/

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

:root {
  --bg:      #050a14;
  --bg2:     #0a0f1e;
  --bg3:     #0f1628;
  --border:  #1e2a42;
  --text:    #e2e8f0;
  --muted:   #8ba3c0;
  --cyan:    #06b6d4;
  --purple:  #8b5cf6;
  --green:   #4ade80;
  --amber:   #f59e0b;
  --radius:  12px;
  --font-mono: 'Courier New', Courier, monospace;
}

[data-theme="light"] {
  --bg:      #ffffff;
  --bg2:     #f8fafc;
  --bg3:     #f1f5f9;
  --border:  #e2e8f0;
  --text:    #0f172a;
  --muted:   #64748b;
  --cyan:    #0891b2;
  --purple:  #7c3aed;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ── Nav ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
  backdrop-filter: blur(12px);
}
[data-theme="light"] nav { background: rgba(255,255,255,0.95); box-shadow: 0 1px 0 var(--border); }
.nav-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.nav-logo span { font-family: var(--font-mono); font-weight: bold; font-size: 1.1rem; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.btn-nav {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff !important; padding: 0.4rem 1rem;
  border-radius: 6px; font-size: 0.85rem; font-weight: 600; transition: opacity 0.2s;
}
.btn-nav:hover { opacity: 0.85; text-decoration: none; }
.btn-nav-ghost {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    transition: color 0.2s;
}
.btn-nav-ghost:hover { color: var(--text); text-decoration: none; }
.nav-user-chip {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--cyan);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-mono);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.nav-user-chip:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(6,182,212,0.2);
    text-decoration: none;
}
/* The chip carrying a picture instead of a word: no inner padding, so the
   circle sits in the pill rather than floating in it. */
.nav-user-chip--avatar {
    padding: 0.2rem;
    display: inline-flex;
    align-items: center;
}
.nav-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.nav-avatar-fallback {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lang-switch {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.lang-switch .lang-cur {
  padding: 0.2rem 0.4rem;
  background: var(--cyan);
  display: flex; align-items: center;
}
.lang-switch .lang-sep {
  width: 1px; background: var(--border); align-self: stretch;
}
.lang-switch .lang-other {
  padding: 0.2rem 0.4rem;
  display: flex; align-items: center;
  transition: background 0.2s;
  opacity: 0.55;
}
.lang-switch .lang-other:hover { background: rgba(6,182,212,0.12); text-decoration: none; opacity: 1; }
.theme-btn {
  background: none; border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  width: 32px; height: 32px; border-radius: 6px;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.theme-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ── Burger-Menü ──
   Am Desktop unsichtbar. Ab 820 px wird aus der Zeile eine Klappe:
   die Leiste hatte vorher keinen Umbruch, also schoben sich Links,
   Sprachumschalter, Theme-Knopf und Anmelde-Block gegenseitig aus
   dem Bild.

   820 px und nicht 700: der Anmelde-Block ist im angemeldeten
   Zustand breiter als im abgemeldeten, und die Schwelle muss fuer
   den ungueenstigeren Fall stimmen. */
.nav-burger {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 36px; height: 32px;
    cursor: pointer;
    padding: 8px 8px;
    flex-direction: column;
    justify-content: space-between;
}
.nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--muted);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s, background 0.2s;
}
.nav-burger:hover span { background: var(--cyan); }
/* Aufgeklappt wird aus den drei Strichen ein Kreuz — dieselbe Flaeche
   schliesst wieder, ohne dass ein zweiter Knopf noetig waere. */
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
    .nav-burger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 60px;              /* Unterkante der 60px hohen Leiste */
        left: 0;
        right: 0;
        background: var(--bg2);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0.5rem 1.25rem 1rem;
        box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    }
    .nav-links.nav-open { display: flex; }
    .nav-links > a {
        width: 100%;
        padding: 0.7rem 0;
        border-bottom: 1px solid var(--border);
    }
    /* Sprachumschalter, Theme-Knopf und Anmelde-Block stehen unter den
       Links nebeneinander: drei kleine Bedienelemente, die je eine
       eigene Zeile nicht brauchen. */
    .nav-links .lang-switch,
    .nav-links .theme-btn,
    .nav-links #nav-auth { margin-top: 0.85rem; }
    .nav-links #nav-auth { width: 100%; }
}

/* ── Generic Hero ── */
#hero {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: 4rem;
  padding: 5rem 4rem;
  max-width: 1280px; margin: 0 auto;
}
[data-theme="light"] #hero {
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(8,145,178,0.05) 0%, transparent 70%);
}
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan);
  text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800; line-height: 1.15; margin-bottom: 1.5rem;
}
.hero-title .grad {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.badge-meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
a.badge-meta:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(6,182,212,0.05);
}
.status-dot-beta {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px var(--green);
}
.badge-status-beta {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--bg);
    background: var(--green);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 1px;
}
.badge-status-retired {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--muted);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 1px;
}
.hero-sub {
  font-size: 1.05rem; color: var(--muted);
  max-width: 440px; margin-bottom: 2.5rem; line-height: 1.7;
}
.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: #fff; padding: 0.7rem 1.6rem; border-radius: 8px;
  font-weight: 700; font-size: 0.95rem; transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); text-decoration: none; }
.btn-outline {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border: 1.5px solid rgba(255,255,255,0.2); color: var(--text);
  padding: 0.7rem 1.6rem; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; transition: border-color 0.2s, transform 0.2s, color 0.2s;
}
[data-theme="light"] .btn-outline { border-color: #94a3b8; color: var(--text); }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-1px); text-decoration: none; }
.btn-locked {
    opacity: 0.7;
    cursor: pointer;
}
.btn-locked:hover {
    opacity: 1;
}

/* ── Generic Sections ── */
section { padding: 5rem 2rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }

/* Sub-pages have no hero above them — remove the generic section gap */
#details:has(.subpage-layout) { padding: 0; }
.section-label {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--cyan); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 0.75rem;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; margin-bottom: 1rem; }
.section-sub { color: var(--muted); max-width: 540px; margin-bottom: 3rem; }
/* The release the files on this page belong to. Quiet and monospaced: it is a
   fact to check, not a claim to make. */
.download-version {
  font-family: var(--font-mono, monospace);
  color: var(--muted);
  margin: -2rem 0 2rem 0;
}

/* ── Spotlight Sections ── */
.spotlight-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}
.spotlight-section:last-child { border-bottom: none; }
.spotlight-section:nth-child(even) .spotlight-image { order: -1; }

.spotlight-image {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.spotlight-image img {
    width: 100%;
    display: block;
    cursor: zoom-in;
}
.spotlight-content {}
.spotlight-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--cyan);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.spotlight-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}
.spotlight-desc {
    color: var(--muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}
.spotlight-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.spotlight-items li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.95rem;
    line-height: 1.5;
}
.spotlight-items li::before {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    background-color: var(--cyan);
    border-radius: 50%;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* Die obere Leiste hat keinen eigenen Umbruch. Bei wenig Platz wird
   zuerst der Abstand kleiner, bevor irgendetwas herausfaellt — das ist
   die schonendste Stufe und aendert an schmalen Fenstern nichts
   Sichtbares ausser der Enge. */
@media (max-width: 820px) {
    .tabs-inner { padding: 0 1rem; }
    .tab-link { padding: 0.9rem 0.9rem; }
    /* Balken wieder einblenden — schmal und in den Farben des
       Schemas. Am Desktop bleibt er aus, dort passt das Band ohnehin. */
    .tabs-inner {
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
    }
    .tabs-inner::-webkit-scrollbar { display: block; height: 3px; }
    .tabs-inner::-webkit-scrollbar-track { background: transparent; }
    .tabs-inner::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 3px;
    }
}

@media (max-width: 768px) {
    .spotlight-section {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.5rem 0;
    }
    .spotlight-section:nth-child(even) .spotlight-image { order: 0; }
    .spotlight-title { font-size: 1.4rem; }
}

/* ── Feature Grid ── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.feature-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; display: flex; flex-direction: column; gap: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
[data-theme="light"] .feature-card { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
/* Hover nur, wo die Kachel wirklich ein Link ist (meta.yaml `link:`).
   Vorher reagierte jede Kachel und keine liess sich klicken. */
a.feature-card { color: inherit; text-decoration: none; }
.feature-card--link:hover,
.feature-card--link:focus-visible { border-color: var(--purple); box-shadow: 0 8px 32px rgba(139,92,246,0.15); }
.feature-card--link:hover .feature-more { color: var(--text); }
/* Vorschaubild randlos oben in der Kachel. */
.feature-image {
  width: calc(100% + 4rem); margin: -2rem -2rem 0;
  aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 1px solid var(--border);
}
.feature-more { margin-top: auto; font-family: var(--font-mono); font-size: 0.85rem; color: var(--cyan); transition: color 0.2s; }

/* Galerie: Skriptzeile und Link unter dem Bild (gallery.yaml code/link). */
.gallery-card-code {
  display: block; margin-top: 0.4rem; font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--cyan); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gallery-card-link { display: inline-block; margin-top: 0.35rem; font-size: 0.8rem; color: var(--muted); text-decoration: none; }
.gallery-card-link:hover { color: var(--text); }
.feature-icon { color: var(--cyan); font-size: 1.5rem; }
.feature-name { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; }
.feature-desc { color: var(--muted); font-size: 0.9rem; }

/* ── Category overview grid (index page) ── */
.cat-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.cat-overview-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16/9; display: block;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cat-overview-card:hover { border-color: var(--cyan); box-shadow: 0 8px 32px rgba(6,182,212,0.25); }
[data-theme="light"] .cat-overview-card { box-shadow: 0 4px 20px rgba(0,0,0,0.18); border-color: #cbd5e1; }
.cat-overview-card img {
  width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block;
  transition: filter 0.3s;
}
[data-theme="light"] .cat-overview-card img { filter: grayscale(0.85) brightness(2.5) contrast(0.75); }
.cat-overview-placeholder { width: 100%; height: 100%; background: var(--bg3); }
.cat-overview-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,14,26,0.92) 0%, rgba(10,14,26,0.3) 60%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.25rem 1.5rem; gap: 0.25rem;
}
.cat-overview-name {
  font-family: var(--font-mono); color: var(--cyan); font-size: 1.15rem; font-weight: 700;
  text-shadow: 0 1px 8px rgba(0,0,0,0.9);
}
.cat-overview-count {
  font-size: 0.8rem; color: rgba(255,255,255,0.6);
}

/* ── Category page hero ── */
.cat-page-hero {
  position: relative; width: 100%; min-height: 200px; max-height: 320px; overflow: hidden;
  background: var(--bg2);
}
.cat-page-hero img {
  width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block;
  max-height: 320px; transition: filter 0.3s;
}
[data-theme="light"] .cat-page-hero img { filter: grayscale(0.85) brightness(2.5) contrast(0.75); }
.cat-page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(10,14,26,0.9) 0%, rgba(10,14,26,0.4) 70%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 2.5rem;
}
.cat-back-link {
  position: absolute; bottom: 1.25rem; right: 1.5rem;
  font-size: 0.8rem; color: rgba(255,255,255,0.7); text-decoration: none;
  background: rgba(10,14,26,0.6); border: 1px solid rgba(255,255,255,0.2);
  padding: 0.3rem 0.75rem; border-radius: 999px;
  transition: color 0.2s, border-color 0.2s;
}
.cat-back-link:hover { color: var(--cyan); border-color: var(--cyan); }
.cat-page-title {
  font-family: var(--font-mono); color: var(--cyan); font-size: 2rem;
  margin: 0 0 0.25rem; text-shadow: 0 2px 12px rgba(0,0,0,0.8);
}
.cat-page-count { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin: 0; }
.cat-page-desc {
  font-size: 1.05rem; color: var(--muted); line-height: 1.7;
  max-width: 720px; margin: 0;
}

/* ── Product index overview grid ── */
.prod-index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.prod-index-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
[data-theme="light"] .prod-index-card { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.prod-index-card:hover { border-color: var(--purple); box-shadow: 0 8px 32px rgba(139,92,246,0.15); }
.prod-index-thumb {
  width: 100%; aspect-ratio: 16/9; overflow: hidden;
  background: var(--bg3); display: flex; align-items: center; justify-content: center;
}
.prod-index-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 0.5rem; box-sizing: border-box; }
.prod-index-thumb--empty { background: linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 100%); }
.prod-index-body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }

/* ── Downloads ── */
#downloads { padding: 4rem 1.5rem; max-width: 900px; margin: 0 auto; }
.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.download-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.download-os {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
}
.download-arch {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.8rem;
}
.download-label {
    color: var(--muted);
    font-size: 0.85rem;
    flex: 1;
}
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--purple);
    color: var(--bg);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    text-align: center;
    justify-content: center;
}
.btn-download:hover { opacity: 0.85; }
.btn-download.btn-locked {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
}
.btn-download.btn-locked:hover { border-color: var(--purple); color: var(--text); }
.download-gate-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.download-gate-note a { color: var(--cyan); }

/* ── mlc-symbol custom element ──
   The same base rules the home page's stylesheet carries. They have to exist
   wherever the component is used: without a width and height the <svg> inside
   has no intrinsic size and grows to fill whatever box it sits in — which is
   how a 1em lightbulb became a 150px one the moment the component started
   working. Duplicated rather than shared because the two sites ship separate
   stylesheets; if a third consumer appears, this belongs in a shared file. */
mlc-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    width: 1.1em;
    height: 1.1em;
    position: relative;
    top: -0.05em;
    flex-shrink: 0;
    color: inherit;
}
mlc-symbol:not(:defined) { opacity: 0; }
mlc-symbol svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

/* ── Download notices ── */
.download-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    border: 1px solid transparent;
}
.download-notice mlc-symbol { flex-shrink: 0; margin-top: 0.1em; }
.download-notice--info    { background: rgba(56, 189, 248, 0.10); border-color: rgba(56, 189, 248, 0.30); color: #7dd3fc; }
.download-notice--warning { background: rgba(251, 191, 36, 0.10); border-color: rgba(251, 191, 36, 0.30); color: #fcd34d; }
.download-notice--tip     { background: rgba(74, 222, 128, 0.10); border-color: rgba(74, 222, 128, 0.30); color: #86efac; }

/* The three colours above are pastels chosen against the dark ground. On the
   light theme they sit on near-white and measure 1.3–1.5:1 — below anything
   readable, and the notice that says "the program will not start without
   these libraries" was the least readable of the three. Same hue, taken dark
   enough to carry the text: 6.4–6.9:1. */
[data-theme="light"] .download-notice--info    { background: rgba(56, 189, 248, 0.12); border-color: rgba(3, 105, 161, 0.35);  color: #075985; }
[data-theme="light"] .download-notice--warning { background: rgba(251, 191, 36, 0.12); border-color: rgba(180, 83, 9, 0.35);   color: #854d0e; }
[data-theme="light"] .download-notice--tip     { background: rgba(74, 222, 128, 0.12); border-color: rgba(21, 128, 61, 0.35);  color: #166534; }

/* Package names and shell commands make up most of these notices. Without a
   chip they melt into the sentence, which is how a line of three package
   names reads as prose. */
.download-notice code {
    background: rgba(127, 127, 127, 0.18);
    padding: 0.1em 0.4em;
    border-radius: 4px;
    font-size: 0.92em;
    white-space: nowrap;
}
/* Light theme only: the dark theme's look is settled and this file is shared
   by every product page, so the change stays where the problem was. */
[data-theme="light"] .download-notice b,
[data-theme="light"] .download-notice strong { color: var(--text); }

/* ── Lightbox ── */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: var(--radius);
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
    cursor: zoom-out;
    object-fit: contain;
}
.lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    background: none;
    border: none;
    padding: 0.25rem 0.5rem;
    z-index: 1001;
}
.lightbox-close:hover { opacity: 1; }

[data-zoomable] {
    cursor: zoom-in;
}

/* ── Screenshot Gallery ── */
.screenshot-container {
    margin-top: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}
.screenshot-container img {
    width: 100%;
    display: block;
}

/* ── Screenshot Gallery (multi-image) ── */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.gallery-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.gallery-item:hover {
    border-color: var(--cyan);
    box-shadow: 0 12px 32px rgba(6,182,212,0.15);
}
.gallery-item img {
    width: 100%;
    display: block;
}

/* Sprungziele nicht unter den klebenden Leisten (60px Seitenleiste +
   Reiterleiste) verschwinden lassen — sonst landet ein Link wie
   effects/#oilpaint mit der Ueberschrift unsichtbar oben. */
h1[id], h2[id], h3[id], h4[id], section[id] { scroll-margin-top: 130px; }

/* ── Product Tabs ── */
.product-tabs {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 60px; /* sits flush below the 60px global nav */
    z-index: 90;
}
/* Verlaeufe am Rand, wo das Band weitergeht. Ein rollender Bereich
   ohne diesen Hinweis sieht aus wie ein abgeschnittener — man probiert
   gar nicht erst zu wischen.

   `pointer-events: none`, damit der Verlauf keinen Reiter darunter
   unklickbar macht. */
.product-tabs::before,
.product-tabs::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 1px;
    width: 2.5rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 1;
}
.product-tabs::before {
    left: 0;
    background: linear-gradient(to right, var(--bg2), transparent);
}
.product-tabs::after {
    right: 0;
    background: linear-gradient(to left, var(--bg2), transparent);
}
.product-tabs.tabs-more-left::before,
.product-tabs.tabs-more-right::after { opacity: 1; }
.tabs-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 0;
    /* Auf schmalen Fenstern rollen statt quetschen.
       Ohne das schrumpfen die Reiter, bis "API-Referenz" auf zwei
       Zeilen umbricht, und was dann noch nicht passt, schiebt einen
       waagerechten Rollbalken unter die ganze Seite. Ein Produkt mit
       acht Unterseiten erreicht das schon auf einem halbierten
       Desktop-Fenster, nicht erst auf dem Telefon. */
    overflow-x: auto;
    scrollbar-width: none;          /* Firefox */
    -ms-overflow-style: none;       /* alter Edge */
}
.tabs-inner::-webkit-scrollbar { display: none; }
.tab-link {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.9rem 1.4rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}
.tab-link:hover { color: var(--text); }

/* ── Gruppierte Reiterleiste (meta.yaml `nav:`) ──
   Wenige Eintraege mit Aufklappmenues statt vieler Reiter. Das Band
   rollt hier nicht: ein Menue in einem rollenden Bereich wuerde
   abgeschnitten, und bei fuenf Eintraegen gibt es nichts zu rollen. */
.product-tabs--grouped .tabs-inner { overflow: visible; align-items: center; }
.tab-group { position: relative; }
.tab-group > summary { list-style: none; cursor: pointer; display: block; user-select: none; }
.tab-group > summary::-webkit-details-marker { display: none; }
.tab-group > summary::after { content: "▾"; margin-left: 0.45rem; font-size: 0.75em; opacity: 0.7; }
.tab-group[open] > summary { color: var(--text); }
.tab-group > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: -4px; border-radius: 6px; }
.tab-new-dot {
  display: inline-block; width: 7px; height: 7px; margin-left: 0.35rem; vertical-align: super;
  border-radius: 50%; background: #f97316;
}
.tab-menu {
  position: absolute; top: 100%; left: 0.6rem; z-index: 100;
  min-width: 15rem; padding: 0.4rem;
  display: flex; flex-direction: column;
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.tab-menu-link {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0.8rem; border-radius: 6px;
  color: var(--muted); text-decoration: none; font-size: 0.92rem; white-space: nowrap;
}
.tab-menu-link:hover, .tab-menu-link:focus-visible { color: var(--text); background: var(--bg); }
.tab-menu-active { color: var(--cyan); }
.tab-new {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  padding: 0.1rem 0.45rem; border-radius: 999px; color: #fff; background: #f97316;
}
.tab-download {
  margin-left: auto; padding: 0.4rem 1rem; border: 1px solid var(--cyan); border-radius: 999px;
  color: var(--cyan);
}
.tab-download:hover { background: var(--cyan); color: var(--bg); }
.tab-download.tab-active { border-bottom-color: var(--cyan); }
/* Schmal: Menue ueber die ganze Breite, unter der Leiste. Die Leiste
   ist sticky und damit Bezugsrahmen; die Gruppe gibt ihn ab. */
@media (max-width: 820px) {
  /* Eine Zeile auch am Telefon: die Leiste klebt oben, jede weitere
     Zeile kostet Lesefläche auf jeder Seite. */
  .product-tabs--grouped .tabs-inner { flex-wrap: nowrap; padding: 0 0.5rem; }
  .product-tabs--grouped .tab-link { padding: 0.8rem 0.5rem; font-size: 0.78rem; }
  .product-tabs--grouped .tab-group > summary::after { margin-left: 0.25rem; }
  .product-tabs--grouped .tab-download { padding: 0.3rem 0.65rem; margin-left: auto; }
}
/* Telefon: Download als Pfeil, damit die Leiste in eine Zeile passt.
   Der Text bleibt fuer Screenreader (aria-label am Link). */
@media (max-width: 480px) {
  .product-tabs--grouped .tab-download-text { display: none; }
  .product-tabs--grouped .tab-download::before { content: "↓"; font-weight: 700; }
  .product-tabs--grouped .tab-group { position: static; }
  .product-tabs--grouped .tab-menu { left: 1rem; right: 1rem; min-width: 0; }
}
.tab-active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

/* ── Sub-page two-column layout ── */
.subpage-layout {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 3rem;
    align-items: start;
}

/* Hide the manually-written TOC section that appears in the markdown —
   it's redundant once the sidebar TOC is shown */
.subpage-layout .content-md #inhaltsverzeichnis,
.subpage-layout .content-md #table-of-contents,
.subpage-layout .content-md #inhaltsverzeichnis + ul,
.subpage-layout .content-md #table-of-contents + ul,
.subpage-layout .content-md #inhaltsverzeichnis + ol,
.subpage-layout .content-md #table-of-contents + ol {
    display: none;
}
.subpage-layout .content-md {
    min-width: 0;    /* prevent grid blowout on long words */
    overflow: hidden; /* hard clip — no bleeding into TOC column */
}

/* ── Sticky right TOC ── */
#toc-nav { display: block; } /* override nav { display:flex } from global nav styles */

.page-toc {
    position: sticky;
    top: 124px; /* 60px global nav + 48px tabs + 16px breathing room */
    background: var(--bg); /* opaque so scrolled content can't bleed through */
    z-index: 5;
}
.toc-heading {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 0.75rem;
    white-space: nowrap;
}
.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--border);
}
.toc-item { margin: 0; }
.toc-link {
    display: block;
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
    color: var(--muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    margin-left: -1px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.toc-link:hover { color: var(--text); }
.toc-link.toc-active {
    color: var(--cyan);
    border-left-color: var(--cyan);
}

/* Hide TOC on narrow screens */
@media (max-width: 1080px) {
    .subpage-layout {
        grid-template-columns: 1fr;
        padding: 2rem 1.5rem;
    }
    .page-toc { display: none; }
}

/* ── Markdown Content ── */
.content-md h2 { margin-top: 2rem; margin-bottom: 1rem; font-size: 1.5rem; }
.content-md p { margin-bottom: 1rem; color: var(--muted); }
.content-md ul, .content-md ol { margin-bottom: 1rem; padding-left: 1.5rem; color: var(--muted); }
.content-md li { margin-bottom: 0.5rem; }

/* Inline images in markdown sub-pages must scale to the column.
   Wide diagrams (e.g. the Matrix-Toolbox layout card, 2359×1819 px)
   would otherwise overflow the grid and clip on the right. Image is
   clickable too — opens the full-resolution original in a new tab
   when the column-fitted version is too small to read details. */
.content-md img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: 8px;
    cursor: zoom-in;
}
.content-md blockquote {
    margin: 1.5rem 0;
    padding: 0.8rem 1.2rem;
    border-left: 4px solid var(--cyan);
    background: var(--bg2);
    border-radius: 0 8px 8px 0;
    color: var(--text);
    font-style: italic;
}
.content-md blockquote p {
    margin-bottom: 0;
    color: var(--text);
}
.content-md pre {
    overflow-x: auto;  /* code blocks scroll horizontally, never overflow grid column */
    margin-bottom: 1.25rem;
}

/* ── Tabellen ──
   Es gab dafuer bis zum 10.09.2026 keine einzige Regel: Markdown
   lieferte ein blankes <table>, und der Browser zeichnete seine
   Vorgabe — helle Linien, kein Innenabstand, und auf schmalen
   Fenstern breiter als die Spalte. Eine fuenfspaltige Tabelle schob
   damit die ganze Seite zur Seite.

   Dieselbe Loesung wie beim Code-Block darueber: rollen, nie
   ueberlaufen. `display: block` ist noetig, damit `overflow-x`
   ueberhaupt greift — ein <table> ignoriert es sonst. */
.content-md table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.content-md th,
.content-md td {
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.content-md th {
    background: var(--bg2);
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
}
.content-md td { color: var(--muted); }
/* Zeilen, die nur eine fette Ueberschrift tragen (Zwischentitel in
   einer Messtabelle), sollen nicht wie Daten aussehen. */
.content-md td:empty { border-left: none; border-right: none; }
.content-md code {
    font-family: var(--font-mono);
    background: rgba(6,182,212,0.1);
    color: var(--cyan);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}
.content-md pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* ── Mermaid ── */
.mermaid {
    padding: 2rem;
    border-radius: var(--radius);
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    border: 1px solid var(--border);
    background: transparent;
}

/* ── Footer ── */
footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 2.5rem 2rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; }
.footer-logo span { font-family: var(--font-mono); font-weight: 700; }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy { color: var(--muted); font-size: 0.8rem; width: 100%; text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ── Recipes page ─────────────────────────────────────────────────────────── */

#recipes { padding: 4rem 2rem; }
#recipes .section-inner { max-width: 1200px; margin: 0 auto; }
#recipes .section-title { font-size: 2rem; font-weight: 800; margin-bottom: 2.5rem; }

/* ── Examples index — card grid ───────────────────────────────────── */

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.example-card {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.example-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: 0 8px 20px rgba(6,182,212,0.10);
}

.example-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg);
  overflow: hidden;
}
.example-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Static-raster cycling: idle shows the OUTPUT (the result is the
   interesting bit — many recipes share an input fixture, so showing
   inputs at rest produced repetitive thumbnails). On hover/focus,
   the output briefly fades out so the input below shows through —
   keeps the "before/after" pairing visible without forcing it.

   DOM order is <ba-input> then <ba-output>, both absolutely
   positioned, so ba-output stacks on top by default. We animate
   *ba-output's opacity* to reveal the input below it.

   Why hover-only: with 30+ cards on the index, having every card
   auto-cycle made the whole page feel restless. Animated content
   (anim_* outputs and similar) still plays — that's intentional
   demo material — but the cheaper "before-after" cycling now
   only fires on intent. */
.example-thumb .ba-output {
  opacity: 1;
  transition: opacity 0.4s ease-in-out;
}
.example-card:hover .example-thumb .ba-output,
.example-card:focus-within .example-thumb .ba-output {
  animation: ba-reveal 6s ease-in-out infinite;
}
@keyframes ba-reveal {
   0%   { opacity: 1; }
  20%   { opacity: 0; }
  80%   { opacity: 0; }
  100%  { opacity: 1; }
}

/* Vector & animated thumbs — show one image, no cycling. SVGs need
   contain to avoid weird crops; animations take whatever space the
   container gives. */
.example-thumb.vector img {
  object-fit: contain;
  background: #fff;
}

.example-meta {
  padding: 0.9rem 1rem 1rem;
}
.example-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
  margin: 0 0 0.35rem;
  line-height: 1.3;
}
.example-desc {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.recipe-back {
  color: var(--muted);
  text-decoration: none;
  font-family: monospace;
  font-size: 0.85rem;
}
.recipe-back:hover { color: var(--cyan); }


.recipe-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.recipe-header {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.recipe-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.4rem;
}

.recipe-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.recipe-body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Input + output images in a horizontal row */
.recipe-images {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.recipe-image-slot {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 140px;
  max-width: 260px;
}

.recipe-image-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.recipe-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: zoom-in;
  display: block;
}

/* Script block */
.recipe-script-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.recipe-script pre {
  margin: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow-x: auto;
}

/* Light theme: swap hljs github-dark → github-light colours */
[data-theme="light"] .hljs {
  background: var(--bg3);
  color: #24292f;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  #hero { grid-template-columns: 1fr; padding: 3rem 1.5rem; gap: 2.5rem; }
  .hero-screenshot { order: -1; }
}
@media (max-width: 600px) {
  nav { padding: 0 1rem; }
  .nav-links > a:not(.btn-nav) { display: none; }
  footer { text-align: center; }
  .footer-inner { justify-content: center; }
}

/* ── Produktübersicht: Kopfbereich mit Symbolbild ────────────────────────────
   Zweispaltig, solange Platz ist: Text links, Bild rechts. Darunter gestapelt.
   Das Bild trägt keine Information — deshalb alt="" statt einer erfundenen
   Beschreibung, die ein Bildschirmleser vorlesen müsste. width/height stehen
   im Markup, damit beim Laden nichts springt. */
.products-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.products-hero-text { min-width: 0; }
.products-hero-img {
  display: block;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  border: 1px solid var(--border);
}
.products-hero-img img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 860px) {
  .products-hero { grid-template-columns: 1fr; gap: 1.75rem; }
  .products-hero-img { order: -1; }
}
