/* Sora For All — history page styles */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-heading: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme toggle */
.theme-toggle-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

#theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
}

#theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: scale(1.05);
}

#theme-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

#theme-toggle .moon {
    display: block;
}

#theme-toggle .sun {
    display: none;
}

[data-theme="dark"] #theme-toggle .moon {
    display: none;
}

[data-theme="dark"] #theme-toggle .sun {
    display: block;
}

/* Layout */
.main-content {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 4.5rem 1rem 3rem;
}

.sora-container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 1.5rem;
}

.title {
    font-family: var(--font-family-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Status banner */
.status-banner {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: var(--shadow-md);
}

.status-banner strong {
    font-weight: 600;
}

.status-banner .source {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Article body */
section {
    margin-bottom: 2.5rem;
}

h2 {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--primary-hover);
}

blockquote {
    background: var(--bg-secondary);
    border-left: 3px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1.25rem;
    margin: 0 0 1rem;
    color: var(--text-secondary);
}

.source {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Timeline — vertical rail, mobile-first */
.timeline {
    list-style: none;
    margin: 0.5rem 0 1.5rem;
    padding: 0;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0.4375rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: var(--border-color);
}

.tl-item {
    position: relative;
    padding: 0 0 1.5rem 1.75rem;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--primary-color);
    box-sizing: border-box;
}

.tl-date {
    display: inline-block;
    font-family: var(--font-family-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--primary-color);
    background: var(--bg-tertiary);
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.tl-body p {
    margin-bottom: 0.35rem;
}

.tl-source {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.tl-highlight .tl-body {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
}

.tl-highlight::before {
    background: var(--primary-color);
}

/* Sponsor card */
.sponsor-card {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(59, 130, 246, 0.08));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-md);
}

.sponsor-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.sponsor-row {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.sponsor-logo {
    flex: 0 0 auto;
    width: 140px;
    height: auto;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

.sponsor-title {
    font-family: var(--font-family-heading);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.sponsor-text {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

.btn-sponsor {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 0.7rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-sponsor:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-1px);
}

/* Footer */
.page-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9375rem;
}

@media (max-width: 640px) {
    .main-content {
        padding-top: 4rem;
    }

    .title {
        font-size: 2rem;
    }

    .sponsor-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-sponsor {
        display: block;
        text-align: center;
    }
}
