/*
 Theme Name:   GeneratePress Child (Energiepiloten24)
 Template:     generatepress
 Version:      1.0.0
*/

/* ==========================================================================
   Energiepiloten24 — Premium Design System
   --------------------------------------------------------------------------
   A confident, high-end energy/eco brand system for a German energy-savings
   site (Wärmepumpe, Photovoltaik, Speicher, Wallbox, Fördermittel).

   Palette
     Primary   Deep navy / petrol  — trust, expertise, stability
     Accent    Fresh teal-green    — renewable energy, growth, "eco"
     CTA       Warm burnt orange   — conversion, energy, warmth
     Neutrals  Cool slate greys on a soft off-white canvas

   All colour pairings target WCAG 2.1 AA. Interactive elements ship with
   :focus-visible rings. Mobile-first; tasteful transitions only.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
    /* --- Brand colours --- */
    --ep-navy:            #0B2A4A; /* primary deep navy            */
    --ep-navy-700:        #123A63; /* lighter navy (surfaces)      */
    --ep-navy-900:        #071B31; /* near-black navy (footer/hero)*/
    --ep-petrol:          #0E5A6B; /* petrol accent / gradients    */
    --ep-petrol-600:      #0C7285; /* brighter petrol              */

    --ep-teal:            #12B886; /* fresh green-teal accent      */
    --ep-teal-600:        #0E9E75; /* hover / borders              */
    --ep-teal-700:        #0B7D5B; /* AA-safe teal text on white   */

    --ep-cta:             #EA580C; /* warm burnt orange (CTA)      */
    --ep-cta-600:         #C2410C; /* CTA hover                    */
    --ep-cta-050:         #FFF3EC; /* CTA tint background          */

    /* --- Neutrals --- */
    --ep-ink:             #14202E; /* headings / strongest text    */
    --ep-text:            #2C3A47; /* body text (AA on canvas)     */
    --ep-muted:           #566573; /* secondary text (AA on white) */
    --ep-line:            #D9E1E8; /* hairline borders             */
    --ep-line-soft:       #E9EEF3; /* softest dividers             */
    --ep-canvas:          #F4F7FA; /* page background              */
    --ep-surface:         #FFFFFF; /* cards / tables               */
    --ep-surface-alt:     #F7FAFC; /* zebra / subtle fills         */
    --ep-white:           #FFFFFF;

    /* --- Typography --- */
    --ep-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
                    Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
    --ep-font-head: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI",
                    Roboto, Helvetica, Arial, sans-serif;
    --ep-font-num:  "Inter", ui-monospace, "SF Mono", "Segoe UI", Roboto, sans-serif;

    --ep-fs-h1: clamp(2rem, 1.35rem + 2.7vw, 3.15rem);
    --ep-fs-h2: clamp(1.55rem, 1.2rem + 1.5vw, 2.2rem);
    --ep-fs-h3: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem);
    --ep-fs-body: 1.0625rem; /* 17px */
    --ep-fs-sm:   0.9375rem; /* 15px */
    --ep-lh-body: 1.7;
    --ep-lh-head: 1.15;
    --ep-measure: 68ch;      /* readable line length */

    /* --- Spacing (8px base) --- */
    --ep-sp-2xs: 0.375rem;
    --ep-sp-xs:  0.625rem;
    --ep-sp-sm:  1rem;
    --ep-sp-md:  1.75rem;
    --ep-sp-lg:  2.75rem;
    --ep-sp-xl:  4rem;
    --ep-sp-2xl: 6rem;

    /* --- Radii & elevation --- */
    --ep-radius-sm: 8px;
    --ep-radius:    14px;
    --ep-radius-lg: 20px;
    --ep-radius-pill: 999px;

    --ep-shadow-sm:  0 1px 2px rgba(11, 42, 74, 0.06),
                     0 2px 6px rgba(11, 42, 74, 0.06);
    --ep-shadow:     0 6px 18px rgba(11, 42, 74, 0.08),
                     0 2px 6px rgba(11, 42, 74, 0.05);
    --ep-shadow-lg:  0 18px 48px rgba(11, 42, 74, 0.14),
                     0 6px 16px rgba(11, 42, 74, 0.08);
    --ep-ring:       0 0 0 3px rgba(18, 184, 134, 0.35);

    /* --- Motion --- */
    --ep-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ep-dur:  0.22s;

    /* --- Backwards-compat aliases (older markup/inline refs) --- */
    --ep24-color-primary:   var(--ep-navy);
    --ep24-color-secondary: var(--ep-teal);
    --ep24-color-accent:    var(--ep-petrol-600);
    --ep24-color-text-main: var(--ep-text);
    --ep24-color-text-light:var(--ep-muted);
    --ep24-color-bg-light:  var(--ep-canvas);
    --ep24-color-white:     var(--ep-white);
    --ep24-font-primary:    var(--ep-font-body);
    --ep24-font-heading:    var(--ep-font-head);
    --ep24-spacing-xs:      var(--ep-sp-xs);
    --ep24-spacing-sm:      var(--ep-sp-sm);
    --ep24-spacing-md:      var(--ep-sp-md);
    --ep24-spacing-lg:      var(--ep-sp-lg);
    --ep24-spacing-xl:      var(--ep-sp-xl);
    --ep24-border-radius:   var(--ep-radius);
    --ep24-box-shadow:      var(--ep-shadow);
}

/* --------------------------------------------------------------------------
   2. Base / typography
   -------------------------------------------------------------------------- */
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
    font-family: var(--ep-font-body);
    font-size: var(--ep-fs-body);
    line-height: var(--ep-lh-body);
    color: var(--ep-text);
    background-color: var(--ep-canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ep-font-head);
    color: var(--ep-navy);
    font-weight: 800;
    line-height: var(--ep-lh-head);
    letter-spacing: -0.015em;
}

h1 { font-size: var(--ep-fs-h1); }
h2 { font-size: var(--ep-fs-h2); margin-top: var(--ep-sp-lg); }
h3 { font-size: var(--ep-fs-h3); margin-top: var(--ep-sp-md); }

p { line-height: var(--ep-lh-body); }

.entry-content > p,
.entry-content > ul,
.entry-content > ol { max-width: var(--ep-measure); }

a {
    color: var(--ep-teal-700);
    text-underline-offset: 0.15em;
    text-decoration-thickness: 1px;
    transition: color var(--ep-dur) var(--ep-ease);
}
a:hover { color: var(--ep-cta-600); }

strong, b { color: var(--ep-ink); font-weight: 700; }

