// ────────────────────────────────────────────────────────────────────
// Vorgeschlagene Gliederung
// ────────────────────────────────────────────────────────────────────
// Aufbau nach deutschem Medizin-Curriculum: Vorklinik → Klinik → Querschnitt.
// Sektionen sind die großen Fächer, Kategorien die typischen Themenblöcke,
// in denen Eselsbrücken erfahrungsgemäß am dichtesten vorkommen.
//
// Vorklinik
//   • Anatomie        – Bewegungsapparat, Innere Organe, Neuroanatomie, Gefäße & Herz, Kopf & Hals
//   • Physiologie     – Herz-Kreislauf, Atmung, Niere, GIT, Endokrin, Blut & Immun
//   • Biochemie       – Aminosäuren, Stoffwechselwege, Vitamine, Hormone
//   • Histo & Embryo  – Gewebe, Keimblätter, Organogenese
//
// Klinik
//   • Innere Medizin  – Kardio, Pulmo, Gastro, Nephro, Endokrin, Hämato
//   • Chirurgie       – Allgemein, Unfall, Viszeral
//   • Neurologie      – ZNS, PNS, Hirnnerven, Klinik
//   • Pharmakologie   – Kardio, Antibiotika, Antidote, Schmerz
//   • Mikrobiologie   – Bakterien, Viren, Pilze, Parasiten
//   • Pädiatrie       – Entwicklung, Impfungen, Notfälle
//
// Querschnitt
//   • Notfallmedizin  – ABCDE, Reanimation, Trauma
//   • Klinische Untersuchung – Inspektion, Auskultation, Reflexe
//   • Labor & Diagnostik – BB, Differential, Bildgebung
// ────────────────────────────────────────────────────────────────────

const SECTIONS = [
  // ─── Vorklinik ───────────────────────────────────────────────
  {
    id: "anatomie",
    title: "Anatomie",
    group: "Vorklinik",
    blurb: "Vom Knochen bis zur Hirnnervenbahn — alles, was du im Präpkurs siehst.",
    categories: [
      { id: "bewegung", title: "Bewegungsapparat" },
      { id: "innere",   title: "Innere Organe" },
      { id: "neuro",    title: "Neuroanatomie" },
      { id: "gefaesse", title: "Gefäße & Herz" },
      { id: "kopf",     title: "Kopf & Hals" },
    ],
  },
  {
    id: "physio",
    title: "Physiologie",
    group: "Vorklinik",
    blurb: "Wie der Körper funktioniert — von der Zelle bis zum Organsystem.",
    categories: [
      { id: "herzkreis", title: "Herz-Kreislauf" },
      { id: "atmung",    title: "Atmung" },
      { id: "niere",     title: "Niere & Wasserhaushalt" },
      { id: "git",       title: "Gastrointestinal" },
      { id: "endokrin",  title: "Endokrinologie" },
      { id: "blut",      title: "Blut & Immun" },
    ],
  },
  {
    id: "biochem",
    title: "Biochemie",
    group: "Vorklinik",
    blurb: "Stoffwechselwege ohne Tränen.",
    categories: [
      { id: "aminos",   title: "Aminosäuren" },
      { id: "zyklen",   title: "Zyklen & Wege" },
      { id: "vitamine", title: "Vitamine" },
      { id: "hormone",  title: "Hormone" },
    ],
  },
  {
    id: "histo",
    title: "Histo & Embryo",
    group: "Vorklinik",
    blurb: "Gewebe und Entwicklung — die Basis fürs Verständnis.",
    categories: [
      { id: "gewebe",      title: "Gewebearten" },
      { id: "keimblaetter",title: "Keimblätter" },
      { id: "organogenese",title: "Organogenese" },
    ],
  },

  // ─── Klinik ──────────────────────────────────────────────────
  {
    id: "innere",
    title: "Innere Medizin",
    group: "Klinik",
    blurb: "Das größte Fach — kompakt nach Organsystem sortiert.",
    categories: [
      { id: "kardio",   title: "Kardiologie" },
      { id: "pulmo",    title: "Pneumologie" },
      { id: "gastro",   title: "Gastroenterologie" },
      { id: "nephro",   title: "Nephrologie" },
      { id: "endo",     title: "Endokrinologie" },
      { id: "haemato",  title: "Hämatologie" },
    ],
  },
  {
    id: "chirurgie",
    title: "Chirurgie",
    group: "Klinik",
    blurb: "Was im OP und auf Station wirklich gefragt wird.",
    categories: [
      { id: "allgemein", title: "Allgemeinchirurgie" },
      { id: "unfall",    title: "Unfallchirurgie" },
      { id: "viszeral",  title: "Viszeralchirurgie" },
    ],
  },
  {
    id: "neuro-klinik",
    title: "Neurologie",
    group: "Klinik",
    blurb: "Hirnnerven, Reflexe, Syndrome.",
    categories: [
      { id: "hirnnerven", title: "Hirnnerven" },
      { id: "zns",        title: "ZNS-Erkrankungen" },
      { id: "pns",        title: "Periphere Nerven" },
    ],
  },
  {
    id: "pharma",
    title: "Pharmakologie",
    group: "Klinik",
    blurb: "Wirkstoffe, Nebenwirkungen, Antidote.",
    categories: [
      { id: "kardio",    title: "Kardiovaskulär" },
      { id: "antibio",   title: "Antibiotika" },
      { id: "antidote",  title: "Antidote" },
      { id: "schmerz",   title: "Analgesie" },
    ],
  },
  {
    id: "mikro",
    title: "Mikrobiologie",
    group: "Klinik",
    blurb: "Erreger erkennen, einordnen, therapieren.",
    categories: [
      { id: "bakterien", title: "Bakterien" },
      { id: "viren",     title: "Viren" },
      { id: "pilze",     title: "Pilze" },
      { id: "parasiten", title: "Parasiten" },
    ],
  },
  {
    id: "paedi",
    title: "Pädiatrie",
    group: "Klinik",
    blurb: "Vom Neugeborenen bis zum Jugendlichen.",
    categories: [
      { id: "entwicklung", title: "Entwicklung" },
      { id: "impfungen",   title: "Impfungen" },
      { id: "notfaelle",   title: "Pädiatrische Notfälle" },
    ],
  },

  // ─── Querschnitt ─────────────────────────────────────────────
  {
    id: "notfall",
    title: "Notfallmedizin",
    group: "Querschnitt",
    blurb: "Was du am Bett & im Schockraum sofort wissen musst.",
    categories: [
      { id: "abcde",   title: "ABCDE & Reanimation" },
      { id: "trauma",  title: "Trauma" },
      { id: "scores",  title: "Scores & Klassifikationen" },
    ],
  },
  {
    id: "untersuchung",
    title: "Untersuchung",
    group: "Querschnitt",
    blurb: "Klinische Untersuchung — strukturiert merken.",
    categories: [
      { id: "inspektion",  title: "Inspektion" },
      { id: "auskultation",title: "Auskultation" },
      { id: "reflexe",     title: "Reflexe" },
    ],
  },
];

