/* Late Republic Revision Hub - Shared Styles */
/* Matches Classicalia design language */

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

body {
    font-family: 'Google Sans', 'Google Sans Display', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    color: #1f2937;
    scroll-behavior: smooth;
}

/* ===== COLOUR SYSTEM ===== */
:root {
    --blue: #1a73e8;
    --blue-light: #e8f0fe;
    --green: #1e8e3e;
    --green-light: #e6f4ea;
    --red: #d93025;
    --red-light: #fce8e6;
    --yellow: #f9ab00;
    --yellow-light: #fef7e0;
    --purple: #8430ce;
    --purple-light: #f3e8fd;
    --teal: #007b83;
    --teal-light: #e0f5f5;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --card-border: #dadce0;
    --text-primary: #1f2937;
    --text-secondary: #5f6368;
    --text-light: #80868b;
}

/* ===== FLOATING BACKGROUND ===== */
.bg-shapes {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 102, 255, 0.03);
    animation: float 25s infinite ease-in-out;
}

.shape1 { width: 500px; height: 500px; top: -250px; right: -200px; }
.shape2 { width: 350px; height: 350px; bottom: -150px; left: -100px; animation-delay: 7s; }
.shape3 { width: 280px; height: 280px; top: 40%; right: 5%; animation-delay: 14s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== GLOBAL INFO BUTTON ===== */
.global-info-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: var(--blue);
}

.global-info-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ===== SITE HEADER ===== */
.site-header {
    position: relative;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    padding: 1.25rem 2rem;
}

.site-header .header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-header .logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.site-header .logo a {
    text-decoration: none;
    color: var(--blue);
}

.site-header .author {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 400;
}

.site-header .header-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: auto;
}

/* ===== TOPIC NAV BAR ===== */
.topic-nav-bar {
    position: relative;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.topic-nav-bar::-webkit-scrollbar {
    height: 3px;
}

.topic-nav-bar::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 3px;
}

.topic-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    padding: 0 1rem;
    white-space: nowrap;
}

.topic-nav-link {
    display: inline-block;
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.topic-nav-link:hover {
    color: var(--blue);
    background: var(--blue-light);
}

.topic-nav-link.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
    font-weight: 600;
}

/* ===== PAGE HEADER ===== */
.page-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    padding: 2rem 2rem 0;
    transition: box-shadow 0.2s ease;
}

.page-header.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.page-header-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.page-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.page-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.chip-date {
    background: #f1f3f4;
    color: var(--text-secondary);
}

.chip-caesar { background: var(--red-light); color: var(--red); }
.chip-cicero { background: var(--blue-light); color: var(--blue); }
.chip-cato { background: var(--green-light); color: var(--green); }
.chip-pompey { background: var(--purple-light); color: var(--purple); }
.chip-clodius { background: var(--yellow-light); color: var(--yellow); }
.chip-neutral { background: var(--teal-light); color: var(--teal); }
.chip-senate { background: var(--green-light); color: var(--green); }

