/* Trust Score – Börsen-Testbericht */

.krypto-ts-card {
    --ts-color: #16a34a;
    --ts-soft: #dcfce7;
    padding: 28px;
    background: #fff;
    border: 1px solid var(--kb-border);
    border-radius: var(--kb-radius);
    box-shadow: none;
}

.krypto-ts-card.grade-b { --ts-color: #65a30d; --ts-soft: #ecfccb; }
.krypto-ts-card.grade-c { --ts-color: #d97706; --ts-soft: #fef3c7; }
.krypto-ts-card.grade-d { --ts-color: #dc2626; --ts-soft: #fee2e2; }

/* Übersicht: Ring + Fazit */
.krypto-ts-overview {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 28px;
}

.krypto-ts-ring {
    position: relative;
    flex-shrink: 0;
    width: 132px;
    height: 132px;
}

.krypto-ts-ring svg {
    display: block;
}

.krypto-ts-ring-bg {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 10;
}

.krypto-ts-ring-value {
    fill: none;
    stroke: var(--ts-color);
    stroke-width: 10;
    stroke-linecap: round;
}

.krypto-ts-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.krypto-ts-grade {
    color: var(--ts-color);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.krypto-ts-total {
    margin-top: 4px;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
}

.krypto-ts-verdict {
    margin: 0 0 8px;
    color: var(--kb-text);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.5;
}

.krypto-ts-meta {
    margin: 0;
    color: #64748b;
    font-size: 0.875rem;
}

/* Bereiche als Balken */
.krypto-ts-pillars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 32px;
    margin-bottom: 20px;
}

.krypto-ts-pillar-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--kb-text);
    font-size: 0.9375rem;
    font-weight: 500;
}

.krypto-ts-pillar-points {
    color: var(--kb-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.krypto-ts-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
}

.krypto-ts-bar span {
    display: block;
    height: 100%;
    background: #16a34a;
    border-radius: 999px;
}

/* Balkenfarbe nach Erfüllungsgrad des Bereichs, nicht nach Gesamtnote */
.krypto-ts-pillar.is-mid .krypto-ts-bar span { background: #f59e0b; }
.krypto-ts-pillar.is-low .krypto-ts-bar span { background: #ef4444; }

/* Aufklappbare Details */
.krypto-ts-details {
    border-top: 1px solid var(--kb-border);
}

.krypto-ts-details summary {
    padding: 14px 0;
    color: var(--kb-text);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.krypto-ts-details summary::-webkit-details-marker {
    display: none;
}

.krypto-ts-details summary::after {
    content: "+";
    float: right;
    color: #64748b;
    font-weight: 400;
}

.krypto-ts-details[open] summary::after {
    content: "−";
}

.krypto-ts-details[open] {
    padding-bottom: 16px;
}

.krypto-ts-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.krypto-ts-table th,
.krypto-ts-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--kb-text);
    text-align: left;
    vertical-align: top;
}

.krypto-ts-table thead th {
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.krypto-ts-group th {
    padding-top: 16px;
    background: transparent;
    color: var(--kb-text);
    font-weight: 700;
}

.krypto-ts-num {
    text-align: right !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.krypto-ts-missing {
    color: #94a3b8;
    font-style: italic;
}

.krypto-ts-source {
    margin-left: 6px;
    color: var(--kb-accent-dark);
    font-size: 0.8125rem;
    text-decoration: underline;
}

.krypto-ts-methodology p {
    color: #334155;
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* Badge im Hero (dunkler Hintergrund) */
.krypto-ts-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 5px 12px 5px 5px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: #fff !important;
    font-size: 0.875rem;
    text-decoration: none !important;
    backdrop-filter: blur(4px);
}

.krypto-ts-badge-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-weight: 800;
}

.krypto-ts-badge.grade-b .krypto-ts-badge-grade { background: #65a30d; }
.krypto-ts-badge.grade-c .krypto-ts-badge-grade { background: #d97706; }
.krypto-ts-badge.grade-d .krypto-ts-badge-grade { background: #dc2626; }

.krypto-ts-badge:hover,
.krypto-ts-badge:focus {
    background: rgba(255, 255, 255, 0.2);
}

/* Im Hero-Flex-Container nicht auf volle Breite strecken */
.hero-left-content .krypto-ts-badge,
.krypto-ts-badge {
    align-self: flex-start;
    width: auto;
    max-width: max-content;
}

/* Quick Facts im Hero: Abstand zwischen Label und Wert (li ist ein Flex-Container) */
.quick-facts-hero li strong {
    margin-right: 6px;
}

/* Kurzform für Vergleich, Tabelle, Karten */
.krypto-ts-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.krypto-ts-inline-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 6px;
    border-radius: 6px;
    background: #16a34a;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1;
}

.krypto-ts-inline.grade-b .krypto-ts-inline-grade { background: #65a30d; }
.krypto-ts-inline.grade-c .krypto-ts-inline-grade { background: #d97706; }
.krypto-ts-inline.grade-d .krypto-ts-inline-grade { background: #dc2626; }

.krypto-ts-inline-total {
    color: #64748b;
    font-size: 0.875rem;
}

.krypto-ts-inline-total strong {
    color: var(--kb-text);
    font-size: 1rem;
}

.krypto-ts-pillar-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: 220px;
}

.krypto-ts-pillar-inline-points {
    color: var(--kb-text);
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.krypto-ts-pillar-inline .krypto-ts-bar {
    height: 6px;
}

.krypto-ts-pillar-inline.is-mid .krypto-ts-bar span { background: #f59e0b; }
.krypto-ts-pillar-inline.is-low .krypto-ts-bar span { background: #ef4444; }

/* Börsen-Tabelle (Shortcode): kompakt im Kartenkopf */
.boerse-card-trust {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.boerse-card-trust-label {
    color: #6b7280;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.boerse-card-trust .krypto-ts-inline-grade {
    min-width: 24px;
    height: 20px;
    font-size: 0.75rem;
}

.boerse-card-trust .krypto-ts-inline-total,
.boerse-card-trust .krypto-ts-inline-total strong {
    font-size: 0.8125rem;
}

.krypto-ts-detail-link {
    color: var(--kb-accent-dark);
    font-size: 0.8125rem;
    text-decoration: underline;
}

/* Trust Score im Kopf der Vergleichsseite: eigene Zeile über den übrigen Kennzahlen */
.hero-card-quick-facts .quick-fact-trust {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.quick-fact .krypto-ts-inline-total {
    color: var(--kb-muted);
}

.quick-fact .krypto-ts-inline-total strong {
    color: var(--kb-text);
}

@media (max-width: 768px) {
    .krypto-ts-pillar-inline {
        margin: 0 auto;
    }

    .krypto-ts-card {
        padding: 20px;
    }

    .krypto-ts-overview {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .krypto-ts-pillars {
        grid-template-columns: 1fr;
    }
}
