/* ── TSB Audit Mode ─────────────────────────────────────────────── */
.pipeline-audit .audit-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
}

.audit-gate {
    border-radius: 6px;
    padding: 10px 14px;
    border-left: 4px solid #555;
    background: rgba(30, 30, 40, 0.7);
    transition: background 0.2s;
}

.audit-gate.gate-pass {
    border-left-color: #33cc66;
    background: rgba(20, 60, 35, 0.6);
}

.audit-gate.gate-fail {
    border-left-color: #cc3344;
    background: rgba(60, 20, 25, 0.6);
}

.audit-gate.gate-active {
    box-shadow: 0 0 0 2px rgba(200, 155, 60, 0.6);
}

.audit-gate.gate-done {
    opacity: 0.85;
}

.audit-gate-clickable {
    cursor: pointer;
    position: relative;
}
.audit-gate-clickable::after {
    content: '\25BA\00A0code';
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 0.68rem;
    color: rgba(120, 180, 240, 0.5);
    font-family: 'JetBrains Mono', 'Fira Mono', monospace;
    letter-spacing: 0.04em;
    pointer-events: none;
}
.audit-gate-clickable:hover {
    background: rgba(30, 50, 80, 0.8) !important;
    box-shadow: 0 0 0 1px rgba(80, 140, 220, 0.35);
}
.audit-gate-clickable:hover::after {
    color: rgba(140, 200, 255, 0.85);
}

.gate-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.82rem;
}

.gate-type-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 3px;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.gate-mload {
    background: rgba(40, 110, 170, 0.4);
    color: #7ec8f0;
    border: 1px solid rgba(120, 180, 230, 0.35);
}

.gate-msave {
    background: rgba(140, 80, 20, 0.4);
    color: #f0bb6a;
    border: 1px solid rgba(220, 160, 60, 0.35);
}

.gate-heap {
    background: rgba(20, 110, 60, 0.4);
    color: #5de098;
    border: 1px solid rgba(50, 170, 90, 0.35);
}

.gate-navana {
    background: rgba(100, 40, 140, 0.4);
    color: #c8a0f0;
    border: 1px solid rgba(160, 100, 220, 0.35);
}

.gate-lump {
    background: rgba(150, 80, 10, 0.35);
    color: #e8a840;
    border: 1px solid rgba(200, 130, 30, 0.4);
}

.gate-nstype {
    background: rgba(30, 110, 80, 0.35);
    color: #60d4a8;
    border: 1px solid rgba(60, 180, 120, 0.4);
}

.gate-memlayer {
    background: rgba(20, 90, 130, 0.4);
    color: #72c8f0;
    border: 1px solid rgba(50, 150, 210, 0.35);
}

/* ── Boot-phase gate badge colours ─────────────────────────────────────── */
.gate-rst {
    background: rgba(70, 80, 90, 0.5);
    color: #b0bec5;
    border: 1px solid rgba(120, 140, 155, 0.4);
}

.gate-call_home {
    background: rgba(20, 80, 140, 0.45);
    color: #82c4f8;
    border: 1px solid rgba(60, 140, 220, 0.4);
}

.gate-cr_wr {
    background: rgba(90, 40, 130, 0.45);
    color: #ce9ef5;
    border: 1px solid rgba(150, 80, 220, 0.4);
}

.gate-cmpl {
    background: rgba(20, 100, 50, 0.5);
    color: #6dda9a;
    border: 1px solid rgba(40, 160, 80, 0.4);
}

.gate-malformedgt {
    background: rgba(160, 30, 40, 0.5);
    color: #ff7788;
    border: 1px solid rgba(220, 60, 70, 0.5);
}

