.source-panel {
    min-width: 0;
}

.refresh-note {
    padding: 0.35rem 0.65rem;
    color: #bfdbfe;
    border-color: rgba(59, 130, 246, 0.38);
    background: rgba(59, 130, 246, 0.1);
}

.source-summary {
    display: grid;
    margin-top: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 0.65rem;
}

.summary-card {
    appearance: none;
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: inherit;
    background: rgba(15, 23, 42, 0.42);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.summary-card:hover,
.summary-card:focus-visible,
.summary-card[aria-pressed="true"] {
    border-color: rgba(139, 92, 246, 0.58);
    background: rgba(139, 92, 246, 0.12);
    outline: none;
    transform: translateY(-1px);
}

.summary-card span {
    display: block;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.summary-card strong {
    display: block;
    margin-top: 0.22rem;
    color: var(--text-primary);
    font-family: var(--font-outfit);
    font-size: 1.25rem;
}

.summary-card.large {
    border-color: rgba(251, 113, 133, 0.34);
}

.summary-card.large strong {
    color: #fda4af;
}

.summary-card.runtime strong {
    color: #93c5fd;
}

.summary-card.ui strong {
    color: #c4b5fd;
}

.summary-card.test strong {
    color: var(--color-warning);
}

.summary-card.structure strong {
    color: #cbd5e1;
}

.source-toolbar {
    display: grid;
    margin-top: 1rem;
    grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(165px, 0.42fr));
    align-items: end;
    gap: 0.7rem;
}

.search-field,
.select-field {
    display: grid;
    gap: 0.3rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.search-field input,
.select-field select {
    width: 100%;
    min-height: 40px;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 10px;
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.78);
}

.search-field input::placeholder {
    color: #64748b;
}

.result-count {
    min-height: 1.1rem;
    margin-top: 0.65rem;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.file-list-table {
    width: 100%;
    min-width: 760px;
    margin-top: 0.35rem;
    border-collapse: collapse;
    font-size: 0.78rem;
    text-align: left;
}

.file-list-table th {
    padding: 0.75rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-secondary);
    background: rgba(15, 23, 42, 0.58);
    font-weight: 700;
    white-space: nowrap;
}

.file-list-table td {
    padding: 0.72rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
    color: var(--text-secondary);
    vertical-align: top;
}

.file-list-table tr:hover td {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.025);
}

.file-list-table tr.review td:first-child {
    box-shadow: inset 3px 0 var(--color-warning);
}

.file-list-table tr.split td:first-child {
    box-shadow: inset 3px 0 var(--color-danger);
}

.file-name-badge {
    display: inline-block;
    max-width: 360px;
    padding: 0.17rem 0.4rem;
    overflow-wrap: anywhere;
    border-radius: 5px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.055);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.category-badge {
    padding: 0.27rem 0.5rem;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.09);
}

.line-count {
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
}

.size-badge {
    margin-left: 0.3rem;
    padding: 0.22rem 0.42rem;
}

.size-badge.review {
    border-color: rgba(245, 158, 11, 0.48);
    color: var(--color-warning);
    background: rgba(245, 158, 11, 0.1);
}

.size-badge.split {
    border-color: rgba(251, 113, 133, 0.5);
    color: #fda4af;
    background: rgba(225, 29, 72, 0.12);
}

.file-description {
    color: var(--text-muted);
    font-size: 0.74rem;
}

.timeline-panel {
    position: sticky;
    top: 1rem;
}

.timeline-container {
    position: relative;
    display: flex;
    max-height: 820px;
    margin-top: 1rem;
    padding: 0.25rem 0.4rem 0.25rem 1.4rem;
    overflow-y: auto;
    flex-direction: column;
    gap: 1rem;
}

.timeline-container::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 5px;
    width: 2px;
    background: rgba(139, 92, 246, 0.17);
    content: "";
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    top: 9px;
    left: -21px;
    width: 11px;
    height: 11px;
    border: 2px solid #070a13;
    border-radius: 50%;
    background: var(--color-purple);
    box-shadow: 0 0 8px var(--color-purple);
}

.timeline-content {
    padding: 1rem;
    border: 1px solid var(--card-border);
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.36);
}

.timeline-header {
    display: flex;
    margin-bottom: 0.45rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.commit-hash {
    padding: 0.12rem 0.38rem;
    border-radius: 4px;
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.15);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.7rem;
    font-weight: 700;
}

.commit-date {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.commit-message {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.45;
}

.no-data {
    padding: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

footer {
    padding: 0.25rem 0 0.75rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-align: center;
}
