/* ============================================================
   Signal Forge — SOC console theme
   ============================================================ */
:root {
  --bg: #0d1216;
  --bg2: #10171d;
  --panel: #151d24;
  --panel2: #1a242d;
  --line: #24313c;
  --line2: #2e3e4b;
  --fg: #d7e1e8;
  --fg-dim: #8fa1ad;
  --fg-faint: #64747f;
  --acc: #22d3ee;        /* cyan — interactive */
  --acc2: #2dd4bf;       /* teal */
  --acc-bg: rgba(34, 211, 238, 0.10);
  --warn: #fbbf24;       /* amber — warnings */
  --warn-bg: rgba(251, 191, 36, 0.10);
  --bad: #f87171;        /* red — errors / high-risk only */
  --bad-bg: rgba(248, 113, 113, 0.10);
  --ok: #4ade80;
  --ok-bg: rgba(74, 222, 128, 0.10);
  --mono: "Cascadia Code", Consolas, "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  --sans: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --rad: 8px;
  --fs: 14px;
  --fs-sm: 12.5px;
  --fs-xs: 11.5px;
  --grid-tex:
    linear-gradient(rgba(140, 180, 200, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 180, 200, 0.028) 1px, transparent 1px);
}
body[data-theme="dim"] {
  --bg: #171d23; --bg2: #1b232a; --panel: #212b33; --panel2: #27333d;
  --line: #32414d; --line2: #3d4f5d; --fg: #dde5eb; --fg-dim: #9dafba; --fg-faint: #77878f;
}
body[data-theme="contrast"] {
  --bg: #000; --bg2: #060606; --panel: #0c0c0c; --panel2: #161616;
  --line: #4a4a4a; --line2: #666; --fg: #fff; --fg-dim: #d0d0d0; --fg-faint: #a8a8a8;
  --acc: #4ff2ff; --acc2: #52ffd8; --warn: #ffd54a; --bad: #ff8a8a; --ok: #7dff9f;
  --grid-tex: none;
}
body[data-textsize="sm"] { --fs: 12.5px; --fs-sm: 11.5px; --fs-xs: 10.5px; }
body[data-textsize="lg"] { --fs: 15.5px; --fs-sm: 14px; --fs-xs: 12.5px; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: var(--fs);
  line-height: 1.45;
}
body::before { /* subtle grid texture */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: var(--grid-tex); background-size: 28px 28px;
}
::selection { background: rgba(34, 211, 238, 0.28); }

/* Focus visibility */
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 4px; }
body[data-theme="contrast"] :focus-visible { outline-width: 3px; }
.skip-link { position: fixed; left: 8px; top: -50px; z-index: 300; background: var(--acc); color: #04252b; padding: 8px 14px; border-radius: 6px; font-weight: 600; transition: top .15s; }
.skip-link:focus { top: 8px; }

/* ============ App grid ============ */
#appgrid {
  position: relative; z-index: 1;
  display: grid; height: 100vh;
  grid-template-columns: 232px 1fr auto;
  grid-template-rows: 52px 1fr 30px;
  grid-template-areas:
    "side top top"
    "side main panel"
    "side status status";
}
@media (max-width: 1000px) {
  #appgrid { grid-template-columns: 0 1fr auto; }
  #sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 120; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 4px 0 24px rgba(0,0,0,.5); }
  body.nav-open #sidebar { transform: none; }
}
@media (max-width: 760px) {
  #rightpanel { position: fixed; right: 0; top: 52px; bottom: 30px; z-index: 110; box-shadow: -6px 0 24px rgba(0,0,0,.5); }
  .privacy-badge span:last-child { display: none; }
  .gs-label { display: none; }
}

