/* Breakdown page styles (extracted from breakdown.html) */

.api-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.api-badge--live {
    background: var(--color-success-bg);
    color: var(--color-success-text);
    border: 1px solid var(--color-success-border);
}
.api-badge--loading {
    background: #F3F4F6;
    color: #4B5563; /* ≥4.5:1 on the gray badge background */
    border: 1px solid var(--color-border-muted);
}
.api-badge--fallback {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    border: 1px solid var(--color-warning-border);
}
.api-pulse {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--color-success);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); }
    50% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
}
.api-spinner {
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid #D1D5DB;
    border-top-color: var(--color-text-secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.api-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--color-warning);
}

.summary-card {
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    background: #fff;
    border: 1px solid var(--color-border-muted);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    min-height: 9rem;
}
/* Grand total is the single filled anchor card; Verified & Legacy keep the
   white base so the accent lives in the number, not a background fill. */
.summary-card--grand {
    background: var(--color-brand-green);
    border-color: var(--color-brand-green);
    color: white;
}

.forest-card {
    background: white;
    border: 1px solid var(--color-border-muted);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.forest-card:hover {
    border-color: var(--color-brand-green);
    box-shadow: 0 2px 12px rgba(0, 71, 52, 0.08);
}
/* Primary forest: white like the rest, marked only by a subtly stronger
   green-tinted border (no fill). */
.forest-card--featured {
    background: #fff;
    border-color: rgba(0, 71, 52, 0.22);
}
.forest-card--featured:hover {
    border-color: var(--color-brand-green);
    box-shadow: 0 4px 20px rgba(0, 71, 52, 0.10);
}
.forest-card--legacy {
    background: #fff;
    border-color: var(--color-border-muted);
}
.forest-card--legacy:hover {
    border-color: var(--color-legacy-gold);
    box-shadow: 0 2px 12px rgba(234, 179, 8, 0.12);
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: var(--color-success-bg);
    color: var(--color-success-text);
    border: 1px solid var(--color-success-border);
}
.live-tag .live-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: var(--color-success);
    animation: pulse-dot 2s ease-in-out infinite;
}
.cached-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: #F3F4F6;
    color: #4B5563; /* ≥4.5:1 on the gray badge background */
    border: 1px solid var(--color-border-muted);
}
.shared-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    border: 1px solid var(--color-warning-border);
}

.equation-card {
    background: white;
    border: 1px solid var(--color-border-muted);
    border-radius: 1rem;
    overflow: hidden;
}
.equation-step {
    padding: 1.25rem 1.5rem;
}
.equation-step + .equation-step {
    border-top: 1px solid #F3F4F6;
}
.equation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    font-size: 0.9375rem;
}
.equation-row--total {
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--color-border-muted);
    font-weight: 700;
    font-size: 1.0625rem;
}
.equation-row--grand {
    padding: 1rem 1.5rem;
    background: var(--color-brand-green);
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
}
.equation-operator {
    color: #4B5563; /* ≥4.5:1 on white */
    font-weight: 500;
    width: 1.25rem;
    flex-shrink: 0;
}
.equation-label {
    flex: 1;
    min-width: 0;
}
.equation-value {
    font-variant-numeric: tabular-nums;
    text-align: right;
    flex-shrink: 0;
    margin-left: 1rem;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    transition: transform 0.2s ease;
}
.profile-link-icon {
    display: inline-flex;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    color: currentColor;
}
.profile-link:hover .profile-link-icon,
.profile-link:focus-visible .profile-link-icon {
    opacity: 1;
}
.profile-link-icon svg {
    width: 0.875em;
    height: 0.875em;
}
@media (hover: hover) {
    .profile-link-icon {
        transform: translateX(0.25em);
    }
    .profile-link:hover,
    .profile-link:focus-visible {
        transform: translateX(-3px);
    }
    .profile-link:hover .profile-link-icon,
    .profile-link:focus-visible .profile-link-icon {
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    .summary-card { padding: 1.125rem; }
    .forest-card { padding: 1.125rem; }
    .equation-step { padding: 1rem; }
    .equation-row { font-size: 0.8125rem; }
    .equation-row--total { font-size: 0.9375rem; }
    .equation-row--grand { font-size: 1rem; padding: 0.875rem 1rem; }
}