/* ── Gate description row (shown inside gate cards for boot-phase entries) ─ */
.gate-desc-row {
    font-size: 0.73rem;
    color: rgba(200, 210, 220, 0.75);
    padding: 3px 10px 4px 10px;
    font-family: 'Courier New', monospace;
    border-top: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Gate Log panel title bar ───────────────────────────────────────────── */
.gate-log-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}
.gate-log-titlebar .panel-title {
    flex: 1;
    margin: 0;
}
.gate-reset-btn {
    flex-shrink: 0;
    background: rgba(40, 60, 90, 0.85);
    color: #8bc4f0;
    border: 1px solid rgba(100, 160, 220, 0.4);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.gate-reset-btn:hover {
    background: rgba(60, 100, 150, 0.9);
    color: #cde6ff;
    border-color: rgba(140, 200, 255, 0.6);
}

/* ── Gate-log fault location footer ────────────────────────────────────── */
.gate-location {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px 4px 8px;
    font-size: 10px;
    background: rgba(60, 80, 100, 0.13);
    border-top: 1px solid rgba(100, 140, 180, 0.14);
    border-radius: 0 0 4px 4px;
    color: #8aaccc;
    font-family: 'JetBrains Mono', 'Fira Mono', monospace;
}
.gate-location-fault {
    background: rgba(120, 30, 30, 0.18);
    border-top-color: rgba(200, 80, 80, 0.18);
    color: #c0906a;
}
.gate-loc-step {
    color: inherit;
    font-weight: 600;
}
.gate-loc-step-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #e8a070;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(232, 160, 112, 0.4);
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.gate-location .gate-loc-step-link {
    color: #78b4e8;
    text-decoration-color: rgba(120, 180, 232, 0.4);
}
.gate-location-fault .gate-loc-step-link {
    color: #e8a070;
    text-decoration-color: rgba(232, 160, 112, 0.4);
}
.gate-loc-step-link:hover {
    color: #ffbe88;
    text-decoration-color: rgba(255, 190, 136, 0.7);
}
.gate-location .gate-loc-step-link:hover {
    color: #a8d4ff;
    text-decoration-color: rgba(168, 212, 255, 0.7);
}
.fault-step-link {
    font-family: inherit;
    font-size: inherit;
}
.gate-loc-sep {
    color: #506070;
    user-select: none;
}
.gate-location-fault .gate-loc-sep {
    color: #604040;
}
.gate-loc-pc {
    color: #7090a8;
}
.gate-location-fault .gate-loc-pc {
    color: #a08060;
}
.gate-loc-instr {
    color: #90c0e0;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.gate-location-fault .gate-loc-instr {
    color: #d4b080;
}

.gate-label {
    color: #e8e0d0;
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gate-label-link {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(220,180,100,0.35);
    text-underline-offset: 2px;
}
.gate-label-link:hover {
    color: #ffe080;
    text-decoration-color: rgba(220,180,100,0.85);
}

.gate-perm-req {
    color: #aaa;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.gate-perm-req b {
    color: #f0d080;
}

.gate-result {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.result-pass {
    color: #33cc66;
    background: rgba(30, 80, 45, 0.5);
}

.result-fail {
    color: #cc3344;
    background: rgba(80, 25, 30, 0.5);
}

.gate-checks {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.gate-check {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 3px;
    font-weight: 600;
}

.check-pass {
    background: rgba(30, 80, 45, 0.5);
    color: #55ee88;
    border: 1px solid rgba(50, 140, 70, 0.4);
}

.check-fail {
    background: rgba(80, 20, 25, 0.5);
    color: #ff6677;
    border: 1px solid rgba(160, 50, 60, 0.4);
}

.check-range.check-pass {
    background: rgba(20, 55, 70, 0.55);
    color: #5dd6f5;
    border: 1px solid rgba(40, 120, 160, 0.4);
}

.check-range.check-fail {
    background: rgba(80, 45, 10, 0.6);
    color: #ffaa33;
    border: 1px solid rgba(180, 100, 20, 0.5);
    font-weight: 700;
}

.check-skipped {
    background: rgba(40, 40, 50, 0.4);
    color: #888;
    border: 1px dashed rgba(120, 120, 140, 0.35);
    font-style: italic;
}

.fault-scope-section {
    margin-bottom: 0.85rem;
    border: 1px solid rgba(255, 170, 50, 0.4);
    border-left: 4px solid #ffaa33;
    border-radius: 5px;
    padding: 8px 12px;
    background: rgba(80, 45, 10, 0.3);
}

.fault-scope-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffaa33;
    margin-bottom: 4px;
}

.fault-scope-detail {
    font-size: 0.82rem;
    color: #e0c080;
}

.fault-scope-detail code {
    background: rgba(255, 170, 50, 0.15);
    border-radius: 3px;
    padding: 1px 4px;
    color: #ffcc66;
    font-family: var(--font-mono, monospace);
}

.fault-malformed-reason-row {
    margin-bottom: 6px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.fault-malformed-reason-label {
    color: #ffaa33;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.fault-malformed-reason-value {
    display: inline-flex;
    align-items: center;
}

.fault-malformed-reason-code {
    background: rgba(255, 140, 0, 0.2);
    border: 1px solid rgba(255, 170, 50, 0.5);
    border-radius: 4px;
    padding: 2px 7px;
    color: #ffcc55;
    font-family: var(--font-mono, monospace);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.fault-trace-section {
    margin-bottom: 0.85rem;
    border: 1px solid rgba(100,180,220,0.18);
    border-radius: 5px;
    overflow: hidden;
    font-size: 0.8rem;
}
.fault-trace-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #88bbdd;
    background: rgba(0,0,0,0.22);
    padding: 4px 10px;
    border-bottom: 1px solid rgba(100,180,220,0.12);
}
.fault-trace-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #88bbdd;
    background: rgba(0,0,0,0.22);
    padding: 5px 10px;
    border-bottom: 1px solid rgba(100,180,220,0.12);
    transition: background 0.12s, color 0.12s;
}
.fault-trace-toggle:hover {
    background: rgba(100,180,220,0.10);
    color: #aad8f8;
}
.fault-trace-toggle-arrow {
    display: inline-block;
    font-size: 0.6rem;
    transition: transform 0.18s;
    color: #6699bb;
    line-height: 1;
}
.fault-trace-toggle-count {
    font-weight: 400;
    color: #6699bb;
    letter-spacing: 0.02em;
    text-transform: none;
    margin-left: 2px;
}
.fault-trace-body {
    display: none;
}
.fault-trace-section.fault-trace-open .fault-trace-body {
    display: block;
}
.fault-trace-section.fault-trace-open .fault-trace-toggle-arrow {
    transform: rotate(90deg);
}
.fault-trace-section.fault-trace-open .fault-trace-toggle {
    border-bottom: 1px solid rgba(100,180,220,0.18);
}

.fault-trace-fault-details {
    margin: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(100,180,220,0.15);
}
.fault-trace-fault-details .fault-detail-label {
    background: rgba(0,0,0,0.25);
}
.fault-trace-fault-details .fault-detail-row:last-child {
    border-bottom: none;
}

.fault-trace-scroll {
    overflow-x: auto;
    max-height: 160px;
    overflow-y: auto;
}
.fault-trace-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono, monospace);
    font-size: 0.78rem;
}
.fault-trace-table thead th {
    background: rgba(0,0,0,0.18);
    color: var(--text-secondary);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(100,180,220,0.12);
    white-space: nowrap;
}
.fault-trace-table tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.10);
}
.fault-trace-table tbody tr:hover {
    background: rgba(80,160,220,0.10);
}
.fault-trace-table tbody td {
    padding: 3px 8px;
    white-space: nowrap;
}

