/* ==============================================================================
   GenauerRechner - Design System & Haupt-Stylesheet (main.css)
   Mobile-First, Pure Vanilla CSS, Modern FinTech / SaaS Ästhetik
   ============================================================================== */

/* Self-gehostete Schriften (Inter, SIL Open Font License) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/Inter-Regular.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/Inter-Medium.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/Inter-SemiBold.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/Inter-Bold.woff') format('woff'); }
@font-face { font-family: 'Inter Display'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/InterDisplay-SemiBold.woff') format('woff'); }
@font-face { font-family: 'Inter Display'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/InterDisplay-Bold.woff') format('woff'); }
@font-face { font-family: 'Inter Display'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/InterDisplay-ExtraBold.woff') format('woff'); }

:root {
    /* Farbpalette Hellmodus */
    --color-primary-900: #073B33;
    --color-primary-800: #0B4F44;
    --color-primary-700: #0E6153;
    --color-primary-600: #127A68;
    --color-primary-500: #1E9A84;
    --color-primary-100: #D5EFE8;
    --color-primary-50:  #EDF8F5;

    --color-accent-teal: #10b981;
    --color-accent-teal-dark: #059669;
    --color-accent-teal-light: #ecfdf5;

    --color-accent-amber: #F2B01E;
    --color-accent-amber-light: #FDF3D3;

    --color-danger: #dc2626;
    --color-danger-light: #fef2f2;

    --color-slate-950: #020617;
    --color-slate-900: #0f172a;
    --color-slate-800: #1e293b;
    --color-slate-700: #334155;
    --color-slate-600: #475569;
    --color-slate-500: #64748b;
    --color-slate-400: #94a3b8;
    --color-slate-300: #cbd5e1;
    --color-slate-200: #e2e8f0;
    --color-slate-100: #f1f5f9;
    --color-slate-50:  #f8fafc;

    /* Semantische Tokens */
    --bg-page: #F4F7F6;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-surface-subtle: var(--color-slate-100);
    
    --text-main: var(--color-slate-900);
    --text-muted: var(--color-slate-600);
    --text-subtle: var(--color-slate-400);
    --text-inverse: #ffffff;

    --border-subtle: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-focus: var(--color-primary-600);

    --primary-gradient: linear-gradient(135deg, #0B4F44 0%, #127A68 100%);
    --result-gradient: linear-gradient(135deg, #0B4F44 0%, #127A68 100%);
    --hero-gradient: linear-gradient(180deg, #EDF8F5 0%, #F4F7F6 100%);

    /* Typografie */
    --font-heading: 'Inter Display', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Schatten */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.09), 0 8px 10px -6px rgba(15, 23, 42, 0.05);

    /* Radien */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Übergänge */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 350ms cubic-bezier(0.16, 1, 0.3, 1);

    --container-max: 1200px;
}

/* Dunkelmodus (Dark Theme) */
html.theme-dark {
    --bg-page: #0a1412;
    --bg-surface: #10201c;
    --bg-surface-elevated: #162a25;
    --bg-surface-subtle: #0d1a17;
    --color-primary-600: #3CC0A6;
    --color-primary-700: #62D2BB;
    --color-primary-100: #17342d;
    --color-primary-50: #12261f;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    --border-subtle: #1e293b;
    --border-medium: #334155;

    --hero-gradient: linear-gradient(180deg, #0f172a 0%, #0b1120 100%);
    --color-slate-100: #1e293b;
    --color-slate-50: #0b1120;

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
}

/* ==============================================================================
   Reset & Basis
   ============================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--color-primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-800);
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
}

/* Barrierefreier Sprunglink */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--color-primary-800);
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    z-index: 99999;
    box-shadow: var(--shadow-xl);
    transition: top var(--transition-fast);
}
.skip-link:focus {
    top: 1rem;
    outline: 3px solid var(--color-accent-amber);
}

/* Hilfsklassen */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }

