/* SIROS Registry - CSS Styles */

:root {
    --color-primary: #295FA6;
    --color-primary-dark: #1C4587;
    --color-secondary: #6c757d;
    --color-success: #28a745;
    --color-background: #f8f9fa;
    --color-surface: #ffffff;
    --color-card-background: #f1f3f5;
    --color-text: #212529;
    --color-text-muted: #6c757d;
    --color-border: #dee2e6;
    --font-family: 'Helvetica Neue', Arial, system-ui, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    --border-radius: 8px;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --svg-template-placeholder-scale: 0.85;
    --svg-template-placeholder-scale-compact: 0.78;
    --svg-template-placeholder-scale-full: 0.90;
}

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

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

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

a:hover {
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header — transparent to frosted white on scroll (matches main site) */
.site-header {
    background: transparent;
    border-bottom: 1px solid transparent;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    transition: background-color 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.site-header--scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border-bottom-color: hsl(210, 15%, 88%);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-image {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.logo-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
}

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

.main-nav .nav-spacer {
    flex: 1;
}

.main-nav a {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 0.875rem;
}

.main-nav a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.nav-github-link {
    display: flex;
    align-items: center;
    color: var(--color-text-muted);
    transition: color 0.2s;
}
.nav-github-link:hover {
    color: var(--color-primary);
    text-decoration: none;
}
.nav-github-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Main */
main {
    min-height: calc(100vh - 200px);
    padding-top: 80px; /* clear fixed header on non-hero pages */
}

/* Hero pages: hero extends behind the fixed header — no top padding needed */
main:has(.hero) {
    padding-top: 0;
}

/* Hero — photo background with gradient overlay (matches main site) */
.hero {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: center;
    padding: 6rem 0 3rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.30;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.60),
        rgba(255, 255, 255, 0.80),
        rgba(255, 255, 255, 1)
    );
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem 2.5rem;
    width: 100%;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 1.5rem;
}