.fault-trace-legend {
    padding: 3px 10px 4px;
    border-top: 1px solid rgba(100,180,220,0.10);
    background: rgba(0,0,0,0.12);
}

.itrace-step { color: var(--text-secondary); }
.itrace-addr { color: #88ddaa; }
.itrace-raw  { color: #aaa; font-size: 0.72rem; }
.itrace-instr { color: #ddeeff; }
tr.itrace-fault {
    background: rgba(220, 60, 60, 0.18) !important;
    border-left: 3px solid #e05555;
}
tr.itrace-fault td { color: #ff9999; }
.itrace-pet {
    color: #b8d4ff;
    font-style: italic;
    cursor: default;
    border-bottom: 1px dotted #6699cc;
}
.itrace-offset-fault {
    background: rgba(255, 160, 0, 0.25);
    color: #ffcc44;
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 700;
    box-shadow: 0 0 0 1px rgba(255, 160, 0, 0.5);
}
.fault-offset-bad {
    background: rgba(255, 160, 0, 0.2);
    color: #ffcc44 !important;
    border-radius: 3px;
    padding: 1px 5px;
    border: 1px solid rgba(255, 160, 0, 0.4);
}

.gate-flag {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 3px;
    color: #aaa;
    background: rgba(40, 40, 50, 0.5);
    border: 1px solid rgba(100, 100, 120, 0.3);
}

.gate-detail {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 3px;
    color: #c0cce0;
    background: rgba(30, 40, 60, 0.45);
    border: 1px solid rgba(80, 110, 160, 0.3);
    font-style: italic;
}

/* Regular instruction steps inside audit mode */
.audit-instr-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    border-radius: 5px;
    background: rgba(25, 25, 35, 0.5);
    border-left: 4px solid rgba(100, 100, 120, 0.4);
    font-size: 0.8rem;
}

.audit-instr-step.instr-done {
    opacity: 0.75;
}

.instr-stage-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    font-weight: bold;
    color: #c8c0b0;
    background: rgba(50, 50, 65, 0.6);
    padding: 2px 7px;
    border-radius: 3px;
    flex-shrink: 0;
    min-width: 52px;
    text-align: center;
}

.instr-desc {
    color: #b0a898;
    flex: 1;
    font-size: 0.78rem;
}

.instr-status-ok  { color: #33cc66; font-weight: bold; }
.instr-status-fail { color: #cc3344; font-weight: bold; }
.instr-status-info { color: #888888; font-weight: bold; }
.instr-badge-info  { background: #444444; color: #aaaaaa; }

.pipeline-fault {
    color: #cc3344;
    font-weight: bold;
}

/* TSB Audit guide (empty state) */
.audit-guide ol.audit-guide-steps {
    text-align: left;
    margin: 10px 0 10px 0;
    padding-left: 1.4em;
    color: #c8c0b0;
    font-size: 0.82rem;
    line-height: 1.8;
}
.audit-guide ol.audit-guide-steps li b {
    color: #f0d080;
}

/* Gate Log empty state */
.gate-log-empty {
    padding: 16px;
    color: #9a9080;
    font-size: 0.84rem;
    text-align: center;
}
.gate-log-empty p {
    margin: 0 0 8px 0;
}

/* NIA table on Pipeline page — vertical layout */
.nia-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 10px 0;
    font-size: 0.82rem;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(180,160,100,0.15);
    border-radius: 5px;
    overflow: hidden;
}
.nia-table td {
    padding: 4px 10px;
    vertical-align: middle;
    white-space: nowrap;
}
.nia-row-last td { color: #7a7060; border-bottom: 1px solid rgba(180,160,100,0.10); }
.nia-row-curr td { background: rgba(220,180,40,0.08); border-bottom: 1px solid rgba(180,160,100,0.10); }
.nia-row-next td { color: #7a7060; }

/* label column */
.nia-lbl {
    width: 54px;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: lowercase;
    letter-spacing: 0.04em;
    border-right: 1px solid rgba(180,160,100,0.13);
}
.nia-row-last .nia-lbl { color: #8a7a60; }
.nia-row-curr .nia-lbl { color: #f0d060; }
.nia-row-next .nia-lbl { color: #8a7a60; }

/* address column */
.nia-addr { width: 66px; }
.nia-row-last .nia-addr code { color: #908060; font-family: var(--font-mono, monospace); font-size: 0.82rem; }
.nia-row-curr .nia-addr code { color: #ffe060; font-family: var(--font-mono, monospace); font-size: 0.84rem; font-weight: 700; }
.nia-row-next .nia-addr code { color: #908060; font-family: var(--font-mono, monospace); font-size: 0.82rem; }

/* disassembly column */
.nia-disasm { width: 52%; }
.nia-row-last .nia-disasm code { color: #7a7060; font-family: var(--font-mono, monospace); font-size: 0.80rem; }
.nia-row-curr .nia-disasm code { color: #d0c890; font-family: var(--font-mono, monospace); font-size: 0.82rem; }
.nia-row-next .nia-disasm code { color: #7a7060; font-family: var(--font-mono, monospace); font-size: 0.80rem; }

/* program / offset column */
.nia-loc { text-align: right; }
.nia-loc-text {
    display: inline-block;
    font-size: 0.76rem;
    font-family: var(--font-mono, monospace);
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(180,160,80,0.10);
}
.nia-row-last .nia-loc-text { color: #7a7060; }
.nia-row-curr .nia-loc-text { color: #c0a840; background: rgba(180,160,80,0.17); }
.nia-row-next .nia-loc-text { color: #7a7060; }

/* IDE call-home online/offline badge (appears in NIA panel after CALL_HOME step) */
.nia-ide-badge-row {
    padding: 3px 8px 5px;
    display: flex;
    align-items: center;
}

.nia-ide-badge {
    display: inline-block;
    font-size: 0.70rem;
    font-weight: 700;
    font-family: var(--font-mono, 'Courier New', monospace);
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid transparent;
    text-transform: lowercase;
}

.nia-ide-online {
    background: rgba(34, 197, 100, 0.15);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.35);
}

.nia-ide-offline {
    background: rgba(220, 80, 60, 0.13);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.30);
}

/* ─── Full boot-sequence overview (rendered in pipeline NIA area during boot) ─── */
.nia-boot-table {
    margin: 4px 0 10px 0;
}
.nia-boot-title {
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a7060;
    padding: 2px 2px 4px;
}
.nia-boot-full {
    width: 100%;
}
/* icon column */
.nia-boot-icon {
    width: 22px;
    font-size: 0.80rem;
    text-align: center;
    padding: 3px 4px;
}
/* done rows (steps already executed) */
.nia-row-done td               { color: #5a6050; border-bottom: 1px solid rgba(100,130,80,0.08); }
.nia-row-done .nia-boot-icon   { color: #4ade80; }
.nia-row-done .nia-addr code   { color: #4a6040; font-family: var(--font-mono, monospace); font-size: 0.79rem; }
.nia-row-done .nia-disasm code { color: #4a6040; font-family: var(--font-mono, monospace); font-size: 0.79rem; text-decoration: line-through; }
.nia-row-done .nia-loc-text    { color: #4a6040; }
/* current row */
.nia-row-curr .nia-boot-icon   { color: #ffe060; font-weight: 700; }
/* future rows (not yet run) keep the existing nia-row-next dim styling */
.nia-row-next .nia-boot-icon   { color: #3a3830; }

/* ── Gate Log fault banner ──────────────────────────────────────────────── */
.fault-gate-banner {
    border-radius: 6px;
    border: 1px solid rgba(224, 85, 85, 0.35);
    border-left: 4px solid #e05555;
    padding: 10px 14px;
    margin-bottom: 10px;
    background: rgba(60, 15, 15, 0.35);
}

.fault-gate-banner-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.fault-gate-banner-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px solid;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.fault-gate-banner-title {
    font-size: 0.80rem;
    font-weight: 700;
    color: #e08080;
    flex: 1;
}

.fault-recovery-pill {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 10px;
    border: 1px solid;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    cursor: default;
}

.fault-gate-banner-open {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.fault-gate-banner-desc {
    font-size: 0.80rem;
    color: #ddb890;
    line-height: 1.5;
    margin-bottom: 6px;
}

.fault-gate-banner-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    font-family: var(--font-mono, 'Courier New', monospace);
    color: #a09070;
}

.fault-gate-banner-pc code {
    color: #88ddaa;
    font-family: inherit;
    font-size: inherit;
}

.fault-gate-banner-sep {
    color: #604040;
    user-select: none;
}

.fault-gate-banner-instr {
    color: #d4b080;
    font-weight: 600;
}

.fault-gate-banner-src code {
    color: #8899bb;
    font-family: inherit;
    font-size: 0.76rem;
    font-style: italic;
}

.fault-gate-banner-note {
    margin-top: 5px;
    font-size: 0.79rem;
    color: #c0d0e0;
    font-style: italic;
    padding-top: 4px;
    border-top: 1px solid rgba(200, 220, 240, 0.1);
}

/* ── Compact fault history list (inside fault-gate-banner) ─────────────── */
.fault-history-list {
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid rgba(200, 100, 100, 0.18);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fault-history-list-label {
    font-size: 0.70rem;
    font-weight: 700;
    color: #906060;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 3px;
    user-select: none;
}

.fault-history-truncated {
    font-size: 0.72rem;
    color: #705050;
    font-style: italic;
    padding: 1px 4px;
    user-select: none;
}

.fault-history-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 5px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.76rem;
    font-family: var(--font-mono, 'Courier New', monospace);
    color: #806060;
    transition: background 0.15s;
    border: 1px solid transparent;
}

.fault-history-row:hover {
    background: rgba(224, 85, 85, 0.12);
    border-color: rgba(224, 85, 85, 0.22);
    color: #c09080;
}

.fault-history-row-latest {
    background: rgba(224, 85, 85, 0.10);
    border-color: rgba(224, 85, 85, 0.20);
    color: #c0907a;
}

.fault-history-row-latest:hover {
    background: rgba(224, 85, 85, 0.18);
    border-color: rgba(224, 85, 85, 0.32);
}

.fault-history-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.70rem;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.fault-history-pc code {
    color: #88aa88;
    font-family: inherit;
    font-size: inherit;
}

.fault-history-lump {
    color: #a09070;
    font-style: italic;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fault-history-step {
    color: #707060;
    flex-shrink: 0;
}

.fault-history-latest-mark {
    font-size: 0.68rem;
    color: #c07060;
    font-weight: 700;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    font-family: inherit;
}

/* ── Fault Recovery Timeline ─────────────────────────────────────────────── */

.frt-details {
    margin: 6px 0 4px 0;
    border: 1px solid rgba(255,152,0,0.18);
    border-radius: 5px;
    background: rgba(255,152,0,0.04);
    overflow: hidden;
}

.frt-summary {
    cursor: pointer;
    padding: 7px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #e0a840;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    gap: 7px;
    list-style: none;
    user-select: none;
}

.frt-summary::-webkit-details-marker { display: none; }

.frt-sweep-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9px;
    background: rgba(255,152,0,0.15);
    border: 1px solid rgba(255,152,0,0.35);
    color: #ffb74d;
    font-family: var(--font-mono, monospace);
    cursor: default;
}

.frt-count-badge {
    font-size: 0.70rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 9px;
    background: rgba(224,85,85,0.12);
    border: 1px solid rgba(224,85,85,0.28);
    color: #e09090;
    font-family: var(--font-mono, monospace);
    cursor: default;
}

.frt-empty {
    padding: 8px 12px;
    color: #9a9080;
    font-size: 0.78rem;
    font-style: italic;
}

.frt-list {
    padding: 4px 6px 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.frt-row {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: var(--font-mono, 'Courier New', monospace);
    color: #907868;
    border: 1px solid transparent;
    transition: background 0.15s;
    flex-wrap: wrap;
}

.frt-row:hover {
    background: rgba(224,85,85,0.10);
    border-color: rgba(224,85,85,0.20);
    color: #c0a090;
}

.frt-row-latest {
    background: rgba(224,85,85,0.08);
    border-color: rgba(224,85,85,0.18);
    color: #c0a080;
}

.frt-step {
    color: #707060;
    font-size: 0.72rem;
    flex-shrink: 0;
    min-width: 54px;
}

.frt-type-badge {
    font-size: 0.68rem;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.frt-pc code {
    color: #88aa88;
    font-family: inherit;
    font-size: inherit;
}

.frt-mnemonic code {
    color: #a0c8c0;
    font-family: inherit;
    font-size: inherit;
}

.frt-pipeline {
    color: #9090b0;
    font-size: 0.70rem;
    font-style: italic;
}

.frt-tier-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.frt-tier-1 { color: #66bb6a; background: rgba(76,175,80,0.12); border-color: rgba(76,175,80,0.35); }
.frt-tier-2 { color: #ffb74d; background: rgba(255,152,0,0.12); border-color: rgba(255,152,0,0.35); }
.frt-tier-3 { color: #f48fb1; background: rgba(233,30,99,0.12); border-color: rgba(233,30,99,0.35); }
.frt-tier-x { color: #ef9a9a; background: rgba(224,85,85,0.12); border-color: rgba(224,85,85,0.35); }

.frt-flag {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    letter-spacing: 0.03em;
}

.frt-flag-catch { color: #a5d6a7; background: rgba(76,175,80,0.10); border: 1px solid rgba(76,175,80,0.25); }
.frt-flag-irq   { color: #ffe082; background: rgba(255,193,7,0.10);  border: 1px solid rgba(255,193,7,0.25); }
.frt-flag-tier3 { color: #f48fb1; background: rgba(233,30,99,0.10);  border: 1px solid rgba(233,30,99,0.25); }

.frt-gt {
    font-size: 0.66rem;
    color: #8888aa;
    font-family: inherit;
    flex-shrink: 0;
}

/* ── Scheduler live-state section (abstraction detail, NS slot 8) ─────────── */

.sched-state-section {
    background: rgba(255,152,0,0.04);
    border: 1px solid rgba(255,152,0,0.16);
    border-radius: 5px;
    padding: 8px 12px;
}

.sched-state-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.8rem;
    font-family: var(--font-mono, monospace);
}

.sched-state-table td {
    padding: 3px 8px 3px 0;
    vertical-align: top;
}

.sched-state-table td:first-child {
    color: #9ca3af;
    white-space: nowrap;
    min-width: 120px;
}

.sched-state-table td:last-child {
    color: #e5e7eb;
}

.sched-timer-armed   { color: #66bb6a; font-weight: 600; }
.sched-timer-disarmed { color: #666; }
.sched-sweep-count   { color: #ffb74d; font-weight: 700; }
.sched-thread-count  { color: #7dd3fc; }

