/* SDRF-Proteomics Documentation Site Styles */
/* Hybrid Style - Clean, Professional, GitHub-inspired */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Core Colors - GitHub inspired */
    --bg: #ffffff;
    --bg-alt: #f6f8fa;
    --bg-card: #ffffff;
    --text: #24292f;
    --text-light: #57606a;
    --accent: #0969da;
    --accent-hover: #0550ae;
    --success: #1a7f37;
    --warning: #9a6700;
    --error: #cf222e;
    --border: #d0d7de;
    --border-light: #e8ebef;
    --code-bg: #f6f8fa;
    --code-block-bg: #0d1117;

    /* Legacy variable mapping for compatibility */
    --primary-color: var(--accent);
    --primary-dark: var(--accent-hover);
    --secondary-color: var(--text-light);
    --accent-color: #0891b2;
    --background: var(--bg);
    --background-alt: var(--bg-alt);
    --text-color: var(--text);
    --border-color: var(--border);
    --success-color: var(--success);
    --warning-color: var(--warning);
    --max-width: 1200px;
    --sidebar-width: 280px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

h2 .icon {
    margin-right: 8px;
}

h3 {
    font-size: 1.125rem;
    font-family: 'Inter', sans-serif;
}

h4 {
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

p {
    margin: 1em 0;
    color: var(--text);
}

.lead {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text-light);
}

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

a:hover {
    text-decoration: underline;
}

/* Code */
code, pre {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
}

code {
    font-size: 0.85em;
    background: var(--code-bg);
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

pre {
    background: var(--code-block-bg);
    color: #e6edf3;
    padding: 16px 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

.code-comment { color: #8b949e; }
.code-string { color: #a5d6ff; }
.code-keyword { color: #ff7b72; }

/* Header - Index Page */
.site-header {
    background: var(--bg);
    color: var(--text);
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
}

.site-header .header-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.header-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
}

.version-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--bg-alt);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.site-header h1 {
    margin: 0 0 12px;
    font-size: 2.25rem;
    color: var(--text);
    border: none;
}

.tagline, .subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
}

.main-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    background: var(--bg-alt);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.main-nav a {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-light);
    transition: all 0.15s;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--text);
    background: rgba(0,0,0,0.04);
    text-decoration: none;
}

.main-nav a.active {
    background: white;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.main-nav .version-link {
    font-size: 0.8rem;
    background: rgba(9, 105, 218, 0.1);
    color: var(--accent);
}

.main-nav .version-link:hover {
    background: rgba(9, 105, 218, 0.15);
}

/* Nav Search */
.nav-search {
    position: relative;
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.nav-search #search-input {
    width: 140px;
    padding: 6px 10px;
    padding-right: 3rem;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: white;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, width 0.2s;
}

.nav-search #search-input:focus {
    width: 200px;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.15);
}

.nav-search .search-shortcut {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    color: var(--text-light);
    background: var(--bg-alt);
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid var(--border);
}

/* Search */
.search-container {
    position: relative;
    margin: 1.5rem 0;
    max-width: 500px;
}

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

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.header-container #search-results {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    width: 400px;
    margin-top: 8px;
}

#search-results.active {
    display: block;
}

.search-result-item {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    transition: background 0.15s;
}

.search-result-item:hover {
    background: var(--bg-alt);
    text-decoration: none;
}

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

