/* ── CLOOMC++ / Assembly syntax-highlight token colours ─────────────────── */
/* Used inside <pre class="abs-method-panel-code"> and .lump-stored-src-pre    */
.lump-hl-keyword   { color: #c084fc; }          /* purple  — abstraction, method, call … */
.lump-hl-mnemonic  { color: #60a5fa; }          /* blue    — mLoad, ELOADCALL, BEQ …     */
.lump-hl-directive { color: #818cf8; }          /* indigo  — .abstraction, .method …     */
.lump-hl-comment   { color: #6b7280; font-style: italic; } /* grey / italic */
.lump-hl-string    { color: #34d399; }          /* green   — "string literals"           */
.lump-hl-number    { color: #fb923c; }          /* amber   — 42, 0x1f …                  */
.lump-hl-register  { color: #f9a8d4; }          /* pink    — CR6, DR0 …                  */
.lump-hl-label     { color: #fde68a; }          /* yellow  — loop:, done: …              */

/* ── Condition-code abbreviation tooltip ─────────────────────────────────── */
.cond-abbr {
    border-bottom: 1px dotted #7aa2cc;
    cursor: help;
}

/* ── LUMP binary hex-dump / disassembly table ──────────────────────────── */
.lump-binary-badge {
    font-size: 0.62rem;
    font-weight: 400;
    color: #6b7280;
    margin-left: 0.5rem;
    text-transform: none;
    letter-spacing: 0;
}

.lump-hex-loading {
    color: #6b7280;
    font-size: 0.73rem;
    font-style: italic;
    padding: 0.4rem 0;
}

.lump-hex-table-wide {
    min-width: max-content;
}
.lump-hex-table-wide th,
.lump-hex-table-wide td {
    white-space: nowrap;
}
.lump-hex-table td.lump-hex-ascii {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
    color: #b8d4ff;
    border-left: 1px solid rgba(100, 160, 255, 0.15);
    padding-left: 0.6rem;
}
.lump-hex-table td.lump-hex-empty {
    background: transparent;
}
.lump-hex-hdr-row td {
    background: rgba(200, 168, 75, 0.08);
    color: var(--church-gold, #c8a84b);
}
.lump-hex-clist-row td {
    background: rgba(100, 200, 255, 0.06);
    color: #7effea;
}
.lump-hex-pad-row td {
    background: transparent;
    color: #4b5563;
}
.lump-hex-table td.lump-hex-addr {
    color: #6b7280;
    font-family: 'Courier New', monospace;
    border-right: 1px solid rgba(100, 160, 255, 0.12);
    padding-right: 0.6rem;
}

.lump-hex-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.71rem;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(100, 160, 255, 0.12);
    border-radius: 4px;
    overflow: hidden;
}

.lump-hex-table th {
    padding: 0.25rem 0.45rem;
    text-align: left;
    font-size: 0.63rem;
    color: var(--church-gold);
    font-weight: 600;
    border-bottom: 1px solid rgba(100, 160, 255, 0.15);
    background: rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.lump-hex-table td {
    padding: 0.18rem 0.45rem;
    border-bottom: 1px solid rgba(100, 160, 255, 0.06);
    white-space: nowrap;
    vertical-align: middle;
}

.lump-hex-table tr:last-child td { border-bottom: none; }

.lump-hex-word  { color: #6b7280; min-width: 3rem; }
.lump-hex-addr  { color: #52525b; min-width: 4rem; }
.lump-hex-val   { color: rgba(206, 145, 120, 0.95); letter-spacing: 0.5px; min-width: 7rem; }
.lump-hex-disasm { color: #a0c4ff; }

.lump-hex-region-row td {
    background: rgba(0, 0, 0, 0.35);
    color: #4b5563;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 0.18rem 0.45rem;
    border-bottom: 1px solid rgba(100, 160, 255, 0.1);
    font-family: inherit;
}

.lump-hex-method-row td {
    background: rgba(100, 160, 255, 0.04);
    color: var(--church-gold);
    font-size: 0.64rem;
    font-style: italic;
    padding: 0.18rem 0.45rem;
    border-bottom: 1px solid rgba(100, 160, 255, 0.08);
}

.lump-hex-diff-changed {
    background: rgba(200, 140, 20, 0.28) !important;
    outline: 1px solid rgba(200, 140, 20, 0.5);
    outline-offset: -1px;
    vertical-align: top;
    padding: 0 !important;
}

.lump-hex-diff-changed .lump-hex-diff-arch,
.lump-hex-diff-changed .lump-hex-diff-cur {
    display: block;
    padding: 0.05rem 0.3rem;
    line-height: 1.3;
    white-space: nowrap;
}

.lump-hex-diff-arch {
    color: #f5c842;
}

.lump-hex-diff-cur {
    color: #6ee78a;
    border-top: 1px solid rgba(200, 140, 20, 0.35);
    font-size: 0.9em;
}

.lump-hex-diff-absent {
    font-style: italic;
    opacity: 0.7;
}

.lump-hex-ascii--split {
    vertical-align: top;
    padding: 0 !important;
}

.lump-hex-ascii--split .lump-hex-diff-arch,
.lump-hex-ascii--split .lump-hex-diff-cur {
    display: block;
    padding: 0.05rem 0.3rem;
    line-height: 1.3;
}

.lump-hex-diff-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    margin-left: 0.6rem;
    vertical-align: middle;
}

.lump-hex-diff-legend-arch {
    color: #f5c842;
    font-weight: 600;
}

.lump-hex-diff-legend-sep {
    color: rgba(255, 255, 255, 0.4);
}

.lump-hex-diff-legend-cur {
    color: #6ee78a;
    font-weight: 600;
}

.lump-hex-diff-summary {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.lump-hex-diff-summary--changed {
    background: rgba(200, 140, 20, 0.18);
    color: #f5c842;
    border: 1px solid rgba(200, 140, 20, 0.4);
}

.lump-hex-diff-summary--none {
    background: rgba(60, 180, 100, 0.12);
    color: #6ee78a;
    border: 1px solid rgba(60, 180, 100, 0.3);
}

.lump-hex-diff-summary--warn {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.lump-history-no-preview {
    padding: 0.55rem 0.75rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 4px;
    margin-top: 0.35rem;
}

.lump-history-restore-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.lump-delete-btn {
    background: rgba(160, 30, 30, 0.5);
    color: #ff9999;
    border: 1px solid rgba(200, 60, 60, 0.4);
    font-size: 0.72rem;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.lump-delete-btn:hover {
    background: rgba(200, 40, 40, 0.6);
}

/* ── LUMP workspace outer tabs (Logic / Source / Binary) ─────────────────── */
.lump-ws-tabbar {
    display: none;
}

.lump-ws-tab {
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 5px 16px;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    background: transparent;
    color: var(--text-secondary, #888);
    cursor: pointer;
    transition: background 0.14s, color 0.14s, border-color 0.14s;
    position: relative;
    bottom: -2px;
}

.lump-ws-tab:hover {
    background: rgba(100, 160, 255, 0.07);
    color: #c0d8ff;
    border-color: rgba(100, 160, 255, 0.18);
}

.lump-ws-tab-active {
    background: rgba(20, 20, 40, 0.8);
    color: var(--church-gold, #daa520);
    border-color: rgba(100, 160, 255, 0.25);
    border-bottom-color: rgba(20, 20, 40, 0.8);
}

.lump-ws-run-btn {
    margin-left: auto;
    align-self: center;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 4px 12px;
    border: 1px solid rgba(74, 222, 128, 0.35);
    border-radius: 4px;
    background: rgba(74, 222, 128, 0.08);
    color: #4ade80;
    cursor: pointer;
    transition: background 0.14s, border-color 0.14s, color 0.14s;
    white-space: nowrap;
    bottom: 0;
    position: relative;
}
.lump-ws-run-btn:hover {
    background: rgba(74, 222, 128, 0.18);
    border-color: rgba(74, 222, 128, 0.6);
    color: #86efac;
}
.lump-ws-run-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.lump-ws-panel {
    display: none;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-bottom: 1.5rem;
}

.lump-ws-panel-active {
    display: block;
}

/* ── Logic tab content ───────────────────────────────────────────────────── */
.lump-logic-section {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(100, 160, 255, 0.08);
}

.lump-logic-meta-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(100, 160, 255, 0.10);
    color: #88aaee;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
    margin-right: 4px;
}

.lump-logic-desc {
    font-size: 0.81rem;
    color: var(--text-secondary, #9ca3af);
    line-height: 1.55;
    margin-top: 4px;
}

.lump-logic-methods-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--church-gold, #daa520);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.lump-boot-code-summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
}
.lump-boot-code-summary::-webkit-details-marker { display: none; }
.lump-boot-code-summary::before {
    content: '\25B6\00A0';
    font-size: 0.6em;
    vertical-align: middle;
    opacity: 0.7;
}
.lump-boot-code-details[open] > .lump-boot-code-summary::before {
    content: '\25BC\00A0';
}

.lump-logic-method-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(100, 160, 255, 0.06);
    font-size: 0.78rem;
}

.lump-logic-method-row:last-child {
    border-bottom: none;
}

.lump-logic-method-name {
    color: #a0d4ff;
    font-weight: 600;
    min-width: 120px;
    font-family: 'Courier New', monospace;
}

.lump-logic-method-status {
    font-size: 0.68rem;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.lump-logic-caps-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.lump-logic-cap-chip {
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(100, 200, 255, 0.08);
    color: #7effea;
    border: 1px solid rgba(100, 200, 255, 0.18);
}

.lump-logic-no-abs {
    padding: 18px 16px;
    color: var(--text-secondary, #6b7280);
    font-size: 0.82rem;
    font-style: italic;
    line-height: 1.6;
}

.lump-logic-catalog-header {
    padding: 10px 14px 8px;
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-secondary, #6b7280);
    border-bottom: 1px solid rgba(100, 160, 255, 0.08);
    margin-bottom: 4px;
}

/* ── Compile result panel (Binary tab, shown after Source tab compile) ───── */
.lump-source-compile-result {
    margin: 10px 12px;
    border: 1px solid rgba(100, 200, 100, 0.2);
    border-radius: 6px;
    background: rgba(60, 120, 60, 0.08);
    overflow: hidden;
}
.lump-source-compile-result-title {
    padding: 6px 12px 5px;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7ec87e;
    border-bottom: 1px solid rgba(100, 200, 100, 0.15);
    background: rgba(60, 120, 60, 0.12);
}
.lump-source-compile-result-pre {
    margin: 0;
    padding: 10px 12px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.70rem;
    color: #b4e6b4;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 220px;
    overflow-y: auto;
}
.lscb-title-err { color: #f87171 !important; background: rgba(120,40,40,0.18) !important; border-bottom-color: rgba(200,80,80,0.18) !important; }
.lscb-error { margin: 0; padding: 10px 12px; font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 0.70rem; color: #f87171; white-space: pre-wrap; word-break: break-word; max-height: 220px; overflow-y: auto; }
.lscb-header { padding: 8px 12px; font-size: 0.74rem; color: #a3b4c8; border-bottom: 1px solid rgba(100,200,100,0.1); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lscb-abs { font-weight: 700; color: #e2e8f0; }
.lscb-stat { color: #7ec87e; font-size: 0.69rem; }
.lscb-lang { color: #93c5fd; font-size: 0.68rem; font-style: italic; }
.lscb-back { color: #7ec87e; font-size: 0.69rem; text-decoration: none; }
.lscb-back:hover { text-decoration: underline; }
.lscb-methods { padding: 6px 0; }
.lscb-method { padding: 5px 12px; border-bottom: 1px solid rgba(100,200,100,0.06); }
.lscb-method-name { font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 0.71rem; font-weight: 600; color: #93c5fd; }
.lscb-word-count { font-size: 0.67rem; color: #6b7280; margin-left: 6px; }
.lscb-alias { font-size: 0.69rem; color: #6b7280; font-style: italic; }
.lscb-words { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lscb-word { font-family: 'JetBrains Mono','Fira Code',monospace; font-size: 0.65rem; color: #b4e6b4; background: rgba(60,120,60,0.15); border: 1px solid rgba(100,200,100,0.12); border-radius: 3px; padding: 1px 4px; cursor: default; }

/* ── Source tab content ──────────────────────────────────────────────────── */
.lump-source-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(100, 160, 255, 0.1);
    background: rgba(12, 12, 22, 0.35);
    flex-wrap: wrap;
}

.lump-source-lang-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 2px 9px;
    border-radius: 10px;
    background: rgba(192, 132, 252, 0.15);
    color: #c084fc;
    border: 1px solid rgba(192, 132, 252, 0.25);
    margin-right: auto;
}

.lump-source-btn {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(100, 160, 255, 0.35);
    background: rgba(60, 120, 200, 0.18);
    color: #88aaee;
    transition: background 0.13s, color 0.13s;
}

.lump-source-btn:hover {
    background: rgba(80, 140, 220, 0.3);
    color: #aaccff;
}

.lump-source-btn-build {
    border-color: rgba(80, 200, 100, 0.4);
    background: rgba(40, 120, 60, 0.2);
    color: #66bb6a;
}

.lump-source-btn-build:hover {
    background: rgba(60, 150, 80, 0.35);
    color: #88dd8a;
}

.lump-source-ham-wrap {
    position: relative;
}

.lump-source-ham-btn {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 3px 9px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid rgba(100, 160, 255, 0.25);
    background: rgba(60, 120, 200, 0.1);
    color: #88aaee;
    transition: background 0.13s, color 0.13s;
    line-height: 1.4;
}

.lump-source-ham-btn:hover {
    background: rgba(80, 140, 220, 0.25);
    color: #aaccff;
}

.lump-source-menu {
    display: none;
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    z-index: 200;
    background: #0e0e1e;
    border: 1px solid rgba(100, 160, 255, 0.2);
    border-radius: 5px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
    min-width: 140px;
    flex-direction: column;
    padding: 4px 0;
}

.lump-source-menu.open {
    display: flex;
}

.lump-source-menu-item {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 7px 14px;
    text-align: left;
    cursor: pointer;
    border: none;
    background: transparent;
    color: #88aaee;
    transition: background 0.1s, color 0.1s;
    white-space: nowrap;
}

.lump-source-menu-item:hover {
    background: rgba(80, 140, 220, 0.2);
    color: #aaccff;
}

.lump-source-menu-item-build {
    color: #66bb6a;
}

.lump-source-menu-item-build:hover {
    background: rgba(60, 150, 80, 0.2);
    color: #88dd8a;
}

.lump-source-textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 340px;
    max-height: 65vh;
    background: #090914;
    color: #c8d4e8;
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    line-height: 1.55;
    border: none;
    border-bottom: 1px solid rgba(100, 160, 255, 0.1);
    padding: 10px 14px;
    resize: vertical;
    outline: none;
}

.lump-source-textarea:focus {
    background: #0b0b18;
}

.lump-source-preview-toggle {
    margin-left: auto;
}

.lump-source-preview-toggle.active {
    border-color: rgba(192, 132, 252, 0.45);
    background: rgba(192, 132, 252, 0.14);
    color: #c084fc;
}

.lump-source-preview {
    width: 100%;
    box-sizing: border-box;
    background: #07070f;
    color: #c8d4e8;
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    line-height: 1.55;
    padding: 10px 14px;
    border-top: 1px solid rgba(100, 160, 255, 0.12);
    border-bottom: 1px solid rgba(100, 160, 255, 0.08);
    overflow-x: auto;
    overflow-y: auto;
    max-height: 55vh;
    white-space: pre;
    tab-size: 4;
}

.lump-source-preview-hidden {
    display: none;
}

.lump-fork-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #f9a825;
    background: rgba(249, 168, 37, 0.08);
    border-bottom: 1px solid rgba(249, 168, 37, 0.2);
}

.lump-malformed-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1a1000;
    background: #f9a825;
    border-bottom: 1px solid #c67c00;
    border-radius: 3px 3px 0 0;
    margin-bottom: 2px;
}
.lump-malformed-banner-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: #1a1000;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0.7;
    line-height: 1;
}
.lump-malformed-banner-dismiss:hover { opacity: 1; }

.lump-malformed-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 2px 7px 2px 6px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #1a1000;
    background: #f9a825;
    border-radius: 10px;
    white-space: nowrap;
    cursor: default;
}
.lump-malformed-chip-dismiss {
    background: none;
    border: none;
    color: #1a1000;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    opacity: 0.65;
    line-height: 1;
}
.lump-malformed-chip-dismiss:hover { opacity: 1; }

.lump-source-status {
    padding: 5px 14px;
    font-size: 0.72rem;
    color: var(--text-secondary, #6b7280);
    min-height: 24px;
}

.lump-source-status.ok { color: #66bb6a; }
.lump-source-status.err { color: #ef4444; }

.lump-source-binary-only {
    padding: 24px 20px;
    text-align: center;
}

.lump-source-binary-only-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

.lump-source-binary-only-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary, #888);
    margin-bottom: 6px;
}

.lump-source-binary-only-desc {
    font-size: 0.78rem;
    color: #4b5563;
    line-height: 1.6;
}

/* ── Action bar (Edit + Delete) — sits between header strip and tabs ─────── */
.lump-action-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 10px;
    border-bottom: 1px solid rgba(100, 160, 255, 0.08);
    background: rgba(20, 20, 36, 0.25);
}

.lump-edit-btn {
    background: rgba(60, 120, 200, 0.18);
    color: #88aaee;
    border: 1px solid rgba(80, 140, 220, 0.35);
    font-size: 0.72rem;
    padding: 4px 13px;
    border-radius: 4px;
    cursor: pointer;
}
.lump-edit-btn:hover {
    background: rgba(80, 140, 220, 0.3);
    color: #aaccff;
    border-color: rgba(100, 160, 240, 0.55);
}

.lump-delete-top-btn {
    margin-left: auto;
    padding: 4px 13px;
}

.ns-type-badge {
    display: inline-block;
    background: #2d7d46;
    color: #e0ffe0;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    margin-left: 6px;
}

/* ── LUMP content-type badges ──────────────────────────── */
.lump-ct-badge {
    display: inline-block;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.4px;
    margin-left: 5px;
    vertical-align: middle;
    text-transform: uppercase;
    line-height: 1.4;
}
.lump-ct-ns     { background: #2d7d46; color: #e0ffe0; }
.lump-ct-code   { background: #1e3a6e; color: #7eb8ff; }
.lump-ct-inform { background: #1a4040; color: #4ecdc4; }
.lump-ct-data   { background: #4a2d1e; color: #ffb87e; }
.lump-ct-text   { background: #2d3a1e; color: #b8ff7e; }
.lump-ct-md     { background: #1e2d4a; color: #7eb8ff; }
.lump-ct-img    { background: #3a1e4a; color: #e07eff; }
.lump-ct-thread { background: #1e3a3a; color: #7effea; }
.lump-ct-outform{ background: #4a3a1e; color: #ffe07e; }
.lump-ct-doc    { background: #2a2a4a; color: #b0b8ff; }
.lump-ct-boot   { background: #3a1e1e; color: #ff9f7e; }

/* ── Inline actions group in header strip ────────────────── */
.lump-hs-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}
.lump-hs-btn {
    font-family: inherit;
    font-size: 0.66rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary, #8888aa);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.lump-hs-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: var(--text-primary, #e0e0f0);
}
.lump-hs-btn-run {
    background: rgba(74, 222, 128, 0.08);
    border-color: rgba(74, 222, 128, 0.3);
    color: #4ade80;
}
.lump-hs-btn-run:hover {
    background: rgba(74, 222, 128, 0.18);
    border-color: rgba(74, 222, 128, 0.55);
    color: #86efac;
}
.lump-hs-btn-run:disabled {
    opacity: 0.4;
    cursor: default;
}
.lump-hs-delete-btn {
    background: rgba(120, 20, 20, 0.35);
    border-color: rgba(180, 50, 50, 0.35);
    color: #ff9999;
    padding: 2px 6px;
}
.lump-hs-delete-btn:hover {
    background: rgba(180, 30, 30, 0.55);
    border-color: rgba(220, 70, 70, 0.55);
    color: #ffbbbb;
}

/* ── Lump header strip (between title and tabs) ─────────── */
.lump-header-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(100, 160, 255, 0.12);
    flex-shrink: 0;
}
.lump-hs-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 1px 6px;
    color: var(--text-primary, #e0e0f0);
    white-space: nowrap;
}
.lump-version-badge {
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.28);
    color: #fbbf24;
}

.lump-hs-label {
    font-size: 0.6rem;
    font-family: inherit;
    color: var(--text-secondary, #8888aa);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-right: 1px;
}
.lump-hs-resize-btn {
    flex-shrink: 0;
    font-size: 0.63rem;
    font-family: 'Courier New', monospace;
    padding: 2px 9px;
    border-radius: 4px;
    background: rgba(100, 210, 120, 0.09);
    border: 1px solid rgba(100, 210, 120, 0.28);
    color: #88dd99;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.lump-hs-resize-btn:hover:not(:disabled) {
    background: rgba(100, 210, 120, 0.2);
    border-color: rgba(100, 210, 120, 0.5);
    color: #aaffbb;
}
.lump-hs-resize-btn:disabled {
    opacity: 0.45;
    cursor: default;
}
.lump-hs-minimal {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.63rem;
    font-family: 'Courier New', monospace;
    color: #778877;
    background: none;
    border: 1px solid rgba(100, 180, 100, 0.15);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

/* ── LUMP tab bar ──────────────────────────────────────── */
.lump-tabs-bar {
    display: flex;
    gap: 2px;
    padding: 0 0 0 0;
    border-bottom: 1px solid rgba(100, 160, 255, 0.18);
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}
.lump-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.8rem 0.3rem;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: color 0.15s, border-color 0.15s;
    border-radius: 4px 4px 0 0;
    margin-bottom: -1px;
}
.lump-tab:hover { color: var(--text-primary); }
.lump-tab.lump-tab-active {
    color: var(--church-gold, #c8a84b);
    border-bottom-color: var(--church-gold, #c8a84b);
    background: rgba(200, 168, 75, 0.07);
}

/* Amber dot shown on CLOOMC tab when a fork is in progress (uncompiled) */
.lump-tab-fork-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f9a825;
    margin-left: 5px;
    vertical-align: middle;
    position: relative;
    top: -1px;
    box-shadow: 0 0 4px rgba(249, 168, 37, 0.6);
}

/* ── LUMP tab panels ───────────────────────────────────── */
.lump-tab-panel {
    display: none;
}
.lump-tab-panel-active {
    display: block;
}

/* ── Source tab (pseudo code + history) ───────────────── */
.lump-source-panel {
    display: flex;
    flex-direction: column;
}
.lump-source-method {
    border-bottom: 1px solid rgba(100, 160, 255, 0.10);
}
.lump-source-method:last-child { border-bottom: none; }
.lump-source-method-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1rem 0.5rem;
    cursor: pointer;
    user-select: none;
    gap: 0.5rem;
}
.lump-source-method-header:hover {
    background: rgba(200, 168, 75, 0.07);
}
.lump-source-method-name {
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--church-gold, #c8a84b);
    letter-spacing: 0.4px;
    flex: 1;
}
.lump-source-method-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.lump-source-edit-btn {
    background: none;
    border: 1px solid rgba(200, 168, 75, 0.35);
    color: var(--church-gold, #c8a84b);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.72rem;
    cursor: pointer;
    line-height: 1.4;
    opacity: 0.75;
    transition: opacity 0.15s, background 0.15s;
}
.lump-source-edit-btn:hover {
    opacity: 1;
    background: rgba(200, 168, 75, 0.15);
}
.lump-source-chevron {
    font-size: 0.6rem;
    color: var(--text-secondary);
    width: 0.9rem;
    text-align: center;
}
.lump-source-method-body {
    padding: 0 1rem 0.65rem;
}
.lump-source-meta {
    font-size: 0.67rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    margin-bottom: 0.15rem;
}
.lump-source-status-compiled { color: #8f8; font-weight: 700; }
.lump-source-status-error    { color: #f88; font-weight: 700; }
.lump-source-status-pseudo   { color: #fa8; font-weight: 700; }
.lump-source-empty {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.71rem;
}
.lump-source-empty-pad { padding: 0.75rem 1rem; }
.lump-source-history-header {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin: 0.55rem 0 0.25rem;
    opacity: 0.75;
}
.lump-source-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.lump-source-history-entry {
    border: 1px solid rgba(100, 160, 255, 0.10);
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
    background: rgba(0, 0, 0, 0.12);
    font-size: 0.67rem;
}
.lump-source-history-ts {
    color: var(--text-secondary);
    margin-left: 0.4rem;
}
.lump-source-history-words {
    color: var(--text-secondary);
    margin-left: 0.25rem;
}
.lump-source-history-code {
    margin-top: 0.3rem;
    font-size: 0.65rem;
    max-height: 110px;
    overflow-y: auto;
    opacity: 0.8;
}

/* ── Dimmed tab (no source stored) ────────────────────── */
.lump-tab.lump-tab-dim {
    opacity: 0.45;
    cursor: default;
}
.lump-tab.lump-tab-dim:hover {
    color: var(--text-secondary);
}

/* ── Stored compiled CLOOMC++ source section ───────────── */
.lump-stored-src-section {
    border-bottom: 1px solid rgba(100, 160, 255, 0.12);
    padding-bottom: 0.25rem;
    margin-bottom: 0.1rem;
}
.lump-stored-src-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem 0.35rem;
}
.lump-stored-src-title {
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--church-gold, #c8a84b);
    letter-spacing: 0.3px;
    flex: 1;
}
.lump-stored-src-lang {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(100, 160, 255, 0.10);
    border-radius: 3px;
    padding: 1px 6px;
    text-transform: lowercase;
    letter-spacing: 0.2px;
}
.lump-stored-src-pre {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.72rem;
    line-height: 1.55;
    color: #c8d4e8;
    background: rgba(10, 14, 30, 0.55);
    border: 1px solid rgba(100, 160, 255, 0.12);
    border-radius: 4px;
    margin: 0 1rem 0.75rem;
    padding: 0.7rem 0.85rem;
    overflow-x: auto;
    white-space: pre;
    tab-size: 4;
    user-select: text;
    cursor: text;
}
.lump-stored-src-empty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem 0.75rem;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-style: italic;
}
.lump-stored-src-empty-icon {
    font-style: normal;
    opacity: 0.6;
}
.lump-stored-src-loading {
    padding: 0.6rem 1rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
}
.lump-stored-src-meta-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1rem 0.35rem;
    border-bottom: 1px solid rgba(100, 160, 255, 0.10);
}
.lump-stored-src-lang-badge {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(100, 160, 255, 0.10);
    border-radius: 3px;
    padding: 1px 6px;
    text-transform: lowercase;
    letter-spacing: 0.2px;
}
.lump-stored-src-ts {
    font-size: 0.65rem;
    color: var(--text-muted);
}
.lump-stored-src-pre-full {
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    flex: 1;
    overflow-y: auto;
}

/* ── LUMP code content viewer ──────────────────────────── */
.lump-content-code {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    overflow-x: auto;
}
.lump-code-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    line-height: 1.6;
}
.lump-code-row:hover { background: rgba(100, 160, 255, 0.06); }
.lump-code-left-group {
    display: flex;
    align-items: baseline;
    flex: 1;
    min-width: 0;
    gap: 0.4rem;
    overflow: hidden;
}
.lump-code-binary-group {
    display: flex;
    align-items: baseline;
    flex-shrink: 0;
    gap: 0.4rem;
    font-family: 'Courier New', monospace;
    font-size: 0.68rem;
}
.lump-code-addr {
    color: #6b7280;
    min-width: 5.2rem;
    flex-shrink: 0;
}
.lump-code-hex {
    color: #7eb8ff;
    min-width: 6rem;
    flex-shrink: 0;
}
.lump-code-instr {
    color: var(--text-secondary, #8a9aaa);
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.68rem;
}
.lump-code-method-label {
    color: var(--church-gold, #c8a84b);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.4rem 0.2rem 0.15rem;
    letter-spacing: 0.4px;
    border-top: 1px solid rgba(200, 168, 75, 0.2);
    margin-top: 0.3rem;
}
.lump-meth-auto {
    font-weight: 400;
    opacity: 0.55;
    font-size: 0.62rem;
    vertical-align: middle;
    margin-left: 0.25rem;
}
/* Stub-method warning badge (shown in method card header) */
.lump-meth-stub-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    background: #7c2d12;
    color: #fcd34d;
    border: 1px solid #f59e0b;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.05rem 0.35rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    cursor: help;
    letter-spacing: 0.02em;
}
/* Stub-method card: left accent stripe */
.lump-method-card-stub {
    border-left: 3px solid #f59e0b;
}
/* Stub-method inline warning row (shown in method body before the bare RETURN) */
.lump-code-stub-warn-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.3rem 0.5rem;
    margin: 0.2rem 0 0.25rem 0;
    background: rgba(124, 45, 18, 0.35);
    border: 1px solid #f59e0b55;
    border-radius: 3px;
    font-size: 0.72rem;
}
.lump-code-stub-warn-icon {
    color: #fbbf24;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.lump-code-stub-warn-text {
    color: #fcd34d;
    font-style: italic;
}
.lump-sym-ann {
    color: #7dd3a8;
    font-size: 0.68rem;
    margin-left: 0.5rem;
    opacity: 0.85;
    font-style: italic;
}
.lump-code-comment {
    color: #a8b8c8;
    font-size: 0.78rem;
    font-style: normal;
    white-space: nowrap;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lump-com-pet { color: #ff7b7b; font-weight: 600; }
.lump-com-dr  { color: #7dd3a8; font-weight: 600; }
.lump-com-cr  { color: #ffc85a; font-weight: 600; }
.lump-code-label-row {
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    color: #e0a83c;
    padding: 0.05rem 0.2rem 0 0.2rem;
    line-height: 1.3;
    letter-spacing: 0.02em;
}
.lump-code-branch-svg {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.9;
}
.lump-code-branch-svg svg.br-svg {
    display: block;
}
.lump-code-docstring {
    color: #8a9aaa;
    font-size: 0.67rem;
    font-style: italic;
    padding: 0.2rem 0.4rem 0.35rem 0.75rem;
    border-left: 2px solid rgba(100, 160, 255, 0.18);
    margin: 0.1rem 0 0.3rem 0;
    line-height: 1.5;
}
.lump-code-docstring .lump-doc-desc {
    color: #9bb0c4;
    display: block;
    margin-bottom: 0.15rem;
}
.lump-code-docstring .lump-doc-io {
    color: #6a8899;
    display: block;
    font-size: 0.63rem;
}
/* ── C-List viewer ──────────────────────────────────────── */
.lump-clist-section {
    margin-top: 0.8rem;
    border-top: 1px solid rgba(100, 160, 255, 0.12);
    padding-top: 0.5rem;
}
.lump-clist-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: #7eb8ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}
.lump-clist-table {
    font-family: 'Courier New', monospace;
    font-size: 0.71rem;
}
.lump-clist-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.08rem 0.2rem;
    line-height: 1.6;
}
.lump-clist-row:hover { background: rgba(100,160,255,0.05); }
.lump-clist-idx  { color: #6b7280; min-width: 2.4rem; flex-shrink: 0; }
.lump-clist-tok  { color: #7eb8ff; min-width: 7.2rem; flex-shrink: 0; }
.lump-clist-name { color: var(--text-primary); }
.lump-clist-null { color: #444; font-style: italic; }

/* ── MyGoldenTokens GT chips ────────────────────────────── */
.lump-gt-count {
    font-weight: 400;
    font-size: 0.65rem;
    color: var(--text-secondary, #8888aa);
    text-transform: none;
    letter-spacing: 0;
    margin-left: 0.3rem;
}
.lump-gt-chips {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.2rem 0;
}
.lump-gt-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-family: 'Courier New', monospace;
    background: rgba(100, 160, 255, 0.05);
    border: 1px solid rgba(100, 160, 255, 0.12);
    border-radius: 4px;
    padding: 3px 8px 3px 6px;
    color: var(--text-primary, #e0e0f0);
    white-space: nowrap;
    transition: border-color 0.12s, background 0.12s;
}
.lump-gt-chip:hover {
    background: rgba(100, 160, 255, 0.1);
    border-color: rgba(100, 160, 255, 0.3);
}
.lump-gt-chip-null {
    background: rgba(80, 80, 100, 0.04);
    border-color: rgba(100, 100, 130, 0.1);
}
.lump-gt-chip-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--church-gold, #c8a84b);
    flex-shrink: 0;
}
.lump-gt-dot-null {
    background: #333;
}
.lump-gt-chip-name {
    color: #ffee00;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lump-gt-name-null {
    color: #444;
    font-weight: 400;
    font-style: italic;
}
.lump-gt-name-unresolved {
    color: #b8c8d8;
    font-weight: 500;
    font-style: italic;
}
.lump-gt-chip-meta {
    color: var(--text-secondary, #8a9aaa);
    font-size: 0.68rem;
    font-weight: 400;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
    font-family: 'Courier New', monospace;
}
.lump-gt-meta-null {
    color: #333;
}

/* Empty slot — clickable "+" affordance */
.lump-gt-chip-empty {
    cursor: pointer;
}
.lump-gt-chip-empty:hover {
    border-color: rgba(100, 200, 120, 0.35);
    background: rgba(100, 200, 120, 0.06);
}
.lump-gt-empty-btn {
    display: inline-block;
    margin-left: auto;
    color: #3a6;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.12s;
    flex-shrink: 0;
    padding: 0 2px;
}
.lump-gt-chip-empty:hover .lump-gt-empty-btn { opacity: 1; }

/* ── GT chip inline name input (Tokens tab) ──────────────── */
.lump-gt-name-input {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 238, 0, 0.3);
    color: #ffee00;
    font-weight: 600;
    font-size: 0.72rem;
    font-family: 'Courier New', monospace;
    flex: 1;
    min-width: 0;
    padding: 0;
    outline: none;
    cursor: text;
    transition: border-color 0.15s, background 0.15s;
}
.lump-gt-name-input:hover {
    border-bottom-color: rgba(255, 238, 0, 0.6);
}
.lump-gt-name-input:focus {
    border-bottom: 1px solid #ffee00;
    background: rgba(255, 238, 0, 0.05);
    border-radius: 2px 2px 0 0;
}
.lump-gt-name-input.lump-gt-name-unresolved {
    color: #b8c8d8;
    font-weight: 500;
    font-style: italic;
    border-bottom-color: rgba(184, 200, 216, 0.3);
}

/* Apply Names → Sim button variant */
.clist-names-btn {
    color: #66b3ff !important;
    border-color: rgba(100, 160, 255, 0.4) !important;
    background: rgba(100, 160, 255, 0.06) !important;
}
.clist-names-btn:hover:not(:disabled) {
    background: rgba(100, 160, 255, 0.15) !important;
    border-color: #66b3ff !important;
}
.clist-names-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── Overview tab CR pet-name edit affordance ─────────────── */
.lump-pn-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary, #888);
    font-size: 0.72rem;
    padding: 0 3px;
    margin-left: 4px;
    opacity: 0.4;
    transition: opacity 0.15s, color 0.15s;
    vertical-align: middle;
}
.lump-pn-edit-btn:hover {
    opacity: 1;
    color: var(--church-gold, #c8a84b);
}
.lump-pn-name-cell {
    position: relative;
    white-space: nowrap;
}
.lump-pn-cr-input {
    background: rgba(255, 238, 0, 0.04);
    border: 1px solid rgba(255, 238, 0, 0.4);
    border-radius: 3px;
    color: #ffee00;
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    padding: 1px 5px;
    outline: none;
    width: 10rem;
    max-width: 100%;
}
.lump-pn-cr-input:focus {
    border-color: #ffee00;
    background: rgba(255, 238, 0, 0.08);
}

/* ── GT Slot Picker modal ─────────────────────────────────── */
.gtpick-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10500;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.gtpick-panel {
    background: #13131e;
    border: 1px solid rgba(100, 160, 255, 0.25);
    border-radius: 8px;
    width: 420px;
    max-width: 94vw;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    overflow: hidden;
}
.gtpick-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.75rem 0.45rem;
    border-bottom: 1px solid rgba(100,160,255,0.12);
    background: rgba(100,160,255,0.05);
    flex-shrink: 0;
}
.gtpick-title {
    font-weight: 700;
    color: #7eb8ff;
    font-size: 0.78rem;
    letter-spacing: 0.3px;
}
.gtpick-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 4px;
    line-height: 1;
}
.gtpick-close:hover { color: #aaa; }

.gtpick-selected-bar {
    padding: 0.3rem 0.75rem;
    background: rgba(100, 200, 120, 0.08);
    border-bottom: 1px solid rgba(100, 200, 120, 0.18);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    flex-shrink: 0;
}
.gtpick-sel-label { color: #7dd3a8; font-weight: 600; }
.gtpick-sel-slot  { color: #6b7280; }

.gtpick-search {
    margin: 0.5rem 0.6rem 0.3rem;
    padding: 0.28rem 0.5rem;
    background: #0d0d18;
    border: 1px solid rgba(100,160,255,0.2);
    border-radius: 4px;
    color: #d0d8e8;
    font-family: inherit;
    font-size: 0.73rem;
    outline: none;
    flex-shrink: 0;
}
.gtpick-search:focus { border-color: rgba(100,160,255,0.5); }

.gtpick-list {
    overflow-y: auto;
    flex: 1 1 auto;
    padding: 0.2rem 0;
    min-height: 80px;
    max-height: 240px;
}
.gtpick-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.22rem 0.75rem;
    cursor: pointer;
    transition: background 0.08s;
}
.gtpick-row:hover     { background: rgba(100,160,255,0.08); }
.gtpick-row-sel       { background: rgba(100,200,120,0.1); }
.gtpick-row-sel:hover { background: rgba(100,200,120,0.15); }
.gtpick-slot  { color: #6b7280; min-width: 2.5rem; flex-shrink: 0; }
.gtpick-badge { font-size: 0.67rem; min-width: 2.2rem; flex-shrink: 0; font-weight: 600; }
.gtpick-label { color: #c8d8e8; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gtpick-opts {
    padding: 0.4rem 0.75rem 0.3rem;
    border-top: 1px solid rgba(100,160,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex-shrink: 0;
}
.gtpick-opt-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.gtpick-opt-label {
    color: #6b7280;
    font-size: 0.68rem;
    min-width: 5.5rem;
    flex-shrink: 0;
}
.gtpick-select {
    background: #0d0d18;
    border: 1px solid rgba(100,160,255,0.18);
    border-radius: 3px;
    color: #c8d8e8;
    font-family: inherit;
    font-size: 0.72rem;
    padding: 2px 4px;
}
.gtpick-perms { display: flex; gap: 0.5rem; }
.gtpick-perm-lbl {
    display: flex;
    align-items: center;
    gap: 2px;
    color: #8a9aaa;
    font-size: 0.7rem;
    cursor: pointer;
    user-select: none;
}
.gtpick-perm-lbl input { cursor: pointer; accent-color: #7eb8ff; }

.gtpick-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem 0.55rem;
    border-top: 1px solid rgba(100,160,255,0.1);
    flex-shrink: 0;
}
.gtpick-btn {
    padding: 0.26rem 0.7rem;
    border-radius: 4px;
    border: 1px solid;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.73rem;
    font-weight: 600;
    transition: opacity 0.12s;
}
.gtpick-btn:disabled { opacity: 0.35; cursor: default; }
.gtpick-btn-assign {
    background: rgba(100,200,120,0.15);
    border-color: rgba(100,200,120,0.4);
    color: #7dd3a8;
}
.gtpick-btn-assign:not(:disabled):hover { background: rgba(100,200,120,0.25); }
.gtpick-btn-cancel {
    background: rgba(100,100,130,0.12);
    border-color: rgba(100,100,130,0.25);
    color: #8a9aaa;
}
.gtpick-btn-cancel:hover { background: rgba(100,100,130,0.2); }
.gtpick-new-hint {
    margin-left: auto;
    color: #555;
    font-size: 0.68rem;
}
.gtpick-new-hint a {
    color: var(--church-gold, #c8a84b);
    text-decoration: none;
}
.gtpick-new-hint a:hover { text-decoration: underline; }

#lump-gt-detail-popup {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #0f0f1e;
    border: 1px solid var(--church-gold, #c8a84b);
    border-radius: 6px;
    padding: 0.45rem 0.65rem;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    color: var(--text-primary, #e0e0f0);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    min-width: 160px;
    animation: lump-popup-in 0.1s ease;
}
@keyframes lump-popup-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lump-gt-popup-row {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.1rem 0;
}
.lump-gt-popup-lbl {
    color: #6b7280;
    flex-shrink: 0;
}
.lump-gt-popup-val {
    color: #c8a84b;
}

/* ── MyMethods section ──────────────────────────────────── */
.lump-methods-section {
    margin-bottom: 0.5rem;
}
.lump-methods-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--church-gold, #c8a84b);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(200, 168, 75, 0.2);
}
.lump-method-card {
    border: 1px solid rgba(200, 168, 75, 0.15);
    border-radius: 5px;
    background: rgba(200, 168, 75, 0.03);
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.lump-method-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.5rem 0.25rem;
    background: rgba(200, 168, 75, 0.07);
    border-bottom: 1px solid rgba(200, 168, 75, 0.12);
}
.lump-method-card-name {
    color: var(--church-gold, #c8a84b);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    user-select: none;
}
.lump-method-card-name::before {
    content: '\25bc\00a0';
    font-size: 0.5rem;
    opacity: 0.6;
    vertical-align: middle;
}
.lump-method-card[data-collapsed="1"] .lump-method-card-name::before {
    content: '\25b6\00a0';
}
.lump-method-card-name:hover {
    color: #e8c870;
}
.lump-method-body {
    display: block;
}
.lump-method-card[data-collapsed="1"] .lump-method-body {
    display: none;
}
.lump-method-toggle-btn {
    font-size: 0.6rem;
    font-family: 'Courier New', monospace;
    padding: 1px 7px;
    border-radius: 3px;
    background: rgba(100, 160, 255, 0.08);
    border: 1px solid rgba(100, 160, 255, 0.2);
    color: #7898cc;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}
.lump-method-toggle-btn:hover {
    background: rgba(100, 160, 255, 0.16);
    color: #aaccff;
}
.lump-method-card .lump-code-row {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.lump-method-card .lump-code-docstring {
    padding-left: 0.75rem;
}

/* Binary group hidden by default; shown when card data-binary="1" */
.lump-code-binary-group,
.lump-code-binary-hidden {
    display: none;
    opacity: 0;
    max-width: 0;
    overflow: hidden;
}
.lump-method-card[data-binary="1"] .lump-code-binary-group,
.lump-method-card[data-binary="1"] .lump-code-binary-hidden {
    display: flex;
    opacity: 1;
    max-width: none;
    overflow: visible;
}
.lump-code-binary-shown {
    display: inline;
    opacity: 1;
    max-width: none;
    overflow: visible;
}

/* ── LUMP text / markdown content ──────────────────────── */
.lump-content-text {
    font-family: 'Courier New', monospace;
    font-size: 0.73rem;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.18);
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    border: 1px solid rgba(100, 160, 255, 0.1);
    max-height: 100%;
    overflow-y: auto;
    margin: 0;
    flex: 1;
}
.lump-content-error-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 1rem 1.1rem;
    margin: 0.6rem 0;
    background: rgba(220, 50, 50, 0.07);
    border: 1px solid rgba(220, 80, 80, 0.28);
    border-radius: 6px;
}
.lcep-icon {
    font-size: 1.4rem;
    line-height: 1;
}
.lcep-headline {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e57373;
}
.lcep-desc {
    font-size: 0.75rem;
    color: var(--text-primary, #ccc);
    line-height: 1.4;
}
.lcep-detail {
    font-family: 'Courier New', monospace;
    font-size: 0.67rem;
    color: #888;
    background: rgba(0,0,0,0.25);
    padding: 2px 6px;
    border-radius: 3px;
    word-break: break-all;
}
.lcep-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.3rem;
}
.lcep-btn {
    font-size: 0.7rem;
    padding: 3px 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-primary, #ccc);
    border-radius: 4px;
    cursor: pointer;
}
.lcep-btn:hover {
    background: rgba(255,255,255,0.13);
    border-color: rgba(255,255,255,0.28);
}
.lump-content-markdown {
    font-size: 0.78rem;
    line-height: 1.65;
    color: var(--text-primary);
    padding: 0.3rem 0.2rem;
    overflow-y: auto;
}
.lump-content-markdown h1, .lump-content-markdown h2, .lump-content-markdown h3 {
    color: var(--church-gold, #c8a84b);
    margin: 0.6rem 0 0.3rem;
}
.lump-content-markdown code {
    background: rgba(100, 160, 255, 0.1);
    padding: 0 4px;
    border-radius: 3px;
    font-size: 0.9em;
}
.lump-content-markdown pre { overflow-x: auto; }

/* ── LUMP image content ────────────────────────────────── */
.lump-content-image {
    display: flex;
    flex-direction: column;
    padding: 0.3rem 0;
    overflow-y: auto;
}

/* ── LUMP thread content ───────────────────────────────── */
.lump-content-thread {
    font-size: 0.73rem;
    overflow-y: auto;
}

/* ── LUMP inline editor ────────────────────────────────── */
.lump-edit-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}
.lump-edit-toolbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0;
}
.lump-edit-btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
}
.lump-edit-preview {
    width: 100%;
}
.lump-edit-area {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}
.lump-draft-restore-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: #2a2208;
    border: 1px solid #fbbf24;
    border-radius: 4px;
    color: #fbbf24;
    font-size: 0.82rem;
}
.lump-draft-restore-banner span { flex: 1; }
/* ── Stored source block inside the Source tab ──────────── */
.lump-stored-src-section {
    border-bottom: 1px solid var(--border-color, #2a2a4a);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}
.lump-stored-src-pre {
    background: var(--editor-bg, #0d0d1a);
    color: var(--editor-fg, #c0c0d0);
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.75rem;
    line-height: 1.55;
    overflow-x: auto;
    white-space: pre;
    margin: 0.4rem 0 0;
    max-height: 60vh;
}
.lump-stored-src-meta {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.lump-stored-src-empty {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    padding: 0.5rem 0;
}

.lump-source-restored-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: #0a2010;
    border: 1px solid #4ade80;
    border-radius: 4px;
    color: #4ade80;
    font-size: 0.82rem;
}
.lump-source-restored-banner span { flex: 1; }
.lump-draft-restore-btn { background: #fbbf24; color: #1a1a2e; }
.lump-draft-restore-btn:hover { background: #f59e0b; }
.lump-draft-discard-btn { background: transparent; border: 1px solid #fbbf24; color: #fbbf24; }
.lump-editor-discard-btn { background: transparent; border: 1px solid #f87171; color: #f87171; margin-left: 0.4rem; font-size: 0.78rem; padding: 2px 10px; border-radius: 4px; cursor: pointer; }
.lump-editor-discard-btn:hover { background: rgba(248,113,113,0.15); }
.lump-edit-split {
    display: grid;
    grid-template-columns: 1fr 6px 1fr;
    width: 100%;
    min-height: 220px;
}
.lump-edit-split-divider {
    width: 6px;
    cursor: col-resize;
    background: var(--border, #3c3c3c);
    border-radius: 3px;
    transition: background 0.15s;
    position: relative;
    user-select: none;
}
.lump-edit-split-divider:hover,
.lump-edit-split-divider.dragging {
    background: var(--accent, #569cd6);
}
.lump-edit-split-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.lump-edit-split-right {
    min-width: 0;
    border: 1px solid var(--border, #3c3c3c);
    border-radius: 4px;
    padding: 0.5rem;
    background: var(--bg-secondary, #252526);
    overflow-y: auto;
    max-height: 420px;
}
.lump-edit-live-preview {
    width: 100%;
    word-break: break-word;
}
.lump-edit-textarea {
    width: 100%;
    min-height: 180px;
    background: var(--bg-tertiary, #1e1e1e);
    color: var(--text-primary, #d4d4d4);
    border: 1px solid var(--border, #3c3c3c);
    border-radius: 4px;
    padding: 0.5rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
}
.lump-edit-split-left .lump-edit-textarea {
    flex: 1;
    min-height: 220px;
    max-height: 420px;
    resize: none;
}
@media (max-width: 600px) {
    .lump-edit-split {
        grid-template-columns: 1fr !important;
    }
    .lump-edit-split-divider {
        display: none;
    }
    .lump-edit-split-right {
        max-height: 240px;
    }
}
.lump-edit-textarea:focus {
    outline: none;
    border-color: var(--accent, #569cd6);
}
.lump-edit-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.lump-edit-save-btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
    background: var(--accent, #569cd6);
    color: #fff;
    border: none;
}
.lump-edit-save-btn:hover:not(:disabled) {
    opacity: 0.85;
}
.lump-edit-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.lump-edit-cancel-btn {
    font-size: 0.72rem;
    padding: 0.25rem 0.65rem;
}
.lump-edit-status {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-left: 0.3rem;
}

/* ── LUMP import modal ─────────────────────────────────── */
.lump-import-dialog {
    max-width: 420px;
    width: 95vw;
}
.lump-import-row {
    margin-bottom: 0.65rem;
}
.lump-import-row label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}
.lump-import-row input[type=text],
.lump-import-row input[type=number],
.lump-import-row select,
.lump-import-row textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(100,160,255,0.2);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
    font-family: inherit;
    resize: vertical;
}
.lump-import-row select {
    background: #1a1a2e;
    color: #e0e0f0;
}
.lump-import-row select option {
    background: #1a1a2e;
    color: #e0e0f0;
}
.lump-import-row textarea { min-height: 80px; }
.lump-import-img-pair { display: flex; gap: 0.5rem; }
.lump-import-img-pair input { flex: 1; }
.lump-import-err {
    color: #ff7070;
    font-size: 0.7rem;
    min-height: 1rem;
    margin-top: 0.4rem;
}

.ns-dep-graph-toolbar {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
}

.ns-dep-graph-btn {
    font-size: 0.72rem;
    font-family: monospace;
    padding: 0.18rem 0.5rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(100, 160, 255, 0.22);
    border-radius: 4px;
    color: var(--text-secondary, #9ca3af);
    cursor: pointer;
    line-height: 1;
    transition: background 0.12s, color 0.12s;
}

.ns-dep-graph-btn:hover {
    background: rgba(100, 160, 255, 0.14);
    color: var(--text-primary, #e5e7eb);
}

.ns-dep-graph-null-btn {
    margin-left: 0.4rem;
    color: #7a7a9a;
    font-size: 0.68rem;
}

.ns-dep-graph-wrap {
    overflow-x: hidden;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid rgba(100, 160, 255, 0.10);
    padding: 4px 2px;
    max-height: 72vh;
    position: relative;
}

.ns-dep-graph-svg {
    display: block;
    width: 100%;
    max-width: 660px;
    height: auto;
    cursor: grab;
}

.ns-dep-graph-svg:active {
    cursor: grabbing;
}

.ns-dep-graph-svg text {
    user-select: none;
}

.nsdg-tooltip {
    display: none;
    position: fixed;
    z-index: 9999;
    background: #111820;
    border: 1px solid rgba(100, 160, 255, 0.25);
    border-radius: 6px;
    padding: 8px 10px;
    min-width: 160px;
    max-width: 280px;
    pointer-events: none;
    box-shadow: 0 4px 18px rgba(0,0,0,0.55);
    font-family: monospace;
    font-size: 0.72rem;
    line-height: 1.45;
}

.nsdg-tip-title {
    font-weight: 700;
    font-size: 0.78rem;
    color: #e0e8f8;
    margin-bottom: 5px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(100,160,255,0.15);
}

.nsdg-tip-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
}

.nsdg-tip-lbl {
    color: #6a8aaa;
    flex-shrink: 0;
}

.nsdg-tip-val {
    color: #c8dce8;
    text-align: right;
    word-break: break-all;
}

.nsdg-tip-mono {
    font-family: monospace;
    font-size: 0.68rem;
}

.nsdg-tip-nav {
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px solid rgba(100,160,255,0.12);
    color: #4a9a7a;
    font-size: 0.68rem;
    text-align: right;
}

.ns-builder-form {
    padding: 0.5rem 0;
}

.ns-builder-form .ns-form-group {
    margin-bottom: 0.75rem;
}

.ns-builder-form label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ns-builder-form input[type="text"],
.ns-builder-form input[type="number"],
.ns-builder-form select {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.78rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(100,160,255,0.2);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    box-sizing: border-box;
}

.ns-builder-form input:focus,
.ns-builder-form select:focus {
    outline: none;
    border-color: var(--church-gold);
}

.ns-slot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(100,160,255,0.12);
    border-radius: 4px;
    margin-top: 0.4rem;
}

.ns-slot-table th {
    padding: 0.3rem 0.5rem;
    text-align: left;
    font-size: 0.65rem;
    color: var(--church-gold);
    font-weight: 600;
    border-bottom: 1px solid rgba(100,160,255,0.15);
    background: rgba(0,0,0,0.15);
}

.ns-slot-table td {
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid rgba(100,160,255,0.08);
    vertical-align: top;
}

.ns-slot-table select,
.ns-slot-table input {
    padding: 3px 5px;
    font-size: 0.72rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(100,160,255,0.2);
    border-radius: 3px;
    color: var(--text-primary);
    font-family: inherit;
}

.ns-slot-table .ns-slot-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 3px;
}

.ns-slot-table .ns-slot-fields label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 0;
}

.ns-slot-remove-btn {
    background: rgba(160,30,30,0.4);
    color: #ff9999;
    border: 1px solid rgba(200,60,60,0.3);
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
}

.ns-slot-remove-btn:hover {
    background: rgba(200,40,40,0.5);
}

.ns-slot-add-btn {
    background: rgba(30,80,160,0.3);
    color: #8ab4f8;
    border: 1px solid rgba(100,160,255,0.2);
    font-size: 0.7rem;
    padding: 5px 14px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.5rem;
}

.ns-slot-add-btn:hover {
    background: rgba(40,100,200,0.4);
}

.ns-build-btn {
    background: #2d7d46;
    color: #e0ffe0;
    border: 1px solid #3a9955;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 24px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
}

.ns-build-btn:hover {
    background: #38955a;
}

.ns-build-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lump-type-selector-dialog {
    max-width: 640px;
    width: 100%;
}

.lump-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.lump-type-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.8rem 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}

.lump-type-card:hover {
    border-color: var(--church-gold);
    background: rgba(200,155,60,0.07);
}

.lump-type-card-inform {
    border-color: #2a6b6b;
}
.lump-type-card-inform:hover {
    border-color: #4ecdc4;
    background: rgba(78,205,196,0.07);
}
.lump-type-card-inform .lump-type-icon {
    color: #4ecdc4;
}

.lump-type-card-outform {
    border-color: #6b4a1e;
}
.lump-type-card-outform:hover {
    border-color: #ffe07e;
    background: rgba(255,224,126,0.07);
}
.lump-type-card-outform .lump-type-icon {
    color: #ffe07e;
}

.lump-type-card-ns {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 0.8rem;
}

.lump-type-card-ns .lump-type-desc {
    flex: 1;
}

.lump-type-icon {
    font-size: 1.3rem;
    line-height: 1;
    color: var(--church-gold);
}

.lump-type-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.lump-type-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.lump-type-cancel-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

@media (max-width: 768px) {
    header {
        padding: 0.4rem 0.5rem;
        gap: 0.4rem;
    }

    header h1 {
        font-size: 1rem;
    }

    .controls {
        gap: 0.35rem;
    }

    .view-buttons {
        gap: 0.2rem;
    }

    .btn-view {
        padding: 0.25rem 0.45rem;
        font-size: 0.65rem;
    }

    .sim-exec-btns {
        justify-content: flex-start;
    }

    .sim-controls .btn {
        padding: 0.3rem 0.7rem;
        font-size: 0.75rem;
    }

    .view {
        top: 52px;
        padding: 0.35rem;
    }

    .editor-layout {
        flex-direction: column;
        height: auto;
    }

    .editor-divider {
        display: none;
    }

    .repl-layout {
        flex-direction: column;
        height: auto;
    }

    .repl-panel {
        flex: none;
    }

    .repl-divider {
        display: none;
    }

    .repl-sidebar {
        flex: none;
    }

    .tutorial-body {
        grid-template-columns: 1fr;
    }

    .pipeline-stages {
        flex-wrap: wrap;
    }

    .comparison-row {
        grid-template-columns: 30px 1fr 60px 60px;
    }

    .ref-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .ref-list-panel {
        max-height: 40vh;
    }

    .abs-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .abs-list-panel {
        max-height: 40vh;
    }

    .lumps-layout {
        height: auto;
    }

    .modal-dialog {
        min-width: unset;
        max-width: 95vw;
        margin: 0 0.5rem;
    }

    .dash-tabs {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .dash-tab {
        padding: 0.35rem 0.8rem;
        font-size: 0.72rem;
    }

    .flags-bar {
        flex-wrap: wrap;
    }

    .instr-card {
        grid-template-columns: 24px 80px 1fr;
        font-size: 0.72rem;
    }

    .tutorial-phase-indicators {
        flex-wrap: wrap;
    }

}

.docs-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1rem;
    height: calc(100vh - 70px);
    overflow: hidden;
}

.docs-sidebar {
    padding-right: 0.25rem;
    min-height: 0;
}

.docs-sidebar-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.docs-sidebar-header {
    flex-shrink: 0;
    padding-bottom: 0.35rem;
}

.docs-sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.docs-search-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, #2a2a4a);
    border-radius: 4px;
    color: var(--text-primary, #e2e8f0);
    font-size: 0.78rem;
    padding: 0.28rem 0.5rem 0.28rem 1.65rem;
    outline: none;
    margin-top: 0.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555577' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.42rem center;
    transition: border-color 0.15s;
}

.docs-search-input:focus {
    border-color: rgba(200, 155, 60, 0.5);
}

.docs-search-input::placeholder {
    color: var(--text-muted, #555577);
}

.docs-figures-title {
    margin-top: 12px;
}

.docs-content-panel {
    overflow-y: auto;
}

.docs-content-panel .panel {
    height: 100%;
}

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

.docs-back-btn {
    display: none;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

.docs-file-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.25rem 0;
}

.docs-chapter-group {
    margin-bottom: 0.5rem;
}

.docs-chapter-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--church-gold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.5rem 0.6rem 0.2rem;
    border-top: 1px solid rgba(200, 155, 60, 0.15);
    margin-top: 0.25rem;
}

.docs-chapter-group:first-child .docs-chapter-title {
    border-top: none;
    margin-top: 0;
}

.docs-chapter-num {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-right: 0.4rem;
    min-width: 1.8rem;
    display: inline-block;
}

.docs-file-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0.3rem 0.6rem 0.3rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-dim);
    transition: background 0.15s;
}

.docs-file-item:hover {
    background: rgba(200, 155, 60, 0.1);
    color: var(--text-color);
}

.docs-file-item.active {
    background: rgba(200, 155, 60, 0.2);
    color: var(--church-gold);
}

.docs-file-item .file-size {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.docs-file-item .file-icon {
    margin-right: 6px;
    opacity: 0.6;
}

.docs-placeholder {
    color: var(--text-dim);
    font-size: 0.85rem;
    padding: 2rem;
    text-align: center;
}

.docs-content-body {
    padding: 1rem;
    font-size: 0.85rem;
    line-height: 1.7;
}

.docs-content-body h1 {
    font-size: 1.4rem;
    color: var(--church-gold);
    margin: 1.5rem 0 0.75rem 0;
    border-bottom: 1px solid rgba(200, 155, 60, 0.3);
    padding-bottom: 0.4rem;
}

.docs-content-body h2 {
    font-size: 1.15rem;
    color: var(--church-gold);
    margin: 1.25rem 0 0.5rem 0;
}

.docs-content-body h3 {
    font-size: 1rem;
    color: var(--text-color);
    margin: 1rem 0 0.4rem 0;
}

.docs-content-body p {
    margin: 0.5rem 0;
}

.docs-content-body code {
    background: rgba(200, 155, 60, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: var(--church-gold);
}

.docs-content-body pre {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(200, 155, 60, 0.2);
    border-radius: 6px;
    padding: 0.8rem 1rem;
    overflow-x: auto;
    margin: 0.75rem 0;
    font-size: 0.78rem;
    line-height: 1.5;
}

.docs-content-body pre code {
    background: none;
    padding: 0;
    color: var(--text-color);
}

.docs-content-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.78rem;
}

.docs-content-body th {
    background: rgba(200, 155, 60, 0.15);
    color: var(--church-gold);
    padding: 0.4rem 0.6rem;
    text-align: left;
    border: 1px solid rgba(200, 155, 60, 0.2);
}

.docs-content-body td {
    padding: 0.35rem 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-content-body ul, .docs-content-body ol {
    margin: 0.4rem 0;
    padding-left: 1.5rem;
}

.docs-content-body li {
    margin: 0.2rem 0;
}

.docs-content-body blockquote {
    border-left: 3px solid var(--church-gold);
    margin: 0.75rem 0;
    padding: 0.5rem 1rem;
    color: var(--text-dim);
    background: rgba(200, 155, 60, 0.05);
}

.docs-content-body strong {
    color: var(--text-color);
}

.docs-content-body hr {
    border: none;
    border-top: 1px solid rgba(200, 155, 60, 0.2);
    margin: 1.25rem 0;
}

.docs-figure-frame {
    width: 100%;
    border: none;
    min-height: calc(100vh - 140px);
    background: #ffffff;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .docs-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .docs-sidebar {
        max-height: 40vh;
        overflow-y: auto;
    }

    .docs-sidebar.docs-sidebar-collapsed {
        display: none !important;
    }

    .docs-content-panel {
        overflow-y: visible;
        max-width: 100vw;
    }

    .docs-content-panel .panel {
        height: auto;
        max-width: 100%;
        overflow-x: hidden;
    }

    .docs-content-body {
        max-width: 100%;
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .docs-content-body pre {
        max-width: calc(100vw - 3rem);
        overflow-x: auto;
        font-size: 0.7rem;
        white-space: pre-wrap;
        word-break: break-all;
    }

    .docs-content-body code {
        word-break: break-all;
    }

    .docs-content-body table {
        display: block;
        max-width: calc(100vw - 3rem);
        overflow-x: auto;
        font-size: 0.7rem;
    }

    .docs-content-body td,
    .docs-content-body th {
        padding: 0.25rem 0.35rem;
        font-size: 0.68rem;
    }

    .docs-back-btn {
        display: inline-block !important;
    }
}

.tutorial-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem;
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.tutorial-selector [data-tooltip]::after {
    bottom: auto;
    top: calc(100% + 8px);
}

.tutorial-selector .btn-tut-select {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.78rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: center;
}

.tutorial-selector .btn-tut-select:hover {
    background: rgba(200, 155, 60, 0.1);
    color: var(--text-primary);
}

.tutorial-selector .btn-tut-select.active {
    background: var(--church-gold);
    color: var(--bg-dark);
    font-weight: 600;
    border-color: var(--church-gold);
}

.sr-wrapper {
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sr-header {
    margin-bottom: 1rem;
}

.sr-header h2 {
    font-size: 1.1rem;
    color: var(--church-gold);
    margin-bottom: 0.25rem;
}

.sr-tagline {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.sr-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.sr-progress-bar {
    display: flex;
    gap: 2px;
    margin-top: 0.5rem;
}

.sr-prog-section {
    flex: 1;
    padding: 0.25rem 0.4rem;
    text-align: center;
    font-size: 0.65rem;
    border-radius: 3px;
    transition: all 0.3s;
}

.sr-prog-pending {
    background: var(--bg-input);
    color: var(--text-dim);
}

.sr-prog-active {
    background: var(--church-gold);
    color: var(--bg-dark);
    font-weight: 600;
}

.sr-prog-done {
    background: rgba(200, 155, 60, 0.3);
    color: var(--church-gold);
}

.sr-body {
    flex: 1;
    overflow-y: auto;
}

.sr-step-container {
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    line-height: 1.6;
}

.sr-step-title {
    font-size: 1.2rem;
    color: var(--church-gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sr-step-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.sr-step-content {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.sr-step-content p {
    margin-bottom: 0.75rem;
}

.sr-step-content ul {
    margin: 0.5rem 0 0.75rem 1.5rem;
}

.sr-step-content li {
    margin-bottom: 0.25rem;
}

.sr-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0.75rem 0;
}

.sr-four-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.sr-col-title {
    font-weight: 600;
    color: var(--church-gold);
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.sr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.sr-table th {
    background: rgba(200, 155, 60, 0.15);
    color: var(--church-gold);
    padding: 0.3rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.sr-table td {
    padding: 0.3rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sr-table-wide {
    margin: 0.75rem 0;
}

.sr-encoding {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--church-gold);
    margin: 0.75rem 0;
    overflow-x: auto;
    white-space: pre;
}

pre {
    position: relative;
}

.code-copy-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-dim);
    font-size: 0.68rem;
    padding: 2px 8px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
    font-family: sans-serif;
}

pre:hover .code-copy-btn {
    opacity: 1;
}

.code-copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.code-copy-btn.copied {
    color: #7ee787;
    border-color: rgba(126, 231, 135, 0.3);
}

.sr-code {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    color: var(--text-primary);
    margin: 0.75rem 0;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.4;
}

.sr-code-js {
    border-left: 3px solid var(--church-gold);
}

.sr-code-hs {
    border-left: 3px solid #9b59b6;
}

.sr-asm {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    color: #7ee787;
    margin: 0.75rem 0;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.5;
}

.sr-key-concept {
    background: rgba(200, 155, 60, 0.08);
    border: 1px solid rgba(200, 155, 60, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
}

.sr-concept-title {
    font-weight: 600;
    color: var(--church-gold);
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.sr-warning {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin: 0.75rem 0;
    font-size: 0.8rem;
    color: #e74c3c;
}

.sr-objectives {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.sr-obj-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border-radius: 6px;
    font-size: 0.82rem;
}

.sr-obj-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--church-gold);
    color: var(--bg-dark);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.sr-hardware {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border-radius: 6px;
}

.sr-lump-diagram {
    display: flex;
    flex-direction: column;
    margin: 0.75rem 0;
    border: 2px solid var(--church-gold);
    border-radius: 6px;
    overflow: hidden;
}

.sr-lump-region {
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    font-family: 'Courier New', monospace;
    text-align: center;
}

.sr-lump-code {
    background: rgba(46, 160, 67, 0.15);
    color: #7ee787;
    border-bottom: 1px dashed var(--border);
}

.sr-lump-free {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-dim);
    border-bottom: 1px dashed var(--border);
    font-style: italic;
}

.sr-lump-clist {
    background: rgba(200, 155, 60, 0.15);
    color: var(--church-gold);
}

.sr-compiler-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin: 0.75rem 0;
    padding: 1rem;
    background: var(--bg-input);
    border-radius: 8px;
}

.sr-comp-inputs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.sr-comp-input {
    padding: 0.4rem 1rem;
    background: rgba(200, 155, 60, 0.15);
    border: 1px solid rgba(200, 155, 60, 0.3);
    border-radius: 4px;
    font-size: 0.78rem;
    color: var(--church-gold);
    position: relative;
    cursor: help;
}

.sr-comp-input[data-tooltip]::after {
    bottom: auto;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    white-space: pre-line;
    text-align: left;
    max-width: 340px;
    font-family: monospace;
    font-size: 0.72rem;
    line-height: 1.5;
}

.sr-comp-arrow {
    font-size: 1.2rem;
    color: var(--text-dim);
}

.sr-comp-layout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0.75rem 0;
}

.sr-comp-layout .sr-compiler-diagram {
    margin: 0;
    flex-shrink: 0;
}

.sr-comp-side {
    flex: 1;
    min-width: 0;
}

.sr-comp-side-panel {
    background: rgba(26, 45, 80, 0.6);
    border: 1px solid rgba(100, 150, 220, 0.3);
    border-radius: 8px;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.sr-comp-side-panel.open {
    padding: 0.6rem 0.75rem;
    max-height: 800px;
    overflow-y: auto;
    opacity: 1;
}

.sr-comp-side-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--church-gold);
    margin-bottom: 0.4rem;
}

.sr-comp-side-panel p {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin: 0 0 0.4rem;
    line-height: 1.45;
}

.sr-comp-side-panel p:last-child {
    margin-bottom: 0;
}

.sr-comp-side-panel code {
    color: var(--church-gold);
    font-size: 0.7rem;
}

.sr-comp-core {
    padding: 0.6rem 1.5rem;
    background: var(--church-gold);
    color: var(--bg-dark);
    border-radius: 6px;
    font-weight: 600;
    position: relative;
    cursor: pointer;
}

.sr-comp-output {
    padding: 0.4rem 1rem;
    background: rgba(46, 160, 67, 0.15);
    border: 1px solid rgba(46, 160, 67, 0.3);
    border-radius: 4px;
    font-size: 0.78rem;
    color: #7ee787;
    position: relative;
    cursor: pointer;
}

.sr-totals {
    background: var(--bg-input);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin: 0.75rem 0;
}

.sr-total-item {
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.sr-total-note {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
    font-style: italic;
}

.sr-security-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.sr-sec-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-input);
    border-radius: 6px;
    font-size: 0.82rem;
    align-items: flex-start;
}

.sr-sec-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(200, 155, 60, 0.2);
    color: var(--church-gold);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.sr-pros-list, .sr-cons-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sr-pro-item, .sr-con-item {
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border-radius: 6px;
    border-left: 3px solid var(--church-gold);
}

.sr-con-item {
    border-left-color: #e74c3c;
}

.sr-pro-title, .sr-con-title {
    font-weight: 600;
    color: var(--church-gold);
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

.sr-con-title {
    color: #e74c3c;
}

.sr-pro-item p, .sr-con-item p {
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.sr-objection {
    color: var(--text-dim);
    font-style: italic;
    padding-left: 0.5rem;
    border-left: 2px solid rgba(200, 155, 60, 0.3);
}

.sr-references {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.sr-ref-title {
    font-weight: 600;
    color: var(--church-gold);
    margin-bottom: 0.5rem;
}

.sr-references ol {
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    line-height: 1.6;
}

.gc-console-dialog {
    background: #0d1b2a;
    border: 2px solid #9b59b6;
    border-radius: 10px;
    padding: 1.5rem;
    min-width: 520px;
    max-width: 700px;
    width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(155, 89, 182, 0.3);
}

.gc-console-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #9b59b6;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.gc-console-output {
    background: #080f1a;
    color: #c8d6e5;
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    line-height: 1.5;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #1e3a5f;
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
    max-height: 50vh;
    white-space: pre-wrap;
    word-break: break-word;
}

.gc-console-status {
    font-size: 0.8rem;
    color: #a0a0a0;
    margin: 0.75rem 0;
    padding: 0.4rem 0.6rem;
    background: #111d2e;
    border-radius: 4px;
    border-left: 3px solid #9b59b6;
}

.gc-console-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.gc-console-buttons .btn {
    padding: 0.4rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
}

.sr-references a {
    color: #5dade2;
    text-decoration: none;
}

.sr-references a:hover {
    color: var(--church-gold);
    text-decoration: underline;
}

.sr-tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sr-tut-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.sr-tut-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--church-gold);
    color: var(--bg-dark);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.sr-tut-step div {
    flex: 1;
}

@media (max-width: 768px) {
    .sr-two-col,
    .sr-four-col {
        grid-template-columns: 1fr;
    }
    .sr-progress-bar {
        flex-wrap: wrap;
    }
    .sr-prog-section {
        font-size: 0.55rem;
        padding: 0.2rem 0.3rem;
    }
}


.hp35-tile-grid {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    align-items: flex-start;
}

.hp35-tile-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.hp35-tile {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    min-width: 0;
}

.hp35-tile-calc {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    justify-content: center;
}

@media (max-width: 700px) {
    .hp35-tile-grid {
        flex-direction: column;
    }
}

.hp35-tile-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--church-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.hp35-body {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 2px solid #444;
    border-radius: 16px;
    padding: 20px 16px 24px;
    width: 320px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
}

.hp35-brand {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 8px 12px;
}

.hp35-hp-logo {
    font-size: 0.65rem;
    letter-spacing: 2px;
    color: #888;
    font-weight: 300;
    text-transform: uppercase;
}

.hp35-model {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ccc;
    font-style: italic;
}

.hp35-screen {
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 6px;
    padding: 12px 16px 10px;
    margin-bottom: 16px;
    position: relative;
    min-height: 48px;
}

.hp35-arc-indicator {
    position: absolute;
    top: 2px;
    left: 8px;
    font-size: 0.55rem;
    color: #ff3333;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.hp35-screen-value {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: #ff3333;
    text-align: right;
    text-shadow: 0 0 8px rgba(255,50,50,0.6);
    letter-spacing: 2px;
    min-height: 28px;
    overflow: hidden;
    white-space: nowrap;
}

.hp35-keys {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hp35-key-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.hp35-key {
    width: 54px;
    height: 36px;
    border: none;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp35-key:active {
    transform: translateY(1px);
    filter: brightness(0.85);
}

.hp35-key-digit {
    background: linear-gradient(180deg, #555, #3a3a3a);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.hp35-key-digit:hover {
    background: linear-gradient(180deg, #666, #4a4a4a);
}

.hp35-key-op {
    background: linear-gradient(180deg, #cc6600, #994d00);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.hp35-key-op:hover {
    background: linear-gradient(180deg, #dd7711, #aa5500);
}

.hp35-key-fn {
    background: linear-gradient(180deg, #2a4a6a, #1a3050);
    color: #ccdde8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    font-size: 0.68rem;
}

.hp35-key-fn:hover {
    background: linear-gradient(180deg, #3a5a7a, #2a4060);
}

.hp35-key-enter {
    width: 116px;
    background: linear-gradient(180deg, #2a4a6a, #1a3050);
    color: #ccdde8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    font-size: 0.72rem;
    letter-spacing: 1px;
}

.hp35-key-enter:hover {
    background: linear-gradient(180deg, #3a5a7a, #2a4060);
}

.hp35-stack-display {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hp35-stack-reg {
    background: #0a0e1a;
    border: 1px solid #2a2a3a;
    border-radius: 4px;
    padding: 5px 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #ff4444;
}

.hp35-reg-label {
    color: var(--text-secondary);
    font-weight: 600;
    margin-right: 8px;
}

.hp35-reg-value {
    color: #ff4444;
}


.hp35-stack-guide-body p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 6px;
}

.hp35-stack-guide-body strong {
    color: var(--text-primary);
}

.hp35-stack-diagram {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin: 8px 0;
}

.hp35-stack-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    background: #1a1f2e;
    border-radius: 4px;
    border-left: 3px solid var(--church-gold);
}

.hp35-sreg {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--church-gold);
    min-width: 18px;
}

.hp35-sdesc {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.hp35-stack-tips {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.hp35-tip-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--church-gold);
    margin-bottom: 4px;
}

.hp35-stack-tips p {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 4px;
}

.hp35-example {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    color: var(--text-primary);
    background: #1a1f2e;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 4px 0 8px;
}

.hp35-ekey {
    background: var(--church-gold);
    color: #1a1400;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
}

.hp35-tile-trace {
    max-height: none;
    overflow-y: visible;
}

.hp35-trace-area {
    padding: 2px 0;
}

.hp35-trace-entry {
    padding: 4px 10px;
    border-bottom: 1px solid rgba(45,55,72,0.4);
}

.hp35-trace-latest {
    background: rgba(233,69,96,0.08);
}

.hp35-trace-lambda {
    font-family: 'Courier New', monospace;
    font-size: 0.68rem;
    color: #88ccff;
    word-break: break-all;
    line-height: 1.3;
}

.hp35-trace-desc {
    font-size: 0.66rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

#abacusContainer, #slideruleContainer {
    flex: 1;
    overflow-y: auto;
}

.abacus-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    padding: 8px 0;
    align-items: start;
}

.abacus-tile {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    min-width: 0;
}

.abacus-tile-calc {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    justify-content: center;
}

.abacus-tile-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.abacus-tile-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--church-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.abacus-tile-trace {
    max-height: 300px;
    overflow-y: auto;
}

.abacus-frame {
    background: linear-gradient(145deg, #2a1a0a, #3a2510);
    border: 3px solid #8B7355;
    border-radius: 12px;
    padding: 16px 12px;
    width: 340px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
}

.abacus-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 4px 10px;
}

.abacus-title-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--church-gold);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.abacus-title-ns {
    font-size: 0.65rem;
    color: #8B7355;
    font-family: 'Courier New', monospace;
}

.abacus-readout {
    background: #0a0a0a;
    border: 2px solid #444;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    text-align: right;
}

.abacus-readout-value {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    color: var(--church-gold);
    text-shadow: 0 0 8px rgba(218,165,32,0.4);
    letter-spacing: 2px;
}

.abacus-rods-area {
    display: flex;
    gap: 2px;
    justify-content: center;
    padding: 4px 0;
}

.abacus-rod {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 24px;
    position: relative;
}

.abacus-rod::after {
    content: '';
    position: absolute;
    top: 18px;
    bottom: 0;
    width: 2px;
    background: #8B7355;
    z-index: 0;
}

.abacus-rod-label {
    font-size: 0.5rem;
    color: #8B7355;
    margin-bottom: 2px;
    font-family: 'Courier New', monospace;
    z-index: 1;
}

.abacus-heaven-zone {
    height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    z-index: 1;
}

.abacus-beam-bar {
    height: 4px;
    width: 100%;
    background: #8B7355;
    border-radius: 2px;
    z-index: 1;
}

.abacus-earth-zone {
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 2px;
    padding-top: 4px;
    z-index: 1;
}

.abacus-bead {
    width: 20px;
    height: 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 2;
    position: relative;
}

.abacus-heaven-bead {
    background: linear-gradient(180deg, #555, #333);
    border: 1px solid #666;
    margin-bottom: 24px;
}

.abacus-heaven-bead.active {
    background: linear-gradient(180deg, var(--church-gold), #b8860b);
    border-color: var(--church-gold);
    margin-bottom: 0;
    box-shadow: 0 0 8px rgba(218,165,32,0.5);
}

.abacus-earth-bead {
    background: linear-gradient(180deg, #555, #333);
    border: 1px solid #666;
}

.abacus-earth-bead.active {
    background: linear-gradient(180deg, var(--church-gold), #b8860b);
    border-color: var(--church-gold);
    box-shadow: 0 0 6px rgba(218,165,32,0.4);
}

.abacus-bead:hover {
    filter: brightness(1.3);
}

.abacus-controls {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.abacus-btn {
    padding: 6px 20px;
    background: linear-gradient(180deg, #8B7355, #6B5335);
    color: #fff;
    border: 1px solid #a08060;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.abacus-btn:hover {
    background: linear-gradient(180deg, #a08060, #8B7355);
}


.abacus-place-info {
    font-size: 0.68rem;
    color: #8B7355;
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    padding: 8px 10px;
    margin-top: 10px;
    text-align: center;
}


.abacus-trace-area {
    overflow-y: auto;
    padding: 2px 0;
    flex: 1;
}

.abacus-trace-entry {
    padding: 4px 10px;
    border-bottom: 1px solid rgba(45,55,72,0.4);
}

.abacus-trace-latest {
    background: rgba(139,115,85,0.1);
}

.abacus-trace-lambda {
    font-family: 'Courier New', monospace;
    font-size: 0.68rem;
    color: #cc9933;
    word-break: break-all;
    line-height: 1.3;
}

.abacus-trace-desc {
    font-size: 0.66rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.sliderule-tile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 8px 0;
    align-items: start;
}

.sliderule-tile {
    background: #0d1117;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    min-width: 0;
}

.sliderule-tile-calc {
    background: transparent;
    border: none;
    padding: 0;
}

.sliderule-tile-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.sliderule-tile-header {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--church-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.sliderule-tile-trace {
    max-height: 300px;
    overflow-y: auto;
}

.sliderule-body {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 2px solid #555;
    border-radius: 12px;
    padding: 16px 12px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 6px 24px rgba(0,0,0,0.5);
}

.sliderule-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 4px 10px;
}

.sliderule-title-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--church-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sliderule-title-ns {
    font-size: 0.65rem;
    color: #888;
    font-family: 'Courier New', monospace;
}

.sliderule-readout {
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 10px;
    text-align: center;
}

.sliderule-readout-value {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #33cc66;
    letter-spacing: 1px;
}

.sliderule-svg {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 8px;
}

.sliderule-lock-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(30, 20, 10, 0.92);
    border: 1px solid #cc9933;
    color: #cc9933;
    font-size: 0.72rem;
    font-family: monospace;
    padding: 6px 14px;
    border-radius: 6px;
    display: none;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
}

.sliderule-lock-msg.visible {
    display: block;
    animation: slideruleLockFade 2.2s ease forwards;
}

@keyframes slideruleLockFade {
    0% { opacity: 0; }
    8% { opacity: 1; }
    75% { opacity: 1; }
    100% { opacity: 0; }
}

.sliderule-instructions {
    font-size: 0.68rem;
    color: var(--text-secondary);
    text-align: center;
    padding: 4px 0;
}

.sliderule-presets {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 8px;
}

.sliderule-explanation {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(26, 45, 26, 0.5);
    border: 1px solid #3a5a3a;
    border-radius: 6px;
    font-size: 0.72rem;
    line-height: 1.55;
    color: var(--text-secondary);
}
.sliderule-expl-title {
    font-weight: 700;
    font-size: 0.78rem;
    color: #cc9933;
    margin-bottom: 6px;
}
.sliderule-expl-body {
    margin-bottom: 8px;
    color: #c8c8c8;
}
.sliderule-expl-scales {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sliderule-expl-scale {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    color: #88aacc;
    padding: 2px 0;
}
.sliderule-expl-layout {
    margin-top: 8px;
    font-size: 0.68rem;
    color: #99aa88;
    font-style: italic;
    border-top: 1px solid #3a5a3a;
    padding-top: 6px;
}
.sliderule-layout-ref {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-family: 'IBM Plex Mono', monospace;
    margin-bottom: 8px;
    padding: 4px 8px;
    background: rgba(40, 30, 15, 0.5);
    border: 1px solid #5a4a2a;
    border-radius: 4px;
    flex-wrap: wrap;
}
.sliderule-layout-label {
    color: #888;
    font-size: 0.62rem;
    text-transform: uppercase;
}
.sliderule-layout-scales {
    font-weight: 700;
    font-size: 0.72rem;
}
.sliderule-layout-sep {
    color: #555;
    margin: 0 2px;
}

.sliderule-scale-selector {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.sliderule-scale-btn {
    padding: 5px 10px;
    background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
    color: #999;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.sliderule-scale-btn .sliderule-scale-desc {
    font-size: 0.52rem;
    font-weight: 400;
    opacity: 0.7;
}

.sliderule-scale-btn:hover {
    color: #ccc;
    border-color: #888;
}

.sliderule-scale-btn.active {
    background: linear-gradient(180deg, #3a2a10, #2a1a05);
    color: var(--church-gold);
    border-color: var(--church-gold);
    box-shadow: 0 0 6px rgba(218,165,32,0.3);
}

.sliderule-preset-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.sliderule-preset-btn {
    padding: 4px 10px;
    background: linear-gradient(180deg, #333, #222);
    color: #ccc;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 0.68rem;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.15s;
}

.sliderule-preset-btn:hover {
    background: linear-gradient(180deg, #444, #333);
    color: var(--church-gold);
    border-color: var(--church-gold);
}

.sliderule-info-panel {
    width: 100%;
}

.sliderule-info-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    line-height: 1.5;
}

.sliderule-info-text em {
    color: var(--church-gold);
    font-style: italic;
}

.sliderule-trace-inline {
    overflow: hidden;
    max-height: 200px;
    display: flex;
    flex-direction: column;
}

.sliderule-trace-header {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--church-gold);
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sliderule-trace-area {
    overflow-y: auto;
    padding: 2px 0;
    flex: 1;
}

.sliderule-trace-entry {
    padding: 4px 10px;
    border-bottom: 1px solid rgba(45,55,72,0.4);
}

.sliderule-trace-latest {
    background: rgba(51,204,102,0.06);
}

.sliderule-trace-lambda {
    font-family: 'Courier New', monospace;
    font-size: 0.68rem;
    color: #33cc66;
    word-break: break-all;
    line-height: 1.3;
}

.sliderule-trace-desc {
    font-size: 0.66rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.sliderule-fp-body p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.sliderule-fp-body strong {
    color: var(--text-primary);
}

.sliderule-fp-diagram {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 10px 0;
}

.sliderule-fp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #1a1f2e;
    border-radius: 4px;
    font-size: 0.72rem;
}

.sliderule-fp-label {
    min-width: 70px;
    color: var(--church-gold);
    font-weight: 700;
}

.sliderule-fp-parts {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.sliderule-fp-sign {
    color: #ff6699;
    font-weight: 600;
}

.sliderule-fp-mant {
    color: #33cc66;
    font-weight: 600;
}

.sliderule-fp-exp {
    color: #4fc3f7;
    font-weight: 600;
}

.sliderule-fp-section {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.sliderule-fp-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--church-gold);
    margin-bottom: 4px;
}

@keyframes intro-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.pull-refresh-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 18px;
    z-index: 9999;
    transition: transform 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.pull-refresh-arrow {
    font-size: 1.2rem;
    color: var(--church-gold);
    transition: transform 0.1s ease;
    display: inline-block;
}

.pull-refresh-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.pull-refresh-indicator.ready .pull-refresh-text {
    color: var(--church-gold);
}

@keyframes pullSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-share-icon {
    font-size: 0.9rem;
    padding: 0.25rem 0.45rem;
    line-height: 1;
}

.share-link-dialog {
    max-width: 480px;
}

.share-link-desc {
    color: var(--text-secondary);
    font-size: 0.82rem;
    margin: 0 0 0.75rem;
}

.share-link-url-box {
    display: flex;
    gap: 6px;
    margin-bottom: 0.5rem;
}

.share-link-input {
    flex: 1;
    background: var(--bg-dark);
    color: var(--church-gold);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.45rem 0.6rem;
    font-family: monospace;
    font-size: 0.78rem;
    outline: none;
    min-width: 0;
}

.share-link-input:focus {
    border-color: var(--church-gold);
}

.share-link-copy {
    white-space: nowrap;
    padding: 0.45rem 1rem;
}

.share-link-status {
    font-size: 0.75rem;
    min-height: 1.2em;
    margin-bottom: 0.5rem;
}

.share-link-status.success {
    color: #33cc66;
}

.share-link-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.lump-tier-a-section {
    margin-top: 0.75rem;
    border-top: 1px solid rgba(251, 191, 36, 0.25);
    padding-top: 0.5rem;
}

.lump-tier-a-header {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--church-gold, #fbbf24);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem 0.35rem;
}

.lump-tier-a-header-sub {
    font-weight: 400;
    color: var(--text-secondary, #888);
    text-transform: none;
    letter-spacing: 0;
}

.lump-tier-a-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    background: rgba(251, 191, 36, 0.04);
    margin-bottom: 2px;
    font-size: 0.72rem;
}

.lump-tier-a-name {
    font-weight: 700;
    color: var(--text-primary, #e8e0c8);
    min-width: 4.5rem;
}

.lump-tier-a-slot {
    font-family: monospace;
    font-size: 0.68rem;
    color: var(--text-secondary, #888);
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    padding: 0 0.3rem;
}

.lump-tier-a-status {
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 3px;
    padding: 0 0.35rem;
    white-space: nowrap;
}

.lump-tier-a-status-present {
    background: rgba(251, 191, 36, 0.14);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.35);
}

.lump-tier-a-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(232, 224, 200, 0.4);
    text-underline-offset: 2px;
}

.lump-tier-a-link:hover {
    color: var(--church-gold, #fbbf24);
    text-decoration-color: var(--church-gold, #fbbf24);
}

.lump-tier-a-milestone {
    font-size: 0.68rem;
    color: var(--text-secondary, #888);
    flex: 1;
}

.lump-tier-a-test-id {
    font-family: monospace;
    font-size: 0.66rem;
    color: rgba(251, 191, 36, 0.7);
    background: rgba(251, 191, 36, 0.07);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 3px;
    padding: 0 0.35rem;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
}
.lump-tier-a-test-id:hover {
    color: rgba(251, 191, 36, 1);
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.5);
    text-decoration: underline;
}

.sr-instr-tip {
    position: relative;
    cursor: help;
    color: var(--church-gold);
    font-weight: bold;
    border-bottom: 1px dotted rgba(200, 155, 60, 0.4);
}

.sr-instr-tip[data-tooltip]::after {
    bottom: auto;
    top: calc(100% + 6px);
    left: 0;
    transform: none;
    text-align: left;
    max-width: 320px;
    white-space: normal;
    font-weight: normal;
    line-height: 1.4;
}

/* Pseudo-instruction mnemonic tooltip — used in the Assembly Syntax Reference
   panel to annotate directive-style mnemonics like .petname.
   Positions the tooltip below the element (consistent with sr-instr-tip). */
.church-tooltip {
    position: relative;
    cursor: help;
    color: var(--church-gold);
    font-weight: bold;
    font-family: inherit;
    border-bottom: 1px dotted rgba(200, 155, 60, 0.4);
}

.church-tooltip[data-tooltip]::after {
    bottom: auto;
    top: calc(100% + 6px);
    left: 0;
    transform: none;
    text-align: left;
    max-width: 340px;
    white-space: normal;
    font-weight: normal;
    line-height: 1.4;
}

/* ── Live Lump Banner ──────────────────────────────────────────────────────── */

.live-lump-banner {
    background: rgba(22, 38, 28, 0.92);
    border-bottom: 2px solid rgba(125, 211, 168, 0.28);
    margin: 0;
    padding: 0.7rem 1.1rem 0.65rem;
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 1.4rem;
    row-gap: 0;
    align-items: start;
}

.live-lump-banner-empty {
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    color: var(--text-secondary, #666);
    font-size: 0.72rem;
    font-style: italic;
    text-align: center;
    padding: 0.5rem 1rem;
    margin: 0;
}

.live-lump-banner-left {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
}

.live-lump-banner-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    flex-shrink: 0;
}

.live-lump-banner-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #7dd3a8;
    text-transform: uppercase;
    opacity: 0.8;
}

.live-lump-abstr-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #e8ffe4;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-lump-banner-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem 0.75rem;
    align-items: center;
    margin-top: 0.05rem;
}

.live-lump-field {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.71rem;
}

.live-lump-field-label {
    color: var(--text-secondary, #888);
    font-size: 0.65rem;
}

.live-lump-field-val {
    color: var(--text-primary, #ddd);
    font-size: 0.72rem;
}

.live-lump-banner-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.7rem;
    align-items: center;
    margin-bottom: 0.45rem;
}

.live-lump-mono {
    font-family: monospace;
}

.live-lump-seal {
    display: inline-block;
    font-size: 0.67rem;
    font-weight: 700;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.live-lump-seal-ok {
    color: #7dd3a8;
    background: rgba(125, 211, 168, 0.12);
    border: 1px solid rgba(125, 211, 168, 0.3);
}

.live-lump-seal-fail {
    color: #e05555;
    background: rgba(224, 85, 85, 0.12);
    border: 1px solid rgba(224, 85, 85, 0.3);
}

.live-lump-warnings {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.70rem;
    color: #e0a055;
    background: rgba(224, 160, 85, 0.10);
    border: 1px solid rgba(224, 160, 85, 0.28);
    border-radius: 3px;
    padding: 0.18rem 0.5rem;
    margin-top: 0.25rem;
    line-height: 1.4;
    cursor: help;
}

.live-lump-warnings-text {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.live-lump-warn-badge {
    flex-shrink: 0;
    font-size: 0.63rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.03em;
    padding: 0.05rem 0.45rem;
    border-radius: 8px;
    background: rgba(224, 160, 85, 0.22);
    border: 1px solid rgba(224, 160, 85, 0.45);
    color: #f0ba70;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.13s, border-color 0.13s;
}

.live-lump-warn-badge:hover {
    background: rgba(224, 160, 85, 0.38);
    border-color: rgba(224, 160, 85, 0.7);
}

.warn-popover {
    position: absolute;
    z-index: 9999;
    background: #0e0e1e;
    border: 1px solid rgba(224, 160, 85, 0.45);
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65);
    min-width: 200px;
    max-width: 380px;
    font-family: inherit;
    font-size: 0.72rem;
}

.warn-popover[hidden] {
    display: none;
}

.warn-popover-title {
    padding: 6px 12px 5px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #f0ba70;
    border-bottom: 1px solid rgba(224, 160, 85, 0.25);
    background: rgba(224, 160, 85, 0.08);
    border-radius: 5px 5px 0 0;
}

.warn-popover-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.warn-popover-list li {
    padding: 5px 12px;
    font-size: 0.72rem;
    color: #e0a055;
    line-height: 1.5;
    border-bottom: 1px solid rgba(224, 160, 85, 0.1);
}

.warn-popover-list li:last-child {
    border-bottom: none;
}

.live-lump-warnings[data-tooltip]::after {
    bottom: auto;
    top: calc(100% + 6px);
    left: 0;
    transform: none;
    white-space: pre-line;
    text-align: left;
    max-width: 420px;
    font-size: 0.72rem;
    line-height: 1.5;
    color: #e0a055;
    border-color: rgba(224, 160, 85, 0.5);
}

.live-lump-banner-save-row {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(125, 211, 168, 0.12);
}

.live-lump-input {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    color: var(--text-primary, #ddd);
    font-size: 0.78rem;
    padding: 0.25rem 0.5rem;
    flex: 1;
    min-width: 0;
    height: 1.9rem;
}

.live-lump-input:focus {
    outline: none;
    border-color: rgba(125, 211, 168, 0.5);
    background: rgba(255,255,255,0.09);
}

.live-lump-version-input {
    flex: 0 0 9rem;
}

.live-lump-save-btn {
    background: rgba(125, 211, 168, 0.15);
    border: 1px solid rgba(125, 211, 168, 0.4);
    border-radius: 3px;
    color: #7dd3a8;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.8rem;
    white-space: nowrap;
    height: 1.9rem;
    transition: background 0.15s, border-color 0.15s;
}

.live-lump-save-btn:hover {
    background: rgba(125, 211, 168, 0.28);
    border-color: rgba(125, 211, 168, 0.65);
}

/* ── Patch-toast save link ──────────────────────────────────────────────────── */

.patch-toast-save-link {
    display: block;
    margin: 0.45rem 0.6rem 0.3rem;
    font-size: 0.75rem;
    color: #7dd3a8;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.patch-toast-save-link:hover {
    text-decoration: underline;
    color: #a3e6c5;
}

/* ── LUMP Audit panel ───────────────────────────────────────────────────── */

.lump-audit-loading {
    color: var(--text-secondary, #8888aa);
    font-size: 0.73rem;
    font-style: italic;
    padding: 0.35rem 0.5rem;
}

.lump-audit-panel {
    border-radius: 4px;
    border: 1px solid rgba(100, 160, 255, 0.15);
    background: rgba(0, 0, 0, 0.18);
    margin: 0.45rem 0 0.25rem;
    font-size: 0.73rem;
    overflow: hidden;
}

.lump-audit-panel-pass {
    border-color: rgba(100, 210, 120, 0.3);
    background: rgba(60, 160, 80, 0.07);
}
.lump-audit-panel-warn {
    border-color: rgba(224, 160, 85, 0.4);
    background: rgba(180, 120, 40, 0.08);
}
.lump-audit-panel-error {
    border-color: rgba(220, 80, 80, 0.4);
    background: rgba(160, 40, 40, 0.09);
}

.lump-audit-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.65rem;
    font-weight: 600;
    font-size: 0.73rem;
    user-select: none;
}

.lump-audit-panel-pass  .lump-audit-header { color: #6dd89a; background: rgba(60, 160, 80, 0.1); }
.lump-audit-panel-warn  .lump-audit-header { color: #f0ba70; background: rgba(180, 120, 40, 0.12); }
.lump-audit-panel-error .lump-audit-header { color: #f08070; background: rgba(160, 40, 40, 0.14); }

.lump-audit-icon {
    font-size: 0.85rem;
    line-height: 1;
    flex-shrink: 0;
}

.lump-audit-summary {
    flex: 1;
    min-width: 0;
}

.lump-audit-body {
    padding: 0.3rem 0.2rem 0.35rem;
}

.lump-audit-row {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    padding: 0.18rem 0.55rem;
    border-bottom: 1px solid rgba(100, 160, 255, 0.05);
    font-size: 0.71rem;
    line-height: 1.5;
}

.lump-audit-row:last-child { border-bottom: none; }

.lump-audit-row-pass   { color: #8bd4a8; }
.lump-audit-row-warn   { color: #e0a055; }
.lump-audit-row-error  { color: #e07070; }

.lump-audit-rule-id {
    font-family: 'Courier New', monospace;
    font-size: 0.66rem;
    opacity: 0.75;
    white-space: nowrap;
    flex-shrink: 0;
    width: 2.8rem;
}

.lump-audit-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.lump-audit-msg {
    font-weight: 600;
}

.lump-audit-detail {
    color: var(--text-secondary, #9090b0);
    font-size: 0.68rem;
    line-height: 1.4;
}
.lump-audit-row-warn  .lump-audit-detail { color: #c08840; }
.lump-audit-row-error .lump-audit-detail { color: #b05050; }

/* Per-violation sub-rows inside an RCI error result */
.lump-audit-violation-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    padding: 0.1rem 0.55rem 0.1rem 2.5rem;
    border-bottom: none;
    font-size: 0.68rem;
    color: #c06060;
}

.lump-audit-violation-bullet {
    flex-shrink: 0;
    opacity: 0.7;
}

.lump-audit-violation-msg {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.66rem;
    color: #b05858;
}

.lump-audit-jump-btn {
    flex-shrink: 0;
    margin-left: 4px;
    padding: 1px 6px;
    font-size: 0.66rem;
    line-height: 1.5;
    cursor: pointer;
    background: rgba(74, 56, 0, 0.7);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 3px;
    font-family: inherit;
    vertical-align: middle;
    white-space: nowrap;
    transition: background 0.12s, border-color 0.12s;
}

.lump-audit-jump-btn:hover {
    background: rgba(100, 80, 0, 0.85);
    border-color: #ffd700;
    color: #ffe94d;
}

/* Audit button in action bar */
.lump-audit-btn {
    background: rgba(80, 120, 200, 0.12);
    color: #88aaee;
    border: 1px solid rgba(80, 120, 220, 0.3);
    font-size: 0.72rem;
    padding: 4px 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.lump-audit-btn:hover {
    background: rgba(80, 120, 220, 0.25);
    color: #aaccff;
    border-color: rgba(100, 150, 240, 0.5);
}
.lump-audit-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

/* Inline audit section inside text-editor action row */
.lump-audit-inline-wrap {
    width: 100%;
    margin-top: 0.3rem;
}

/* ═══════════════════════════════════════════════════════
   SOURCE LIBRARY — Abstractions view sub-tab
   ═══════════════════════════════════════════════════════ */

/* Sub-tab bar inside the Abstractions view */
.abs-subtabbar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid rgba(180, 140, 60, 0.3);
    background: rgba(0,0,0,0.18);
    padding: 0 0.5rem;
    flex-shrink: 0;
}

.abs-subtab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary, #9090b0);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.5rem 1.1rem 0.4rem;
    cursor: pointer;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    letter-spacing: 0.01em;
}
.abs-subtab:hover {
    color: #d4aa50;
    border-bottom-color: rgba(180,140,60,0.4);
}
.abs-subtab.abs-subtab-active {
    color: #d4aa50;
    border-bottom-color: #d4aa50;
    background: rgba(180,140,60,0.06);
}

/* Sub-panels that fill the remaining view height */
.abs-subpanel {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Make sure #abstractions is a flex column so subtabbar + subpanel fill properly */
#abstractions.view.active {
    display: flex;
    flex-direction: column;
}

/* ── Toolbar (search bar) ── */
.sl-toolbar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.55rem 1rem 0.45rem;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.sl-search {
    flex: 1 1 0;
    min-width: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 4px;
    color: #ddd;
    font-size: 0.82rem;
    padding: 0.3rem 0.6rem;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}
.sl-search:focus {
    border-color: rgba(180,140,60,0.55);
    background: rgba(255,255,255,0.09);
}
.sl-search::placeholder { color: #666; }

.sl-toolbar-hint {
    color: #666;
    font-size: 0.73rem;
    white-space: nowrap;
    flex-shrink: 0;
}
@media (max-width: 600px) { .sl-toolbar-hint { display: none; } }

/* ── Scrollable content area ── */
.sl-content {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 0.6rem 0.8rem 1.5rem;
}

.sl-loading, .sl-placeholder {
    text-align: center;
    color: #666;
    font-size: 0.82rem;
    padding: 2rem 1rem;
}

/* ── Language group ── */
.sl-group {
    margin-bottom: 1.4rem;
}

.sl-group-header {
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #b8903a;
    border-bottom: 1px solid rgba(180,140,60,0.25);
    padding: 0.15rem 0.1rem 0.3rem;
    margin-bottom: 0.5rem;
}

/* ── Individual card ── */
.sl-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    margin-bottom: 0.35rem;
    overflow: hidden;
    transition: border-color 0.15s;
}
.sl-card:hover {
    border-color: rgba(180,140,60,0.35);
}

.sl-card-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.38rem 0.7rem 0.38rem 0.8rem;
    flex-wrap: wrap;
}

.sl-card-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #d0d0e8;
    flex: 1 1 auto;
    min-width: 0;
}

.sl-method-count {
    font-size: 0.71rem;
    color: #666;
    flex-shrink: 0;
}

/* ── Language badges ── */
.sl-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid transparent;
}
.sl-badge-js  { background: rgba(247,220,64,0.13); color: #f7dc40; border-color: rgba(247,220,64,0.3); }
.sl-badge-asm { background: rgba(120,200,120,0.13); color: #70c870; border-color: rgba(100,200,100,0.3); }
.sl-badge-hs  { background: rgba(120,130,220,0.13); color: #9898e8; border-color: rgba(120,130,220,0.3); }
.sl-badge-sym { background: rgba(200,120,80,0.13);  color: #e08858; border-color: rgba(200,120,80,0.3); }
.sl-badge-en  { background: rgba(80,190,200,0.13);  color: #58c8d0; border-color: rgba(80,190,200,0.3); }
.sl-badge-lc  { background: rgba(180,100,220,0.13); color: #c070e8; border-color: rgba(180,100,220,0.3); }

/* ── Card action buttons ── */
.sl-card-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

.sl-load-btn,
.sl-toggle-btn {
    font-size: 0.7rem;
    padding: 2px 9px;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    white-space: nowrap;
}
.sl-load-btn {
    background: rgba(180,140,60,0.14);
    color: #c8a040;
    border-color: rgba(180,140,60,0.35);
}
.sl-load-btn:hover {
    background: rgba(180,140,60,0.28);
    color: #e8c060;
    border-color: rgba(180,140,60,0.6);
}
.sl-toggle-btn {
    background: rgba(255,255,255,0.05);
    color: #8888a8;
    border-color: rgba(255,255,255,0.12);
}
.sl-toggle-btn:hover {
    background: rgba(255,255,255,0.10);
    color: #aaaace;
}

/* ── Read-only source pane ── */
.sl-source-pre {
    font-family: 'Consolas', 'Fira Code', 'Source Code Pro', monospace;
    font-size: 0.73rem;
    line-height: 1.55;
    color: #b8c8d8;
    background: rgba(0,0,0,0.35);
    border-top: 1px solid rgba(255,255,255,0.07);
    padding: 0.7rem 1rem;
    margin: 0;
    white-space: pre;
    overflow-x: auto;
    max-height: 420px;
    overflow-y: auto;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .sl-card-header { gap: 0.35rem; padding: 0.45rem 0.55rem; }
    .sl-card-name   { font-size: 0.78rem; }
    .sl-load-btn,
    .sl-toggle-btn  { font-size: 0.67rem; padding: 2px 7px; }
    .sl-source-pre  { font-size: 0.68rem; }
}

/* ── Boot.NS Binary Decoder view (abs-nsdecoder-*) ───────────────────────── */
.abs-nsdecoder-placeholder {
    padding: 24px 18px;
    color: var(--text-secondary, #6b7280);
    font-size: 0.82rem;
    font-style: italic;
    line-height: 1.6;
}

.abs-nsdecoder-section {
    padding: 10px 14px 12px;
    border-bottom: 1px solid rgba(100, 160, 255, 0.08);
}

.abs-nsdecoder-heading {
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--church-gold, #c8a84b);
    margin-bottom: 8px;
}

.abs-nsdecoder-boot-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.abs-nsdecoder-boot-table td {
    padding: 5px 10px;
    border-bottom: 1px solid rgba(100, 160, 255, 0.07);
    vertical-align: middle;
}

.abs-nsdecoder-boot-table tr:last-child td {
    border-bottom: none;
}

.abs-nsdecoder-step {
    color: var(--church-gold, #c8a84b);
    font-weight: 700;
    font-size: 0.72rem;
    min-width: 52px;
    white-space: nowrap;
}

.abs-nsdecoder-op {
    font-family: 'Courier New', monospace;
    color: #a0c4ff;
    font-size: 0.75rem;
    min-width: 80px;
    white-space: nowrap;
}

.abs-nsdecoder-desc {
    font-family: 'Courier New', monospace;
    color: #6b7280;
    font-size: 0.73rem;
    white-space: nowrap;
}

.abs-nsdecoder-name {
    color: #e2e8f0;
    font-size: 0.76rem;
}

.abs-nsdecoder-badge-thread {
    display: inline-block;
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(100, 200, 255, 0.14);
    color: #7effea;
    border: 1px solid rgba(100, 200, 255, 0.28);
    vertical-align: middle;
    margin-left: 4px;
}

.abs-nsdecoder-badge-boot {
    display: inline-block;
    font-size: 0.72rem;
    padding: 1px 5px;
    border-radius: 8px;
    background: rgba(200, 168, 75, 0.16);
    color: var(--church-gold, #c8a84b);
    border: 1px solid rgba(200, 168, 75, 0.32);
    vertical-align: middle;
    margin-right: 3px;
}

.abs-nsdecoder-table-wrap {
    overflow-x: auto;
}

.abs-nsdecoder-ns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(100, 160, 255, 0.10);
    border-radius: 4px;
    overflow: hidden;
}

.abs-nsdecoder-ns-table th {
    padding: 0.22rem 0.5rem;
    text-align: left;
    font-size: 0.62rem;
    color: var(--church-gold, #c8a84b);
    font-weight: 600;
    border-bottom: 1px solid rgba(100, 160, 255, 0.15);
    background: rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    font-family: inherit;
}

.abs-nsdecoder-ns-table td {
    padding: 0.18rem 0.5rem;
    border-bottom: 1px solid rgba(100, 160, 255, 0.05);
    white-space: nowrap;
    vertical-align: middle;
}

.abs-nsdecoder-ns-table tr:last-child td {
    border-bottom: none;
}

.abs-nsdecoder-ns-row-self td {
    background: rgba(200, 168, 75, 0.06);
}

.abs-nsdecoder-ns-row-boot td {
    background: rgba(100, 200, 255, 0.05);
}

.abs-nsdecoder-slot {
    color: var(--church-gold, #c8a84b);
    text-align: right;
    min-width: 2rem;
}

.abs-nsdecoder-name-cell {
    color: #c8d4e8;
    min-width: 120px;
    font-family: inherit;
}

.abs-nsdecoder-hint {
    font-size: 0.62rem;
    color: #4b5563;
    margin: -4px 0 6px;
    font-style: italic;
}

.abs-nsdecoder-word {
    color: rgba(206, 145, 120, 0.90);
    font-family: 'Courier New', monospace;
    font-size: 0.69rem;
    cursor: help;
    white-space: nowrap;
    border-bottom: 1px dashed rgba(206, 145, 120, 0.25);
    padding-bottom: 1px;
}

.abs-nsdecoder-word:hover {
    color: #ffb07a;
    background: rgba(206, 145, 120, 0.08);
    border-bottom-color: rgba(206, 145, 120, 0.55);
}

.abs-nsdecoder-word-res {
    color: #374151;
}

.abs-nsdecoder-word-res:hover {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.08);
    border-bottom-color: rgba(107, 114, 128, 0.35);
}

/* ── Word-cell decode popup ───────────────────────────────────────────────── */
.abs-nsdecoder-wordtip {
    position: fixed;
    z-index: 9999;
    background: #111827;
    border: 1px solid rgba(200, 168, 75, 0.35);
    border-radius: 6px;
    padding: 8px 12px 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    color: #c8d4e8;
    min-width: 210px;
    max-width: 300px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.55);
    pointer-events: none;
}

.abs-nsdecoder-wordtip .nsdtip-hdr {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--church-gold, #c8a84b);
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(200, 168, 75, 0.18);
}

.abs-nsdecoder-wordtip .nsdtip-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
    border-bottom: 1px solid rgba(100, 160, 255, 0.05);
}

.abs-nsdecoder-wordtip .nsdtip-row:last-of-type {
    border-bottom: none;
}

.abs-nsdecoder-wordtip .nsdtip-row span:first-child {
    color: #6b7280;
    flex-shrink: 0;
}

.abs-nsdecoder-wordtip .nsdtip-row span:last-child {
    color: rgba(206, 145, 120, 0.95);
    text-align: right;
}

.abs-nsdecoder-wordtip .nsdtip-note {
    margin-top: 6px;
    font-size: 0.62rem;
    color: #4b5563;
    font-style: italic;
    line-height: 1.45;
    font-family: inherit;
}

.abs-nsdecoder-empty {
    color: #4b5563;
    font-style: italic;
}

/* Audit warning banner shown when save is allowed despite warnings */
.lump-audit-warn-banner {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    background: rgba(180, 120, 40, 0.14);
    border: 1px solid rgba(224, 160, 85, 0.35);
    border-radius: 4px;
    color: #e0a055;
    font-size: 0.71rem;
    margin-top: 0.3rem;
}


/* ── Load into Sim button in lump action bar ─────────────────────────────── */
.lump-loadsim-btn {
    background: rgba(80, 160, 80, 0.14);
    color: #7ec97e;
    border: 1px solid rgba(80, 180, 80, 0.3);
    font-size: 0.72rem;
    padding: 4px 13px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.lump-loadsim-btn:hover:not(:disabled) {
    background: rgba(80, 200, 80, 0.26);
    color: #a0e0a0;
    border-color: rgba(100, 220, 100, 0.5);
}
.lump-loadsim-btn:disabled {
    opacity: 0.5;
    cursor: default;
}


/* ── LUMP Repository x/y health counter ─────────────────────────────────── */
.lump-repo-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: #7ec8a4;
    background: rgba(126, 200, 164, 0.12);
    border: 1px solid rgba(126, 200, 164, 0.28);
    border-radius: 10px;
    padding: 1px 7px;
    margin-left: 7px;
    letter-spacing: 0.03em;
    vertical-align: middle;
    display: inline-block;
    line-height: 1.5;
}
.lump-repo-count:empty {
    display: none;
}
.lump-repo-count-warn {
    color: #e8b84b;
    background: rgba(232, 184, 75, 0.12);
    border-color: rgba(232, 184, 75, 0.28);
}