/* ==============================================================================
   Header & Navigation
   ============================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
    transition: all var(--transition-normal);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.logo-text-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.logo-main {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--color-primary-800);
    letter-spacing: -0.02em;
}

html.theme-dark .logo-main {
    color: #ffffff;
}

.logo-badge {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-primary-600);
    background: var(--color-primary-50);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-primary-100);
}

html.theme-dark .logo-badge {
    background: rgba(30, 154, 132, 0.2);
    border-color: rgba(30, 154, 132, 0.4);
    color: #8FD9C8;
}

/* Desktop Menü */
.desktop-nav {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: block;
    }
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.is-active {
    color: var(--color-primary-600);
    background: var(--bg-surface-subtle);
}

.dropdown-chevron {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.nav-item-dropdown {
    position: relative;
}

.nav-item-dropdown:hover .mega-menu,
.nav-item-dropdown:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item-dropdown:hover .dropdown-chevron {
    transform: rotate(180deg);
}

/* Mega-Menu */
.mega-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 680px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--transition-normal);
    z-index: 1050;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.mega-col-header .cat-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary-600);
    background: var(--color-primary-50);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

html.theme-dark .mega-col-header .cat-pill {
    background: rgba(18, 122, 104, 0.2);
    color: #8FD9C8;
}

.mega-sublist {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mega-item-link {
    display: block;
    padding: 0.35rem 0.45rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
}

.mega-item-link:hover {
    color: var(--color-primary-600);
    background: var(--bg-surface-subtle);
}

.mega-menu-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    text-align: right;
}

.mega-all-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary-600);
}

/* Header Aktionen */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    background: var(--bg-surface-subtle);
    transition: all var(--transition-fast);
}

.action-icon-btn:hover {
    color: var(--text-main);
    background: var(--border-subtle);
}

/* Dark Mode Icon Toggle */
.icon-sun { display: none; }
.icon-moon { display: block; }
html.theme-dark .icon-sun { display: block; }
html.theme-dark .icon-moon { display: none; }

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-subtle);
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ==============================================================================
   Mobile Drawer Navigation
   ============================================================================== */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.mobile-drawer-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85%;
    max-width: 380px;
    background: var(--bg-surface);
    z-index: 2010;
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-drawer.is-active {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.drawer-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.drawer-close-btn {
    font-size: 1.8rem;
    line-height: 1;
    color: var(--text-muted);
}

.drawer-content {
    padding: 1.5rem;
    flex: 1;
}

.drawer-search-box {
    margin-bottom: 1.5rem;
}

.drawer-search {
    width: 100%;
}

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mobile-cat-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-subtle);
    margin: 1rem 0 0.25rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.mobile-nav-link:hover, .mobile-nav-link.is-active {
    background: var(--bg-surface-subtle);
    color: var(--color-primary-600);
}

.mobile-link-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    background: var(--color-primary-50);
    color: var(--color-primary-700);
}

/* ==============================================================================
   Search Modal (Globale Suche)
   ============================================================================== */
.search-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    z-index: 3000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 5vh 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.search-modal-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

.search-modal-window {
    width: 100%;
    max-width: 640px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border-medium);
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    gap: 0.75rem;
}

.search-input-icon {
    width: 22px;
    height: 22px;
    color: var(--text-subtle);
}

.search-modal-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    background: transparent;
    color: var(--text-main);
}

.search-modal-close {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.search-results-list {
    max-height: 380px;
    overflow-y: auto;
    padding: 0.75rem;
}

.search-hint {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.25rem;
    transition: background var(--transition-fast);
}

.search-result-item:hover, .search-result-item.is-selected {
    background: var(--color-primary-50);
}

html.theme-dark .search-result-item:hover,
html.theme-dark .search-result-item.is-selected {
    background: rgba(18, 122, 104, 0.2);
}

.search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

.search-result-cat {
    font-size: 0.75rem;
    color: var(--color-primary-600);
}

.search-modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: var(--bg-surface-subtle);
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
}

kbd {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-family: inherit;
    font-weight: 600;
}