::selection { background: var(--ep-teal); color: #fff; }

/* Global focus-visible ring for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--ep-teal-600);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   3. Responsive container & section rhythm
   -------------------------------------------------------------------------- */
.content-area,
.inside-article { width: 100%; }

.entry-content {
    margin-inline: auto;
    padding-inline: var(--ep-sp-sm);
}

@media (min-width: 768px) {
    .entry-content { padding-inline: var(--ep-sp-md); }
}

.entry-content > * + * { margin-top: var(--ep-sp-md); }

/* --------------------------------------------------------------------------
   4. Hero header (module pages)  ->  .entry-header h1
   -------------------------------------------------------------------------- */
.ep-modul .entry-header {
    position: relative;
    margin: 0 0 var(--ep-sp-lg);
    padding: var(--ep-sp-lg) var(--ep-sp-sm) var(--ep-sp-xl);
    background:
        radial-gradient(120% 140% at 12% 0%, rgba(18, 184, 134, 0.20) 0%, rgba(18, 184, 134, 0) 55%),
        radial-gradient(120% 140% at 100% 100%, rgba(12, 114, 133, 0.35) 0%, rgba(12, 114, 133, 0) 60%),
        linear-gradient(135deg, var(--ep-navy-900) 0%, var(--ep-navy) 55%, var(--ep-petrol) 130%);
    color: var(--ep-white);
    overflow: hidden;
    isolation: isolate;
}

/* subtle grid/aurora texture */
.ep-modul .entry-header::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(120% 100% at 80% 0%, #000 0%, transparent 70%);
            mask-image: radial-gradient(120% 100% at 80% 0%, #000 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.ep-modul .entry-header h1 {
    margin: 0 auto;
    max-width: 20ch;
    color: var(--ep-white);
    text-wrap: balance;
    text-shadow: 0 1px 24px rgba(0, 0, 0, 0.25);
}

.ep-modul .entry-header h1::before {
    content: "";
    display: block;
    width: 56px;
    height: 5px;
    margin-bottom: var(--ep-sp-sm);
    border-radius: var(--ep-radius-pill);
    background: linear-gradient(90deg, var(--ep-teal), var(--ep-petrol-600));
}

@media (min-width: 768px) {
    .ep-modul .entry-header {
        padding: var(--ep-sp-xl) var(--ep-sp-lg) calc(var(--ep-sp-xl) + var(--ep-sp-md));
        border-radius: 0 0 var(--ep-radius-lg) var(--ep-radius-lg);
    }
}

/* Generic (non-module) page header, e.g. front page */
.entry-header .entry-title {
    text-wrap: balance;
    margin-bottom: var(--ep-sp-sm);
}

/* --------------------------------------------------------------------------
   5. Buttons  ->  .button / .ep-btn (primary + secondary)
   -------------------------------------------------------------------------- */
.button,
.ep-btn,
input[type="submit"],
button.ep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 0.85rem 1.5rem;
    font-family: var(--ep-font-head);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-decoration: none;
    text-align: center;
    color: var(--ep-white);
    background: linear-gradient(180deg, var(--ep-teal) 0%, var(--ep-teal-600) 100%);
    border: 1px solid transparent;
    border-radius: var(--ep-radius-sm);
    box-shadow: var(--ep-shadow-sm);
    cursor: pointer;
    transition: transform var(--ep-dur) var(--ep-ease),
                box-shadow var(--ep-dur) var(--ep-ease),
                background-color var(--ep-dur) var(--ep-ease),
                color var(--ep-dur) var(--ep-ease);
}

.button:hover,
.ep-btn:hover,
input[type="submit"]:hover {
    color: var(--ep-white);
    background: linear-gradient(180deg, var(--ep-teal-600) 0%, var(--ep-teal-700) 100%);
    box-shadow: var(--ep-shadow);
    transform: translateY(-2px);
}

.button:active,
.ep-btn:active { transform: translateY(0); box-shadow: var(--ep-shadow-sm); }

.button:focus-visible,
.ep-btn:focus-visible,
input[type="submit"]:focus-visible {
    outline: 3px solid var(--ep-navy);
    outline-offset: 2px;
}

/* Secondary / outline button */
.ep-btn--secondary,
.button.ep-btn--secondary {
    color: var(--ep-navy);
    background: var(--ep-surface);
    border-color: var(--ep-line);
    box-shadow: none;
}
.ep-btn--secondary:hover {
    color: var(--ep-navy);
    background: var(--ep-surface-alt);
    border-color: var(--ep-teal);
}

/* --------------------------------------------------------------------------
   6. Calculator form  ->  .ep-calc-form / .ep-calc-field
   -------------------------------------------------------------------------- */
.ep-calc-form {
    display: grid;
    gap: var(--ep-sp-md);
    grid-template-columns: 1fr;
    padding: var(--ep-sp-md);
    margin: 0 0 var(--ep-sp-md);
    background: var(--ep-surface);
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow-sm);
}

@media (min-width: 640px) {
    .ep-calc-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ep-calc-form::before {
    content: "Ihre Angaben";
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-family: var(--ep-font-head);
    font-size: var(--ep-fs-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ep-petrol-600);
}

.ep-calc-field {
    display: flex;
    flex-direction: column;
    gap: var(--ep-sp-2xs);
    margin: 0;
}

.ep-calc-field label {
    font-family: var(--ep-font-head);
    font-size: var(--ep-fs-sm);
    font-weight: 700;
    color: var(--ep-navy);
}

.ep-calc-field input,
.ep-calc-field select,
.ep-calc-form input,
.ep-calc-form select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-family: var(--ep-font-body);
    font-size: var(--ep-fs-body);
    color: var(--ep-ink);
    background: var(--ep-surface);
    border: 1.5px solid var(--ep-line);
    border-radius: var(--ep-radius-sm);
    transition: border-color var(--ep-dur) var(--ep-ease),
                box-shadow var(--ep-dur) var(--ep-ease);
    appearance: none;
    -webkit-appearance: none;
}

/* custom select chevron */
.ep-calc-field select,
.ep-calc-form select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230E5A6B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    cursor: pointer;
}

.ep-calc-field input:hover,
.ep-calc-field select:hover { border-color: #B9C7D3; }

.ep-calc-field input:focus,
.ep-calc-field select:focus,
.ep-calc-form input:focus,
.ep-calc-form select:focus {
    outline: none;
    border-color: var(--ep-teal-600);
    box-shadow: var(--ep-ring);
}

.ep-calc-field input:focus-visible,
.ep-calc-field select:focus-visible {
    outline: none; /* handled by box-shadow ring above */
}

/* --------------------------------------------------------------------------
   7. Summary lead paragraph  ->  .ep-summary
   -------------------------------------------------------------------------- */
.ep-summary {
    position: relative;
    margin: var(--ep-sp-md) 0;
    padding: var(--ep-sp-md) var(--ep-sp-md) var(--ep-sp-md) calc(var(--ep-sp-md) + 6px);
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--ep-text);
    background: linear-gradient(180deg, #FFFFFF 0%, #FBFDFF 100%);
    border: 1px solid var(--ep-line);
    border-left: 6px solid var(--ep-teal);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow-sm);
}

.ep-summary strong { color: var(--ep-navy); font-weight: 800; }
.ep-summary h3 { margin-top: 0; margin-bottom: var(--ep-sp-sm); color: var(--ep-navy); }
.ep-summary p { margin: 0; }
.ep-summary p + p { margin-top: var(--ep-sp-xs); }

/* --------------------------------------------------------------------------
   8. Result table  ->  .ep-aeo-table  (premium key/value data table)
   -------------------------------------------------------------------------- */
.ep-aeo-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: var(--ep-sp-md) 0;
    background: var(--ep-surface);
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius);
    overflow: hidden;
    box-shadow: var(--ep-shadow);
    font-variant-numeric: tabular-nums;
}

.ep-aeo-table caption {
    caption-side: top;
    text-align: left;
    padding: var(--ep-sp-sm) var(--ep-sp-md);
    font-family: var(--ep-font-head);
    font-size: var(--ep-fs-sm);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--ep-white);
    background: linear-gradient(135deg, var(--ep-navy) 0%, var(--ep-petrol) 140%);
}

.ep-aeo-table th,
.ep-aeo-table td {
    padding: 0.95rem var(--ep-sp-md);
    text-align: left;
    border-bottom: 1px solid var(--ep-line-soft);
    vertical-align: baseline;
}

/* row headers = the label column */
.ep-aeo-table th[scope="row"] {
    font-family: var(--ep-font-head);
    font-weight: 700;
    color: var(--ep-navy);
    width: 55%;
    background: var(--ep-surface-alt);
    border-right: 1px solid var(--ep-line-soft);
}

