/* Praktikums-Roadmap – Mein RUDI (v2, lebhaft + interaktiv)
   Grundlayer kommt aus /mein/style.css (Variablen, body-Gradient, Inter). */

.rm-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px 16px 72px;
}

/* ---- Hero ---- */
.rm-head { margin-bottom: 18px; }
.rm-head h1 {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.rm-head h1 .rm-wave { display: inline-block; }
.rm-head .rm-lead {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 64ch;
}

.rm-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.rm-fact {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(127,127,135,.11);
  border: 1px solid rgba(127,127,135,.45);
  font-size: 13px; color: var(--text-secondary);
}
.rm-fact b { color: var(--text-primary); font-weight: 600; }

/* ---- Werkzeugleiste: Fortschritt + PDF ---- */
.rm-toolbar {
  display: flex; align-items: center; gap: 14px;
  margin-top: 18px; padding: 12px 14px;
  background: rgba(127,127,135,.11);
  border: 1px solid rgba(127,127,135,.45);
  border-radius: 12px;
}
.rm-progress { flex: 1 1 auto; min-width: 0; }
.rm-progress-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; color: var(--text-secondary); margin-bottom: 6px;
}
.rm-progress-label b { color: var(--text-primary); font-weight: 650; font-size: 13px; }
.rm-bar {
  height: 10px; border-radius: 999px;
  background: rgba(127,127,135,.22);
  overflow: hidden;
}
.rm-bar-fill {
  height: 100%; width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #04b3d6, #2cc5e4);
  transition: width .45s cubic-bezier(.22,1,.36,1);
}
.rm-print-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 9px 15px;
  border-radius: 10px; border: 1px solid rgba(4,179,214,.45);
  background: rgba(4,179,214,.12);
  color: var(--accent); font-size: 13.5px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: background .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.rm-print-btn:hover { background: rgba(4,179,214,.2); transform: translateY(-1px); }

/* ---- Phasen-Navigation (sticky) ---- */
.rm-nav {
  position: sticky; top: 62px; z-index: 50;
  display: flex; gap: 7px; overflow-x: auto;
  padding: 10px 2px;
  margin: 6px -2px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.rm-nav::-webkit-scrollbar { display: none; }
.rm-nav a {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 8px 13px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid rgba(127,127,135,.45);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 13px; font-weight: 600;
  color: var(--text-secondary); text-decoration: none;
  transition: color .2s, border-color .2s, background .2s;
  white-space: nowrap;
}
.rm-nav a .rm-nav-ico { font-size: 14px; }
.rm-nav a:hover { color: var(--text-primary); }
.rm-nav a.active {
  color: var(--accent);
  border-color: rgba(4,179,214,.55);
  background: rgba(4,179,214,.10);
}
.rm-nav a.nav-done .rm-nav-ico::after { content: " ✓"; color: #27ae60; font-size: 12px; }

/* ---- Abschnitts-Titel ---- */
.rm-sec-title {
  font-size: 12px; font-weight: 700; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--text-tertiary);
  margin: 34px 0 12px;
}

/* ---- Grauer Kasten (Hausstandard) ---- */
.rm-box {
  background: rgba(127,127,135,.11);
  border: 1px solid rgba(127,127,135,.45);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .3s;
}
.rm-box:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.08); }
.rm-box-head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  background: rgba(127,127,135,.10);
  border-bottom: 1px solid rgba(127,127,135,.32);
}
.rm-box-body { padding: 14px 16px 16px; }

