:root {
    --background: #F9FAFB;
    --surface: #FFFFFF;

    --border-color: #E5E7EB;

    --text-primary: #111827;
    --text-secondary: #6B7280;

    --shadow: rgba(15, 23, 42, 0.06);

    --off-track-background: rgba(153, 27, 27, 0.12);
    --off-track-color: #991B1B;
    --at-risk-background: rgba(180, 83, 9, 0.12);
    --at-risk-color: #B45309;
    --on-track-background: rgba(15, 118, 110, 0.12);
    --on-track-color: #0F766E;

    --new-background: rgba(44, 141, 133, 0.12);
    --new-color: #1d9389;
    --unknown-background: rgba(107, 114, 128, 0.12);
    --unknown-color: #6B7280;
    --completed-background: rgba(27, 78, 141, 0.12);
    --completed-color: #4b4ea6;

    --high-background: var(--off-track-background);
    --high-color: var(--off-track-color);
    --medium-background: rgba(202, 138, 4, 0.12);
    --medium-color: #CA8A04;
    --low-background: var(--on-track-background);
    --low-color: var(--on-track-color);
    --border: #E5E7EB;
    --heading-color: #111827;
    --surface-secondary: #F3F4F6;
    --resolved-background: rgba(15, 118, 110, 0.12);
    --resolved-color: #0F766E;
}

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

body {
    background: var(--background);
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    padding: 48px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    margin-bottom: 56px;
}

h1 {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 28px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

p {
    color: var(--text-secondary);
}

section {
    margin-bottom: 48px;
}

.summary-card, .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 4px 14px var(--shadow);
}

.summary-grid {
    display: flex;
    gap: 48px;
    margin-top: 28px;
}

.label {
    display: block;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 8px;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.at-risk {
    background: var(--at-risk-background);
    color: var(--at-risk-color);
}

.on-track {
    background: var(--on-track-background);
    color: var(--on-track-color);
}

.off-track {
    background-color: var(--off-track-background);
    color: var(--off-track-color);
}

.unknown {
    background-color: rgba(107, 114, 128, 0.12);
    color: var(--unknown-color);
}

.card {
    margin-bottom: 18px;
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.card p {
    margin-bottom: 8px;
}

.cockpit-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.panel {
    background: transparent;
    min-width: 0;
}

.panel-large {
    min-height: 500px;
}

.panel-wide {
    grid-column: span 2;
}

@media (max-width: 1000px) {
    .cockpit-grid {
        grid-template-columns: 1fr;
    }
    .panel-wide {
        grid-column: span 1;
    }
}

.horizontal-timeline {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    margin-top: 20px;
}

.horizontal-timeline-item {
    position: relative;
    min-width: 240px;
    flex-shrink: 0;
}

.horizontal-timeline-item::after {
    content: "";
    position: absolute;
    top: 11px;
    left: calc(100% - 12px);
    width: 24px;
    height: 2px;
    background: #D1D5DB;
}

.horizontal-timeline-item:last-child::after {
    display: none;
}

.horizontal-marker {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 4px solid white;
    margin-bottom: 16px;
}

.horizontal-marker.on-track {
    background: var(--on-track-color);
}

.horizontal-marker.at-risk {
    background: var(--at-risk-color);
}

.horizontal-marker.off-track {
    background: var(--off-track-color);
}

.horizontal-marker.unknown {
    background: var(--unknown-color);
}

.horizontal-content h3 {
    margin-bottom: 8px;
}

.horizontal-content p {
    margin-bottom: 10px;
}

.health-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 28px;
}

.health-metric {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 4px 14px var(--shadow);
}

.metric-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
}

