/* ============================================================================
 * MAINFRAME KNOWLEDGE REPOSITORY  ·  STYLES
 * Eigenständiges Design-System (lädt NICHT main.css), damit die „Innenwelt“
 * des Mainframes sauber vom blauen Portfolio getrennt bleibt.
 * Design-Sprache: z/OS Operations Center × modernes Dev-Portal.
 * ==========================================================================*/

:root {
  /* Flächen (nahe Schwarz, leicht grün getönt) */
  --mf-ink:       #030a06;
  --mf-screen:    #06120c;
  --mf-panel:     #0a1611;
  --mf-panel-2:   #0d1f17;
  --mf-panel-3:   #113026;

  /* Linien */
  --mf-line:        rgba(52, 224, 122, .14);
  --mf-line-strong: rgba(52, 224, 122, .30);

  /* Grün-Familie (Terminal) */
  --mf-term:      #34e07a;
  --mf-term-soft: #5ee89a;
  --mf-term-text: #cdeed8;
  --mf-term-dim:  #6fae87;
  --mf-amber:     #ffb454;

  /* Text */
  --mf-fg:      #dfeee6;
  --mf-fg-mut:  #93b7a4;
  --mf-fg-faint:#6c8b7b;

  /* Fokus (kühles Blau als Kontrast zum Grün – gute Sichtbarkeit) */
  --mf-focus: #79b2ff;

  --mf-r:    16px;
  --mf-r-sm: 11px;
  --mf-r-xs: 9px;

  --mf-ease: cubic-bezier(.22, .61, .36, 1);
  --mf-glow: 0 0 40px -18px rgba(52, 224, 122, .5);
  --mf-shadow: 0 24px 60px -30px rgba(3, 10, 6, .9);

  --mf-sans: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mf-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body.mf {
  min-height: 100vh;
  font-family: var(--mf-sans);
  color: var(--mf-fg);
  background: var(--mf-screen);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Ambient-Hintergrund: sanfter grüner Schein + sehr feine Scanlines */
body.mf::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 80% at 82% -8%, rgba(52, 224, 122, .12), transparent 55%),
    radial-gradient(90% 60% at 0% 4%, rgba(52, 224, 122, .06), transparent 60%),
    var(--mf-ink);
}
body.mf::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(52, 224, 122, .035) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen; opacity: .5;
}

a { color: inherit; text-decoration: none; }
::selection { background: rgba(52, 224, 122, .3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--mf-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.mf-ico { width: 1em; height: 1em; flex: none; }

/* ═══════════════════════════════════════════════════════════ TOPBAR */
.mf-topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 0 clamp(16px, 4vw, 40px);
  height: 60px;
  background: rgba(6, 18, 12, .72);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--mf-line);
}
.mf-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mf-mono); font-weight: 600;
  letter-spacing: .06em; color: var(--mf-fg);
  font-size: 14px; white-space: nowrap;
}
.mf-brand .mf-brand-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--mf-term);
  box-shadow: 0 0 12px var(--mf-term);
  animation: mf-pulse 2s var(--mf-ease) infinite;
}
.mf-brand b { color: var(--mf-term); font-weight: 600; }

.mf-topbar-spacer { flex: 1; }

/* Kompakte Suche in der Topbar */
.mf-top-search { display: flex; }
.mf-top-search form {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 8px 0 12px;
  background: var(--mf-panel-2);
  border: 1px solid var(--mf-line);
  border-radius: 999px;
  transition: border-color .2s var(--mf-ease), box-shadow .2s var(--mf-ease);
  min-width: 210px;
}
.mf-top-search form:focus-within {
  border-color: var(--mf-line-strong);
  box-shadow: 0 0 0 3px rgba(52, 224, 122, .12);
}
.mf-top-search .mf-ico { color: var(--mf-term-dim); font-size: 16px; }
.mf-top-search input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--mf-fg); font-family: var(--mf-sans); font-size: 13.5px;
}
.mf-top-search input::placeholder { color: var(--mf-fg-faint); }
.mf-top-search button {
  border: none; background: none; color: var(--mf-term);
  font-family: var(--mf-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.mf-top-search button:hover { color: var(--mf-term-soft); }

.mf-portfolio-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mf-mono); font-size: 12px; letter-spacing: .05em;
  color: var(--mf-fg-mut); white-space: nowrap;
  padding: 8px 12px; border-radius: var(--mf-r-xs);
  border: 1px solid var(--mf-line); transition: all .2s var(--mf-ease);
}
.mf-portfolio-link:hover { color: var(--mf-fg); border-color: var(--mf-line-strong); background: var(--mf-panel); }
.mf-portfolio-link .mf-ico { transform: rotate(180deg); font-size: 14px; }