.hero-title-accent {
    background: linear-gradient(135deg, hsl(215, 60%, 35%), hsl(215, 70%, 55%));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title-dark {
    color: hsl(220, 30%, 10%);
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: hsl(220, 30%, 10%, 0.9);
    max-width: 600px;
    margin: 0 0 2rem;
    font-weight: 300;
}

.hero-stats-row {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-secondary-link {
    margin-top: 1.5rem;
    font-size: 1rem;
}
.hero-secondary-link a {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}
.hero-secondary-link a:hover {
    text-decoration: underline;
}

.stats {
    display: flex;
    justify-content: flex-start;
    gap: 3rem;
}

.hero-actions {
    margin-top: 0;
}

.btn-large {
    font-size: 1.1rem;
    padding: 0.875rem 2rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

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

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    display: block;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    text-decoration: none;
}

.card h3 {
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

/* Org card with avatar */
.org-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.org-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    background-color: var(--color-border);
}

.org-card-info h3 {
    margin: 0 0 0.25rem;
}

.org-card-info .vctm-count {
    margin: 0;
}

.vctm-count {
    color: var(--color-text-muted);
    margin: 0 0 1rem;
}

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

.vctm-preview li {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    padding: 0.25rem 0;
}

.vctm-preview .more {
    font-style: italic;
}

/* VCTM Grid */
.vctm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.vctm-card {
    display: block;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    min-width: 0;
}

.vctm-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    text-decoration: none;
}

.vctm-card h3 {
    margin: 0 0 0.5rem;
    color: var(--color-text);
}

.vctm-description {
    color: var(--color-text-muted);
    margin: 0 0 1rem;
}

.vctm-meta {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    flex-grow: 1;
}

.vctm-meta dt {
    font-weight: 600;
    color: var(--color-text-muted);
}

.vctm-meta dd {
    margin: 0 0 0.5rem;
}

.vctm-meta dd code {
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

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

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

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

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Format Downloads */
.format-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background-color: var(--color-background);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    font-size: 0.875rem;
}

.btn-download:hover {
    background-color: var(--color-border);
    text-decoration: none;
}

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

.btn-download.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.format-description {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0.5rem 0 1rem;
}

/* Rulebook content in tab */
.rulebook-content {
    line-height: 1.7;
}

.rulebook-content h1,
.rulebook-content h2,
.rulebook-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.rulebook-content h1:first-child,
.rulebook-content h2:first-child {
    margin-top: 0;
}

.format-meta {
    font-size: 0.9rem;
}

.format-meta dt {
    font-weight: 500;
    color: var(--color-text-muted);
}

.format-meta dd {
    margin-left: 0;
    margin-bottom: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: var(--color-text-muted);
}

.breadcrumb .current {
    color: var(--color-text-muted);
}

/* VCTM Detail */

/* Compact Header */
.vctm-compact-header {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.vctm-compact-header .header-main {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.vctm-compact-header .vctm-logo {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.vctm-compact-header .header-text {
    flex: 1;
    min-width: 0;
}

.vctm-compact-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
}

.vctm-compact-header .description {
    color: var(--color-text-muted);
    margin: 0 0 0.75rem;
    font-size: 0.9375rem;
}

.vctm-compact-header .header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.vctm-compact-header .vct-uri {
    font-size: 0.8125rem;
    word-break: break-all;
}

.vctm-compact-header .download-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Primary Tabs */
.primary-tabs {
    margin-bottom: 2rem;
}

.primary-tab-nav {
    display: flex;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 1.5rem;
    gap: 0;
}

.primary-tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}

.primary-tab-btn:hover {
    color: var(--color-text);
}

.primary-tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.primary-tab-pane {
    display: none;
}

.primary-tab-pane.active {
    display: block;
}

/* Overview Grid */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .overview-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Legacy vctm-detail-header support */
.vctm-detail-header {
    margin-bottom: 2rem;
}

.vctm-detail-header h1 {
    margin: 0 0 0.5rem;
}

.vctm-detail-header .description {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* VCTM Logo in header */
.vctm-logo {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
}

/* Logo/Background image preview in display properties */
.display-logo-preview {
    max-width: 80px;
    max-height: 60px;
    object-fit: contain;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 4px;
    background: #fff;
}

.display-bg-preview {
    max-width: 150px;
    max-height: 80px;
    object-fit: contain;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

/* SVG Template Preview */
.svg-template-section {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.svg-template-section h2 {
    font-size: 1.125rem;
    margin: 0 0 1rem;
    color: var(--color-text);
}

.svg-template-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.svg-template-card {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow: hidden;
}

.svg-template-object {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.svg-template-props {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.svg-template-props .prop {
    font-size: 0.6875rem;
    background-color: var(--color-background);
    color: var(--color-text-muted);
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    border: 1px solid var(--color-border);
    text-transform: lowercase;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.vctm-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.vctm-detail-grid .vctm-json {
    grid-column: 1 / -1;  /* JSON section spans full width */
}

@media (max-width: 900px) {
    .vctm-detail-grid {
        grid-template-columns: 1fr;
    }
}

.info-section {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-section h2 {
    font-size: 1.125rem;
    margin: 0 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-section dl {
    margin: 0;
}

.info-section dt {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.info-section dd {
    margin: 0 0 1rem;
    overflow-wrap: break-word;
    word-break: break-all;
}

.info-section dd a {
    word-break: break-all;
}

.info-section dd code {
    word-break: break-all;
}

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

/* Code & JSON */
code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background-color: var(--color-background);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

pre {
    background-color: var(--color-background);
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

pre code {
    padding: 0;
    background: none;
}

.vct-uri {
    word-break: break-all;
}

/* Claims Table */
.claims-table {
    width: 100%;
    border-collapse: collapse;
}

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

.claims-table th {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.claims-table td code {
    word-break: break-word;
    white-space: normal;
}

/* Color Swatch */
.color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    vertical-align: text-bottom;
    border: 1px solid var(--color-border);
    margin-right: 0.5rem;
}

/* Display Locale */
.display-locale {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.display-locale:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.display-locale h3 {
    font-size: 0.875rem;
    margin: 0 0 0.75rem;
    color: var(--color-text-muted);
}

/* About Section */
.about {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-top: 3rem;
}

.about h2 {
    margin-top: 0;
}

.about ul {
    padding-left: 1.5rem;
}

.about li {
    margin-bottom: 0.5rem;
}

/* Organization Header */
.org-header {
    margin-bottom: 2rem;
}

.org-header h1 {
    margin: 0 0 0.5rem;
}

.org-meta {
    color: var(--color-text-muted);
    margin: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--color-text-muted);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 2.5rem 0;
    margin-top: 3rem;
    font-size: 0.875rem;
}

.site-footer .container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.footer-address {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--color-text-muted);
}
.footer-address a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-address a:hover {
    color: var(--color-primary);
    text-decoration: none;
}
.footer-address address {
    font-style: normal;
}
.footer-org {
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}
.footer-org a {
    color: inherit;
    text-decoration: none;
}
.footer-org a:hover {
    color: var(--color-primary);
}
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    padding-top: 0.5rem;
}
.footer-nav a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}
.footer-nav a:hover {
    color: var(--color-primary);
    text-decoration: none;
}
.footer-github-link {
    display: flex;
    align-items: center;
}
.footer-github-link svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.site-footer .build-info {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 1rem;
}
.site-footer .build-info a {
    color: inherit;
}

@media (max-width: 640px) {
    .site-footer .container {
        flex-direction: column;
        gap: 1.5rem;
    }
    .footer-nav {
        justify-content: flex-start;
    }
}

/* Section Headers */
section h2 {
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding: 5rem 0 2rem;
        min-height: 40vh;
    }
    
    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .vctm-grid {
        grid-template-columns: 1fr;
    }
}

/* Documentation Layout — sidebar + content */
.docs-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.docs-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

.docs-sidebar h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin: 1.25rem 0 0.5rem;
    padding: 0;
}

.docs-sidebar h4:first-child {
    margin-top: 0;
}

.docs-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-sidebar li {
    margin: 0;
}

.docs-sidebar a {
    display: block;
    padding: 0.35rem 0.75rem;
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: background-color 0.15s, color 0.15s;
}

.docs-sidebar a:hover {
    color: var(--color-primary);
    background-color: var(--color-bg-secondary);
}

.docs-sidebar a.active {
    color: var(--color-primary);
    background-color: var(--color-bg-secondary);
    font-weight: 600;
}

.docs-content {
    flex: 1;
    min-width: 0;
}

/* Documentation Pages — deliberately no inner max-width: this site's docs
   pages are mostly code blocks and tables (curl commands, endpoint specs),
   which read better at full container width, not narrowed prose columns.
   Fills .container (1400px, matching the header) instead of the 800px cap
   registry.siros.org's own docs pages use for theirs. */
.docs-page {
    margin: 0 auto;
}

.docs-page h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem;
}

.docs-page .lead {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.docs-section {
    margin-bottom: 3rem;
}

.docs-section h2 {
    font-size: 1.5rem;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary);
}

.docs-section h3 {
    font-size: 1.125rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--color-text);
}

.docs-section p {
    margin: 0 0 1rem;
    line-height: 1.7;
}

.docs-section ul,
.docs-section ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.docs-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.docs-section pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
    border: 1px solid var(--color-border);
}

/* Code block wrapper with copy button */
.code-block {
    position: relative;
    margin: 1rem 0;
}

.code-block pre {
    margin: 0;
    padding-right: 3rem;
}

.code-block .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #999;
    cursor: pointer;
    padding: 0.3rem 0.4rem;
    font-size: 0.8rem;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.code-block .copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.code-block .copy-btn.copied {
    color: #4caf50;
    border-color: #4caf50;
}

.docs-section pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.docs-section code {
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--color-primary-dark);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875em;
}

/* Docs Table */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9375rem;
}

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

.docs-table th {
    background-color: var(--color-background);
    font-weight: 600;
}

.docs-table tr:hover {
    background-color: var(--color-background);
}

.docs-table code {
    white-space: nowrap;
}

/* Issue Cards */
.issue-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.issue-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
}

.issue-card h3 {
    font-size: 1.125rem;
    margin: 0 0 0.75rem;
}

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

.issue-card ul {
    margin-bottom: 1.5rem;
    padding-left: 1.25rem;
}

.issue-card li {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.issue-card .btn {
    display: inline-block;
}

/* TS11 Compliance Badge */
.badge.badge-ts11 {
    display: inline-block;
    background-color: var(--color-success);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15em 0.5em;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

/* Badge Generator */
.badge-preview {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    margin: 1.5rem 0;
}

.badge-preview img {
    margin: 0.5rem;
}

.badge-generator {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.badge-generator label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.badge-generator input[type="text"],
.badge-generator select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: var(--font-family);
}

.badge-generator .btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-family);
    text-align: center;
}

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

.badge-generator .btn-primary:hover {
    background: var(--color-primary-dark);
    text-decoration: none;
}

.badge-generator .btn-copy {
    background: var(--color-success);
    color: white;
    margin-top: 0.5rem;
}

.badge-generator .btn-copy:hover {
    opacity: 0.9;
    text-decoration: none;
}

.badge-generator .output-box {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    overflow-x: auto;
    margin-top: 1rem;
    white-space: pre-wrap;
    word-break: break-all;
}

.badge-generator .badge-result {
    display: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.badge-generator .badge-result.visible {
    display: block;
}

.badge-generator .badge-result h3 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
}

.badge-generator .badge-live-preview {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid var(--color-border);
}

/* Responsive docs */
@media (max-width: 768px) {
    .docs-layout {
        flex-direction: column;
    }
    
    .docs-sidebar {
        width: 100%;
        position: static;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .docs-page h1 {
        font-size: 2rem;
    }
    
    .docs-page .lead {
        font-size: 1.125rem;
    }
    
    .docs-section pre {
        font-size: 0.8125rem;
        padding: 0.75rem 1rem;
    }
    
    .docs-table {
        font-size: 0.875rem;
    }
    
    .docs-table th,
    .docs-table td {
        padding: 0.5rem;
    }
}