/* ---- Phasen-Zeitleiste ---- */
.rm-phasen { position: relative; }
.rm-phasen .rm-box { scroll-margin-top: 118px; }
@media (min-width: 640px) {
  .rm-phasen { padding-left: 26px; }
  .rm-phasen::before {
    content: "";
    position: absolute; left: 8px; top: 14px; bottom: 14px;
    width: 2px; border-radius: 2px;
    background: linear-gradient(180deg, rgba(4,179,214,.55), rgba(127,127,135,.25));
  }
  .rm-phasen .rm-box::before {
    content: "";
    position: absolute; left: -24px; margin-top: 15px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(4,179,214,.18);
  }
  .rm-phasen .rm-box { position: relative; }
  .rm-phasen .rm-box.done::before { background: #27ae60; box-shadow: 0 0 0 3px rgba(39,174,96,.18); }
}

.rm-num {
  flex: 0 0 auto;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 750;
  background: linear-gradient(135deg, #04b3d6, #2cc5e4);
  color: #fff;
  box-shadow: 0 3px 10px rgba(4,179,214,.35);
}
.rm-box.done .rm-num { background: linear-gradient(135deg, #27ae60, #2ecc71); box-shadow: 0 3px 10px rgba(39,174,96,.35); }
.rm-box.done .rm-num .rm-num-n { display: none; }
.rm-num .rm-num-check { display: none; }
.rm-box.done .rm-num .rm-num-check { display: inline; }

.rm-ph-ico { font-size: 20px; flex: 0 0 auto; }
.rm-ph-title { font-size: 16.5px; font-weight: 680; color: var(--text-primary); line-height: 1.25; }
.rm-ph-when { font-size: 12.5px; color: var(--text-tertiary); margin-top: 1px; }
.rm-ph-count {
  margin-left: auto; flex: 0 0 auto;
  font-size: 12px; font-weight: 650;
  color: var(--text-tertiary);
  padding: 4px 9px; border-radius: 999px;
  background: rgba(127,127,135,.14);
  border: 1px solid rgba(127,127,135,.35);
}
.rm-box.done .rm-ph-count { color: #27ae60; border-color: rgba(39,174,96,.5); }

.rm-goal { font-size: 14.5px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 12px; }
.rm-goal strong { color: var(--text-primary); font-weight: 600; }

.rm-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--text-tertiary);
  margin: 14px 0 7px;
}
.rm-label:first-child { margin-top: 0; }

/* ---- Abhakbare Aufgaben ---- */
.rm-tasks { display: flex; flex-direction: column; gap: 4px; }
.rm-task {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px; margin: 0 -10px;
  border-radius: 9px;
  font-size: 14.5px; line-height: 1.55;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s;
}
.rm-task:hover { background: rgba(127,127,135,.10); }
.rm-task input {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 auto;
  width: 20px; height: 20px; margin-top: 1px;
  border-radius: 6px;
  border: 2px solid rgba(127,127,135,.55);
  background: transparent;
  cursor: pointer;
  display: grid; place-items: center;
  transition: border-color .2s, background .2s;
}
.rm-task input::after {
  content: "✓";
  font-size: 13px; font-weight: 800; color: #fff;
  transform: scale(0);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1);
}
.rm-task input:checked { background: var(--accent); border-color: var(--accent); }
.rm-task input:checked::after { transform: scale(1); }
.rm-task input:checked + span { color: var(--text-tertiary); text-decoration: line-through; text-decoration-color: rgba(127,127,135,.6); }
.rm-task span strong { color: var(--text-primary); font-weight: 600; }
.rm-task input:checked + span strong { color: var(--text-tertiary); }

/* Nummerierte Schritte (nicht abhakbar) */
.rm-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.rm-list li {
  position: relative; padding-left: 18px;
  font-size: 14.5px; line-height: 1.55; color: var(--text-secondary);
}
.rm-list li::before {
  content: ""; position: absolute; left: 3px; top: 9px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-tertiary);
}
.rm-list li strong { color: var(--text-primary); font-weight: 600; }
.rm-list.rm-num-list { counter-reset: step; }
.rm-num-list li::before {
  counter-increment: step; content: counter(step);
  left: 0; top: 0; width: auto; height: auto;
  border-radius: 0; background: none;
  font-size: 13px; font-weight: 700; color: var(--accent);
}

/* Abnahme-Zeile (abhakbar) */
.rm-check {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px; padding: 11px 12px;
  border-radius: 9px;
  background: rgba(4,179,214,.10);
  border: 1px solid rgba(4,179,214,.32);
  font-size: 14px; line-height: 1.5; color: var(--text-primary);
  cursor: pointer;
  transition: background .2s;
}
.rm-check:hover { background: rgba(4,179,214,.16); }
.rm-check b { font-weight: 650; }
.rm-check input {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 auto;
  width: 22px; height: 22px; margin-top: 1px;
  border-radius: 50%;
  border: 2px solid rgba(4,179,214,.6);
  background: transparent; cursor: pointer;
  display: grid; place-items: center;
  transition: border-color .2s, background .2s;
}
.rm-check input::after {
  content: "🏁"; font-size: 11px;
  transform: scale(0);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1);
}
.rm-check input:checked { background: rgba(4,179,214,.2); border-color: var(--accent); }
.rm-check input:checked::after { transform: scale(1); }

/* Warnhinweis */
.rm-note {
  margin-top: 12px; padding: 10px 12px; border-radius: 9px;
  background: rgba(230,150,20,.12);
  border: 1px solid rgba(230,150,20,.38);
  font-size: 13.5px; line-height: 1.55; color: var(--text-primary);
}

