/* Logic Guard Layer - Terminal News Aligned CSS */

:root {
    --terminal-bg: #ffffff;
    --terminal-bg-light: #f5f5f5;
    --terminal-text: #000000;
    --terminal-dim: #444444;
    --terminal-highlight: #111111;
    --terminal-border: #cccccc;
    --terminal-input-bg: #fafafa;
    --terminal-error: #cc0000;
    /* Legacy color aliases used by component styles */
    --terminal-green: #000000;
    --terminal-green-dim: #444444;
    --terminal-green-bright: #111111;
    --terminal-red: #cc0000;
    --terminal-yellow: #888800;
    --terminal-blue: #0055cc;
    --terminal-orange: #cc6600;
    --terminal-purple: #660066;
}

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

body {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.5;
    background-color: #e0e0e0;
    color: #000000;
    min-height: 100vh;
    overflow-x: hidden;
}

/* CRT Effects - removed, kept as no-op for class compatibility */
.scanlines {
    display: none;
}

.crt-effect {
    position: relative;
    min-height: 100vh;
    padding: 0;
    background-color: #ffffff;
}

/* Header */
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #f0f0f0;
    border-bottom: 1px solid #cccccc;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #000000;
}

.title {
    font-size: 1.4rem;
    color: #000000;
}

.demo-badge {
    font-size: 0.8rem;
    color: #ffffff;
    background-color: #111111;
    padding: 0.15rem 0.5rem;
    margin-left: 0.5rem;
    font-weight: bold;
}

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

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cccccc;
}

.status-indicator.online {
    background-color: #228822;
}

.status-text {
    font-size: 0.9rem;
    color: #444444;
}

/* Navigation */
.terminal-nav {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background-color: #f0f0f0;
    border-bottom: 1px solid #cccccc;
}

.nav-item {
    color: #444444;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
    color: #000000;
}