.page-key-question {
    font-size: 1rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Page tabs */
.page-tabs {
    display: flex;
    gap: 0;
    border-top: 1px solid #f1f3f4;
    margin: 0 -2rem;
    padding: 0 2rem;
}

.page-tab {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.page-tab:hover {
    color: var(--blue);
    background: var(--blue-light);
}

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

/* ===== MAIN CONTENT AREA ===== */
.main-content {
    position: relative;
    z-index: 5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== EVENT CARDS GRID ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.event-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.event-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    border-color: transparent;
}

.event-card-accent {
    height: 3px;
}

.accent-red { background: var(--red); }
.accent-blue { background: var(--blue); }
.accent-green { background: var(--green); }
.accent-purple { background: var(--purple); }
.accent-yellow { background: var(--yellow); }
.accent-teal { background: var(--teal); }

.event-card-body {
    padding: 1.25rem;
}

.event-card-date {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.event-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.event-card-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.event-card-arrow {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    color: var(--text-light);
    font-size: 1rem;
    transition: transform 0.15s ease;
}

.event-card:hover .event-card-arrow {
    transform: translateX(3px);
}

/* ===== LETTER CARD VARIANT ===== */
.letter-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--blue);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 1.25rem;
}

.letter-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.letter-card-ref {
    font-family: 'Roboto Mono', monospace;
    font-style: italic;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 0.3rem;
}

.letter-card-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.letter-card-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.letter-card-phrase {
    display: inline-block;
    margin-top: 0.5rem;
    font-family: 'Roboto Mono', monospace;
    font-style: italic;
    font-size: 0.8rem;
    color: var(--blue);
    background: var(--blue-light);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ===== CONTEXT CARD (intro card at top of overview) ===== */
.context-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-top: 3px solid var(--teal);
}

.context-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.context-card p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.context-card p:last-child {
    margin-bottom: 0;
}

/* ===== VOCABULARY STRIP ===== */
.vocab-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.vocab-chip {
    font-family: 'Roboto Mono', monospace;
    font-style: italic;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--teal-light);
    color: var(--teal);
    font-weight: 500;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    z-index: 2000;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    overflow-y: auto;
}

.modal-overlay.open {
    display: flex;
    animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 720px;
    width: 100%;
    margin: 2rem auto;
    position: relative;
    animation: modalIn 0.25s ease;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15);
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-accent {
    height: 4px;
    border-radius: 16px 16px 0 0;
}

.modal-header {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #f1f3f4;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f1f3f4;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--card-border);
    color: var(--text-primary);
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-right: 2.5rem;
    line-height: 1.3;
}

.modal-date {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-body {
    padding: 1.5rem;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.modal-section p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.modal-section p:last-child {
    margin-bottom: 0;
}

/* Latin quotes in modals */
.latin-quote {
    background: #fafafa;
    border-left: 3px solid var(--card-border);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.latin-text {
    font-family: 'Roboto Mono', monospace;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 0.4rem;
}

.latin-translation {
    font-size: 0.825rem;
    color: var(--text-secondary);
    font-style: italic;
}

.latin-analysis {
    font-size: 0.825rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f3f4;
}

/* Exam tip box */
.exam-tip {
    background: var(--blue-light);
    border-left: 4px solid var(--blue);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
}

.exam-tip-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--blue);
    margin-bottom: 0.4rem;
}

.exam-tip p, .exam-tip li {
    font-size: 0.85rem;
    color: #1a56a8;
    line-height: 1.6;
}

.exam-tip ul {
    margin: 0.4rem 0 0 1.25rem;
}

.exam-tip li {
    margin-bottom: 0.25rem;
}

/* ===== SEE ALSO CROSS-REFERENCES ===== */
.see-also {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f4;
}

.see-also-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.see-also-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.see-also-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--teal);
    background: var(--teal-light);
    text-decoration: none;
    transition: all 0.15s ease;
}

.see-also-chip:hover {
    background: var(--teal);
    color: #fff;
}

.see-also-arrow {
    font-size: 0.65rem;
}

/* ===== MODEL PARAGRAPH ===== */
.model-paragraph {
    margin-top: 1rem;
    border: 1px solid var(--green-light);
    border-left: 4px solid var(--green);
    border-radius: 0 8px 8px 0;
    overflow: hidden;
}

.model-paragraph h5 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--green);
    padding: 0.75rem 1rem 0;
    margin-bottom: 0.4rem;
}

.model-paragraph-text {
    padding: 0 1rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-style: italic;
}

.model-paragraph-text p {
    margin-bottom: 0.5rem;
}

.model-paragraph-text p:last-child {
    margin-bottom: 0;
}

/* ===== SOURCE SECTION HEADINGS ===== */
.source-section {
    margin-bottom: 1rem;
}

.source-section:last-child {
    margin-bottom: 0;
}