/* ---- Tabellen ---- */
.rm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rm-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.rm-table th {
  text-align: left; font-size: 11.5px; font-weight: 700;
  letter-spacing: .7px; text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0 12px 8px; white-space: nowrap;
}
.rm-table td {
  padding: 9px 12px; border-top: 1px solid rgba(127,127,135,.28);
  color: var(--text-secondary); line-height: 1.45; vertical-align: top;
}
.rm-table td:first-child { color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.rm-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: rgba(127,127,135,.16);
  padding: 1.5px 5px; border-radius: 5px;
  color: var(--text-primary);
}

/* ---- Regeln ---- */
.rm-rules { list-style: none; counter-reset: rule; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .rm-rules { grid-template-columns: 1fr 1fr; } .rm-rules li:last-child { grid-column: 1 / -1; } }
.rm-rules li {
  display: flex; gap: 12px;
  padding: 12px 13px; border-radius: 10px;
  background: rgba(127,127,135,.10);
  border: 1px solid rgba(127,127,135,.38);
  font-size: 14px; line-height: 1.55; color: var(--text-secondary);
}
.rm-rules li::before {
  counter-increment: rule; content: counter(rule);
  flex: 0 0 auto;
  width: 26px; height: 26px; margin-top: 1px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 750;
  background: linear-gradient(135deg, #04b3d6, #2cc5e4);
  color: #fff;
}
.rm-rules b { color: var(--text-primary); font-weight: 650; }

/* ---- Wahl-Karten (Eigenprojekt) ---- */
.rm-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 4px; }
.rm-opt {
  padding: 12px 14px; border-radius: 10px;
  background: rgba(127,127,135,.10);
  border: 1px solid rgba(127,127,135,.38);
  transition: border-color .2s;
}
.rm-opt:hover { border-color: rgba(4,179,214,.5); }
.rm-opt-name { font-size: 14px; font-weight: 650; color: var(--text-primary); margin-bottom: 5px; }
.rm-opt p { font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }

.rm-foot {
  margin-top: 34px;
  font-size: 12.5px; color: var(--text-tertiary); line-height: 1.6;
}

