/* =====================================================================
   Lade-Ampel – Frontend (Design B „Zeitband“)
   Alles unter .la-root gekapselt, Präfix la-, Farben als CSS-Variablen.
   Hell/Dunkel nach Theme, fest oder prefers-color-scheme (data-la-theme), Bewegung respektiert reduced-motion.
   ===================================================================== */

.la-root {
  --la-page: #eef1ee;
  --la-card: #ffffff;
  --la-ink: #111412;
  --la-ink-2: #4c524e;
  --la-muted: #5f6661;   /* 5,2:1 auf Seite, 5,9:1 auf Karte (WCAG AA) */
  --la-line: #e2e6e2;
  --la-ring: rgba(0, 0, 0, .06);
  --la-shadow: 0 2px 4px rgba(16, 24, 20, .04), 0 12px 32px rgba(16, 24, 20, .08);
  --la-green: #0ca30c;
  --la-yellow: #fab219;
  --la-red: #d03b3b;
  --la-green-ink: #006300;
  --la-yellow-ink: #7a5200;
  --la-red-ink: #a32020;
  --la-lamp-off: #2a2f2c;
  --la-housing: #171a18;
  --la-hero-from: #e6f6e6;
  --la-hero-to: #ffffff;
  --la-price: #2a78d6;
  --la-pv: #eda100;
  --la-focus: #2a78d6;
  --la-radius: 24px;

  color-scheme: light;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--la-ink);
  background: var(--la-page);
  border-radius: 28px;
  padding: 14px;
  -webkit-font-smoothing: antialiased;
  text-align: left;
}