/* value column: right-aligned tabular numbers */
.ep-aeo-table td {
    font-family: var(--ep-font-num);
    font-weight: 600;
    color: var(--ep-ink);
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ep-aeo-table tbody tr:last-child th,
.ep-aeo-table tbody tr:last-child td { border-bottom: 0; }

/* GEG table holds long TEXT (Grund/Maßnahme), not numbers → must wrap, not nowrap.
   Without this the nowrap cell forces the whole document wide → mobile overflow. */
.ep-geg .ep-aeo-table { table-layout: fixed; }
.ep-geg .ep-aeo-table th[scope="row"] { width: 34%; }
.ep-geg .ep-aeo-table td { white-space: normal; text-align: left; overflow-wrap: anywhere; word-break: break-word; font-family: inherit; font-weight: 500; }
/* Global safety: on small screens any result cell may wrap (prevents horiz. overflow). */
@media (max-width: 600px) {
    .ep-aeo-table { table-layout: fixed; }
    .ep-aeo-table td { white-space: normal; overflow-wrap: anywhere; }
    .ep-aeo-table th[scope="row"] { width: 42%; }
}

/* highlight the final "Eigenanteil / netto" row as the takeaway */
.ep-aeo-table tbody tr:last-child th[scope="row"],
.ep-aeo-table tbody tr:last-child td {
    background: var(--ep-cta-050);
    color: var(--ep-cta-600);
    font-size: 1.1rem;
    font-weight: 800;
}
.ep-aeo-table tbody tr:last-child th[scope="row"] { color: var(--ep-navy); }

.ep-aeo-table tbody tr:hover th[scope="row"],
.ep-aeo-table tbody tr:hover td { background: #EEF6F3; }
.ep-aeo-table tbody tr:last-child:hover th[scope="row"],
.ep-aeo-table tbody tr:last-child:hover td { background: #FFE9DC; }

@media (max-width: 560px) {
    .ep-aeo-table th,
    .ep-aeo-table td { padding: 0.8rem var(--ep-sp-sm); }
    .ep-aeo-table th[scope="row"] { width: 50%; }
}

/* --------------------------------------------------------------------------
   9. Förderstand badge  ->  .ep-stand
   -------------------------------------------------------------------------- */
.ep-stand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    margin: var(--ep-sp-md) 0;
    padding: 0.5rem 0.95rem 0.5rem 0.75rem;
    width: fit-content;
    max-width: 100%;
    font-size: var(--ep-fs-sm);
    line-height: 1.5;
    color: var(--ep-muted);
    background: var(--ep-surface);
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius-pill);
    box-shadow: var(--ep-shadow-sm);
}

/* live-status dot */
.ep-stand::before {
    content: "";
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ep-teal);
    box-shadow: 0 0 0 4px rgba(18, 184, 134, 0.18);
}

.ep-stand a {
    color: var(--ep-petrol-600);
    font-weight: 600;
    text-decoration: underline;
}
.ep-stand a:hover { color: var(--ep-cta-600); }

/* --------------------------------------------------------------------------
   10. Local context box  ->  .ep-local
   -------------------------------------------------------------------------- */
.ep-local {
    position: relative;
    margin: var(--ep-sp-md) 0;
    padding: var(--ep-sp-md) var(--ep-sp-md) var(--ep-sp-md) calc(var(--ep-sp-md) + 8px);
    font-size: var(--ep-fs-body);
    color: var(--ep-text);
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(14, 90, 107, 0.06) 0%, rgba(14, 90, 107, 0) 60%),
        var(--ep-surface);
    border: 1px solid var(--ep-line);
    border-left: 4px solid var(--ep-petrol);
    border-radius: var(--ep-radius);
    box-shadow: var(--ep-shadow-sm);
}

.ep-local::before {
    content: "📍 Vor Ort";
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    margin-bottom: 0.4rem;
    font-family: var(--ep-font-head);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ep-petrol-600);
}

.ep-local strong { color: var(--ep-navy); }

/* --------------------------------------------------------------------------
   11. Conversion CTA block  ->  .ep-cta
   -------------------------------------------------------------------------- */
.ep-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ep-sp-sm);
    margin: var(--ep-sp-lg) 0;
    padding: var(--ep-sp-lg) var(--ep-sp-md);
    color: var(--ep-white);
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(18, 184, 134, 0.30) 0%, rgba(18, 184, 134, 0) 55%),
        linear-gradient(135deg, var(--ep-navy) 0%, var(--ep-navy-900) 60%, var(--ep-petrol) 150%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--ep-radius-lg);
    box-shadow: var(--ep-shadow-lg);
    overflow: hidden;
    isolation: isolate;
}

/* Only render the "empty slot" chrome when the CTA has no wired content yet */
.ep-cta:empty { display: none; }

.ep-cta > * { position: relative; z-index: 1; max-width: 60ch; }

.ep-cta,
.ep-cta p,
.ep-cta li { color: var(--ep-white); }

.ep-cta h2,
.ep-cta h3,
.ep-cta h4 { color: var(--ep-white); margin: 0; }

.ep-cta p { font-size: 1.1rem; line-height: 1.55; opacity: 0.94; }

.ep-cta a { color: #A7F3D0; }
.ep-cta a:hover { color: var(--ep-white); }

/* Buttons inside the CTA use the warm conversion colour */
.ep-cta .button,
.ep-cta .ep-btn,
.ep-cta button,
.ep-cta input[type="submit"] {
    background: linear-gradient(180deg, var(--ep-cta) 0%, var(--ep-cta-600) 100%);
    color: var(--ep-white);
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.35);
    font-size: 1.05rem;
    padding: 0.95rem 1.75rem;
}
.ep-cta .button:hover,
.ep-cta .ep-btn:hover,
.ep-cta button:hover,
.ep-cta input[type="submit"]:hover {
    background: linear-gradient(180deg, var(--ep-cta-600) 0%, #9A3412 100%);
    box-shadow: 0 12px 26px rgba(234, 88, 12, 0.45);
    transform: translateY(-2px);
}
.ep-cta .button:focus-visible,
.ep-cta button:focus-visible,
.ep-cta input[type="submit"]:focus-visible {
    outline: 3px solid var(--ep-white);
    outline-offset: 3px;
}

@media (min-width: 768px) {
    .ep-cta { padding: var(--ep-sp-xl) var(--ep-sp-lg); }
}

/* --------------------------------------------------------------------------
   12. Front page — silo grid & cards  ->  .ep-silos-grid / .ep-silo-item
   -------------------------------------------------------------------------- */
.ep-silos-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--ep-sp-md) !important;
    margin-top: var(--ep-sp-lg) !important;
}

/* Override the template's inline card styling for a premium card */
.ep-silo-item {
    display: flex;
    flex-direction: column;
    padding: var(--ep-sp-md) !important;
    background: var(--ep-surface);
    border: 1px solid var(--ep-line) !important;
    border-radius: var(--ep-radius) !important;
    box-shadow: var(--ep-shadow-sm);
    transition: transform var(--ep-dur) var(--ep-ease),
                box-shadow var(--ep-dur) var(--ep-ease),
                border-color var(--ep-dur) var(--ep-ease);
    overflow: hidden;
    position: relative;
}

.ep-silo-item::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--ep-teal), var(--ep-petrol-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ep-dur) var(--ep-ease);
}

.ep-silo-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--ep-shadow-lg);
    border-color: var(--ep-teal) !important;
}
.ep-silo-item:hover::before { transform: scaleX(1); }

.ep-silo-item:focus-within {
    box-shadow: var(--ep-shadow-lg);
    border-color: var(--ep-teal) !important;
}

.ep-silo-title {
    font-size: var(--ep-fs-h3) !important;
    margin: 0 0 var(--ep-sp-xs) !important;
}
.ep-silo-title a { color: var(--ep-navy) !important; text-decoration: none; }
.ep-silo-item:hover .ep-silo-title a { color: var(--ep-petrol-600) !important; }

.ep-silo-item p {
    color: var(--ep-muted);
    font-size: var(--ep-fs-sm);
    margin: 0 0 var(--ep-sp-md);
    flex: 1 1 auto;
}

.ep-silo-item .button { align-self: flex-start; margin-top: auto; }

/* --------------------------------------------------------------------------
   13. Breadcrumbs  ->  .ep-breadcrumbs
   -------------------------------------------------------------------------- */
