/* EconMap — interfaz */
:root {
  --bg: #eef1f5; --panel: #ffffff; --line: #e1e5eb; --ink: #1c2530; --muted: #6b7684; --accent: #1f6f78; --accent-2: #2563eb;
  --accent-soft: #e6f2f3; --warn: #b45309; --err: #b91c1c; --ok: #15803d; --radius: 6px;
  --font: 'Helvetica Neue', 'Segoe UI', Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 13px; }
button, input, select, textarea { font: inherit; color: inherit; }
body { display: flex; flex-direction: column; overflow: hidden; }

/* Barra superior */
#top { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; background: #17212b; color: #e8edf2; flex: none; }
.brand { display: flex; align-items: center; gap: 8px; }
.brand img { width: 24px; height: 24px; }
.brand b { font-size: 15px; letter-spacing: .2px; }
.brand span { color: #93a1b0; font-size: 12px; }
.brand .ver { font-size: 10.5px; padding: 1px 6px; border: 1px solid #3a4856; border-radius: 8px; margin-left: 4px; }
.brand .ver.mismatch { background: #7f1d1d; color: #fecaca; border-color: #b91c1c; }
.tools { display: flex; align-items: center; gap: 6px; }
.tools .sep { width: 1px; height: 22px; background: #33414f; margin: 0 4px; }
#top .btn.ghost { background: transparent; border-color: #3a4856; color: #dbe3ea; }
#top .btn.ghost:hover { background: #243241; }
#top .icon-btn { color: #dbe3ea; }
#top .icon-btn:hover { background: #243241; }
#top .icon-btn:disabled { opacity: .35; }
.seg { display: inline-flex; border: 1px solid #3a4856; border-radius: var(--radius); overflow: hidden; }
.seg button { background: transparent; border: 0; color: #c8d2dc; padding: 5px 10px; cursor: pointer; }
.seg button.on { background: #e8edf2; color: #17212b; font-weight: 600; }
.backend { font-size: 11px; padding: 3px 8px; border-radius: 10px; margin-left: 4px; white-space: nowrap; }
.backend.ok { background: #14532d; color: #bbf7d0; }
.backend.off { background: #3a4856; color: #cbd5e1; }

main { flex: 1; display: flex; min-height: 0; position: relative; }

/* Panel lateral */
#side { width: 372px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; flex: none; }
#tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; }
#tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 2px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 12.5px; }
#tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
#panel { flex: 1; overflow-y: auto; padding: 4px 14px 40px; }
.section { padding: 12px 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section h4 { margin: 0 0 10px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 9px; min-width: 0; flex: 1; }
.flabel { font-size: 11.5px; color: #4b5563; font-weight: 600; }
.hint { color: var(--muted); font-size: 11.5px; line-height: 1.4; display: block; margin: 2px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.warn { color: var(--warn); font-size: 12px; }
.err { color: var(--err); }
.ok { color: var(--ok); }
.row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.row > .field { flex: 1 1 80px; }
input[type=text], input[type=number], input[type=date], select, textarea { width: 100%; border: 1px solid #cfd6de; border-radius: 5px; padding: 6px 8px; background: #fff; min-width: 0; }
input[type=number] { padding-right: 2px; }
textarea { resize: vertical; }
input[type=color] { width: 38px; height: 30px; padding: 2px; border: 1px solid #cfd6de; border-radius: 5px; background: #fff; cursor: pointer; flex: none; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9fd0d4; border-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; margin: 2px 10px 6px 0; font-size: 12.5px; }
.check input { margin: 0; accent-color: var(--accent); }
.range { display: inline-flex; align-items: center; gap: 6px; width: 100%; }
.range input { flex: 1; accent-color: var(--accent); }
.range-val { width: 34px; text-align: right; color: var(--muted); font-size: 11.5px; }
.btn { border: 1px solid #cfd6de; background: #fff; border-radius: var(--radius); padding: 6px 11px; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #f4f6f8; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: #185a62; }
.btn.small { padding: 4px 9px; font-size: 12px; }
.btn.ghost { background: transparent; }
.btn.block { display: block; width: 100%; text-align: left; margin-bottom: 4px; }
.btn.ai-btn, .ai-btn { background: linear-gradient(135deg, #f3e8ff, #e0f2fe); border-color: #c4b5fd; color: #4c1d95; font-weight: 600; }
#top .btn.ai-btn { background: #312e81; color: #e0e7ff; border-color: #4f46e5; }
.icon-btn { background: none; border: 0; width: 28px; height: 28px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #4b5563; flex: none; padding: 0; font-size: 16px; }
.icon-btn svg { width: 17px; height: 17px; fill: currentColor; }
.icon-btn:hover { background: #eef1f4; }
.icon-btn.off { color: #b8c0c9; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.btn-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.btn-grid .btn, .btn-grid > span > .btn { width: 100%; }
.btn-grid > span { display: block; }
details.details { margin: 6px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); }
details.details > summary { padding: 7px 10px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: #374151; }
.details-body { padding: 4px 10px 8px; }

/* Inicio rápido */
.qs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qs-card { text-align: left; border: 1px solid var(--line); background: #fafbfc; border-radius: 8px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.qs-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.qs-card span { color: var(--muted); font-size: 11.5px; }

/* Capas */
.layers { display: flex; flex-direction: column; gap: 4px; }
.layer-row { display: flex; align-items: center; gap: 2px; padding: 5px 4px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.layer-row.active { border-color: var(--accent); background: var(--accent-soft); }
.layer-name { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 4px; }
.layer-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.layer-name small { color: var(--muted); font-size: 11px; }
.checklist { max-height: 190px; overflow-y: auto; border: 1px solid var(--line); border-radius: 5px; padding: 6px; display: flex; flex-direction: column; margin-bottom: 8px; }
.checklist.cols2 { display: grid; grid-template-columns: 1fr 1fr; max-height: none; }
.catalog h4 { margin: 14px 0 6px; color: var(--accent); }
.cat-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid #f0f2f5; }
.cat-item small { display: block; color: var(--muted); font-size: 11px; }
.cat-item.missing b { color: #9aa3ad; }
.badge { font-size: 10.5px; background: #fff7ed; color: var(--warn); padding: 2px 7px; border-radius: 9px; border: 1px solid #fed7aa; }

/* Datos */
.tables { display: flex; flex-direction: column; gap: 6px; }
.table-row, .join-card { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); }
.table-row small, .join-card small { display: block; color: var(--muted); font-size: 11px; }
.join-card { align-items: flex-start; margin-bottom: 8px; background: #fafbfc; }
.join-meter { height: 5px; background: #e5e7eb; border-radius: 3px; margin: 5px 0 3px; overflow: hidden; width: 170px; }
.join-meter i { display: block; height: 100%; background: var(--accent); }
.join-form { background: #fafbfc; border: 1px dashed #cfd6de; border-radius: var(--radius); padding: 10px; }
.preview { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 5px; }
.preview.tall { max-height: 52vh; }
table.tbl { border-collapse: collapse; font-size: 12px; width: 100%; }
.tbl th, .tbl td { border-bottom: 1px solid #eef0f3; padding: 4px 7px; text-align: left; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.tbl th { background: #f6f7f9; position: sticky; top: 0; font-weight: 600; }
.tbl td select { min-width: 220px; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: #4b5563; background: #f6f8fa; padding: 7px 9px; border-radius: 5px; margin: 0 0 10px; }

/* Simbología */
.style-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.style-card { border: 1px solid var(--line); background: #fff; border-radius: 7px; padding: 8px 4px 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; text-align: center; line-height: 1.15; }
.style-card b { font-weight: 600; }
.style-card:hover { border-color: #9fc6ca; }
.style-card.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.sc-icon { width: 34px; height: 22px; border-radius: 3px; background: #ddd; }
.sc-simple { background: #c9ced4; }
.sc-choropleth { background: linear-gradient(90deg, #ffffcc 0 25%, #a1dab4 25% 50%, #41b6c4 50% 75%, #225ea8 75%); }
.sc-categories { background: linear-gradient(90deg, #4e79a7 0 33%, #f28e2c 33% 66%, #59a14f 66%); }
.sc-proportional { background: radial-gradient(circle at 30% 60%, #d6604d 0 5px, transparent 6px), radial-gradient(circle at 68% 45%, #d6604d 0 9px, transparent 10px), #eee; }
.sc-bivariate { background: conic-gradient(from 90deg at 50% 50%, #c85a5a 25%, #574249 0 50%, #64acbe 0 75%, #e8e8e8 0); }
.sc-valuealpha { background: linear-gradient(90deg, rgba(34,94,168,.2), rgba(34,94,168,1)); }
.sc-pies { background: conic-gradient(#66c2a5 0 40%, #fc8d62 0 70%, #8da0cb 0); border-radius: 50%; width: 22px; }
.sc-dotdensity { background: radial-gradient(#e41a1c 1.5px, transparent 2px) 0 0/6px 6px, radial-gradient(#377eb8 1.5px, transparent 2px) 3px 3px/7px 7px, #f4f4f4; }
.sc-dorling { background: radial-gradient(circle at 25% 50%, #4a7fb5 0 6px, transparent 7px), radial-gradient(circle at 55% 45%, #e06666 0 8px, transparent 9px), radial-gradient(circle at 85% 55%, #4a7fb5 0 4px, transparent 5px), #f2f2f2; }
.sc-spikes { background: linear-gradient(60deg, transparent 45%, #c0392b 46% 54%, transparent 55%) 0 0/9px 22px, #f2f2f2; }
.sc-heatmap { background: radial-gradient(circle at 40% 55%, #bd0026, #fd8d3c 30%, #ffffb2 55%, #f2f2f2 70%); }
.sc-smallmultiples { background: linear-gradient(90deg, #9ecae1 0 48%, #fff 48% 52%, #3182bd 52%); }
.sc-lisa { background: linear-gradient(90deg, #d7191c 0 25%, #2c7bb6 25% 50%, #fdae61 50% 75%, #eee 75%); }
.sc-hexbin { background: radial-gradient(#41b6c4 40%, transparent 42%) 0 0/9px 9px, #e0f3f8; }
.palette-picker { position: relative; }
.palette-current { width: 100%; display: flex; align-items: center; gap: 8px; border: 1px solid #cfd6de; background: #fff; border-radius: 5px; padding: 5px 8px; cursor: pointer; }
.palette-current b { margin-left: auto; color: var(--muted); }
.palette-list { display: none; position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid #cfd6de; border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 280px; overflow-y: auto; padding: 4px; }
.palette-picker.open .palette-list { display: block; }
.palette-group { font-size: 10.5px; text-transform: uppercase; color: var(--muted); padding: 6px 6px 2px; }
.palette-opt { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 4px 6px; cursor: pointer; border-radius: 4px; font-size: 12px; }
.palette-opt:hover, .palette-opt.on { background: var(--accent-soft); }
.swatches { display: inline-flex; height: 12px; border-radius: 2px; overflow: hidden; flex: none; }
.swatches i { width: 13px; height: 12px; }
.bivar-pick { display: flex; gap: 8px; }
.bivar { display: grid; grid-template-columns: repeat(3, 11px); gap: 1px; border: 2px solid transparent; padding: 2px; border-radius: 4px; cursor: pointer; background: #fff; }
.bivar.on { border-color: var(--accent); }
.bivar i { width: 11px; height: 11px; display: block; }
.multi-fields { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 5px; padding: 6px; }
.mf-row { display: flex; align-items: center; gap: 6px; }
.mf-row .check { flex: 1; min-width: 0; margin: 0; }
.mf-row .check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-row input[type=text] { width: 110px; flex: none; padding: 3px 6px; }
.mf-row code { min-width: 36px; font-size: 11px; }

/* Fuentes */
.results { max-height: 200px; overflow-y: auto; border: 1px solid var(--line); border-radius: 5px; margin: 6px 0 8px; }
.result { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #f0f2f5; background: #fff; padding: 6px 8px; cursor: pointer; }
.result small { display: block; color: var(--muted); }
.result.on, .result:hover { background: var(--accent-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 8px; }
.chip { border: 1px solid #cfd6de; background: #fff; border-radius: 12px; padding: 3px 9px; font-size: 11.5px; cursor: pointer; }
.chip.on, .chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.logo-lib { display: flex; flex-wrap: wrap; gap: 6px; }
.logo-lib button { position: relative; width: 62px; height: 40px; border: 1px solid var(--line); border-radius: 4px; background: #fff; cursor: pointer; padding: 3px; }
.logo-lib img { max-width: 100%; max-height: 100%; }
.logo-lib .x { position: absolute; right: -6px; top: -6px; background: #fff; border: 1px solid #ccc; border-radius: 50%; width: 15px; height: 15px; font-size: 11px; line-height: 13px; }
.el-list { display: flex; flex-direction: column; gap: 3px; }
.el-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; font-size: 12.5px; }
.el-row.active { border-color: var(--accent-2); background: #eff6ff; }

/* Lienzo */
#stage { flex: 1; overflow: auto; display: flex; align-items: safe center; justify-content: safe center; padding: 36px; position: relative; background: #e4e8ed radial-gradient(#d5dbe2 1px, transparent 1px) 0 0/18px 18px; }
#page { background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.12), 0 12px 32px rgba(15,23,42,.10); flex: none; cursor: grab; touch-action: none; user-select: none; }
#page.panning { cursor: grabbing; }
#page.layout-mode { cursor: default; }
#page.layout-mode g.el { cursor: move; }
#page .handle { cursor: nwse-resize; }
#zoombar { position: fixed; right: 18px; bottom: 36px; display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 3px; box-shadow: 0 2px 8px rgba(0,0,0,.08); z-index: 5; }
#zoom-label { min-width: 44px; text-align: center; font-size: 11.5px; color: var(--muted); }
#status { height: 24px; flex: none; display: flex; gap: 22px; align-items: center; padding: 0 14px; background: #fff; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
#status .proj { margin-left: auto; overflow: hidden; text-overflow: ellipsis; }
#tip { position: fixed; pointer-events: none; background: rgba(20,24,31,.93); color: #fff; padding: 6px 9px; border-radius: 5px; font-size: 12px; line-height: 1.4; white-space: pre; display: none; z-index: 50; max-width: 340px; }

/* Asistente IA */
#ai-drawer { position: absolute; right: 0; top: 0; bottom: 0; width: 380px; background: #fff; border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(0,0,0,.08); transform: translateX(100%); transition: transform .18s ease; display: flex; flex-direction: column; z-index: 15; }
#ai-drawer.open { transform: none; }
.ai-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); color: #4c1d95; }
.ai-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow: hidden; }
.ai-log { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.45; }
.msg.user { background: #eef2ff; align-self: flex-end; max-width: 90%; }
.msg.ai { background: #f8fafc; border: 1px solid var(--line); }
.msg pre { white-space: pre-wrap; font-size: 10.5px; background: #fff; border: 1px solid #eee; padding: 6px; border-radius: 4px; max-height: 140px; overflow: auto; }
.msg p { margin: 0 0 6px; }
.sugg { margin-bottom: 8px; }

/* Modales, avisos */
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.42); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 10px; width: min(520px, 94vw); max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(860px, 96vw); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-body { padding: 14px 16px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--line); }
#toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: #17212b; color: #fff; padding: 9px 16px; border-radius: 7px; opacity: 0; transition: all .2s; z-index: 200; max-width: 80vw; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.error { background: var(--err); }
#busy { position: fixed; inset: 0; background: rgba(255,255,255,.55); display: none; align-items: center; justify-content: center; gap: 12px; z-index: 150; font-weight: 600; }
#busy.show { display: flex; }
.spinner { width: 22px; height: 22px; border: 3px solid #cbd5e1; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#drop { position: fixed; inset: 0; background: rgba(31,111,120,.18); border: 3px dashed var(--accent); display: none; align-items: center; justify-content: center; z-index: 300; font-size: 20px; font-weight: 600; color: #134e4a; text-align: center; }
#drop.show { display: flex; }
#drop small { font-size: 13px; font-weight: normal; }
.error { color: var(--err); padding: 12px; }

/* Selector de color con opción «Transparente» */
.color-wrap { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.none-btn { width: 22px; height: 22px; flex: none; padding: 0; border: 1px solid #cfd6de; border-radius: 4px; cursor: pointer;
  background: linear-gradient(to top right, transparent calc(50% - 1px), #d33 calc(50% - 1px), #d33 calc(50% + 1px), transparent calc(50% + 1px)),
              repeating-conic-gradient(#d9d9d9 0 25%, #fff 0 50%) 0 0 / 8px 8px; }
.none-btn:hover { border-color: var(--accent); }
.color-wrap.is-none .none-btn { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.color-wrap.is-none input[type=color] { opacity: .3; }

/* ---------- Consola de Python ---------- */
:root { --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; }
#stage-col { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#stage-col > #stage { flex: 1; min-height: 0; }
#top .btn.con-btn { font-family: var(--mono); font-size: 12px; }
#top .btn.con-btn.on { background: #e8edf2; color: #17212b; border-color: #e8edf2; }
#console-dock { flex: none; height: var(--con-h, 290px); display: flex; flex-direction: column; position: relative; background: #1e2127; color: #d7dae0; border-top: 1px solid #0b0d10; font: 12.5px/1.5 var(--mono); z-index: 5; }
#console-dock[hidden] { display: none; }
.con-grip { position: absolute; top: -5px; left: 0; right: 0; height: 9px; cursor: ns-resize; z-index: 3; }
.con-head { display: flex; align-items: center; gap: 6px; padding: 4px 8px 4px 12px; background: #262a31; border-bottom: 1px solid #15181c; font-family: var(--font); font-size: 12px; flex: none; }
.con-head b { color: #e6e9ef; font-family: var(--mono); font-size: 12px; }
.con-sp { flex: 1; }
.con-status { font-size: 11px; padding: 1px 8px; border-radius: 9px; background: #3a3f4b; color: #c5cad3; }
.con-status.ok { background: #1f4d33; color: #b7f0cb; }
.con-status.busy { background: #1f3f66; color: #bcd8ff; }
.con-status.wait { background: #5a4a1c; color: #f5dc9b; }
.con-status.err { background: #5c1f1f; color: #fecaca; }
.con-b { background: transparent; border: 1px solid #3b4048; color: #c9ced6; border-radius: 4px; padding: 2px 8px; cursor: pointer; font-size: 11.5px; }
.con-b:hover { background: #323843; color: #fff; }
.con-b.con-x { border: 0; font-size: 16px; line-height: 1; padding: 0 6px; }
.con-out { flex: 1; overflow: auto; padding: 6px 12px 4px; min-height: 0; }
.con-cell { margin: 0 0 8px; }
.con-incode { display: flex; gap: 8px; align-items: flex-start; }
.con-n { color: #5c8fd6; flex: none; min-width: 62px; user-select: none; }
.con-cell.running .con-n { color: #e5c07b; }
.con-cell.running .con-n::after { content: ' …'; }
pre.con-code { margin: 0; color: #e6e9ef; white-space: pre-wrap; word-break: break-word; font: inherit; cursor: default; }
.con-outs { padding-left: 70px; }
.con-outs pre { margin: 2px 0; white-space: pre-wrap; word-break: break-word; font: inherit; }
pre.con-stream { color: #c8ccd4; }
pre.con-stream.stderr { color: #f0b37e; }
pre.con-result { color: #e6e9ef; }
pre.con-page { color: #c8ccd4; background: #252a32; border-left: 3px solid #4b6a8f; padding: 4px 8px; }
.con-img { max-width: 100%; max-height: 360px; background: #fff; border-radius: 3px; margin: 4px 0; display: block; }
.con-html { overflow: auto; max-height: 320px; margin: 2px 0; }
.con-html table { border-collapse: collapse; font: 11.5px/1.35 var(--mono); color: #e6e9ef; }
.con-html th, .con-html td { border: 1px solid #3b4048; padding: 2px 7px; text-align: right; white-space: nowrap; max-width: 340px; overflow: hidden; text-overflow: ellipsis; }
.con-html thead th { background: #2b3038; position: sticky; top: 0; }
.con-html tbody th { color: #8b93a1; font-weight: normal; }
.con-html tr:nth-child(even) td { background: #22262d; }
.con-err { border-left: 3px solid #e06c75; background: #2d2124; padding: 3px 8px; margin: 3px 0; }
.con-err-h { color: #ff9ea6; white-space: pre-wrap; }
.con-err details summary { color: #9aa1ad; cursor: pointer; font-size: 11px; }
.con-err pre { color: #c8a3a7; font-size: 11.5px; }
.con-sys { color: #8fb8de; margin: 2px 0 8px; font-family: var(--font); font-size: 12px; }
.con-sys.err { color: #ff9ea6; }
.con-sys.warn { color: #f0c674; }
.con-in { display: flex; align-items: flex-start; gap: 8px; padding: 4px 12px 2px; border-top: 1px solid #2c313a; background: #1b1e23; flex: none; }
.con-prompt { color: #98c379; padding-top: 3px; user-select: none; font-weight: 600; min-width: 26px; }
.con-editor { flex: 1; min-width: 0; }
#console-dock.busy .con-prompt { color: #e5c07b; }
.con-hint { flex: none; padding: 2px 12px 4px 46px; color: #7f8794; font-size: 11px; font-family: var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #1b1e23; }
.con-hint.sig { font-family: var(--mono); color: #a9b2bf; }
.con-hint.sig code { color: #61afef; }
body.con-open #zoombar { bottom: calc(var(--con-h, 290px) + 34px); }