/* ============ Sidebar ============ */
#sidebar { grid-area: side; background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; gap: 10px; align-items: center; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { display: block; font-weight: 700; letter-spacing: .04em; font-size: 15px; }
.brand-sub { display: block; font-size: var(--fs-xs); color: var(--fg-faint); letter-spacing: .08em; text-transform: uppercase; }
#navlist { list-style: none; margin: 8px 0; padding: 0 8px; flex: 1; }
#navlist a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 1px 0;
  color: var(--fg-dim); text-decoration: none; border-radius: 6px; font-size: var(--fs-sm); font-weight: 500;
  border: 1px solid transparent;
}
#navlist a:hover { color: var(--fg); background: var(--panel); }
#navlist a[aria-current="page"] { color: var(--acc); background: var(--acc-bg); border-color: rgba(34,211,238,.25); }
.nav-ico { width: 20px; text-align: center; flex: none; font-size: 14px; opacity: .9; }
.sidebar-foot { padding: 10px 14px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--fg-faint); display: flex; gap: 7px; align-items: center; }

/* ============ Top bar ============ */
#topbar { grid-area: top; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--bg2); border-bottom: 1px solid var(--line); }
#menu-btn { display: none; }
@media (max-width: 1000px) { #menu-btn { display: inline-flex; } }
#crumb { font-weight: 600; font-size: var(--fs-sm); color: var(--fg-dim); white-space: nowrap; }
#global-search {
  flex: 1; max-width: 460px; display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 7px;
  color: var(--fg-faint); padding: 6px 10px; font-size: var(--fs-sm); cursor: pointer; font-family: inherit;
}
#global-search:hover { border-color: var(--line2); color: var(--fg-dim); }
.gs-icon { font-size: 15px; }
.gs-label { flex: 1; text-align: left; }
kbd { font-family: var(--mono); font-size: 10.5px; background: var(--panel2); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; color: var(--fg-dim); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.privacy-badge { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-xs); color: var(--acc2); background: rgba(45,212,191,.08); border: 1px solid rgba(45,212,191,.3); padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.local-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc2); box-shadow: 0 0 6px var(--acc2); flex: none; animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .local-dot { animation: none; } * { transition: none !important; } }

.icon-btn { background: var(--panel); border: 1px solid var(--line); color: var(--fg-dim); width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { color: var(--acc); border-color: var(--line2); }

/* ============ Main ============ */
#main { grid-area: main; overflow-y: auto; padding: 18px 20px 30px; scroll-behavior: smooth; }
#main:focus { outline: none; }

/* ============ Right panel ============ */
#rightpanel { grid-area: panel; width: 300px; background: var(--bg2); border-left: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; }
.rp-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rp-head h2 { margin: 0; font-size: 14px; }
.rp-sec { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.rp-sec h3 { margin: 0 0 8px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--fg-faint); }
.rp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rp-list li { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font-size: var(--fs-xs); }
.rp-list .ev-meta { color: var(--fg-faint); display: flex; justify-content: space-between; margin-top: 3px; }
.rp-list .ev-val { font-family: var(--mono); word-break: break-all; }
.rp-notes { flex: 1; display: flex; flex-direction: column; border-bottom: none; }
#rp-notes-ta { flex: 1; min-height: 140px; resize: none; }

/* ============ Status bar ============ */
#statusbar { grid-area: status; display: flex; align-items: center; gap: 18px; padding: 0 14px; background: var(--bg2); border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--fg-faint); font-family: var(--mono); overflow: hidden; white-space: nowrap; }
.sb-item b { color: var(--fg-dim); font-weight: 600; }
.sb-local { color: var(--acc2); display: inline-flex; gap: 6px; align-items: center; }
.sb-clock { margin-left: auto; }

/* ============ Generic components ============ */
h1.page-title { font-size: 20px; margin: 0 0 2px; letter-spacing: .01em; }
.page-sub { color: var(--fg-dim); font-size: var(--fs-sm); margin: 0 0 16px; max-width: 860px; }
.muted { color: var(--fg-dim); } .faint { color: var(--fg-faint); }
.small { font-size: var(--fs-xs); }
.mono { font-family: var(--mono); }
.wrap-any { word-break: break-all; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--rad); padding: 14px 16px; }
.card h2, .card h3 { margin: 0 0 10px; font-size: 14px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-title-row h2, .card-title-row h3 { margin: 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-side { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid-side { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-tight { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grow { flex: 1; }

button, .btn { font-family: inherit; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--panel2); color: var(--fg); border: 1px solid var(--line2);
  border-radius: 6px; padding: 6px 12px; font-size: var(--fs-sm); font-weight: 500;
  transition: border-color .12s, background .12s, color .12s;
}
.btn:hover { border-color: var(--acc); color: var(--acc); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line2); color: var(--fg); }
.btn-acc { background: rgba(34,211,238,.14); border-color: rgba(34,211,238,.45); color: var(--acc); }
.btn-acc:hover { background: rgba(34,211,238,.22); }
.btn-danger { color: var(--bad); border-color: rgba(248,113,113,.4); }
.btn-danger:hover { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); }
.btn-sm { padding: 3px 8px; font-size: var(--fs-xs); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--fg-dim); }
.btn-ghost:hover { color: var(--acc); border-color: transparent; }

input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="datetime-local"], select, textarea {
  background: var(--bg); color: var(--fg); border: 1px solid var(--line2); border-radius: 6px;
  padding: 6px 9px; font-size: var(--fs-sm); font-family: inherit; max-width: 100%;
}
textarea { font-family: var(--mono); line-height: 1.5; width: 100%; resize: vertical; }
textarea.ta-main { min-height: 170px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acc); outline-offset: 0; border-color: transparent; }
label.lbl { font-size: var(--fs-xs); color: var(--fg-dim); display: inline-flex; gap: 6px; align-items: center; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; margin: 0; }
legend { font-size: var(--fs-xs); color: var(--fg-faint); padding: 0 5px; }

