/* Eigene Regeln der Arbeitsblatterstellung (Kopfzeile, Kontingent, Fußzeile, Startseite).
   Die Bausteine der geteilten Seiten kommen aus sdp/basis.css (erzeugt, nicht ändern). */
body.app-werkzeug { background: var(--surface); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; }
body.app-werkzeug > main { flex: 1 0 auto; width: 100%; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 1rem; top: 0.5rem; z-index: 100; background: var(--surface); padding: 0.4rem 0.8rem; border-radius: var(--radius-sm); }

/* basis.css (SDP) gibt jedem <header> eine durchscheinende Fläche mit !important — hier deckend. */
body > header.app-kopf { position: sticky; top: 0; z-index: 30; background: var(--surface) !important;
  background-color: var(--surface) !important; backdrop-filter: none; border-bottom: 1px solid var(--border); }
.app-kopf-innen { max-width: 64rem; margin: 0 auto; padding: 0.55rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.app-marke { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--text); text-decoration: none; }
.app-navi { display: flex; gap: 0.25rem; flex-wrap: wrap; flex: 1 1 auto; }
.app-navi a { padding: 0.35rem 0.7rem; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.app-navi a:hover { background: var(--focus-soft); color: var(--text); }
.app-navi a[aria-current="page"] { color: var(--text); font-weight: 600; background: var(--focus-soft); }

.app-budget { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.app-budget:hover { color: var(--text); }
.app-budget-balken { width: 4.5rem; height: 0.45rem; border-radius: 999px; background: var(--surface-muted, rgba(100,116,139,0.18)); overflow: hidden; border: 1px solid var(--border); }
.app-budget-balken > span { display: block; height: 100%; width: 100%; background: var(--primary, #243b63); transition: width 250ms ease; }
.app-budget--leer { color: var(--danger, #dc2626); }
.app-budget--leer .app-budget-balken > span { background: var(--danger, #dc2626); }

.app-fuss { max-width: 64rem; width: 100%; margin: 0 auto; padding: 1.5rem 1rem 2rem; font-size: 0.75rem; color: var(--muted); display: flex; gap: 1rem; flex-wrap: wrap; }
.app-fuss a { color: var(--muted); }

/* Startseite */
.app-start h1 { font-size: 1.6rem; font-weight: 700; margin: 1rem 0 0.4rem; }
.app-start .app-lead { color: var(--muted); max-width: 46rem; }
.app-kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; margin: 1.5rem 0; }
.app-kachel { display: flex; flex-direction: column; gap: 0.4rem; padding: 1.1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.app-kachel:hover { background: var(--focus-soft); }
.app-kachel strong { font-size: 1.05rem; }
.app-kachel span { color: var(--muted); font-size: 0.9rem; }
.app-hinweis { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1rem; background: var(--focus-soft); margin: 1rem 0; }
.app-hinweis strong { display: block; margin-bottom: 0.25rem; }
.app-text h2 { font-size: 1.1rem; font-weight: 600; margin: 1.4rem 0 0.4rem; }
.app-text p, .app-text li { line-height: 1.55; }
.app-text ul { list-style: disc; padding-left: 1.3rem; }
.app-budget-kurz { display: none; font-variant-numeric: tabular-nums; font-weight: 600; }
/* Telefon: oben Marke + Kurzstand des Kontingents, darunter die Werkzeuge in EINER Zeile
   (waagerecht scrollbar) — die klebende Kopfzeile bleibt so ~90 px hoch statt ~170. */
@media (max-width: 640px) {
  .app-kopf-innen { gap: 0.35rem 0.75rem; padding: 0.4rem 1rem; }
  .app-marke { font-size: 0.95rem; }
  .app-marke img { width: 24px; height: 24px; }
  .app-budget { order: 2; margin-left: auto; }
  .app-budget-balken { width: 3rem; }
  .app-budget-lang { display: none; }
  .app-budget-kurz { display: inline; }
  .app-navi { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .app-navi::-webkit-scrollbar { display: none; }
  .app-navi a { white-space: nowrap; padding: 0.25rem 0.55rem; font-size: 0.85rem; }
}
