/* ==========================================================================
   RIPA Working Group
   Design system kept in parallel with the Columbia Workshop in New
   Empirical Finance site (columbia-finance-workshop.github.io).
   Source Serif headings, Source Sans body, Columbia navy, 900px column.
   ========================================================================== */

:root {
    --primary-blue: #1a3a5c;
    --primary-blue-light: #2d5a87;
    --columbia-blue: #1a3a5c;
    --columbia-navy: #1a3a5c;
    --columbia-dark: #0f2840;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--white);
}

/* Horizontal padding only. Setting the shorthand here would zero out the
   vertical padding on elements that carry both `section` and `container`. */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Typography */
h1, h2, h3 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.25rem;
    margin: 0;
}

h2 {
    font-size: 1.75rem;
    color: var(--columbia-navy);
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--columbia-blue);
}

h3 {
    font-size: 1.25rem;
    color: var(--gray-700);
    margin: 2rem 0 1rem 0;
}

p {
    margin: 0 0 1rem 0;
}

a {
    color: var(--columbia-navy);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
}

header a {
    text-decoration: none;
    color: inherit;
}

header a:hover {
    text-decoration: none;
}

header h1 {
    color: var(--columbia-navy);
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

header .subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin: 0.15rem 0 0 0;
}

/* Navigation */
nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 2rem;
}

nav .container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

nav a {
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--columbia-navy);
    text-decoration: none;
}

nav a.nav-active {
    color: var(--columbia-navy);
    font-weight: 600;
}

/* Secondary navigation, for the terms under Working Groups */
.subnav {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    margin-top: -2rem;
    margin-bottom: 2rem;
}

.subnav .container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
}

