/* =============================================
   LIST PAGES — Bibliography & Conceptual Foundations
   Red Centre palette
   ============================================= */

.list-page {
    max-width: 900px;
    margin: 60px auto 80px;
    padding: 0 var(--pad-x);
}

/* --- Expand / collapse controls --- */
.list-controls {
    display: flex;
    gap: 10px;
    margin: 0 0 36px;
}

.list-btn {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sky-deep);
    background: transparent;
    border: 1px solid rgba(74,144,184,0.35);
    border-radius: 4px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-btn:hover {
    background: rgba(74,144,184,0.08);
    border-color: var(--sky-deep);
    color: var(--sky-hover);
}

/* --- Section group --- */
.group {
    border-top: 1px solid rgba(200,136,90,0.25);
}

.group:last-of-type {
    border-bottom: 1px solid rgba(200,136,90,0.25);
}

.group-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    padding: 18px 4px;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 400;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.group-head::-webkit-details-marker { display: none; }

.group-head::before {
    content: '';
    flex: 0 0 auto;
    width: 0;
    height: 0;
    border-left: 6px solid var(--ochre);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

.group[open] > .group-head::before {
    transform: translateY(-2px) rotate(90deg);
}

.group-head:hover {
    color: var(--terracotta);
}

.group-count {
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--sky-deep);
    border: 1px solid rgba(74,144,184,0.3);
    border-radius: 10px;
    padding: 1px 9px;
}

/* --- Note blocks (method / absences) --- */
.note-body {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.75;
    padding: 0 4px 28px 22px;
    max-width: 720px;
}

.note-body p { margin-bottom: 18px; }
.note-body p:last-child { margin-bottom: 0; }

/* =============================================
   BIBLIOGRAPHY LIST
   ============================================= */
.bib-list {
    list-style: none;
    padding: 0 0 24px;
    margin: 0;
}

.bib-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding: 11px 8px 11px 4px;
    border-radius: 4px;
    border-bottom: 1px solid rgba(200,136,90,0.12);
    transition: background 0.15s ease;
}

.bib-item:last-child { border-bottom: none; }

.bib-item:hover { background: rgba(200,136,90,0.07); }

.bib-item:target { background: rgba(74,144,184,0.10); }

.bib-index {
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.09em;
    color: var(--sky-deep);
    opacity: 0.85;
    padding-top: 4px;
}

.bib-body { display: block; }

.bib-title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.35;
    transition: color 0.2s ease;
}

a.bib-title:hover {
    color: var(--terracotta);
    text-decoration: underline;
    text-decoration-color: rgba(168,92,58,0.4);
    text-underline-offset: 3px;
}

.bib-author {
    display: block;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.bib-meta {
    display: block;
    font-family: var(--font-body);
    font-size: 0.76rem;
    color: var(--text-subtle);
    margin-top: 2px;
}

.paper-note {
    display: block;
    font-family: var(--font-body);
    font-size: 0.93rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-top: 7px;
    max-width: 660px;
    padding-left: 11px;
    border-left: 2px solid rgba(200,136,90,0.35);
}

/* =============================================
   CONCEPTUAL FOUNDATIONS LIST
   ============================================= */
.cf-list {
    padding: 0 0 24px;
}

.cf-entry {
    border-bottom: 1px solid rgba(200,136,90,0.12);
}

.cf-entry:last-child { border-bottom: none; }

.cf-entry:target > .cf-head { background: rgba(74,144,184,0.10); }

.cf-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    cursor: pointer;
    list-style: none;
    padding: 10px 8px 10px 22px;
    border-radius: 4px;
    position: relative;
    transition: background 0.15s ease;
}

.cf-head::-webkit-details-marker { display: none; }

.cf-head::before {
    content: '+';
    position: absolute;
    left: 4px;
    top: 9px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--ochre);
    transition: color 0.2s ease;
}

.cf-entry[open] > .cf-head::before { content: '\2212'; }

.cf-head:hover { background: rgba(200,136,90,0.07); }

.cf-name {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 400;
    color: var(--text-primary);
}

.cf-dates {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.cf-body {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.75;
    padding: 4px 8px 22px 22px;
    max-width: 720px;
    border-left: 2px solid rgba(200,136,90,0.35);
    margin: 0 0 8px 8px;
}

.cf-body p { margin-bottom: 16px; }
.cf-body p:last-child { margin-bottom: 0; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 580px) {
    .list-page { margin: 36px auto 60px; }

    .group-head { font-size: 1.2rem; padding: 15px 2px; }

    .bib-item {
        grid-template-columns: 1fr;
        gap: 2px;
        padding: 12px 4px;
    }

    .bib-index { padding-top: 0; }

    .bib-title { font-size: 1.02rem; }

    .cf-name { font-size: 1.02rem; }

    .cf-body { font-size: 0.95rem; padding-left: 18px; }

    .paper-note { font-size: 0.9rem; max-width: none; }
}