/* ═══════════════════════════════════════════════════════ BREADCRUMB */
.mf-crumbs-bar {
  padding: 12px clamp(16px, 4vw, 40px) 0;
  max-width: 1120px; margin: 0 auto; width: 100%;
}
.mf-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-family: var(--mf-mono); font-size: 12px; color: var(--mf-fg-faint);
}
.mf-bc-link { color: var(--mf-fg-mut); padding: 3px 4px; border-radius: 5px; transition: color .18s; }
.mf-bc-link:hover { color: var(--mf-term); }
.mf-bc-current { color: var(--mf-fg); padding: 3px 4px; }
.mf-bc-sep { display: inline-flex; color: var(--mf-fg-faint); opacity: .55; }
.mf-bc-sep .mf-ico { font-size: 13px; }

/* ═════════════════════════════════════════════════════════════ MAIN */
main.mf-main {
  max-width: 1120px; margin: 0 auto; width: 100%;
  padding: 18px clamp(16px, 4vw, 40px) 96px;
}
#mf-app { opacity: 0; transform: translateY(6px); }
#mf-app.mf-in {
  opacity: 1; transform: none;
  transition: opacity .4s var(--mf-ease), transform .4s var(--mf-ease);
}

/* ═════════════════════════════════════════════════════════════ HERO */
.mf-hero {
  position: relative;
  padding: clamp(30px, 6vw, 64px) clamp(22px, 4vw, 48px);
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-r);
  background:
    radial-gradient(120% 130% at 12% 0%, rgba(52, 224, 122, .10), transparent 55%),
    var(--mf-panel);
  box-shadow: var(--mf-shadow);
  overflow: hidden;
}
.mf-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(52, 224, 122, .04) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen; opacity: .45;
}
.mf-hero-eyebrow {
  display: inline-block; font-family: var(--mf-mono); font-size: 12px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--mf-term-dim);
  margin-bottom: 18px;
}
.mf-hero-title {
  font-family: var(--mf-sans); font-weight: 700;
  font-size: clamp(30px, 6vw, 54px); line-height: 1.05;
  letter-spacing: -.02em; color: #fff;
  text-shadow: 0 0 30px rgba(52, 224, 122, .18);
}
.mf-hero-sub {
  margin-top: 16px; max-width: 54ch;
  color: var(--mf-fg-mut); font-size: clamp(14px, 2vw, 16px);
}
.mf-hero-search {
  margin-top: 28px; display: flex; align-items: center; gap: 10px;
  max-width: 560px; padding: 6px 6px 6px 16px;
  background: var(--mf-panel-2);
  border: 1px solid var(--mf-line-strong);
  border-radius: 999px;
  transition: box-shadow .2s var(--mf-ease), border-color .2s var(--mf-ease);
}
.mf-hero-search:focus-within {
  border-color: var(--mf-term);
  box-shadow: 0 0 0 4px rgba(52, 224, 122, .14), var(--mf-glow);
}
.mf-hero-search-ico { color: var(--mf-term); font-size: 20px; }
.mf-hero-search input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--mf-fg); font-size: 15px; font-family: var(--mf-sans);
}
.mf-hero-search input::placeholder { color: var(--mf-fg-faint); }
.mf-hero-search-btn {
  border: none; cursor: pointer;
  padding: 11px 22px; border-radius: 999px;
  background: linear-gradient(135deg, var(--mf-term), #1fbf62);
  color: #04130a; font-weight: 600; font-size: 13px;
  font-family: var(--mf-mono); letter-spacing: .04em;
  transition: box-shadow .2s var(--mf-ease), transform .12s var(--mf-ease);
}
.mf-hero-search-btn:hover { box-shadow: 0 8px 22px -8px rgba(52, 224, 122, .8); }
.mf-hero-search-btn:active { transform: translateY(1px); }

.mf-hero-stats {
  margin-top: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  font-family: var(--mf-mono); font-size: 12.5px; color: var(--mf-fg-mut);
}
.mf-hero-stats strong { color: var(--mf-term); font-weight: 600; }
.mf-dotsep { width: 4px; height: 4px; border-radius: 50%; background: var(--mf-fg-faint); opacity: .6; }
.mf-hero-live { display: inline-flex; align-items: center; gap: 7px; color: var(--mf-term-dim); }
.mf-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mf-term);
  box-shadow: 0 0 10px var(--mf-term); animation: mf-pulse 1.8s var(--mf-ease) infinite;
}

