﻿/* Right column: run header, pipeline stepper, printer row, stage views,
   paper preview, error panel */

#right {
  background: var(--bg);
  display: flex; flex-direction: column;
  min-height: 0; min-width: 0;
  container: right / inline-size;   /* named container so the header can adapt to its width */
}
.right-head {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.right-head .chip { min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
/* "Processing…" note shown next to Run while a render is in flight (Run is disabled then) */
.run-busy { flex: none; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.run-busy::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 5px;
  vertical-align: -1px; border: 1.5px solid var(--faint); border-top-color: var(--accent);
  border-radius: 50%; animation: run-spin .7s linear infinite; }
@keyframes run-spin { to { transform: rotate(360deg); } }
.layout-btns { margin-left: auto; flex: none; display: flex; gap: 2px; }
.lay-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 550; color: var(--muted);
  white-space: nowrap;
}
.lay-btn:hover { background: var(--sel); color: var(--ink); }
.lay-btn.toggled { background: var(--sel); color: var(--ink); }
/* narrow results pane: drop the layout-button labels (Templates/Test data/Assistant) to
   icons only, so the three toggles + status chip still fit. Container query on #right. */
@container right (max-width: 340px) {
  .lay-btn span { display: none; }
  .lay-btn { padding: 3px 6px; }
}

#pipeErr {
  flex: none; padding: 5px 14px;
  font-size: 11.5px; font-weight: 550; color: var(--danger);
  background: var(--danger-soft);
  border-bottom: 1px solid var(--border);
}
#right.stale #pipeErr { opacity: .5; }

#staleNote {
  flex: none; padding: 6px 12px;
  font-size: 11.5px; color: var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, var(--surface));
  border-bottom: 1px solid var(--border);
}
#right.stale .stage-body { opacity: .45; }

/* pipeline stepper: emphasized flow between stages */
/* stage stepper — INLINE in the action row (between Run and the printer): a compact
   horizontal "● Compile › ● Format › ● Print", each a clickable tab. */
.pipe { display: flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; }
.pnode {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 7px; border-radius: 6px;
  position: relative;
  color: var(--muted); font-size: 11px; font-weight: 550; white-space: nowrap;
}
.pnode:hover { color: var(--ink); background: var(--sel); }
.pnode.on { color: var(--ink); }
.pnode.on .pdot { box-shadow: 0 0 0 2px var(--accent-soft); }
.pnode .pdot {
  position: relative; z-index: 1;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--faint); flex: none;
}
.pnode.ok .pdot { background: var(--accent); }
.pnode.err .pdot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.pnode.err { color: var(--danger); }
.pnode.skip .pdot { background: transparent; border: 1.5px solid var(--faint); }
/* a modest "›" between stages */
.pnode + .pnode::before {
  content: "›"; color: var(--faint); font-size: 12px; line-height: 1;
  margin-right: 2px;
}
.right-sub {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
/* Preview = the results pane's primary action: filled accent, prominent, always highlighted.
   It does NOT dim with the stale output below it — it's the thing you press to refresh. */
.run-primary {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 7px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font-weight: 600; font-size: 12px;
  white-space: nowrap; cursor: pointer;
}
[data-theme="dark"] .run-primary { color: #0c1f14; }
.run-primary .run-ic { flex: none; color: currentColor; }
.run-primary:hover { filter: brightness(1.06); }
.run-primary:disabled { opacity: .5; cursor: default; filter: none; }
/* when results are stale/absent, dim EVERYTHING below the Preview button (stepper, any pipe
   error, and the output body) — so the bright Preview button stands out as the next step.
   The button itself and the printer row stay full-strength. */
#right.stale .pipe,
#right.stale #pipeErr,
#right.stale .stage-body { opacity: .45; transition: opacity .15s; }
.right-sub select {
  font: inherit; font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border-strong); border-radius: 7px;
  background: var(--surface); color: var(--ink);
  max-width: 230px;
}
.dev-lbl {
  flex: none;
  font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint);
}
/* printer chooser pinned to the RIGHT edge — "<name> ▾". Styled like the engine select in the
   editor header: subtle, unobtrusive, hover-lit, with the SAME SVG caret. */
