/* try.css -- /try, the browser playground. Tokens from styles.css (--bg, --ink, --accent, --serif, --sans, --mono). A
   three-column workbench: tables on the left, the query and its result in the middle, the dataset's story on the
   right. Every class here is prefixed or scoped so web_class_check.py finds no collision with styles.css. */
.try-body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.try-body * { box-sizing: border-box; }
.try-body code { font-family: var(--mono); font-size: .92em; background: var(--code); padding: 1px 5px; border-radius: 4px; }
:where(.try-body) button { font: inherit; }   /* low specificity: a .chip or .tab sets its own size */

/* ---- header ---- */
.try-top { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 48px; border-bottom: 1px solid var(--rule); background: var(--bg); flex: none; }
.try-brand { font-size: 18px; gap: 6px; }
.try-title { font-family: var(--serif); font-size: 16px; color: var(--ink-soft); padding-left: 14px; border-left: 1px solid var(--rule); font-variation-settings: "opsz" 20; }
.try-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-soft); border: 1px solid var(--rule); border-radius: 999px; padding: 5px 12px 5px 9px; background: #fff; white-space: nowrap; }
.try-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(60, 166, 106, .18); }
.try-pill.busy .dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(224, 71, 28, .18); animation: try-pulse 1.1s ease-in-out infinite; }
@keyframes try-pulse { 50% { box-shadow: 0 0 0 6px rgba(224, 71, 28, .08); } }
.try-status { flex: 1; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.try-actions { display: flex; gap: 8px; align-items: center; }
.try-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 5px 12px; border-radius: 7px; background: var(--action); color: #fff; border: 1px solid var(--action); font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.try-btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.try-btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.try-btn.ghost:hover { background: var(--bg-soft); border-color: var(--ink); color: var(--ink); }
.try-btn.sm { min-height: 27px; padding: 2px 9px; font-size: 12px; }
.try-btn:disabled { opacity: .45; cursor: default; }
.try-btn:disabled:hover { background: transparent; border-color: var(--rule); color: var(--ink); }
.try-btn kbd { font-family: var(--mono); font-size: 11px; opacity: .75; border: 1px solid rgba(255, 255, 255, .35); border-radius: 4px; padding: 0 4px; }

/* ---- shell ---- */
.try-shell { flex: 1; display: grid; grid-template-columns: 270px minmax(0, 1fr) 320px; min-height: 0; }
.try-rail, .try-side { overflow: auto; background: var(--bg-soft); padding: 12px 12px 40px; }
.try-rail { border-right: 1px solid var(--rule); }
.try-side { border-left: 1px solid var(--rule); background: var(--bg); }
.try-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 10px 14px 0; gap: 8px; overflow: hidden; }

