/* mieterverwaltung.org · Unterseiten (Ratgeber, SEO-Artikel, FAQ, Hilfe, Rechtstexte,
   Notion-Seite, Demo-Registrierung und -Login). Baut auf basis.css auf.
   Die Markup-Klassen dieser Seiten sind historisch gewachsen (page-hero, article,
   sidebar-card, doc-section, notion-*, reg-*) und werden hier in die Sprache der
   Startseite übersetzt, statt jede Seite umzuschreiben. */

/* --- Kompatibilität: alte Variablennamen stehen noch in style="..."-Attributen --- */
:root {
    --navy: var(--ink);
    --white: #fff;
    --gray-50: var(--soft);
    --text: var(--ink);
    --text-2: var(--ink-2);
    --text-inv: #fff;
    --text-inv-2: #C9D5E2;
    --blue: var(--steel-d);
    --amt: var(--steel-d);
    --bleistift: var(--ink-2);
    --green-dk: var(--green);
    --line-dk: rgba(255,255,255,.14);
}

/* --- Seitenkopf eines Artikels --- */
.page-hero, .faq-hero, .notion-hero { background: var(--soft); border-bottom: 1px solid var(--line); padding: 56px 0 60px; }
.page-hero h1, .faq-hero h1, .notion-hero h1 {
    font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; line-height: 1.06; letter-spacing: -.035em;
    margin: 0 0 18px; max-width: 22ch;
}
.page-hero .lead, .lead, .faq-hero p, .notion-hero p { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; color: var(--ink-2); max-width: 640px; margin-bottom: 26px; }
.page-hero .lead b, .lead b { color: var(--ink); }
/* FAQ, Rechtstexte und Notion-Seite haben keinen .wrap: seitliches Polster auf Seitenbreite */
.faq-hero, .notion-hero { padding-left: max(20px, calc((100% - 1160px) / 2)); padding-right: max(20px, calc((100% - 1160px) / 2)); }
.breadcrumb { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--steel-d); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Artikel und Randspalte --- */
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; padding: 64px 0 88px; }
.article { min-width: 0; max-width: 720px; }
.article h2 { font-size: clamp(24px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 48px 0 14px; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 28px 0 10px; }
.article p { color: var(--ink-2); line-height: 1.72; margin-bottom: 16px; }
.article p strong, .article li strong { color: var(--ink); }
.article ul, .article ol { color: var(--ink-2); line-height: 1.72; padding-left: 22px; margin-bottom: 16px; }
.article li { margin-bottom: 8px; }
.article li::marker { color: var(--steel); }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.article a:not(.btn):not(.btn-primary):not(.btn-outline) { color: var(--steel-d); text-underline-offset: 3px; }
.article table, .doc-section table, .compare-table, .cmp-table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 18px 0; }
.article th, .doc-section th, .compare-table th, .cmp-table th {
    font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
    text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.article td, .doc-section td, .compare-table td, .cmp-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.cmp-table tr td:first-child, .compare-table tr td:first-child, .doc-section td:first-child { color: var(--ink); font-weight: 600; }
.cmp-table-wrap, .table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.cmp-table-wrap .cmp-table { margin: 0; min-width: 520px; }

.sidebar { position: sticky; top: 88px; min-width: 0; }
.sidebar-card, .card, .col-card, .crit-card, .db-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px;
}
.sidebar-card h3, .card h3, .col-card h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 10px; }
.sidebar-card p, .card p, .col-card p { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin-bottom: 14px; }
.sidebar-card .btn, .sidebar-card .btn-primary { width: 100%; justify-content: center; }
.toc { list-style: none; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; }
.toc a { font-size: 15px; color: var(--ink-2); padding: 5px 0 5px 12px; border-left: 2px solid var(--line); display: block; text-decoration: none; }
.toc a:hover { color: var(--ink); border-color: var(--steel); }