/* ==============================================================================
   Buttons & Badges
   ============================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(18, 122, 104, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(18, 122, 104, 0.35);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-surface-subtle);
    color: var(--text-main);
    border-color: var(--border-medium);
}

.btn-secondary:hover {
    background: var(--border-subtle);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary-600);
    border-color: var(--color-primary-600);
}

.btn-outline:hover {
    background: var(--color-primary-50);
}

html.theme-dark .btn-outline:hover {
    background: rgba(18, 122, 104, 0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text-main);
    background: var(--bg-surface-subtle);
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
}

.badge-stand {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

html.theme-dark .badge-stand {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

.badge-cat {
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    border: 1px solid var(--color-primary-100);
}

/* ==============================================================================
   Formulare & Inputs
   ============================================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
    color: var(--text-main);
}

.label-hint {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background-color: var(--bg-surface);
    color: var(--text-main);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary-600);
    box-shadow: 0 0 0 3px rgba(18, 122, 104, 0.15);
}

.input-suffix {
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-medium);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.input-group .form-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.form-range-wrap {
    margin-top: 0.5rem;
}

.form-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-medium);
    outline: none;
    accent-color: var(--color-primary-600);
}

.form-error {
    margin-top: 0.35rem;
    font-size: 0.825rem;
    color: var(--color-danger);
    font-weight: 500;
}

/* Tooltip */
.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--border-medium);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: help;
    margin-left: 0.35rem;
    position: relative;
}

.tooltip-trigger:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    padding: 0.5rem 0.75rem;
    background: var(--color-slate-900);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    pointer-events: none;
}

/* ==============================================================================
   Homepage Styles (Hero, Tool-Grid, Trust)
   ============================================================================== */
.hero-section {
    background: var(--hero-gradient);
    padding: 3.5rem 0 3rem;
    border-bottom: 1px solid var(--border-subtle);
    text-align: center;
}

.hero-badge-wrap {
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.5vw + 0.5rem, 1.25rem);
    color: var(--text-muted);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-search-box {
    max-width: 620px;
    margin: 0 auto;
    position: relative;
}

.hero-search-input {
    width: 100%;
    min-height: 58px;
    padding: 0.75rem 1.25rem 0.75rem 3.25rem;
    font-size: 1.1rem;
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-medium);
    box-shadow: var(--shadow-lg);
    background: var(--bg-surface);
}

.hero-search-input:focus {
    border-color: var(--color-primary-600);
    box-shadow: 0 0 0 4px rgba(18, 122, 104, 0.2);
}

.hero-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    color: var(--color-primary-600);
}

/* Tool Grid */
.section-tools {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: clamp(1.6rem, 2.5vw + 0.5rem, 2.25rem);
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tool-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-200);
}

.tool-card-top {
    margin-bottom: 1.25rem;
}

.tool-icon-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    margin-bottom: 1rem;
}

html.theme-dark .tool-icon-pill {
    background: rgba(18, 122, 104, 0.2);
    color: #8FD9C8;
}

.tool-icon-svg {
    width: 26px;
    height: 26px;
}

.tool-card-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-accent-teal-dark);
    background: var(--color-accent-teal-light);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    float: right;
}

.tool-card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.tool-card-desc {
    font-size: 0.925rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.tool-card-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-card-calc {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary-600);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tool-card:hover .btn-card-calc {
    color: var(--color-primary-800);
}

/* Vertrauensbereich (Trust Section) */
.section-trust {
    background: var(--bg-surface);
    padding: 3.5rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}

.trust-item {
    text-align: center;
    padding: 1rem;
}

.trust-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

html.theme-dark .trust-icon-wrap {
    background: rgba(18, 122, 104, 0.2);
    color: #8FD9C8;
}

.trust-title {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.trust-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Kategorien Section */
.section-categories {
    padding: 4rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all var(--transition-fast);
    display: block;
}

.category-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary-500);
    box-shadow: var(--shadow-md);
}