.printer-pick {
  margin-left: auto; flex: 0 1 auto; min-width: 0;
  display: flex; align-items: center; gap: 7px;
}
.printer-pick #printerDD { min-width: 0; }
.printer-pick .dd-btn {
  border: 1px solid transparent; background: none; border-radius: 6px;
  padding: 2px 18px 2px 7px; font-size: 11px; font-weight: 550; color: var(--muted);
  max-width: 100%; min-width: 0;
  /* identical caret + placement to .engine-sel */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath d='M1 2.5 4 5.5 7 2.5' stroke='%23888' stroke-width='1.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 5px center;
}
.printer-pick .dd-btn:hover { background-color: var(--sel); color: var(--ink); }
/* hide the dropdown's built-in text caret — the SVG one above replaces it */
.printer-pick .dd-arr { display: none; }
/* the picker sits at the right edge, so its popup must open RIGHT-aligned (grow leftward) —
   else the 230px+ list overflows past the screen's right border. */
.printer-pick .dd-pop { left: auto; right: 0; }

.stage-body { flex: 1; overflow: auto; min-height: 0; }
.stage-code {
  font-family: var(--mono); font-size: 12px; line-height: 1.55;
  padding: 14px 16px;
  white-space: pre;
  color: var(--ink);
}
.stage-note {
  padding: 8px 16px 0; color: var(--faint); font-size: 11px; font-family: var(--mono);
}

/* zoom control for the rendered document */
.zoom-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 0;
  font-size: 11px; color: var(--muted);
}
.zoom-row input[type="range"] { width: 130px; accent-color: var(--accent); }
.zoom-val { font-family: var(--mono); font-size: 10.5px; min-width: 36px; }
.zoom-reset {
  font-family: var(--mono); font-size: 10px;
  padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--border-strong); color: var(--muted);
}
.zoom-reset:hover { border-color: var(--faint); color: var(--ink); }

/* paper */
/* counter the workspace interface zoom so the print-form preview depends only on
   its own zoom slider (root zoom × --preview-unscale = 1 for this subtree) */
.paper-wrap { padding: 26px 0 40px; display: flex; flex-direction: column; align-items: center; gap: 22px; transform-origin: top center; zoom: var(--preview-unscale, 1); }
/* EPL: labels share one continuous liner roll — no gap between them */
.paper-wrap.epl-roll { gap: 0; }
.paper {
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: var(--shadow);
  font-family: var(--mono);
}
/* a frame around the preview sheet so it reads as a sheet against the backdrop
   — in BOTH themes (subtle in light via --paper-frame, a light outline on the
   dark sheet in dark). Labels are a plain rectangle → a border. The receipt is
   clip-path'd (torn top+bottom) and a clip-path clips a CSS border too, so the
   receipt outline is a separate backing layer (.receipt-frame) wearing the SAME
   torn clip (set inline in right.js), 1px larger, behind the paper; the 1px
   frame colour shows through as the torn outline. */
.receipt-frame {
  display: inline-block;
  background: var(--paper-frame);
  padding: 1px;
  box-shadow: var(--shadow);
}
.receipt-frame .paper.receipt { box-shadow: none; }
/* the torn clip-path (top+bottom teeth, matched phase so adjacent pages line up)
   is generated and set inline in right.js (receiptClip) on both the receipt and
   its frame backing — kept out of CSS so it stays parametric */
.paper.label { border: 1px solid var(--paper-frame); border-radius: 3px; }
/* EPL liner: the silicone-coated backing the labels are stuck to (see a real
   label roll) — a band around each label; the label sits on top */
.liner {
  background: var(--paper-liner);
  box-shadow: var(--shadow);
  display: inline-block;
}
.liner .paper.label { box-shadow: none; }
/* dot-space canvas: 1 dot = 1 px, lines absolutely positioned (same model as
   the printify document viewer; font classes live in fonts.css) */