.source-section h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.source-section p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.source-gaps {
    background: var(--yellow-light);
    border-left: 3px solid var(--yellow);
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
}

.source-gaps-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #b47900;
    margin-bottom: 0.3rem;
}

.source-gaps p {
    font-size: 0.825rem;
    color: #7a5200;
    line-height: 1.5;
}

/* ===== EVENTS LIST (chronological) ===== */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.event-list-item {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.event-list-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.event-list-date {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 80px;
    padding-top: 2px;
}

.event-list-content {
    flex: 1;
}

.event-list-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.event-list-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== SOURCES TAB ===== */
.source-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.source-card-header {
    padding: 1rem 1.25rem;
    background: #fafafa;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.source-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.source-card-author {
    font-size: 0.8rem;
    color: var(--text-light);
}

.source-card-body {
    padding: 1.25rem;
    display: none;
}

.source-card.open .source-card-body {
    display: block;
}

.source-card-toggle {
    font-size: 0.8rem;
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.source-card.open .source-card-toggle {
    transform: rotate(180deg);
}

/* ===== EXAM TAB ===== */
.question-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.question-card-header {
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.question-card-header:hover {
    background: #fafafa;
}

.question-text {
    font-size: 0.925rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    flex: 1;
}

.question-type-chip {
    flex-shrink: 0;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--purple-light);
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.question-card-body {
    padding: 0 1.25rem 1.25rem;
    display: none;
    border-top: 1px solid #f1f3f4;
}

.question-card.open .question-card-body {
    display: block;
    padding-top: 1rem;
}

.question-card-toggle {
    font-size: 0.8rem;
    color: var(--text-light);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.question-card.open .question-card-toggle {
    transform: rotate(180deg);
}

.argument-structure h5 {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.argument-structure ul {
    margin: 0 0 1rem 1.25rem;
}

.argument-structure li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.3rem;
}

.key-evidence {
    margin-top: 0.75rem;
}

.key-evidence h5 {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.key-evidence p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== LETTERS GRID (Page 13) ===== */
.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* ===== THEME CARDS (Page 14) ===== */
.theme-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    border-top: 3px solid var(--teal);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.theme-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.theme-card-summary {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== HUB INDEX PAGE ===== */
.hub-hero {
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    padding: 3rem 2rem 2.5rem;
    text-align: center;
    position: relative;
    z-index: 5;
}

.hub-hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
    margin-bottom: 0.25rem;
}

.hub-hero h1 span {
    color: var(--blue);
}

.hub-hero .hub-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: -1px;
    margin-bottom: 1.25rem;
}

.hub-hero .hub-logo a {
    color: var(--blue);
    text-decoration: none;
}

.hub-hero .hub-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.hub-hero .hub-spec {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
    background: #f1f3f4;
    padding: 4px 14px;
    border-radius: 999px;
}

.hub-topics {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hub-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-light);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.hub-section-title:first-child {
    margin-top: 0;
}

.hub-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.hub-topic-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.hub-topic-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.hub-topic-accent {
    height: 3px;
}

.hub-topic-body {
    padding: 1.25rem;
}

.hub-topic-number {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.hub-topic-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.hub-topic-desc {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.hub-topic-letters {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.hub-letter-chip {
    font-family: 'Roboto Mono', monospace;
    font-style: italic;
    font-size: 0.65rem;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--blue-light);
    color: var(--blue);
}

/* ===== INFO MODAL ===== */
.info-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    z-index: 5000;
    justify-content: center;
    align-items: center;
}

.info-modal-overlay.open {
    display: flex;
}

.info-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    position: relative;
    animation: modalIn 0.25s ease;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.info-modal h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.info-modal p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.info-modal .contact-links {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-modal .contact-links a {
    font-size: 0.85rem;
    color: var(--blue);
    text-decoration: none;
}

.info-modal .contact-links a:hover {
    text-decoration: underline;
}

/* ===== VIEW TOGGLE (grid ↔ timeline) ===== */
.view-toggle-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.view-toggle {
    display: inline-flex;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg);
}

.view-toggle-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    line-height: 1;
}

.view-toggle-btn:first-child {
    border-right: 1px solid var(--card-border);
}

.view-toggle-btn:hover {
    color: var(--blue);
    background: var(--blue-light);
}

.view-toggle-btn.active {
    color: var(--blue);
    background: var(--blue-light);
    font-weight: 600;
}

/* ===== ARGUMENT GRID ===== */
.argument-grid {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.argument-grid-question {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    line-height: 1.4;
}

.argument-grid-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.argument-grid-col {
    padding: 1rem 1.25rem 1.25rem;
}

.argument-grid-for {
    border-right: 1px solid var(--card-border);
    background: rgba(30, 142, 62, 0.03);
}

.argument-grid-against {
    background: rgba(217, 48, 37, 0.03);
}

.argument-grid-col-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
}

.argument-grid-for-header {
    color: var(--green);
    border-bottom-color: var(--green);
}

.argument-grid-against-header {
    color: var(--red);
    border-bottom-color: var(--red);
}

.argument-grid-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.argument-grid-list li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 0.4rem 0 0.4rem 1.1rem;
    position: relative;
}

.argument-grid-list li::before {
    content: '\2022';
    position: absolute;
    left: 0;
    font-weight: 700;
}

.argument-grid-for .argument-grid-list li::before {
    color: var(--green);
}

.argument-grid-against .argument-grid-list li::before {
    color: var(--red);
}

.argument-grid-verdict {
    border-top: 1px solid var(--card-border);
    padding: 1rem 1.5rem;
    background: var(--teal-light);
    border-left: 4px solid var(--teal);
}

.argument-grid-verdict-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--teal);
    margin-bottom: 0.4rem;
}

.argument-grid-verdict p {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
    font-style: italic;
    margin: 0;
}

/* ===== KEY POINT BOXES ===== */
.key-point-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-left: 5px solid var(--blue);
    border-radius: 0 12px 12px 0;
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0;
}