/* ══════════════════════════════════════════════════════════ SECTION */
.mf-section { margin-top: 42px; }
.mf-section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--mf-line); padding-bottom: 12px;
}
.mf-section-title {
  font-family: var(--mf-mono); font-size: 15px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; color: var(--mf-fg);
}
.mf-section-title::before { content: "// "; color: var(--mf-term-dim); }
.mf-section-note { font-family: var(--mf-mono); font-size: 12px; color: var(--mf-fg-faint); }

/* ═════════════════════════════════════════════════════ CATEGORY GRID */
.mf-cat-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.mf-cat-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 22px;
  background: var(--mf-panel);
  border: 1px solid var(--mf-line);
  border-radius: var(--mf-r);
  overflow: hidden;
  transition: transform .25s var(--mf-ease), border-color .25s var(--mf-ease),
              box-shadow .25s var(--mf-ease), background .25s var(--mf-ease);
}
.mf-cat-glow {
  position: absolute; inset: -1px; pointer-events: none; opacity: 0;
  background: radial-gradient(80% 60% at 20% 0%, rgba(52, 224, 122, .16), transparent 60%);
  transition: opacity .3s var(--mf-ease);
}
.mf-cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--mf-line-strong);
  background: var(--mf-panel-2);
  box-shadow: var(--mf-glow), var(--mf-shadow);
}
.mf-cat-card:hover .mf-cat-glow { opacity: 1; }
.mf-cat-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: var(--mf-r-sm);
  background: rgba(52, 224, 122, .1);
  border: 1px solid var(--mf-line);
  color: var(--mf-term); font-size: 22px;
  transition: box-shadow .25s var(--mf-ease);
}
.mf-cat-card:hover .mf-cat-icon { box-shadow: 0 0 22px -6px rgba(52, 224, 122, .7); }
.mf-cat-card[data-accent="amber"] .mf-cat-icon { color: var(--mf-amber); background: rgba(255, 180, 84, .1); }
.mf-cat-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mf-cat-title {
  font-family: var(--mf-mono); font-size: 17px; font-weight: 600;
  letter-spacing: .01em; color: #fff;
}
.mf-cat-blurb { color: var(--mf-fg-mut); font-size: 13.5px; line-height: 1.55; }
.mf-cat-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--mf-line);
}
.mf-cat-count {
  font-family: var(--mf-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--mf-term-dim);
}
.mf-cat-go { color: var(--mf-fg-faint); font-size: 16px; transition: transform .25s var(--mf-ease), color .25s; }
.mf-cat-card:hover .mf-cat-go { transform: translateX(4px); color: var(--mf-term); }

