/* ===========================================================
   Bellasso Site-Audit-Tool v2
   Tabs · CSS-Rings · Statistiken · 6 Dimensionen
   =========================================================== */

/* ---- Card / Form ---- */
.audit-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 12px 36px rgba(27, 42, 74, 0.08);
}
.audit-form__hp {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip-path: inset(50%);
    border: 0; padding: 0; margin: -1px;
}
.audit-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 640px) { .audit-form__row { grid-template-columns: 1fr; } }

.audit-form__field {
    display: flex; flex-direction: column; gap: 0.4rem;
}
.audit-form__field > span {
    font-size: 0.875rem; font-weight: 600; color: var(--color-text);
}
.audit-form__field input {
    width: 100%; background: var(--color-bg);
    border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
    padding: 0.875rem 1rem; font-size: 0.9375rem;
    color: var(--color-text); font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.audit-form__field input:focus {
    outline: none; border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}
.audit-form__field input[aria-invalid="true"] {
    border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.audit-form__submit {
    width: 100%;
    padding: 1rem 2rem;
    margin-top: 0.5rem;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.audit-form__submit:focus-visible {
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.35);
}
.audit-form__reassure {
    text-align: center; font-size: 0.8125rem;
    color: var(--color-text-secondary); margin-top: 0.875rem;
}
.audit-form__privacy {
    font-size: 0.75rem; color: var(--color-text-secondary);
    margin-top: 1.25rem; line-height: 1.55; text-align: center;
}
.audit-form__privacy a { color: var(--color-primary); text-decoration: underline; }
.audit-form__error { color: #dc2626; font-size: 0.8125rem; margin-top: 0.25rem; }

/* ---- Progress Bar ---- */
.audit-progress { text-align: center; padding: 2.5rem 0; }
.audit-progress__pct {
    font-size: 2.5rem; font-weight: 800;
    color: var(--color-primary); margin: 0 0 0.75rem;
    font-family: var(--font-display, 'Oxanium', sans-serif);
    letter-spacing: -0.02em;
}
.audit-progress__bar {
    width: 100%; max-width: 420px; height: 8px;
    background: rgba(0,0,0,0.06); border-radius: 4px;
    margin: 0 auto 1.25rem; overflow: hidden;
}
.audit-progress__bar-fill {
    height: 100%; width: 0%; border-radius: 4px;
    background: linear-gradient(90deg, var(--color-primary), #dbc47a);
    transition: width 0.3s ease-out; position: relative;
}
.audit-progress__bar-fill::after {
    content: ''; position: absolute;
    top: 0; right: 0; bottom: 0; width: 50px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: audit-shimmer 1.6s ease-in-out infinite;
}
@keyframes audit-shimmer {
    0% { transform: translateX(-50px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(50px); opacity: 0; }
}
.audit-progress__label {
    font-size: 1rem; font-weight: 700;
    color: var(--color-text); margin: 0 0 1rem;
}
.audit-progress__steps {
    list-style: none; padding: 0; margin: 0 auto 1rem;
    max-width: 400px; text-align: left;
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem 1rem;
}
.audit-progress__steps li {
    padding: 0.3rem 0 0.3rem 1.5rem; position: relative;
    color: var(--color-text-secondary); font-size: 0.8rem;
    transition: color 0.3s;
}
.audit-progress__steps li::before {
    content: '○'; position: absolute; left: 0;
    top: 50%; transform: translateY(-50%);
    font-size: 0.9rem; transition: all 0.3s;
}
.audit-progress__steps li.is-active {
    color: var(--color-text); font-weight: 600;
}
.audit-progress__steps li.is-active::before {
    content: '◉'; color: var(--color-primary);
}
.audit-progress__steps li.is-done { color: var(--color-text); }
.audit-progress__steps li.is-done::before {
    content: '✓'; color: #16a34a; font-weight: 700;
}
.audit-progress__hint {
    font-size: 0.8125rem; color: #6b7280;
    margin-top: 0.75rem; font-style: italic;
}

/* ===============================================
   RESULT — "ar-" prefix (audit-result)
   =============================================== */
.audit-result { padding: 0.5rem 0; }

/* Header */
.ar-header { text-align: center; margin-bottom: 1.5rem; }
.ar-header h2 { margin: 0 0 0.35rem; font-size: 1.4rem; }
.ar-header__url {
    font-size: 0.875rem; color: var(--color-text-secondary);
    margin: 0; word-break: break-all;
}

/* ---- Score Ring (CSS) ---- */
.ar {
    display: flex; flex-direction: column;
    align-items: center; position: relative;
}
.ar__track {
    display: flex; align-items: center; justify-content: center;
}
.ar__inner {
    background: var(--color-bg-card, #fff);
    display: flex; align-items: center; justify-content: center;
}
.ar__val {
    font-weight: 800;
    font-family: var(--font-display, 'Oxanium', sans-serif);
    line-height: 1;
}
.ar__label {
    font-size: 0.75rem; font-weight: 700;
    color: var(--color-text); margin-top: 0.35rem;
    text-align: center;
}
.ar__sub {
    font-size: 0.625rem; color: #6b7280; text-align: center;
}

/* ---- Hero Section ---- */
.ar-hero {
    background: var(--color-bg, #f8f8f6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}
.ar-hero__main {
    display: flex; align-items: center; justify-content: center;
    gap: 1.5rem; margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}
.ar-hero__grade {
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--color-text-secondary); margin-bottom: 0.2rem;
}
.ar-hero__verdict {
    font-size: 0.9375rem; color: var(--color-text);
    line-height: 1.5; max-width: 300px;
}
.ar-hero__rings {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    text-align: center;
}
.ar-hero__mini {
    padding: 0.5rem 0;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}
.ar-hero__mini:hover {
    background: rgba(201, 168, 76, 0.06);
}
@media (max-width: 640px) {
    .ar-hero__main { flex-direction: column; text-align: center; }
    .ar-hero__verdict { max-width: none; }
    .ar-hero__rings { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Statistics ---- */
.ar-stats { margin-bottom: 1.5rem; }
.ar-stats__title {
    font-size: 0.875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--color-text-secondary);
    margin: 0 0 0.75rem; padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}
.ar-stats__grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem;
}
@media (max-width: 640px) {
    .ar-stats__grid { grid-template-columns: repeat(2, 1fr); }
}
.ar-stat {
    background: var(--color-bg, #f8f8f6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.875rem 0.75rem; text-align: center;
}
.ar-stat__val {
    font-size: 1.25rem; font-weight: 800;
    color: var(--color-primary);
    font-family: var(--font-display, 'Oxanium', sans-serif);
    line-height: 1.2; margin-bottom: 0.15rem;
}
.ar-stat__lbl { font-size: 0.75rem; font-weight: 600; color: var(--color-text); }
.ar-stat__bench {
    font-size: 0.6875rem; font-weight: 600;
    color: var(--color-primary); margin-top: 0.2rem;
}
.ar-stat__ctx { font-size: 0.625rem; color: #9ca3af; margin-top: 0.1rem; }

/* ---- Tabs ---- */
.ar-tabs {
    display: flex; gap: 0;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ar-tabs::-webkit-scrollbar { display: none; }

.ar-tab {
    flex: 1; min-width: 0;
    display: flex; align-items: center; justify-content: center;
    gap: 0.3rem;
    padding: 0.75rem 0.5rem;
    background: none; border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.8125rem; font-weight: 600;
    color: var(--color-text-secondary);
    font-family: inherit;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.ar-tab:hover { color: var(--color-text); }
.ar-tab--active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.ar-tab__icon { font-size: 1rem; }
.ar-tab__label { }
.ar-tab__dot {
    width: 7px; height: 7px; border-radius: 50%;
    display: inline-block; flex-shrink: 0;
}
.ar-tab__dot--good { background: #16a34a; }
.ar-tab__dot--warn { background: #eab308; }
.ar-tab__dot--crit { background: #dc2626; }
@media (max-width: 640px) {
    .ar-tab { padding: 0.6rem 0.4rem; font-size: 0.75rem; }
    .ar-tab__icon { font-size: 0.875rem; }
    .ar-tab__label { display: none; }
}

/* ---- Tab Panels ---- */
.ar-panel {
    display: none;
    padding: 1.25rem 0 0;
}
.ar-panel--active { display: block; }

.ar-panel__head {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem; margin-bottom: 0.75rem;
    background: var(--color-bg, #f8f8f6);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.ar-panel__head h3 { margin: 0 0 0.3rem; font-size: 1rem; }
.ar-panel__info { flex: 1; }
.ar-panel__badges { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.ar-badge {
    display: inline-flex; align-items: center;
    padding: 0.15rem 0.5rem; border-radius: 20px;
    font-size: 0.6875rem; font-weight: 700;
}
.ar-badge--good { background: #dcfce7; color: #166534; }
.ar-badge--warn { background: #fef9c3; color: #854d0e; }
.ar-badge--crit { background: #fee2e2; color: #991b1b; }

/* ---- Finding Items ---- */
.ar-item {
    padding: 0.875rem 1rem;
    border-left: 3px solid var(--color-border);
    margin-bottom: 0.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--color-bg-card);
    border-top: 1px solid rgba(0,0,0,0.03);
    border-right: 1px solid rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.ar-item--good { border-left-color: #16a34a; }
.ar-item--warn { border-left-color: #eab308; }
.ar-item--crit { border-left-color: #dc2626; }

.ar-item__head {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 0.3rem;
}
.ar-item__dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.ar-item--good .ar-item__dot { background: #16a34a; }
.ar-item--warn .ar-item__dot { background: #eab308; }
.ar-item--crit .ar-item__dot { background: #dc2626; }

.ar-item__title {
    font-size: 0.8125rem; font-weight: 700;
    color: var(--color-text); flex: 1;
}
.ar-item__status {
    font-size: 0.6875rem; font-weight: 600;
    white-space: nowrap;
}
.ar-item--good .ar-item__status { color: #16a34a; }
.ar-item--warn .ar-item__status { color: #b45309; }
.ar-item--crit .ar-item__status { color: #dc2626; }

.ar-item__text {
    font-size: 0.8125rem; color: #4b5563;
    margin: 0; line-height: 1.55;
}
.ar-item__fix { margin-top: 0.4rem; }
.ar-item__fix summary {
    font-size: 0.75rem; font-weight: 700;
    color: var(--color-primary); cursor: pointer;
    padding: 0.2rem 0;
}
.ar-item__fix summary:hover { text-decoration: underline; }
.ar-item__fix-body {
    background: #f1f5f9; border-radius: 6px;
    padding: 0.5rem 0.75rem; font-size: 0.8125rem;
    color: #0f172a; margin-top: 0.3rem; line-height: 1.55;
}
.ar-item__fix-body strong { color: var(--color-text); }
.ar-item code {
    background: #fff; padding: 0.1rem 0.35rem;
    border-radius: 3px; font-size: 0.8em;
    border: 1px solid var(--color-border);
}

/* ---- CTA ---- */
.ar-cta {
    margin-top: 2rem; padding: 1.5rem;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(201, 168, 76, 0.02));
    border-radius: var(--radius-md);
    border: 1px solid rgba(201, 168, 76, 0.25);
    text-align: center;
}
.ar-cta h3 { font-size: 1.0625rem; margin: 0 0 0.4rem; color: var(--color-text); }
.ar-cta p { color: var(--color-text-secondary); margin: 0 0 1rem; font-size: 0.9375rem; }

/* Restart-Button (auf hellem Hintergrund) */
.audit-result .btn-hero-secondary,
.audit-card .btn-hero-secondary,
#audit-restart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-dark, #1B2A4A);
    background: transparent;
    border: 1.5px solid var(--color-border, #E8E4DB);
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.audit-result .btn-hero-secondary:hover,
.audit-card .btn-hero-secondary:hover,
#audit-restart:hover {
    border-color: var(--color-primary, #C9A84C);
    color: var(--color-primary, #C9A84C);
    background: rgba(201, 168, 76, 0.04);
}
/* Error retry button */
.ar-error .btn-hero-secondary,
#audit-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-dark, #1B2A4A);
    background: transparent;
    border: 1.5px solid var(--color-border, #E8E4DB);
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.ar-error .btn-hero-secondary:hover,
#audit-retry:hover {
    border-color: var(--color-primary, #C9A84C);
    color: var(--color-primary, #C9A84C);
    background: rgba(201, 168, 76, 0.04);
}

/* ---- Error ---- */
.ar-error { text-align: center; padding: 2rem; }
.ar-error__icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%;
    background: #fee2e2; color: #dc2626;
    font-size: 24px; font-weight: 700; margin-bottom: 1rem;
}
.ar-error h3 { margin: 0 0 0.75rem; color: #dc2626; }
.ar-error p { color: #4b5563; margin: 0 0 1.25rem; }
.ar-error__actions {
    display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap;
}

/* ---- Pillar Cards (check.php "Was wird geprüft") ---- */
.audit-pillar {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.75rem; height: 100%;
}
.audit-pillar h3 {
    color: var(--color-primary);
    font-size: 1.125rem; margin: 0 0 0.5rem;
}
.audit-pillar p {
    color: var(--color-text-secondary);
    margin: 0 0 1rem; font-size: 0.9375rem;
}
.audit-pillar ul { list-style: none; padding: 0; margin: 0; }
.audit-pillar li {
    padding: 0.25rem 0 0.25rem 1.5rem; position: relative;
    color: var(--color-text); font-size: 0.875rem;
}
.audit-pillar li::before {
    content: '✓'; position: absolute; left: 0;
    color: var(--color-primary); font-weight: 700;
}

/* ---- Teaser (used on index/seo/webdev) ---- */
.audit-teaser { padding: 4rem 0; background: var(--color-bg); }
.audit-teaser__lead {
    font-size: 1.0625rem; margin-bottom: 1.25rem;
    color: var(--color-text-secondary);
}
.audit-teaser__bullets { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.audit-teaser__bullets li {
    padding: 0.25rem 0 0.25rem 1.5rem; position: relative;
    color: var(--color-text); margin-bottom: 0.4rem;
}
.audit-teaser__bullets li::before {
    content: '✓'; position: absolute; left: 0;
    color: var(--color-primary); font-weight: 700;
}
.audit-teaser__reassure { font-size: 0.8125rem; color: #4b5563; margin-top: 0.875rem; }

/* Teaser Inline Form */
.audit-teaser__form-wrap { margin-top: 0.5rem; }
.audit-teaser__fields {
    display: flex; gap: 0.5rem;
    max-width: 480px;
}
.audit-teaser__input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--color-bg-card, #fff);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full, 50px);
    font-size: 0.9375rem;
    color: var(--color-text);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.audit-teaser__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}
.audit-teaser__btn {
    white-space: nowrap;
    padding: 0.875rem 1.5rem !important;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .audit-teaser__fields {
        flex-direction: column;
    }
}

/* Teaser Score Rings (decorative) */
.audit-teaser__rings {
    display: flex; gap: 1rem;
    justify-content: center; align-items: center;
    padding: 1.5rem 0;
}
.audit-teaser__ring { text-align: center; }
.audit-teaser__ring-circle {
    width: 90px; height: 90px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.4rem;
    position: relative;
}
.audit-teaser__ring-circle::before {
    content: '';
    position: absolute; inset: 6px;
    background: var(--color-bg-card, #fff);
    border-radius: 50%;
}
.audit-teaser__ring-circle span {
    position: relative; z-index: 1;
    font-weight: 800; font-size: 1.25rem;
    font-family: var(--font-display, 'Oxanium', sans-serif);
}
.audit-teaser__ring-circle--perf {
    background: conic-gradient(#eab308 0 223deg, #e5e7eb 223deg 360deg);
}
.audit-teaser__ring-circle--perf span { color: #eab308; }
.audit-teaser__ring-circle--seo {
    background: conic-gradient(#16a34a 0 328deg, #e5e7eb 328deg 360deg);
}
.audit-teaser__ring-circle--seo span { color: #16a34a; }
.audit-teaser__ring-circle--design {
    background: conic-gradient(#16a34a 0 306deg, #e5e7eb 306deg 360deg);
}
.audit-teaser__ring-circle--design span { color: #16a34a; }
.audit-teaser__ring-circle--ki {
    background: conic-gradient(#eab308 0 266deg, #e5e7eb 266deg 360deg);
}
.audit-teaser__ring-circle--ki span { color: #eab308; }
.audit-teaser__ring-label {
    font-size: 0.75rem; font-weight: 600;
    color: var(--color-text-secondary);
}

/* ARIA */
.audit-sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip-path: inset(50%); border: 0;
}
