/* ------------------------------------------------------------------------ *
 *  Asset Performance & Optimization for Energy user app — Data Quality page, the viewer's right-column
 *  tabs, and the Project page explanations. Loaded after style.css
 *  (alphabetical), so these rules win where they overlap.
 * ------------------------------------------------------------------------ */

/* ---------------------------------------------------- viewer right column */
.right-col { width: clamp(340px, 30vw, 680px); }
.rtab-bar { margin: 0.4rem 0.5rem 0; flex-shrink: 0; }
.rtab-bar .data-tab {
  /* four labels share the column: each takes an equal share and may wrap to two lines rather than be cut off */
  flex: 1 1 0; min-width: 0;
  white-space: normal; overflow-wrap: anywhere;
  font-size: 0.64rem; letter-spacing: 0.03em; line-height: 1.2;
  padding: 0.35rem 0.3rem; text-align: center;
  display: flex; align-items: center; justify-content: center;
}
.rtab-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.rtab-pane {
  flex: 1 1 0;
  min-height: 0;
  flex-direction: column;
}
.rtab-hint {
  padding: 0.25rem 0.7rem 0.1rem;
  font-size: 0.7rem;
  line-height: 1.4;
}
.cube-pane { display: flex; background: var(--panel-bg); }
.cube-pane .panel { flex: 1; }
/* The chatter and log panes used to carry a left border as the centre's
   second column; in the right column the column border does that. */
.right-col .chatter-pane, .right-col .log-pane { border-left: none; }

/* ------------------------------------------------------------ project page */
/* Long project names wrap inside the (taller, see optionHeight) option
   rows instead of being clipped at the row edge. */
.picker-project-dd .VirtualizedSelectOption,
.picker-project-dd .Select-option {
  display: flex;
  align-items: center;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
  padding: 0.3rem 0.6rem;
  font-size: 0.82rem;
}
.picker-project-dd .Select-value-label { overflow-wrap: anywhere; }
.picker-intro { margin-bottom: 0.6rem; font-size: 0.82rem; line-height: 1.55; }
.picker-help {
  margin: 0.15rem 0 0.7rem;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}
.picker-left .panel-title { margin-top: 0.4rem; }
/* The well checklist sits in a flex column that scrolls; without this it
   is squeezed to a few pixels once the explanations take the height. */
.picker-well-list { flex-shrink: 0; min-height: 4rem; max-height: 14rem; }
.picker-left > .panel-hint, .picker-left > .picker-row,
.picker-left > .load-btn, .picker-left > .load-progress { flex-shrink: 0; }
.picker-record {
  padding: 0.4rem 0 0.7rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px dotted var(--border-dim);
}
.picker-record .kv { border-bottom: none; padding: 0 0 0.2rem; }
/* label · count rows of the overview (style.css has no .kv rule) */
.picker-overview .kv {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.picker-overview .kv .k { color: var(--accent); font-weight: 600; }
.picker-overview .kv .v {
  font-variant-numeric: tabular-nums;
  padding: 0 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-bg2);
  font-size: 0.76rem;
}
.picker-kv { padding: 0.15rem 0; }
.picker-kv .picker-kv-hint { flex-basis: 100%; margin-bottom: 0.25rem; }
.picker-kv-hint {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}
.picker-kv { flex-wrap: wrap; }
.picker-kv .picker-kv-hint { flex-basis: 100%; }