.category-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-primary-50);
    color: var(--color-primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* SEO-Textblock */
.section-seo-text {
    padding: 3.5rem 0;
    background: var(--bg-surface-subtle);
}

.seo-text-container {
    max-width: 820px;
    margin: 0 auto;
}

.seo-text-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.seo-text-container p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ==============================================================================
   Rechner-Seiten Layout (Two-Column Desktop, Sticky Sidebar)
   ============================================================================== */
.calc-page-layout {
    padding: 2rem 0 4rem;
}

.calc-breadcrumbs {
    margin-bottom: 1.5rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb-sep {
    color: var(--text-subtle);
}

.breadcrumb-list a {
    color: var(--text-muted);
}

.breadcrumb-list a:hover {
    color: var(--color-primary-600);
}

.breadcrumb-list .current {
    color: var(--text-main);
    font-weight: 600;
}

.calc-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .calc-grid-wrapper {
        grid-template-columns: 7fr 3fr;
        align-items: start;
    }
}

.calc-main-column {
    min-width: 0;
}

.calc-header-box {
    margin-bottom: 2rem;
}

.calc-meta-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.calc-page-title {
    font-size: clamp(1.8rem, 3vw + 0.5rem, 2.5rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.calc-intro-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Rechner-Kasten (Calculator Card) */
.calculator-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 1.75rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .calculator-card {
        padding: 2.5rem;
    }
}

.calc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.calc-card-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.calc-inputs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .calc-inputs-grid.grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .calc-inputs-grid.grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.calc-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Ergebnis-Bereich (Result Box) */
.result-box {
    background: var(--bg-surface-elevated);
    border: 2px solid var(--color-accent-teal);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.result-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.result-badge {
    background: var(--color-accent-teal-light);
    color: var(--color-accent-teal-dark);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
}

.result-main-highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(18, 122, 104, 0.05) 100%);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-main-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.result-main-value {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--color-accent-teal-dark);
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

html.theme-dark .result-main-value {
    color: #34d399;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.result-table th, .result-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.result-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.result-table tr:nth-child(even) {
    background: var(--bg-surface-subtle);
}

.result-disclaimer {
    font-size: 0.8rem;
    color: var(--text-subtle);
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
}

/* ==============================================================================
   SEO-Artikel (1.000–1.400 Wörter) Layout
   ============================================================================== */
.article-content {
    max-width: 75ch;
    margin-top: 3.5rem;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-main);
}

.article-content h2 {
    font-size: 1.65rem;
    margin-top: 2.75rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-subtle);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.25rem;
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
}

.article-content p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0 2rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-table th {
    background: var(--color-primary-800);
    color: #ffffff;
    font-weight: 600;
    padding: 0.85rem 1rem;
    text-align: left;
}

.article-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.article-table tr:nth-child(even) td {
    background: var(--bg-surface-subtle);
}

/* FAQ Accordion */
.faq-section {
    margin-top: 3rem;
}

.faq-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.faq-item:hover {
    border-color: var(--color-primary-300);
}

.faq-question {
    width: 100%;
    padding: 1.1rem 1.25rem;
    font-weight: 600;
    font-size: 1.05rem;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--text-main);
}

.faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform var(--transition-normal);
    color: var(--color-primary-600);
}

.faq-item.is-open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
    display: none;
}

.faq-item.is-open .faq-answer {
    display: block;
}

/* Ähnliche Rechner am Ende */
.related-tools-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.related-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ==============================================================================
   Sidebar
   ============================================================================== */
.calculator-sidebar {
    min-width: 0;
}

.sidebar-sticky-wrap {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-search-form .input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search-input {
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--bg-surface-subtle);
    font-size: 0.9rem;
}

.sidebar-search-btn {
    position: absolute;
    right: 0.5rem;
    color: var(--text-muted);
}

.sidebar-tool-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-tool-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.sidebar-tool-card:hover, .sidebar-tool-card.is-active {
    background: var(--bg-surface-subtle);
}

.sidebar-tool-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-50);
    color: var(--color-primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

html.theme-dark .sidebar-tool-icon {
    background: rgba(18, 122, 104, 0.2);
    color: #8FD9C8;
}

.sidebar-tool-meta {
    flex: 1;
    min-width: 0;
}

.sidebar-tool-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-tool-cat {
    display: block;
    font-size: 0.75rem;
    color: var(--text-subtle);
}

.sidebar-arrow {
    color: var(--text-subtle);
    font-size: 0.9rem;
}

.sidebar-cat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.sidebar-cat-link:hover, .sidebar-cat-link.is-active {
    background: var(--bg-surface-subtle);
    color: var(--color-primary-600);
}

.cat-count-badge {
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--bg-surface-subtle);
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
}

