/* ============================================================
   Powerandi-Look für die Seiten der Cloud-Routinen (seit 08.10.2026)
   Handball-Woche (/handball-briefing/, auch Archiv), KI-News, KI-Lektion.

   Die Routinen schreiben eigenständige Seiten im Apple-Dunkel-Stil (Schwarz,
   Kartengrau #1c1c1e, Systemschrift). Der Worker hängt beim Ausliefern dieses
   Stylesheet an, setzt body.pa-routine und eine Kopfzeile wie im Seitenmenü.
   So bleiben Routinen, Zustell-Prüfung, Mail und HA-iframe unverändert.

   Nur Flächen, Linien, Schrift und Grautöne werden umgestellt. Signalfarben der
   Seiten (grün/rot für Ergebnisse, orange, lila Chips der Lektion) bleiben.
   Alles mit body.pa-routine davor, damit es die Seiten-Styles sicher schlägt.
   ============================================================ */

body.pa-routine{
  --pr-bg:#071a1d;
  --pr-bg-soft:#0b2226;
  --pr-card:#10333a;
  --pr-card-soft:#164047;
  --pr-ink:#f4f0e8;
  --pr-ink-soft:rgba(244,240,232,.74);
  --pr-line:rgba(244,240,232,.14);
  --pr-accent:#ef7d3a;
  --pr-teal:#78dbc2;
  background:var(--pr-bg);
  color:var(--pr-ink);
  font-family:'Inter Tight',system-ui,-apple-system,sans-serif;
}
html:has(body.pa-routine){background:#071a1d}

/* Überschriften in Fraunces wie auf der restlichen Seite */
body.pa-routine h1,
body.pa-routine h2,
body.pa-routine .greeting h1,
body.pa-routine .kopf h1,
body.pa-routine h2.title{
  font-family:'Fraunces',Georgia,serif;
  font-weight:600;
  color:var(--pr-ink);
  letter-spacing:0;
}
body.pa-routine h3{color:var(--pr-ink)}

/* Karten und Flächen */
body.pa-routine .card,
body.pa-routine details,
body.pa-routine .merk{
  background:var(--pr-card);
  border-color:var(--pr-line);
}
body.pa-routine .card{border:1px solid var(--pr-line);border-radius:18px}
body.pa-routine .divider,
body.pa-routine .row,
body.pa-routine table.mini td,
body.pa-routine table.mini th,
body.pa-routine .inhalt th,
body.pa-routine .inhalt td{border-color:var(--pr-line)}
body.pa-routine .icon-sq,
body.pa-routine .icon{background:var(--pr-card-soft)}
body.pa-routine .inhalt pre,
body.pa-routine .inhalt code{background:var(--pr-bg-soft)}

/* Grautöne → Powerandi-Sekundärtext */
body.pa-routine .secondary,
body.pa-routine .foot,
body.pa-routine .fuss,
body.pa-routine .datum,
body.pa-routine .timestamp,
body.pa-routine .news-date,
body.pa-routine .news-orig,
body.pa-routine .greeting .date,
body.pa-routine .kopf .date,
body.pa-routine .unter,
body.pa-routine .archiv span{color:var(--pr-ink-soft)}

/* Links: Türkis statt Apple-Blau, Orange beim Darüberfahren */
body.pa-routine a{color:var(--pr-teal)}
body.pa-routine a:hover{color:var(--pr-accent)}
body.pa-routine a.news-item,
body.pa-routine a.news-item:hover{color:inherit}
body.pa-routine a.news-item:hover .news-title{color:var(--pr-accent)}

/* ---------- Kopfzeile wie das Seitenmenü ---------- */
.pa-kopf{
  position:sticky;top:0;z-index:50;
  background:rgba(7,26,29,.88);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(244,240,232,.14);
  font-family:'Inter Tight',system-ui,-apple-system,sans-serif;
}
.pa-kopf-inner{
  max-width:1180px;margin:0 auto;padding:12px 20px;
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.pa-kopf a{text-decoration:none}
.pa-marke{display:flex;align-items:center;gap:10px;color:#f4f0e8 !important;font-family:'Fraunces',Georgia,serif;font-size:19px;font-weight:600}
.pa-marke .brand-logo{width:29px;height:34px;flex-shrink:0;display:block}
.pa-kopf,.pa-kopf *,.pa-unterzeile{box-sizing:border-box}
.pa-menue{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;min-width:0;max-width:100%}
.pa-menue::-webkit-scrollbar{display:none}
.pa-menue a{
  padding:8px 14px;border-radius:999px;white-space:nowrap;
  font-size:14px;font-weight:500;color:rgba(244,240,232,.74) !important;
}
.pa-menue a:hover{background:rgba(244,240,232,.08);color:#f4f0e8 !important}
.pa-menue a.ist-aktiv{background:rgba(239,125,58,.16);color:#ef7d3a !important}

.pa-unterzeile{
  max-width:720px;margin:0 auto;padding:12px 24px 0;
  display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;
  font-family:'Inter Tight',system-ui,-apple-system,sans-serif;font-size:14px;
}
.pa-unterzeile a{color:rgba(244,240,232,.74) !important;text-decoration:none}
.pa-unterzeile a:hover{color:#ef7d3a !important}
.pa-unterzeile a.pa-zurueck{color:#78dbc2 !important}

@media (max-width:760px){
  .pa-kopf-inner{flex-direction:column;align-items:flex-start;gap:8px;padding:10px 16px}
  .pa-kopf-inner{align-items:stretch}
  .pa-menue{width:100%}
  .pa-menue a{padding:6px 10px}
}

/* Breite Tabellen in Lektionen seitlich scrollen statt die Seite zu verbreitern */
body.pa-routine .inhalt table{display:block;max-width:100%;overflow-x:auto}

/* Lange Bezeichner (z. B. CLAUDE_CODE_…) in den KI-News umbrechen statt die Seite zu verbreitern */
body.pa-routine .news-title,
body.pa-routine .news-details li,
body.pa-routine .news-orig,
body.pa-routine .inhalt p,
body.pa-routine .inhalt li{overflow-wrap:anywhere}

/* Einordnung oben auf den KI-News („Das Wichtigste heute“, sonntags „Die Woche in KI“) */
body.pa-routine .einordnung{border-left:3px solid var(--pr-accent)}
body.pa-routine .einordnung h2.title{font-size:20px}