.check { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-sm); color: var(--fg-dim); cursor: pointer; }
.check input { accent-color: var(--acc); width: 15px; height: 15px; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs [role="tab"] {
  background: none; border: none; border-bottom: 2px solid transparent; color: var(--fg-dim);
  padding: 8px 13px; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; white-space: nowrap; font-family: inherit;
}
.tabs [role="tab"]:hover { color: var(--fg); }
.tabs [role="tab"][aria-selected="true"] { color: var(--acc); border-bottom-color: var(--acc); }

/* Badges / pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); border-radius: 20px; padding: 2px 9px; border: 1px solid var(--line2); color: var(--fg-dim); background: var(--panel2); white-space: nowrap; }
.pill-acc { color: var(--acc); border-color: rgba(34,211,238,.4); background: var(--acc-bg); }
.pill-ok { color: var(--ok); border-color: rgba(74,222,128,.4); background: var(--ok-bg); }
.pill-warn { color: var(--warn); border-color: rgba(251,191,36,.4); background: var(--warn-bg); }
.pill-bad { color: var(--bad); border-color: rgba(248,113,113,.4); background: var(--bad-bg); }
.pill-teal { color: var(--acc2); border-color: rgba(45,212,191,.4); background: rgba(45,212,191,.08); }

/* Callouts */
.note { border: 1px solid var(--line); border-left: 3px solid var(--acc); background: var(--panel2); border-radius: 6px; padding: 9px 12px; font-size: var(--fs-sm); color: var(--fg-dim); }
.note-warn { border-left-color: var(--warn); }
.note-bad { border-left-color: var(--bad); }
.note-ok { border-left-color: var(--ok); }

/* Tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.tbl th { text-align: left; padding: 7px 10px; background: var(--panel2); color: var(--fg-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; border-bottom: 1px solid var(--line); position: sticky; top: 0; white-space: nowrap; }
.tbl td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: rgba(34,211,238,.04); }
.tbl td.mono { font-family: var(--mono); }
.tbl .num { text-align: right; font-family: var(--mono); }

/* Code / output areas */
.out {
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
  font-family: var(--mono); font-size: var(--fs-xs); line-height: 1.55; white-space: pre-wrap;
  word-break: break-all; overflow: auto; max-height: 420px; min-height: 44px;
}
.out:empty::before { content: "— no output yet —"; color: var(--fg-faint); font-style: italic; }
.hexview { white-space: pre; word-break: normal; }
.hl-print { color: var(--fg); }
.hl-null { color: var(--fg-faint); opacity: .6; }
.hl-ctrl { color: var(--warn); }
.hl-magic { color: var(--acc); background: var(--acc-bg); border-radius: 2px; }
.hl-match { background: rgba(34,211,238,.25); border-radius: 2px; outline: 1px solid rgba(34,211,238,.5); }
.hl-ioc { color: var(--acc2); }

/* Drop zones */
.dropzone {
  border: 1.5px dashed var(--line2); border-radius: var(--rad); padding: 26px 18px; text-align: center;
  color: var(--fg-dim); font-size: var(--fs-sm); cursor: pointer; transition: border-color .15s, background .15s;
  background: var(--panel);
}
.dropzone:hover, .dropzone.drag { border-color: var(--acc); background: var(--acc-bg); color: var(--acc); }
.dz-big { font-size: 26px; display: block; margin-bottom: 6px; opacity: .8; }

/* Metric cards */
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: var(--rad); padding: 12px 14px; }
.metric .m-val { font-size: 24px; font-weight: 700; font-family: var(--mono); color: var(--acc); line-height: 1.1; }
.metric .m-lbl { font-size: var(--fs-xs); color: var(--fg-faint); margin-top: 3px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }

/* Quick-launch cards */
.ql-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ql-card { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--rad); padding: 12px 14px; cursor: pointer; color: var(--fg); font-family: inherit; transition: border-color .12s, transform .12s; }
.ql-card:hover { border-color: var(--acc); transform: translateY(-1px); }
.ql-card .ql-ico { font-size: 18px; }
.ql-card .ql-name { font-weight: 600; font-size: var(--fs-sm); }
.ql-card .ql-desc { font-size: var(--fs-xs); color: var(--fg-faint); }

/* Suggestion / action cards */
.action-card { display: flex; gap: 10px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 6px; padding: 10px 12px; cursor: pointer; width: 100%; text-align: left; color: var(--fg); font-family: inherit; font-size: var(--fs-sm); }
.action-card:hover { border-color: var(--acc); background: var(--acc-bg); }
.action-card.warn { border-left-color: var(--warn); }
.action-card .ac-body b { display: block; margin-bottom: 2px; }
.action-card .ac-body span { color: var(--fg-dim); font-size: var(--fs-xs); }

/* Confidence labels */
.conf { font-size: var(--fs-xs); font-weight: 600; }
.conf-strong { color: var(--ok); } .conf-likely { color: var(--acc); }
.conf-possible { color: var(--warn); } .conf-review { color: var(--fg-dim); }