/* Heldfarbe je Zustand (gesetzt per data-state am Hero) */
.la-root .la-hero[data-state="y"] { --la-hero-from: #fff4da; }
.la-root .la-hero[data-state="r"] { --la-hero-from: #fbe6e6; }

/* Dunkelmodus: fest bzw. aus der Theme-Hintergrundfarbe erkannt (data-la-theme="dark") … */
.la-root[data-la-theme="dark"] {
  --la-page: #0b0d0c;
  --la-card: #171a18;
  --la-ink: #eef1ee;
  --la-ink-2: #bfc6c1;
  --la-muted: #8d948f;
  --la-line: #2a2f2c;
  --la-ring: rgba(255, 255, 255, .07);
  --la-shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .4);
  --la-green-ink: #4ccf4c;
  --la-yellow-ink: #fab219;
  --la-red-ink: #ef7070;
  --la-lamp-off: #262a28;
  --la-housing: #0f1110;
  --la-hero-from: #10291a;
  --la-hero-to: #171a18;
  --la-price: #5598e7;
  --la-pv: #f0b429;
  --la-focus: #5598e7;
  color-scheme: dark;
}
.la-root[data-la-theme="dark"] .la-hero[data-state="y"] { --la-hero-from: #2e2610; }
.la-root[data-la-theme="dark"] .la-hero[data-state="r"] { --la-hero-from: #301414; }

/* … oder nach Systemeinstellung (data-la-theme="system") */
@media (prefers-color-scheme: dark) {
  .la-root[data-la-theme="system"] {
    --la-page: #0b0d0c;
    --la-card: #171a18;
    --la-ink: #eef1ee;
    --la-ink-2: #bfc6c1;
    --la-muted: #8d948f;
    --la-line: #2a2f2c;
    --la-ring: rgba(255, 255, 255, .07);
    --la-shadow: 0 2px 4px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .4);
    --la-green-ink: #4ccf4c;
    --la-yellow-ink: #fab219;
    --la-red-ink: #ef7070;
    --la-lamp-off: #262a28;
    --la-housing: #0f1110;
    --la-hero-from: #10291a;
    --la-hero-to: #171a18;
    --la-price: #5598e7;
    --la-pv: #f0b429;
    --la-focus: #5598e7;
    color-scheme: dark;
  }
  .la-root[data-la-theme="system"] .la-hero[data-state="y"] { --la-hero-from: #2e2610; }
  .la-root[data-la-theme="system"] .la-hero[data-state="r"] { --la-hero-from: #301414; }
}

.la-root, .la-root *, .la-root *::before, .la-root *::after { box-sizing: border-box; }
.la-root [hidden] { display: none !important; }
.la-root p { margin: 0; }
.la-root button { font: inherit; letter-spacing: normal; text-transform: none; margin: 0; }

.la-wrap { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.la-card {
  background: var(--la-card);
  border-radius: var(--la-radius);
  box-shadow: var(--la-shadow);
  outline: 1px solid var(--la-ring);
  padding: 20px;
}

/* ---------- Suche & Anlage ---------- */
.la-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.la-search {
  display: flex; align-items: center; gap: 8px; margin: 0;
  background: var(--la-card); border-radius: 999px; padding: 6px 6px 6px 16px;
  box-shadow: var(--la-shadow); outline: 1px solid var(--la-ring);
}
.la-search:focus-within { outline: 3px solid var(--la-focus); }
.la-pin { color: var(--la-muted); display: grid; place-items: center; }
.la-search input {
  flex: 1; min-width: 0; border: 0; background: none; box-shadow: none; padding: 8px 0; margin: 0;
  font: inherit; font-size: 1.0625rem; color: var(--la-ink); font-variant-numeric: tabular-nums;
}
.la-search input:focus { outline: none; }
.la-root .la-go {
  border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer;
  background: var(--la-ink); color: var(--la-card); font-weight: 650; line-height: 1.2;
}
.la-root .la-locate {
  flex: none; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; cursor: pointer;
  border: 0; border-radius: 999px; background: none; color: var(--la-ink-2); outline: 1px solid var(--la-line);
}
.la-locate:hover { color: var(--la-ink); }
.la-locate[aria-busy="true"] svg { animation: la-spin 1s linear infinite; }
.la-go:focus-visible, .la-locate:focus-visible, .la-link:focus-visible { outline: 3px solid var(--la-focus); outline-offset: 2px; }
.la-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: .8125rem; color: var(--la-muted); text-align: center; }
.la-root .la-link { border: 0; background: none; padding: 0; color: var(--la-ink-2); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: inherit; }

.la-system { display: grid; gap: 14px; }
.la-fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.la-fs legend { padding: 0; margin-bottom: 8px; font-size: .8125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--la-ink-2); }
.la-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.la-fields label { display: grid; gap: 4px; font-size: .875rem; color: var(--la-ink-2); }
.la-unit-in { display: flex; align-items: center; border: 1px solid var(--la-line); border-radius: 12px; background: var(--la-page); overflow: hidden; }
.la-unit-in:focus-within { outline: 3px solid var(--la-focus); outline-offset: 1px; }
.la-unit-in span { padding: 0 12px 0 4px; color: var(--la-muted); }
.la-root .la-fields input, .la-root .la-fields select {
  font: inherit; font-size: 1rem; color: var(--la-ink); margin: 0; box-shadow: none; min-width: 0;
}
.la-root .la-unit-in input { flex: 1; width: 100%; border: 0; background: none; padding: 9px 0 9px 12px; }
.la-root .la-unit-in input:focus { outline: none; }
.la-root .la-fields select { width: 100%; border: 1px solid var(--la-line); border-radius: 12px; background: var(--la-page); padding: 9px 10px; }
.la-root .la-fields select:focus-visible { outline: 3px solid var(--la-focus); outline-offset: 1px; }
.la-check { display: flex; align-items: center; gap: 8px; font-size: .9375rem; cursor: pointer; }
.la-check input { width: 18px; height: 18px; accent-color: var(--la-ink); margin: 0; }
.la-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.la-alert { padding: 12px 16px; border-radius: 16px; background: var(--la-card); outline: 1px solid var(--la-ring); border-left: 4px solid var(--la-yellow); font-size: .9375rem; }
.la-alert[data-type="error"] { border-left-color: var(--la-red); }

@keyframes la-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .la-locate[aria-busy="true"] svg { animation: none; } }

/* ---------- Hero mit Ampel ---------- */
.la-hero {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
  background: linear-gradient(160deg, var(--la-hero-from), var(--la-hero-to) 70%);
  transition: background .6s;
}
.la-tl {
  flex: none; display: grid; gap: 8px; padding: 10px; border-radius: 22px;
  background: var(--la-housing); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.la-lamp {
  display: block; width: 34px; height: 34px; border-radius: 50%;
  background: var(--la-lamp-off); transition: background .5s, box-shadow .5s;
}
.la-tl[data-state="g"] .la-lamp-g { background: var(--la-green); box-shadow: 0 0 18px 4px rgba(12, 163, 12, .55); }
.la-tl[data-state="y"] .la-lamp-y { background: var(--la-yellow); box-shadow: 0 0 18px 4px rgba(250, 178, 25, .55); }
.la-tl[data-state="r"] .la-lamp-r { background: var(--la-red); box-shadow: 0 0 18px 4px rgba(208, 59, 59, .55); }

.la-kicker { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--la-ink-2); }
.la-hero[data-state="g"] .la-kicker { color: var(--la-green-ink); }
.la-hero[data-state="y"] .la-kicker { color: var(--la-yellow-ink); }
.la-hero[data-state="r"] .la-kicker { color: var(--la-red-ink); }
.la-reco { margin: 2px 0 4px !important; font-size: clamp(1.6rem, 7vw, 2.4rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 760; }
.la-reco small { display: block; font-size: .5em; font-weight: 600; letter-spacing: -.01em; color: var(--la-ink-2); margin-top: 6px; line-height: 1.3; }
.la-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.la-chips:empty { display: none; }
.la-chip { white-space: nowrap; font-size: .8125rem; padding: 4px 10px; border-radius: 999px; background: var(--la-card); outline: 1px solid var(--la-line); }
.la-chip b { font-variant-numeric: tabular-nums; }
.la-hero-text { flex: 1 1 240px; min-width: 0; }
/* Kennzahlen unter der Empfehlung: Preis im Fenster (Hauptwert), Abstand zum Tagesmittel, jetzt */
.la-hero-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 8px; margin: 12px 0 8px; padding: 0; }
.la-hero-kpis:empty { display: none; }
.la-hk { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border-radius: 14px; background: var(--la-card); outline: 1px solid var(--la-line); }
.la-hk dt { font-size: .75rem; font-weight: 650; color: var(--la-ink-2); }
.la-hk dd { margin: 0; display: grid; gap: 2px; }
.la-hk b { font-size: 1.125rem; font-weight: 740; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.la-hk-main b { font-size: 1.5rem; }
.la-hk small { font-size: .75rem; line-height: 1.35; color: var(--la-ink-2); }
.la-root .la-hero-stand { margin: 6px 0 0; font-size: .75rem; color: var(--la-muted); }
.la-root .la-hero-stand:empty { display: none; }

/* Ergebnis teilen */
.la-share { margin-top: 10px; display: grid; gap: 10px; justify-items: start; }
.la-root .la-share-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 0; background: var(--la-card); color: var(--la-ink); outline: 1px solid var(--la-line); font-size: .875rem; font-weight: 600;
}
.la-root .la-share-btn:hover { outline-color: var(--la-ink-2); }
.la-root .la-share-btn:focus-visible { outline: 3px solid var(--la-focus); outline-offset: 2px; }
.la-share-panel { display: grid; gap: 8px; width: 100%; max-width: 560px; padding: 12px 14px; border-radius: 14px; background: var(--la-card); outline: 1px solid var(--la-line); }
.la-share-panel .la-note { margin: 0; }
.la-root .la-share-text { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--la-page); font: inherit; font-size: .875rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
.la-handoff { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }

/* Nutzen-Satz unter dem Seitentitel (gleiche Breite wie Titel/Widget) */
p.la-lead {
  box-sizing: border-box; width: min(90vw, 1600px); max-width: none; position: relative; left: 50%; transform: translateX(-50%);
  margin-top: 0; margin-bottom: clamp(14px, 2vw, 22px); font-size: clamp(1rem, 1.6vw, 1.1875rem); line-height: 1.5; text-wrap: pretty;
}
.la-hero-side { flex: 1 1 100%; display: grid; gap: 10px; }
.la-hero-side:not(:has(> :not([hidden]))) { display: none; }
.la-root .la-tip, .la-root .la-ai { margin: 0; font-size: .9375rem; line-height: 1.5; color: var(--la-ink-2); max-width: 60ch; }
.la-ai small { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--la-muted); outline: 1px solid var(--la-line); }

/* ---------- Zeitband ---------- */
.la-band-h { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.la-h2 { margin: 0 !important; font-size: 1.0625rem !important; font-weight: 680; line-height: 1.3; }
.la-tabs { display: inline-flex; gap: 4px; }
.la-tab { border: 0; border-radius: 999px; padding: 4px 12px; background: none; color: var(--la-ink-2); cursor: pointer; font-size: .875rem; }
.la-tab[aria-pressed="true"] { background: var(--la-ink); color: var(--la-card); font-weight: 600; }
.la-tab:disabled { opacity: .45; cursor: not-allowed; }
.la-tab:focus-visible, .la-cell:focus-visible, .la-details summary:focus-visible { outline: 3px solid var(--la-focus); outline-offset: 2px; }

.la-band-wrap { position: relative; padding-top: 24px; }
.la-bracket { position: absolute; top: 4px; height: 14px; border: 2px solid var(--la-ink); border-bottom: 0; border-radius: 8px 8px 0 0; }
.la-bracket span { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: .75rem; font-weight: 700; white-space: nowrap; line-height: 1.2; }
.la-band { display: grid; gap: 0; height: 56px; border-radius: 12px; overflow: hidden; }
.la-cell { border: 0; padding: 0; min-width: 0; cursor: pointer; transform-origin: bottom; animation: la-grow .5s cubic-bezier(.2, .8, .2, 1) both; }
.la-cell.la-g { background: var(--la-green); }
.la-cell.la-y { background: var(--la-yellow); }
.la-cell.la-r { background: var(--la-red); }
.la-cell.la-past { opacity: .35; }
.la-cell:hover, .la-cell[aria-current="true"] { filter: brightness(1.15) saturate(1.1); outline: 2px solid var(--la-ink); outline-offset: -2px; position: relative; z-index: 1; }
.la-now { position: absolute; top: 18px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--la-ink); border-radius: 2px; pointer-events: none; }
.la-now::after { content: "jetzt"; position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: .6875rem; font-weight: 700; }
.la-hours { position: relative; height: 18px; margin-top: 8px; font-size: .75rem; color: var(--la-muted); font-variant-numeric: tabular-nums; }
.la-hours span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.la-hours span:first-child { transform: none; }
.la-hours span:last-child { transform: translateX(-100%); }
.la-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .8125rem; color: var(--la-ink-2); margin-top: 14px; }
.la-key span { display: inline-flex; align-items: center; gap: 6px; }
.la-key i { width: 12px; height: 12px; border-radius: 4px; display: block; }
.la-key-g { background: var(--la-green); } .la-key-y { background: var(--la-yellow); } .la-key-r { background: var(--la-red); }
.la-info { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--la-page); font-size: .9375rem; min-height: 3.2em; }
.la-info b { font-variant-numeric: tabular-nums; }
/* Ladeanimation, bis JavaScript das Band gefüllt hat */
.la-band:empty { background: linear-gradient(90deg, var(--la-line) 0%, var(--la-page) 50%, var(--la-line) 100%); background-size: 200% 100%; animation: la-shimmer 1.4s ease-in-out infinite; }
@keyframes la-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .la-band:empty { animation: none; } }
.la-empty { padding: 18px; text-align: center; color: var(--la-ink-2); border: 1px dashed var(--la-line); border-radius: 12px; }