.pcanvas { position: relative; margin: 0 auto; }
.pl {
  position: absolute; left: 0;
  white-space: pre;
  transform-origin: left top;
}
.pl.b { font-weight: 700; }
/* hover-to-highlight (paper): two tiers — the printed line under the cursor (.src-cur, bright) and
   the other lines produced by the SAME template fragment (.src-rel, dim).
   The band is drawn by a ::before behind the glyphs so its box is INDEPENDENT of the text: it is
   inset per (protocol, font) by the --hl-t / --hl-b vars (top/bottom padding in DOTS, positive =
   outward, set by paper.js HL_PAD) and by --hl-x horizontally (the ±2px bleed so adjacent glyphs
   on the same row read as one band). All three vars are pre-divided by the .pl scale in paper.js,
   so they render as real dots after the element's transform. */
.pl.src-cur, .pl.src-rel, .pl.src-row {
  --hl-t: 0px; --hl-b: 0px; --hl-x: 2px;
  isolation: isolate;   /* own stacking context so the ::before (z-index:-1) sits behind the
                           glyphs but above the paper, for the unscaled fonts too (a scale
                           transform already makes one, plain 1× fonts need this) */
}
/* The whole-line band spans the FULL sheet width: --hl-l is the offset from this element back to
   the canvas left edge and --hl-w the printable width (paper.js, scale-compensated), so a
   highlighted line reads as a full-width band. When those vars are absent (tests / no printable
   width) it falls back to hugging the glyphs (±--hl-x). */
.pl.src-cur::before, .pl.src-rel::before, .pl.src-row::before {
  content: ""; position: absolute; z-index: -1; border-radius: 2px;
  left: var(--hl-l, calc(-1 * var(--hl-x))); width: var(--hl-w, calc(100% + 2 * var(--hl-x)));
  top: calc(-1 * var(--hl-t)); bottom: calc(-1 * var(--hl-b));
}
.pl.src-cur::before { background: var(--hl-cur); }
.pl.src-rel::before { background: var(--hl-rel); }
.pl.src-row::before { background: var(--hl-row); }
/* per-column segment spans inside a table-produced paper line (.pseg): same tiers, but the band
   hugs just the COLUMN's char range and is INSET horizontally by half the row bleed (≈1 real px
   after the scale transform) on each side — adjacent column bands then show a visible gap, the
   COLUMN GRID of the row. Vertical geometry reuses the row band's scale-compensated vars. */
.pl .pseg { position: relative; }
.pl .pseg.src-cur, .pl .pseg.src-rel, .pl .pseg.src-row { isolation: isolate; }
.pl .pseg.src-cur::before, .pl .pseg.src-rel::before, .pl .pseg.src-row::before {
  content: ""; position: absolute; z-index: -1; border-radius: 2px;
  left: calc(var(--hl-x, 2px) / 2); right: calc(var(--hl-x, 2px) / 2);
  top: calc(-1 * var(--hl-t, 0px)); bottom: calc(-1 * var(--hl-b, 0px));
}
.pl .pseg.src-cur::before { background: var(--hl-cur); }
.pl .pseg.src-rel::before { background: var(--hl-rel); }
.pl .pseg.src-row::before { background: var(--hl-row); }
/* a FITTED device image (image / qr / barcode): an UNMASKED positioned wrapper (carries data-src +
   the hover band) around the masked-ink .pink, so the ink fills the box exactly (paper.js). */
.pimg-box { position: absolute; }
/* device images (image / qr / barcode) hover exactly like a text line: the SAME three-tier
   full-width BAND behind them PLUS an accent contour of the picture itself (below). isolation gives
   the box its own stacking context so the z-index:-1 band sits behind the masked ink (the inner
   .pink paints ink through a mask, mostly transparent → the band shows through) but above the paper.
   The band lives on the UNMASKED wrapper (.pimg-box / .pimg-clip), never on the masked .pink, so the
   element's own mask can't clip it to the ink shape. */