.ep-breadcrumbs {
    font-size: var(--ep-fs-sm);
    color: var(--ep-muted);
    margin-bottom: var(--ep-sp-md);
}
.ep-breadcrumbs a { color: var(--ep-petrol-600); text-decoration: none; }
.ep-breadcrumbs a:hover { color: var(--ep-cta-600); text-decoration: underline; }
.ep-breadcrumbs .separator,
.ep-breadcrumbs .breadcrumb_last { color: var(--ep-muted); }

/* --------------------------------------------------------------------------
   14. Generic tables & links inside content (non-.ep tables)
   -------------------------------------------------------------------------- */
.entry-content table:not(.ep-aeo-table) {
    width: 100%;
    border-collapse: collapse;
    margin: var(--ep-sp-md) 0;
    background: var(--ep-surface);
    border: 1px solid var(--ep-line);
    border-radius: var(--ep-radius);
    overflow: hidden;
    box-shadow: var(--ep-shadow-sm);
}
.entry-content table:not(.ep-aeo-table) th,
.entry-content table:not(.ep-aeo-table) td {
    padding: 0.8rem var(--ep-sp-sm);
    border-bottom: 1px solid var(--ep-line-soft);
    text-align: left;
}
.entry-content table:not(.ep-aeo-table) thead th {
    background: var(--ep-navy);
    color: var(--ep-white);
    font-family: var(--ep-font-head);
}

/* Small utility helpers */
.ep-center { text-align: center; }
.ep-muted  { color: var(--ep-muted); }

/* Header polish (Claude): logo-only branding, hide redundant text site title */
.site-logo img, .custom-logo { max-height: 60px; width: auto !important; }
.main-navigation .main-nav > ul { justify-content: center; }

