/* OpenGlossary Styles */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-secondary: #f3f4f6;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

header nav {
    margin-bottom: 1rem;
}

header nav a {
    color: white;
    opacity: 0.8;
    text-decoration: none;
}

header nav a:hover {
    opacity: 1;
}

/* Main content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Search section */
.search-section {
    margin-bottom: 2rem;
}

#search {
    max-width: 600px;
    margin: 0 auto;
}

/* Pagefind customization */
.pagefind-ui__search-input {
    border-radius: 8px !important;
    border: 2px solid var(--border-color) !important;
    padding: 1rem 1rem 1rem 2.5rem !important;  /* Extra left padding for search icon */
    font-size: 1rem !important;
}

.pagefind-ui__search-input:focus {
    border-color: var(--primary-color) !important;
    outline: none !important;
}

/* Stats section */
.stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Clickable stat link */
.stat-link {
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.stat-link:hover {
    background: rgba(59, 130, 246, 0.1);
}

.stat-link .stat-value {
    color: var(--primary-color);
}

.stat-link .stat-label {
    color: var(--text-light);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1.5rem;
}

.tab-button {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    border-radius: 8px 8px 0 0;
    margin-right: 4px;
    transition: all 0.2s;
    text-decoration: none;
}

.tab-button:hover {
    background: #e8e8e8;
    text-decoration: none;
}

.tab-button.active {
    background: #3498db;
    color: white;
}

.tab-button .count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-left: 8px;
}

.tab-button.active .count {
    background: rgba(255,255,255,0.2);
}

.tab-content {
    display: none;
}

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

.tab-description {
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
}

/* Glossary list */
.glossary-list h2 {
    margin-bottom: 1rem;
}

/* A-Z Alphabet Navigation */
.alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.alphabet-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    background: white;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
}

.alphabet-link:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.alphabet-link.disabled {
    color: var(--text-light);
    opacity: 0.4;
    cursor: default;
    background: transparent;
}

/* Letter sections */
.letter-section {
    margin-bottom: 2rem;
    scroll-margin-top: 4rem;
}

.letter-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.glossary-table {
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

thead {
    background: var(--bg-secondary);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tbody tr:hover {
    background: var(--bg-secondary);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    color: white;
    font-weight: 500;
}

.lang-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-light);
    font-family: var(--font-mono);
}

.term-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Tags */
.tags-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.tag-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #e2e8f0;
    color: #475569;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

@media (prefers-color-scheme: dark) {
    .tag-badge {
        background: #334155;
        color: #cbd5e1;
    }
}

/* Glossary meta */
.glossary-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* Glossary content */
.glossary-content {
    margin-bottom: 2rem;
}

.terms-table {
    font-size: 0.95rem;
}

.terms-table td:first-child {
    font-weight: 500;
}

/* Glossary info */
.glossary-info {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

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

.glossary-description {
    line-height: 1.6;
}

.glossary-description p {
    margin-bottom: 0.5rem;
}

.glossary-description p:last-child {
    margin-bottom: 0;
}

.glossary-description a {
    color: var(--primary-color);
}

.glossary-meta-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1rem;
    font-size: 0.9rem;
}

.glossary-meta-list dt {
    font-weight: 600;
    color: var(--text-light);
}

.glossary-meta-list dd {
    color: var(--text-color);
}

.glossary-info dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

.glossary-info dt {
    font-weight: 600;
    color: var(--text-light);
}

.glossary-info dd {
    color: var(--text-color);
}

/* Resources */
.resources-grid {
    display: grid;
    gap: 1.5rem;
}

.resource-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.resource-card h3 {
    margin-bottom: 0.5rem;
}

.resource-card h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.resource-card h3 a:hover {
    color: var(--primary-color);
}

.resource-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.resource-card .resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.resource-card .date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-left: auto;
}

.type-badge.resource {
    background: #9b59b6;
    color: white;
}

.resource-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.resource-content {
    line-height: 1.7;
}

.resource-content ul,
.resource-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.resource-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.resource-source {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bg-secondary);
    font-size: 0.9rem;
    color: var(--text-light);
}

.empty-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    color: var(--text-light);
    margin-top: 3rem;
}