.key-point-box.key-point-red {
    border-left-color: var(--red);
    background: linear-gradient(135deg, rgba(217, 48, 37, 0.04), var(--card-bg) 60%);
}

.key-point-box.key-point-blue {
    border-left-color: var(--blue);
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.04), var(--card-bg) 60%);
}

.key-point-box.key-point-green {
    border-left-color: var(--green);
    background: linear-gradient(135deg, rgba(30, 142, 62, 0.04), var(--card-bg) 60%);
}

.key-point-box.key-point-purple {
    border-left-color: var(--purple);
    background: linear-gradient(135deg, rgba(132, 48, 206, 0.04), var(--card-bg) 60%);
}

.key-point-box.key-point-teal {
    border-left-color: var(--teal);
    background: linear-gradient(135deg, rgba(0, 123, 131, 0.04), var(--card-bg) 60%);
}

.key-point-box.key-point-yellow {
    border-left-color: var(--yellow);
    background: linear-gradient(135deg, rgba(249, 171, 0, 0.04), var(--card-bg) 60%);
}

.key-point-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.key-point-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ===== ANALYSIS BOX ===== */
.analysis-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.analysis-box-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
}

.analysis-box-sections {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.analysis-box-section {
    padding: 1rem 1.25rem 1.25rem;
}

.analysis-box-section:not(:last-child) {
    border-right: 1px solid var(--card-border);
}

.analysis-box-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
}

.analysis-box-short-term .analysis-box-section-label {
    color: var(--yellow);
    border-bottom-color: var(--yellow);
}

.analysis-box-long-term .analysis-box-section-label {
    color: var(--red);
    border-bottom-color: var(--red);
}

.analysis-box-exam .analysis-box-section-label {
    color: var(--blue);
    border-bottom-color: var(--blue);
}