@media (max-width: 1000px) {
    .health-strip {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .health-strip {
        grid-template-columns: 1fr;
    }
}

.feature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.risk-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.risk-table th {
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.risk-table td {
    padding: 18px 14px;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color);
}

.risk-table th:first-child,
.risk-table td:first-child,
.feature-table th:first-child,
.feature-table td:first-child {
    width: 1%;
}

.risk-table th:nth-child(4),
.risk-table td:nth-child(4),
.risk-table th:nth-child(5),
.risk-table td:nth-child(5),
.risk-table th:nth-child(6),
.risk-table td:nth-child(6),
.risk-table th:nth-child(7),
.risk-table td:nth-child(7),
.feature-table th:nth-child(5),
.feature-table td:nth-child(5),
.feature-table th:nth-child(6),
.feature-table td:nth-child(6),
.feature-table th:nth-child(7),
.feature-table td:nth-child(7) {
    width: 1%;
    white-space: nowrap;
}

.entity-id-cell,
.relationship-id {
    white-space: nowrap;
}

.relationship-cell {
    min-width: 210px;
}

.risk-table .relationship-cell {
    width: 24%;
}

.feature-table .relationship-cell {
    width: 22%;
}

.risk-impact {
    margin-top: 8px;
    color: var(--text-secondary);
    line-height: 1.45;
    font-size: 0.92rem;
}

.mitigation-button {
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.attention-queue-informational {
    background: var(--on-track-background);
    color: var(--on-track-color);
}

.attention-queue-review {
    background: var(--at-risk-background);
    color: var(--at-risk-color);
}

.attention-queue-urgent {
    background: var(--off-track-background);
    color: var(--off-track-color);
}

.severity-high {
    background: var(--high-background);
    color: var(--high-color);
}

.severity-medium {
    background: var(--medium-background);
    color: var(--medium-color);
}

.severity-low {
    background: var(--low-background);
    color: var(--low-color);
}

.risk-state-unresolved {
    background: var(--at-risk-background);
    color: var(--at-risk-color);
}

.risk-state-mitigated {
    background: var(--on-track-background);
    color: var(--on-track-color);
}

.risk-state-accepted {
    background: var(--on-track-background);
    color: var(--on-track-color);
}

.risk-state-monitoring {
    background: var(--at-risk-background);
    color: var(--at-risk-color);
}

.risk-state-closed {
    background: var(--completed-background);
    color: var(--completed-color);
}

.risk-mitigation-proposed {
    background: var(--at-risk-background);
    color: var(--at-risk-color);
}

.risk-mitigation-under-review {
    background: var(--at-risk-background);
    color: var(--at-risk-color);
}

.risk-mitigation-accepted {
    background: var(--on-track-background);
    color: var(--on-track-color);
}

.risk-mitigation-in-progress {
    background: var(--at-risk-background);
    color: var(--at-risk-color);
}

.risk-mitigation-validated {
    background: var(--on-track-background);
    color: var(--on-track-color);
}

.risk-mitigation-rejected {
    background: var(--off-track-background);
    color: var(--off-track-color);
}

.risk-mitigation-blocked {
    background: var(--off-track-background);
    color: var(--off-track-color);
}

.decision-status-proposed {
    background: var(--at-risk-background);
    color: var(--at-risk-color);
}

.decision-status-under-review {
    background: var(--at-risk-background);
    color: var(--at-risk-color);
}

.decision-status-accepted {
    background: var(--on-track-background);
    color: var(--on-track-color);
}

.decision-status-implemented {
    background: var(--on-track-background);
    color: var(--on-track-color);
}

.decision-status-rejected {
    background: var(--off-track-background);
    color: var(--off-track-color);
}

.dependencies-section {
    margin-top: 18px;
}

.dependency-label {
    display: block;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 1px;

    color: var(--text-secondary);

    margin-bottom: 10px;
}

.dependencies-container {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}

.dependency-badge {
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
}

.attention-header {
    margin-bottom: 14px;
}

.risk-attention-monitor {
    background: var(--unknown-background);
    color: var(--unknown-color);
}

.risk-attention-active {
    background: var(--at-risk-background);
    color: var(--at-risk-color);
}

.risk-attention-escalated {
    background: var(--off-track-background);
    color: var(--off-track-color);
}

.summary-column {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    margin-top: 14px;
}

.confidence-low {
    background: var(--low-background);
    color: var(--low-color);
}

.confidence-medium {
    background: var(--medium-background);
    color: var(--medium-color);
}

.confidence-high {
    background: var(--high-background);
    color: var(--high-color);
}

.summary-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}

.summary-column ul {
    padding-left: 18px;
}

.summary-column li {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.snapshot-selector-container {
    margin-bottom: 28px;
}

#milestones-container {
    overflow: hidden;
}

.panel-full-width {
    width: 100%;
}

.attention-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 20px;
}

