.ffn-credit-attribution-panel {
    display: grid;
    gap: 1.35rem;
}

.ffn-credit-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.ffn-credit-summary-item {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--ffn-ed-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
}

.ffn-credit-summary-item span {
    display: block;
    color: var(--ffn-ed-text-muted);
    font-family: var(--ffn-ed-font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ffn-credit-summary-item strong {
    display: block;
    margin-top: 0.3rem;
    color: var(--ffn-ed-text);
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
}

.ffn-credit-controls {
    display: grid;
    grid-template-columns: minmax(16rem, 1.6fr) minmax(12rem, 1fr) minmax(12rem, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.ffn-credit-field {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
    color: var(--ffn-ed-text-muted);
    font-family: var(--ffn-ed-font-mono);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ffn-credit-field input,
.ffn-credit-field select {
    width: 100%;
    min-height: 2.75rem;
    border: 1px solid var(--ffn-ed-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--ffn-ed-text);
    font-family: var(--ffn-ed-font);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
}

.ffn-credit-field input {
    padding: 0.75rem 0.85rem;
}

.ffn-credit-field select {
    padding: 0.7rem 2rem 0.7rem 0.85rem;
}

.ffn-credit-clear {
    min-height: 2.75rem;
    padding: 0 1rem;
    border: 1px solid var(--ffn-ed-border-strong, var(--ffn-ed-border));
    border-radius: 8px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 800;
}

.ffn-credit-clear:hover,
.ffn-credit-clear:focus-visible {
    background: #0b5cad;
}

.ffn-credit-status,
.ffn-credit-noscript {
    margin: 0;
    color: var(--ffn-ed-text-soft);
    font-size: 0.95rem;
    line-height: 1.5;
}

.ffn-credit-list {
    display: grid;
    gap: 0.7rem;
}

.ffn-credit-row {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) minmax(16rem, 1.35fr) minmax(11rem, 0.85fr);
    gap: 1rem;
    align-items: start;
    padding: 1rem 0;
    border-top: 1px solid var(--ffn-ed-border);
}

.ffn-credit-row:last-child {
    border-bottom: 1px solid var(--ffn-ed-border);
}

.ffn-credit-title {
    min-width: 0;
}

.ffn-credit-title strong {
    display: block;
    color: var(--ffn-ed-text);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ffn-credit-title span,
.ffn-credit-meta span,
.ffn-credit-links span {
    display: block;
    margin-top: 0.28rem;
    color: var(--ffn-ed-text-soft);
    font-size: 0.86rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.ffn-credit-badge {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin: 0 0 0.45rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(20, 184, 166, 0.12);
    color: #115e59;
    font-family: var(--ffn-ed-font-mono);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ffn-credit-meta strong,
.ffn-credit-links strong {
    display: block;
    color: var(--ffn-ed-text-muted);
    font-family: var(--ffn-ed-font-mono);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ffn-credit-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.ffn-credit-links a {
    display: inline-flex;
    max-width: 100%;
    padding: 0.38rem 0.52rem;
    border: 1px solid var(--ffn-ed-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--ffn-ed-accent);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.ffn-credit-links a:hover,
.ffn-credit-links a:focus-visible {
    border-color: rgba(11, 92, 173, 0.35);
    color: #0f172a;
}

html[data-theme="dark"] .ffn-credit-summary-item,
html[data-theme="dark"] .ffn-credit-field input,
html[data-theme="dark"] .ffn-credit-field select,
html[data-theme="dark"] .ffn-credit-links a {
    background: rgba(15, 23, 42, 0.78);
}

html[data-theme="dark"] .ffn-credit-badge {
    border-color: rgba(45, 212, 191, 0.28);
    background: rgba(20, 184, 166, 0.18);
    color: #99f6e4;
}

@media (max-width: 1040px) {
    .ffn-credit-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ffn-credit-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ffn-credit-clear {
        grid-column: span 2;
    }

    .ffn-credit-row {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }
}

@media (max-width: 640px) {
    .ffn-credit-summary-grid,
    .ffn-credit-controls {
        grid-template-columns: 1fr;
    }

    .ffn-credit-clear {
        grid-column: auto;
    }

    .ffn-credit-summary-item strong {
        font-size: 1.45rem;
    }
}