/* ---- rail ---- */
.rail-search input { width: 100%; font: inherit; font-size: 12.5px; padding: 6px 9px; border: 1px solid var(--rule); border-radius: 7px; background: #fff; color: var(--ink); }
.rail-sec { margin-top: 14px; }
.rail-h { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 6px; font-weight: 500; display: flex; align-items: baseline; gap: 8px; }
.rail-n { color: var(--muted); letter-spacing: 0; }
.rail-p { font-size: 11.5px; color: var(--muted); margin: 0 0 8px; line-height: 1.4; }
.ds-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ds { border-radius: 8px; background: transparent; }
.ds.on { background: #fff; box-shadow: 0 1px 0 var(--rule); }
.ds-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 5px; padding: 4px 7px 4px 5px; cursor: pointer; border-radius: 7px; }
.ds-row > span:nth-child(2) { min-width: 0; }
.ds-row:hover { background: rgba(255, 255, 255, .7); }
.ds-tog { width: 18px; height: 18px; border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0; font-size: 11px; transform: rotate(0); transition: transform .15s; }
.ds.open .ds-tog { transform: rotate(90deg); }
.ds-name { font-size: 12.5px; font-weight: 500; color: var(--ink); line-height: 1.25; }
.ds-sub { font-family: var(--mono); font-size: 10px; color: var(--muted); display: block; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-rows { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.ds-geo { color: var(--accent-deep); font-size: 11px; margin-left: 4px; }
.ds-cols { display: none; margin: 0 0 6px 24px; padding: 0 0 4px; list-style: none; border-left: 1px solid var(--rule); }
.ds.open .ds-cols { display: block; }
.ds-col { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; padding: 1px 8px 1px 10px; cursor: pointer; border-radius: 4px; }
.ds-col:hover { background: var(--bg-soft); }
.ds-col .ct { font-family: var(--mono); font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.ds-col .cn { font-family: var(--mono); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 4px; }
.ds-x:hover { color: var(--accent-deep); }
.ds-more { font-size: 12px; color: var(--muted); padding: 2px 10px; }
.drop { border: 1.5px dashed var(--rule); border-radius: 9px; padding: 10px 10px; text-align: center; font-size: 11.5px; color: var(--ink-soft); background: #fff; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.drop strong { font-weight: 500; }
.drop.over { border-color: var(--accent); background: var(--tint); }
.linkish { border: 0; background: transparent; color: var(--accent-deep); cursor: pointer; padding: 0; border-bottom: 1px solid var(--accent); font-size: inherit; }
.url-form { display: flex; gap: 6px; margin-top: 8px; }
.url-form input { flex: 1; min-width: 0; font: inherit; font-size: 11.5px; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 7px; background: #fff; }
.rail-err { font-size: 12.5px; color: var(--accent-deep); margin: 8px 0 0; line-height: 1.4; }
.hidden { display: none !important; }

/* ---- ask ---- */
.ask { display: flex; align-items: center; gap: 8px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; padding: 4px 4px 4px 12px; box-shadow: 0 1px 0 rgba(26, 25, 23, .03); position: relative; }
.ask:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(224, 71, 28, .10); }
.ask .spark, .insight .spark { color: var(--accent); font-size: 16px; line-height: 1; }
.ask input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 14px; background: transparent; color: var(--ink); padding: 6px 0; }
.ask input::placeholder { color: var(--muted); }
.ask-btn { min-height: 32px; }
.ask.thinking .spark { animation: try-spin 1.2s linear infinite; display: inline-block; }
@keyframes try-spin { to { transform: rotate(360deg); } }
.ask-note { margin: -2px 0 0; font-size: 12px; color: var(--ink-soft); min-height: 0; line-height: 1.45; padding: 0 4px; }
.ask-note.err { color: var(--accent-deep); }

/* ---- editor ---- */
.editor-box { border: 1px solid var(--rule); border-radius: 12px; background: #fff; overflow: hidden; flex: none; }
.editor-bar { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--rule); background: var(--bg-soft); }
.editor-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.editor-hint { flex: 1; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.limit { font-size: 11.5px; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; }
.limit select { font: inherit; font-size: 11.5px; padding: 2px 5px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
.run { min-height: 28px; }
.editor-box textarea { width: 100%; border: 0; font-family: var(--mono); font-size: 12.5px; padding: 12px 14px; resize: vertical; min-height: 140px; }
.editor-box .cm-host { margin: 0; }
.editor-box .cm-editor { min-height: 88px; max-height: 20vh; font-size: 12.5px; }
.editor-box .cm-scroller { overflow: auto; }
textarea.cm-hidden { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; opacity: 0 !important; pointer-events: none; margin: 0; padding: 0; border: 0; }
.err { border-top: 1px solid var(--rule); background: var(--tint); padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.err-msg { font-size: 12.5px; color: var(--accent-deep); line-height: 1.45; }
.err-ctx { margin: 0; font-family: var(--mono); font-size: 11px; white-space: pre; overflow: auto; color: var(--ink-soft); }
.err-ctx:empty { display: none; }
#err-fix { align-self: flex-start; }

/* ---- results ---- */
.results { flex: 1; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--rule); border-radius: 12px 12px 0 0; border-bottom: 0; background: #fff; overflow: hidden; }
.res-bar { display: flex; align-items: center; gap: 12px; padding: 4px 8px; border-bottom: 1px solid var(--rule); background: var(--bg-soft); flex: none; }
.tabs { display: flex; gap: 2px; }
.tab { border: 0; background: transparent; padding: 4px 10px; border-radius: 6px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; font-weight: 500; }
.tab:hover { background: rgba(255, 255, 255, .8); color: var(--ink); }
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 0 var(--rule); }
.tab:disabled { opacity: .4; cursor: default; }
.run-status { flex: 1; font-size: 11.5px; color: var(--muted); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-status .ok { color: var(--ok-text); }
.res-actions { display: flex; gap: 6px; }
.pane { flex: 1; min-height: 0; overflow: auto; position: relative; }
.insight { display: flex; gap: 9px; align-items: flex-start; padding: 8px 12px; border-bottom: 1px solid var(--rule); background: linear-gradient(90deg, #fff6f1, #fff 60%); }
.insight p { margin: 0; font-family: var(--serif); font-size: 14.5px; line-height: 1.45; color: var(--ink); font-variation-settings: "opsz" 16; }
.insight p.pending { color: var(--muted); font-style: italic; }
.try-grid { border-collapse: separate; border-spacing: 0; font-size: 12px; width: max-content; min-width: 100%; }
.try-grid th { position: sticky; top: 0; background: #fff; text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--rule); font-weight: 500; white-space: nowrap; z-index: 1; }
.try-grid th small { display: block; font-family: var(--mono); font-size: 9px; color: var(--muted); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; }
.try-grid td { padding: 3px 10px; border-bottom: 1px solid #f0ebe3; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.try-grid td.num { text-align: right; font-family: var(--mono); font-size: 11.5px; }
.try-grid td.null { color: var(--muted); font-style: italic; }
.try-grid td.geo { font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft); }
.try-grid .idx { color: var(--muted); font-family: var(--mono); font-size: 10px; text-align: right; background: var(--bg); }
.try-grid tbody tr:hover td { background: #fffaf6; }
.try-empty { color: var(--muted); padding: 24px; margin: 0; font-size: 14px; }

/* welcome */
.welcome { padding: 26px 30px 20px; max-width: 760px; }
.welcome-h { font-family: var(--serif); font-weight: 600; font-size: 32px; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 12px; font-variation-settings: "opsz" 40; }
.welcome-h em { font-style: normal; color: var(--accent); }
.welcome-p { font-family: var(--serif); font-size: 16px; line-height: 1.45; color: var(--ink-soft); margin: 0 0 22px; max-width: 56ch; font-variation-settings: "opsz" 18; }
.starters { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.starter { text-align: left; border: 1px solid var(--rule); border-radius: 9px; background: #fff; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, transform .12s; }
.starter:hover { border-color: var(--accent); transform: translateY(-1px); }
.starter b { font-weight: 500; font-size: 13px; }
.starter span { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.starter .kind { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); }

/* map & chart panes */
.map-ctl { display: flex; align-items: center; gap: 12px; padding: 4px 10px; border-bottom: 1px solid var(--rule); font-size: 11.5px; color: var(--ink-soft); flex-wrap: wrap; }
.map-ctl label { display: inline-flex; align-items: center; gap: 6px; }
.map-ctl select { font: inherit; font-size: 11.5px; padding: 2px 5px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; max-width: 180px; }
.map-note { color: var(--muted); }
#pane-map { display: flex; flex-direction: column; }
#pane-map.hidden { display: none !important; }
.map-box { flex: 1; min-height: 240px; position: relative; }
.map-box > .map-view { position: absolute !important; inset: 0; width: 100%; height: 100%; background: #f3f1ec; }
.map-legend { position: absolute; left: 10px; bottom: 28px; background: rgba(255, 255, 255, .92); border: 1px solid var(--rule); border-radius: 7px; padding: 6px 8px; font-size: 10.5px; z-index: 2; box-shadow: 0 2px 8px rgba(26, 25, 23, .08); }
.map-legend .lg-t { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin-bottom: 4px; }
.map-legend .lg-r { display: flex; align-items: center; gap: 7px; padding: 1px 0; font-family: var(--mono); }
.map-legend i { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.map-legend .lg-bar { width: 120px; height: 8px; border-radius: 4px; margin-top: 2px; }
.chart-legend .muted { color: var(--muted); }
.try-pop .maplibregl-popup-content { padding: 8px 10px; border-radius: 8px; font-family: var(--sans); box-shadow: 0 4px 16px rgba(26, 25, 23, .18); }
.pop-t { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.pop-r { display: flex; gap: 10px; justify-content: space-between; font-size: 12px; line-height: 1.5; }
.pop-k { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.pop-v { font-variant-numeric: tabular-nums; }
.chart-host { padding: 14px 16px 10px; position: relative; }
.chart-wrap { position: relative; }
.chart-title { font-family: var(--serif); font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; border-radius: 6px; padding: 6px 9px; font-size: 12px; line-height: 1.4; z-index: 3; max-width: 260px; }
.chart-tip .tip-k { font-weight: 600; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 6px 2px 0; font-size: 12.5px; color: var(--ink-soft); }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ---- side: story ---- */
.story-img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 10px; margin-bottom: 12px; background: var(--bg-soft); }
.story-eyebrow { font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-deep); margin: 0 0 6px; }
.story-h { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.015em; line-height: 1.1; margin: 0 0 6px; font-variation-settings: "opsz" 28; }
.story-tag { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: 14px; margin: 0 0 10px; line-height: 1.4; }
.story-p { font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); margin: 0 0 10px; }
.story-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 11.5px; margin: 0 0 14px; }
.story-facts dt { color: var(--muted); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding-top: 2px; }
.story-facts dd { margin: 0; }
.story-facts a { border-bottom: 1px solid var(--rule); }
.side-h { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin: 18px 0 8px; font-weight: 500; }
.side-p { font-size: 12px; color: var(--muted); line-height: 1.45; margin: 0 0 10px; }
.tour { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: step; }
.tour li { border: 1px solid var(--rule); border-radius: 9px; background: #fff; padding: 8px 10px 8px 34px; position: relative; cursor: pointer; transition: border-color .12s; }
.tour li::before { counter-increment: step; content: counter(step); position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 10.5px; display: grid; place-items: center; }
.tour li:hover, .tour li.on { border-color: var(--accent); }
.tour li.on::before { background: var(--accent); }
.tour b { display: block; font-weight: 500; font-size: 12.5px; margin-bottom: 1px; }
.tour span { font-size: 11.5px; color: var(--muted); line-height: 1.4; display: block; }
.tour .kind { position: absolute; right: 9px; top: 9px; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); }
.ideas-btn { margin-top: 8px; }
.ideas { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.ideas li { font-size: 12px; padding: 6px 9px; border: 1px dashed var(--rule); border-radius: 8px; cursor: pointer; background: #fff; }
.ideas li:hover { border-color: var(--accent); }
.take { margin-top: 22px; border-top: 1px solid var(--rule); padding-top: 4px; }
.take-list { display: flex; flex-direction: column; gap: 6px; }
.take-item { display: flex; flex-direction: column; gap: 1px; text-align: left; border: 1px solid var(--rule); border-radius: 9px; padding: 8px 10px; background: #fff; cursor: pointer; color: var(--ink); text-decoration: none; }
.take-item:hover { border-color: var(--accent); }
.take-item strong { font-weight: 500; font-size: 12.5px; }
.take-item span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.take-code { margin: 8px 0 0; font-family: var(--mono); font-size: 10.5px; line-height: 1.5; background: var(--dark); color: #f4efe6; border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 13.5px; z-index: 20; box-shadow: 0 8px 24px rgba(26, 25, 23, .2); }

@media (max-width: 1180px) { .try-shell { grid-template-columns: 240px minmax(0, 1fr); } .try-side { display: none; } .try-shell.side-open .try-side { display: block; position: fixed; right: 0; top: 48px; bottom: 0; width: 340px; z-index: 10; box-shadow: -8px 0 24px rgba(26, 25, 23, .12); } }
@media (max-width: 860px) {
  .try-body { overflow: auto; height: auto; }
  .try-top { flex-wrap: wrap; height: auto; padding: 8px 14px; gap: 6px 10px; }
  .try-title, .try-status { display: none; }
  .try-shell { display: block; }
  .try-rail { border: 0; border-bottom: 1px solid var(--rule); max-height: 40vh; }
  .try-main { padding: 12px 16px 0; }
  .try-main { overflow: visible; }
  .results { min-height: 480px; }
  .map-box { min-height: 380px; }
  .welcome { padding: 20px 16px; }
  .welcome-h { font-size: 30px; }
}

/* deck.gl's own tooltip (text only; web/try/map.js getTooltip returns `text`) */
.map-view .deck-tooltip { font-family: var(--sans) !important; font-size: 11.5px !important; line-height: 1.45 !important; background: var(--ink) !important; color: #fff !important; border-radius: 6px !important; padding: 6px 9px !important; max-width: 280px; white-space: pre-line; }

/* ---- the explore layout (2026-09-30, after the founder's mockup): question first, a headline, a visual panel over a
   table panel, the SQL collapsed at the bottom ---- */
.try-nav { display: flex; gap: 2px; margin-left: 6px; }
.try-nav a { padding: 5px 10px; border-radius: 7px; font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.try-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.try-nav a[aria-current="page"] { background: var(--tint); color: var(--accent-deep); }
.try-main { overflow: auto; padding-bottom: 16px; }
.try-main > * { flex: none; }   /* the column scrolls; nothing in it shrinks to fit (a flex child's default) */
.rail-chips { display: flex; gap: 6px; margin: 10px 0 4px; }
.chip { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule); background: #fff; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--tint); border-color: var(--tint); color: var(--accent-deep); font-weight: 500; }
.chip.ai { border-style: dashed; }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.qchips:empty { display: none; }
.ask { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 71, 28, .08); }
.ask .ask-btn { min-height: 34px; }
.res-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 4px 0 0; }
.res-title { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -.015em; line-height: 1.15; margin: 0 0 3px; font-variation-settings: "opsz" 24; }
.res-meta { margin: 0; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.res-meta code { background: transparent; padding: 0; color: var(--ink-soft); }
.rpanel { border: 1px solid var(--rule); border-radius: 10px; background: #fff; overflow: hidden; display: flex; flex-direction: column; flex: none; }
.pbar { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-bottom: 1px solid var(--rule); background: var(--bg-soft); flex-wrap: wrap; }
.pbar .tabs { gap: 1px; }
.pnote { flex: 1; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 40px; }
.pctl { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--ink-soft); }
.pctl label { display: inline-flex; align-items: center; gap: 5px; }
.pctl select { font: inherit; font-size: 11.5px; padding: 2px 5px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; max-width: 150px; }
.pbody { position: relative; }
.pbody-map .map-box { height: min(52vh, 480px); min-height: 300px; }
.pbody-chart .chart-host { padding: 10px 14px 8px; }
.pbody-table .table-host { max-height: 46vh; overflow: auto; }
#p2 .pbody-map .map-box { height: 360px; }
.try-grid th.sortable { cursor: pointer; user-select: none; }
.try-grid th .sort-mark { color: var(--muted); font-size: 10px; opacity: .45; }
.try-grid th.sorted .sort-mark { color: var(--accent-deep); opacity: 1; }
.try-grid td.bar { position: relative; min-width: 120px; }
.try-grid td.bar .dbar { position: absolute; left: 6px; top: 6px; bottom: 6px; max-width: calc(100% - 12px); background: rgba(224, 71, 28, .18); border-radius: 2px; pointer-events: none; }
.try-grid td.bar .dval { position: relative; }
.sqlbox { border: 1px solid var(--rule); border-radius: 10px; background: #fff; overflow: hidden; flex: none; }
.sql-bar { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 10px; background: var(--bg-soft); }
.sql-toggle { font: inherit; font-size: 12.5px; font-weight: 500; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; }
.sql-toggle .chev { display: inline-block; transition: transform .15s; font-size: 16px; line-height: 1; color: var(--muted); }
.sqlbox:not(.collapsed) .sql-toggle .chev { transform: rotate(90deg); }
.sql-meta { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.sql-bar .spacer { flex: 1; }
.sqlbox.collapsed .sql-body, .sqlbox.collapsed .cm-host { display: none; }
.sql-body { border-top: 1px solid var(--rule); }
.sql-hint { margin: 0; padding: 4px 12px 8px; font-size: 11px; color: var(--muted); }
.sqlbox .cm-host { margin: 0; }
.sqlbox .cm-editor { min-height: 88px; max-height: 32vh; font-size: 12.5px; }
.related { margin-top: 16px; border: 1px solid var(--rule); border-radius: 9px; background: #fff; padding: 8px 10px; }
.related-h { font-size: 12.5px; font-weight: 600; margin: 0 0 4px; }
.related-item { display: flex; justify-content: space-between; gap: 8px; width: 100%; font: inherit; font-size: 12px; padding: 4px 2px; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; border-top: 1px solid #f0ebe3; }
.related-item:first-of-type { border-top: 0; }
.related-item:hover .rn { color: var(--accent-deep); }
.related-item .rc { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