.analysis-box-short-term {
    background: rgba(249, 171, 0, 0.03);
}

.analysis-box-long-term {
    background: rgba(217, 48, 37, 0.03);
}

.analysis-box-exam {
    background: rgba(26, 115, 232, 0.03);
}

.analysis-box-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-header {
        padding: 1.25rem 1.25rem 0;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-key-question {
        font-size: 0.9rem;
    }

    .page-tabs {
        margin: 0 -1.25rem;
        padding: 0 1.25rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

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

    .hub-hero h1 {
        font-size: 2rem;
    }

    .hub-topics-grid {
        grid-template-columns: 1fr;
    }

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

    .main-content {
        padding: 1.25rem;
    }

    .modal {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
    }

    .modal-overlay {
        padding: 0;
    }

    .modal-header {
        padding: 1.25rem 1.25rem 0.75rem;
    }

    .modal-body {
        padding: 1.25rem;
    }

    .modal-title {
        font-size: 1.15rem;
    }

    .event-list-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .event-list-date {
        width: auto;
    }

    .topic-nav-link {
        padding: 0.75rem 0.6rem;
        font-size: 0.7rem;
    }

    .context-card {
        padding: 1.25rem;
    }

    .hub-search-bar {
        padding: 0.6rem 1.25rem;
    }

    .hub-progress-bar {
        padding: 0.5rem 1.25rem;
    }

    .hub-timeline-section,
    .hub-figures-section {
        padding: 0 1.25rem;
    }

    .hub-connections-inner {
        padding: 0 1.25rem;
    }

    .hub-figures-grid {
        gap: 0.6rem;
    }

    .hub-figure-item {
        min-width: 65px;
        padding: 0.35rem;
    }

    .hub-figure-avatar {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    .hub-figure-bio-inner {
        flex-direction: column;
        gap: 0.5rem;
    }

    .connection-row {
        flex-wrap: wrap;
    }

    .connection-reason {
        margin-left: 0;
        width: 100%;
    }

    .analysis-box-sections {
        grid-template-columns: 1fr;
    }

    .analysis-box-section:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid var(--card-border);
    }

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

    .argument-grid-for {
        border-right: none;
        border-bottom: 1px solid var(--card-border);
    }

    .key-point-box {
        padding: 1rem 1.25rem;
    }

    .site-header {
        padding: 0.75rem 1rem;
    }

    .site-header .header-content {
        flex-wrap: wrap;
        gap: 0.25rem 0.75rem;
    }

    .site-header .header-subtitle {
        margin-left: 0;
        order: 3;
        width: 100%;
    }

    .view-toggle-bar {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.3rem;
    }

    .page-chips {
        gap: 0.35rem;
    }

    .chip {
        font-size: 0.7rem;
        padding: 2px 8px;
    }

    .vocab-chip {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

    .hub-hero {
        padding: 2.5rem 1.25rem 2rem;
    }

    .hub-hero h1 {
        font-size: 1.6rem;
    }
}

/* ===== SEARCH BAR ===== */
.hub-search-bar {
    position: relative;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    padding: 0.75rem 2rem;
}

.hub-search-inner {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
}

.hub-search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-light);
    pointer-events: none;
}

.hub-search-input {
    width: 100%;
    padding: 0.65rem 2.5rem 0.65rem 2.75rem;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.hub-search-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
    background: #fff;
}

.hub-search-input::placeholder {
    color: var(--text-light);
}

.hub-search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    line-height: 1;
    transition: all 0.15s ease;
}

.hub-search-clear:hover {
    background: #f1f3f4;
    color: var(--text-primary);
}

.hub-topic-card.search-hidden {
    display: none;
}

.hub-section-title.search-hidden {
    display: none;
}

/* ===== PROGRESS BAR ===== */
.hub-progress-bar {
    position: relative;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--card-border);
    padding: 0.6rem 2rem;
}

