/* ============================================================
   GEO-Analyse-Tool — Design-System
   Ruhige, zurückhaltende Oberfläche: eine Akzentfarbe, klare
   Typografie-Hierarchie, konsistente Radien/Abstände statt
   bunter Verläufe und Zufallsfarben.
   ============================================================ */

:root {
    --ink: #14181f;
    --ink-soft: #444b56;
    --ink-muted: #767c87;
    --border: #e1e4ea;
    --border-strong: #c9ced7;
    --surface: #f7f8fa;
    --surface-strong: #eef0f3;
    --bg: #ffffff;

    --accent: #0f6f6b;
    --accent-hover: #0b5754;
    --accent-soft: #e4f2f1;

    --danger: #b3261e;
    --danger-soft: #fbe6e4;
    --success: #1c7a3e;
    --success-soft: #e5f4ea;
    --warn: #9a6300;
    --warn-soft: #fbf0da;

    --radius-sm: 6px;
    --radius: 9px;
    --radius-lg: 13px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(20, 24, 31, 0.05);
    --shadow-md: 0 6px 20px rgba(20, 24, 31, 0.08);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1000px; margin: 0 auto; padding: 28px 20px 64px; }

/* --- Kopfzeile --- */
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.topbar a {
    color: #fff; background: var(--ink); padding: 7px 14px; border-radius: var(--radius-sm);
    text-decoration: none; font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
    transition: background .12s;
}
.topbar a:hover { background: #2b323d; }
.topbar-actions { display: flex; gap: 8px; }

/* --- Dunkle Top-Navigation (eingeloggte Seiten) --- */
.topnav {
    background: #171b24; padding: 0 20px; margin-bottom: 28px;
}
.topnav-inner {
    max-width: 1000px; margin: 0 auto; display: flex; align-items: center;
    justify-content: space-between; height: 56px;
}
.topnav-brand {
    color: #fff; font-weight: 800; font-size: 15px; text-decoration: none;
    display: flex; align-items: center; gap: 8px; letter-spacing: -0.01em;
}
.topnav-links { display: flex; align-items: center; gap: 4px; }
.topnav-link {
    color: #b7bcc9; text-decoration: none; font-size: 13.5px; font-weight: 600;
    padding: 8px 12px; border-radius: var(--radius-sm); cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.topnav-link:hover, .topnav-link.active { color: #fff; background: rgba(255,255,255,0.08); }
.topnav-caret { font-size: 9px; opacity: 0.7; }
.topnav-dropdown { position: relative; }
.topnav-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0; margin-top: 0;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-md); min-width: 190px; padding: 6px; z-index: 20;
}
/* Unsichtbare Brücke schließt die Lücke zwischen Button und Menü — sonst verliert
   die Maus beim Runterfahren kurz den :hover-Bereich und das Menü klappt zu. */
.topnav-dropdown-menu::before {
    content: ""; position: absolute; top: -8px; left: 0; right: 0; height: 8px;
}
.topnav-dropdown:hover .topnav-dropdown-menu { display: block; }
.topnav-dropdown-menu a {
    display: block; padding: 8px 10px; border-radius: var(--radius-sm);
    color: var(--ink-soft); text-decoration: none; font-size: 13px; font-weight: 500;
}
.topnav-dropdown-menu a:hover { background: var(--surface); color: var(--ink); }
.topnav-logout {
    color: #fff; background: rgba(255,255,255,0.1); text-decoration: none;
    font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: var(--radius-sm);
    margin-left: 6px; white-space: nowrap;
}
.topnav-logout:hover { background: rgba(255,255,255,0.18); }

h1 {
    font-size: 16px; margin: 0; color: var(--ink); font-weight: 700;
    letter-spacing: .01em; text-transform: uppercase;
}
h2 { color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }

/* --- Login --- */
.login-box {
    max-width: 320px; margin: 15vh auto; padding: 36px 32px;
    background: var(--surface); border-radius: var(--radius-lg); text-align: center;
    border: 1px solid var(--border);
}
.login-box input {
    width: 100%; padding: 10px 12px; margin: 14px 0; border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink); font-size: 14px;
}
.login-box button, .scan-form button {
    width: 100%; padding: 10px; border: none; border-radius: var(--radius-sm);
    background: var(--ink); color: #fff; font-weight: 600; cursor: pointer; font-size: 14px;
    transition: background .12s;
}
.login-box button:hover, .scan-form button:hover { background: #2b323d; }
.error { color: var(--danger); font-weight: 600; }

/* --- Scan-Formular --- */
.scan-form { display: flex; gap: 8px; margin-bottom: 36px; }
.scan-form input {
    flex: 1; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    background: var(--bg); color: var(--ink); font-size: 14px;
}
.scan-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.scan-form button { width: 150px; }
.subpage-scan-form button { width: auto; white-space: nowrap; padding-left: 20px; padding-right: 20px; }

/* --- Bereiche (Ordner innerhalb einer Domain) --- */
.area-toolbar { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.area-create-form { display: flex; gap: 8px; margin-bottom: 20px; max-width: 480px; }
.domain-heading-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.customer-name-form { display: flex; align-items: center; gap: 8px; }
.customer-name-form input {
    padding: 7px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    font-size: 13px; width: 260px; background: var(--bg); color: var(--ink);
}
.customer-name-form .page-btn { padding: 7px 12px; font-size: 12.5px; }
.delete-toggle-form { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.toggle-switch { position: relative; display: inline-block; width: 38px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-strong); border-radius: 999px; transition: background-color .15s;
}
.toggle-slider::before {
    content: ""; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px;
    background-color: #fff; border-radius: 50%; transition: transform .15s;
}
.toggle-switch input:checked + .toggle-slider { background-color: var(--danger); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* --- Dokumenten-Design-Formular --- */
.design-form {
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 26px 28px; max-width: 640px;
}
.design-form h3 { font-size: 14px; margin: 22px 0 6px; color: var(--ink); }
.design-form h3:first-child { margin-top: 0; }
.design-text-input {
    width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    font-size: 13.5px; background: var(--bg); color: var(--ink); margin-top: 4px;
}
.design-textarea {
    width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    font-size: 13.5px; background: var(--bg); color: var(--ink); margin-top: 4px; resize: vertical; font-family: inherit;
}
.design-preview-img {
    max-width: 220px; max-height: 220px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    display: block; margin: 6px 0 10px; object-fit: contain;
}
.design-preview-bg { max-height: 280px; }
.design-checkbox-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.design-margin-grid, .design-color-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px; max-width: 420px;
}
.design-color-grid { grid-template-columns: repeat(2, 1fr); max-width: 280px; }
.design-margin-grid label, .design-color-grid label {
    display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-muted); font-weight: 600;
}
.design-margin-grid input {
    padding: 7px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); font-size: 13px;
}
.design-color-grid input[type="color"] { width: 100%; height: 36px; padding: 2px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); cursor: pointer; }
input[type="file"] { font-size: 13px; margin-top: 4px; }
.area-create-form input {
    flex: 1; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    background: var(--bg); color: var(--ink); font-size: 13.5px;
}
.area-box {
    border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden;
}
.area-summary {
    display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer;
    background: var(--surface); list-style: none; font-weight: 700; font-size: 14px;
}
.area-summary::-webkit-details-marker { display: none; }
.area-toggle-arrow { font-size: 11px; color: var(--ink-muted); transition: transform .12s; flex-shrink: 0; }
.area-box[open] .area-toggle-arrow { transform: rotate(90deg); }
.area-name { flex-shrink: 0; }
.area-count { color: var(--ink-muted); font-weight: 500; font-size: 12.5px; flex-shrink: 0; }
.area-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.area-btn {
    background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    color: var(--ink-soft); font-size: 11.5px; font-weight: 600; padding: 4px 9px; cursor: pointer;
    white-space: nowrap;
}
.area-btn:hover { background: var(--surface-strong); }
.area-btn:disabled { opacity: 0.35; cursor: default; }
.area-btn-danger { color: var(--danger); border-color: #f0c9c6; }
.area-btn-danger:hover { background: var(--danger-soft); }
.area-rename-input {
    padding: 4px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    font-size: 12px; width: 140px; background: var(--bg); color: var(--ink);
}
.area-content { padding: 4px 14px 14px; }
.area-box-unassigned .area-summary { background: var(--bg); font-weight: 600; color: var(--ink-muted); }
.area-select {
    padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    font-size: 13px; background: var(--bg); color: var(--ink);
}

/* --- Tabellen --- */
table.history { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.history th, table.history td {
    text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); color: var(--ink);
}
table.history th { color: var(--ink-muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; }
table.history a:not(.btn-green):not(.btn-red):not(.page-btn) { color: var(--accent); }

.report {
    background: var(--surface); padding: 20px; border-radius: var(--radius);
    white-space: pre-wrap; font-size: 12.5px; line-height: 1.55; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-x: auto; color: var(--ink-soft); border: 1px solid var(--border);
}
.hint { color: var(--ink-muted); font-size: 13px; }
.hint code { background: var(--surface-strong); padding: 2px 6px; border-radius: 4px; color: var(--ink); font-size: 12px; }
.hint a { color: var(--accent); }

/* --- Buttons --- */
.page-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.page-btn-form { margin: 0; }
.page-btn {
    padding: 7px 14px; border-radius: var(--radius-sm); border: none;
    background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
    white-space: nowrap; text-decoration: none; display: inline-block; transition: background .12s;
}
.page-btn:hover { background: #2b323d; color: #fff; }
.page-btn:visited { color: #fff; }
.page-btn-sm { padding: 4px 9px; font-size: 10.5px; }

.export-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.share-box {
    background: var(--accent-soft); border: 1px solid #bcdbd9; border-radius: var(--radius);
    padding: 14px 16px; margin-top: 14px; font-size: 13px;
}
.share-box p { margin: 0 0 8px; }
.share-link-row { display: flex; gap: 8px; }
.share-link-row input {
    flex: 1; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
    background: var(--bg); font-size: 12.5px; color: var(--ink); font-family: ui-monospace, monospace;
}

.tag {
    display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .05em;
    padding: 2px 7px; border-radius: var(--radius-pill); vertical-align: middle; text-transform: uppercase;
}
.ring-item .tag { position: relative; top: -2px; margin-bottom: 4px; }
.tag-geo { background: #eae7fb; color: #4c3aa8; }
.tag-seo { background: #fdeed9; color: #97530a; }

.btn-green, .btn-red {
    display: inline-block; padding: 7px 14px; border-radius: var(--radius-sm); border: none;
    font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
    white-space: nowrap; color: #fff; transition: background .12s;
}
.btn-green { background: var(--success); }
.btn-green:hover { background: #155e31; }
.btn-red { background: var(--danger); }
.btn-red:hover { background: #8f1e18; }

/* --- Score-Übersicht --- */
.score-overview {
    background: var(--surface); border-radius: var(--radius-lg); padding: 26px;
    text-align: center; margin-bottom: 20px; border: 1px solid var(--border);
}
.score-overview-preview {
    padding: 36px 26px; border-width: 2px; background: var(--bg);
    box-shadow: var(--shadow-md);
}
.score-overview-label {
    font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ink-muted); margin-bottom: 6px;
}
.score-big { font-size: 42px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.score-bar-track {
    height: 8px; background: var(--surface-strong); border-radius: var(--radius-pill); margin: 16px 0 10px;
    overflow: hidden;
}
.score-bar-fill { height: 100%; border-radius: var(--radius-pill); transition: width .3s; }
.score-label { color: var(--ink-muted); font-size: 13px; }

/* --- Report-Kopfzeile (Domain + Datum) --- */
.report-header { margin-bottom: 16px; }
.report-header-url { font-size: 19px; font-weight: 700; color: var(--ink); word-break: break-all; letter-spacing: -0.01em; }
.report-header-date { font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }

/* --- Priorisierte To-Do-Liste --- */
.todo-box {
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px 20px; margin-bottom: 24px;
}
.todo-title {
    margin: 0; font-size: 14px; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; gap: 8px; list-style: none;
    text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft);
}
.todo-title::-webkit-details-marker { display: none; }
.todo-title::marker { content: ""; }
.todo-box[open] .todo-title { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.todo-list { margin: 0; padding-left: 0; list-style: none; counter-reset: todo-counter; }
.todo-list li {
    counter-increment: todo-counter; position: relative; padding: 10px 12px 10px 34px;
    margin-bottom: 6px; font-size: 13.5px; line-height: 1.5; background: var(--surface);
    border-radius: var(--radius-sm);
}
.todo-list li::before {
    content: counter(todo-counter); position: absolute; left: 10px; top: 10px;
    font-weight: 700; font-size: 11px; color: var(--ink-muted);
}
.todo-priority {
    display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .04em;
    padding: 2px 7px; border-radius: var(--radius-pill); margin-right: 4px; vertical-align: middle; text-transform: uppercase;
}
.todo-p1 { border-left: 3px solid var(--danger); }
.todo-p1 .todo-priority { background: var(--danger-soft); color: #8f241e; }
.todo-p2 { border-left: 3px solid var(--warn); }
.todo-p2 .todo-priority { background: var(--warn-soft); color: var(--warn); }
.todo-p3 { border-left: 3px solid var(--border-strong); }
.todo-p3 .todo-priority { background: var(--surface-strong); color: var(--ink-muted); }
.todo-label { font-weight: 600; }
.todo-group { color: var(--ink-muted); font-size: 12px; }
.todo-explanation { color: var(--ink-soft); font-size: 12px; margin-top: 3px; }
.todo-empty {
    padding: 14px 18px; color: var(--success); font-weight: 600; font-size: 13.5px;
    background: var(--success-soft); border: 1px solid #c3e6cf; border-radius: var(--radius); margin-bottom: 24px;
}

/* --- Ring-Diagramme pro Rubrik --- */
.ring-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 12px; margin-bottom: 24px;
}
@media (max-width: 900px) { .ring-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .ring-grid { grid-template-columns: repeat(2, 1fr); } }
.ring-item {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 6px; text-align: center; text-decoration: none;
    display: block; transition: border-color .12s, background .12s;
}
.ring-item:hover { background: var(--bg); border-color: var(--border-strong); }
.ring-svg { width: 92px; height: 92px; }
.ring-pct-text { fill: var(--ink); font-size: 20px; font-weight: 800; }
.ring-pct-empty { fill: #b7bcc3; font-size: 24px; }
.ring-item-empty { opacity: 0.55; }
.ring-item-teaser { opacity: 0.45; filter: grayscale(65%); cursor: default; }
.ring-item-teaser:hover { background: var(--surface); border-color: var(--border); }
.ring-label { font-size: 11px; font-weight: 700; margin-top: 4px; letter-spacing: .01em; }
.ring-sub { font-size: 10.5px; color: var(--ink-muted); margin-top: 1px; }
.ring-plain-table { border-collapse: collapse; width: 100%; margin-bottom: 20px; font-size: 13px; }
.ring-plain-table th, .ring-plain-table td { border: 1px solid var(--border-strong); padding: 6px 10px; text-align: left; }
.ring-plain-table th { background: var(--surface); }

/* --- Report-Gruppen (Detailkarten) --- */
.report-preamble { color: var(--ink-muted); font-size: 13px; margin-bottom: 16px; }
.report-group {
    background: var(--bg); border: 1px solid var(--border); border-left: 3px solid; border-radius: var(--radius);
    padding: 16px 18px; margin-bottom: 12px;
}
.report-group h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; letter-spacing: .01em; }
.group-desc { margin: 0 0 14px; font-size: 12.5px; color: var(--ink-muted); line-height: 1.55; }
.checks-list { display: flex; flex-direction: column; gap: 3px; }
.check-row {
    display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px;
    border-radius: var(--radius-sm); font-size: 13px; line-height: 1.4; color: var(--ink);
}
.check-ok { background: var(--success-soft); }
.check-ok .check-icon { color: var(--success); }
.check-fail { background: var(--danger-soft); }
.check-fail .check-icon { color: var(--danger); }
.check-partial { background: var(--warn-soft); }
.check-partial .check-icon { color: var(--warn); }
.check-skip { background: var(--surface-strong); }
.check-skip .check-icon { color: var(--ink-muted); }
.check-disabled { background: var(--bg); border: 1px dashed var(--border-strong); opacity: 0.7; }
.check-disabled .check-icon { color: #b7bcc3; }
.check-disabled .check-label { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.check-icon { font-weight: 700; flex-shrink: 0; width: 16px; padding-top: 1px; }
.check-content { flex: 1; }
.check-label { font-weight: 500; }
.check-detail { color: var(--ink-muted); font-size: 12px; }
.check-explanation { margin-top: 3px; font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.check-list-details { margin-top: 8px; }
.check-list-summary {
    cursor: pointer; font-size: 12px; font-weight: 600; color: var(--accent);
    list-style: none; display: inline-flex; align-items: center; gap: 4px; user-select: none;
}
.check-list-summary::-webkit-details-marker { display: none; }
.check-list-summary::before { content: '▸'; font-size: 10px; transition: transform .12s; }
.check-list-details[open] .check-list-summary::before { transform: rotate(90deg); }
.check-list-summary:hover { text-decoration: underline; }
.check-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.check-list-item {
    font-size: 12px; color: var(--ink-soft); line-height: 1.5;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 8px 10px;
}
.check-list-item code {
    display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px; color: var(--accent); background: var(--accent-soft);
    padding: 2px 6px; border-radius: var(--radius-sm); line-height: 1.5;
}
.check-toggle-form { margin: 0; flex-shrink: 0; }
.check-toggle-btn {
    background: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    color: var(--ink-muted); font-size: 10.5px; padding: 3px 8px; cursor: pointer;
    white-space: nowrap;
}
.check-toggle-btn:hover { background: var(--surface); color: var(--ink-soft); border-color: var(--ink-muted); }
.check-hide-toggle {
    display: flex; align-items: center; gap: 4px; flex-shrink: 0;
    font-size: 11px; color: var(--ink-muted); cursor: pointer; white-space: nowrap;
    align-self: flex-start; margin-top: 2px;
}
.check-hide-toggle input { cursor: pointer; }
.hide-checks-form { display: block; }
.hide-checks-submit {
    position: sticky; bottom: 16px; background: var(--ink); border: none;
    border-radius: var(--radius); padding: 12px 16px; margin: 20px 0; box-shadow: var(--shadow-md);
    display: flex; align-items: center; flex-wrap: wrap;
}
.hide-checks-submit .page-btn { background: #fff; color: var(--ink); }
.hide-checks-submit .page-btn:hover { background: var(--surface-strong); }
.hide-checks-submit .hint { color: #cfd3d9; }
.group-extra { margin-top: 8px; font-size: 12px; color: var(--ink-muted); line-height: 1.6; }
.report-summary-box {
    background: var(--surface); border-radius: var(--radius); padding: 14px 18px;
    font-size: 13.5px; font-weight: 600; margin-top: 8px; color: var(--ink);
    border: 1px solid var(--border);
}
.section-divider {
    margin: 28px 0 12px; padding-top: 16px; border-top: 1px solid var(--border);
    font-size: 12.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600;
}
.report-group-info { background: var(--surface); }
.to-top {
    display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600;
    color: var(--accent); text-decoration: none;
}
.to-top:hover { text-decoration: underline; }

/* --- Kategorisierte Linklisten (Menü/Footer/Content) --- */
.link-group {
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 4px 16px; margin-bottom: 10px;
}
.link-group summary {
    cursor: pointer; font-weight: 600; padding: 12px 0; font-size: 13.5px;
    color: var(--ink);
}
.plain-link-list { list-style: none; margin: 0; padding-bottom: 6px; }
.plain-link-list li {
    padding: 8px 4px; font-size: 13px; color: var(--ink-soft);
    border-top: 1px solid var(--border);
}
.plain-link-list .link-path { color: var(--ink-muted); margin-left: 8px; font-size: 12px; }
.link-list { display: flex; flex-direction: column; padding-bottom: 6px; }
.link-line-form { margin: 0; }
.link-line {
    display: block; width: 100%; text-align: left; background: none; border: none;
    padding: 8px 4px; color: var(--accent); font-size: 13px; cursor: pointer;
    border-top: 1px solid var(--border); font-family: inherit;
}
.link-line:hover { background: var(--surface); }

/* --- Rohdaten-Toggle --- */
.raw-toggle { margin: 20px 0; }
.raw-toggle summary { cursor: pointer; color: var(--accent); font-size: 13px; margin-bottom: 8px; font-weight: 600; }

/* --- Vorher/Nachher-Vergleich --- */
.compare-summary {
    display: flex; align-items: center; gap: 20px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 12px;
}
.compare-col { text-align: center; flex: 1; }
.compare-col-title { font-weight: 700; font-size: 12px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.compare-date { font-size: 12px; color: var(--ink-muted); margin: 2px 0; }
.compare-score { font-size: 22px; font-weight: 800; }
.compare-arrow { font-size: 20px; color: var(--ink-muted); }
.compare-delta { font-weight: 700; font-size: 15px; padding: 6px 14px; border-radius: var(--radius-sm); }
.delta-up { background: var(--success-soft); color: var(--success); }
.delta-down { background: var(--danger-soft); color: var(--danger); }
.delta-flat { background: var(--surface-strong); color: var(--ink-muted); }
.cmp-tag {
    display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px;
    border-radius: var(--radius-pill); margin-right: 6px; margin-bottom: 6px;
}
.cmp-improved { background: var(--success-soft); color: var(--success); }
.cmp-regressed { background: var(--danger-soft); color: var(--danger); }
.cmp-unchanged { background: var(--surface-strong); color: var(--ink-muted); }
.cmp-new { background: var(--accent-soft); color: var(--accent); }
.cmp-row-improved { background: var(--success-soft); }
.cmp-row-improved .check-icon { color: var(--success); }
.cmp-row-regressed { background: var(--danger-soft); }
.cmp-row-regressed .check-icon { color: var(--danger); }
.cmp-row-unchanged { background: var(--surface-strong); }
.cmp-row-unchanged .check-icon { color: var(--ink-muted); }
.cmp-row-new { background: var(--accent-soft); }
.cmp-row-new .check-icon { color: var(--accent); }
.cmp-status-line { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.cmp-sep { margin: 0 6px; color: var(--ink-muted); }

/* --- Wettbewerbsvergleich --- */
.competitor-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 20px; table-layout: fixed; }
.competitor-table th, .competitor-table td {
    border: 1px solid var(--border); padding: 9px 6px; text-align: center; vertical-align: top;
    overflow-wrap: break-word;
}
.competitor-table th { background: var(--surface); font-weight: 600; font-size: 11.5px; line-height: 1.3; }
.competitor-table td:first-child, .competitor-table th:first-child { text-align: left; font-weight: 600; width: 160px; font-size: 13px; }
.competitor-table .ct-best { background: var(--success-soft); font-weight: 700; color: var(--success); }
.competitor-table .ct-score { display: block; }
.competitor-table .ct-pct { display: block; font-size: 11px; font-weight: 500; opacity: .75; }
.competitor-table .ct-best .ct-pct { opacity: 1; }
.competitor-table .ct-customer { display: block; font-size: 12.5px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.competitor-table .ct-domain { display: block; }
.picker-customer {
    border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
    padding: 10px 14px; margin-bottom: 10px;
}
.picker-customer[open] { background: #fff; }
.picker-customer-summary { cursor: pointer; font-weight: 600; list-style: none; }
.picker-customer-summary::-webkit-details-marker { display: none; }
.picker-customer-summary::before { content: '▸'; font-size: 10px; display: inline-block; width: 14px; transition: transform .12s; }
.picker-customer[open] > .picker-customer-summary::before { transform: rotate(90deg); }
.competitor-table .ct-scan-btn { font-size: 10.5px; line-height: 1.3; padding: 5px 8px; }
.competitor-table .ct-overall-row .ct-score { font-size: 17px; font-weight: 800; }
.competitor-table .ct-low { background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.competitor-table .ct-overall-row .ct-pct-only { display: block; font-size: 28px; font-weight: 800; opacity: 1; }
.competitor-forms-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.competitor-form { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 420px; flex: 1 1 320px; }
.competitor-form input { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); font-size: 14px; box-sizing: border-box; }
.competitor-form .page-btn { padding: 7px 16px; font-size: 12.5px; }

/* --- Kunden-Vorschau-Auswahl --- */
.preview-group-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 14px; margin-top: 10px;
}
.preview-group-item {
    display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft);
    cursor: pointer; padding: 4px 0;
}
.preview-group-item input { cursor: pointer; }

/* --- Alle Buttons im Tool in Großbuchstaben --- */
button, .page-btn, .btn-green, .btn-red, .topnav-logout, .area-btn {
    text-transform: uppercase; letter-spacing: .03em;
}