/* Bars */
.bar { height: 8px; background: var(--panel2); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.bar > div { height: 100%; background: linear-gradient(90deg, var(--acc2), var(--acc)); transition: width .3s; }
.bar.warnb > div { background: var(--warn); }
.bar.badb > div { background: var(--bad); }

/* Log drill-down top values */
.lp-tv { background: none; border: none; padding: 0; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.lp-tv:hover, .lp-tv:focus-visible { color: var(--acc); text-decoration: underline; }

/* Toasts */
#toasts { position: fixed; bottom: 42px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 400; max-width: 340px; }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-left: 3px solid var(--acc); border-radius: 6px; padding: 9px 13px; font-size: var(--fs-sm); box-shadow: 0 6px 20px rgba(0,0,0,.45); animation: toast-in .18s ease; }
.toast-ok { border-left-color: var(--ok); } .toast-warn { border-left-color: var(--warn); } .toast-err { border-left-color: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.toast.out { opacity: 0; transform: translateX(12px); transition: all .25s; }

/* Palette */
#palette-overlay { position: fixed; inset: 0; background: rgba(5, 10, 14, .62); z-index: 350; display: flex; justify-content: center; padding-top: 12vh; backdrop-filter: blur(2px); }
#palette { width: min(600px, 92vw); max-height: 62vh; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; display: flex; flex-direction: column; box-shadow: 0 18px 60px rgba(0,0,0,.6); overflow: hidden; }
#palette-input { border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 13px 16px; font-size: 15px; background: transparent; }
#palette-input:focus { outline: none; }
#palette-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
#palette-list li { padding: 8px 12px; border-radius: 6px; cursor: pointer; display: flex; gap: 10px; align-items: center; font-size: var(--fs-sm); }
#palette-list li .pi-cat { margin-left: auto; font-size: var(--fs-xs); color: var(--fg-faint); }
#palette-list li[aria-selected="true"], #palette-list li:hover { background: var(--acc-bg); color: var(--acc); }
.palette-hint { padding: 7px 14px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--fg-faint); }

/* Shortcuts overlay */
#sc-overlay { position: fixed; inset: 0; background: rgba(5, 10, 14, .62); z-index: 360; display: flex; align-items: flex-start; justify-content: center; padding-top: 14vh; backdrop-filter: blur(2px); }
#sc-card { width: min(520px, 92vw); background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 16px 18px; box-shadow: 0 18px 60px rgba(0,0,0,.6); }
#sc-card .grid2 > div { padding: 3px 0; }

/* Empty states */
.empty { text-align: center; padding: 34px 20px; color: var(--fg-faint); }
.empty .e-ico { font-size: 30px; display: block; margin-bottom: 8px; opacity: .55; }
.empty p { margin: 4px 0 12px; font-size: var(--fs-sm); }

/* Timeline */
.tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line2); display: flex; flex-direction: column; gap: 12px; }
.tl li { position: relative; }
.tl li::before { content: ""; position: absolute; left: -24px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--acc); border: 2px solid var(--bg2); }
.tl li.tl-warn::before { background: var(--warn); }
.tl li.tl-bad::before { background: var(--bad); }
.tl li.tl-ok::before { background: var(--ok); }
.tl .tl-time { font-family: var(--mono); font-size: var(--fs-xs); color: var(--fg-faint); }

/* Graph */
.graph-wrap { border: 1px solid var(--line); border-radius: var(--rad); background: var(--bg); overflow: hidden; }
.graph-wrap svg { display: block; width: 100%; }
.gnode { cursor: pointer; }
.gnode text { fill: var(--fg-dim); font-size: 10px; font-family: var(--mono); }
.gedge { stroke: var(--line2); stroke-width: 1; opacity: .7; }

/* Pipeline */
.pipe { display: flex; flex-direction: column; gap: 0; }
.pipe-step { display: flex; gap: 12px; }
.pipe-rail { display: flex; flex-direction: column; align-items: center; width: 22px; flex: none; }
.pipe-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--acc); border: 2px solid var(--bg); flex: none; margin-top: 4px; }
.pipe-line { width: 2px; flex: 1; background: var(--line2); }
.pipe-body { flex: 1; padding-bottom: 14px; min-width: 0; }

/* Diff */
.diff-add { background: rgba(74,222,128,.13); color: var(--ok); }
.diff-del { background: rgba(248,113,113,.13); color: var(--bad); }
.diff-line { display: block; padding: 0 6px; white-space: pre-wrap; word-break: break-all; }

/* YARA/Sigma syntax */
.syn-kw { color: var(--acc); } .syn-str { color: var(--acc2); } .syn-com { color: var(--fg-faint); font-style: italic; }
.syn-var { color: var(--warn); } .syn-num { color: #c0a3f5; }

/* Print */
@media print {
  body { background: #fff; color: #111; }
  body::before { display: none; }
  #sidebar, #topbar, #statusbar, #rightpanel, #toasts, .no-print { display: none !important; }
  #appgrid { display: block; height: auto; }
  #main { padding: 0; overflow: visible; }
  .card, .out, .tbl-wrap { border-color: #bbb; background: #fff; color: #111; }
  .tbl th { background: #eee; color: #333; }
}