.sidebar-trust-box {
    background: linear-gradient(135deg, rgba(18, 122, 104, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px dashed var(--color-primary-300);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.trust-icon-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.trust-check-icon {
    width: 20px;
    height: 20px;
    color: var(--color-accent-teal-dark);
}

.trust-text {
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ==============================================================================
   Footer
   ============================================================================== */
.site-footer {
    margin-top: auto;
    background: var(--color-slate-950);
    color: #e2e8f0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-top {
    padding: 4rem 1.25rem 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 4fr 2fr 2fr 3fr;
    }
}

.footer-logo {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo .logo-main {
    color: #ffffff;
    font-size: 1.4rem;
}

.footer-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.trust-badge-footer {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-full);
}

.trust-icon {
    width: 16px;
    height: 16px;
}

.footer-title {
    color: #ffffff;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.footer-links a {
    color: #94a3b8;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-cookie-btn {
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: left;
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.footer-cookie-btn:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 0;
    font-size: 0.825rem;
    color: #64748b;
}

.footer-bottom-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom-inner {
        flex-direction: row;
        text-align: left;
    }
}

.disclaimer-note {
    display: block;
    margin-top: 0.25rem;
}

.badge-de {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    color: #94a3b8;
}

/* ==============================================================================
   Cookie Consent Banner Modal
   ============================================================================== */
.cookie-banner-dialog {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-medium);
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
    z-index: 9999;
    padding: 1.25rem 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
    animation: cookieSlideUp 300ms ease-out;
}
.cookie-banner-dialog[hidden] { display: none; }
.cookie-banner-inner { max-width: var(--container-max); margin: 0 auto; }
.cookie-view-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 2rem;
    row-gap: 0.25rem;
    align-items: center;
}
.cookie-view-main .cookie-header { grid-column: 1; margin-bottom: 0; }
.cookie-view-main .cookie-text { grid-column: 1; margin-bottom: 0; max-width: 78ch; }
.cookie-view-main .cookie-actions-row { grid-column: 2; grid-row: 1 / span 2; flex-wrap: nowrap; }
.cookie-view-settings { max-width: 760px; margin: 0 auto; }
@media (max-width: 900px) {
    .cookie-view-main { grid-template-columns: 1fr; }
    .cookie-view-main .cookie-actions-row { grid-column: 1; grid-row: auto; flex-wrap: wrap; margin-top: 0.75rem; }
    .cookie-view-main .cookie-actions-row .btn { flex: 1 1 auto; }
}

@keyframes cookieSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.cookie-icon-pill {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary-50);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-title {
    font-size: 1.2rem;
}

.cookie-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cookie-link {
    color: var(--color-primary-600);
    text-decoration: underline;
}

.cookie-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Cookie Settings View */
.cookie-category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.25rem 0 1.5rem;
}

.cookie-category-card {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.cookie-cat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cookie-cat-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cat-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.cat-badge-required {
    font-size: 0.7rem;
    background: var(--border-medium);
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.cookie-cat-desc {
    font-size: 0.825rem;
    color: var(--text-muted);
}

.switch-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-medium);
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-primary-600);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.switch-toggle.is-disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.cookie-settings-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* ==============================================================================
   Flash Messages & Alerts
   ============================================================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background: var(--color-accent-teal-light);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-accent-teal-dark);
}

.alert-error {
    background: var(--color-danger-light);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: var(--color-danger);
}

/* ==============================================================================
   Werbung (Ad Slots) - Inhalte stehen in config/ads.php
   ============================================================================== */
.ad-slot {
    position: relative;
    margin: 1.75rem auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}
