/* ═══════════════════════════════════════════════════════════════════════
 * TAB 9 LAYOUT V2 — tab9-layout-v2.css
 *
 * Three-surface layout:
 *   BROWSE: field 60% + workspace 40%
 *   FOCUS:  field 190px + compiled (flex) + metadata sidebar 280px
 *   DEEP READ: editorial (flex) + Sherlock 320px
 *
 * Uses existing --bg-*, --text-*, --border, --green/--amber/--red/--blue vars.
 * Phase colors: II=#ff6b6b  CR=#feca57  RR=#54a0ff  HC=#8395a7
 * ═══════════════════════════════════════════════════════════════════════ */


/* ─── ROOT LAYOUT ─────────────────────────────────────────────────────── */

.t9v2-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
    height: calc(100vh - 170px);
}


/* ─── FIELD COLUMN ────────────────────────────────────────────────────── */

.t9v2-field-col {
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--border, #1e2a42);
    background: var(--bg-0, #080c14);
    transition: flex-basis 0.15s ease-out;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.t9v2-field-browse { flex: 0 0 60%; }
.t9v2-field-focus  { flex: 0 0 190px; }

/* Context bar replaces crushed field in FOCUS mode */
.t9v2-field-ctx { flex: 0 0 0; display: none; }

.t9v2-field-inner {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.t9v2-field-canvas {
    width: 100%;
    height: 100%;
}

/* Field footer */
.t9v2-field-footer {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(transparent, var(--bg-0, #080c14));
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
    z-index: 8;
}

.t9v2-ff-label {
    font-size: 9px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
}

.t9v2-ff-btn {
    font-size: 9px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    padding: 1px 6px;
    border-radius: 2px;
    border: 1px solid var(--border, #1e2a42);
    background: transparent;
    cursor: pointer;
    transition: all 0.15s;
}
.t9v2-ff-btn:hover {
    color: var(--text-2, #7080a0);
    border-color: var(--text-3, #555e70);
}

.t9v2-ff-back {
    font-size: 9px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid var(--border, #1e2a42);
    background: rgba(255, 255, 255, 0.015);
    cursor: pointer;
}
.t9v2-ff-back:hover { color: var(--text-2, #7080a0); }

/* Vertical lens nav (focus mode) */
.t9v2-vlens-nav {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 9;
}

.t9v2-vlens-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s;
}
.t9v2-vlens-dot:hover { transform: scale(1.6); }
.t9v2-vlens-active { transform: scale(1.4); }


/* ─── WORKSPACE COLUMN ────────────────────────────────────────────────── */

.t9v2-ws-col {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-left: 1px solid var(--border, #1e2a42);
}


/* ═══════════════════════════════════════════════════════════════════════
 * FOCUS MODE — compiled + metadata sidebar
 * ═══════════════════════════════════════════════════════════════════════ */

.t9v2-compiled-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: t9v2-slide-in 0.15s ease-out;
}

@keyframes t9v2-slide-in {
    from { opacity: 0; transform: translateX(6px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Compiled header */
.t9v2-compiled-hdr {
    padding: 14px 24px 12px;
    border-bottom: 1px solid var(--border, #1e2a42);
    background: rgba(255, 255, 255, 0.006);
    flex-shrink: 0;
}

.t9v2-back-btn {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 8px;
    display: block;
}
.t9v2-back-btn:hover { color: var(--text-2, #7080a0); }

.t9v2-lens-title {
    font-size: 16px;
    color: var(--text-0, #f5f6fa);
    font-weight: 600;
    font-family: var(--sans, sans-serif);
    line-height: 1.3;
    margin-bottom: 6px;
}

.t9v2-lens-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.t9v2-dir-badge {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-family: var(--mono, monospace);
    border: 1px solid;
}

.t9v2-meta-text {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-2, #7080a0);
}

.t9v2-meta-sep { color: var(--border-1, #243050); }

.t9v2-meta-question {
    font-size: 10px;
    font-family: var(--sans, sans-serif);
    color: var(--text-3, #555e70);
    font-style: italic;
}

/* Compiled scroll area */
.t9v2-compiled-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-1, #243050) transparent;
}

/* Compiled sections (hybrid: open by default, collapsible) */
.t9v2-cs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

.t9v2-cs-hdr {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    cursor: pointer;
    border: none;
    background: none;
    transition: all 0.15s;
    text-align: left;
}
.t9v2-cs-hdr:hover { background: rgba(255, 255, 255, 0.006); }
.t9v2-cs-open { background: rgba(255, 255, 255, 0.008); }

.t9v2-cs-arrow {
    font-size: 9px;
    color: var(--text-3, #555e70);
    display: inline-block;
    width: 10px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.t9v2-cs-icon {
    font-size: 11px;
    flex-shrink: 0;
}

.t9v2-cs-title {
    font-size: 11px;
    font-family: var(--mono, monospace);
    letter-spacing: 0.06em;
    color: var(--text-3, #555e70);
    transition: color 0.2s;
}

.t9v2-cs-body-wrap {
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.15, 1);
}

.t9v2-cs-body {
    padding: 0 24px 18px 42px;
}

.t9v2-cs-prose {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-1, #b8c0d0);
    font-family: var(--sans, sans-serif);
}
.t9v2-cs-prose p {
    margin-bottom: 10px;
}

.t9v2-cs-empty {
    padding: 24px;
    font-size: 12px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    text-align: center;
}

/* Deep read teaser (at bottom of compiled scroll) */
.t9v2-dr-teaser {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.t9v2-dr-teaser-btn {
    width: 100%;
    padding: 16px 20px;
    border-radius: 6px;
    border: 1px solid rgba(254, 202, 87, 0.15);
    background: rgba(254, 202, 87, 0.025);
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s;
}
.t9v2-dr-teaser-btn:hover {
    background: rgba(254, 202, 87, 0.06);
    border-color: rgba(254, 202, 87, 0.25);
}

.t9v2-dr-teaser-icon {
    font-size: 14px;
    color: #feca57;
    margin-bottom: 2px;
}

.t9v2-dr-teaser-title {
    font-size: 13px;
    font-family: var(--mono, monospace);
    color: #feca57;
    font-weight: 500;
}

.t9v2-dr-teaser-sub {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
}

/* Compiled actions bar */
.t9v2-compiled-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 24px;
    border-top: 1px solid var(--border, #1e2a42);
    background: rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.t9v2-action-btn {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-family: var(--mono, monospace);
    cursor: pointer;
    background: none;
    transition: all 0.15s;
}

.t9v2-ab-recompile { border: 1px solid rgba(84,160,255,0.3); color: var(--blue, #54a0ff); }
.t9v2-ab-recompile:hover { background: rgba(84,160,255,0.05); }
.t9v2-ab-compile { border: 1px solid rgba(84,160,255,0.3); color: var(--blue, #54a0ff); }
.t9v2-ab-commit { border: 1px solid rgba(0,204,136,0.3); color: var(--green, #00cc88); }
.t9v2-ab-commit:hover { background: rgba(0,204,136,0.05); }
.t9v2-ab-uncommit { border: 1px solid rgba(255,170,0,0.3); color: var(--amber, #ffaa00); }
.t9v2-ab-back { border: 1px solid rgba(255,255,255,0.06); color: var(--text-3, #555e70); }
.t9v2-ab-back:hover { background: rgba(255,255,255,0.02); }


/* ═══════════════════════════════════════════════════════════════════════
 * METADATA SIDEBAR (focus mode right panel)
 * ═══════════════════════════════════════════════════════════════════════ */

.t9v2-meta-sidebar {
    width: 280px;
    flex-shrink: 0;
    border-left: 1px solid var(--border, #1e2a42);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.004);
    scrollbar-width: thin;
    scrollbar-color: var(--border-1, #243050) transparent;
}

.t9v2-ms-sec {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

.t9v2-ms-header {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-2, #7080a0);
    font-weight: 500;
    margin-bottom: 8px;
}

.t9v2-ms-label {
    font-size: 9px;
    font-family: var(--mono, monospace);
    letter-spacing: 0.08em;
    color: var(--text-3, #555e70);
    margin-bottom: 8px;
}

.t9v2-ms-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-family: var(--mono, monospace);
    padding: 2px 0;
}
.t9v2-ms-k { color: var(--text-3, #555e70); }
.t9v2-ms-v { color: var(--text-2, #7080a0); }

/* Entanglement */
.t9v2-ms-ent { margin-bottom: 8px; }

.t9v2-ms-ent-badge {
    font-size: 9px;
    font-family: var(--mono, monospace);
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid;
    display: inline-block;
    margin-bottom: 4px;
}

.t9v2-ms-ent-item {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    padding: 1px 0 1px 8px;
}

.t9v2-ms-empty {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    opacity: 0.6;
}

/* Phase mass bars */
.t9v2-ms-pm {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    padding: 3px 0;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.15s;
}
.t9v2-ms-pm:hover { background: rgba(255, 255, 255, 0.02); }
.t9v2-ms-pm-active { background: rgba(255, 255, 255, 0.015); }

.t9v2-ms-pm-label {
    font-size: 10px;
    font-family: var(--mono, monospace);
    width: 18px;
    flex-shrink: 0;
}

.t9v2-ms-pm-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 2px;
    overflow: hidden;
}

.t9v2-ms-pm-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.t9v2-ms-pm-val {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    min-width: 30px;
    text-align: right;
}

.t9v2-ms-pm-cached {
    font-size: 9px;
    color: var(--green, #00cc88);
    min-width: 14px;
    text-align: center;
}

.t9v2-ms-pm-arrow {
    font-size: 9px;
    color: var(--text-3, #555e70);
    min-width: 14px;
    text-align: center;
}

/* Sidebar buttons */
.t9v2-ms-btns { display: flex; gap: 6px; }

.t9v2-ms-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-family: var(--mono, monospace);
    cursor: pointer;
    background: none;
    width: 100%;
    text-align: center;
    transition: all 0.15s;
}

.t9v2-ms-btn-recompile { border: 1px solid rgba(84,160,255,0.3); color: var(--blue, #54a0ff); }
.t9v2-ms-btn-recompile:hover { background: rgba(84,160,255,0.05); }
.t9v2-ms-btn-view { border: 1px solid rgba(255,255,255,0.08); color: var(--text-3, #555e70); }
.t9v2-ms-btn-view:hover { background: rgba(255,255,255,0.02); }

.t9v2-ms-dr-hint {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    margin-bottom: 8px;
    line-height: 1.4;
}

.t9v2-ms-btn-dr { border: 1px solid rgba(254,202,87,0.25); color: #feca57; width: 100%; }
.t9v2-ms-btn-dr:hover { background: rgba(254,202,87,0.05); }


/* ═══════════════════════════════════════════════════════════════════════
 * DEEP READ MODE — editorial layout + Sherlock
 * ═══════════════════════════════════════════════════════════════════════ */

.t9v2-dr-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: t9v2-fade-in 0.15s ease-out;
}

@keyframes t9v2-fade-in {
    from { opacity: 0; transform: translateY(2px); }
    to   { opacity: 1; transform: translateY(0); }
}

.t9v2-dr-hdr {
    padding: 20px 32px 16px;
    border-bottom: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
}

.t9v2-dr-hdr-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.t9v2-dr-back {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.t9v2-dr-back:hover { color: var(--text-2, #7080a0); }

.t9v2-dr-badge {
    font-size: 9px;
    font-family: var(--mono, monospace);
    letter-spacing: 0.12em;
    color: #feca57;
}

.t9v2-dr-atoms {
    font-size: 9px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
}

.t9v2-dr-close {
    margin-left: auto;
    font-size: 16px;
    color: var(--text-3, #555e70);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
}
.t9v2-dr-close:hover { color: var(--text-2, #7080a0); }

.t9v2-dr-title {
    font-size: 22px;
    color: var(--text-0, #f5f6fa);
    font-weight: 600;
    font-family: var(--sans, sans-serif);
    line-height: 1.3;
    letter-spacing: -0.015em;
    margin-bottom: 8px;
}

.t9v2-dr-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.t9v2-dr-phase-badge {
    font-size: 10px;
    font-family: var(--mono, monospace);
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid;
}

.t9v2-dr-info {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
}

/* Deep read scroll */
.t9v2-dr-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--border-1, #243050) transparent;
}

.t9v2-dr-body {
    max-width: 680px;
    padding: 0 32px;
}

/* Deep read sections — continuous scroll, NOT collapsible */
.t9v2-dr-sec {
    padding: 24px 0 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.025);
}
.t9v2-dr-sec:first-child {
    border-top: none;
    padding-top: 20px;
}

.t9v2-dr-sec-title {
    font-family: var(--mono, monospace);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #feca57;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.t9v2-dr-sec-body {
    font-size: 14.5px;
    line-height: 1.9;
    color: var(--text-1, #b8c0d0);
    font-family: var(--sans, sans-serif);
    letter-spacing: 0.005em;
}
.t9v2-dr-sec-body p {
    margin-bottom: 14px;
}

.t9v2-dr-temporal {
    background: rgba(254, 202, 87, 0.02);
    border: 1px solid rgba(254, 202, 87, 0.06);
    border-radius: 4px;
    padding: 12px 16px;
    font-family: var(--mono, monospace);
    font-size: 11px;
    color: var(--text-3, #555e70);
}

.t9v2-dr-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 40px 0;
    font-size: 12px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
}

/* Deep read footer */
.t9v2-dr-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 32px;
    border-top: 1px solid var(--border, #1e2a42);
    background: rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.t9v2-dr-foot-info {
    font-size: 9px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
}


/* ═══════════════════════════════════════════════════════════════════════
 * SHERLOCK PANEL (deep read companion)
 * ═══════════════════════════════════════════════════════════════════════ */

.t9v2-sherlock {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border, #1e2a42);
    background: rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.t9v2-sh-hdr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border, #1e2a42);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.t9v2-sh-icon { font-size: 14px; }

.t9v2-sh-title {
    font-size: 11px;
    font-family: var(--mono, monospace);
    color: var(--text-2, #7080a0);
    font-weight: 500;
}

.t9v2-sh-phase {
    font-size: 10px;
    font-family: var(--mono, monospace);
    margin-left: auto;
}

/* Messages */
.t9v2-sh-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.05) transparent;
}

.t9v2-sh-msg {
    margin-bottom: 12px;
    animation: t9v2-fade-in 0.3s ease;
}

.t9v2-sh-msg-label {
    font-size: 9px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    margin-bottom: 3px;
    letter-spacing: 0.04em;
}

.t9v2-sh-msg-text {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-2, #7080a0);
    font-family: var(--sans, sans-serif);
}

.t9v2-sh-system .t9v2-sh-msg-text {
    color: var(--text-3, #555e70);
    font-style: italic;
    font-size: 11px;
}

.t9v2-sh-sherlock .t9v2-sh-msg-text {
    background: rgba(254, 202, 87, 0.03);
    border: 1px solid rgba(254, 202, 87, 0.08);
    border-radius: 6px;
    padding: 10px 12px;
}

.t9v2-sh-user .t9v2-sh-msg-text {
    background: rgba(84, 160, 255, 0.05);
    border: 1px solid rgba(84, 160, 255, 0.1);
    border-radius: 6px;
    padding: 10px 12px;
}

/* Input */
.t9v2-sh-input {
    display: flex;
    gap: 6px;
    padding: 8px 14px;
    border-top: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
}

.t9v2-sh-inp {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 11px;
    color: var(--text-1, #b8c0d0);
    font-family: var(--sans, sans-serif);
    outline: none;
}
.t9v2-sh-inp:focus { border-color: rgba(254, 202, 87, 0.3); }
.t9v2-sh-inp::placeholder { color: var(--text-3, #555e70); }

.t9v2-sh-send {
    background: none;
    border: 1px solid rgba(254, 202, 87, 0.3);
    color: #feca57;
    border-radius: 4px;
    padding: 0 12px;
    cursor: pointer;
    font-size: 12px;
    font-family: var(--mono, monospace);
}
.t9v2-sh-send:hover { background: rgba(254, 202, 87, 0.06); }


/* ═══════════════════════════════════════════════════════════════════════
 * CONTEXT BAR (focus mode — replaces 190px field strip)
 * ═══════════════════════════════════════════════════════════════════════ */

.t9v2-ctx-bar {
    width: 52px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: var(--bg-0, #080c14);
    border-right: 1px solid var(--border, #1e2a42);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    padding: 0;
}
.t9v2-ctx-bar::-webkit-scrollbar { display: none; }

/* Context sections */
.t9v2-ctx-sec {
    width: 100%;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.t9v2-ctx-label {
    font-size: 7px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
}

/* Zone badge */
.t9v2-ctx-zone-badge {
    font-size: 14px;
    font-family: var(--mono, monospace);
    font-weight: 700;
    text-align: center;
    line-height: 1;
}

.t9v2-ctx-zone-name {
    font-size: 8px;
    font-family: var(--mono, monospace);
    text-align: center;
    line-height: 1.1;
    opacity: 0.7;
}

/* Phase badge */
.t9v2-ctx-phase-badge {
    font-size: 12px;
    font-family: var(--mono, monospace);
    font-weight: 700;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid;
}

/* Dark matter gauge */
.t9v2-ctx-gauge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.06);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.t9v2-ctx-gauge-val {
    font-size: 8px;
    font-family: var(--mono, monospace);
    font-weight: 700;
    color: var(--text-2, #7080a0);
}

/* Neighbour dots */
.t9v2-ctx-neighbours {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    width: 100%;
}

.t9v2-ctx-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    padding: 0;
}
.t9v2-ctx-dot:hover {
    transform: scale(1.6);
    box-shadow: 0 0 8px currentColor;
}

.t9v2-ctx-dot-active {
    width: 10px;
    height: 10px;
    box-shadow: 0 0 8px currentColor;
}

/* Pull indicator */
.t9v2-ctx-pull {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    width: 100%;
}

.t9v2-ctx-pull-bar {
    width: 4px;
    border-radius: 2px;
    transition: height 0.3s ease;
}

.t9v2-ctx-pull-val {
    font-size: 8px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
}

/* Open field button */
.t9v2-ctx-open-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(84, 160, 255, 0.25);
    background: rgba(84, 160, 255, 0.04);
    color: var(--blue, #54a0ff);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: auto;
    margin-bottom: 10px;
}
.t9v2-ctx-open-btn:hover {
    background: rgba(84, 160, 255, 0.1);
    border-color: rgba(84, 160, 255, 0.4);
}


/* ═══════════════════════════════════════════════════════════════════════
 * FIELD DRAWER (slide-out overlay in focus mode)
 * ═══════════════════════════════════════════════════════════════════════ */

.t9v2-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 12, 0.6);
    z-index: 900;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.t9v2-drawer-backdrop.t9v2-drawer-open {
    opacity: 1;
    pointer-events: auto;
}

.t9v2-drawer-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 55%;
    min-width: 480px;
    max-width: 900px;
    background: var(--bg-0, #080c14);
    border-right: 2px solid var(--blue, #54a0ff);
    z-index: 901;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.15, 1);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5);
}
.t9v2-drawer-backdrop.t9v2-drawer-open .t9v2-drawer-panel {
    transform: translateX(0);
}

.t9v2-drawer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.006);
}

.t9v2-drawer-title {
    font-size: 11px;
    font-family: var(--mono, monospace);
    color: var(--text-2, #7080a0);
    font-weight: 500;
    letter-spacing: 0.06em;
}

.t9v2-drawer-close {
    margin-left: auto;
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.15s;
}
.t9v2-drawer-close:hover {
    color: var(--text-2, #7080a0);
    border-color: rgba(255, 255, 255, 0.12);
}

.t9v2-drawer-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Quick chips */
.t9v2-sh-chips {
    padding: 8px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex-shrink: 0;
}

.t9v2-sh-chip {
    font-size: 9px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: none;
    cursor: pointer;
    transition: all 0.15s;
}
.t9v2-sh-chip:hover {
    color: var(--text-2, #7080a0);
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

/* ═══════════════════════════════════════════════════════════════
   TASK 9 — Lens Focus Mode (two-tab reading surface)
   ═══════════════════════════════════════════════════════════════ */

.t9v2-focus-layout {
    display: flex;
    gap: 0;
    height: calc(100vh - 170px);
}

.t9v2-field-focus {
    flex: 0 0 32% !important;
    max-width: 32% !important;
    overflow: hidden;
    border-right: 1px solid var(--border, #1e2a42);
    transition: flex-basis 0.2s ease;
}

.t9v2-focus-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.t9v2-focus-hdr {
    padding: 12px 20px 8px;
    border-bottom: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
}

.t9v2-focus-hdr .t9v2-back-btn {
    font-family: var(--sans, sans-serif);
    font-size: 9px;
    color: var(--text-3, #555e70);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 4px;
}
.t9v2-focus-hdr .t9v2-back-btn:hover { color: var(--text-1, #b8c0d0); }

.t9v2-focus-hdr .t9v2-lens-title {
    font-family: var(--sans, sans-serif);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0, #eef0f4);
    line-height: 1.3;
    margin-bottom: 4px;
}

.t9v2-focus-hdr .t9v2-lens-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-family: var(--sans, sans-serif);
    font-size: 10px;
    color: var(--text-3, #555e70);
}

/* ── Tab switcher ── */
.t9v2-focus-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
    padding: 0 20px;
}

.t9v2-ftab {
    font-family: var(--sans, sans-serif);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3, #555e70);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.15s;
}
.t9v2-ftab:hover {
    color: var(--text-2, #7080a0);
}
.t9v2-ftab-active {
    color: var(--text-0, #eef0f4);
    border-bottom-color: var(--blue, #00a8ff);
}

.t9v2-focus-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

/* ── Focus actions (bottom) ── */
.t9v2-focus-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-top: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
    background: var(--bg-0, #080c14);
}

/* ── Deep Reads tab layout ── */
.t9v2-dr-tab-layout {
    display: flex;
    height: 100%;
    min-height: 0;
}

.t9v2-dr-phase-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 8px;
    border-right: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
    width: 56px;
}

.t9v2-dr-phase-btn {
    font-family: var(--mono, monospace);
    font-size: 10px;
    font-weight: 700;
    padding: 6px 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: none;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    line-height: 1;
}
.t9v2-dr-phase-btn:hover {
    background: rgba(255,255,255,0.03);
}
.t9v2-dr-phase-active {
    font-weight: 700;
}

.t9v2-dr-reader {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.t9v2-dr-reader-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
}

.t9v2-dr-gen-btn {
    font-family: var(--sans, sans-serif);
    font-size: 9px;
    color: var(--text-3, #555e70);
    background: none;
    border: 1px solid var(--border-1, #243050);
    border-radius: 3px;
    padding: 3px 10px;
    cursor: pointer;
    margin-left: auto;
}
.t9v2-dr-gen-btn:hover {
    color: var(--text-1, #b8c0d0);
    border-color: var(--text-3, #555e70);
}

.t9v2-dr-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ─── Draggable Splitter ─── */
.t9v2-splitter {
  flex: 0 0 5px;
  cursor: col-resize;
  background: var(--border, #1e2a42);
  position: relative;
  z-index: 5;
  transition: background 0.15s;
}
.t9v2-splitter:hover {
  background: var(--blue, #00a8ff) !important;
}
.t9v2-splitter:active {
  background: var(--blue, #00a8ff) !important;
}

/* ─── Close Button in Focus Header ─── */
.t9v2-close-btn {
  position: absolute;
  right: 12px;
  top: 10px;
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-2, #7080a0);
  font-size: 14px;
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s;
  z-index: 2;
}
.t9v2-close-btn:hover {
  background: rgba(255,51,68,0.15);
  color: #ff3344;
  border-color: rgba(255,51,68,0.3);
}

/* ═══════════════════════════════════════════════════════
   Deep Read Phase Reader — v2.3.0
   ═══════════════════════════════════════════════════════ */

.t9dr-layout {
  display: flex;
  height: 100%;
  background: var(--bg-0, #080c14);
  color: var(--text-1, #b8c0d0);
  font-family: var(--mono, monospace);
  font-size: 12px;
  overflow: hidden;
}

/* ── Sidebar ── */
.t9dr-sidebar {
  flex: 0 0 200px;
  border-right: 0.5px solid var(--border, #1e2a42);
  display: flex;
  flex-direction: column;
  background: var(--bg-0, #060a10);
  overflow: hidden;
}
.t9dr-sb-header {
  padding: 10px 12px 8px;
  border-bottom: 0.5px solid var(--border, #1e2a42);
  flex-shrink: 0;
}
.t9dr-sb-back {
  font-size: 9px;
  color: var(--text-3, #555e70);
  cursor: pointer;
  margin-bottom: 5px;
  transition: color 0.15s;
}
.t9dr-sb-back:hover { color: var(--text-2, #7080a0); }
.t9dr-sb-lens {
  font-size: 11px;
  color: var(--text-0, #f5f6fa);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}
.t9dr-sb-meta {
  font-size: 9px;
  color: var(--text-3, #555e70);
}

/* phase list */
.t9dr-sb-phases {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border, #1e2a42) transparent;
}
.t9dr-phase-entry {
  padding: 8px 12px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  margin-bottom: 2px;
}
.t9dr-phase-entry:hover { background: rgba(255,255,255,0.02); }
.t9dr-pe-active { background: rgba(255,255,255,0.03); }
.t9dr-pe-top { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.t9dr-pe-label { font-size: 13px; font-weight: 600; }
.t9dr-pe-name { font-size: 9px; color: var(--text-3, #555e70); }
.t9dr-pe-status {
  margin-left: auto;
  font-size: 8px;
  padding: 1px 5px;
  border-radius: 2px;
  border: 0.5px solid;
}
.t9dr-ps-cached { color: var(--green, #00cc88); border-color: rgba(0,204,136,0.3); }
.t9dr-ps-expired { color: #4a3a2a; border-color: rgba(100,80,40,0.3); }
.t9dr-ps-empty { color: #2a3550; border-color: rgba(30,42,66,0.5); }

.t9dr-pe-bar {
  width: 100%;
  height: 3px;
  background: var(--border, #1e2a42);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}
.t9dr-pe-bar-fill { height: 100%; border-radius: 2px; }
.t9dr-pe-stats { font-size: 8px; color: #2a3550; }
.t9dr-pe-active .t9dr-pe-stats { color: var(--text-3, #555e70); }

/* section nav */
.t9dr-sb-secnav {
  border-top: 0.5px solid var(--border, #1e2a42);
  padding: 6px 0;
  overflow-y: auto;
  max-height: 260px;
  scrollbar-width: thin;
  scrollbar-color: var(--border, #1e2a42) transparent;
}
.t9dr-snav-label {
  font-size: 8px;
  color: #2a3550;
  letter-spacing: 0.08em;
  padding: 4px 12px 2px;
}
.t9dr-snav-item {
  padding: 5px 12px;
  font-size: 10px;
  color: #2a3550;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.1s;
}
.t9dr-snav-item:hover { color: var(--text-3, #555e70); }
.t9dr-snav-complete { color: #3a4a5a; }
.t9dr-snav-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.t9dr-sb-gen {
  margin: 8px 12px;
  padding: 6px;
  border: 0.5px solid;
  border-radius: 3px;
  text-align: center;
  font-size: 10px;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.t9dr-gen-new { border-color: var(--blue, #54a0ff); color: var(--blue, #54a0ff); }
.t9dr-gen-new:hover { background: rgba(84,160,255,0.08); }
.t9dr-gen-regen { border-color: var(--text-3, #555e70); color: var(--text-3, #555e70); }
.t9dr-gen-regen:hover { background: rgba(255,255,255,0.03); }

/* ── Main (tabs + reader) ── */
.t9dr-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* phase tabs */
.t9dr-phase-tabs {
  display: flex;
  border-bottom: 0.5px solid var(--border, #1e2a42);
  flex-shrink: 0;
  background: var(--bg-0, #060a10);
}
.t9dr-ptab {
  flex: 1;
  padding: 6px 4px;
  text-align: center;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.t9dr-ptab:hover { background: rgba(255,255,255,0.02); }
.t9dr-pt-label { font-size: 11px; color: var(--text-3, #555e70); }
.t9dr-ptab-active .t9dr-pt-label { font-weight: 700; }
.t9dr-pt-mass { font-size: 8px; color: #2a3550; }
.t9dr-pt-bar {
  width: 28px;
  height: 2px;
  background: #1a2235;
  border-radius: 1px;
}
.t9dr-pt-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border, #1e2a42);
  margin-top: 2px;
}
.t9dr-pt-cached .t9dr-pt-dot { background: var(--green, #00cc88); }
.t9dr-pt-expired .t9dr-pt-dot { background: #4a3a2a; }

/* reader scroll */
.t9dr-reader-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--border, #1e2a42) transparent;
}

/* temporal banner */
.t9dr-temporal {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(100,70,20,0.08);
  border: 0.5px solid rgba(180,120,30,0.2);
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 10px;
  line-height: 1.6;
}
.t9dr-tb-icon { color: #7a6030; font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.t9dr-tb-text { color: #7a6030; }
.t9dr-tb-text strong { color: #9a8040; font-weight: 500; }

/* sections */
.t9dr-section { margin-bottom: 28px; }
.t9dr-sec-title {
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 0.5px solid var(--border, #1e2a42);
  display: flex;
  align-items: center;
  gap: 8px;
}
.t9dr-sec-accent {
  width: 3px;
  height: 12px;
  border-radius: 1px;
  flex-shrink: 0;
}
.t9dr-sec-body {
  font-size: 12px;
  line-height: 1.8;
  color: #8a9ab0;
  font-family: var(--sans, sans-serif);
}
.t9dr-sec-body p { margin-bottom: 10px; }

/* empty phase */
.t9dr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  min-height: 300px;
  color: #2a3550;
}
.t9dr-ep-icon { font-size: 28px; opacity: 0.3; }
.t9dr-ep-text {
  font-size: 11px;
  text-align: center;
  color: #2a3550;
  font-family: var(--sans, sans-serif);
  line-height: 1.6;
}
.t9dr-ep-btn {
  padding: 7px 18px;
  border: 0.5px solid var(--blue, #54a0ff);
  border-radius: 3px;
  color: var(--blue, #54a0ff);
  font-size: 11px;
  cursor: pointer;
  font-family: var(--mono, monospace);
  transition: background 0.15s;
}
.t9dr-ep-btn:hover { background: rgba(84,160,255,0.08); }


/* ═══════════════════════════════════════════════════════════════════════
 * WORKSPACE SPLIT DIVIDER + SUB-TABS — UX UPGRADE
 * ═══════════════════════════════════════════════════════════════════════ */

/* ─── DRAGGABLE DIVIDER ───────────────────────────────────────────────── */

.t9v2-divider {
    flex: 0 0 5px;
    cursor: col-resize;
    background: var(--border, #1e2a42);
    position: relative;
    z-index: 20;
    transition: background 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.t9v2-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3px;
    height: 32px;
    border-radius: 2px;
    background: var(--text-3, #555e70);
    opacity: 0.35;
    transition: opacity 0.2s, height 0.2s, background 0.2s;
}

.t9v2-divider:hover {
    background: rgba(0, 168, 255, 0.12);
}

.t9v2-divider:hover::after {
    opacity: 0.7;
    height: 48px;
    background: var(--blue, #00a8ff);
}

.t9v2-divider.t9v2-divider-dragging {
    background: rgba(0, 168, 255, 0.18);
}

.t9v2-divider.t9v2-divider-dragging::after {
    opacity: 1;
    height: 60px;
    background: var(--blue, #00a8ff);
    box-shadow: 0 0 8px rgba(0, 168, 255, 0.4);
}

/* Prevent text selection during drag */
body.t9v2-dragging {
    cursor: col-resize !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

body.t9v2-dragging * {
    cursor: col-resize !important;
}


/* ─── WORKSPACE SUB-TAB BAR ───────────────────────────────────────────── */

.t9v2-ws-tabbar {
    display: flex;
    align-items: stretch;
    height: 32px;
    min-height: 32px;
    background: var(--bg-1, #0b1120);
    border-bottom: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
    padding: 0 2px;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.t9v2-ws-tabbar::-webkit-scrollbar { display: none; }

.t9v2-ws-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    font-family: var(--mono, monospace);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-3, #555e70);
    border: none;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.t9v2-ws-tab:hover {
    color: var(--text-2, #7080a0);
    background: rgba(255, 255, 255, 0.02);
}

.t9v2-ws-tab-active {
    color: var(--text-1, #b8c0d0);
    border-bottom-color: var(--blue, #00a8ff);
}

.t9v2-ws-tab-active .t9v2-ws-tab-icon {
    color: var(--blue, #00a8ff);
}

.t9v2-ws-tab-icon {
    font-size: 11px;
    line-height: 1;
    transition: color 0.15s;
}

.t9v2-ws-tab-badge {
    font-size: 8px;
    font-family: var(--mono, monospace);
    padding: 1px 4px;
    border-radius: 6px;
    background: rgba(0, 168, 255, 0.1);
    color: var(--blue, #00a8ff);
    line-height: 1;
    min-width: 14px;
    text-align: center;
}

.t9v2-ws-tab-active .t9v2-ws-tab-badge {
    background: rgba(0, 168, 255, 0.18);
}


/* ─── WORKSPACE TAB CONTENT CONTAINER ─────────────────────────────────── */

.t9v2-ws-tab-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


/* ─── FIELD TAB (ATOM INVENTORY) ──────────────────────────────────────── */

.t9v2-field-tab {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border, #1e2a42) transparent;
}

.t9v2-field-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
}

.t9v2-field-tab-title {
    font-family: var(--sans, sans-serif);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-2, #7080a0);
    letter-spacing: 0.04em;
}

.t9v2-atom-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin-bottom: 2px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.t9v2-atom-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--border, #1e2a42);
}

.t9v2-atom-phase-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.t9v2-atom-label {
    font-family: var(--sans, sans-serif);
    font-size: 10px;
    color: var(--text-1, #b8c0d0);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t9v2-atom-mass {
    font-family: var(--mono, monospace);
    font-size: 8px;
    color: var(--text-3, #555e70);
    flex-shrink: 0;
}

.t9v2-atom-dir {
    font-family: var(--mono, monospace);
    font-size: 9px;
    flex-shrink: 0;
}


/* ─── COMPILER TAB ────────────────────────────────────────────────────── */

.t9v2-compiler-tab {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border, #1e2a42) transparent;
}

.t9v2-compiler-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 8px;
    padding: 20px;
    text-align: center;
}

.t9v2-compiler-empty-icon {
    font-size: 24px;
    opacity: 0.25;
}

.t9v2-compiler-empty-text {
    font-family: var(--sans, sans-serif);
    font-size: 11px;
    color: var(--text-3, #555e70);
    line-height: 1.5;
}

.t9v2-compiler-lens-card {
    border: 1px solid var(--border, #1e2a42);
    border-radius: 5px;
    margin-bottom: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.t9v2-compiler-lens-card:hover {
    border-color: rgba(0, 168, 255, 0.25);
}

.t9v2-compiler-lens-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.015);
    cursor: pointer;
}

.t9v2-compiler-lens-status {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.t9v2-compiler-lens-name {
    font-family: var(--sans, sans-serif);
    font-size: 10px;
    color: var(--text-1, #b8c0d0);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t9v2-compiler-lens-meta {
    font-family: var(--mono, monospace);
    font-size: 8px;
    color: var(--text-3, #555e70);
}

.t9v2-compiler-lens-actions {
    display: flex;
    gap: 4px;
    padding: 6px 10px;
    border-top: 1px solid var(--border, #1e2a42);
}

.t9v2-compiler-btn {
    font-family: var(--sans, sans-serif);
    font-size: 9px;
    padding: 3px 10px;
    border-radius: 3px;
    border: 1px solid var(--border, #1e2a42);
    background: transparent;
    color: var(--text-2, #7080a0);
    cursor: pointer;
    transition: all 0.15s;
}

.t9v2-compiler-btn:hover {
    border-color: var(--blue, #00a8ff);
    color: var(--blue, #00a8ff);
    background: rgba(0, 168, 255, 0.06);
}

.t9v2-compiler-btn-commit {
    border-color: rgba(0, 204, 136, 0.3);
    color: var(--green, #00cc88);
}

.t9v2-compiler-btn-commit:hover {
    border-color: var(--green, #00cc88);
    background: rgba(0, 204, 136, 0.06);
}

.t9v2-compiler-btn-delete {
    border-color: rgba(255, 51, 68, 0.25);
    color: var(--red, #ff3344);
    font-size: 10px;
    padding: 3px 8px;
    min-width: unset;
}

.t9v2-compiler-btn-delete:hover {
    border-color: var(--red, #ff3344);
    background: rgba(255, 51, 68, 0.08);
}


/* ─── DEEP READ TAB ───────────────────────────────────────────────────── */

.t9v2-deepread-tab {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border, #1e2a42) transparent;
}

.t9v2-dr-lens-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border, #1e2a42);
    border-radius: 4px;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.t9v2-dr-lens-item:hover {
    border-color: rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.04);
}

.t9v2-dr-lens-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.t9v2-dr-lens-label {
    font-family: var(--sans, sans-serif);
    font-size: 10px;
    color: var(--text-1, #b8c0d0);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t9v2-dr-phase-dots {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.t9v2-dr-phase-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    opacity: 0.25;
    font-family: var(--mono, monospace);
    font-size: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.t9v2-dr-phase-dot-cached {
    opacity: 1;
}


/* ─── NOTES SCANNER TAB ───────────────────────────────────────────────── */

.t9v2-notes-tab {
    flex: 1;
    overflow-y: auto;
    padding: 8px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border, #1e2a42) transparent;
}

.t9v2-notes-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 8px;
    padding: 20px;
    text-align: center;
}

.t9v2-notes-empty-icon {
    font-size: 24px;
    opacity: 0.25;
}

.t9v2-notes-empty-text {
    font-family: var(--sans, sans-serif);
    font-size: 11px;
    color: var(--text-3, #555e70);
    line-height: 1.5;
}

.t9v2-note-card {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border, #1e2a42);
    border-radius: 4px;
    margin-bottom: 4px;
    transition: border-color 0.15s;
}

.t9v2-note-card:hover {
    border-color: rgba(254, 202, 87, 0.3);
}

.t9v2-note-indicator {
    width: 3px;
    border-radius: 2px;
    flex-shrink: 0;
    background: var(--amber, #ffaa00);
    opacity: 0.5;
}

.t9v2-note-body {
    flex: 1;
    min-width: 0;
}

.t9v2-note-text {
    font-family: var(--sans, sans-serif);
    font-size: 10px;
    color: var(--text-1, #b8c0d0);
    line-height: 1.45;
    margin-bottom: 3px;
}

.t9v2-note-meta {
    font-family: var(--mono, monospace);
    font-size: 8px;
    color: var(--text-3, #555e70);
}


/* ─── NOTES TAB ENHANCEMENTS ─────────────────────────────────────────── */

.t9v2-notes-section {
    margin-bottom: 10px;
}

.t9v2-notes-section-hdr {
    font-family: var(--mono, monospace);
    font-size: 9px;
    font-weight: 600;
    color: var(--text-2, #7080a0);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.t9v2-notes-section-icon {
    font-size: 10px;
    opacity: 0.6;
}

.t9v2-notes-count {
    font-size: 8px;
    background: var(--border, #1e2a42);
    border-radius: 8px;
    padding: 1px 5px;
    color: var(--text-3, #555e70);
}

.t9v2-notes-textarea {
    width: 100%;
    min-height: 90px;
    max-height: 250px;
    resize: vertical;
    background: var(--bg-0, #080c14);
    color: var(--text-1, #eef0f4);
    border: 1px solid var(--border, #1e2a42);
    border-radius: 4px;
    padding: 8px;
    font-family: var(--sans, sans-serif);
    font-size: 11px;
    line-height: 1.5;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.t9v2-notes-textarea:focus {
    border-color: rgba(0, 168, 255, 0.4);
}

.t9v2-notes-add-row {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.t9v2-notes-input {
    flex: 1;
    background: var(--bg-0, #080c14);
    color: var(--text-1, #eef0f4);
    border: 1px solid var(--border, #1e2a42);
    border-radius: 4px;
    padding: 5px 8px;
    font-family: var(--sans, sans-serif);
    font-size: 10px;
    outline: none;
    min-width: 0;
}

.t9v2-notes-input:focus {
    border-color: rgba(0, 168, 255, 0.4);
}

.t9v2-notes-tag-sel {
    background: var(--bg-0, #080c14);
    color: var(--text-2, #7080a0);
    border: 1px solid var(--border, #1e2a42);
    border-radius: 4px;
    padding: 3px 4px;
    font-family: var(--mono, monospace);
    font-size: 8px;
    outline: none;
    width: 70px;
}

.t9v2-notes-add-btn {
    background: rgba(0, 168, 255, 0.12);
    color: var(--blue, #00a8ff);
    border: 1px solid rgba(0, 168, 255, 0.25);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.t9v2-notes-add-btn:hover {
    background: rgba(0, 168, 255, 0.2);
}

.t9v2-note-user {
    position: relative;
}

.t9v2-note-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    background: none;
    border: none;
    color: var(--text-3, #555e70);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 5px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}

.t9v2-note-user:hover .t9v2-note-delete {
    opacity: 1;
}

.t9v2-note-delete:hover {
    color: var(--red, #ff3344);
}

/* ─── TEXT SELECTION → NOTES ──────────────────────────────────────────── */

.t9v2-sel-to-notes {
    background: var(--bg-1, #0e1525);
    color: var(--text-1, #eef0f4);
    border: 1px solid rgba(0, 168, 255, 0.4);
    border-radius: 5px;
    padding: 4px 10px;
    font-family: var(--sans, sans-serif);
    font-size: 10px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap;
}

.t9v2-sel-to-notes:hover {
    background: rgba(0, 168, 255, 0.15);
    border-color: var(--blue, #00a8ff);
}

.t9v2-note-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 204, 136, 0.18);
    color: var(--green, #00cc88);
    border: 1px solid rgba(0, 204, 136, 0.4);
    border-radius: 6px;
    padding: 6px 16px;
    font-family: var(--sans, sans-serif);
    font-size: 11px;
    font-weight: 600;
    z-index: 99999;
    animation: t9v2-toastIn 0.2s ease-out;
    pointer-events: none;
}

@keyframes t9v2-toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── WORKSPACE PANEL ENHANCEMENTS ────────────────────────────────────── */

/* Smooth transitions for workspace content switching */
.t9v2-ws-tab-content > div {
    animation: t9v2-fadeIn 0.12s ease-out;
}

@keyframes t9v2-fadeIn {
    from { opacity: 0; transform: translateY(2px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Scrollbar styling for all workspace tabs */
.t9v2-ws-tab-content ::-webkit-scrollbar {
    width: 4px;
}

.t9v2-ws-tab-content ::-webkit-scrollbar-track {
    background: transparent;
}

.t9v2-ws-tab-content ::-webkit-scrollbar-thumb {
    background: var(--border, #1e2a42);
    border-radius: 2px;
}

.t9v2-ws-tab-content ::-webkit-scrollbar-thumb:hover {
    background: var(--text-3, #555e70);
}


/* ─── RESPONSIVE — collapse sub-tabs on narrow workspace ──────────────── */

@media (max-width: 900px) {
    .t9v2-ws-tab {
        padding: 0 8px;
        font-size: 8px;
    }
    .t9v2-ws-tab-badge {
        display: none;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
 * SHERLOCK TOGGLE BUTTON (in workspace tab bar)
 * ═══════════════════════════════════════════════════════════════════════ */

.t9v2-ws-tabbar-spacer {
    flex: 1;
}

.t9v2-sherlock-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: 1px solid rgba(254, 202, 87, 0.15);
    color: rgba(254, 202, 87, 0.5);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 10px;
    font-family: var(--mono, monospace);
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 4px;
}

.t9v2-sherlock-toggle:hover {
    border-color: rgba(254, 202, 87, 0.4);
    color: #feca57;
    background: rgba(254, 202, 87, 0.05);
}

.t9v2-sherlock-toggle-active {
    border-color: rgba(254, 202, 87, 0.5);
    color: #feca57;
    background: rgba(254, 202, 87, 0.08);
    box-shadow: 0 0 8px rgba(254, 202, 87, 0.08);
}

.t9v2-sherlock-orb {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #feca57 0%, #e6a700 100%);
    box-shadow: 0 0 4px rgba(254, 202, 87, 0.3);
}

.t9v2-sherlock-toggle-active .t9v2-sherlock-orb {
    box-shadow: 0 0 8px rgba(254, 202, 87, 0.5);
    animation: t9v2-orb-pulse 2s ease-in-out infinite;
}

@keyframes t9v2-orb-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(254, 202, 87, 0.3); }
    50% { box-shadow: 0 0 12px rgba(254, 202, 87, 0.6); }
}


/* ═══════════════════════════════════════════════════════════════════════
 * WORKSPACE BODY — flex wrapper for content + sherlock
 * ═══════════════════════════════════════════════════════════════════════ */

.t9v2-ws-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

.t9v2-ws-body > .t9v2-ws-tab-content {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.t9v2-ws-body-sh > .t9v2-ws-tab-content {
    /* Shrink when sherlock is open */
}


/* ═══════════════════════════════════════════════════════════════════════
 * SHERLOCK SIDEBAR (320px right panel in workspace)
 * ═══════════════════════════════════════════════════════════════════════ */

.t9v2-sherlock-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border, #1e2a42);
    background: rgba(0, 0, 0, 0.12);
    overflow: hidden;
    animation: t9v2-sh-slide-in 0.25s ease;
}

@keyframes t9v2-sh-slide-in {
    from { width: 0; opacity: 0; }
    to { width: 300px; opacity: 1; }
}

/* Header */
.t9v2-sh-hdr {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border, #1e2a42);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.t9v2-sh-orb-icon {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #feca57 0%, #e6a700 100%);
    box-shadow: 0 0 6px rgba(254, 202, 87, 0.4);
}

.t9v2-sh-title {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: #feca57;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.t9v2-sh-ctx {
    font-size: 9px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.t9v2-sh-phase-badge {
    font-size: 9px;
    font-family: var(--mono, monospace);
    font-weight: 600;
    margin-left: auto;
}

.t9v2-sh-close {
    background: none;
    border: none;
    color: var(--text-3, #555e70);
    font-size: 16px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}
.t9v2-sh-close:hover { color: var(--text-1, #b8c0d0); }

/* Chips */
.t9v2-sh-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.t9v2-sh-chip {
    background: rgba(254, 202, 87, 0.04);
    border: 1px solid rgba(254, 202, 87, 0.12);
    color: rgba(254, 202, 87, 0.6);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 9px;
    font-family: var(--sans, sans-serif);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.t9v2-sh-chip:hover {
    background: rgba(254, 202, 87, 0.08);
    border-color: rgba(254, 202, 87, 0.3);
    color: #feca57;
}

/* Messages scroll */
.t9v2-sh-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.05) transparent;
}

.t9v2-sh-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 16px;
    text-align: center;
}

.t9v2-sh-empty-orb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(254, 202, 87, 0.15) 0%, rgba(254, 202, 87, 0.03) 100%);
    border: 1px solid rgba(254, 202, 87, 0.12);
}

.t9v2-sh-empty-text {
    font-size: 10px;
    color: var(--text-3, #555e70);
    line-height: 1.5;
    font-family: var(--sans, sans-serif);
}

/* Message bubbles */
.t9v2-sh-msg {
    margin-bottom: 10px;
    animation: t9v2-fade-in 0.3s ease;
}

.t9v2-sh-msg-label {
    font-size: 8px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
    margin-bottom: 3px;
    letter-spacing: 0.06em;
}

.t9v2-sh-msg-text {
    font-size: 11px;
    line-height: 1.55;
    color: var(--text-2, #7080a0);
    font-family: var(--sans, sans-serif);
}

.t9v2-sh-system .t9v2-sh-msg-text {
    color: var(--text-3, #555e70);
    font-style: italic;
    font-size: 10px;
}

.t9v2-sh-sherlock .t9v2-sh-msg-text {
    background: rgba(254, 202, 87, 0.03);
    border: 1px solid rgba(254, 202, 87, 0.08);
    border-radius: 6px;
    padding: 8px 10px;
}

.t9v2-sh-user .t9v2-sh-msg-text {
    background: rgba(84, 160, 255, 0.05);
    border: 1px solid rgba(84, 160, 255, 0.1);
    border-radius: 6px;
    padding: 8px 10px;
}

/* Input bar */
.t9v2-sh-input {
    display: flex;
    gap: 5px;
    padding: 8px 12px;
    border-top: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
}

.t9v2-sh-inp {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 7px 9px;
    font-size: 11px;
    color: var(--text-1, #b8c0d0);
    font-family: var(--sans, sans-serif);
    outline: none;
}
.t9v2-sh-inp:focus { border-color: rgba(254, 202, 87, 0.3); }
.t9v2-sh-inp::placeholder { color: var(--text-3, #555e70); }

.t9v2-sh-send {
    background: none;
    border: 1px solid rgba(254, 202, 87, 0.3);
    color: #feca57;
    border-radius: 4px;
    padding: 0 10px;
    cursor: pointer;
    font-size: 14px;
    font-family: var(--mono, monospace);
    transition: background 0.15s ease;
}
.t9v2-sh-send:hover { background: rgba(254, 202, 87, 0.06); }


/* ═══════════════════════════════════════════════════════════════════════
 * INLINE DEEP READ — reader inside workspace sub-tab
 * ═══════════════════════════════════════════════════════════════════════ */

.t9v2-deepread-tab {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Header: lens selector + meta */
.t9dr-inline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.08);
}

.t9dr-inline-lens-sel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: var(--text-1, #b8c0d0);
    font-size: 11px;
    font-family: var(--mono, monospace);
    padding: 4px 8px;
    outline: none;
    max-width: 180px;
    cursor: pointer;
}
.t9dr-inline-lens-sel:focus { border-color: rgba(84, 160, 255, 0.3); }
.t9dr-inline-lens-sel option {
    background: var(--bg-1, #0d1422);
    color: var(--text-1, #b8c0d0);
}

.t9dr-inline-bel {
    font-size: 10px;
    font-family: var(--mono, monospace);
    color: var(--text-2, #7080a0);
    margin-left: auto;
}

.t9dr-inline-atoms {
    font-size: 9px;
    font-family: var(--mono, monospace);
    color: var(--text-3, #555e70);
}

/* Phase tab bar */
.t9dr-inline-phases {
    display: flex;
    border-bottom: 1px solid var(--border, #1e2a42);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.04);
}

.t9dr-inline-phase-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px 8px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    color: var(--text-3, #555e70);
}

.t9dr-inline-phase-btn:hover {
    background: rgba(255, 255, 255, 0.02);
}

.t9dr-ip-active {
    background: rgba(255, 255, 255, 0.02);
}

.t9dr-ip-label {
    font-size: 10px;
    font-family: var(--mono, monospace);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.t9dr-ip-mass {
    font-size: 8px;
    font-family: var(--mono, monospace);
    opacity: 0.6;
}

.t9dr-ip-bar {
    height: 2px;
    border-radius: 1px;
    min-width: 2px;
    margin-top: 2px;
    transition: width 0.3s ease;
}

.t9dr-ip-dot {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    opacity: 0.7;
}

/* Reader pane */
.t9dr-inline-reader {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.05) transparent;
}

/* Empty state */
.t9dr-inline-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
}

.t9dr-ie-icon {
    font-size: 28px;
    color: var(--text-3, #555e70);
    opacity: 0.4;
}

.t9dr-ie-text {
    font-size: 11px;
    color: var(--text-3, #555e70);
    line-height: 1.5;
    font-family: var(--sans, sans-serif);
}

.t9dr-ie-gen {
    background: rgba(84, 160, 255, 0.08);
    border: 1px solid rgba(84, 160, 255, 0.2);
    color: #54a0ff;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 11px;
    font-family: var(--mono, monospace);
    cursor: pointer;
    transition: all 0.15s ease;
}
.t9dr-ie-gen:hover {
    background: rgba(84, 160, 255, 0.12);
    border-color: rgba(84, 160, 255, 0.35);
}

/* Temporal banner */
.t9dr-inline-temporal {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: rgba(255, 107, 107, 0.04);
    border: 1px solid rgba(255, 107, 107, 0.12);
    border-radius: 4px;
    font-size: 10px;
    color: var(--text-2, #7080a0);
    line-height: 1.5;
}

.t9dr-it-icon {
    font-size: 12px;
    color: #ff6b6b;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Section */
.t9dr-inline-section {
    margin-bottom: 16px;
}

.t9dr-is-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 10px;
    font-family: var(--mono, monospace);
    font-weight: 600;
    letter-spacing: 0.08em;
}

.t9dr-is-accent {
    width: 3px;
    height: 14px;
    border-radius: 2px;
    flex-shrink: 0;
}

.t9dr-is-body {
    font-size: 12px;
    line-height: 1.65;
    color: var(--text-2, #7080a0);
    font-family: var(--sans, sans-serif);
    padding-left: 11px;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
}

.t9dr-is-body p {
    margin: 0 0 8px 0;
}

.t9dr-is-body p:last-child {
    margin-bottom: 0;
}

/* Regen + expand buttons */
.t9dr-inline-regen {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.t9dr-ir-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-2, #7080a0);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 10px;
    font-family: var(--mono, monospace);
    cursor: pointer;
    transition: all 0.15s ease;
}
.t9dr-ir-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.t9dr-ir-expand {
    background: rgba(84, 160, 255, 0.06);
    border: 1px solid rgba(84, 160, 255, 0.15);
    color: #54a0ff;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 10px;
    font-family: var(--mono, monospace);
    cursor: pointer;
    margin-left: auto;
    transition: all 0.15s ease;
}
.t9dr-ir-expand:hover {
    background: rgba(84, 160, 255, 0.1);
    border-color: rgba(84, 160, 255, 0.3);
}


/* ═══════════════════════════════════════════════════════════════════════
 * RESPONSIVE — Sherlock sidebar
 * ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .t9v2-sherlock-sidebar {
        width: 240px;
    }
    @keyframes t9v2-sh-slide-in {
        from { width: 0; opacity: 0; }
        to { width: 240px; opacity: 1; }
    }
    .t9v2-sherlock-toggle span:last-child {
        display: none;
    }
}

/* ═══ FIELD TAB: Atom card active + detail panel ═══ */
.t9v2-atom-card {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.t9v2-atom-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
}
.t9v2-atom-card-active {
  background: rgba(0,168,255,0.08) !important;
  border-color: rgba(0,168,255,0.4) !important;
  box-shadow: 0 0 8px rgba(0,168,255,0.2), inset 0 0 4px rgba(0,168,255,0.08) !important;
}
.t9v2-atom-card-active .t9v2-atom-dir {
  text-shadow: 0 0 6px currentColor;
}
.t9v2-field-atom-detail {
  padding: 8px 10px;
  margin: 0 4px 8px;
  background: var(--bg-1, #0c1220);
  border: 1px solid rgba(0,168,255,0.2);
  border-radius: 6px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,168,255,0.2) transparent;
  animation: t9v2-atom-detail-in 0.2s ease;
}
@keyframes t9v2-atom-detail-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.t9v2-field-atom-detail::-webkit-scrollbar { width: 4px; }
.t9v2-field-atom-detail::-webkit-scrollbar-thumb { background: rgba(0,168,255,0.2); border-radius: 2px; }