/* --- Bausteine in den Artikeln --- */
.crit-grid, .benefit-grid, .grid, .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.grid > *, .crit-grid > *, .benefit-grid > *, .two-col > *, .db-grid > * { min-width: 0; }
.crit-card { margin-bottom: 0; }
.crit-card h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.crit-card p, .benefit-item p { font-size: 15px; margin: 0; }
.icon, .step-nr {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 28px; height: 28px; border-radius: 8px; background: var(--steel-l); color: var(--steel-d);
    font-family: var(--mono); font-size: 13px; font-weight: 700;
}
.benefit-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.steps { display: flex; flex-direction: column; gap: 16px; margin: 22px 0; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-body h3 { margin: 2px 0 6px; }
.step-body p { margin: 0; font-size: 15px; color: var(--ink-2); }
.hl { background: linear-gradient(transparent 60%, var(--amber) 60%, var(--amber) 90%, transparent 90%); padding: 0 3px; font-weight: 600; color: var(--ink); }
.ok-c, .check { color: var(--green); font-weight: 700; }
.no-c, .cross { color: var(--red); font-weight: 700; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--steel-l); color: var(--steel-d); }
.more { font-size: 14px; font-weight: 700; color: var(--steel-d); }
.tip-box, .tip, .note, .warn-box, .warn, .disclaimer, .dsgvo-note, .footer-hint {
    border-left: 4px solid var(--steel); background: var(--soft); border-radius: 0 10px 10px 0;
    padding: 14px 18px; margin: 20px 0; font-size: 15px; line-height: 1.65; color: var(--ink-2);
}
.tip-box, .tip { border-left-color: var(--green); }
.warn-box, .warn { border-left-color: var(--amber); background: #FDF7EA; }
.disclaimer, .dsgvo-note, .footer-hint { font-size: 14px; border-left-color: var(--line); }
.faq-item { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq-item h2, .faq-item h3, .faq-item > strong { font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; color: var(--ink); margin: 0 0 8px; display: block; }
.faq-body, .faq-item p { color: var(--ink-2); line-height: 1.7; margin: 0 0 10px; }
.cta-block, .notion-goodie, .feat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; margin: 32px 0; }

/* Abschluss-Aufruf mitten im Artikel: dunkle Karte wie das Bestellband der Startseite */
.cta-block--dunkel { background: var(--ink); border-color: var(--ink); color: #fff; text-align: center; margin-top: 44px; padding: 34px 28px; border-radius: 20px; }
.cta-block--dunkel h3 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: #fff; margin: 0 0 10px; }
.cta-block--dunkel p { color: #C9D5E2; margin: 0 0 22px; }
.cta-block--dunkel .btn-primary, .cta-block--dunkel .btn { background: #fff; color: var(--ink); border-color: #fff; box-shadow: none; }
.cta-block--dunkel .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }

/* „Kurzantwort" am Artikelanfang */
.kurzantwort { background: var(--steel-l); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 36px; }
.kurzantwort p { color: var(--ink); line-height: 1.7; margin: 0; }
.kurzantwort strong { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-d); display: block; margin-bottom: 6px; }

/* --- Alte Button-Namen auf die Buttons der Startseite abbilden --- */
.btn-primary, .btn-hero-primary { background: var(--ink); color: #fff; box-shadow: 0 6px 0 -2px var(--steel); }
.btn-primary:hover, .btn-hero-primary:hover { box-shadow: 0 8px 0 -2px var(--steel); }
.btn-outline, .btn-hero-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-hero-primary, .btn-hero-secondary, .btn-white {
    display: inline-flex; align-items: center; gap: 10px; width: auto; white-space: nowrap;
    font-weight: 700; font-size: 16px; line-height: 1; text-decoration: none;
    padding: 16px 24px; border-radius: 12px; border: 2px solid transparent;
}
.btn-hero-secondary { border-color: var(--ink); color: var(--ink); }
/* Auf hellem Grund braucht der „weiße" Button die dunkle Optik */
.btn-white { background: var(--ink); color: #fff; box-shadow: 0 6px 0 -2px var(--steel); }
a.btn-primary, a.btn-outline, a.btn-white, a.btn-hero-primary, a.btn-hero-secondary { text-decoration: none; }

/* --- FAQ-Seite --- */
.faq { padding: 44px max(20px, calc((100% - 1160px) / 2)) 88px; }
.faq > * { max-width: 780px; }
.faq > h2 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; letter-spacing: -.02em; margin: 40px 0 6px; }
.faq p { color: var(--ink-2); line-height: 1.72; margin: 0 0 12px; }
.faq a:not([class]) { color: var(--steel-d); text-underline-offset: 3px; }

/* --- Dokumentation (/hilfe) --- */
.doc-layout { width: min(1160px, 100% - 40px); margin: 0 auto; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; padding: 56px 0 88px; }
.doc-sidebar { position: sticky; top: 88px; }
.doc-sidebar nav { display: flex; flex-direction: column; gap: 2px; border-left: 2px solid var(--line); }
.doc-sidebar nav a { font-size: 15px; color: var(--ink-2); padding: 6px 0 6px 14px; border-left: 2px solid transparent; margin-left: -2px; text-decoration: none; }
.doc-sidebar nav a:hover { color: var(--ink); border-left-color: var(--steel); }
.doc-content { min-width: 0; max-width: 760px; }
.doc-content h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin: 0 0 10px; }
.doc-content .sub { margin-bottom: 32px; }
.doc-section { margin-bottom: 44px; scroll-margin-top: 84px; }
.doc-section h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; }
.doc-section h3 { font-size: 18px; font-weight: 700; margin: 22px 0 8px; }
.doc-section p, .doc-section li { color: var(--ink-2); line-height: 1.72; }
.doc-section p { margin-bottom: 12px; }
.doc-section ul, .doc-section ol { padding-left: 22px; margin-bottom: 14px; }
.doc-section a:not([class]) { color: var(--steel-d); text-underline-offset: 3px; }

/* --- Notion-Seite --- */
.notion-badge { display: inline-flex !important; width: auto !important; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; background: var(--steel-l); color: var(--steel-d); margin-bottom: 18px; }
.notion-includes, .notion-compare, .notion-form-section { padding: 72px 0; border-top: 1px solid var(--line); }
.notion-includes-inner, .notion-form-inner, .notion-compare-inner { width: min(1160px, 100% - 40px); margin: 0 auto; }
.notion-form-inner > p, .notion-form-inner .notion-success, .notion-form-inner .dsgvo-note { max-width: 560px; }
.notion-includes h2, .notion-compare h2, .notion-form-section h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 14px; }
.db-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin: 24px 0; }
.db-card { margin: 0; }
.db-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; overflow-wrap: break-word; }
.db-card p { font-size: 15px; color: var(--ink-2); }
.db-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--steel-l); font-size: 18px; margin-bottom: 12px; }