footer p {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }
    
    .stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Hide less important columns on mobile */
    th:nth-child(4),
    td:nth-child(4) {
        display: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f3f4f6;
        --text-light: #9ca3af;
        --bg-color: #111827;
        --bg-secondary: #1f2937;
        --border-color: #374151;
    }
    
    table {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    header {
        background: linear-gradient(135deg, #1e40af, #1e3a8a);
    }
}

/* Search term highlighting */
.search-highlight {
    background-color: #fef08a;
    color: #1f2937;
    padding: 0.1em 0.2em;
    border-radius: 2px;
    font-weight: 500;
}

@media (prefers-color-scheme: dark) {
    .search-highlight {
        background-color: #facc15;
        color: #1f2937;
    }
}

.highlight-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fef9c3;
    border: 1px solid #fde047;
    color: #854d0e;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.highlight-banner button {
    background: transparent;
    border: 1px solid #ca8a04;
    color: #854d0e;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.highlight-banner button:hover {
    background: #fde047;
}

@media (prefers-color-scheme: dark) {
    .highlight-banner {
        background: #422006;
        border-color: #854d0e;
        color: #fef08a;
    }
    
    .highlight-banner button {
        border-color: #ca8a04;
        color: #fef08a;
    }
    
    .highlight-banner button:hover {
        background: #854d0e;
    }
}


/* Site Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-brand:hover {
    opacity: 0.9;
}

.site-brand .site-logo {
    width: 32px;
    height: 32px;
}

.version-badge {
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
    color: white;
}

/* Page Container */
.page-container {
    min-height: calc(100vh - 200px);
}

/* Hero Section (home page) */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-section p {
    opacity: 0.9;
    font-size: 1.2rem;
}

/* Page Header (subpages) */
.page-header {
    background: var(--bg-secondary);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--text-light);
    font-size: 1.1rem;
}

.breadcrumb {
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Site Footer */
.site-footer {
    background: #1f2937;
    color: #9ca3af;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-section p {
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
}

/* Main content adjustments */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .header-nav {
        gap: 1rem;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }
}

/* Site logo in hero */
.site-logo {
    width: 48px;
    height: 48px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Site Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-brand:hover {
    opacity: 0.9;
}

.site-brand .site-logo {
    width: 32px;
    height: 32px;
}

.version-badge {
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
    color: white;
}

/* Page Container */
.page-container {
    min-height: calc(100vh - 200px);
}

/* Hero Section (home page) */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-section p {
    opacity: 0.9;
    font-size: 1.2rem;
}

/* Page Header (subpages) */
.page-header {
    background: var(--bg-secondary);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--text-light);
    font-size: 1.1rem;
}

.breadcrumb {
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Site Footer */
.site-footer {
    background: #1f2937;
    color: #9ca3af;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-section p {
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
}

/* Main content adjustments */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .header-nav {
        gap: 1rem;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }
}

/* Site logo in hero */
.site-logo {
    width: 48px;
    height: 48px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Site Header */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
}

.site-brand:hover {
    opacity: 0.9;
}

.site-brand .site-logo {
    width: 32px;
    height: 32px;
}

.version-badge {
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
}

.header-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
    color: white;
}

/* Page Container */
.page-container {
    min-height: calc(100vh - 200px);
}

/* Hero Section (home page) */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-section p {
    opacity: 0.9;
    font-size: 1.2rem;
}

/* Page Header (subpages) */
.page-header {
    background: var(--bg-secondary);
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--text-light);
    font-size: 1.1rem;
}

.breadcrumb {
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Site Footer */
.site-footer {
    background: #1f2937;
    color: #9ca3af;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-section p {
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
}

/* Main content adjustments */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .header-nav {
        gap: 1rem;
    }

    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }
}

/* Site logo in hero */
.site-logo {
    width: 48px;
    height: 48px;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Header left section with brand and tagline */
.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 400;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .header-tagline {
        display: none;
    }
}

/* =====================================================
   TERM PAGE STYLES
   ===================================================== */

/* Term meta badges */
.term-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
}

.type-badge.term {
    background: #e0f2fe;
    color: #0369a1;
}

/* Term content styling */
.term-content {
    line-height: 1.8;
    max-width: 800px;
}

/* Language section headers (h2) - clean, prominent */
.term-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding: 0;
    padding-bottom: 0.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid var(--primary-color);
}

/* First h2 doesn't need top margin */
.term-content h2:first-of-type {
    margin-top: 0.5rem;
}