.hub-progress-inner {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hub-progress-track {
    flex: 1;
    height: 6px;
    background: #f1f3f4;
    border-radius: 999px;
    overflow: hidden;
}

.hub-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    border-radius: 999px;
    width: 0%;
    transition: width 0.5s ease;
}

.hub-progress-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
}

.hub-topic-card .hub-visited-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.hub-topic-card.visited .hub-visited-badge {
    opacity: 1;
    transform: scale(1);
}

.hub-topic-card {
    position: relative;
}

/* ===== TIMELINE ===== */
.hub-timeline-section {
    position: relative;
    z-index: 5;
    max-width: 1200px;
    margin: 1.5rem auto 0;
    padding: 0 2rem;
}

.hub-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px 12px 0 0;
    user-select: none;
}

.hub-timeline-header:hover {
    background: #fafafa;
}

.hub-timeline-toggle {
    font-size: 0.9rem;
    color: var(--text-light);
    transition: transform 0.25s ease;
}

.hub-timeline-section.collapsed .hub-timeline-toggle {
    transform: rotate(-90deg);
}

.hub-timeline-wrap {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    max-height: 200px;
    transition: max-height 0.35s ease;
}

.hub-timeline-section.collapsed .hub-timeline-wrap {
    max-height: 0;
    border: none;
}

.hub-timeline-scroll {
    overflow-x: auto;
    padding: 2rem 2rem 1.5rem;
    -webkit-overflow-scrolling: touch;
}

.hub-timeline-scroll::-webkit-scrollbar {
    height: 4px;
}

.hub-timeline-scroll::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 4px;
}

.hub-timeline-line {
    position: relative;
    min-width: 900px;
    height: 60px;
    display: flex;
    align-items: center;
}

.hub-timeline-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: #e0e0e0;
    border-radius: 3px;
    transform: translateY(-50%);
}

.timeline-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    cursor: pointer;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.timeline-marker:hover .timeline-dot {
    transform: scale(1.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.timeline-year {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.timeline-tooltip {
    position: absolute;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 10;
}

.timeline-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--text-primary);
}

.timeline-marker:hover .timeline-tooltip {
    opacity: 1;
}

/* ===== KEY FIGURES ===== */
.hub-figures-section {
    position: relative;
    z-index: 5;
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 2rem;
}

.hub-figures-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px 12px 0 0;
    user-select: none;
}

.hub-figures-header:hover {
    background: #fafafa;
}

.hub-figures-toggle {
    font-size: 0.9rem;
    color: var(--text-light);
    transition: transform 0.25s ease;
}

.hub-figures-section.collapsed .hub-figures-toggle {
    transform: rotate(-90deg);
}

.hub-figures-wrap {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    max-height: 600px;
    transition: max-height 0.35s ease;
    padding: 1.25rem;
}

.hub-figures-section.collapsed .hub-figures-wrap {
    max-height: 0;
    padding: 0 1.25rem;
    border: none;
}

.hub-figures-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.hub-figure-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    min-width: 80px;
}

.hub-figure-item:hover {
    background: var(--bg);
}