// ────────────────────────────────────────────────────────────────────
// Eselsbrücken
// Felder: id, section, category, title, mnemonic, expansion[[k,v]], note, tags
// ────────────────────────────────────────────────────────────────────
const MNEMONICS = [
  {
    id: "m-handwurzel",
    section: "anatomie", category: "bewegung",
    title: "Handwurzelknochen",
    mnemonic: "Es liegt ein Kahn im Mondenschein dreieckig, erbsengroß am Bein. Vieleck groß, Vieleck klein, der Kopf, der muss am Haken sein.",
    expansion: [
      ["Kahn",          "Os scaphoideum"],
      ["Mond",          "Os lunatum"],
      ["Dreieckig",     "Os triquetrum"],
      ["Erbsengroß",    "Os pisiforme"],
      ["Vieleck groß",  "Os trapezium"],
      ["Vieleck klein", "Os trapezoideum"],
      ["Kopf",          "Os capitatum"],
      ["Haken",         "Os hamatum"],
    ],
    note: "Reihenfolge: proximale Reihe radial → ulnar, dann distale Reihe radial → ulnar.",
    tags: ["Hand", "Knochen", "Klassiker"],
    updated: "vor 3 Tagen",
    author: "L. Khoshnaw",
  },
  {
    id: "m-hirnnerven",
    section: "neuro-klinik", category: "hirnnerven",
    title: "Die 12 Hirnnerven",
    mnemonic: "Onkel Otto orgelt täglich am Abend frische Vesperbrote — Gerd hat viel Aufwand.",
    expansion: [
      ["Onkel",   "I — N. olfactorius"],
      ["Otto",    "II — N. opticus"],
      ["orgelt",  "III — N. oculomotorius"],
      ["täglich", "IV — N. trochlearis"],
      ["am",      "V — N. trigeminus"],
      ["Abend",   "VI — N. abducens"],
      ["frische", "VII — N. facialis"],
      ["Vesperbrote","VIII — N. vestibulocochlearis"],
      ["Gerd",    "IX — N. glossopharyngeus"],
      ["hat",     "X — N. vagus"],
      ["viel",    "XI — N. accessorius"],
      ["Aufwand", "XII — N. hypoglossus"],
    ],
    note: "Sensibel/motorisch/gemischt: „Some Say Marry Money But My Brother Says Big Brains Matter More“.",
    tags: ["Hirnnerven", "Kranial", "Klassiker"],
    updated: "letzte Woche",
    author: "M. Reiner",
  },
  {
    id: "m-aestesc",
    section: "anatomie", category: "gefaesse",
    title: "Äste der A. carotis externa",
    mnemonic: "Theo Lingiert Frech Ohne Anstand Posaunend Süßes Maul.",
    expansion: [
      ["Theo",     "A. thyroidea superior"],
      ["Lingiert", "A. lingualis"],
      ["Frech",    "A. facialis"],
      ["Ohne",     "A. occipitalis"],
      ["Anstand",  "A. auricularis posterior"],
      ["Posaunend","A. pharyngea ascendens"],
      ["Süßes",    "A. temporalis superficialis"],
      ["Maul",     "A. maxillaris"],
    ],
    note: "Reihenfolge ventral → dorsal entlang des Verlaufs.",
    tags: ["Gefäße", "Kopf"],
    updated: "gestern",
    author: "M. Reiner",
  },
  {
    id: "m-ekg-achse",
    section: "physio", category: "herzkreis",
    title: "EKG-Lagetyp",
    mnemonic: "Indianer Lieben Im Sommer Regen.",
    expansion: [
      ["Indianer-/Überdrehter Linkstyp", "−90° bis −30°"],
      ["Linkstyp",       "−30° bis +30°"],
      ["Indifferenztyp", "+30° bis +60°"],
      ["Steiltyp",       "+60° bis +90°"],
      ["Rechtstyp",      "+90° bis +120°"],
    ],
    note: "Merkbild: 5 Lagetypen, im Uhrzeigersinn von links oben nach rechts unten.",
    tags: ["EKG", "Herz"],
    updated: "vor 2 Wochen",
    author: "S. Aydın",
  },
  {
    id: "m-glasgow",
    section: "notfall", category: "scores",
    title: "Glasgow Coma Scale",
    mnemonic: "Augen, Verbal, Motorik — 4 · 5 · 6.",
    expansion: [
      ["Augenöffnen",       "max. 4 Punkte"],
      ["Verbale Antwort",   "max. 5 Punkte"],
      ["Motorische Reaktion","max. 6 Punkte"],
    ],
    note: "Summe min. 3, max. 15. Ab GCS ≤ 8 → Atemwegssicherung erwägen.",
    tags: ["GCS", "Schädel-Hirn-Trauma"],
    updated: "vor 5 Tagen",
    author: "L. Khoshnaw",
  },
  {
    id: "m-essentielle",
    section: "biochem", category: "aminos",
    title: "Essentielle Aminosäuren",
    mnemonic: "PriVaTe TIM HaLL.",
    expansion: [
      ["P", "Phenylalanin"],
      ["V", "Valin"],
      ["T", "Threonin"],
      ["T", "Tryptophan"],
      ["I", "Isoleucin"],
      ["M", "Methionin"],
      ["H", "Histidin (semi-essentiell)"],
      ["L", "Leucin"],
      ["L", "Lysin"],
    ],
    note: "Histidin ist v. a. im Kindesalter essentiell.",
    tags: ["Aminosäuren", "Ernährung"],
    updated: "vor einem Monat",
    author: "S. Aydın",
  },
  {
    id: "m-betablocker",
    section: "pharma", category: "kardio",
    title: "β-Blocker — Kontraindikationen",
    mnemonic: "ABCDE: Asthma, Block (AV), COPD, Diabetes, Extremitäten.",
    expansion: [
      ["A", "Asthma bronchiale"],
      ["B", "AV-Block II°/III°"],
      ["C", "COPD (relativ)"],
      ["D", "Diabetes — Hypoglykämie maskiert"],
      ["E", "Extremitäten / pAVK"],
    ],
    note: "Bei dekompensierter Herzinsuffizienz vorsichtig auftitrieren.",
    tags: ["β-Blocker", "Kontraindikation"],
    updated: "vor 4 Tagen",
    author: "M. Reiner",
  },
  {
    id: "m-antidote",
    section: "pharma", category: "antidote",
    title: "Antidote — Klassiker",
    mnemonic: "Heparin → Protamin · Cumarin → Vitamin K · Paracetamol → ACC · Benzo → Flumazenil · Opioid → Naloxon.",
    expansion: [
      ["Heparin",        "Protaminsulfat"],
      ["Cumarine",       "Vitamin K / PPSB"],
      ["Paracetamol",    "N-Acetylcystein"],
      ["Benzodiazepine", "Flumazenil"],
      ["Opioide",        "Naloxon"],
      ["Methanol",       "Fomepizol / Ethanol"],
    ],
    note: "Bei Mischintoxikation Reihenfolge nach klinischer Priorität.",
    tags: ["Antidot", "Notfall"],
    updated: "heute",
    author: "L. Khoshnaw",
  },
  {
    id: "m-abcde",
    section: "notfall", category: "abcde",
    title: "ABCDE-Schema",
    mnemonic: "Airway, Breathing, Circulation, Disability, Exposure.",
    expansion: [
      ["A — Airway",     "Atemwege frei? HWS-Schutz."],
      ["B — Breathing",  "Atmung suffizient? SpO₂, Auskultation."],
      ["C — Circulation","Puls, RR, Rekap-Zeit, Blutung stoppen."],
      ["D — Disability", "Bewusstsein (GCS), Pupillen, BZ."],
      ["E — Exposure",   "Entkleiden, Wärmeerhalt, ganzheitliche Inspektion."],
    ],
    note: "Reihenfolge ist verbindlich — keinen Schritt überspringen.",
    tags: ["Notfall", "Reanimation", "Klassiker"],
    updated: "vor 2 Tagen",
    author: "L. Khoshnaw",
  },
];

window.SECTIONS = SECTIONS;
window.MNEMONICS = MNEMONICS;