.subnav a {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.subnav a:hover {
    color: var(--columbia-navy);
    text-decoration: none;
}

.subnav a.subnav-active {
    color: var(--columbia-navy);
    font-weight: 600;
}

/* Main Content */
main {
    padding-bottom: 4rem;
}

section {
    padding: 3rem 0;
}

/* Intro / scope questions */
.intro-section p {
    font-size: 1.0625rem;
    color: var(--gray-700);
}

.questions-list {
    margin: 1rem 0 0 0;
    padding: 1.25rem 1.5rem 1.25rem 2.75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.questions-list li {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.questions-list li:last-child {
    margin-bottom: 0;
}

.goals-list {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
}

.goals-list li {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Event Details */
.event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.detail strong {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.detail span {
    color: var(--gray-800);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.tba {
    color: var(--gray-600);
    font-size: 0.9375rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    margin: 0;
}

/* Schedule */
.schedule {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}

.session-header {
    background: var(--columbia-navy);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.session-chair {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
}

.time-block {
    display: flex;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    gap: 1.5rem;
}

.time-block:last-child {
    border-bottom: none;
}

.time {
    flex-shrink: 0;
    width: 100px;
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.event {
    flex-grow: 1;
}

.presenter {
    font-weight: 600;
    color: var(--gray-900);
}

.affiliation {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.session-people {
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.role {
    color: var(--gray-500);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Paper title inside a schedule row (seminar sessions) */
.time-block .paper-authors {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.time-block .paper-title {
    color: var(--gray-900);
    font-size: 0.9375rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Linked and unlinked session titles should look the same; the link
   reveals itself on hover, as on the Related Papers page. */
.time-block .paper-title a {
    color: var(--gray-900);
}

.time-block .paper-title a:hover {
    color: var(--columbia-navy);
}

/* Title on the left, actions on the right; they stack on narrow screens. */
.paper-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.paper-title-row .paper-title {
    flex: 1 1 18rem;
}

.paper-title-row .event-actions {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.event-action {
    display: inline-block;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    color: var(--columbia-navy);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.event-action:hover {
    border-color: var(--gray-300);
    color: var(--columbia-navy);
    background: var(--gray-50);
}

.event-action:focus-visible {
    outline: 2px solid var(--columbia-navy);
    outline-offset: 2px;
}

.session-questions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
}

.session-questions ul {
    margin: 0;
    padding-left: 1.15rem;
}

.session-questions li {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-bottom: 0.35rem;
}

.session-questions li:last-child {
    margin-bottom: 0;
}

.format-note {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

/* Participants */
.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.participant {
    background: var(--gray-100);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.9375rem;
}

/* Papers, reading list and terms — one shared list treatment, no cards */
.papers-grid,
.reading-cards,
.term-list {
    display: block;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}

.term-row {
    display: block;
    color: inherit;
}

.term-row:hover {
    text-decoration: none;
}

.term-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--columbia-navy);
    margin-bottom: 0.15rem;
}

.term-meta {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.paper-card,
.reading-card,
.term-row {
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    padding: 0.875rem 1.25rem;
    transition: background 0.2s;
}

.paper-card:last-child,
.reading-card:last-child,
.term-row:last-child {
    border-bottom: none;
}

.paper-card:hover,
.reading-card:hover,
.term-row:hover {
    background: var(--gray-50);
}

.paper-card .paper-title,
.reading-card-title {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.2rem;
    color: var(--gray-900);
}

.paper-card .paper-title a {
    color: var(--gray-900);
}

.paper-card .paper-title a:hover {
    color: var(--columbia-navy);
}

.paper-card .paper-authors,
.reading-card-authors {
    display: inline;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.paper-card .paper-venue,
.reading-card-venue {
    display: inline;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.paper-card .paper-authors::after,
.reading-card-authors::after {
    content: " \00b7 ";
    color: var(--gray-400);
}

/* Reading list tabs */
.topic-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.topic-tab {
    font-family: 'Source Sans 3', sans-serif;
    padding: 0 0 0.35rem 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.topic-tab:hover {
    color: var(--columbia-navy);
}

.topic-tab.active {
    color: var(--columbia-navy);
    font-weight: 600;
    border-bottom-color: var(--columbia-blue);
}

.topic-section {
    display: none;
}

.topic-section.active {
    display: block;
}

.topic-header {
    background: var(--columbia-navy);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 2rem 0 1rem 0;
}

.topic-section > .topic-header:first-child {
    margin-top: 0;
}

/* Media */
.timeline {
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}

.media-year {
    background: var(--columbia-navy);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.media-item {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
}

.media-item:hover {
    background: var(--gray-50);
}

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

.media-meta {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 0.15rem;
}

.media-source {
    color: var(--columbia-navy);
    font-weight: 600;
}

.media-title {
    font-size: 0.9375rem;
    line-height: 1.45;
}

.media-title a {
    color: var(--gray-800);
}

.media-title a:hover {
    color: var(--columbia-navy);
}

/* Footer */
footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.8125rem;
}

footer p {
    margin: 0.25rem 0;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    header h1 {
        font-size: 1.05rem;
    }

    nav .container {
        gap: 1rem;
    }

    .event-details {
        flex-direction: column;
        gap: 1.5rem;
    }

    .time-block {
        flex-direction: column;
        gap: 0.5rem;
    }

    .time {
        width: auto;
    }

    .session-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .session-chair {
        white-space: normal;
    }

    .participants-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Reading list titles may carry a link */
.reading-card-title a {
    color: var(--gray-900);
}

.reading-card-title a:hover {
    color: var(--columbia-navy);
}

/* Upcoming seminar poster, shown under the organizers line */
.upcoming-poster {
    margin: 2rem auto 0;
    width: 80%;
}

.upcoming-poster img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}


/* Registration call-to-action above the upcoming poster */
.register-line {
    margin: 1.75rem 0 0;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1.0625rem;
    color: var(--gray-700);
}

.register-line a {
    font-weight: 600;
}

/* Copy-poster action under the upcoming poster */
.poster-actions {
    width: 80%;
    margin: 0.75rem auto 0;
    text-align: right;
}

.poster-actions button.event-action {
    font-family: inherit;
    cursor: pointer;
}

/* Mailing list signup on the seminar page */
.mc-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.mc-form input {
    flex: 1 1 14rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
}

.mc-form button.event-action {
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    background: var(--white);
}

.mc-status {
    margin-top: 0.5rem;
    color: var(--gray-700);
}

.mc-status:empty {
    display: none;
}

/* Session recordings on the Past Sessions page */
.session-video {
    display: block;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    margin-top: 1rem;
    background: #000;
    border-radius: 4px;
}