/* ══════════════════════════════════════════════════════ CAT HEADER */
.mf-cat-header {
  display: flex; align-items: center; gap: 20px;
  padding: clamp(22px, 4vw, 32px);
  background:
    radial-gradient(120% 130% at 6% 0%, rgba(52, 224, 122, .09), transparent 55%),
    var(--mf-panel);
  border: 1px solid var(--mf-line); border-radius: var(--mf-r);
  box-shadow: var(--mf-shadow);
}
.mf-cat-header-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: var(--mf-r-sm); flex: none;
  background: rgba(52, 224, 122, .1); border: 1px solid var(--mf-line);
  color: var(--mf-term); font-size: 28px; box-shadow: 0 0 26px -8px rgba(52, 224, 122, .6);
}
.mf-cat-header[data-accent="amber"] .mf-cat-header-icon { color: var(--mf-amber); background: rgba(255, 180, 84, .1); }
.mf-cat-header-text { flex: 1; min-width: 0; }
.mf-cat-header-eyebrow {
  font-family: var(--mf-mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--mf-term-dim);
}
.mf-cat-header-title {
  font-family: var(--mf-sans); font-weight: 700; letter-spacing: -.01em;
  font-size: clamp(24px, 4vw, 34px); color: #fff; margin: 4px 0;
}
.mf-cat-header-blurb { color: var(--mf-fg-mut); font-size: 14.5px; max-width: 62ch; }
.mf-cat-header-count {
  font-family: var(--mf-mono); font-size: 13px; color: var(--mf-term-dim);
  padding: 6px 12px; border: 1px solid var(--mf-line); border-radius: 999px;
  align-self: flex-start; white-space: nowrap;
}

/* ═════════════════════════════════════════════════════════ TOOLBAR */
.mf-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 24px 0 16px;
}
.mf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mf-chip {
  font-family: var(--mf-mono); font-size: 12px; letter-spacing: .03em;
  color: var(--mf-fg-mut); cursor: pointer;
  padding: 6px 13px; border-radius: 999px;
  background: var(--mf-panel); border: 1px solid var(--mf-line);
  transition: all .18s var(--mf-ease);
}
.mf-chip:hover { color: var(--mf-fg); border-color: var(--mf-line-strong); }
.mf-chip.is-on {
  color: #04130a; background: var(--mf-term); border-color: transparent;
  box-shadow: 0 0 16px -4px rgba(52, 224, 122, .7);
}
.mf-sort {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mf-mono); font-size: 12px; color: var(--mf-fg-faint);
}
.mf-sort select {
  font-family: var(--mf-mono); font-size: 12.5px; color: var(--mf-fg);
  background: var(--mf-panel-2); border: 1px solid var(--mf-line);
  border-radius: var(--mf-r-xs); padding: 8px 12px; cursor: pointer; outline: none;
}
.mf-sort select:focus-visible { border-color: var(--mf-focus); }

/* ═══════════════════════════════════════════════════════════ LISTE */
.mf-list { display: flex; flex-direction: column; gap: 10px; }
.mf-row {
  position: relative; display: grid; align-items: center;
  grid-template-columns: 40px 1fr auto 20px; gap: 16px;
  padding: 16px 18px;
  background: var(--mf-panel);
  border: 1px solid var(--mf-line);
  border-left: 2px solid transparent;
  border-radius: var(--mf-r-sm);
  transition: background .2s var(--mf-ease), border-color .2s var(--mf-ease),
              transform .18s var(--mf-ease);
}
.mf-row:hover {
  background: var(--mf-panel-2);
  border-color: var(--mf-line-strong);
  border-left-color: var(--mf-term);
  transform: translateX(3px);
}
.mf-row-type {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--mf-r-xs);
  background: rgba(52, 224, 122, .08); border: 1px solid var(--mf-line);
  color: var(--mf-term-dim); font-size: 18px;
}
.mf-row:hover .mf-row-type { color: var(--mf-term); }
.mf-row-main { min-width: 0; }
.mf-row-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mf-row-title {
  font-family: var(--mf-mono); font-size: 15px; font-weight: 600; color: #fff;
}
.mf-row-desc {
  display: block; margin-top: 3px; color: var(--mf-fg-mut); font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62ch;
}
.mf-row-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mf-row-meta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  font-family: var(--mf-mono); font-size: 11.5px; white-space: nowrap;
}
.mf-row-cat { color: var(--mf-term-dim); }
.mf-row-date { color: var(--mf-fg-faint); }
.mf-row-go { color: var(--mf-fg-faint); font-size: 16px; transition: transform .2s var(--mf-ease), color .2s; }
.mf-row:hover .mf-row-go { color: var(--mf-term); transform: translateX(3px); }