@media (max-width: 1100px) {
    .attention-grid {
        grid-template-columns: 1fr;
    }

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

.attention-reason {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.metric-value {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.metric-main {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
}

.metric-delta {
    font-size: 28px;
    font-weight: 600;
}

.delta-positive {
    color: var(--on-track-color);
}

.delta-negative {
    color: var(--off-track-color);
}

.risk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.risk-change {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.new {
    background: rgba(15, 118, 110, 0.10);
    color: var(--on-track-color);
}

.escalated {
    background: var(--off-track-background);
    color: var(--off-track-color);
}

.resolved {
    background: var(--resolved-background);
    color: var(--resolved-color);
}

#snapshot-note {
    margin-top: 6px;

    font-size: 13px;

    color: var(--text-secondary);

    font-style: italic;
}

.governance-warning {
    padding: 16px 18px;

    border-radius: 14px;

    margin-bottom: 14px;

    border: 1px solid transparent;
}

.governance-warning.high {
    background: rgba(153, 27, 27, 0.05);

    border-color: var(--off-track-color)
}

.governance-warning.medium {
    background: var(--medium-background);
    border-color: var(--medium-color);
}

.governance-warning-header {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 10px;
}

.governance-severity {
    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.5px;

    text-transform: uppercase;

    color: var(--off-track-color);
}

.governance-category {
    font-size: 12px;

    color: var(--text-secondary);
}

.governance-message {
    font-size: 14px;

    line-height: 1.5;
}

.program-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    width: fit-content;
}

.program-status.on-track {
    background-color: var(--on-track-background);
    color: var(--on-track-color);
}

.program-status.at-risk {
    background-color: var(--at-risk-background);
    color: var(--at-risk-color);
}

.program-status.off-track {
    background-color: var(--off-track-background);
    color: var(--off-track-color);
}

.program-status.unknown {
    background-color: var(--unknown-background);
    color: var(--unknown-color);
}

.feature-confidence-high {
    background-color: var(--on-track-background);
    color: var(--on-track-color);
}

.feature-confidence-medium {
    background-color: var(--medium-background);
    color: var(--medium-color);
}

.feature-confidence-low {
    background-color: var(--off-track-background);
    color: var(--off-track-color);
}

.feature-status-planned {
    background-color: var(--unknown-background);
    color: var(--unknown-color);
}

.feature-status-in-progress {
    background-color: var(--at-risk-background);
    color: var(--at-risk-color);
}

.feature-status-completed {
    background-color: var(--completed-background);
    color: var(--completed-color);
}

.feature-status-blocked {
    background-color: var(--off-track-background);
    color: var(--off-track-color);
}

.feature-risk-low {
    background-color: var(--on-track-background);
    color: var(--on-track-color);
}

.feature-risk-medium {
    background-color: var(--medium-background);
    color: var(--medium-color);
}

.feature-risk-high {
    background-color: var(--off-track-background);
    color: var(--off-track-color);
}

.related-okrs {
    margin-top: 24px;
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: #111827;
}

.okr-reference-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.okr-reference {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
    border-bottom:
        1px solid
        var(--border-color);
}

.okr-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    width: fit-content;
}

.okr-off-track {
    background-color: var(--off-track-background);
    color: var(--off-track-color);
}

.okr-at-risk {
    background-color: var(--at-risk-background);
    color: var(--at-risk-color);
}

.okr-on-track {
    background-color: var(--on-track-background);
    color: var(--on-track-color);
}

.summary-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 2.6fr)
        minmax(220px, 0.7fr);
    align-items: start;
}

.okr-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.okr-id {
    white-space: nowrap;
    font-weight: 700;
    color: var(--heading-color);
    font-size: 0.92rem;
}

.okr-objective {
    color: var(--text-secondary);
    line-height: 1.45;
    font-size: 0.9rem;
}

.okr-status-wrapper {
    margin-top: 4px;
}

.summary-sidebar {
    font-size: 0.92rem;
    padding-left: 16px;
}

.dependency-status-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.dependency-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    width: fit-content;
}

.dependency-blocked {
    background-color: var(--off-track-background);
    color: var(--off-track-color);
}

.dependency-at-risk {
    background-color: var(--at-risk-background);
    color: var(--at-risk-color);
}

.dependency-resolved, .dependency-active {
    background-color: var(--on-track-background);
    color: var(--on-track-color);
}

.relationship-section {
    margin-top: 16px;
}

.relationship-list {
    margin-top: 8px;
    padding-left: 18px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.feature-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.feature-table th {
    text-align: left;
    padding: 14px;
    border-bottom:
        1px solid
        var(--border-color);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.feature-table td {
    padding: 16px 14px;
    vertical-align: top;
    border-bottom:
        1px solid
        var(--border-color);
}

.relationship-list-stack {
    display: grid;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.relationship-list-stack li {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px;
    align-items: start;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.35;
}

.relationship-id {
    color: var(--text-primary);
    font-weight: 700;
}

.relationship-id::after {
    content: " —";
    color: var(--text-secondary);
    font-weight: 500;
}

.relationship-title {
    min-width: 0;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.modal.visible {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.modal-content {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    padding: 24px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.modal-body {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.modal-body p {
    margin-bottom: 1rem;
}

.tab-navigation {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.tab-button {
    border: none;
    background-color: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.tab-button:hover {
    background-color: var(--surface-secondary);
}

.tab-button.active {
    background-color: var(--surface-secondary);
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

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

.attention-table {
    width: 100%;
    border-collapse: collapse;
}

.attention-table th {
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.attention-table td {
    padding: 16px 14px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.attention-level-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.interface-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 18px;
}

.interfaces-table {
    width: 100%;

    border-collapse: collapse;
}

.interfaces-table th {
    text-align: left;

    padding: 14px;

    border-bottom:
        1px solid
        var(--border-color);

    font-size: 0.82rem;

    text-transform: uppercase;

    letter-spacing: 0.04em;

    color:
        var(--text-secondary);
}

.interfaces-table td {
    padding: 18px 14px;

    vertical-align: top;

    border-bottom:
        1px solid
        var(--border-color);
}

.interfaces-table ul {
    margin: 0;

    padding-left: 18px;
}

.interfaces-table li {
    margin-bottom: 6px;
}