.ad-slot[hidden] { display: none; }
.ad-label {
    display: block;
    font-size: 0.72rem;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--text-subtle);
    margin-bottom: 0.4rem;
}
.ad-body { display: flex; justify-content: center; align-items: center; min-height: 1px; max-width: 100%; }
.ad-body > * { max-width: 100%; }
.ad-wrap { padding-top: 0; padding-bottom: 0; }
.ad-slot--header { margin: 1rem auto 0; }
.ad-slot--footer { margin: 2.5rem auto; }
.ad-slot--sidebar-top, .ad-slot--sidebar-bottom { margin: 0; }
.ad-slot--result-bottom, .ad-slot--article-middle { margin: 2rem auto; }

/* Geräte-Steuerung aus config/ads.php ('devices') */
@media (max-width: 767px) { .ad-devices-desktop { display: none !important; } }
@media (min-width: 768px) { .ad-devices-mobile { display: none !important; } }

/* Seitenleiste: Widgets normal im Fluss, großes Anzeigenformat bleibt sichtbar */
.sidebar-sticky-wrap.has-sticky-ad-below { position: static; }
.sidebar-ad-sticky { position: sticky; top: 96px; margin-top: 1.5rem; }

/* Sticky Footer Ad */
.ad-slot--sticky-footer {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    margin: 0;
    padding: 0.35rem 2.5rem 0.4rem;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-medium);
    box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.1);
    z-index: 900; /* unter dem Cookie-Banner (9999) */
}
.ad-slot--sticky-footer .ad-label { margin-bottom: 0.2rem; }
.ad-close {
    position: absolute;
    top: 0.2rem; right: 0.5rem;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--bg-surface-subtle);
    color: var(--text-muted);
    font-size: 1.3rem; line-height: 1;
}
.ad-close:hover { background: var(--color-slate-200); color: var(--text-main); }
body.has-sticky-ad { padding-bottom: 96px; }

/* Demo-Modus (config/ads.php: 'demo_mode' => true) */
.ad-demo {
    flex-direction: column;
    gap: 0.15rem;
    width: 100%;
    max-width: 728px;
    min-height: 90px;
    padding: 0.75rem;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-md);
    background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(18, 122, 104, 0.05) 10px 20px);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.ad-slot--result-bottom .ad-demo, .ad-slot--article-middle .ad-demo { max-width: 336px; min-height: 250px; }
.ad-slot--sidebar-top .ad-demo { max-width: 300px; min-height: 250px; }
.ad-slot--sidebar-bottom .ad-demo { max-width: 300px; min-height: 600px; }
.ad-slot--sticky-footer .ad-demo { min-height: 50px; padding: 0.4rem; }

@media print { .ad-slot, .ad-wrap { display: none !important; } }

/* Inhaltsverzeichnis im Ratgeber-Artikel */
.article-content h2[id], .article-content h3[id] { scroll-margin-top: 96px; }
.article-toc {
    margin: 0 0 2rem;
    padding: 1.1rem 1.4rem 1.2rem;
    background: var(--bg-surface-subtle);
    border-left: 4px solid var(--color-accent-amber);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.article-toc-title { display: block; font-family: var(--font-heading); font-size: 1.05rem; margin-bottom: 0.5rem; }
.article-toc ol { margin: 0; padding-left: 1.25rem; columns: 2; column-gap: 2rem; }
.article-toc li { margin: 0.2rem 0; break-inside: avoid; font-size: 0.95rem; }
.article-toc a { color: var(--color-primary-700); text-decoration: none; }
.article-toc a:hover { text-decoration: underline; }
@media (max-width: 700px) { .article-toc ol { columns: 1; } }

/* Hinweisboxen im Ratgeber-Artikel: <div class="article-callout"> ... </div> */
.article-callout {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background: var(--color-primary-50);
    border-left: 4px solid var(--color-primary-600);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.article-callout.is-warning { background: var(--color-accent-amber-light); border-left-color: var(--color-accent-amber); }
.article-callout p { margin: 0.35rem 0 0; }
.article-callout > strong:first-child { display: block; font-family: var(--font-heading); }
.article-content h3 { margin-top: 1.5rem; }