/* Tags & Difficulty */
.mf-tag {
  font-family: var(--mf-mono); font-size: 10.5px; letter-spacing: .04em;
  color: var(--mf-term-dim); padding: 3px 8px; border-radius: 5px;
  background: rgba(52, 224, 122, .07); border: 1px solid var(--mf-line);
}
.mf-row-diff, .mf-meta-diff {
  font-family: var(--mf-mono); font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
  border: 1px solid currentColor; color: var(--mf-fg-faint);
}
[data-lvl="Einsteiger"]     { color: #5ee89a; }
[data-lvl="Mittel"]         { color: var(--mf-amber); }
[data-lvl="Fortgeschritten"]{ color: #ff8f6b; }

/* Programm-Badge (ersetzt bei Code-Einträgen die Schwierigkeit) */
.mf-row-pgm, .mf-meta-pgm {
  color: var(--mf-term);
  background: rgba(52, 224, 122, .07);
  text-transform: none;
}
.mf-meta-pgm { display: inline-flex; align-items: center; gap: 6px; }
.mf-meta-pgm svg { width: 13px; height: 13px; }

/* ═════════════════════════════════════════════════════════ EINTRAG */
.mf-entry { max-width: 820px; margin: 0 auto; }
.mf-entry-head { padding-bottom: 24px; border-bottom: 1px solid var(--mf-line); }
.mf-entry-kicker {
  font-family: var(--mf-mono); font-size: 12px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mf-term-dim);
}
.mf-entry-title {
  font-family: var(--mf-sans); font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(26px, 4.5vw, 40px); line-height: 1.1; color: #fff; margin: 10px 0 0;
}
.mf-entry-desc { margin-top: 14px; color: var(--mf-fg-mut); font-size: 16px; max-width: 66ch; }
.mf-entry-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px;
  font-family: var(--mf-mono); font-size: 12.5px; color: var(--mf-fg-mut);
}
.mf-meta-item { display: inline-flex; align-items: center; gap: 7px; }
.mf-meta-item .mf-ico { color: var(--mf-term-dim); font-size: 15px; }
.mf-meta-link { color: var(--mf-term-dim); }
.mf-meta-link:hover { color: var(--mf-term); }
.mf-entry-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }

.mf-entry-body { padding-top: 28px; }
.mf-entry-body > * + * { margin-top: 18px; }

/* Block-Typografie */
.mf-h2 {
  font-family: var(--mf-mono); font-size: 19px; font-weight: 600; color: #fff;
  letter-spacing: .01em; margin-top: 34px !important; padding-bottom: 8px;
  border-bottom: 1px solid var(--mf-line);
}
.mf-h2::before { content: "> "; color: var(--mf-term-dim); }
.mf-h3 { font-family: var(--mf-mono); font-size: 15.5px; font-weight: 600; color: var(--mf-term-text); margin-top: 24px !important; }
.mf-p { color: var(--mf-fg); font-size: 15.5px; line-height: 1.72; }
.mf-ul { padding-left: 22px; color: var(--mf-fg); font-size: 15.5px; line-height: 1.7; }
.mf-ul li { margin: 6px 0; }
.mf-ul li::marker { color: var(--mf-term-dim); }
.mf-inline-code {
  font-family: var(--mf-mono); font-size: .88em; color: var(--mf-term-soft);
  background: rgba(52, 224, 122, .1); border: 1px solid var(--mf-line);
  padding: 1px 6px; border-radius: 5px;
}
.mf-link { color: var(--mf-term); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(52,224,122,.4); }
.mf-link:hover { text-decoration-color: var(--mf-term); }

/* Tabelle */
.mf-table-wrap { overflow-x: auto; border: 1px solid var(--mf-line); border-radius: var(--mf-r-sm); }
.mf-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mf-table th, .mf-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--mf-line); }
.mf-table thead th {
  font-family: var(--mf-mono); font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--mf-term-dim);
  background: var(--mf-panel-2);
}
.mf-table tbody tr:last-child td { border-bottom: none; }
.mf-table tbody tr:hover { background: rgba(52, 224, 122, .04); }
.mf-table td { color: var(--mf-fg); }