.hub-figure-item.active {
    background: var(--bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hub-figure-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.hub-figure-item:hover .hub-figure-avatar {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hub-figure-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.hub-figure-bio {
    margin-top: 1rem;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.hub-figure-bio.open {
    max-height: 200px;
}

.hub-figure-bio-inner {
    background: var(--bg);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.hub-figure-bio-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.hub-figure-bio-text {
    flex: 1;
}

.hub-figure-bio-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.hub-figure-bio-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.hub-topic-card.figure-highlight {
    box-shadow: 0 0 0 2px var(--blue), 0 4px 16px rgba(26, 115, 232, 0.15);
    transform: translateY(-2px);
}

/* ===== CONNECTIONS MAP ===== */
.hub-connections-section {
    position: relative;
    z-index: 5;
    background: var(--bg);
    padding: 1rem 0 3rem;
}

.hub-connections-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hub-connections-canvas {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    overflow-x: auto;
}

.connections-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.connection-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: var(--bg);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.connection-row:hover {
    background: #eef2f7;
}

.connection-from,
.connection-to {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    cursor: pointer;
}

.connection-from:hover,
.connection-to:hover {
    filter: brightness(0.92);
    transform: scale(1.03);
}

.connection-arrow {
    color: var(--text-light);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.connection-reason {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-left: 0.5rem;
    line-height: 1.4;
}

/* Connection color variants */
.conn-red { background: var(--red-light); color: var(--red); }
.conn-blue { background: var(--blue-light); color: var(--blue); }
.conn-green { background: var(--green-light); color: var(--green); }
.conn-purple { background: var(--purple-light); color: var(--purple); }
.conn-yellow { background: var(--yellow-light); color: var(--yellow); }
.conn-teal { background: var(--teal-light); color: var(--teal); }

/* ===== ARGUMENT GRID (inline) ===== */
.argument-grid {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.argument-grid-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.argument-grid-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.argument-grid-col {
    padding: 1rem;
    border-radius: 8px;
}

.argument-grid-for {
    background: var(--green-light);
}

.argument-grid-against {
    background: var(--red-light);
}

.argument-grid-col-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.argument-grid-for-header { color: var(--green); }
.argument-grid-against-header { color: var(--red); }

.argument-grid-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.argument-grid-list li {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.argument-grid-list li:last-child {
    border-bottom: none;
}

.argument-grid-verdict {
    background: var(--blue-light);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.argument-grid-verdict-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--blue);
    margin-bottom: 0.3rem;
}

.argument-grid-verdict p {
    font-size: 0.85rem;
    color: #1a56a8;
    line-height: 1.5;
}

/* Key Point Boxes */
.key-point-box {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-left: 4px solid;
}

.key-point-blue { background: var(--blue-light); border-color: var(--blue); }
.key-point-red { background: var(--red-light); border-color: var(--red); }
.key-point-green { background: var(--green-light); border-color: var(--green); }
.key-point-purple { background: var(--purple-light); border-color: var(--purple); }
.key-point-teal { background: var(--teal-light); border-color: var(--teal); }

.key-point-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.key-point-blue .key-point-label { color: var(--blue); }
.key-point-red .key-point-label { color: var(--red); }
.key-point-green .key-point-label { color: var(--green); }
.key-point-purple .key-point-label { color: var(--purple); }
.key-point-teal .key-point-label { color: var(--teal); }

.key-point-text {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* Analysis Box */
.analysis-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.analysis-box-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.analysis-box-sections {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.analysis-box-section {
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.analysis-box-short-term { background: var(--red-light); }
.analysis-box-long-term { background: var(--blue-light); }
.analysis-box-exam { background: var(--green-light); }

.analysis-box-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.analysis-box-short-term .analysis-box-section-label { color: var(--red); }
.analysis-box-long-term .analysis-box-section-label { color: var(--blue); }
.analysis-box-exam .analysis-box-section-label { color: var(--green); }

.analysis-box-section p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== VOCAB TOOLTIP ===== */
.vocab-tooltip {
    display: none;
    position: absolute;
    z-index: 3000;
    max-width: 300px;
    background: var(--text-primary);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.vocab-chip:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== PRINT ===== */
@media print {
    .topic-nav-bar,
    .global-info-btn,
    .bg-shapes,
    .page-tabs,
    .modal-overlay,
    .info-modal-overlay {
        display: none !important;
    }

    .tab-content {
        display: block !important;
    }

    .event-card, .letter-card, .source-card, .question-card,
    .argument-grid, .key-point-box, .analysis-box {
        break-inside: avoid;
        box-shadow: none;
    }

    body {
        background: #fff;
    }

    .site-header {
        background: none;
        color: #000;
        -webkit-print-color-adjust: exact;
    }
}