/* --- Formulare: Notion, Registrierung, Login --- */
.notion-form { max-width: 560px; }
.notion-form, .reg-card, .login-box { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: 0 30px 60px -34px rgba(20,32,45,.35); }
.reg-card input, .reg-card select, .reg-card textarea,
.notion-form input, .notion-form select, .notion-form textarea,
.login-box input {
    width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
    border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
}
.notion-form input[type=checkbox], .reg-card input[type=checkbox] { width: auto; margin: 0 8px 0 0; accent-color: var(--steel-d); }
.reg-card input:focus, .notion-form input:focus, .login-box input:focus, .notion-form textarea:focus, .notion-form select:focus { outline: none; border-color: var(--steel); box-shadow: 0 0 0 3px var(--steel-l); }
.reg-card label, .notion-form label, .login-box label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.login-box button, .reg-card button, .notion-form button {
    width: 100%; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
    background: var(--ink); color: #fff; border: 0; border-radius: 12px; padding: 15px 18px;
    box-shadow: 0 6px 0 -2px var(--steel); transition: transform .15s var(--ease);
}
.login-box button:hover, .reg-card button:hover, .notion-form button:hover { transform: translateY(-2px); }
.notion-success, .success { border-left: 4px solid var(--green); background: #E9F4EE; padding: 16px 20px; border-radius: 0 12px 12px 0; color: var(--ink); }
.success .icon { background: none; width: auto; height: auto; font-size: 22px; margin-bottom: 6px; }
.success h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.error, .err { border-left: 4px solid var(--red); background: #F8E9E7; padding: 12px 16px; border-radius: 0 10px 10px 0; color: #8E2F26; font-size: 15px; margin-bottom: 14px; }
.ok-box { border-left: 4px solid var(--green); background: #E8F3EC; padding: 12px 16px; border-radius: 0 10px 10px 0; color: #1F5A36; font-size: 15px; margin-bottom: 14px; }
.login-box .pw-vergessen { margin: 14px 0 0; font-size: 14px; text-align: center; }
.login-box .pw-vergessen a { color: var(--steel); }
.sub { color: var(--ink-2); font-size: 16px; }
.login-link { font-size: 15px; font-weight: 700; color: var(--steel-d); }
.login-link a, .sub a, .dsgvo a { color: var(--steel-d); text-underline-offset: 3px; }
.dsgvo { font-size: 13px; color: var(--ink-3); margin-top: 12px; }
.demo-badge { display: inline-flex; align-items: center; font-size: 11px; font-weight: 800; letter-spacing: .12em; padding: 4px 10px; border-radius: 6px; background: var(--amber); color: var(--ink); margin-bottom: 14px; }

/* Login und Registrierung mittig, ohne Kopfleiste */
body:has(> .login-box) { background: var(--soft); display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.login-box { width: 100%; max-width: 420px; margin: 0 auto; }
.login-box h1, .reg-card h1 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 0 0 6px; }
.login-box .sub { margin-bottom: 20px; }
.reg-wrap { max-width: 520px; margin: 0 auto; padding: 56px 20px; }
.reg-wrap > .logo { justify-content: center; margin-bottom: 28px; }
.reg-card p { color: var(--ink-2); margin: 0 0 18px; }
body:has(.reg-wrap) { background: var(--soft); }

/* --- Ratgeber-Übersicht: ganze Karte als Link --- */
a.card { display: block; color: inherit; text-decoration: none; transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--steel); box-shadow: 0 20px 40px -28px rgba(20,32,45,.45); }
.card h2 { font-size: 19px; font-weight: 800; letter-spacing: -.015em; line-height: 1.25; margin: 12px 0 8px; }
.card p { font-size: 15px; margin-bottom: 12px; }
.card.feat { border-left: 4px solid var(--steel); margin: 0; }
a.card .more { text-decoration: underline; text-underline-offset: 3px; }
.wrap > .grid { margin: 48px 0 88px; }

/* --- Lange deutsche Komposita brechen lassen --- */
.page-hero h1, .faq-hero h1, .notion-hero h1, .doc-content h1,
.article h2, .article h3, .doc-section h2, .doc-section h3, .faq-item h2, .faq-item h3,
.card h2, .card h3, .col-card h3, .crit-card h3 { overflow-wrap: break-word; }
@media (max-width: 700px) {
    .page-hero h1, .faq-hero h1, .notion-hero h1, .doc-content h1, .article h2,
    .card h2, .crit-card h3, .db-card h3 { hyphens: auto; }
}

/* --- Responsive --- */
@media (max-width: 1000px) {
    .content-grid { grid-template-columns: 1fr; gap: 36px; padding: 44px 0 72px; }
    .doc-layout { grid-template-columns: 1fr; gap: 28px; padding: 40px 0 72px; }
    .sidebar, .doc-sidebar { position: static; }
}
@media (max-width: 700px) {
    .crit-grid, .benefit-grid, .grid, .two-col { grid-template-columns: 1fr; }
    .page-hero, .faq-hero, .notion-hero { padding: 40px 0 44px; }
    .cta-block, .cta-block--dunkel { padding: 24px 20px; }
    .article .btn, .sidebar .btn, .btn-primary, .btn-outline, .btn-hero-primary, .btn-hero-secondary, .btn-white { white-space: normal; }
}