/* Callout */
.mf-callout {
  display: flex; gap: 14px; padding: 16px 18px;
  border: 1px solid var(--mf-line); border-left-width: 3px;
  border-radius: var(--mf-r-sm); background: var(--mf-panel);
}
.mf-callout-ico {
  display: inline-flex; font-size: 18px; margin-top: 1px; flex: none;
}
.mf-callout-title {
  display: block; font-family: var(--mf-mono); font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px;
}
.mf-callout-body p { color: var(--mf-fg); font-size: 14.5px; line-height: 1.65; }
.mf-callout[data-tone="note"]    { border-left-color: var(--mf-focus); }
.mf-callout[data-tone="note"]    .mf-callout-ico, .mf-callout[data-tone="note"] .mf-callout-title { color: var(--mf-focus); }
.mf-callout[data-tone="tip"]     { border-left-color: var(--mf-term); }
.mf-callout[data-tone="tip"]     .mf-callout-ico, .mf-callout[data-tone="tip"] .mf-callout-title { color: var(--mf-term); }
.mf-callout[data-tone="warning"] { border-left-color: var(--mf-amber); background: rgba(255, 180, 84, .05); }
.mf-callout[data-tone="warning"] .mf-callout-ico, .mf-callout[data-tone="warning"] .mf-callout-title { color: var(--mf-amber); }

/* Bild */
.mf-figure { border: 1px solid var(--mf-line); border-radius: var(--mf-r-sm); overflow: hidden; background: var(--mf-panel); }
.mf-img { display: block; width: 100%; height: auto; }
.mf-figure figcaption {
  padding: 10px 16px; font-family: var(--mf-mono); font-size: 12px;
  color: var(--mf-fg-faint); border-top: 1px solid var(--mf-line);
}

.mf-entry-foot { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--mf-line); }
.mf-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mf-mono); font-size: 13px; color: var(--mf-term-dim);
  padding: 9px 16px; border: 1px solid var(--mf-line); border-radius: var(--mf-r-xs);
  transition: all .2s var(--mf-ease);
}
.mf-back .mf-ico { transform: rotate(180deg); }
.mf-back:hover { color: var(--mf-term); border-color: var(--mf-line-strong); background: var(--mf-panel); }

/* ═══════════════════════════════════════════════ MAINFRAME CODEBLOCK */
.mf-codeblock {
  --cb-accent: var(--mf-term);
  position: relative;
  border: 1px solid var(--mf-line-strong);
  border-radius: var(--mf-r-sm);
  background: var(--mf-ink);
  overflow: hidden;
  box-shadow: 0 0 44px -20px rgba(52, 224, 122, .45), var(--mf-shadow);
}
.mf-codeblock[data-mode="amber"] { --cb-accent: var(--mf-amber); }

.mf-cb-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(52, 224, 122, .05);
  border-bottom: 1px solid var(--mf-line);
  font-family: var(--mf-mono);
}
.mf-codeblock[data-mode="amber"] .mf-cb-bar { background: rgba(255, 180, 84, .06); }
.mf-cb-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--cb-accent); box-shadow: 0 0 10px var(--cb-accent);
  animation: mf-pulse 2.2s var(--mf-ease) infinite;
}
.mf-cb-name {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mf-term-dim);
}
.mf-codeblock[data-mode="amber"] .mf-cb-name { color: var(--mf-amber); opacity: .8; }
.mf-cb-lang {
  font-size: 10px; letter-spacing: .08em; color: #04130a;
  background: var(--cb-accent); padding: 2px 8px; border-radius: 5px; font-weight: 600;
}
.mf-cb-file {
  font-size: 11.5px; color: var(--mf-fg-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mf-cb-actions { margin-left: auto; display: flex; gap: 6px; flex: none; }
.mf-cb-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-family: var(--mf-mono); font-size: 11px; letter-spacing: .03em;
  color: var(--mf-term-dim);
  background: transparent; border: 1px solid var(--mf-line);
  padding: 5px 10px; border-radius: 7px;
  transition: all .18s var(--mf-ease);
}
.mf-cb-btn:hover { color: var(--cb-accent); border-color: var(--cb-accent); background: rgba(52, 224, 122, .06); }
.mf-cb-btn.is-copied { color: var(--cb-accent); border-color: var(--cb-accent); }
.mf-cb-ico { display: inline-flex; font-size: 14px; }
@media (max-width: 560px) { .mf-cb-lbl { display: none; } .mf-cb-file { display: none; } }

.mf-cb-scroll { position: relative; overflow: auto; }
.mf-cb-scroll.is-collapsed { max-height: 320px; overflow: hidden; }
.mf-cb-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 70px; pointer-events: none;
  background: linear-gradient(transparent, var(--mf-ink));
}
.mf-cb-scroll:not(.is-collapsed) .mf-cb-fade { display: none; }