/* --------------------------------------------------------- data quality */
.dq-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem 1.5rem;
  overflow-y: auto;
  background: var(--bg);
}
.dq-tiles { margin: 0; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); }
.dq-tile { text-align: center; cursor: help; }
.dq-tile .stat-val { font-size: 1.5rem; }
.dq-grade { font-size: 1.9rem !important; }
.dq-grade-A, .dq-grade-B { color: var(--tier-1, #3E8E5E) !important; }
.dq-grade-C { color: var(--tier-3, #A9C97E) !important; }
.dq-grade-D { color: var(--tier-4, #E2B85C) !important; }
.dq-grade-E { color: var(--tier-6, #C44E52) !important; }
.dq-note { font-size: 0.76rem; }
.dq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(20rem, 24rem);
  gap: 0.6rem;
}
@media (max-width: 70rem) { .dq-grid { grid-template-columns: 1fr; } }
.dq-graph {
  min-height: 0;
  min-width: 0;
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-sm);
  background: var(--panel-bg2);
  overflow: hidden;
}
.dq-graph > div, .dq-graph .dash-graph, .dq-graph .js-plotly-plot,
.dq-graph .plot-container, .dq-graph .svg-container {
  height: 100% !important;
  width: 100% !important;
}
.dq-work, .dq-legend {
  padding: 0.7rem 0.9rem;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}
.dq-work-row { flex-wrap: wrap; }
.dq-work-row .tf-rank { color: var(--muted); min-width: 1.6rem; }
.dq-work-row .tf-well { min-width: 15rem; font-weight: 600; }
.dq-work-row .tf-ratio { min-width: 7rem; color: var(--amber); }
.dq-work-row .tf-badges { min-width: 6.5rem; color: var(--muted); }
.dq-work-row .tf-missing { flex: 1 1 18rem; color: var(--text); }
.dq-legend-row {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.22rem 0;
  border-bottom: 1px dotted var(--border-dim);
  font-size: 0.76rem;
  line-height: 1.45;
}
.dq-legend-name { font-weight: 600; white-space: nowrap; }
.dq-legend-def { color: var(--muted); }
/* The legend lives in the sidebar: compact, wrapping rows. */
.sidebar .dq-legend {
  padding: 0.5rem 0.6rem;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
}
.sidebar .dq-legend .tf-head { font-size: 0.78rem; }
.dq-legend > summary {
  cursor: pointer;
  list-style-position: inside;
  user-select: none;
}
.dq-legend > summary:hover { color: var(--accent-dim); }
.dq-legend[open] > summary { margin-bottom: 0.2rem; }
.sidebar .dq-legend-row {
  flex-wrap: wrap;
  font-size: 0.68rem;
  line-height: 1.4;
  padding: 0.3rem 0;
}
.sidebar .dq-legend-def { flex-basis: 100%; }

/* ------------------------------------------------------------- benchmark */
.bm-main { gap: 0.6rem; }
.bm-sidebar .control-label { margin-top: 0.5rem; }
.bm-project { margin-bottom: 0.3rem; font-weight: 600; }
.bm-upload {
  margin: 0.3rem 0;
  padding: 0.35rem 0.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
  cursor: pointer;
}
.bm-upload:hover { color: var(--accent); border-color: var(--accent-dim); }
.bm-qset-info { margin: 0.3rem 0 0.2rem; }
.bm-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.25rem; }
.bm-type-chip {
  display: inline-block;
  padding: 0 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--panel-bg2);
  border: 1px solid var(--border-dim);
  color: var(--muted);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.bm-secret { width: 100%; margin: 0.2rem 0 0.1rem; }
.bm-cred-badge {
  display: block;
  font-size: 0.7rem;
  margin-bottom: 0.3rem;
  padding-left: 0.2rem;
}
.bm-cred-ok { color: var(--ok); }
.bm-cred-warn { color: var(--amber); }
.bm-cred-err { color: var(--err); }
.bm-help .bm-help-body { font-size: 0.7rem; line-height: 1.45; color: var(--muted); }
.bm-help .bm-help-body code { color: var(--amber); }
.bm-help .bm-help-body ol { padding-left: 1.1rem; }
.bm-warn {
  margin: 0.25rem 0;
  padding: 0.3rem 0.5rem;
  border-left: 3px solid var(--amber);
  color: var(--amber);
  font-size: 0.72rem;
}
.bm-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.4rem 0; }
.bm-actions .load-btn { flex: 1 1 auto; }
.bm-downloads .sim-btn { font-size: 0.7rem; }
.bm-run-head { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: baseline; }
.bm-run-id { font-weight: 600; color: var(--accent); }
.bm-feed {
  max-height: 18rem;
  overflow-y: auto;
  padding: 0.4rem 0.6rem;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
}
.bm-feed:empty { display: none; }
.bm-feed-row {
  display: grid;
  grid-template-columns: 4.5rem 6rem minmax(10rem, 1fr) minmax(10rem, 1fr) 7rem 6rem;
  gap: 0.5rem;
  align-items: center;
  padding: 0.25rem 0;
  border-bottom: 1px dotted var(--border-dim);
}
.bm-feed-id { font-weight: 600; color: var(--accent); }
.bm-feed-q, .bm-feed-a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-feed-a { color: var(--muted); }
.bm-feed-meta { color: var(--muted); font-size: 0.7rem; white-space: nowrap; }
.bm-verdict {
  display: inline-block;
  padding: 0 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--panel-bg);
  background: var(--muted);
  white-space: nowrap;
}
.bm-verdict-correct { background: var(--tier-1, #3E8E5E); }
.bm-verdict-abstain_ok { background: var(--tier-2, #6DAE72); }
.bm-verdict-partial { background: var(--tier-3, #A9C97E); }
.bm-verdict-abstain_bad { background: var(--tier-4, #E2B85C); }
.bm-verdict-incorrect { background: var(--tier-5, #DA8452); color: #10130f; }
.bm-verdict-hallucination { background: var(--tier-6, #C44E52); color: #10130f; }
.bm-verdict-error, .bm-verdict-pending { background: var(--border); color: var(--text); }
.bm-tiles .stat-val { font-size: 1.35rem; }
.bm-ts { font-size: 1.9rem !important; }
.bm-ts-hi { color: var(--tier-1, #3E8E5E) !important; }
.bm-ts-mid { color: var(--tier-4, #E2B85C) !important; }
.bm-ts-lo { color: var(--tier-6, #C44E52) !important; }
.bm-bad { color: var(--tier-6, #C44E52) !important; }
.bm-type-tiles .stat-val { font-size: 1.1rem; }
.bm-type-tiles:empty { display: none; }
.bm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 0.6rem;
}
@media (max-width: 70rem) { .bm-grid { grid-template-columns: 1fr; } }
.bm-graph { min-height: 20rem; }
.bm-cmp {
  padding: 0.6rem 0.8rem;
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.bm-cmp-pick { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.4rem; align-items: center; }
.bm-cmp-heat { height: 18rem; }
.bm-delta-pos { color: var(--tier-1, #3E8E5E) !important; }
.bm-delta-neg { color: var(--tier-6, #C44E52) !important; }
.bm-table { display: flex; flex-direction: column; gap: 0.3rem; }
.bm-q {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}
.bm-q > summary {
  display: grid;
  grid-template-columns: 4.5rem 6rem 4rem 7.5rem minmax(10rem, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.bm-q > summary::-webkit-details-marker { display: none; }
.bm-q > summary:hover .bm-feed-q { color: var(--accent); }
.bm-q-body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.5rem 0 0.3rem;
  border-top: 1px dotted var(--border-dim);
  margin-top: 0.35rem;
}
@media (max-width: 70rem) { .bm-q-body { grid-template-columns: 1fr; } }
.bm-q-text { margin-bottom: 0.4rem; }
.bm-answer { max-height: 26rem; overflow-y: auto; }
.bm-gold {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.72rem;
  padding: 0.35rem 0.5rem;
  background: var(--panel-bg2);
  border-radius: var(--radius-sm);
  margin: 0 0 0.4rem;
}
.bm-grade-cols { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.4rem; }
.bm-grade-col { padding: 0.3rem 0.5rem; border-left: 2px solid var(--border-dim); }
.bm-grader-name { font-weight: 600; margin-right: 0.4rem; }
.bm-rationale { color: var(--muted); margin-top: 0.15rem; }
.bm-proof { padding-left: 1.1rem; margin: 0.2rem 0; font-size: 0.72rem; line-height: 1.5; }
.bm-proof code { color: var(--amber); font-size: 0.68rem; }
.bm-proof a { color: var(--accent); text-decoration: none; }


/* ------------------------------------------------------------ connection */
.conn-server-dd { flex: 0 0 9rem; }
/* .load-btn is full-width for the step-3 Load button; in the connection
   row it shares the line with the server picker and Forget. */
.conn-server-dd ~ .load-btn { width: auto; flex: 1 1 auto; margin: 0; }
.conn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.5rem;
  margin: 0.3rem 0;
}
.conn-input { width: 100%; margin: 0; }
.conn-status { display: flex; flex-direction: column; gap: 0.2rem; margin: 0.2rem 0 0.4rem; font-size: 0.74rem; }
.conn-row { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; align-items: baseline; }
.conn-name { font-weight: 600; color: var(--accent); }
.conn-src { white-space: nowrap; }
.conn-ok { color: var(--ok); }
.conn-none { color: var(--muted); }

.bm-explainer, .bm-set-preview { font-size: 0.8rem; }
.bm-explainer-body p, .bm-explainer-body li { margin: 0.3rem 0; line-height: 1.5; color: var(--text); }
.bm-explainer-body ol { padding-left: 1.2rem; }
.bm-set-body { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.3rem; }
.bm-q-preview > summary { grid-template-columns: 3.5rem 6rem 3.5rem 5.5rem minmax(10rem, 1fr); }
.bm-q-full { white-space: normal; }
.bm-set-questions:empty { display: none; }

/* Project tab: choose server + project here (any server this app has a key for) */
.picker-choose { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(12rem, 2fr) auto; gap: 0.4rem; align-items: center; margin: 0.4rem 0 0.2rem; }
.picker-choose .load-btn { margin-top: 0; width: auto; padding: 0.45rem 0.8rem; }
@media (max-width: 60rem) { .picker-choose { grid-template-columns: 1fr; } }

/* ---- Benchmark tab revamp: project picker, editions, grounding, engineer's view, pairing ---- */
.bm-edition { border-style: dashed; }
.bm-edition-pack { color: var(--accent2); border-color: var(--accent2-dim); }
.bm-edition-original { color: var(--accent); border-color: var(--accent-dim); }
.bm-group-row { display: flex; align-items: center; gap: 0.6rem; margin: 0.2rem 0 -0.2rem; }
.bm-group-label { margin: 0; }
.bm-group label { margin-right: 0.8rem; }
.bm-ground {
  display: inline-block; padding: 0 0.4rem; border-radius: 0.6rem; font-size: 0.66rem;
  border: 1px solid var(--border); color: var(--muted); white-space: nowrap; cursor: help;
}
.bm-ground-2 { color: var(--ok); border-color: var(--ok); }
.bm-ground-1 { color: var(--amber); border-color: var(--amber); }
.bm-ground-0 { color: var(--err); border-color: var(--err); }
.bm-ground-tile { color: var(--accent2) !important; }
.bm-cmp-table { width: 100%; border-collapse: collapse; font-size: 0.74rem; margin: 0.3rem 0; }
.bm-cmp-table th, .bm-cmp-table td { padding: 0.15rem 0.4rem; text-align: right; border-bottom: 1px solid var(--border-dim); }
.bm-cmp-table th:first-child, .bm-cmp-table td:first-child { text-align: left; }
.bm-cmp-table .bm-cmp-group th { text-align: left; color: var(--accent); padding-top: 0.45rem; border-bottom: 1px solid var(--border); }
/* the live answer feed sits in a flex column with the charts: never let it be squeezed to nothing */
.bm-main .bm-feed { flex: 0 0 auto; }
/* reView tab: the row above the embedded platform (sign-in hint + open in a new tab) */
.review-page { flex-direction: column; }
.review-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.5rem 0.9rem 0; }
.review-row .tf-head { margin: 0; }
.review-open { margin-left: auto; text-decoration: none; }
.review-note { padding: 0.25rem 0.9rem 0.5rem; }


/* Sign-in notice: shown across the top while the app holds no working reView sign-in */
.signin-banner { display: flex; align-items: center; gap: 14px; padding: 8px 16px; margin: 0;
  background: var(--wash); border-bottom: 1px solid var(--accent-dim); color: var(--text); font-size: 13px; flex: 0 0 auto; }
.signin-title { font-weight: 700; white-space: nowrap; }
.signin-text { flex: 1; color: var(--muted); }
.signin-btn { white-space: nowrap; background: var(--accent); color: var(--accent-contrast); text-decoration: none;
  padding: 6px 14px; border-radius: 6px; font-weight: 600; }
.signin-btn:hover { background: var(--accent-dim); }

/* Project tab: the dataset loader fold */
.picker-loader { margin: 10px 0 14px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: var(--panel-bg2); }
.picker-loader > summary { cursor: pointer; list-style: none; }
.picker-loader > summary::-webkit-details-marker { display: none; }
.picker-loader > summary::before { content: "▸ "; color: var(--muted); }
.picker-loader[open] > summary::before { content: "▾ "; }
.picker-loader .picker-row { margin: 6px 0; }
.picker-loader input.control { width: 100%; margin: 6px 0; }
.gl-log { font-size: 11px; color: var(--muted); white-space: pre-wrap; max-height: 120px; overflow: auto; margin: 6px 0 0; }
.picker-left .picker-row { flex-wrap: wrap; }
.picker-left .picker-row .load-btn { width: auto; flex: 1 1 12rem; }
.picker-left .picker-row > button.control:not(.load-btn) { flex: 0 0 auto; }
.picker-left .picker-row > .panel-hint { flex: 1 1 100%; margin: 0; }

/* Project tab: nothing scrolls the page sideways; the loader's button is always visible */
#module-picker { overflow-x: hidden; }
#module-picker .picker-body { max-width: 100%; }
#module-picker .picker-left { min-width: 0; }
#module-picker .picker-right { min-width: 0; overflow-x: hidden; }
#module-picker .picker-loader .picker-row { flex-wrap: wrap; }

/* Datasets: the generator's nine settings in a tidy grid */
.dg-fold { margin: 8px 0; border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; }
.dg-fold > summary { cursor: pointer; }
.dg-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; margin: 8px 0 4px; }
.dg-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dg-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.dg-ctl { width: 100%; }
.dg-form input.control { width: 100%; box-sizing: border-box; }
.dg-into { margin-top: 10px; font-weight: 600; }

/* Load finished: a plain, visible confirmation */
.gl-done { margin: 8px 0; padding: 10px 12px; border-radius: 6px; font-weight: 600;
           background: rgba(46, 160, 67, 0.12); border: 1px solid rgba(46, 160, 67, 0.45); color: inherit; }

/* Project tab: record types open to show a few rows */
.picker-record > summary.rec-sum { cursor: pointer; list-style: none; }
.picker-record > summary.rec-sum::-webkit-details-marker { display: none; }
.picker-record .rec-more { margin-left: 10px; font-size: 11px; opacity: .6; text-decoration: underline; }
.picker-record[open] .rec-more { visibility: hidden; }
.rec-snip { overflow-x: auto; margin: 6px 0 10px; }
.rec-table { border-collapse: collapse; font-size: 11.5px; }
.rec-table th, .rec-table td { padding: 3px 8px; border-bottom: 1px solid rgba(127,127,127,.25); text-align: left; white-space: nowrap; }
.rec-table th { font-weight: 600; }

/* Benchmark: runs in progress, above every step */
.gx-live:empty { display: none; }
.gx-live { padding: 8px 20px 4px; }
.gx-live-run { max-width: 640px; margin-bottom: 8px; }
.gx-live-name { font-size: 12px; font-weight: 600; margin-bottom: 3px; }

/* Header: the app's name, readable at a glance (MARIFA wordmark is gone) */
.brand .brand-product { font-size: 1.05em; font-weight: 600; color: var(--text, inherit); letter-spacing: .01em; }
/* run bars live on the Run step; the box hides itself when nothing runs */
.gx-live-box:has(.gx-live:empty) { display: none; }
.gx-live-box .gx-live { padding: 4px 0 8px; }

/* ------------------------------------------------ reView-style frame: icon rail on the left */
.app.app-rail { flex-direction: row; }
.app-rail > .main { flex: 1; min-width: 0; height: 100vh; display: flex; flex-direction: column; }
.rail {
  width: 4.7rem; flex-shrink: 0; height: 100vh; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  padding: 0.7rem 0; background: var(--panel-bg); border-right: 1px solid var(--border);
}
.rail-logo { width: 2.2rem; height: 2.2rem; image-rendering: -webkit-optimize-contrast; }
.rail .module-bar {
  flex-direction: column; align-items: center; gap: 0.3rem; width: 100%;
  padding: 0; border: none; background: transparent; overflow-x: hidden; overflow-y: auto;
}
.rail .module-tab {
  flex-direction: column; justify-content: center; gap: 0.25rem;
  width: 3.9rem; padding: 0.5rem 0.15rem; box-sizing: border-box;
  border: 1px solid transparent; border-radius: 8px;
  font-size: 0.58rem; font-weight: 600; letter-spacing: 0; text-transform: none;
  line-height: 1.15; white-space: normal; text-align: center; text-shadow: none;
}
.rail .module-tab .tab-icon { font-size: 1.2rem; }
.rail .module-tab:hover { background: var(--panel-bg2); border-color: transparent; color: var(--text); }
.rail .module-tab.module-active {
  background: var(--panel-bg2); color: var(--accent);
  border-color: var(--border); box-shadow: 0 1px 2px rgba(22, 20, 31, 0.08); text-shadow: none;
}
.rail .module-tab.tab-drop-left { box-shadow: 0 -3px 0 0 var(--accent2); }
.rail .module-tab.tab-drop-right { box-shadow: 0 3px 0 0 var(--accent2); }
/* the mark lives on the rail now; the top bar keeps the app name and the graph */
.app-rail .header .brand-logo { display: none; }

/* ------------------------------------------------ account button and card (bottom of the rail) */
.rail { position: relative; }
.rail-spacer { flex: 1; }
.acct-btn {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: 1.15rem; cursor: pointer; flex-shrink: 0;
}
.acct-btn:hover { color: var(--text); background: var(--panel-bg2); }
.acct-btn.acct-in { color: var(--accent); border-color: var(--accent); }
.acct-menu {
  position: absolute; left: 0.6rem; bottom: 3.6rem; z-index: 50; width: 15.5rem;
  background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 6px 22px rgba(22, 20, 31, 0.16); padding: 1rem 1rem 0.9rem;
}
.acct-name { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.acct-email { font-size: 0.82rem; color: var(--muted); margin-top: 0.15rem; word-break: break-all; }
.acct-note { font-size: 0.68rem; color: var(--muted); margin-top: 0.4rem; }
.acct-row { display: flex; align-items: center; gap: 0.6rem; margin: 0.9rem 0; }
.acct-switch {
  width: 2.6rem; height: 1.45rem; border-radius: 1rem; border: 1px solid var(--border);
  background: var(--panel-bg2); color: var(--text); cursor: pointer; font-size: 0.8rem; line-height: 1;
}
.acct-switch-label { font-size: 0.85rem; color: var(--text); }
.acct-actions a {
  display: block; text-align: center; padding: 0.5rem; border-radius: 6px; font-size: 0.88rem;
  text-decoration: none; font-family: inherit;
}
.acct-logout { color: #c0392b; border: 1px solid #c0392b; }
.acct-logout:hover { background: rgba(192, 57, 43, 0.06); }
.acct-signin { color: var(--accent-contrast); background: var(--accent); border: 1px solid var(--accent); }
.acct-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 0.25rem; }
.acct-env { font-size: 0.85rem; margin-bottom: 0.35rem; }
.acct-env-other { width: 100%; box-sizing: border-box; font-size: 0.8rem; padding: 0.3rem 0.45rem; margin-bottom: 0.75rem;
  border: 1px solid var(--border); border-radius: 6px; background: var(--panel-bg); color: var(--text); }
/* profile icon: a person in a circle, drawn in the button's current colour (works in both themes) */
.acct-btn { border: none; display: flex; align-items: center; justify-content: center; padding: 0; }
.acct-icon {
  display: block; width: 1.55rem; height: 1.55rem; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><circle cx='12' cy='10' r='3.2'/><path d='M6.2 18.7c1.3-2.3 3.4-3.5 5.8-3.5s4.5 1.2 5.8 3.5'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><circle cx='12' cy='10' r='3.2'/><path d='M6.2 18.7c1.3-2.3 3.4-3.5 5.8-3.5s4.5 1.2 5.8 3.5'/></svg>") center / contain no-repeat;
}
.acct-btn.acct-in .acct-icon { color: var(--accent); }
.acct-btn.acct-in { border: none; }

/* ------------------------------------------------ rail: line icons only, the page name on hover */
.rail { width: 3.9rem; }
.rail .module-bar { overflow: visible; gap: 0.35rem; }
.rail .module-tab { width: 2.75rem; height: 2.75rem; padding: 0; position: relative; }
.rail .module-tab .tab-label { display: none; }
.rail .ico { display: block; width: 1.35rem; height: 1.35rem; font-size: 0; color: transparent; background-color: var(--muted);
  -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; text-shadow: none; }
.rail .module-tab:hover .ico { background-color: var(--text); }
.rail .module-tab.module-active .ico { background-color: var(--accent); }
.rail .ico-viewer { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2.5 3.5 7.2v9.6L12 21.5l8.5-4.7V7.2z'/><path d='M3.5 7.2 12 12l8.5-4.8'/><path d='M12 12v9.5'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2.5 3.5 7.2v9.6L12 21.5l8.5-4.7V7.2z'/><path d='M3.5 7.2 12 12l8.5-4.8'/><path d='M12 12v9.5'/></svg>"); }
.rail .ico-bench { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2.5 6.5 21.5'/><path d='M12 2.5l5.5 19'/><path d='M8.7 14h6.6'/><path d='M7.6 18h8.8'/><path d='M9.9 9.5h4.2'/><path d='M3.5 21.5h17'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2.5 6.5 21.5'/><path d='M12 2.5l5.5 19'/><path d='M8.7 14h6.6'/><path d='M7.6 18h8.8'/><path d='M9.9 9.5h4.2'/><path d='M3.5 21.5h17'/></svg>"); }
.rail .ico-prod { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2.8s6.3 7 6.3 11.8a6.3 6.3 0 0 1-12.6 0C5.7 9.8 12 2.8 12 2.8z'/><path d='M9.2 15.2a2.9 2.9 0 0 0 2.8 2.6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2.8s6.3 7 6.3 11.8a6.3 6.3 0 0 1-12.6 0C5.7 9.8 12 2.8 12 2.8z'/><path d='M9.2 15.2a2.9 2.9 0 0 0 2.8 2.6'/></svg>"); }
.rail .ico-quality { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 21.5s7.5-3.6 7.5-9.6V5.4L12 2.5 4.5 5.4v6.5c0 6 7.5 9.6 7.5 9.6z'/><path d='m8.8 12 2.2 2.2 4.3-4.4'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M12 21.5s7.5-3.6 7.5-9.6V5.4L12 2.5 4.5 5.4v6.5c0 6 7.5 9.6 7.5 9.6z'/><path d='m8.8 12 2.2 2.2 4.3-4.4'/></svg>"); }
.rail .ico-benchmark { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><circle cx='12' cy='12' r='5.2'/><circle cx='12' cy='12' r='1.6'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><circle cx='12' cy='12' r='5.2'/><circle cx='12' cy='12' r='1.6'/></svg>"); }
.rail .ico-review { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='16' rx='2.2'/><path d='M3 9h18'/><path d='M6.5 6.5h.01'/><path d='M9 6.5h.01'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='16' rx='2.2'/><path d='M3 9h18'/><path d='M6.5 6.5h.01'/><path d='M9 6.5h.01'/></svg>"); }
.rail .ico-voxel { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3.5' y='3.5' width='7' height='7' rx='1'/><rect x='13.5' y='3.5' width='7' height='7' rx='1'/><rect x='3.5' y='13.5' width='7' height='7' rx='1'/><rect x='13.5' y='13.5' width='7' height='7' rx='1'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3.5' y='3.5' width='7' height='7' rx='1'/><rect x='13.5' y='3.5' width='7' height='7' rx='1'/><rect x='3.5' y='13.5' width='7' height='7' rx='1'/><rect x='13.5' y='13.5' width='7' height='7' rx='1'/></svg>"); }
.rail .ico-readme { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M2.5 4.5h6a3.5 3.5 0 0 1 3.5 3.5v12.5a2.6 2.6 0 0 0-2.6-2.6H2.5z'/><path d='M21.5 4.5h-6A3.5 3.5 0 0 0 12 8v12.5a2.6 2.6 0 0 1 2.6-2.6h6.9z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M2.5 4.5h6a3.5 3.5 0 0 1 3.5 3.5v12.5a2.6 2.6 0 0 0-2.6-2.6H2.5z'/><path d='M21.5 4.5h-6A3.5 3.5 0 0 0 12 8v12.5a2.6 2.6 0 0 1 2.6-2.6h6.9z'/></svg>"); }
.rail .ico-picker { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><ellipse cx='12' cy='5.5' rx='7.5' ry='2.8'/><path d='M4.5 5.5v13c0 1.6 3.4 2.9 7.5 2.9s7.5-1.3 7.5-2.9v-13'/><path d='M4.5 12c0 1.6 3.4 2.9 7.5 2.9s7.5-1.3 7.5-2.9'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><ellipse cx='12' cy='5.5' rx='7.5' ry='2.8'/><path d='M4.5 5.5v13c0 1.6 3.4 2.9 7.5 2.9s7.5-1.3 7.5-2.9v-13'/><path d='M4.5 12c0 1.6 3.4 2.9 7.5 2.9s7.5-1.3 7.5-2.9'/></svg>"); }
/* the name, on hover, in a small tag to the right of the icon */
.rail .module-tab::after {
  content: attr(data-label); position: absolute; left: calc(100% + 0.55rem); top: 50%; transform: translateY(-50%);
  padding: 0.22rem 0.5rem; border-radius: 5px; background: var(--text); color: var(--bg);
  font-size: 0.72rem; font-weight: 600; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .12s ease .15s; z-index: 60; }
.rail .module-tab:hover::after { opacity: 1; }
.acct-tie { margin-top: 0.3rem; }
.acct-tie-off { color: var(--amber); }
/* sign-in lives in the account card now: no banner across the top */
.signin-banner { display: none !important; }
.acct-btn { position: relative; }
.acct-btn.acct-warn::after {
  content: ""; position: absolute; top: 0.2rem; right: 0.2rem; width: 0.55rem; height: 0.55rem;
  border-radius: 50%; background: var(--amber); border: 2px solid var(--panel-bg);
}

/* ------------------------------------------------ rail, reView style: clean line icons, a white tile for the active page */
.rail { width: 4.2rem; background: var(--bg); border-right: none; padding: 0.9rem 0 0.8rem; gap: 1.3rem; }
.rail .module-bar { gap: 0.75rem; }
.rail .module-tab { width: 2.9rem; height: 2.9rem; border-radius: 9px; border: 1px solid transparent; background: transparent; box-shadow: none; }
.rail .module-tab:hover { background: var(--panel-bg); border-color: var(--border-dim); }
.rail .module-tab.module-active { background: var(--panel-bg); border-color: var(--border); box-shadow: 0 1px 3px rgba(22,20,31,.10), 0 1px 2px rgba(22,20,31,.06); }
.rail .ico { width: 1.4rem; height: 1.4rem; background-color: var(--text); opacity: .85; }
.rail .module-tab:hover .ico { opacity: 1; background-color: var(--text); }
.rail .module-tab.module-active .ico { opacity: 1; background-color: var(--text); }
.rail-logo { width: 2.3rem; height: 2.3rem; }
/* the page area: a white panel with rounded corners on the canvas, as in reView */
.app.app-rail { background: var(--bg); }
.app-rail > .main { margin: 0.55rem 0.55rem 0.55rem 0; height: calc(100vh - 1.1rem); background: var(--panel-bg);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.app-rail .header { border-radius: 10px 10px 0 0; }
.rail .ico-viewer { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/><path d='M3.3 7 12 12l8.7-5'/><path d='M12 22V12'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/><path d='M3.3 7 12 12l8.7-5'/><path d='M12 22V12'/></svg>"); }
.rail .ico-bench { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3 7 21'/><path d='M12 3l5 18'/><path d='M8.8 14.5h6.4'/><path d='M7.7 18.5h8.6'/><path d='M10.1 10h3.8'/><path d='M4 21h16'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3 7 21'/><path d='M12 3l5 18'/><path d='M8.8 14.5h6.4'/><path d='M7.7 18.5h8.6'/><path d='M10.1 10h3.8'/><path d='M4 21h16'/></svg>"); }
.rail .ico-prod { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z'/></svg>"); }
.rail .ico-quality { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/><path d='m9 12 2 2 4-4'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/><path d='m9 12 2 2 4-4'/></svg>"); }
.rail .ico-benchmark { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><circle cx='12' cy='12' r='6'/><circle cx='12' cy='12' r='2'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><circle cx='12' cy='12' r='6'/><circle cx='12' cy='12' r='2'/></svg>"); }
.rail .ico-review { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='18' cy='5' r='3'/><circle cx='6' cy='12' r='3'/><circle cx='18' cy='19' r='3'/><path d='m8.59 13.51 6.83 3.98'/><path d='m15.41 6.51-6.82 3.98'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='18' cy='5' r='3'/><circle cx='6' cy='12' r='3'/><circle cx='18' cy='19' r='3'/><path d='m8.59 13.51 6.83 3.98'/><path d='m15.41 6.51-6.82 3.98'/></svg>"); }
.rail .ico-voxel { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><rect width='7' height='7' x='3' y='3' rx='1'/><rect width='7' height='7' x='14' y='3' rx='1'/><rect width='7' height='7' x='14' y='14' rx='1'/><rect width='7' height='7' x='3' y='14' rx='1'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><rect width='7' height='7' x='3' y='3' rx='1'/><rect width='7' height='7' x='14' y='3' rx='1'/><rect width='7' height='7' x='14' y='14' rx='1'/><rect width='7' height='7' x='3' y='14' rx='1'/></svg>"); }
.rail .ico-readme { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/><path d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/><path d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/></svg>"); }
.rail .ico-picker { -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><ellipse cx='12' cy='5' rx='9' ry='3'/><path d='M3 5v14a9 3 0 0 0 18 0V5'/><path d='M3 12a9 3 0 0 0 18 0'/></svg>"); mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><ellipse cx='12' cy='5' rx='9' ry='3'/><path d='M3 5v14a9 3 0 0 0 18 0V5'/><path d='M3 12a9 3 0 0 0 18 0'/></svg>"); }
.acct-btn { width: 2.9rem; height: 2.9rem; border-radius: 9px; color: var(--text); background: transparent; }
.acct-btn .acct-icon { width: 1.5rem; height: 1.5rem; opacity: .85; }
.acct-btn:hover { background: var(--panel-bg); }
.acct-btn.acct-in .acct-icon { color: var(--text); opacity: 1; }

/* ------------------------------------------------ graph page: cards, stat tiles, grouped records */
.picker-body { gap: 1.4rem; padding: 0.2rem 0.4rem; }
.picker-left { flex: 0 0 30rem; gap: 0.8rem; overflow-y: auto; }
.pk-card {
  background: var(--panel-bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.55rem; flex-shrink: 0;
}
.pk-current { background: var(--wash); border-color: transparent; }
.pk-eyebrow { font-size: 0.68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.pk-name { font-size: 1.15rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.pk-chips, .pk-keys { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.pk-chip { font-size: 0.72rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--panel-bg);
  border: 1px solid var(--border); color: var(--text); }
.pk-chip.dim { color: var(--muted); }
.pk-key { font-size: 0.68rem; padding: 0.05rem 0.45rem; border-radius: 999px; cursor: help; border: 1px solid var(--border); }
.pk-key.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.pk-key.none { color: var(--muted); }
.pk-key.bad { color: var(--err); border-color: var(--err); }
.pk-sub { font-size: 0.74rem; color: var(--muted); line-height: 1.5; }
.pk-fields { display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem; }
.pk-field { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.pk-label { font-size: 0.72rem; color: var(--muted); }
.pk-actions { display: flex; gap: 0.5rem; }
.pk-actions .pk-primary { flex: 1; margin-top: 0; }
.pk-secondary { background: var(--panel-bg); color: var(--accent); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 0 1rem; font-weight: 600; cursor: pointer; }
.pk-secondary:hover { background: var(--wash); }
.pk-status:empty { display: none; }
.pk-status { font-size: 0.78rem; color: var(--text); }
.pk-summary { cursor: pointer; font-weight: 600; color: var(--text); font-size: 0.9rem; list-style: none; }
.pk-summary::before { content: "▸"; display: inline-block; margin-right: 0.45rem; color: var(--muted); transition: transform .15s; }
details[open] > .pk-summary::before { transform: rotate(90deg); }
.picker-loader.pk-card { display: block; }
.picker-loader[open] .pk-summary { margin-bottom: 0.6rem; }

.picker-right { padding-right: 0.4rem; }
.pk-title { font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.picker-right > .pk-sub { margin-bottom: 0.9rem; max-width: 60rem; }
.picker-overview { gap: 1rem; }
.pk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.6rem; }
.pk-stat { border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.85rem; background: var(--panel-bg); }
.pk-stat-v { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.pk-stat-k { font-size: 0.75rem; font-weight: 600; color: var(--accent); margin-top: 0.1rem; }
.pk-stat-h { font-size: 0.68rem; color: var(--muted); line-height: 1.4; margin-top: 0.15rem; }
.pk-group { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel-bg); }
.pk-group-head { display: flex; align-items: baseline; gap: 0.6rem; padding: 0.55rem 0.85rem;
  background: var(--bg); border-bottom: 1px solid var(--border-dim); flex-wrap: wrap; }
.pk-group-t { font-weight: 600; font-size: 0.85rem; color: var(--text); }
.pk-group-s { font-size: 0.72rem; color: var(--muted); flex: 1; }
.pk-group-n { font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pk-fold { cursor: pointer; list-style: none; border-bottom: none; }
details.pk-group[open] > .pk-fold { border-bottom: 1px solid var(--border-dim); }
.pk-fold::before { content: "▸"; color: var(--muted); transition: transform .15s; }
details.pk-group[open] > .pk-fold::before { transform: rotate(90deg); }
.pk-rec + .pk-rec { border-top: 1px solid var(--border-dim); }
.pk-rec-sum { display: grid; grid-template-columns: 1fr 7rem 4.5rem; align-items: center; gap: 0.9rem;
  padding: 0.5rem 0.85rem; cursor: pointer; list-style: none; }
.pk-rec-sum::-webkit-details-marker, .pk-summary::-webkit-details-marker, .pk-fold::-webkit-details-marker { display: none; }
.pk-rec-sum:hover { background: var(--wash); }
.pk-rec[open] > .pk-rec-sum { background: var(--wash); }
.pk-rec-text { display: flex; flex-direction: column; min-width: 0; }
.pk-rec-name { font-weight: 600; font-size: 0.82rem; color: var(--accent); }
.pk-rec-help { font-size: 0.72rem; color: var(--muted); line-height: 1.4; }
.pk-rec-bar { height: 6px; border-radius: 3px; background: var(--border-dim); overflow: hidden; }
.pk-rec-bar > span { display: block; height: 100%; background: var(--accent-dim); border-radius: 3px; }
.pk-rec-n { text-align: right; font-variant-numeric: tabular-nums; font-size: 0.82rem; }
.pk-rec .rec-snip { padding: 0.4rem 0.85rem 0.7rem; overflow-x: auto; }
@media (max-width: 1100px) {
  .picker-body { flex-direction: column; }
  .picker-left { flex: none; }
  .pk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* reView tab: environment, hint, open-in-new-tab and reload above the embedded platform */
.review-page { flex-direction: column; }
.rv-bar { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.8rem; border-bottom: 1px solid var(--border-dim); flex-shrink: 0; }
.rv-env { font-weight: 600; font-size: 0.82rem; color: var(--text); }
.rv-hint { flex: 1; font-size: 0.74rem; color: var(--muted); }
.rv-btn { font-size: 0.76rem; padding: 0.25rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-bg);
  color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 600; }
.rv-btn:hover { background: var(--wash); }
.review-page .reveal-frame { flex: 1; min-height: 0; }
.rv-status { font-size: 0.76rem; }
.rv-status.rv-ok { color: var(--ok); }
.rv-status.rv-warn { color: var(--amber); }
.rv-grow { flex: 1; }
.rv-primary { background: var(--accent); color: var(--accent-contrast); border-color: var(--accent); }
.rv-primary:hover { background: var(--accent-dim); }
.rv-hint { display: none; }

/* Results → Download PDF: print only the Results page, full length, on white */
@media print {
  body.print-results * { visibility: hidden; }
  body.print-results #module-lens, body.print-results #module-lens * { visibility: visible; }
  body.print-results #module-lens { position: absolute; left: 0; top: 0; width: 100%; display: block !important; overflow: visible !important; }
  body.print-results, body.print-results .app, body.print-results .main, body.print-results .module-page, body.print-results #module-benchmark {
    height: auto !important; overflow: visible !important; background: #fff !important; box-shadow: none !important; }
  body.print-results .res-download, body.print-results .res-role-dd .Select-arrow-zone { display: none !important; }
  body.print-results .jd-col, body.print-results .grid-row, body.print-results .exam-chart { break-inside: avoid; }
  @page { margin: 12mm; }
}

/* DV-7: the Physical Network's right-click menu */
.cube-menu { position: fixed; z-index: 400; background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); padding: 4px; min-width: 15rem; }
.cube-menu-item { display: block; width: 100%; text-align: left; background: transparent; border: none; padding: 8px 10px;
  border-radius: 6px; cursor: pointer; color: var(--text); font: inherit; font-size: 0.82rem; }
.cube-menu-item:hover { background: var(--wash); }
/* DV-9: Asset Intelligence */
.intel-pane { flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; padding-bottom: 12px; }
.intel-pane .intel-current:empty { display: none; }
.intel-earlier { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 10px; }
.intel-item { border: 1px solid var(--border-dim); border-radius: 8px; padding: 6px 10px; margin-top: 6px; }
.intel-sum { cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.intel-time { margin-left: auto; font-size: 0.72rem; color: var(--muted); }
.wb-compare { margin-top: 6px; width: 100%; }
.wb-compare:disabled { opacity: .5; cursor: not-allowed; }

/* Asset Intelligence: the answer uses the full height of the column (it was capped at 45%) */
.intel-pane .ai-ctx { max-height: none; overflow: visible; flex: 0 0 auto; }

/* Trace: what the raw-files model was sent */
.tr-sent{white-space:pre-wrap;max-height:320px;overflow:auto;font-size:12px;line-height:1.45;padding:10px 12px;border:1px solid var(--border,#d8dde3);border-radius:6px;background:var(--panel-2,#f7f8fa);margin:4px 0 10px}
.tr-sent-sum{cursor:pointer;font-size:13px;font-weight:600;margin-top:6px}

/* Production page: Ask the Reasoner */
.prod-ask-q { width: 100%; min-height: 6.5rem; resize: vertical; font: inherit; font-size: 0.8rem; line-height: 1.35; padding: 0.4rem; }
.prod-ask-btn { width: 100%; margin-top: 0.35rem; }
.prod-ask-out:empty { display: none; }
.prod-ask-card { border: 1px solid var(--border); border-radius: 6px; padding: 0.5rem 0.6rem; margin: 0.5rem 0 0; font-size: 0.82rem; overflow-wrap: anywhere; background: var(--panel-bg2, transparent); }
.prod-ask-card .ai-ctx-head { display: flex; flex-wrap: wrap; gap: 0.3rem; }

/* Results and Trace: the question id beside the number, the same on both tabs */
.grid-qid { display: inline-block; margin-left: 0.35rem; font-size: 0.7rem; opacity: 0.65; font-variant-numeric: tabular-nums; }
.tr-q-id { min-width: 2.6rem; font-variant-numeric: tabular-nums; }

/* Results: how the Reasoner got there (the trace, in plain words) */
.pv { margin-top: 0.9rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.pv-title { font-weight: 600; font-size: 0.95rem; }
.pv-summary { font-size: 0.8rem; opacity: 0.8; margin: 0.15rem 0 0.3rem; }
.pv-fig { height: 150px; }
.pv-key { display: flex; flex-wrap: wrap; gap: 0.9rem; font-size: 0.75rem; margin: 0 0 0.5rem; opacity: 0.9; }
.pv-key-item { display: inline-flex; align-items: center; gap: 0.3rem; }
.pv-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid; }
.pv-ok { background: #45C1AE; border-color: #45C1AE; }
.pv-extra { background: #E06A6A; border-color: #45C1AE; }
.pv-miss { background: transparent; border-color: #DCC777; }
.pv-steps { margin: 0; padding-left: 0; list-style: none; }
.pv-step { padding: 0.35rem 0; border-bottom: 1px dashed var(--border); }
.pv-n { font-weight: 600; margin-right: 0.4rem; font-variant-numeric: tabular-nums; }
.pv-detail { font-size: 0.78rem; opacity: 0.75; margin: 0.1rem 0 0 1.4rem; }
.pv-q-sum { font-size: 0.75rem; cursor: pointer; margin-left: 1.4rem; opacity: 0.8; }
.pv-q { max-height: 240px; overflow: auto; font-size: 0.72rem; }

/* Results: who asks each question */
.grid-roles { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.2rem; }
.grid-role { font-size: 0.66rem; padding: 0.05rem 0.4rem; border-radius: 999px; border: 1px solid var(--border); opacity: 0.75; }
.grid-role-on { opacity: 1; border-color: var(--accent, #45C1AE); color: var(--accent, #45C1AE); }
.pv-now { background: transparent; border-color: #EE9455; border-width: 3px; }
.pv-line { display: inline-block; width: 18px; height: 0; border-top: 3px solid; vertical-align: middle; }
.pv-line-on { border-color: #45C1AE; }
.pv-line-now { border-color: #EE9455; border-top-width: 4px; }
.tr-step-what { margin-left: 0; }
.lens-trace-wrap { margin-top: 1.2rem; border-top: 2px solid var(--border); padding-top: 0.8rem; }
.lens-trace-title { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.15rem; }
.lens-trace { min-height: 520px; }
.tr-howto { margin: 0.3rem 0 0.5rem 1.1rem; padding: 0; font-size: 0.88rem; line-height: 1.45; }
/* Traceability: answer line under the question; picture and step side by side, fitted to the window */
.tr-ans { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 6px; font-size: 0.92rem; }
.tr-ans-k { color: var(--muted); }
.tr-ans-v { font-weight: 600; }
.tr-ans-verdict { font-weight: 700; padding: 1px 8px; border-radius: 10px; border: 1px solid currentColor; }
.tr-ans-link { margin-left: auto; font-weight: 600; text-decoration: none; color: var(--accent); }
.tr-ans-link:hover { text-decoration: underline; }
.tr-split { display: flex; gap: 0; align-items: stretch; }
.tr-split > .tr-pic { flex: 3 1 0; min-width: 0; padding-right: 8px; }
.tr-split > .tr-side { flex: 1 1 0; min-width: 220px; margin-left: 8px !important; align-self: flex-start; }
.tr-split > .splitter-h { align-self: stretch; }
.tr-side { position: sticky; top: 8px; max-height: calc(100vh - 230px); overflow-y: auto; margin-top: 0 !important; }
.tr-side .tr-cypher, .tr-side pre { white-space: pre-wrap; word-break: break-word; }
@media (max-width: 1100px) { .tr-split { flex-direction: column; } .tr-split > .splitter-h { display: none; } .tr-side { position: static; max-height: none; } }
/* the step's query, colour-graded: words (accent tint), Cypher (dark code panel, coloured parts), pipeline (neutral) */
.tr-side .q-words { background: rgba(69, 193, 174, 0.12); border-left: 3px solid #45C1AE; padding: 8px 10px; border-radius: 6px; margin: 6px 0; }
.tr-side .cy-code { background: #1E1B2E !important; color: #E6E4F0 !important; border: none !important; border-radius: 6px; padding: 10px 12px !important;
  font-size: 12px; line-height: 1.5; }
.cy-code .cy-kw { color: #C792EA; font-weight: 700; }
.cy-code .cy-lab { color: #45C1AE; font-weight: 600; }
.cy-code .cy-prop { color: #F2C14E; }
.cy-code .cy-fn { color: #82AAFF; }
.cy-code .cy-str { color: #EE9455; }
.cy-code .cy-num { color: #F78C6C; }
.tr-side .q-pipe { background: rgba(127, 127, 127, 0.10) !important; border-radius: 6px; font-size: 11px; }
.tr-side details > summary { font-weight: 600; cursor: pointer; margin-top: 6px; }
/* a circle clicked on the trace picture: its questions highlighted in the list, the rest dimmed */
.tr-hit-banner { align-items: center; gap: 10px; justify-content: space-between; margin: 6px 0 8px; padding: 8px 10px;
  border-radius: 6px; background: rgba(238, 148, 85, 0.14); border-left: 3px solid #EE9455; font-size: 0.88rem; font-weight: 600; }
.tr-hit-clear { border: 1px solid var(--border); background: transparent; border-radius: 12px; padding: 1px 10px; cursor: pointer; font-size: 0.8rem; }
.tr-q-hit { background: rgba(238, 148, 85, 0.16) !important; box-shadow: inset 3px 0 0 #EE9455; }
.tr-q-dim { opacity: 0.38; }
.tr-q-dim:hover { opacity: 0.8; }
.tr-heat-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tr-heat-dl { font-size: 0.8rem; padding: 3px 10px; }
.intel-header { display: flex; align-items: center; justify-content: space-between; }
.intel-clear { border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 12px;
  padding: 1px 10px; font-size: 0.75rem; cursor: pointer; }
.intel-clear:hover { color: var(--text); border-color: var(--accent); }
/* sign-in at a glance on the account icon: green when signed in to the open graph's reView, red when not */
.acct-btn.acct-in::after, .acct-btn.acct-out::after {
  content: ""; position: absolute; top: 0.2rem; right: 0.2rem; width: 0.6rem; height: 0.6rem;
  border-radius: 50%; border: 2px solid var(--panel-bg);
}
.acct-btn.acct-in::after { background: #2FA36B; }
.acct-btn.acct-out::after, .acct-btn.acct-warn::after { background: #D64545; }
/* answers checked against each other: green when it matches the right answer, red when not */
.qa-ok { color: #1F8A57 !important; }
.qa-bad { color: #C93C3C !important; }
.tr-q-id { font-weight: 700; color: var(--muted); margin-right: 8px; }
/* the chart for one question */
.qv { display: flex; flex-direction: column; gap: 10px; padding: 10px 6px 6px; }
.qv-head { display: flex; gap: 10px; align-items: baseline; font-size: 1rem; font-weight: 600; }
.qv-id { color: var(--muted); }
.qv-row { display: grid; grid-template-columns: 230px minmax(120px, 1fr) 48px minmax(200px, 2fr); gap: 12px; align-items: center; }
.qv-method { font-size: 0.85rem; color: var(--muted); }
.qv-bar { height: 14px; border-radius: 7px; background: rgba(127,127,127,0.15); overflow: hidden; }
.qv-fill { height: 100%; border-radius: 7px; background: #9a96b4; }
.qv-fill.qa-ok { background: #2FA36B; }
.qv-fill.qa-bad { background: #D64545; }
.qv-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.qv-answer { font-weight: 600; }
.qv-gold-row { display: flex; gap: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.qv-gold-k { color: var(--muted); font-size: 0.85rem; min-width: 230px; }
.qv-gold { font-weight: 700; }
.lens-back { font-size: 0.8rem; padding: 2px 10px; margin-bottom: 4px; }
/* a dot clicked: that method's answers, misses first */
.lens-misses { position: relative; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; max-height: 360px; overflow-y: auto; }
.lens-misses-close { position: absolute; top: 6px; right: 8px; border: none; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--muted); }
.qa-head { display: flex; flex-direction: column; margin-bottom: 6px; }
.qa-title { font-weight: 700; }
.qa-sub { font-size: 0.8rem; color: var(--muted); }
.qa-row { display: grid; grid-template-columns: 3rem minmax(200px, 2fr) minmax(160px, 1.5fr) minmax(120px, 1fr); gap: 10px; width: 100%;
  text-align: left; border: none; border-top: 1px solid var(--border-dim, var(--border)); background: transparent; padding: 7px 4px;
  cursor: pointer; font-size: 0.85rem; color: var(--text); }
.qa-row:hover { background: rgba(110, 98, 210, 0.07); }
.qa-id { font-weight: 700; color: var(--muted); }
.qa-k { color: var(--muted); font-size: 0.75rem; }
.qa-v { font-weight: 600; }
/* the question's answers side by side: reView, Raw files, the right answer; a green or red edge, no ticks */
.ac-row { display: grid; grid-template-columns: 1fr 1fr minmax(160px, 0.6fr); gap: 10px; margin-top: 8px; }
.ac-card { border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 8px; padding: 8px 10px;
  background: var(--panel-bg); min-width: 0; }
.ac-card.qa-ok { border-left-color: #2FA36B; color: inherit !important; }
.ac-card.qa-bad { border-left-color: #D64545; color: inherit !important; }
.ac-card.ac-gold { border-left-color: #6E62D2; background: rgba(110, 98, 210, 0.06); }
.ac-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.ac-title { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.ac-link { font-size: 12px; font-weight: 600; text-decoration: none; color: var(--accent); white-space: nowrap; }
.ac-text { font-weight: 600; font-size: 0.95rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; }
@media (max-width: 1100px) { .ac-row { grid-template-columns: 1fr; } }
.qa-row4 { grid-template-columns: 3rem minmax(180px, 1.6fr) minmax(140px, 1.3fr) minmax(140px, 1.3fr) minmax(110px, 0.9fr); }
.qa-cell { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.qa-cols { cursor: default; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.qa-cols:hover { background: transparent !important; }
/* long answers: a card clicked opens in full (it holds focus); a panel row shows its answers in full on hover */
.ac-card { cursor: pointer; outline: none; }
.ac-card:focus, .ac-card:focus-within { box-shadow: 0 0 0 2px rgba(110, 98, 210, 0.35); }
.ac-card:focus .ac-text, .ac-card:focus-within .ac-text { -webkit-line-clamp: unset; display: block; max-height: 320px; overflow-y: auto; }
.qa-row:hover .qa-cell { -webkit-line-clamp: unset; display: block; }
.tr-btn-step { font-size: 1.15rem; font-weight: 700; min-width: 2.2rem; }
/* the ? help for the trace picture */
.tr-help-sum { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; list-style: none; }
.tr-help-sum::-webkit-details-marker { display: none; }
.tr-help-q { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: #534B7F; color: #F5F5F8; font-size: 0.8rem; font-weight: 700; }
dl.tr-howto { display: grid; grid-template-columns: 9.5rem 1fr; gap: 6px 14px; margin: 8px 0 10px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; font-size: 0.86rem; }
dl.tr-howto dt { font-weight: 700; color: #534B7F; }
dl.tr-howto dd { margin: 0; }
/* right-click menus (the 3-D cube menu and the Semantic Network's): wide enough to read every item on one line */
.cube-menu { min-width: 18rem; }
.cube-menu-item { white-space: nowrap; }
.cy-context-menus-cxt-menu { min-width: 18rem !important; width: auto !important; background: var(--panel-bg); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow); padding: 4px; z-index: 400; }
.cy-context-menus-cxt-menuitem { display: block; width: 100% !important; white-space: nowrap; text-align: left; background: transparent;
  border: none; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--text); font: inherit; font-size: 0.82rem; }
.cy-context-menus-cxt-menuitem:hover { background: var(--wash); }
ul.tr-howto-plain { list-style: none; margin: 8px 0 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.9rem; line-height: 1.55; display: flex; flex-direction: column; gap: 4px; background: rgba(110, 98, 210, 0.04); }
ul.tr-howto-plain li::before { content: "•"; color: #534B7F; font-weight: 700; margin-right: 8px; }
.tr-q-roles { display: block; font-size: 0.72rem; color: #726B9D; font-weight: 600; margin-top: 2px; }
/* the current Asset Intelligence answer folds like the earlier ones */
.ai-now-fold { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.9rem; padding: 0 4px 0 0; }
.ai-now-fold:hover { color: var(--text); }
/* Drilling: the evidence floor folds (closed to start) */
.floor-fold > summary.floor-sum { cursor: pointer; list-style: revert; margin: 0; }
.floor-fold[open] > summary.floor-sum { margin-bottom: 8px; }

/* Benchmarking: the question lists' dividers (drag / ◂ hide); the pill hangs inside the window */
#tpl-split .pane-collapse, #tr-qsplit .pane-collapse { left: 1px; top: 14px; transform: none; }
#module-benchmark .picker-body > .splitter-h { margin: 0 -0.4rem; }
@media (max-width: 1100px) { #module-benchmark .picker-body > .splitter-h { display: none; } }

/* Asset Intelligence / Ask boxes: the Reasoner's steps folded away; a copy button on each answer */
.ai-steps { margin: 2px 0 4px; }
.ai-steps > summary.ai-steps-sum { cursor: pointer; font-size: 11px; color: var(--muted); list-style: none; display: inline-block;
  border: 1px solid var(--border); border-radius: 10px; padding: 1px 8px; }
.ai-steps > summary.ai-steps-sum::-webkit-details-marker { display: none; }
.ai-steps[open] > summary.ai-steps-sum { color: var(--accent); border-color: var(--accent-dim); }
.ai-steps > .con-tool { margin-top: 4px; }
.ai-copy { display: inline-flex; align-items: center; cursor: pointer; color: var(--muted); padding: 1px 6px;
  border: 1px solid var(--border); border-radius: 4px; font-size: 12px; margin-left: auto; }
.ai-copy:hover { color: var(--accent); border-color: var(--accent-dim); }
.ai-copy-row { display: flex; justify-content: flex-end; }
/* Project module: a record type's footer — row count and Export CSV */
.rec-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.rec-foot .rec-csv { width: auto; flex: 0 0 auto; padding: 3px 10px; font-size: 12px; }
/* Data viewer: the well picker beside Zoom to cube / Full extent */
.viewport-canvas > .scene-zoom-controls { flex-wrap: wrap; max-width: calc(100% - 24px); }
.scene-zoom-controls .scene-zoom-btn { white-space: nowrap; }
.scene-zoom-controls .scene-well-pick { pointer-events: auto; width: 220px; max-width: 100%; font-size: 0.75rem; }
.scene-zoom-controls .scene-well-pick .Select-control { min-height: 26px; height: 26px; }
.scene-zoom-controls .scene-well-pick .Select-placeholder,
.scene-zoom-controls .scene-well-pick .Select-value { line-height: 24px !important; }
/* Benchmarking pages always fit the window: the list + trace row never grows past the page (it did after the
   question list was hidden and shown again — the trace kept its full width and pushed the page sideways) */
#module-benchmark .picker-page > .picker-body { min-width: 0; max-width: 100%; }
#module-benchmark .picker-page > .picker-body > .picker-right { flex: 1 1 0; min-width: 0; }
#module-benchmark .tr-split > .tr-pic .js-plotly-plot, #module-benchmark .tr-split > .tr-pic .dash-graph { max-width: 100%; }

/* Export to Gamma: the ⇪ Gamma button on an answer, and its panel at the top of Asset Intelligence */
.ai-gamma-btn { cursor: pointer; font: inherit; font-size: 11px; color: var(--muted); background: transparent;
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 7px; margin-left: auto; white-space: nowrap; }
.ai-gamma-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
.ai-gamma-btn + .ai-copy { margin-left: 4px; }
.ai-copy-row { gap: 4px; }
.gamma-panel { border: 1px solid var(--accent-dim); border-radius: 8px; background: var(--panel-bg2); padding: 10px 12px; margin: 6px 8px 10px; }
.gamma-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.gamma-lab { margin-top: 8px; display: block; }
.gamma-in { width: 100%; }
.gamma-ta { width: 100%; min-height: 52px; font-size: 12px; }
.gamma-row { display: flex; gap: 10px; }
.gamma-col { flex: 1 1 0; min-width: 0; }
.gamma-go { margin-top: 10px; width: 100%; }
.gamma-out { margin-top: 8px; font-size: 12.5px; }
.gamma-err { color: var(--bad, #B42318); }
.gamma-done { display: flex; flex-direction: column; gap: 4px; }
.gamma-link { font-weight: 600; }

/* Guide: the walkthrough pictures fit the reading column, framed so they read as screenshots */
#module-readme .doc-read-body img { display: block; max-width: 100%; height: auto; margin: 10px 0 14px;
  border: 1px solid var(--border, #d9d9e0); border-radius: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