.pimg-box.src-cur, .pimg-box.src-rel, .pimg-box.src-row,
.pimg-clip.src-cur, .pimg-clip.src-rel, .pimg-clip.src-row { isolation: isolate; }
/* the full-width band behind the image (same geometry as a text line — --hl-l/--hl-w from paper.js,
   z-index:-1 behind the masked ink). Reaches the sheet edges for BOTH kinds: the clip's
   overflow:hidden is on the inner .pimg-view now, so the .pimg-clip wrapper no longer trims it. */
.pimg-box.src-cur::before, .pimg-box.src-rel::before, .pimg-box.src-row::before,
.pimg-clip.src-cur::before, .pimg-clip.src-rel::before, .pimg-clip.src-row::before {
  content: ""; position: absolute; z-index: -1; border-radius: 2px;
  left: var(--hl-l, -3px); width: var(--hl-w, calc(100% + 6px));
  top: -3px; bottom: -3px;
}
.pimg-box.src-cur::before, .pimg-clip.src-cur::before { background: var(--hl-cur); }
.pimg-box.src-rel::before, .pimg-clip.src-rel::before { background: var(--hl-rel); }
.pimg-box.src-row::before, .pimg-clip.src-row::before { background: var(--hl-row); }
/* ADDITIONALLY for an image: an accent CONTOUR around the picture box itself (drawn on the element,
   so it hugs the actual image, not the full-width band) — solid accent for the hovered image, a
   dimmer dashed hint for a same-source image elsewhere. This is the "outline the picture" cue on
   top of the text-like band. */
.pimg-box.src-cur, .pimg-clip.src-cur { outline: 2px solid var(--accent); outline-offset: 1px; }
.pimg-box.src-rel, .pimg-clip.src-rel { outline: 1px dashed var(--faint); outline-offset: 1px; }
/* table contour (cursor inside a table): per-line ::after boxes — side borders on every line of
   the table, top/bottom on the boundary lines (.tbl-top/.tbl-bot) — that read as ONE gentle
   rectangle around the whole table. ::after because ::before is the hover band; z-index -1 keeps
   the 1px line behind the glyphs (isolation gives the element its own stacking context). Rows of
   a table stack contiguously (line spacing 0), so the side borders connect seamlessly. */
.pl.tbl-in { isolation: isolate; }
.pl.tbl-in::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: calc(-1 * var(--hl-x, 2px)); right: calc(-1 * var(--hl-x, 2px));
  top: 0; bottom: 0;
  border-left: 1px solid var(--tbl-line); border-right: 1px solid var(--tbl-line);
}
.pl.tbl-top::after { border-top: 1px solid var(--tbl-line); border-top-left-radius: 3px; border-top-right-radius: 3px; }
.pl.tbl-bot::after { border-bottom: 1px solid var(--tbl-line); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; }
/* a NESTED table's sub-range wrapper (paper and Format view alike) */
.tspan { position: relative; }
.tspan.tbl-in { isolation: isolate; }
.tspan.tbl-in::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  left: 0; right: 0; top: 0; bottom: 0;
  border-left: 1px solid var(--tbl-line); border-right: 1px solid var(--tbl-line);
}
.tspan.tbl-top::after { border-top: 1px solid var(--tbl-line); border-top-left-radius: 3px; border-top-right-radius: 3px; }
.tspan.tbl-bot::after { border-bottom: 1px solid var(--tbl-line); border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; }
/* the table's CONTINUOUS column verticals: pre-rendered zero-width .tvl children — one per
   base-column boundary on EVERY line of the table (positions from the formatter: px on paper,
   ch in the Format view) — revealed (.on) while their table is highlighted. The lines run
   unbroken through colspan cells: the verticals crossing a merged cell are what visualizes
   which columns were united. When revealed they paint ABOVE the cell hover bands and the
   header tint (z-index 1): a highlighted cseg/pseg is an ISOLATED stacking context painted
   as one unit (band + glyphs), so anything below it vanishes under the highlight — the grid
   must sit on top of the selection. At monospace column boundaries the 1px line falls
   between character cells, so glyphs stay readable. */