.mf-cb-pre {
  display: flex; margin: 0; font-family: var(--mf-mono);
  font-size: 13px; line-height: 1.62; tab-size: 4;
}
.mf-cb-gutter {
  flex: none; padding: 16px 0 16px; text-align: right;
  color: var(--mf-fg-faint); opacity: .5; user-select: none;
  border-right: 1px solid var(--mf-line); background: rgba(0,0,0,.25);
}
.mf-cb-ln { display: block; padding: 0 12px; min-width: 44px; }
.mf-cb-code { display: block; padding: 16px 18px; color: var(--mf-term-text); white-space: pre; min-width: 0; }
.mf-cb-line { display: block; }
.mf-codeblock[data-mode="amber"] .mf-cb-code { color: #ffe0b3; }

/* Syntax-Token (Grün-Modus) */
.tok-comment { color: #587a66; font-style: italic; }
.tok-keyword { color: var(--mf-term-soft); font-weight: 600; }
.tok-string  { color: #b7e6c6; }
.tok-number  { color: #7fd0ff; }
.tok-attr    { color: #9be0b6; }
.tok-builtin { color: #6ee0c4; }
.tok-meta    { color: var(--mf-amber); }
.tok-punct   { color: var(--mf-term-dim); }
/* Amber-Modus */
.mf-codeblock[data-mode="amber"] .tok-comment { color: #a5825a; }
.mf-codeblock[data-mode="amber"] .tok-keyword { color: #ffc978; }
.mf-codeblock[data-mode="amber"] .tok-string  { color: #ffe6bf; }
.mf-codeblock[data-mode="amber"] .tok-number  { color: #ffd89a; }
.mf-codeblock[data-mode="amber"] .tok-attr    { color: #ffcf94; }
.mf-codeblock[data-mode="amber"] .tok-meta    { color: #ffd27a; }
.mf-codeblock[data-mode="amber"] .tok-punct   { color: #c79a63; }

/* ═════════════════════════════════════════════════════════ DOWNLOAD */
.mf-dl {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  background: var(--mf-panel); border: 1px solid var(--mf-line);
  border-radius: var(--mf-r-sm); transition: border-color .2s var(--mf-ease);
}
.mf-dl:hover { border-color: var(--mf-line-strong); }
.mf-dl-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--mf-r-xs); flex: none;
  background: rgba(52, 224, 122, .08); border: 1px solid var(--mf-line);
  color: var(--mf-term-dim); font-size: 22px;
}
.mf-dl-icon[data-kind="pdf"] { color: #ff8f6b; background: rgba(255, 143, 107, .08); }
.mf-dl-icon[data-kind="zip"] { color: var(--mf-amber); background: rgba(255, 180, 84, .08); }
.mf-dl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mf-dl-name { font-family: var(--mf-mono); font-size: 14px; font-weight: 600; color: #fff; }
.mf-dl-desc { color: var(--mf-fg-mut); font-size: 13px; }
.mf-dl-meta { font-family: var(--mf-mono); font-size: 11px; color: var(--mf-fg-faint); letter-spacing: .04em; }
.mf-dl-btn {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  font-family: var(--mf-mono); font-size: 12.5px; color: var(--mf-term);
  padding: 9px 16px; border: 1px solid var(--mf-term); border-radius: var(--mf-r-xs);
  transition: all .2s var(--mf-ease);
}
.mf-dl-btn .mf-ico { font-size: 15px; }
.mf-dl-btn:hover { background: var(--mf-term); color: #04130a; box-shadow: 0 0 22px -6px rgba(52, 224, 122, .8); }

/* ══════════════════════════════════════════════════════ SEARCH/EMPTY */
.mf-search-head { margin-bottom: 22px; }
.mf-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: 64px 20px; color: var(--mf-fg-mut);
}
.mf-empty-ico { font-size: 40px; color: var(--mf-term-dim); opacity: .6; }
.mf-empty-title { font-family: var(--mf-mono); font-size: 16px; color: var(--mf-fg); }
.mf-empty-hint { font-size: 13.5px; color: var(--mf-fg-faint); }

/* ══════════════════════════════════════════════════════════ SKELETON */
.mf-skel-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mf-skel { display: flex; flex-direction: column; gap: 10px; }
.mf-skel-row, .mf-skel-card {
  background: var(--mf-panel); border: 1px solid var(--mf-line);
  border-radius: var(--mf-r-sm); padding: 18px;
}
.mf-skel-row { display: flex; gap: 16px; align-items: center; }
.mf-skel-card { display: flex; flex-direction: column; gap: 10px; }
.mf-skel-ico { width: 40px; height: 40px; border-radius: var(--mf-r-xs); background: var(--mf-panel-3); flex: none; }
.mf-skel-ico.big { width: 46px; height: 46px; }
.mf-skel-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.mf-skel-line { height: 10px; border-radius: 4px; background: var(--mf-panel-3); }
.mf-skel-line.w40 { width: 40%; } .mf-skel-line.w50 { width: 50%; }
.mf-skel-line.w60 { width: 60%; } .mf-skel-line.w70 { width: 70%; }
.mf-skel-line.w90 { width: 90%; }
.mf-skel-row, .mf-skel-card { position: relative; overflow: hidden; }
.mf-skel-row::after, .mf-skel-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(52, 224, 122, .06), transparent);
  transform: translateX(-100%); animation: mf-shimmer 1.4s infinite;
}

/* ══════════════════════════════════════════════════════════════ BOOT */
#mf-boot {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 130% at 50% -10%, rgba(52, 224, 122, .1), transparent 60%), var(--mf-ink);
  transition: opacity .4s var(--mf-ease);
}
#mf-boot.mf-boot-out { opacity: 0; }
.mf-boot-inner {
  width: min(560px, 90vw);
  border: 1px solid var(--mf-line-strong); border-radius: var(--mf-r);
  background: var(--mf-screen); overflow: hidden;
  box-shadow: 0 0 60px -18px rgba(52, 224, 122, .45);
}
.mf-boot-bar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--mf-line); background: rgba(52, 224, 122, .05);
  font-family: var(--mf-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mf-term-dim);
}
.mf-boot-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mf-amber); box-shadow: 0 0 10px var(--mf-amber); animation: mf-pulse 1.6s infinite; }
.mf-boot-log { padding: 22px; min-height: 170px; font-family: var(--mf-mono); font-size: 12.5px; line-height: 2; }
.mf-boot-line { color: var(--mf-term); }
.mf-boot-line::after { content: ""; }

/* ══════════════════════════════════════════════════════════ MOTION */
@keyframes mf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes mf-shimmer { 100% { transform: translateX(100%); } }

/* ═════════════════════════════════════════════════════════ RESPONSIVE */
@media (max-width: 760px) {
  .mf-top-search { display: none; }
  .mf-row { grid-template-columns: 36px 1fr 18px; }
  .mf-row-meta { display: none; }
  .mf-row-desc { white-space: normal; }
  .mf-cat-header { flex-wrap: wrap; }
  .mf-cat-header-count { order: 3; }
  .mf-toolbar { flex-direction: column; align-items: stretch; }
  .mf-sort { justify-content: space-between; }
}
@media (max-width: 480px) {
  .mf-portfolio-link span { display: none; }
  .mf-hero-search { flex-wrap: wrap; border-radius: var(--mf-r); }
  .mf-hero-search-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  #mf-app { opacity: 1; transform: none; }
}
