/* Extracted from page-thesis-archive.php; preserve source block order. */

/* ══ THESIS ARCHIVE ══════════════════════════════════════════════════ */
.ugp-thesis-hero {
    background: var(--color-navy);
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
}
.ugp-thesis-hero h1 { color:#fff; font-size:clamp(1.6rem,3vw,2.2rem); margin-bottom:.5rem; }
.ugp-thesis-hero p  { color:rgba(255,255,255,.72); max-width:600px; margin:0 auto; font-size:1rem; line-height:1.6; }

.ugp-thesis-wrap { max-width:940px; margin:0 auto; padding:2.5rem 1.5rem 4rem; }

/* ── Year tab bar ── */
.ugp-year-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.75rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: .75rem;
}
.ugp-year-tab {
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .04em;
    padding: .45rem 1.1rem;
    border-radius: 6px 6px 0 0;
    border: 1.5px solid transparent;
    border-bottom: none;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
    position: relative;
    bottom: -2px;        /* overlap the border-bottom */
}
.ugp-year-tab:hover {
    background: var(--color-section-alt);
    color: var(--color-navy);
}
.ugp-year-tab.is-active {
    background: #fff;
    color: var(--color-navy);
    border-color: var(--color-border);
    border-bottom-color: #fff;   /* erase the base border under active tab */
}

/* ── Tab panels ── */
.ugp-year-panel { display: none; }
.ugp-year-panel.is-active { display: block; animation: ugp-fadein .2s ease; }
@keyframes ugp-fadein { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ── Panel header row ── */
.ugp-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
    gap: .5rem;
}
.ugp-panel-year-badge {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--color-primary-deep);
    background: var(--color-primary-soft, #ede9fe);
    border: 1px solid rgba(109,40,217,.12);
    border-radius: 20px;
    padding: .25rem .85rem;
}
.ugp-panel-count {
    font-size: .78rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* ── Entry table ── */
.ugp-thesis-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .88rem;
}
.ugp-thesis-table thead th {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-border);
    padding: .5rem .85rem .6rem;
    text-align: left;
    white-space: nowrap;
}
.ugp-thesis-table tbody tr {
    border-bottom: 1px solid var(--color-border);
    transition: background .15s;
}
.ugp-thesis-table tbody tr:last-child { border-bottom: none; }
.ugp-thesis-table tbody tr:hover { background: var(--color-section-alt); }

.ugp-thesis-table td {
    padding: 1rem .85rem;
    vertical-align: top;
    line-height: 1.45;
}
.ugp-thesis-table .col-num {
    width: 36px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    padding-top: 1.1rem;
    white-space: nowrap;
}
.ugp-thesis-topic-cell {
    font-weight: 700;
    color: var(--color-navy);
    font-size: .92rem;
    line-height: 1.4;
}
.ugp-thesis-student-line {
    margin-top: .25rem;
    font-size: .78rem;
    color: var(--color-text-muted);
    font-weight: 500;
}
.ugp-prog-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .18rem .6rem;
    border-radius: 20px;
    white-space: nowrap;
}
.ugp-prog-phd   { background:#fef9c3; color:#713f12; border:1px solid #fde68a; }
.ugp-prog-ma    { background:#dbeafe; color:#1e3a8a; border:1px solid #bfdbfe; }
.ugp-prog-dip   { background:#dcfce7; color:#14532d; border:1px solid #bbf7d0; }
.ugp-prog-other { background:#f1f5f9; color:#475569; border:1px solid #e2e8f0; }

/* Abstract expand button */
.ugp-abs-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: .75rem;
    font-weight: 700;
    color: var(--color-primary-deep);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-top: .55rem;
}
.ugp-abs-btn::before { content:'▶'; font-size:.55rem; transition:transform .2s; }
.ugp-abs-btn.open::before { transform:rotate(90deg); }
.ugp-abs-body {
    display: none;
    margin-top: .55rem;
    padding: .85rem 1rem;
    background: #fafaf9;
    border-left: 3px solid var(--color-primary);
    border-radius: 0 6px 6px 0;
    font-size: .85rem;
    line-height: 1.7;
    color: var(--color-text-main);
}
.ugp-abs-body.is-open { display: block; }

/* ── Sample notice ── */
.ugp-sample-notice {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: .8rem 1.2rem;
    font-size: .82rem;
    color: #92400e;
    margin-bottom: 1.5rem;
}

/* ── Empty state ── */
.ugp-thesis-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--color-text-muted);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .ugp-thesis-table thead { display: none; }
    .ugp-thesis-table tbody tr { display: block; padding: .75rem 0; }
    .ugp-thesis-table td { display: block; padding: .2rem .25rem; }
    .ugp-thesis-table .col-num { display: none; }
    .ugp-thesis-table .col-prog { display: block; margin-top: .3rem; }
}