/* ---------- Details ---------- */
.la-details { padding: 0; }
.la-details summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 650; display: flex; justify-content: space-between; align-items: center; border-radius: var(--la-radius); }
.la-details summary::-webkit-details-marker { display: none; }
.la-details summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--la-ink-2); border-bottom: 2px solid var(--la-ink-2); transform: rotate(45deg); transition: transform .2s; }
.la-details[open] summary::after { transform: rotate(-135deg); }
.la-det { padding: 0 20px 20px; display: grid; gap: 12px; }
.la-mini-h { font-size: .8125rem; color: var(--la-ink-2); }
.la-det svg { width: 100%; height: auto; display: block; }
.la-tick { font-size: 10px; fill: var(--la-muted); font-variant-numeric: tabular-nums; }
.la-note { font-size: .8125rem; color: var(--la-ink-2); }

/* ---------- Partnerlinks („Anzeige“) ---------- */
.la-partners { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.la-root .la-ad { display: flex; gap: 14px; align-items: center; padding: 14px 16px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.la-root .la-ad:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(16,24,20,.06), 0 16px 36px rgba(16,24,20,.12); }
.la-root .la-ad:focus-visible { outline: 3px solid var(--la-focus); outline-offset: 2px; }
.la-ad-logo { flex: none; width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--la-page); }
.la-ad-body { display: grid; gap: 2px; min-width: 0; }
.la-ad-label { font-size: .6875rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--la-muted); }
.la-ad strong { font-weight: 650; line-height: 1.3; }
.la-ad-text { font-size: .875rem; color: var(--la-ink-2); line-height: 1.4; }
.la-root-partners { padding: 0; background: none; }
.la-root .la-ad-note { grid-column: 1 / -1; margin: 0; font-size: .75rem; color: var(--la-muted); }