/* Rich Wärmepumpe calculator (Claude) */
.ep-calc-wrap{display:grid;gap:1.5rem;grid-template-columns:1fr;margin:1.5rem 0}
@media(min-width:900px){.ep-calc-wrap{grid-template-columns:1fr 1fr;align-items:start}}
.ep-calc-form{display:grid;gap:.9rem;background:#fff;border:1px solid #e4ebf1;border-radius:14px;padding:1.25rem;box-shadow:0 6px 18px rgba(11,42,74,.06)}
.ep-calc-field{margin:0;display:grid;gap:.3rem}
.ep-calc-field label{font-weight:600;font-size:.92rem;color:#0B2A4A}
.ep-calc-field input,.ep-calc-field select{padding:.6rem .7rem;border:1px solid #cbd5e1;border-radius:9px;font-size:1rem;background:#fff}
.ep-calc-field input:focus,.ep-calc-field select:focus{outline:2px solid #12B886;outline-offset:1px;border-color:#12B886}
.ep-foerder-breakdown{background:#f0fbf6;border:1px solid #bfead9;border-radius:12px;padding:1rem 1.25rem;margin:1rem 0}
.ep-foerder-breakdown h3{margin:.2rem 0 .6rem;font-size:1.05rem;color:#0B7D5B}
.ep-bd-list{list-style:none;margin:0;padding:0}
.ep-bd-list li{display:flex;justify-content:space-between;padding:.35rem 0;border-bottom:1px dashed #bfead9}
.ep-bd-list li:last-child{border-bottom:0}
.ep-bd-pct{font-weight:700;color:#0B7D5B;font-variant-numeric:tabular-nums}
.ep-row-highlight td,.ep-row-highlight th{background:#fff4ec;color:#9a3412;font-weight:700}
.ep-calc-disclaimer{color:#64748b;margin-top:.5rem}

/* Module card images (Gemini photos) */
.ep-silo-media{display:block;margin-bottom:1rem;border-radius:10px;overflow:hidden;background:#eef4f8}
.ep-modul-img{display:block;width:100%;height:170px;object-fit:cover}
.ep-modul-ico{display:flex;align-items:center;justify-content:center;width:100%;height:150px;color:#0E5A6B}

/* GEG verdict */
.ep-geg-verdict{padding:1.25rem;border-radius:14px;text-align:center;margin-bottom:1rem}
.ep-geg-verdict--ja{background:#fff4ec;border:2px solid #fdba74}
.ep-geg-verdict--ja .ep-geg-badge{color:#9a3412}
.ep-geg-verdict--nein{background:#f0fbf6;border:2px solid #6ee7b7}
.ep-geg-verdict--nein .ep-geg-badge{color:#0B7D5B}
.ep-geg-badge{font-size:1.5rem;font-weight:800;display:inline-block}

/* GEG calculator layout (2 fields, clean) */
.ep-geg-calc{margin:1.5rem 0}
.ep-geg-calc .ep-calc-form{grid-template-columns:1fr 1fr;max-width:560px;margin-bottom:1.25rem}
@media(max-width:520px){.ep-geg-calc .ep-calc-form{grid-template-columns:1fr}}

/* ===== Header/Hero/Footer fixes (Claude) ===== */
/* Tighten the empty band around the logo */
.site-header .inside-header{padding-top:12px !important;padding-bottom:12px !important}
.custom-logo,.site-logo img{max-height:50px;width:auto}

/* Full-bleed hero + CTA (were boxed inside the container -> empty sides) */

.ep-hero,.ep-cta-band{width:100vw;position:relative;left:50%;right:50%;margin-left:-50vw;margin-right:-50vw}

/* Hide GeneratePress default footer bar — we render our own footer */
.site-info{display:none !important}

/* Custom footer */
.ep-footer{background:#0B2A4A;color:#cdd9e5}
.ep-footer__inner{max-width:1120px;margin:0 auto;padding:3rem 1.25rem 2rem;display:grid;gap:2rem;grid-template-columns:2fr 1fr 1fr 1fr}
@media(max-width:820px){.ep-footer__inner{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.ep-footer__inner{grid-template-columns:1fr}}
.ep-footer__logo{font-size:1.4rem;font-weight:800;color:#fff;display:inline-block;margin-bottom:.3rem}
.ep-footer__24{color:#12B886}
.ep-footer__brand p{color:#9fb3c8;font-size:.92rem;line-height:1.6;max-width:42ch}
.ep-footer__col h3{color:#fff;font-size:1rem;margin:0 0 .8rem}
.ep-footer__col ul{list-style:none;margin:0;padding:0}
.ep-footer__col li{margin:.45rem 0}
.ep-footer__col a{color:#cdd9e5;text-decoration:none}
.ep-footer__col a:hover{color:#12B886;text-decoration:underline}
.ep-footer__bar{border-top:1px solid rgba(255,255,255,.12);text-align:center;padding:1rem 1.25rem}
.ep-footer__bar p{margin:0;color:#8ea6bd;font-size:.82rem}

body{overflow-x:hidden}

/* ============================================================
   DESIGN REFINEMENT PASS (Claude) — more brand character
   ============================================================ */
:root{--ep-ink:#0B2A4A;--ep-teal:#12B886;--ep-petrol:#0E5A6B}

/* Confident, tighter headings with a branded accent underline */
.ep-section h2,.ep-hub-section h2,.ep-cta-band h2{font-weight:800;letter-spacing:-.02em;line-height:1.12}
.ep-section > h2::after{content:"";display:block;width:60px;height:4px;border-radius:99px;background:linear-gradient(90deg,var(--ep-teal),var(--ep-petrol));margin:.75rem auto 0}

/* Section rhythm: alternate white / tint bands */
.ep-frontpage .ep-section{background:transparent}
.ep-frontpage .ep-section:nth-of-type(odd){background:#fff}

/* Silo cards: crisper lift + teal top reveal on hover */
.ep-silo-item{position:relative;transition:transform .2s ease,box-shadow .2s ease;overflow:hidden}
.ep-silo-item::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:linear-gradient(90deg,var(--ep-teal),var(--ep-petrol));transform:scaleX(0);transform-origin:left;transition:transform .25s ease}
.ep-silo-item:hover{transform:translateY(-5px);box-shadow:0 20px 44px rgba(11,42,74,.16)}
.ep-silo-item:hover::before{transform:scaleX(1)}
.ep-silo-item h3{letter-spacing:-.01em}

/* Buttons: bigger, confident, subtle depth */
.button,button[type="submit"].button{background:linear-gradient(180deg,var(--ep-teal),#0ea472);border:0;font-weight:700;letter-spacing:.01em;box-shadow:0 6px 16px rgba(18,184,134,.28);transition:transform .15s ease,box-shadow .15s ease}
.button:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(18,184,134,.36)}

/* "So funktioniert's" step numbers -> branded gradient chips */
.ep-step .n{background:linear-gradient(135deg,var(--ep-teal),var(--ep-petrol));box-shadow:0 4px 10px rgba(14,90,107,.3)}

/* Hero headline: tighter, more editorial */
.ep-hero h1,.ep-hero h2{font-weight:800;letter-spacing:-.025em}
.ep-hero .ep-accent{position:relative}

/* Eyebrow-style section subtitles */
.ep-section .ep-sub{font-size:1.05rem}

/* Nicer focus + link accents */
a{color:#0B7D5B}
.ep-footer__logo,.ep-footer__24{letter-spacing:-.01em}

/* Ratgeber archive + global guide cards */
.ep-arch-hero{background:linear-gradient(135deg,#0B2A4A,#0E5A6B);color:#fff;padding:3rem 1.25rem;text-align:center;width:100vw;position:relative;left:50%;right:50%;margin-left:-50vw;margin-right:-50vw}
.ep-arch-hero__inner{max-width:820px;margin:0 auto}
.ep-arch-hero h1{color:#fff;font-size:clamp(2rem,4vw,2.8rem);margin:.2rem 0 .6rem;font-weight:800;letter-spacing:-.02em}
.ep-arch-lead{color:#dfeaf2;font-size:1.15rem;max-width:60ch;margin:0 auto}
.ep-eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:.8rem;font-weight:700;color:#12B886;margin:0}
.ep-guides{display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.ep-guide{background:#fff;border:1px solid #e4ebf1;border-radius:16px;padding:1.5rem;display:flex;flex-direction:column;gap:.5rem;text-decoration:none;color:inherit;transition:transform .18s ease,box-shadow .18s ease}
.ep-guide:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(11,42,74,.14)}
.ep-guide__tag{align-self:flex-start;background:#e9f7f1;color:#0B7D5B;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;padding:.25rem .6rem;border-radius:99px}
.ep-guide__title{font-size:1.2rem;margin:.3rem 0;color:#0B2A4A;line-height:1.25}
.ep-guide__excerpt{color:#556;font-size:.95rem;line-height:1.6;flex:1}
.ep-guide__more{color:#0B7D5B;font-weight:700;margin-top:.4rem}
.ep-arch-pagination{margin-top:2.5rem;text-align:center}

/* Header: icon logo (left) + text wordmark lockup, centered, minimal whitespace */
.site-header .inside-header{padding-top:6px !important;padding-bottom:6px !important;display:flex;justify-content:center;align-items:center;gap:.45rem;flex-wrap:nowrap}
.site-header .site-logo{margin:0;order:-1}                 /* icon before the wordmark */
.site-header .site-logo a{display:block;line-height:0}
.site-header .site-branding{margin:0}
.custom-logo,.site-logo img{max-height:74px !important;width:auto !important;display:block}
@media(max-width:520px){.custom-logo,.site-logo img{max-height:56px !important}.site-header .inside-header{gap:.3rem}}

/* Text wordmark logo */
.ep-textlogo a{font-weight:800;font-size:2rem;letter-spacing:-.02em;color:#0B2A4A;text-decoration:none;line-height:1;display:inline-block;padding:.15rem 0}
.ep-lg-dot,.ep-lg-24{color:#12B886}
@media(max-width:520px){.ep-textlogo a{font-size:1.55rem}}

/* Logo = crisp styled site title wordmark */
.custom-logo-link,.custom-logo{display:none !important}
.site-header .main-title,.site-header .site-title{display:block !important}
.main-title a,.site-title a{font-size:2rem !important;font-weight:800;letter-spacing:-.025em;color:#0B2A4A !important;text-decoration:none;line-height:1}
@media(max-width:520px){.main-title a,.site-title a{font-size:1.5rem !important}}

/* Flagship "Energie-Fahrplan" feature band */
.ep-flagship{background:linear-gradient(135deg,rgba(11,42,74,.86) 0%,rgba(11,125,91,.80) 60%,rgba(14,90,107,.82) 100%),url('assets/img/hero.webp');background-size:cover;background-position:center 40%;color:#fff;width:100vw;position:relative;left:50%;right:50%;margin-left:-50vw;margin-right:-50vw;padding:4.5rem 1.25rem}
.ep-flagship__inner{max-width:820px;margin:0 auto;text-align:center}
.ep-flagship .ep-eyebrow{color:#a7f3d0}
.ep-flagship h1,.ep-flagship h2{color:#fff;font-size:clamp(1.9rem,4vw,2.9rem);font-weight:800;letter-spacing:-.02em;margin:.4rem 0 .8rem}
.ep-flagship__lead{color:#eafff8;font-size:1.15rem;line-height:1.6;max-width:64ch;margin:0 auto 1.75rem}
.ep-flagship__lead strong{color:#fff}
.ep-flagship__form{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.25)}
.ep-flagship__form .button{background:#fff;color:#0B7D5B}
.ep-flagship__form .button:hover{background:#eafff7}

/* Energie-Fahrplan: viz + lead CTA */
.ep-viz{margin:1.5rem 0 2rem}
.ep-viz__highlight{display:flex;gap:.85rem;align-items:center;background:linear-gradient(135deg,#0f6b3f,#0E5A6B);color:#fff;border-radius:14px;padding:1.1rem 1.3rem;margin-bottom:1.1rem}
.ep-viz__highlight p{margin:0;font-size:1.1rem;line-height:1.5;color:#fff}
.ep-viz__highlight strong{color:#a7f3d0}
.ep-viz__icon{font-size:1.6rem;flex:0 0 auto}
.ep-costbar{display:flex;height:38px;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(11,42,74,.12)}
.ep-costbar__seg{display:flex;align-items:center;justify-content:center;color:#fff;font-size:.8rem;font-weight:700;min-width:0}
.ep-costbar__seg span{padding:0 .4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ep-costbar--wp{background:#0E5A6B}.ep-costbar--pv{background:#12B886}.ep-costbar--sp{background:#f59e0b}
.ep-costbar__legend{font-size:.88rem;color:#556;margin-top:.6rem}
.ep-dot{display:inline-block;width:.7rem;height:.7rem;border-radius:50%;margin-right:.25rem;vertical-align:middle}
.ep-dot--wp{background:#0E5A6B}.ep-dot--pv{background:#12B886}.ep-dot--sp{background:#f59e0b}
.ep-lead-cta{background:#0B2A4A;color:#fff;border-radius:16px;padding:2rem;text-align:center;margin:2rem 0}
.ep-lead-cta h3{color:#fff;margin:0 0 .5rem;font-size:1.4rem}
.ep-lead-cta p{color:#c7d5e2;margin:0 auto 1.2rem;max-width:52ch}
.ep-btn--lead{display:inline-block;background:#12B886;color:#fff;padding:.85rem 1.6rem;border-radius:10px;font-weight:700;text-decoration:none}
.ep-btn--lead:hover{background:#0ea472}
.ep-btn--print{margin-top:.5rem;background:#eef4f8;border:1px solid #cbd5e1;color:#0B2A4A;padding:.7rem 1.2rem;border-radius:10px;font-weight:600;cursor:pointer}

/* ==========================================================================
   PART 2 — SITE-WIDE PREMIUM POLISH  (Claude, additive)
   --------------------------------------------------------------------------
   Distinctive, trustworthy refinement layer on top of the existing system.
   No external fonts (strict CSP): "Inter"/"Montserrat" were never loaded and
   silently fell back — so we commit to a confident, intentional system stack
   and tune the scale for an editorial feel. Everything below is additive and
   uses raised specificity only where it must beat template inline <style>.
   ========================================================================== */

/* --- Refined tokens: intentional type stack + one shadow/rhythm system --- */
:root{
    /* Lead with system-ui so the OS's best UI face is a deliberate choice,
       not an accident of a missing web font. */
    --ep-font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --ep-font-head: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                    Roboto, "Helvetica Neue", Arial, sans-serif;
    --ep-font-num:  ui-monospace, "SF Mono", "Segoe UI", system-ui, sans-serif;

    /* Slightly more generous body measure + calmer reading colour */
    --ep-text:      #26333F;
    --ep-lh-body:   1.72;
    --ep-measure:   66ch;

    /* Eyebrow label — one shared spec used everywhere */
    --ep-eyebrow-fs:   .78rem;
    --ep-eyebrow-track:.14em;

    /* Section vertical rhythm */
    --ep-band:      clamp(3rem, 6vw, 5rem);
}

/* --- Typography: confident, editorial headings --- */
body{ font-family: var(--ep-font-body); letter-spacing: -0.003em; }

h1,h2,h3,h4{ font-feature-settings: "ss01","cv01"; }
h1{ letter-spacing: -0.028em; }
h2{ letter-spacing: -0.021em; }
h3{ letter-spacing: -0.014em; }

/* Balance short headings, wrap long body copy prettily */
h1,h2,h3{ text-wrap: balance; }
.entry-content p{ text-wrap: pretty; }
.entry-content li{ line-height: var(--ep-lh-body); }
.entry-content > ul,
.entry-content > ol{ padding-left: 1.3em; }
.entry-content li::marker{ color: var(--ep-teal-700); }

/* Opening paragraph of an article reads a touch larger (editorial lede) */
.ep-modul .entry-content > p:first-of-type{
    font-size: 1.12rem;
    color: var(--ep-ink);
    line-height: 1.6;
}

/* --- Consistent "eyebrow" label with a small brand tick --- */
.ep-eyebrow{
    display: inline-flex;
    align-items: center;
    gap: .5em;
    font-family: var(--ep-font-head);
    font-size: var(--ep-eyebrow-fs);
    font-weight: 700;
    letter-spacing: var(--ep-eyebrow-track);
    text-transform: uppercase;
    color: var(--ep-teal-700);
}
.ep-eyebrow::before{
    content: "";
    width: 1.5em;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--ep-teal), var(--ep-petrol-600));
}
/* On dark bands the tick + text lighten to stay legible */
.ep-flagship .ep-eyebrow,
.ep-arch-hero .ep-eyebrow,
.ep-cta-band .ep-eyebrow{ color: #A7F3D0; }
.ep-flagship .ep-eyebrow::before,
.ep-arch-hero .ep-eyebrow::before,
.ep-cta-band .ep-eyebrow::before{ background: linear-gradient(90deg,#A7F3D0,rgba(167,243,208,.2)); }

/* --------------------------------------------------------------------------
   Navigation — turn the generic grey GP bar into an intentional navy rail.
   Raised specificity (body prefix / doubled class) to beat GP's inline CSS.
   -------------------------------------------------------------------------- */
body .main-navigation,
body .main-navigation ul ul{
    background-color: var(--ep-navy) !important;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
body .main-navigation{
    box-shadow: 0 1px 0 rgba(11,42,74,.35), 0 6px 18px rgba(11,42,74,.10);
}

/* Top-level links: airier spacing, quieter default colour, an animated
   teal underline that grows on hover/focus. */
body .main-navigation .main-nav ul li a{
    font-family: var(--ep-font-head);
    font-weight: 600;
    letter-spacing: .005em;
    color: #DCE6F0 !important;
    position: relative;
    transition: color var(--ep-dur) var(--ep-ease),
                background-color var(--ep-dur) var(--ep-ease);
}
body .main-navigation .main-nav > ul > li > a{ padding: 1rem 1.15rem; }

body .main-navigation .main-nav > ul > li > a::after{
    content: "";
    position: absolute;
    left: 1.15rem;
    right: 1.15rem;
    bottom: .55rem;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--ep-teal), var(--ep-petrol-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ep-dur) var(--ep-ease);
}

/* Hover / focus (GP hard-codes a grey pill on hover — neutralise it) */
body .main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
body .main-navigation .main-nav ul li:not([class*="current-menu-"]):focus > a,
body .main-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a{
    color: #fff !important;
    background-color: transparent !important;
}
body .main-navigation .main-nav > ul > li:hover > a::after,
body .main-navigation .main-nav > ul > li:focus-within > a::after{ transform: scaleX(1); }

/* Active page: solid teal underline + white text, no grey pill */
body .main-navigation .main-nav ul li[class*="current-menu-"] > a{
    color: #fff !important;
    background-color: transparent !important;
}
body .main-navigation .main-nav > ul > li[class*="current-menu-"] > a::after{
    transform: scaleX(1);
    height: 3px;
    background: var(--ep-teal);
}

/* Sub-menus: navy-700 surface, soft elevation, teal hover text */
body .main-navigation ul ul{
    background-color: var(--ep-navy-700) !important;
    box-shadow: var(--ep-shadow-lg);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 0 0 var(--ep-radius-sm) var(--ep-radius-sm);
    overflow: hidden;
}
body .main-navigation .main-nav ul ul li:hover > a,
body .main-navigation .main-nav ul ul li.sfHover > a{
    color: #fff !important;
    background-color: rgba(18,184,134,.16) !important;
}

/* Keyboard ring stays visible on the dark bar */
body .main-navigation .main-nav ul li a:focus-visible{
    outline: 3px solid var(--ep-teal);
    outline-offset: -3px;
    border-radius: 4px;
}

/* Mobile toggle matches the rail */
body .main-navigation .menu-toggle{ color: #fff !important; }

/* --------------------------------------------------------------------------
   Hero + dark bands — add a subtle branded texture / accent shape (pure CSS).
   .ep-frontpage prefix beats the template's inline .ep-hero rule.
   -------------------------------------------------------------------------- */
.ep-frontpage .ep-hero,
.ep-cta-band,
.ep-flagship{ position: relative; overflow: hidden; isolation: isolate; }

/* Faint engineering-grid + aurora glow, masked so it fades out gracefully */
.ep-frontpage .ep-hero::before,
.ep-cta-band::before{
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(90% 120% at 88% -10%, rgba(18,184,134,.22) 0%, rgba(18,184,134,0) 55%),
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: auto, 46px 46px, 46px 46px;
    -webkit-mask-image: radial-gradient(130% 100% at 75% 0%, #000 0%, transparent 72%);
            mask-image: radial-gradient(130% 100% at 75% 0%, #000 0%, transparent 72%);
    pointer-events: none;
}
.ep-frontpage .ep-hero > *{ position: relative; z-index: 1; }
.ep-cta-band > *{ position: relative; z-index: 1; }

/* Hero headline accent: teal word gets a soft underglow underline */
.ep-frontpage .ep-hero .ep-accent{
    color: var(--ep-teal);
    background: linear-gradient(90deg, rgba(18,184,134,.28), rgba(18,184,134,0));
    background-size: 100% 34%;
    background-position: 0 88%;
    background-repeat: no-repeat;
    padding-inline: .05em;
}

/* Flagship band: a large ghost mark in the corner for depth */
.ep-flagship::after{
    content: "";
    position: absolute;
    z-index: -1;
    right: -6%;
    top: -40%;
    width: 46%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(167,243,208,.18) 0%, rgba(167,243,208,0) 62%);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Section rhythm + shared heading accent for content sections
   -------------------------------------------------------------------------- */
.ep-frontpage .ep-section{ padding-block: var(--ep-band); }

/* Give tinted (even) sections a real card feel instead of a flat colour */
.ep-frontpage .ep-section[style*="background"]{
    border: 1px solid var(--ep-line-soft);
    box-shadow: var(--ep-shadow-sm);
}

/* Content-page h2 accent (mirrors the front-page underline, left-aligned) */
.ep-modul .entry-content h2{ position: relative; padding-bottom: .55rem; }
.ep-modul .entry-content h2::after{
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 52px; height: 4px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--ep-teal), var(--ep-petrol-600));
}

/* --------------------------------------------------------------------------
   Cards / guides — unify elevation + a crisper hover, harmonised with silos
   -------------------------------------------------------------------------- */
.ep-step{
    box-shadow: var(--ep-shadow-sm);
    transition: transform var(--ep-dur) var(--ep-ease),
                box-shadow var(--ep-dur) var(--ep-ease);
}
.ep-step:hover{ transform: translateY(-3px); box-shadow: var(--ep-shadow); }
.ep-step .n{ font-family: var(--ep-font-head); }

.ep-guide{ box-shadow: var(--ep-shadow-sm); position: relative; }
.ep-guide::before{
    content:"";
    position:absolute; inset:0 0 auto 0; height:4px;
    background:linear-gradient(90deg,var(--ep-teal),var(--ep-petrol-600));
    border-radius: var(--ep-radius) var(--ep-radius) 0 0;
    transform: scaleX(0); transform-origin:left;
    transition: transform var(--ep-dur) var(--ep-ease);
}
.ep-guide:hover::before{ transform: scaleX(1); }
.ep-guide__title{ letter-spacing:-.015em; }

/* Media inside silo cards: gentle zoom on hover for life */
.ep-silo-media{ box-shadow: inset 0 0 0 1px rgba(11,42,74,.05); }
.ep-modul-img{ transition: transform .4s var(--ep-ease); }
.ep-silo-item:hover .ep-modul-img{ transform: scale(1.04); }

/* --------------------------------------------------------------------------
   Footer — quieter dividers, brand wordmark accent, tidy hover
   -------------------------------------------------------------------------- */
.ep-footer{ position: relative; }
.ep-footer::before{
    content:"";
    position:absolute; left:0; right:0; top:0; height:3px;
    background:linear-gradient(90deg,var(--ep-teal),var(--ep-petrol-600),var(--ep-navy-700));
}
.ep-footer__col a{
    transition: color var(--ep-dur) var(--ep-ease), padding-left var(--ep-dur) var(--ep-ease);
    text-decoration: none;
}
.ep-footer__col a:hover{ color:#12B886; padding-left:3px; text-decoration:none; }
.ep-footer__col h3{
    font-family: var(--ep-font-head);
    letter-spacing: var(--ep-eyebrow-track);
    text-transform: uppercase;
    font-size: .78rem;
    color: #9fb3c8;
}

/* --------------------------------------------------------------------------
   Mobile safety — keep everything calm and unbroken at small widths
   -------------------------------------------------------------------------- */
@media (max-width: 600px){
    body .main-navigation .main-nav > ul > li > a{ padding: .85rem 1rem; }
    body .main-navigation .main-nav > ul > li > a::after{ left:1rem; right:1rem; }
    .ep-flagship::after{ display:none; }         /* avoid any overflow risk */
    .ep-modul .entry-content > p:first-of-type{ font-size: 1.06rem; }
}

/* Respect reduced-motion for the new transforms/zooms */
@media (prefers-reduced-motion: reduce){
    .ep-silo-item:hover .ep-modul-img{ transform: none; }
    .ep-step:hover{ transform: none; }
}

/* GEG: Regionale Regeln (per-Bundesland uniqueness) */
.ep-regionale-regeln{background:#f0fbf6;border:1px solid #bfead9;border-radius:14px;padding:1.25rem 1.5rem;margin:1.5rem 0}
.ep-regionale-regeln h2{margin:.2rem 0 .9rem;color:#0B7D5B;font-size:1.25rem}
.ep-regeln-liste{margin:0;display:grid;gap:.9rem}
.ep-regeln-item dt{font-weight:700;color:#0B2A4A;margin-bottom:.15rem}
.ep-regeln-item dd{margin:0;color:#3a4a40;line-height:1.55}
.ep-regeln-hinweis{color:#64748b;margin-top:.8rem}

/* Hide the currently-unused empty lead-CTA slots on calculator pages */
.ep-cta[data-ep-cta]{display:none}

/* Prominent "this is only an estimate" notice (all calculators) */
.ep-estimate-warning{display:flex;gap:.7rem;align-items:flex-start;background:#fff8e6;border:1px solid #f2d98a;border-left:5px solid #e0a800;border-radius:10px;padding:.85rem 1.05rem;margin:1.2rem 0;color:#6b5300;line-height:1.5}
.ep-estimate-warning .ep-ew-icon{font-size:1.25rem;line-height:1.3;flex:0 0 auto}
.ep-estimate-warning strong{color:#7a4f00}
.ep-estimate-warning p{margin:0;font-size:.95rem}

/* City-specific data block on the Energie-Fahrplan pages (SEO + trust) */
.ep-stadt-analyse{background:#f4f8fb;border:1px solid #d8e5ef;border-radius:14px;padding:1.4rem 1.5rem;margin:1.6rem 0}
.ep-stadt-analyse h2{margin:0 0 .3rem;color:#0B2A4A}
.ep-stadt-analyse .ep-sa-sub{color:#4b6455;margin:0 0 1rem;font-size:.95rem}
.ep-sa-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:0 0 1.1rem}
.ep-sa-kpi{background:#fff;border:1px solid #d8e5ef;border-radius:10px;padding:12px 14px}
.ep-sa-kpi .ep-sa-label{display:block;font-size:.78rem;text-transform:uppercase;letter-spacing:.03em;color:#5a7089;margin-bottom:5px}
.ep-sa-kpi .ep-sa-value{display:block;font-size:1.25rem;font-weight:700;color:#0B2A4A;line-height:1.15;font-variant-numeric:tabular-nums}
.ep-stadt-analyse p{line-height:1.6;color:#33424f;margin:.5rem 0}
.ep-stadt-analyse .ep-sa-quelle{font-size:.82rem;color:#64748b;margin-top:.8rem}
.ep-stadt-analyse .ep-sa-quelle a{color:#0E5A6B}

/* Regionale Zusatzförderung (Land/Kommune on top of BEG) */
.ep-regio-foerder{background:#eefaf3;border:1px solid #bfe6d0;border-left:5px solid #0f6b3f;border-radius:12px;padding:1.3rem 1.5rem;margin:1.6rem 0}
.ep-regio-foerder h2{margin:0 0 .3rem;color:#0f6b3f;font-size:1.3rem}
.ep-regio-foerder .ep-rf-sub{margin:0 0 1rem;color:#245c40;line-height:1.55}
.ep-rf-list{list-style:none;margin:0;padding:0;display:grid;gap:.7rem}
.ep-rf-list li{display:grid;grid-template-columns:auto auto 1fr;grid-template-areas:"badge amount name" "badge amount desc" "badge amount src";gap:.1rem .8rem;align-items:center;background:#fff;border:1px solid #cfe9da;border-radius:10px;padding:.7rem .9rem}
.ep-rf-badge{grid-area:badge;align-self:center;background:#0f6b3f;color:#fff;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;border-radius:6px;padding:.2rem .5rem;white-space:nowrap}
.ep-rf-amount{grid-area:amount;align-self:center;font-size:1.35rem;font-weight:800;color:#0f6b3f;font-variant-numeric:tabular-nums;white-space:nowrap}
.ep-rf-name{grid-area:name;color:#14432a;font-size:1.02rem}
.ep-rf-desc{grid-area:desc;color:#3a4a40;font-size:.9rem;line-height:1.45}
.ep-rf-src{grid-area:src;font-size:.8rem;color:#0E5A6B}
.ep-rf-note{margin:.9rem 0 0;color:#5a7565}
@media(max-width:560px){.ep-rf-list li{grid-template-columns:auto 1fr;grid-template-areas:"badge amount" "name name" "desc desc" "src src"}}

/* City vs. national comparison bars (Feature 2) */
.ep-sa-compare{margin:.2rem 0 1.2rem;padding:1rem 1.1rem;background:#fff;border:1px solid #d8e5ef;border-radius:12px}
.ep-sa-compare h3{margin:0 0 .8rem;color:#0B2A4A;font-size:1.05rem}
.ep-cmp-row{margin:0 0 .95rem}
.ep-cmp-row:last-child{margin-bottom:0}
.ep-cmp-label{display:block;font-weight:700;color:#33424f;font-size:.9rem;margin-bottom:.25rem}
.ep-cmp-bars{display:grid;gap:4px}
.ep-cmp-bar{height:26px;border-radius:6px;display:flex;align-items:center;min-width:fit-content}
.ep-cmp-bar span{color:#fff;font-size:.8rem;font-weight:700;padding:0 .6rem;white-space:nowrap;font-variant-numeric:tabular-nums}
.ep-cmp-bar--city.is-good{background:#0f6b3f}
.ep-cmp-bar--city.is-bad{background:#c47f17}
.ep-cmp-bar--de{background:#8aa0b3}
.ep-cmp-verdict{display:inline-block;margin-top:.35rem;font-size:.85rem;font-weight:600}
.ep-cmp-verdict.is-good{color:#0f6b3f}
.ep-cmp-verdict.is-bad{color:#a9660c}

/* Complete PLZ box (a city has many postal codes) */
.ep-plz-box{background:#fff;border:1px solid #d8e5ef;border-radius:12px;padding:1rem 1.1rem;margin:0 0 1.2rem}
.ep-plz-box h3{margin:0 0 .5rem;color:#0B2A4A;font-size:1.02rem}
.ep-plz-box .ep-plz-count{color:#5a7089;font-weight:600}
.ep-plz-list{margin:0 0 .5rem;color:#33424f;line-height:1.9;font-variant-numeric:tabular-nums;letter-spacing:.01em}
.ep-plz-note{margin:0;color:#64748b}
.ep-plz-hint{margin:0 0 1rem;color:#64748b}

/* Reale Beispiele (feature ③) — profiles run through the real calculator */
.ep-beispiele{margin:1.8rem 0}
.ep-beispiele h2{margin:0 0 .2rem;color:#0B2A4A}
.ep-bsp-sub{margin:0 0 1rem;color:#4b6455}
.ep-bsp-grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.ep-bsp-card{background:#fff;border:1px solid #d9e6dd;border-radius:12px;padding:16px 18px}
.ep-bsp-card h3{margin:0 0 .3rem;font-size:1.05rem;color:#14432a}
.ep-bsp-meta{margin:0 0 .8rem;font-size:.85rem;color:#5a7089}
.ep-bsp-result{margin:0;display:grid;grid-template-columns:auto 1fr;gap:.35rem .9rem}
.ep-bsp-result dt{color:#4b6455;font-size:.92rem}
.ep-bsp-result dd{margin:0;text-align:right;font-weight:700;color:#0f6b3f;font-variant-numeric:tabular-nums}
.ep-bsp-note{margin:.9rem 0 0;color:#64748b}

/* Global chart-card + gauge (feature ④) — used on PV/Speicher pages too */
.ep-chart-card{border:1px solid #d9e6dd;border-radius:12px;padding:18px 20px 16px;background:#fff;margin:1.4rem 0}
.ep-chart-card h2{margin:0 0 4px;color:#0B2A4A;font-size:1.3rem}
.ep-chart{width:100%;margin:.7rem 0 0}
.ep-chart svg{width:100%;height:auto;display:block}
.ep-chart svg text{font-variant-numeric:tabular-nums}
.ep-chart-figcap{font-size:.92rem;color:#3a4a40;margin:.2rem 0}
.ep-chart-legend{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:.85rem;color:#3a4a40;margin:.7rem 0 0}
.ep-chart-legend span{display:inline-flex;align-items:center;gap:7px}
.ep-chart-legend i{width:15px;height:15px;border-radius:4px;display:inline-block;flex:0 0 auto}
.ep-gauge{display:flex;flex-direction:column;align-items:center;margin:.6rem auto}
.ep-gauge svg{width:240px;max-width:100%;height:auto}
.ep-gauge-cap{text-align:center;margin-top:-.6rem}
.ep-gauge-cap strong{display:block;color:#0B2A4A;font-size:1.08rem}
.ep-gauge-cap span{display:block;color:#5a7089;font-size:.85rem;margin-top:.15rem}

/* Kill horizontal overflow from full-bleed (100vw) hero/footer bands + any stray
   wide element, so mobile never shows a horizontal scrollbar. clip > hidden (no
   scroll container, keeps position:sticky working); hidden is the fallback. */
html{overflow-x:hidden;overflow-x:clip}
/* CRITICAL: 100vw full-bleed sections must be border-box, or width becomes
   100vw + padding (→ 430px on a 390px screen) and the text gets clipped. */
.ep-flagship,.ep-hero,.ep-cta-band,.ep-footer{max-width:100vw;box-sizing:border-box}
.ep-flagship *,.ep-hero *{box-sizing:border-box;min-width:0}
.ep-flagship__inner,.ep-flagship__lead,.ep-hero h1,.ep-hero h2,.ep-hero .ep-lead{max-width:100%;overflow-wrap:break-word}
@media(max-width:600px){
	.ep-flagship{padding:2.6rem 1.15rem}
	.ep-hero{padding:2.4rem 1.15rem}
	.ep-flagship__lead{font-size:1.02rem;line-height:1.5}
	.ep-hero .ep-lead{font-size:1rem}
}

/* On-page consultation form (bottom of calculator pages) + shared lead-form styles */
.ep-beratung{background:#f4f8fb;border:1px solid #d8e5ef;border-radius:14px;padding:1.6rem 1.6rem 1.8rem;margin:2rem 0;scroll-margin-top:90px}
.ep-beratung h2{margin:0 0 .3rem;color:#0B2A4A}
.ep-beratung > p{color:#4b5a6b;margin:0 0 1.2rem}
.ep-lead-form .ep-form-group{margin:0 0 1rem}
.ep-lead-form label{display:block;font-weight:600;color:#14432a;margin-bottom:.3rem}
.ep-lead-form input[type=text],.ep-lead-form input[type=email],.ep-lead-form input[type=tel],.ep-lead-form textarea{width:100%;padding:.7rem .85rem;border:1px solid #b9cfc2;border-radius:8px;font-size:1rem;font-family:inherit;background:#fff}
.ep-lead-form textarea{resize:vertical;min-height:110px}
.ep-lead-form input:focus,.ep-lead-form textarea:focus{outline:2px solid #12B886;border-color:#12B886}
.ep-lead-form input[type=checkbox]{width:auto;margin-right:.5rem;vertical-align:middle}
/* DSGVO consent label must WRAP (block, not flex) or its long text overflows on mobile */
.ep-lead-form .ep-form-group label:has(input[type=checkbox]){font-weight:400;display:block}
.ep-lead-form .ep-btn{display:inline-block;background:#0f6b3f;color:#fff;border:0;border-radius:8px;padding:.85rem 1.9rem;font-size:1rem;font-weight:700;cursor:pointer}
.ep-lead-form .ep-btn:hover{background:#0c5732}
.ep-alert{padding:.9rem 1.1rem;border-radius:8px;margin:0 0 1rem}
.ep-alert-success{background:#eafaf0;border:1px solid #b9e6cb;color:#14432a}
.ep-alert-error{background:#fdecea;border:1px solid #f2c4bf;color:#8a1f1a}
.ep-form-notice{color:#64748b;margin:.2rem 0 1rem}
.ep-lead-form a{text-decoration:underline}

/* Footer disclaimer moved out of the copyright bar into the brand column */
.ep-footer__disclaimer{margin-top:.8rem;opacity:.75;line-height:1.5}
.ep-footer__disclaimer a{text-decoration:underline}
.ep-footer__bar a{color:inherit;text-decoration:underline}
.ep-footer__bar a:hover{color:#fff}