/* Subsection headers (h3) - subtle, functional */
.term-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    padding: 0;
    background: none;
    border: none;
}

/* Horizontal rules as language separators */
.term-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
    margin: 2.5rem 0;
}

/* Lists with proper indentation */
.term-content ul,
.term-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.term-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

/* Nested lists */
.term-content ul ul,
.term-content ol ol,
.term-content ul ol,
.term-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Paragraphs */
.term-content p {
    margin-bottom: 1rem;
}

/* Tables in term content */
.term-content table {
    width: 100%;
    margin: 1rem 0 1.5rem;
    border-collapse: collapse;
}

.term-content th,
.term-content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

.term-content th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.term-content tbody tr:nth-child(even) {
    background: #fafafa;
}

/* Code and preformatted text */
.term-content code {
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: var(--font-mono);
}

.term-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.term-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Links in term content */
.term-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.term-content a:hover {
    text-decoration: underline;
}

/* Footnotes styling */
.term-content .footnote {
    scroll-margin-top: 5rem;  /* Offset for fixed header */
}

.term-content sup[id^="fnref"] {
    scroll-margin-top: 5rem;  /* Back-reference anchor offset */
}

/* Footnote list at bottom */
.term-content .footnote ol {
    padding-left: 1.5rem;
}

.term-content .footnote li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.term-content .footnote hr {
    margin: 2rem 0 1rem;
}

/* Term source link (simplified from term-info box) */
.term-source {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-light);
}

.term-source a {
    color: var(--primary-color);
}

/* Legacy term info box (can remove after migration) */
.term-info {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.term-info h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    background: none;
    padding: 0;
    border: none;
}

.term-info dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
}

.term-info dt {
    font-weight: 600;
    color: var(--text-light);
}

.term-info dd {
    color: var(--text-color);
}

/* Dark mode for term pages */
@media (prefers-color-scheme: dark) {
    .type-badge.term {
        background: #0c4a6e;
        color: #7dd3fc;
    }
    
    .term-content h2 {
        color: #60a5fa;
        border-bottom-color: #60a5fa;
    }
    
    .term-content h3 {
        color: #94a3b8;
    }

    .term-content hr {
        background: linear-gradient(to right, #60a5fa, transparent);
    }
    
    .term-content th {
        background: #374151;
    }
    
    .term-content tbody tr:nth-child(even) {
        background: #1f2937;
    }
    
    .term-content code {
        background: #374151;
    }

    .term-source {
        border-top-color: #374151;
    }
}

/* Header left section with brand and tagline */
.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-tagline {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 400;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .header-tagline {
        display: none;
    }
}

/* Tags Tab Header */
.tags-tab-header {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tags-tab-header p {
    color: #475569;
    margin: 0;
    font-size: 0.95rem;
}

.tag-reference-link {
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}

.tag-reference-link:hover {
    background: #2563eb;
}

/* Tag Reference Page */
.tag-conventions {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.tag-conventions h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #334155;
}

.tag-conventions ul {
    list-style: none;
    padding: 0;
}

.tag-conventions li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.tag-conventions li:last-child {
    border-bottom: none;
}

.tag-conventions code {
    background: #e2e8f0;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.tag-table-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #334155;
}

.tag-reference-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tag-reference-table th {
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

.tag-reference-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.tag-reference-table tr:last-child td {
    border-bottom: none;
}

.tag-reference-table tr:hover {
    background: #f8fafc;
}

/* Dark mode for tag reference */
@media (prefers-color-scheme: dark) {
    .tags-tab-header {
        background: linear-gradient(135deg, #1e293b, #334155);
    }
    
    .tags-tab-header p {
        color: #94a3b8;
    }
    
    .tag-conventions {
        background: #1e293b;
    }
    
    .tag-conventions h2 {
        color: #e2e8f0;
    }
    
    .tag-conventions li {
        border-bottom-color: #334155;
    }
    
    .tag-conventions code {
        background: #334155;
        color: #e2e8f0;
    }
    
    .tag-table-section h2 {
        color: #e2e8f0;
    }
    
    .tag-reference-table {
        background: #1e293b;
    }
    
    .tag-reference-table th {
        background: #2563eb;
    }
    
    .tag-reference-table td {
        border-bottom-color: #334155;
        color: #e2e8f0;
    }
    
    .tag-reference-table tr:hover {
        background: #334155;
    }
}