.result-title {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.result-section {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.result-snippet {
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.4;
}

.result-snippet mark,
.result-title mark {
    background: #fff8c5;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-light);
}

/* Container */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 48px 32px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 0.5rem 0 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.hero h2 {
    border: none;
    font-size: 1.75rem;
    margin-top: 0;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 1rem auto;
}

.hero .pdf-link {
    font-size: 0.9rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 24px 0;
}

/* Buttons */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.btn {
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.btn-secondary {
    background: var(--bg-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #f0f3f6;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: rgba(9, 105, 218, 0.1);
    text-decoration: none;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
    border-color: var(--border);
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.card-icon {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.card h3, .card h4, .card-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 6px;
    color: var(--text);
}

.card p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.5;
}

.card a, .card-link {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Centered flex grid for odd numbers of items */
.card-grid-centered {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.card-grid-centered .card {
    flex: 0 1 280px;
    max-width: 320px;
}

/* Compact horizontal card layout */
.card-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.card-compact {
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-align: center;
    transition: all 0.15s ease;
}

.card-compact:hover {
    border-color: var(--accent);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.card-compact h4 {
    margin: 0 0 6px 0;
    font-size: 0.9rem;
    color: var(--accent);
}

.card-compact p {
    margin: 0 0 10px 0;
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
}

.card-compact a {
    font-size: 0.75rem;
    font-weight: 500;
}

/* For 5 items in core templates, allow wrapping */
.card-row.card-row-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* For 3 items in guidelines */
.card-row.card-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 3rem;
}

/* Sections */
.section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
}

.section:last-child {
    border-bottom: none;
}

/* Template List */
.template-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1rem 0 2rem;
}

.template-list a {
    background: var(--bg-alt);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.template-list a:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    text-decoration: none;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin: 20px 0;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
    font-size: 0.95rem;
}

.feature-list .icon {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

/* Nav Pills */
.nav-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 24px 0;
    padding: 4px;
    background: var(--bg-alt);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.nav-pill {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.nav-pill:hover {
    color: var(--text);
    background: rgba(0,0,0,0.04);
    text-decoration: none;
}

.nav-pill.active {
    background: white;
    color: var(--text);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* Tables */
.table-container {
    margin: 24px 0;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

th {
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

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

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

/* Status Badges */
.badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 4px 8px;
    border-radius: 20px;
}

.badge-released, .status-released {
    display: inline-block;
    background: #dafbe1;
    color: #116329;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-dev, .status-dev {
    display: inline-block;
    background: #fff8c5;
    color: #6f5700;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Callout / Note */
.callout {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 24px 0;
}

.callout-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--accent);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.callout p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Citation Box */
.citation, .citation-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
}

.citation-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 600;
}

.citation-icon {
    font-size: 1.5rem;
}

.citation-header h3 {
    margin: 0;
    font-size: 1.125rem;
}

.citation-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text);
    margin: 0 0 1rem 0;
}

.citation-text em {
    color: var(--text-light);
}

.citation-quote {
    background: white;
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    margin: 0 0 1.25rem 0;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text);
    border-radius: 0 6px 6px 0;
}

.citation-links {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.citation-links a {
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-citation {
    background: var(--accent);
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-citation:hover {
    background: var(--accent-hover);
    text-decoration: none;
}

.btn-citation-secondary {
    background: white;
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid var(--accent);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-citation-secondary:hover {
    background: var(--accent);
    color: white;
    text-decoration: none;
}

/* Footer */
.site-footer {
    margin-top: 60px;
    padding: 24px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--text-light);
    background: var(--bg-alt);
}

.site-footer a {
    color: var(--text-light);
}

.site-footer a:hover {
    color: var(--accent);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.footer-logos .partner-logo img {
    max-height: 40px;
    max-width: 120px;
}

.version {
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* ==========================================
   AsciiDoc Generated Content Styles
   ========================================== */

#content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Table of Contents */
#toc {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    overflow-y: auto;
    background: var(--bg-alt);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
}

#toc.toc2 {
    position: fixed;
}

#toctitle {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

#toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

#toc ul ul {
    padding-left: 1rem;
}

#toc li {
    margin: 0.25rem 0;
}

#toc a {
    color: var(--text-light);
    font-size: 0.85rem;
    display: block;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

#toc a:hover {
    color: var(--accent);
    background: rgba(9, 105, 218, 0.05);
    text-decoration: none;
}

body.toc2 {
    padding-left: var(--sidebar-width);
}

body.toc2 #content {
    max-width: 900px;
}

/* AsciiDoc Generated Tables */
table.tableblock {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

table.tableblock thead {
    background: var(--bg-alt);
}

table.tableblock th,
table.tableblock td {
    padding: 10px 14px;
    text-align: left;
    border: 1px solid var(--border-light);
}

table.tableblock th {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text);
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

table.tableblock td p {
    margin: 0;
}

table.tableblock tbody tr:hover {
    background: var(--bg-alt);
}

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

/* AsciiDoc table with stripes */
table.tableblock.stripes-odd tbody tr:nth-child(odd),
table.tableblock.stripes-all tbody tr:nth-child(odd) {
    background: var(--bg-alt);
}

table.tableblock.stripes-even tbody tr:nth-child(even) {
    background: var(--bg-alt);
}

/* AsciiDoc table grid variants */
table.tableblock.grid-none th,
table.tableblock.grid-none td {
    border: none;
}

table.tableblock.grid-cols th,
table.tableblock.grid-cols td {
    border-top: none;
    border-bottom: none;
}

table.tableblock.grid-rows th,
table.tableblock.grid-rows td {
    border-left: none;
    border-right: none;
}

/* AsciiDoc frame variants */
table.tableblock.frame-none {
    border: none;
}

table.tableblock.frame-ends {
    border-left: none;
    border-right: none;
}

table.tableblock.frame-sides {
    border-top: none;
    border-bottom: none;
}

/* Scrollable table wrapper for wide tables */
.tableblock-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* Code in tables */
table.tableblock code {
    font-size: 0.8rem;
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
}

/* AsciiDoc Admonitions */
.admonitionblock {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    border-left: 4px solid;
    background: var(--bg-alt);
}

.admonitionblock.note {
    background: #eff6ff;
    border-color: var(--accent);
}

.admonitionblock.tip {
    background: #ecfdf5;
    border-color: var(--success);
}

.admonitionblock.important {
    background: #fff8c5;
    border-color: var(--warning);
}

.admonitionblock.warning {
    background: #ffebe9;
    border-color: var(--error);
}

.admonitionblock.caution {
    background: #fff7ed;
    border-color: #f97316;
}

.admonitionblock td.icon {
    font-weight: 600;
    padding-right: 0.75rem;
    vertical-align: top;
}

.admonitionblock td.content {
    padding: 0;
}

.admonitionblock td.content > :first-child {
    margin-top: 0;
}

.admonitionblock td.content > :last-child {
    margin-bottom: 0;
}

/* Section anchors */
.anchor {
    opacity: 0;
    transition: opacity 0.15s;
    margin-left: 0.5rem;
}

h2:hover .anchor,
h3:hover .anchor,
h4:hover .anchor {
    opacity: 1;
}

/* Lists */
ul, ol {
    padding-left: 1.5rem;
}

li {
    margin: 0.5rem 0;
}

/* Definition lists */
dl {
    margin: 1rem 0;
}

dt {
    font-weight: 600;
    margin-top: 1rem;
}

dd {
    margin-left: 1.5rem;
    color: var(--text-light);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.imageblock {
    margin: 1.5rem 0;
}

.imageblock .title {
    font-style: italic;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Documentation Page Header */
.doc-header {
    background: var(--bg);
    color: var(--text);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    border-bottom: 1px solid var(--border);
}

.doc-header-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.doc-header-brand a {
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
}

.doc-header-brand a:hover {
    text-decoration: none;
    color: var(--accent);
}

.doc-header-nav {
    display: flex;
    gap: 4px;
    align-items: center;
}

.doc-header-nav a {
    color: var(--text-light);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.15s;
}

.doc-header-nav a:hover {
    background: var(--bg-alt);
    color: var(--text);
    text-decoration: none;
}

.doc-header-nav .nav-current {
    background: var(--bg-alt);
    color: var(--text);
}

.doc-header-nav .version-link {
    background: rgba(9, 105, 218, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
}

body.has-doc-header {
    padding-top: 52px;
}

body.has-doc-header.toc2 #toc {
    top: 52px;
    height: calc(100vh - 52px);
}

/* Partners/Logos Section */
.partners-section {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.partners-section h2 {
    border-bottom: none;
    margin-bottom: 1.5rem;
}

.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 3rem;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.partner-logo:hover {
    opacity: 1;
    text-decoration: none;
}

.partner-logo img {
    max-height: 60px;
    max-width: 180px;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter 0.2s ease;
}

.partner-logo:hover img {
    filter: grayscale(0%);
}

/* Contributors Section */
.contributors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.contributor-group {
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid var(--border);
}

.contributor-group h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

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

.contributor-list li {
    font-size: 0.85rem;
    padding: 4px 0;
    color: var(--text);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.team-tag {
    font-size: 0.65rem;
    background: var(--accent);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.affiliation {
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
}

.contributors-note {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Templates Table */
.templates-table-wrapper {
    overflow-x: auto;
    margin-top: 24px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.templates-table {
    margin: 0;
    border: none;
    width: 100%;
}

.templates-table th {
    background: var(--bg-alt);
    color: var(--text);
    padding: 10px 12px;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.templates-table td {
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.8rem;
    vertical-align: middle;
}

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

.templates-table tr:hover {
    background-color: var(--bg-alt);
}

.templates-table td:first-child a {
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

.templates-table td:nth-child(2) {
    font-size: 0.78rem;
}

/* SDRF Example Table Styles */
.sdrf-example-table {
    margin: 24px 0;
    overflow-x: auto;
}

.sdrf-example-table table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.sdrf-example-table th,
.sdrf-example-table td {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.sdrf-example-table th {
    font-weight: 600;
    font-size: 0.8rem;
}

.sdrf-example-table th.sample-col {
    background: #dbeafe;
    color: #1e40af;
}

.sdrf-example-table td.sample-col {
    background: #eff6ff;
}

.sdrf-example-table th.data-col {
    background: #dcfce7;
    color: #166534;
}

.sdrf-example-table td.data-col {
    background: #f0fdf4;
}

.sdrf-example-table th.factor-col {
    background: #fef3c7;
    color: #92400e;
}

.sdrf-example-table td.factor-col {
    background: #fffbeb;
}

.sdrf-example-table th.ellipsis-col,
.sdrf-example-table td.ellipsis-col {
    background: #f5f5f5;
    color: #9ca3af;
    text-align: center;
    font-weight: normal;
    min-width: 30px;
    padding: 8px;
}

.sdrf-example-table tbody tr:hover td {
    filter: brightness(0.97);
}

.sdrf-legend {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid var(--border);
}

.legend-color.sample-bg,
.legend-color.sample {
    background: #dbeafe;
}

.legend-color.data-bg,
.legend-color.data {
    background: #dcfce7;
}

.legend-color.factor-bg,
.legend-color.factor {
    background: #fef3c7;
}

/* SDRF Preview Section on Homepage */
.sdrf-preview {
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-alt);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.sdrf-preview h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: var(--text);
}

.sdrf-preview-intro {
    margin: 0 0 16px 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Requirement Badges */
.required-badge,
.recommended-badge,
.optional-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    border-radius: 4px;
}

.required-badge {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.recommended-badge {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.optional-badge {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

/* Requirements Table */
.requirements-table {
    width: 100%;
    max-width: 800px;
    border-collapse: collapse;
    margin: 16px 0 24px 0;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.requirements-table thead tr {
    background: var(--bg-alt);
}

.requirements-table th {
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.requirements-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

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

.requirements-table tbody tr:hover {
    background: var(--bg-alt);
}

.requirements-table code {
    font-size: 0.8rem;
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 3px;
}

.requirements-table a {
    color: var(--accent);
}

/* Term metadata tables - compact term definitions */
.term-metadata-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 16px 0;
    font-size: 0.9rem;
}

.term-metadata-table th {
    text-align: left;
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-weight: 600;
}

.term-metadata-table td {
    padding: 8px 12px;
    border: 1px solid var(--border);
}

.term-metadata-table code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* Requirement level colors */
.term-metadata-table .req-required {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.term-metadata-table .req-recommended {
    background: #dbeafe;
    color: #1e40af;
}

.term-metadata-table .req-optional {
    background: #dcfce7;
    color: #166534;
}

.term-metadata-table a {
    color: var(--primary);
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 1024px) {
    #toc {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    body.toc2 {
        padding-left: 0;
    }

    body.toc2 #content {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .card-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-row.card-row-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-row.card-row-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 32px 20px;
    }

    .site-header {
        padding: 16px 20px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

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

    .card-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-row.card-row-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-group {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .main-nav a {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .nav-search {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }

    .nav-search #search-input {
        width: 100%;
    }

    .nav-search #search-input:focus {
        width: 100%;
    }

    .header-container #search-results {
        width: 100%;
        left: 0;
    }

    .doc-header {
        padding: 8px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .doc-header-nav {
        flex-wrap: wrap;
        gap: 4px;
    }

    .doc-header-nav a {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .citation-box {
        padding: 20px 16px;
    }

    .citation-links {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 640px) {
    .site-footer {
        flex-direction: column;
        text-align: center;
    }

    .card-row,
    .card-row.card-row-3,
    .card-row.card-row-5 {
        grid-template-columns: 1fr;
    }

    .partners-logos {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Print styles */
@media print {
    #toc,
    .doc-header,
    .site-header,
    .site-footer {
        display: none;
    }

    body.toc2 {
        padding-left: 0;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* Divider */
hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 40px 0;
}

/* Dev banner */
.dev-banner {
  background: #fef3c7;
  color: #92400e;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid #fcd34d;
}
.dev-banner a {
  color: #92400e;
  font-weight: 600;
}