.tvl { position: absolute; top: 0; bottom: 0; width: 0; z-index: -1; pointer-events: none; }
.tvl.on { border-left: 1px solid var(--tbl-line); z-index: 1; }
/* Format view: the grid chrome hangs off INLINE tspans whose box is SHORTER than the 1.55
   line-height row — anchored to the inline box, consecutive rows' verticals/side-borders showed
   gaps (read as dashed). The inline box sits centered in the line box (even half-leading), so a
   centered 1lh-tall box tiles the rows exactly — verticals and contour sides become continuous. */
.stage-code .tvl,
.stage-code .tspan.tbl-in::after {
  top: 50%; bottom: auto; height: 1lh; transform: translateY(-50%);
}
/* Paper: same idea for fonts whose css text box is SHORTER than the row advance (EPL fonts
   carry 1+8 dot vertical margins; ESC/POS f1's ×2 box slightly OVERSHOOTS its 32-dot advance) —
   the chrome spans exactly [row top, row top + pitch), from the per-element --row-t/--row-pitch
   vars (paper.js, scale-compensated), so lines tile seamlessly on every printer. */
.pl .tvl,
.pl.tbl-in::after,
.pl .tspan.tbl-in::after {
  top: calc(-1 * var(--row-t, 0px)); bottom: auto; height: var(--row-pitch, 100%);
}
/* header row of the highlighted table: a light tint on its lines + a separator under the last
   one. The tint is the ELEMENT background — the hover bands (::before, z-index -1 inside the
   element's own stacking context) still paint above it, so tiers stay readable on the header. */
.pl.tbl-hdr, .tspan.tbl-hdr, .cseg.tbl-hdr { background: var(--tbl-head); }
.pl.tbl-hdr-sep::after, .tspan.tbl-hdr-sep::after { border-bottom: 1px solid var(--tbl-line); }
.pimg { position: absolute; left: 0; width: 100%; display: flex; justify-content: center; }
.pimg svg { display: block; }
/* device images (qrcode/barcode/image) are 1-bit black-on-transparent PNGs used
   as a MASK; the visible "ink" is the paper-ink colour, so the colour scheme
   governs images exactly like text — transparent pixels stay unprinted (the
   paper shows through). One mechanism for every printed element. */
.pink { background: var(--paper-ink); image-rendering: pixelated; }
/* a clipped <image>: the .pimg-clip wrapper is positioned but NOT clipped (so its full-width hover
   band + accent contour reach the sheet edges like every other row); the overflow:hidden window
   onto the native-size masked ink lives on the inner .pimg-view, sized to the visible box. */
.pimg-clip { position: absolute; }
.pimg-view { position: absolute; left: 0; top: 0; overflow: hidden; }
.pimg-clip .pink { position: absolute; }
.pimg-cap {
  position: absolute; left: 0; width: 100%;
  text-align: center; font-size: 10px; letter-spacing: .25em;
  font-family: var(--mono);
}

/* error panel */
/* error strip at the bottom of the template editor: a tight, accurate message
   with the line references embedded as inline links, and a collapsed stack trace */
#errPanel {
  flex: none;
  max-height: 42%;
  overflow: auto;
  border-top: 2px solid var(--danger);
  background: var(--surface);
  padding: 9px 12px;
  /* the message, the suggestion and the stack trace are meant to be copied —
     keep the whole panel freely selectable */
  user-select: text;
  -webkit-user-select: text;
}
#errPanel .e-msg { font-weight: 600; font-size: 12.5px; line-height: 1.5; }
/* inline clickable line references embedded right in the message */
.e-jump {
  background: none; border: 0; padding: 0 1px; font: inherit; font-size: 11.5px; font-weight: 500;
  color: var(--accent-ink); text-decoration: underline dotted; cursor: pointer; white-space: nowrap;
}
.e-jump:hover { text-decoration-style: solid; }
#errPanel .e-hint { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
/* the full exception chain + stack traces, collapsed by default */
.e-trace { margin-top: 8px; }
.e-trace summary { cursor: pointer; font-size: 11px; color: var(--muted); user-select: none; }
.e-trace summary:hover { color: var(--ink); }
.e-trace pre {
  margin-top: 6px;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.55;
  color: var(--muted);
  white-space: pre-wrap;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 10px;
}