/* ---- Einblend-Animation ---- */
@media (prefers-reduced-motion: no-preference) {
  .rm-box, .rm-toolbar, .rm-head { animation: rmFadeUp .5s ease both; }
  .rm-phasen .rm-box:nth-child(1) { animation-delay: .05s; }
  .rm-phasen .rm-box:nth-child(2) { animation-delay: .1s; }
  .rm-phasen .rm-box:nth-child(3) { animation-delay: .15s; }
  .rm-phasen .rm-box:nth-child(4) { animation-delay: .2s; }
  .rm-phasen .rm-box:nth-child(5) { animation-delay: .25s; }
  .rm-phasen .rm-box:nth-child(6) { animation-delay: .3s; }
}
@keyframes rmFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---- Druck / PDF ---- */
@media print {
  body { background: #fff !important; }
  /* Die geteilte Header-Komponente ersetzt den Platzhalter #rudi-header beim Rendern durch
     <header id="rudi-app-header"> — die alte ID existiert zur Druckzeit nicht mehr, deshalb
     landete die Navigationsleiste im PDF. Beide Selektoren stehen lassen. */
  #rudi-header, #rudi-app-header, .rm-nav, .rm-print-btn, #chat-panel-root { display: none !important; }
  .rm-tagebuch-hinweis { background: #f4f4f6 !important; border-color: #c8c8cd !important; }
  .rm-wrap { max-width: none; padding: 0; }
  .rm-box, .rm-toolbar, .rm-head { animation: none !important; }
  .rm-box { break-inside: avoid; box-shadow: none !important; transform: none !important; background: #f4f4f6 !important; border-color: #c8c8cd !important; }
  .rm-box-head { background: #ececef !important; }
  .rm-phasen { padding-left: 0; }
  .rm-phasen::before, .rm-phasen .rm-box::before { display: none; }
  .rm-num, .rm-rules li::before { background: #04b3d6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rm-task, .rm-check { cursor: default; }
  .rm-table { min-width: 0; }
  a { color: inherit; text-decoration: none; }
}

@media (max-width: 560px) {
  .rm-wrap { padding: 16px 13px 60px; }
  .rm-head h1 { font-size: 24px; }
  .rm-nav { top: 58px; }
  .rm-toolbar { flex-wrap: wrap; }
  .rm-print-btn { width: 100%; justify-content: center; }
  .rm-box-head { padding: 12px 13px; }
  .rm-box-body { padding: 13px 13px 15px; }
  .rm-ph-title { font-size: 15px; }
  .rm-ph-count { display: none; }
}

/* Hinweis auf das Praktikums-Tagebuch (02.08.2026) */
.rm-tagebuch-hinweis {
  margin-top: 16px; padding: 12px 14px; border-radius: 12px;
  background: rgba(127,127,135,.11); border: 1px solid rgba(127,127,135,.45);
  font-size: 13.5px; line-height: 1.55; color: var(--text-secondary);
}
.rm-tagebuch-hinweis b { color: var(--text-primary); }
.rm-tagebuch-hinweis a { color: var(--accent); font-weight: 600; }

/* ===== Aufgabenpool ===== */
.ak-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 12px; }
.ak-chip {
  font-family: inherit; font-size: 12.5px; cursor: pointer; padding: 7px 13px; min-height: 40px;
  border-radius: 999px; background: rgba(127,127,135,.11);
  border: 1px solid rgba(127,127,135,.45); color: var(--text-secondary);
}
.ak-chip.ak-aktiv { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.ak-liste { display: flex; flex-direction: column; gap: 8px; }
.ak-karte {
  background: rgba(127,127,135,.11); border: 1px solid rgba(127,127,135,.45);
  border-radius: 12px; overflow: hidden;
}
.ak-kopf {
  width: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; min-height: 48px; cursor: pointer; text-align: left;
  background: none; border: 0; font-family: inherit; color: var(--text-primary);
}
.ak-kopf:hover { background: rgba(127,127,135,.07); }
.ak-kopf.ak-offen { background: rgba(4,179,214,.07); }
.ak-id { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: var(--accent); min-width: 38px; }
.ak-titel { flex: 1 1 240px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.ak-meta { display: flex; align-items: center; gap: 7px; }
.ak-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(127,127,135,.2); color: var(--text-secondary);
}
.ak-badge.ak-aS { background: rgba(80,180,120,.16); color: #3d9160; }
.ak-badge.ak-aM { background: rgba(4,179,214,.16); color: #04b3d6; }
.ak-badge.ak-aL { background: rgba(230,150,40,.16); color: #c9821b; }
.ak-bereich { font-size: 11px; color: var(--text-tertiary); white-space: nowrap; }
.ak-pfeil { font-size: 12px; color: var(--text-tertiary); transition: transform .18s ease; }
.ak-kopf.ak-offen .ak-pfeil { transform: rotate(180deg); }

/* Zuklapp-Zustand: style.css hat KEINE allgemeine .hidden-Regel (nur drei spezifische),
   deshalb hier ausdruecklich - sonst stehen alle Details dauerhaft offen. */
.ak-detail.hidden { display: none; }
.ak-detail { padding: 4px 16px 16px; border-top: 1px solid rgba(127,127,135,.3); font-size: 13.5px; line-height: 1.6; }
.ak-detail h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-secondary); margin: 16px 0 6px; }
.ak-detail p { margin: 0 0 9px; }
.ak-detail ul, .ak-detail ol { margin: 0 0 10px; padding-left: 20px; }
.ak-detail li { margin-bottom: 5px; }
.ak-detail code { font-size: 12px; padding: 1px 5px; border-radius: 5px;
  background: rgba(127,127,135,.18); font-family: ui-monospace, Menlo, Consolas, monospace; }
.ak-hinweis {
  margin: 10px 0 4px; padding: 9px 12px; border-radius: 9px; font-size: 12.5px;
  background: rgba(4,179,214,.10); border: 1px solid rgba(4,179,214,.35);
}
.ak-code { background: rgba(127,127,135,.14); border-radius: 9px; padding: 10px 12px;
  overflow-x: auto; font-size: 12px; margin: 0 0 10px; }
.ak-tab-wrap { overflow-x: auto; margin: 0 0 12px; }
.ak-tab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ak-tab th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--text-secondary); padding: 6px 9px; border-bottom: 1px solid rgba(127,127,135,.35); }
.ak-tab td { padding: 6px 9px; border-bottom: 1px solid rgba(127,127,135,.22); vertical-align: top; }

@media (max-width: 600px) {
  .ak-titel { flex-basis: 100%; order: 3; }
  .ak-meta { order: 2; margin-left: auto; }
}
@media print {
  .ak-filter { display: none !important; }
  .ak-detail { display: block !important; }   /* im PDF alles ausgeklappt */
  .ak-pfeil { display: none; }
}
