/* hmf-tools.de – Ergänzungen zum gemeinsamen Design (style.css):
   Programmleiste unter dem Kopf, Programm-Übersicht auf der Startseite.
   --p-farbe (Akzent je Programm) kommt aus produkte.css (von build.php erzeugt). */

:root { --p-farbe: var(--brand); }

/* ---- Programmleiste (nur auf Programmseiten) ---- */
.product-bar {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--p-farbe) 9%, var(--surface)), var(--surface) 60%);
}
.product-bar-inner { display: flex; align-items: center; gap: 20px; min-height: 58px; }
.product-bar-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.product-bar-brand img { width: 36px; height: 36px; border-radius: 9px; }
.product-bar-brand strong { font: 800 1.05rem/1.1 var(--font-head); display: block; }
.product-bar-brand small { display: block; color: var(--text-3); font-size: .78rem; font-weight: 600; }
.product-nav { margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.product-nav::-webkit-scrollbar { display: none; }
.product-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 6px 0; }
.product-nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px; white-space: nowrap;
  color: var(--text-2); font-weight: 600; font-size: .95rem; text-decoration: none;
}
.product-nav a:hover, .product-nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.product-nav a.product-nav-buy { color: var(--p-farbe); }
/* dunkel: die Akzentfarben der Programme sind zu dunkel für Text (Kontrast unter 4,5:1) – helle Markenfarbe nehmen */
html[data-scheme="dark"] .product-nav a.product-nav-buy { color: var(--brand-text); }
/* auf der Kaufseite selbst (grauer Hintergrund): normale Textfarbe, die Akzentfarbe reicht dort nicht für 4,5:1 (z. B. HMF-MPG) */
.product-nav a.product-nav-buy[aria-current="page"], html[data-scheme="dark"] .product-nav a.product-nav-buy[aria-current="page"] { color: var(--text); }
.product-bar-brand { flex: 0 1 auto; min-width: 0; }   /* langer Untertitel bricht um, statt aus dem Bild zu laufen */
.product-bar-brand span { min-width: 0; }
@media (max-width: 760px) {
  .product-bar-inner { flex-wrap: wrap; gap: 4px 12px; padding-block: 8px; }
  .product-bar-brand { flex: 1 1 100%; }
  .product-nav { margin-left: 0; width: 100%; }
  .product-nav ul { flex-wrap: wrap; }                  /* alle Menüpunkte sichtbar, auch „Kaufen“ */
}

/* ---- Schmale Bildschirme: nichts läuft aus dem Bild (WCAG 1.4.10, Umbruch bis 320 px) ---- */
.grid-2 > *, .buy > *, .prices > *, .help-layout > *, .pcards > *, .cards-3 > *, .tiles > * { min-width: 0; }
@media (max-width: 560px) {
  .btn { white-space: normal; text-align: center; max-width: 100%; }   /* lange Beschriftungen brechen um */
  .dl-card .btn { align-self: stretch; }
  .cta-row .btn-lg { padding-inline: 1.1em; }
  .help-section h2, .prose h2 { overflow-wrap: anywhere; }
}
.faq-item summary, .faq-item p { overflow-wrap: anywhere; }   /* lange Wörter (z. B. Isländisch) brechen um */
/* Formularfelder: bei Tastaturbedienung ein kräftiger Rahmen zusätzlich zum weichen Schein (WCAG 2.4.7) */
input:focus-visible, select:focus-visible, textarea:focus-visible,
input[type="date"]:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }   /* Datumsfeld: Fokus liegt in den Teilfeldern */
.hero-grid > *, .edition-list { min-width: 0; }          /* fieldset und Rasterspalten dürfen schmaler werden als ihr Inhalt */
@media (max-width: 380px) {
  .hero h1 { overflow-wrap: anywhere; }
  .hero h1 .hl { white-space: normal; }
  /* Editionsauswahl: Preis unter den Namen statt daneben */
  .edition { grid-template-columns: auto minmax(0, 1fr); padding: 14px 16px; }
  .edition .ed-price { grid-column: 2; grid-row: auto; font-size: 1.2rem; }
}

/* ---- Logos: HMF Tools (Kopf und Fuß) und HMF IT als Absender im Fuß; je ein Bild für Hell und Dunkel (.only-light/.only-dark) ---- */
.brand-mark { height: 40px; width: auto; flex: none; }
.footer-maker { margin-top: 22px; }
.footer-maker a { display: inline-block; }
.footer-maker img { display: block; height: 44px; width: auto; margin-bottom: 10px; }
@media (max-width: 520px) { .brand-mark { height: 32px; } }
@media (max-width: 400px) { .brand-mark { height: 28px; } }

/* ---- Kopfzeile auf schmalen Bildschirmen: alles passt in die Breite, der Menüknopf bleibt erreichbar (WCAG 1.4.10) ---- */
.brand { min-width: 0; }
@media (max-width: 520px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 2px; }
  .site-header [data-size-toggle] { display: none; }    /* Schriftgröße steht auch in der Fußzeile */
}
@media (max-width: 400px) {
  .site-header [data-theme-toggle] { display: none; }   /* Hell/Dunkel steht auch in der Fußzeile */
  .brand-sub { display: none; }
  .brand { gap: 8px; }
}

/* ---- Startseite: Programm-Übersicht ---- */
.tools-hero { text-align: center; }
.tools-hero .lead { max-width: 640px; margin-inline: auto; color: var(--text-2); font-size: 1.15rem; }
.tools-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; list-style: none; padding: 0; margin: 22px 0 0; color: var(--text-2); font-weight: 600; }
.tools-facts li { display: inline-flex; align-items: center; gap: 8px; }
.tools-facts .icon { color: var(--ok); }

.pcards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.pcard {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.pcard::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: var(--radius) var(--radius) 0 0; background: var(--p-farbe); }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--p-farbe) 40%, var(--line)); }
.pcard-head { display: flex; align-items: center; gap: 14px; }
.pcard-head img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.pcard h3 { margin: 0; font-size: 1.3rem; }
.pcard h3 a { color: var(--text); text-decoration: none; }
.pcard h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }   /* ganze Karte klickbar */
.pcard-sub { margin: 2px 0 0; color: var(--text-3); font-weight: 600; font-size: .92rem; }
.pcard p.pcard-text { margin: 0; color: var(--text-2); }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 6px; color: var(--text-3); font-size: .9rem; }
.pcard-meta strong { color: var(--text); }
.pcard-actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }   /* über dem Karten-Link */
.pcard-soon { border-style: dashed; box-shadow: none; }
.pcard-soon::before { display: none; }

.tools-why { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.tools-why .why { padding: 20px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.tools-why .why h3 { font-size: 1.05rem; margin: 10px 0 6px; }
.tools-why .why p { margin: 0; color: var(--text-2); font-size: .97rem; }
.tools-why .why .icon { width: 26px; height: 26px; color: var(--brand-text); }