/* line of the compiled markup a format error points at - red, full width */
.mark-line { background: rgba(229, 72, 77, 0.22); display: inline-block; min-width: 100%; border-radius: 3px; }

/* <nodoc/> "nothing to print" — a calm, centered note (not an error): the run
   succeeded, the template just produces no print */
.no-print-note {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 40px 28px; text-align: center;
}
.no-print-note .np-title { font-size: 15px; font-weight: 650; color: var(--muted); }
.no-print-note .np-sub { font-size: 12px; color: var(--faint); max-width: 320px; line-height: 1.5; }
.no-print-note code { font-family: var(--mono); font-size: 11.5px; }


/* line numbers in the Compile/Format stage views. Each .cl is its OWN block row (stable layout):
   highlighting on hover then only swaps the background — no display/size change, so no reflow
   jitter and no line "disappearing". */
.stage-code.numbered { counter-reset: cl; }
.stage-code.numbered .cl { counter-increment: cl; display: block; border-radius: 3px; }
.stage-code.numbered .cl::before { content: counter(cl); display: inline-block; width: 3.5ch; margin-right: 12px; text-align: right; color: var(--faint); user-select: none; }

/* source-linked lines in the Compile/Format views */
.stage-code.numbered .cl[data-src] { cursor: pointer; }
.stage-code.numbered .cl[data-src]::before { color: #5886ff; }
/* two-tier hover highlight (matches the paper preview): the hovered output line (.src-cur) vs the
   other lines from the same template fragment (.src-rel) — background only, layout untouched. */
.stage-code.numbered .cl.src-cur { background: var(--hl-cur); }
.stage-code.numbered .cl.src-rel { background: var(--hl-rel); }
/* per-column segment spans inside a Format-view line (.cseg): the band is drawn by a ::before
   inset 1px on each side, so adjacent column bands show the same visible COLUMN-GRID gap as the
   paper (.pseg); isolation keeps the z-index:-1 band above the row's own background. */
.stage-code.numbered .cseg { cursor: pointer; position: relative; }
.stage-code.numbered .cseg.src-cur, .stage-code.numbered .cseg.src-rel, .stage-code.numbered .cseg.src-row { isolation: isolate; }
.stage-code.numbered .cseg.src-cur::before, .stage-code.numbered .cseg.src-rel::before, .stage-code.numbered .cseg.src-row::before {
  content: ""; position: absolute; z-index: -1; border-radius: 2px;
  left: 1px; right: 1px; top: 0; bottom: 0;
}
.stage-code.numbered .cseg.src-cur::before { background: var(--hl-cur); }
.stage-code.numbered .cseg.src-rel::before { background: var(--hl-rel); }
.stage-code.numbered .cseg.src-row::before { background: var(--hl-row); }

/* actionable error suggestion — more prominent than the stack trace. It lives
   in an error panel, so it's danger-toned (red), not the app's green accent —
   a green "tip" box in a failure context reads as success and is confusing. */
.e-suggest {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 8px 0; padding: 8px 10px; border-radius: 7px;
  background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger);
  font-size: 12.5px; font-weight: 550;
}
.e-suggest .e-suggest-ic { flex: none; margin-top: 1px; opacity: .9; }
.e-suggest span { user-select: text; -webkit-user-select: text; }
/* the global ::selection is the green accent-soft — the same color as several
   panel backgrounds, which makes a selection invisible. Give the error panel
   its own contrasting selection highlight so selected text actually shows. */
#errPanel ::selection { background: rgba(196, 58, 48, 0.28); }
#errPanel ::-moz-selection { background: rgba(196, 58, 48, 0.28); }