/* ---------- Nächster Schritt (Verweise zwischen den Tools) ---------- */
.la-next { display: grid; gap: 10px; }
.la-root .la-next-h { margin: 0; font-size: .8125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--la-ink-2); }
.la-next ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.la-root .la-next-link {
  display: grid; gap: 2px; height: 100%; box-sizing: border-box; padding: 14px 40px 14px 16px; position: relative;
  border-radius: 16px; background: var(--la-card); outline: 1px solid var(--la-line); color: inherit; text-decoration: none;
  transition: outline-color .15s, transform .15s;
}
.la-root .la-next-link::after { content: "→"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--la-ink-2); }
.la-root .la-next-link strong { font-weight: 650; line-height: 1.3; }
.la-root .la-next-link span { font-size: .875rem; color: var(--la-ink-2); line-height: 1.4; }
.la-root .la-next-link:hover { outline-color: var(--la-ink-2); transform: translateY(-1px); }
.la-root .la-next-link:focus-visible { outline: 3px solid var(--la-focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .la-root .la-next-link { transition: none; } .la-root .la-next-link:hover { transform: none; } }

/* ---------- Ladebedarf: Umschalter kWh / %, Hinweise ---------- */
.la-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; margin-bottom: 10px; border-radius: 999px; background: var(--la-page); outline: 1px solid var(--la-line); }
.la-seg label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .875rem; cursor: pointer; }
.la-seg input { accent-color: var(--la-ink); margin: 0; }
.la-seg label:has(input:checked) { background: var(--la-card); font-weight: 650; box-shadow: 0 1px 3px rgba(16,24,20,.12); }
.la-seg label:has(input:focus-visible) { outline: 3px solid var(--la-focus); outline-offset: 1px; }
.la-root .la-hero-note { margin: 8px 0 0; font-size: .8125rem; line-height: 1.45; color: var(--la-ink-2); max-width: 60ch; }
.la-root .la-key-note { margin: 8px 0 0; line-height: 1.45; }
.la-root input[aria-invalid="true"] { color: var(--la-red-ink, #b3261e); }
@media (prefers-reduced-motion: reduce) { .la-root .la-ad { transition: none; } .la-root .la-ad:hover { transform: none; } }

/* ---------- Footer ---------- */
.la-foot { font-size: .75rem; color: var(--la-muted); line-height: 1.6; padding: 0 6px; display: grid; gap: 4px; }
.la-stale { color: var(--la-red-ink); font-weight: 600; }

@keyframes la-grow { from { transform: scaleY(0); } to { transform: none; } }

@media (max-width: 380px) {
  .la-root { padding: 10px; border-radius: 22px; }
  .la-card { padding: 16px; }
  .la-lamp { width: 26px; height: 26px; }
  .la-hero { gap: 14px; }
}

/* ---------- Breite: 90 % des Fensters, unabhängig vom Theme-Container ----------
   Block-Themes begrenzen Kinder von .is-layout-constrained auf die Inhaltsbreite (TT5: 645 px)
   und setzen die Seitenränder mit !important. Statt dagegen anzukämpfen, wird das Widget
   relativ zur Mitte des Elterncontainers positioniert (left 50 % + translateX −50 %).
   Doppelte Klasse/Attribut erhöht die Spezifität über die Theme-Regel. */
div.la-root[data-la-widget],
div.la-root.la-calc {
  box-sizing: border-box;
  width: min(90vw, 1600px);
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

/* Seitentitel über dem Widget (nur Startseite, siehe Shortcode title=auto):
   gleiche Breite/Position wie das Widget; Schrift kommt vom Theme (globale h1-Stile). */
h1.la-page-title {
  box-sizing: border-box;
  width: min(90vw, 1600px);
  max-width: none;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-top: clamp(16px, 3vw, 40px);
  margin-bottom: clamp(16px, 2.5vw, 28px);
  text-wrap: balance;
}

/* ---------- Responsive ---------- */
/* Tablet: Diagramme nebeneinander */
@media (min-width: 720px) {
  .la-root { padding: 18px; }
  .la-det-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  /* Ohne PV-Diagramm nimmt das Preisdiagramm die volle Breite (ältere Browser ohne :has: halbe Breite) */
  .la-det-charts:has(> [hidden]) { grid-template-columns: 1fr; }
  .la-hero { gap: 28px; padding: 24px 28px; }
  .la-lamp { width: 40px; height: 40px; }
}

/* Desktop: alles untereinander in voller Breite; die Ampel-Karte nutzt die Breite dreispaltig
   (Ampel | Empfehlung | Tipp). So entstehen keine ungleich hohen Karten nebeneinander. */
@media (min-width: 1024px) {
  .la-root { padding: 22px; border-radius: 32px; }
  .la-wrap { gap: 18px; }
  .la-search { width: 100%; max-width: 720px; justify-self: center; }
  .la-system { width: 100%; max-width: 980px; justify-self: center; }
  .la-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 32px; padding: 28px 32px;
  }
  .la-hero-side { align-self: center; padding-left: 32px; border-left: 1px solid var(--la-line); }
  .la-root .la-tip, .la-root .la-ai { max-width: none; }
  .la-band { height: 72px; }
  .la-reco { font-size: clamp(2rem, 2.6vw, 2.75rem); }
}

@media (prefers-reduced-motion: reduce) {
  .la-cell { animation: none; }
  .la-lamp, .la-hero, .la-details summary::after { transition: none; }
}