/* Main content */
.terminal-main {
    padding: 2rem 3rem;
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Footer */
.terminal-footer {
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem;
    background-color: #f0f0f0;
    border-top: 1px solid #cccccc;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.footer-left,
.footer-right {
    color: #444444;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-sep {
    color: #cccccc;
}

.footer-link {
    color: #444444;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #000000;
}

/* Example cards */
.example-hint {
    color: #444444;
    margin-bottom: 1rem;
}

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

.example-card {
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.example-card:hover {
    border-color: #111111;
}

.example-card:active {
    background-color: #e0e0e0;
}

.example-header {
    font-size: 1.1rem;
    color: #111111;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #cccccc;
    padding-bottom: 0.5rem;
}

.example-text {
    font-size: 0.95rem;
    color: #000000;
    line-height: 1.5;
}

/* Quick example buttons */
.quick-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quick-examples-label {
    color: #444444;
    font-size: 0.95rem;
}

.example-btn {
    background-color: #fafafa;
    border: 1px solid #cccccc;
    color: #444444;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
}

.example-btn:hover {
    border-color: #111111;
    color: #000000;
}

.example-btn:active {
    background-color: #000000;
    color: #ffffff;
}

/* Blinking cursor */
.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Sections */
.terminal-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #cccccc;
}

.terminal-section:last-child {
    border-bottom: none;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.6rem;
    color: #000000;
    margin-bottom: 1.2rem;
}

/* Status grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.status-card {
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 1rem;
}

.status-header {
    font-size: 1rem;
    color: #444444;
    margin-bottom: 0.5rem;
}

.status-value {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.status-detail {
    font-size: 0.95rem;
    color: #444444;
}

/* Status colors */
.status-valid { color: #228822; }
.status-mismatch { color: #cc0000; }
.status-not-found { color: #cc6600; }
.status-out-of-scope { color: #660066; }
.status-incomplete { color: #0055cc; }
.status-error { color: #cc0000; }
.status-schema-error { color: #cc6600; }
.status-unknown { color: #444444; }

/* Forms */
.terminal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.form-label {
    color: #000000;
    font-size: 1.1rem;
}

.terminal-textarea,
.terminal-input,
.terminal-select {
    background-color: #fafafa;
    border: 1px solid #cccccc;
    color: #000000;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    padding: 1rem;
    width: 100%;
}

.terminal-textarea:focus,
.terminal-input:focus,
.terminal-select:focus {
    outline: none;
    border-color: #111111;
    box-shadow: none;
}

.terminal-textarea {
    resize: vertical;
    min-height: 100px;
}

.terminal-select {
    cursor: pointer;
}

.terminal-select option {
    background-color: #ffffff;
    color: #000000;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #000000;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.terminal-button {
    background-color: #fafafa;
    border: 1px solid #cccccc;
    color: #000000;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.terminal-button:hover {
    background-color: #f5f5f5;
    color: #000000;
}

.terminal-button.primary {
    background-color: #cc6600;
    border-color: #cc6600;
    color: #ffffff;
}

.terminal-button.primary:hover {
    background-color: #aa5500;
    border-color: #aa5500;
    color: #ffffff;
}

/* Code blocks */
.code-block {
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 1rem;
    overflow-x: auto;
}

.code-line {
    white-space: pre;
}

/* Info blocks */
.info-block {
    color: #000000;
    line-height: 1.6;
}

.info-block p {
    margin-bottom: 1rem;
}

.terminal-list {
    list-style: none;
    padding-left: 1rem;
}

.terminal-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.terminal-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #444444;
}

.mt-2 {
    margin-top: 1rem;
}

/* Info grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.info-card {
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 1rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.info-header {
    font-size: 1.3rem;
    color: #111111;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #cccccc;
    padding-bottom: 0.5rem;
}

.info-content {
    font-size: 1.05rem;
    color: #000000;
    line-height: 1.6;
}

.info-content code {
    color: #111111;
}

/* Process steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    padding: 1rem 0;
}

.process-steps .step-arrow {
    display: none;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 1rem;
    min-height: 140px;
}

.step-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    color: #ffffff;
    font-weight: bold;
}

.step-title {
    color: #111111;
    font-size: 1rem;
}

.step-desc {
    color: #444444;
    font-size: 0.85rem;
}

.step-arrow {
    color: #444444;
    font-size: 1.5rem;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: #fafafa;
    border-left: 3px solid;
}

.alert-error {
    border-color: #cc0000;
    color: #cc0000;
}

.alert-warning {
    border-color: #888800;
    color: #888800;
}

.alert-info {
    border-color: #444444;
    color: #444444;
}

.alert-icon {
    font-weight: bold;
}

/* Results */
.results-summary {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1rem;
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    margin-bottom: 1rem;
}

.summary-stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #111111;
}

.stat-label {
    font-size: 1rem;
    color: #444444;
}

.meta-info {
    display: flex;
    gap: 2rem;
    color: #444444;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Claims list */
.claims-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.claim-card {
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 1rem;
    border-left: 3px solid #cccccc;
}

.claim-card.status-valid {
    border-left-color: #228822;
}

.claim-card.status-mismatch {
    border-left-color: #cc0000;
}

.claim-card.status-not-found,
.claim-card.status-schema-error {
    border-left-color: #cc6600;
}

.claim-card.status-error {
    border-left-color: #cc0000;
}

.claim-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.claim-status {
    font-weight: bold;
}

.claim-source {
    color: #444444;
    font-size: 0.9rem;
}

.claim-content {
    padding: 0.5rem 0;
}

.claim-tuple {
    font-size: 1.2rem;
}

.tuple-part {
    padding: 0.1rem 0.3rem;
}

.tuple-part.subject {
    color: #0055cc;
}

.tuple-part.predicate {
    color: #660066;
}

.tuple-part.object {
    color: #111111;
}

.tuple-part.unit {
    color: #888800;
}

.tuple-sep {
    color: #444444;
}

.claim-provenance {
    color: #444444;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.claim-message {
    color: #000000;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #cccccc;
}

.claim-source-value {
    color: #444444;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.claim-link {
    margin-top: 0.5rem;
}

.claim-link a {
    color: #0055cc;
    text-decoration: none;
}

.claim-link a:hover {
    text-decoration: underline;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: #444444;
}

/* History timeline */
.history-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.timeline-marker {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
    color: #ffffff;
    font-weight: bold;
}

.timeline-content {
    flex: 1;
    padding: 0.5rem;
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
}

.timeline-stats {
    color: #000000;
}

/* About page */
.architecture-diagram {
    overflow-x: auto;
}

.ascii-art {
    color: #000000;
    font-size: 0.9rem;
    line-height: 1.2;
}

.status-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
    min-width: 120px;
    text-align: center;
}

.legend-desc {
    color: #000000;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.source-card {
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 1rem;
}

.source-name {
    font-size: 1.2rem;
    color: #111111;
}

.source-url {
    color: #0055cc;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.source-desc {
    color: #000000;
    font-size: 0.95rem;
}

.tech-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tech-item {
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 0.75rem;
}

.tech-name {
    color: #111111;
    font-weight: bold;
}

.tech-desc {
    color: #444444;
    font-size: 0.9rem;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .terminal-main {
        padding: 1.5rem 2rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .terminal-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem;
    }

    .terminal-nav {
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.75rem 1rem;
    }

    .nav-item {
        padding: 0.5rem 0.75rem;
    }

    .terminal-main {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .terminal-button {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    .step {
        min-height: auto;
    }

    .results-summary {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .meta-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .claim-header {
        flex-direction: column;
        gap: 0.25rem;
    }

    .claim-tuple {
        word-break: break-word;
    }

    .terminal-footer {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .status-grid,
    .info-grid,
    .tech-list {
        grid-template-columns: 1fr;
    }
}

/* Tooltips */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #cccccc;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    white-space: nowrap;
    max-width: 300px;
    white-space: normal;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    pointer-events: none;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #cccccc;
    margin-bottom: -12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 101;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

.tooltip.tooltip-right::after {
    left: 100%;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 10px;
}

.tooltip.tooltip-right::before {
    left: 100%;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: #cccccc;
    margin-left: -2px;
    margin-bottom: 0;
}

.tooltip.tooltip-left::after {
    left: auto;
    right: 100%;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 10px;
}

.tooltip.tooltip-left::before {
    left: auto;
    right: 100%;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #cccccc;
    margin-right: -2px;
    margin-bottom: 0;
}

/* Help icon for tooltips */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid #cccccc;
    border-radius: 50%;
    font-size: 0.7rem;
    color: #444444;
    margin-left: 0.25rem;
    cursor: help;
    vertical-align: middle;
}

.help-icon:hover {
    border-color: #111111;
    color: #000000;
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .terminal-main {
        padding: 0.75rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .title {
        font-size: 1.1rem;
    }

    .terminal-textarea {
        min-height: 150px;
    }
}

/* ============================================
   ONTOLOGY PAGE STYLES
   ============================================ */

/* Ontology Grid */
.ontology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

/* Predicate Cards */
.predicate-card {
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    transition: all 0.2s;
}

.predicate-card:hover,
.predicate-card.highlighted {
    border-color: #111111;
}

.predicate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #cccccc;
    background-color: #f0f0f0;
}

.predicate-name {
    font-size: 1.1rem;
    color: #111111;
    font-weight: bold;
}

.predicate-content {
    padding: 0.75rem 1rem;
}

.predicate-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.predicate-row:last-child {
    margin-bottom: 0;
}

.predicate-label {
    color: #444444;
    min-width: 80px;
    font-size: 0.9rem;
}

/* Type Badges */
.type-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
    border: 1px solid;
    background-color: transparent;
}

.type-badge.type-int,
.type-badge.type-float {
    color: #0055cc;
    border-color: #0055cc;
}

.type-badge.type-str {
    color: #888800;
    border-color: #888800;
}

.type-badge.type-bool {
    color: #660066;
    border-color: #660066;
}

/* Unit Badges */
.unit-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.unit-badge {
    padding: 0.1rem 0.4rem;
    font-size: 0.85rem;
    color: #888800;
    border: 1px solid #888800;
    background-color: rgba(136, 136, 0, 0.05);
}

/* Constraint Tags */
.constraint-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.constraint-tag {
    padding: 0.1rem 0.4rem;
    font-size: 0.85rem;
    color: #cc6600;
    border: 1px solid #cc6600;
    background-color: rgba(204, 102, 0, 0.05);
    cursor: help;
}

/* Adapter Badges */
.adapter-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.adapter-badge {
    padding: 0.1rem 0.4rem;
    font-size: 0.8rem;
    color: #000000;
    border: 1px solid #cccccc;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.2s;
}

.adapter-badge:hover,
.adapter-badge.highlighted {
    border-color: #111111;
    background-color: #f0f0f0;
}

/* Provenance Required */
.provenance-required {
    font-size: 0.85rem;
    color: #660066;
    font-style: italic;
}

/* Coverage Matrix */
.coverage-matrix-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
}

.coverage-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.coverage-matrix th,
.coverage-matrix td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid #cccccc;
}

.coverage-matrix th {
    background-color: #f5f5f5;
    color: #111111;
    font-weight: normal;
}

.coverage-matrix th.predicate-col {
    writing-mode: vertical-lr;
    text-orientation: mixed;
    transform: rotate(180deg);
    min-width: 2rem;
    max-width: 3rem;
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
}

.coverage-matrix th.predicate-col.highlighted {
    background-color: #e0e0e0;
}

.coverage-matrix .adapter-col {
    text-align: left;
    min-width: 120px;
}

.coverage-matrix .assumption-col {
    min-width: 50px;
}

.coverage-matrix tbody tr:hover,
.coverage-matrix tbody tr.highlighted {
    background-color: #f0f0f0;
}

.coverage-matrix .adapter-name {
    text-align: left;
    color: #000000;
}

.coverage-matrix .world-assumption {
    font-size: 0.8rem;
}

.coverage-matrix .world-assumption.cwa {
    color: #0055cc;
}

.coverage-matrix .world-assumption.owa {
    color: #660066;
}

.coverage-cell.supported {
    background-color: rgba(34, 136, 34, 0.1);
}

.coverage-cell.unsupported {
    background-color: transparent;
}

.check-mark {
    color: #228822;
    font-weight: bold;
}

.no-mark {
    color: #cccccc;
}

/* Status Algebra */
.status-algebra-diagram {
    margin-bottom: 1.5rem;
}

.status-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
}

.status-legend-item {
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    border-left: 3px solid;
    padding: 0.75rem;
}

.status-legend-item.status-valid {
    border-left-color: #228822;
}

.status-legend-item.status-mismatch {
    border-left-color: #cc0000;
}

.status-legend-item.status-not-found,
.status-legend-item.status-schema-error {
    border-left-color: #cc6600;
}

.status-legend-item.status-out-of-scope {
    border-left-color: #660066;
}

.status-legend-item.status-incomplete {
    border-left-color: #0055cc;
}

.status-legend-item.status-error {
    border-left-color: #cc0000;
}

.status-legend-item.status-unknown {
    border-left-color: #444444;
}

.status-legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.status-name {
    font-weight: bold;
    font-size: 0.9rem;
}

.status-display {
    color: #444444;
    font-size: 0.85rem;
}

.status-properties {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.property-tag {
    padding: 0.1rem 0.3rem;
    font-size: 0.75rem;
    border: 1px solid;
}

.property-tag.valid {
    color: #228822;
    border-color: #228822;
}

.property-tag.correctable {
    color: #888800;
    border-color: #888800;
}

.property-tag.terminal {
    color: #cc0000;
    border-color: #cc0000;
}

/* Filter Section */
.filter-section {
    background-color: #f5f5f5;
    padding: 1rem;
    border: 1px solid #cccccc;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filter-label {
    font-size: 0.9rem;
    color: #444444;
}

.filter-select {
    min-width: 150px;
    padding: 0.5rem;
}

/* Responsive - Ontology */
@media (max-width: 768px) {
    .ontology-grid {
        grid-template-columns: 1fr;
    }

    .coverage-matrix th.predicate-col {
        font-size: 0.7rem;
    }

    .status-legend-grid {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select {
        width: 100%;
    }
}

/* Tutorial sticky sidebar layout */
.tutorial-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}
.toc {
    position: sticky;
    top: 1rem;
    background: #f5f5f5;
    border: 1px solid #cccccc;
    padding: 1rem;
}
.toc-title { font-weight: bold; margin-bottom: 0.5rem; }
.toc-list { padding-left: 1.2rem; }
.toc-list li { margin-bottom: 0.4rem; }
.toc-list a { color: #444444; text-decoration: none; }
.toc-list a:hover { color: #000000; }
@media (max-width: 768px) {
    .tutorial-layout { grid-template-columns: 1fr; }
    .toc { position: static; }
}

/* Collapsible details */
details.terminal-details { margin-bottom: 2rem; }
details.terminal-details summary { cursor: pointer; list-style: none; }
details.terminal-details summary::-webkit-details-marker { display: none; }
details.terminal-details[open] summary { margin-bottom: 1rem; }

/* Character counter */
.char-counter { text-align: right; font-size: 0.85rem; color: #888; margin-top: 0.25rem; }
.char-counter.near-limit { color: #cc6600; }
.char-counter.at-limit { color: #cc0000; }

/* Results status count bar */
.status-count-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f5f5f5;
    border: 1px solid #cccccc;
    margin-bottom: 1rem;
}
.count-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    border-left: 3px solid #cccccc;
    min-width: 80px;
}
.count-value { font-size: 2rem; font-weight: bold; color: #111111; }
.count-label { font-size: 0.75rem; color: #444444; }
.count-valid { border-left-color: #228822; }
.count-mismatch { border-left-color: #cc0000; }
.count-notfound { border-left-color: #cc6600; }
.count-error { border-left-color: #cc0000; }
.count-unknown { border-left-color: #888888; }

/* Results summary sentence */
.results-summary-text { color: #444444; margin-bottom: 1rem; font-size: 0.95rem; }

/* Copy button */
.copy-btn {
    background: none;
    border: 1px solid #cccccc;
    color: #888888;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    padding: 0.1rem 0.4rem;
    cursor: pointer;
    margin-left: 0.5rem;
    vertical-align: middle;
}
.copy-btn:hover { border-color: #444444; color: #444444; }
