:root {
  color-scheme: light;
  --ink: #20201c;
  --muted: #6d7068;
  --paper: #f2eee6;
  --paper-warm: #fbf8f1;
  --panel: #fffdf8;
  --line: #d8d0c2;
  --line-strong: #b8ad9c;
  --charcoal: #2d302c;
  --clay: #a24f39;
  --moss: #5f714d;
  --gold: #aa7f2e;
  --teal: #316f73;
  --rose: #a85d6a;
  --shadow: 0 18px 46px rgba(45, 40, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(49, 111, 115, 0.06) 0 1px, transparent 1px 64px),
    linear-gradient(0deg, rgba(170, 127, 46, 0.06) 0 1px, transparent 1px 64px),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
select,
input {
  border: 1px solid var(--line);
}

button {
  min-height: 36px;
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

button:hover {
  border-color: #8ca39a;
  transform: translateY(-1px);
}

button.active,
button[data-selected="true"] {
  background: var(--charcoal);
  border-color: var(--charcoal);
  color: #ffffff;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  min-height: 100vh;
  padding: 18px;
}

.workspace {
  display: grid;
  grid-template-columns: clamp(280px, 16vw, 330px) minmax(560px, 1fr) clamp(340px, 21vw, 430px);
  grid-template-rows: auto clamp(420px, 52vh, 600px) minmax(246px, auto) minmax(0, 1fr);
  gap: 14px;
  height: max(840px, calc(100vh - 36px));
  width: min(100%, 1880px);
  max-width: 1880px;
  margin: 0 auto;
}

.workspace > * {
  min-width: 0;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 8px 4px;
}

.topbar h1,
.topbar p {
  margin: 0;
}

.topbar h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 0.95;
  letter-spacing: 0;
}

.topbar__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  min-width: 0;
  color: var(--muted);
}

.topbar__summary,
.topbar__lens-summary {
  display: none;
}

.eyebrow {
  color: var(--clay);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel,
.canvas-panel,
.results-strip {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.filters,
.detail {
  min-height: 0;
  overflow: auto;
}

.filters {
  grid-column: 1;
  grid-row: 2 / -1;
  padding: 16px;
}

.canvas-panel {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.detail {
  grid-column: 3;
  grid-row: 2 / -1;
}

.results-strip {
  grid-column: 2;
  grid-row: 3;
  min-height: 0;
  overflow: hidden;
  padding: 14px 16px;
}

.mobile-controls,
.drawer-header,
.filter-backdrop {
  display: none;
}

.activity-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 240px);
  gap: 14px;
  align-items: center;
  min-height: 58px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-warm);
  padding: 10px 12px;
}

.activity-copy {
  min-width: 0;
}

.activity-copy span {
  display: block;
  color: var(--clay);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.activity-copy strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-copy p {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-meter {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
}

.progress-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe9e6;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--clay));
  transition: width 220ms ease;
}

.activity-panel[data-indeterminate="true"] .progress-fill {
  width: 42%;
  animation: progress-sweep 1.15s ease-in-out infinite;
}

@keyframes progress-sweep {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(260%);
  }
}

.search-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-field input,
.search-tools select {
  width: 100%;
  height: 42px;
  border-radius: 7px;
  background: var(--paper-warm);
  color: var(--ink);
  padding: 0 12px;
}

.search-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 10px 0 16px;
}

.search-tools button,
.toolbar-actions button {
  padding: 0 12px;
}

.lens-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9e2d6;
}

.lens-switch button {
  min-width: 0;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.source-switch button {
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.toggle-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.range-block {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.range-label,
.section-title,
.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.range-label span,
.section-title span,
.canvas-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.range-label strong {
  font-size: 13px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--clay);
}

.facet-section {
  margin-top: 18px;
}

.section-title button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

.section-title small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.facet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.facet-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 1;
}

.facet-pill small {
  color: inherit;
  opacity: 0.65;
}

.ontology-tabs,
.price-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.ontology-tabs button,
.price-tabs button {
  min-width: 0;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-tabs {
  grid-template-columns: repeat(3, 1fr);
}

.price-note {
  fill: #7a6750;
  font-size: 11px;
  font-weight: 800;
}

.price-dot {
  cursor: pointer;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.2;
}

.price-dot:hover {
  stroke: var(--ink);
  stroke-width: 2;
}

.insights-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.insight-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  padding: 9px 10px;
}

.canvas-toolbar {
  min-height: 74px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
}

.canvas-toolbar > div:first-child {
  min-width: 0;
}

.canvas-toolbar h2 {
  margin: 3px 0 0;
  overflow: hidden;
  font-size: clamp(20px, 1.6vw, 28px);
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.viz {
  position: relative;
  flex: 1;
  min-height: 0;
  background:
    linear-gradient(180deg, #ffffff, #edf5f2);
}

.viz svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  padding: 16px;
}

.ask-gate {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 280px;
  max-width: 560px;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  padding: 22px;
}

.ask-gate strong,
.ask-gate span {
  display: block;
}

.ask-gate strong {
  font-size: 20px;
}

.ask-gate span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ask-gate__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.ask-gate input {
  min-width: 0;
  height: 44px;
  border-radius: 7px;
  background: #ffffff;
  padding: 0 12px;
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-header strong,
.chat-header span {
  display: block;
}

.chat-header strong {
  font-size: 16px;
}

.chat-header span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chat-engine {
  flex: 0 0 auto;
  border: 1px solid rgba(50, 124, 135, 0.28);
  border-radius: 999px;
  background: #f7fbfa;
  color: var(--teal);
  font-size: 11px;
  font-weight: 850;
  padding: 5px 9px;
  text-transform: uppercase;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.chat-form input {
  min-width: 0;
  height: 44px;
  border-radius: 7px;
  background: #ffffff;
  padding: 0 12px;
}

.chat-form button {
  min-width: 74px;
  padding: 0 14px;
}

body.chat-expanded .chat-form {
  position: sticky;
  top: 8px;
  z-index: 9;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 248, 241, 0.96);
  box-shadow: 0 8px 22px rgba(45, 40, 32, 0.1);
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chat-suggestions button {
  min-height: 30px;
  border-radius: 999px;
  color: var(--charcoal);
  font-size: 12px;
  padding: 0 10px;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.chat-empty {
  align-self: start;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  padding: 14px;
}

.chat-message {
  max-width: min(100%, 900px);
  min-width: 0;
}

.chat-message--assistant {
  width: min(100%, 900px);
}

.chat-message--user {
  justify-self: end;
  max-width: min(100%, 760px);
}

.chat-message__body {
  white-space: pre-wrap;
}

.chat-message__body {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.48;
  padding: 10px 12px;
}

.chat-message--user .chat-message__body {
  border-color: rgba(47, 58, 63, 0.16);
  background: var(--charcoal);
  color: #ffffff;
}

.chat-diagnostics {
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(245, 242, 233, 0.78);
}

.chat-diagnostics summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(4, auto) auto;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  cursor: pointer;
  list-style: none;
  padding: 5px 9px;
}

.chat-diagnostics summary::-webkit-details-marker {
  display: none;
}

.chat-diagnostics summary::after {
  color: var(--muted);
  content: "▾";
  font-size: 10px;
}

.chat-diagnostics summary span,
.chat-diagnostics summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-diagnostics summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-diagnostics summary strong {
  color: var(--charcoal);
  font-size: 10px;
  font-weight: 850;
}

.chat-diagnostics__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  border-top: 1px solid var(--line);
  padding: 6px;
}

.chat-diagnostics__grid div {
  display: grid;
  gap: 2px;
  min-width: 0;
  border: 1px solid rgba(216, 208, 194, 0.72);
  border-radius: 6px;
  background: var(--panel);
  padding: 6px;
}

.chat-diagnostics__grid span,
.chat-diagnostics__raw span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.chat-diagnostics__grid strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-diagnostics__raw {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 0 6px 6px;
}

.chat-diagnostics__raw div {
  min-width: 0;
}

.chat-diagnostics__raw pre {
  max-height: 190px;
  overflow: auto;
  margin: 3px 0 0;
  border: 1px solid rgba(216, 208, 194, 0.78);
  border-radius: 6px;
  background: #181a17;
  color: #f6efe2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1.45;
  padding: 7px;
}

.chat-discovery-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 8px;
  align-items: start;
  margin-top: 8px;
}

.chat-discovery-main,
.chat-discovery-rail {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-warning {
  display: block;
  margin: 6px 2px 0;
  color: var(--clay);
  font-size: 11px;
  font-weight: 750;
}

.chat-overview {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(251, 248, 241, 0.92);
  padding: 8px 10px;
}

.chat-refine-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  align-items: center;
  min-width: 0;
}

.chat-refine-head strong,
.chat-refine-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-refine-head strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-active-filter {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--charcoal);
  font-size: 11px;
  font-weight: 850;
}

.chat-refine-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.chat-facet-menu {
  position: relative;
}

.chat-facet-menu summary {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--charcoal);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
  padding: 0 9px 0 11px;
}

.chat-facet-menu summary::-webkit-details-marker {
  display: none;
}

.chat-facet-menu summary::after {
  position: relative;
  z-index: 1;
  color: var(--muted);
  content: "▾";
  font-size: 10px;
}

.chat-facet-menu summary span {
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-facet-menu summary strong {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 11px;
}

.chat-facet-summary__label {
  color: var(--ink);
  font-weight: 900;
}

.chat-facet-summary__detail {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.chat-facet-summary__dist {
  grid-column: 1 / -1;
  position: absolute;
  inset: 3px 4px;
  z-index: 0;
  display: flex;
  align-items: end;
  gap: 1px;
  opacity: 0.78;
  pointer-events: none;
}

.chat-facet-summary__dist i {
  display: block;
  flex: 1 1 0;
  min-width: 3px;
  height: var(--bar);
  border-radius: 2px 2px 0 0;
  background: rgba(49, 111, 115, 0.14);
}

.chat-facet-menu--decade summary {
  border-color: rgba(170, 127, 46, 0.42);
}

.chat-facet-menu--decade .chat-facet-summary__dist i {
  background: rgba(170, 127, 46, 0.22);
}

.chat-facet-menu[open] summary {
  border-color: rgba(49, 111, 115, 0.42);
  background: #eef4ef;
}

.chat-facet-menu[open] .chat-facet-summary__dist i {
  background: rgba(49, 111, 115, 0.18);
}

.chat-facet-menu__list {
  position: absolute;
  z-index: 8;
  top: calc(100% + 5px);
  left: 0;
  display: grid;
  gap: 4px;
  width: min(320px, 82vw);
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(45, 40, 32, 0.15);
  padding: 6px;
}

.chat-facet-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 30px;
  border-radius: 6px;
  background: transparent;
  border-color: transparent;
  padding: 5px 7px;
  text-align: left;
}

.chat-facet-option span {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-facet-option strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.chat-facet-option:hover,
.chat-facet-option.active {
  background: #eef4ef;
}

.chat-data-browser {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(49, 111, 115, 0.22);
  border-radius: 7px;
  background: #f5f2e9;
  padding: 10px;
}

.chat-chart-recommendation {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(162, 79, 57, 0.26);
  border-radius: 7px;
  background: var(--panel);
  padding: 10px;
}

.chat-chart-recommendation__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-chart-recommendation__heading strong,
.chat-chart-recommendation__heading span {
  display: block;
}

.chat-chart-recommendation__heading strong {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-chart-recommendation__heading span {
  max-width: 430px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chat-chart-toggle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eee8dc;
}

.chat-chart-toggle button {
  min-height: 30px;
  min-width: 0;
  border-color: transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--charcoal);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  padding: 0 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-chart-toggle button.active {
  border-color: rgba(162, 79, 57, 0.45);
  background: var(--panel);
  color: var(--clay);
}

.chat-price-lens-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  max-width: 360px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eee8dc;
}

.chat-price-lens-toggle button {
  min-height: 28px;
  min-width: 0;
  border-color: transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  overflow: hidden;
  padding: 0 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-price-lens-toggle button.active {
  border-color: rgba(49, 111, 115, 0.45);
  background: var(--panel);
  color: var(--teal);
}

.chat-chart {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-chart__reason {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.chat-chart-bars,
.chat-chart-table {
  display: grid;
  gap: 6px;
}

.chat-chart-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  min-height: 38px;
  border-radius: 7px;
  background: #f9f5ec;
  padding: 8px 10px;
  text-align: left;
}

.chat-chart-bar::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  background: linear-gradient(90deg, rgba(162, 79, 57, 0.18), rgba(49, 111, 115, 0.08));
  content: "";
}

.chat-chart-bar span,
.chat-chart-bar strong,
.chat-chart-cell span,
.chat-chart-cell strong {
  position: relative;
  z-index: 1;
  min-width: 0;
  font-size: 12px;
}

.chat-chart-bar span,
.chat-chart-cell span {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-chart-bar strong,
.chat-chart-cell strong {
  color: var(--muted);
  font-weight: 850;
  text-align: right;
}

.chat-chart-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 6px;
}

.chat-chart-cell {
  display: grid;
  gap: 5px;
  min-height: 66px;
  border-color: rgba(49, 111, 115, calc(var(--heat) * 0.55));
  border-radius: 7px;
  background: rgba(49, 111, 115, calc(var(--heat) * 0.16));
  padding: 8px;
  text-align: left;
}

.chat-chart-cell span {
  white-space: normal;
}

.chat-chart-table-row {
  display: grid;
  gap: 3px;
  width: 100%;
  border-radius: 7px;
  background: #f9f5ec;
  padding: 8px 10px;
  text-align: left;
}

.chat-chart-table-row strong,
.chat-chart-table-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-chart-table-row strong {
  color: var(--ink);
  font-size: 12px;
}

.chat-chart-table-row span {
  color: var(--muted);
  font-size: 11px;
}

.chat-data-browser__heading {
  display: grid;
  gap: 3px;
}

.chat-data-browser__heading strong,
.chat-data-browser__heading span {
  display: block;
}

.chat-data-browser__heading span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chat-data-browser__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.chat-summary-card {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  padding: 8px;
}

.chat-summary-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-summary-card strong {
  color: var(--ink);
  font-size: 16px;
}

.chat-data-section {
  display: grid;
  gap: 6px;
}

.chat-data-section h3 {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-data-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  padding: 8px 10px;
}

.chat-data-row::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  background: rgba(49, 111, 115, 0.1);
  content: "";
}

.chat-data-row span,
.chat-data-row strong {
  position: relative;
  z-index: 1;
  min-width: 0;
  font-size: 12px;
}

.chat-data-row span {
  overflow: hidden;
  color: var(--ink);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-data-row strong {
  color: var(--muted);
  font-weight: 750;
  text-align: right;
}

.chat-stats {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
  gap: 6px;
}

.chat-timeline-bar {
  position: relative;
  display: grid;
  min-height: 48px;
  overflow: hidden;
  align-content: space-between;
  border-radius: 7px;
  background: #ffffff;
  padding: 6px 7px;
  text-align: left;
}

.chat-timeline-bar::before {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--bar);
  background: linear-gradient(180deg, rgba(49, 111, 115, 0.18), rgba(162, 79, 57, 0.25));
  content: "";
}

.chat-timeline-bar span,
.chat-timeline-bar strong {
  position: relative;
  z-index: 1;
}

.chat-timeline-bar span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chat-timeline-bar strong {
  color: var(--ink);
  font-size: 14px;
}

.chat-place-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.chat-facet-button {
  min-height: 29px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--charcoal);
  font-size: 11px;
  font-weight: 750;
  padding: 0 9px;
}

.chat-result-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.chat-results {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
  grid-template-columns: 1fr;
}

.chat-result {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  padding: 8px 10px;
  text-align: left;
}

.chat-result strong,
.chat-result span,
.chat-result small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-result strong {
  font-size: 13px;
}

.chat-result span {
  color: var(--muted);
  font-size: 12px;
}

.chat-result small {
  color: #7a6750;
  font-size: 11px;
}

.axis-label {
  fill: #5a6870;
  font-size: 12px;
  font-weight: 750;
}

.grid-line {
  stroke: rgba(50, 124, 135, 0.18);
  stroke-width: 1;
}

.menu-dot {
  cursor: pointer;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.2;
}

.menu-dot:hover {
  stroke: var(--ink);
  stroke-width: 2;
}

.estimate-dot {
  stroke: var(--charcoal);
  stroke-dasharray: 2 2;
  stroke-width: 1.4;
}

.bar {
  cursor: pointer;
}

.bar-bg {
  fill: rgba(47, 58, 63, 0.07);
}

.bar-fill {
  fill: var(--teal);
}

.bar-fill:nth-of-type(4n) {
  fill: var(--clay);
}

.bar-fill:nth-of-type(4n + 1) {
  fill: var(--moss);
}

.bar-fill:nth-of-type(4n + 2) {
  fill: var(--gold);
}

.flow-canvas {
  fill: rgba(255, 255, 255, 0.58);
  stroke: rgba(47, 58, 63, 0.08);
}

.flow-box,
.flow-metric-box {
  fill: rgba(255, 253, 248, 0.9);
  stroke: rgba(90, 104, 112, 0.22);
  stroke-width: 1;
}

.flow-box--strong {
  fill: rgba(49, 111, 115, 0.1);
  stroke: rgba(49, 111, 115, 0.45);
}

.flow-connector {
  stroke: rgba(47, 58, 63, 0.34);
  stroke-width: 1.6;
}

.flow-title {
  fill: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.flow-box-title,
.flow-source-label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.flow-box-metric,
.flow-metric {
  fill: #24363b;
  font-weight: 850;
}

.flow-box-metric {
  font-size: 18px;
}

.flow-metric {
  font-size: 17px;
}

.flow-muted {
  fill: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.flow-bar-bg {
  fill: rgba(47, 58, 63, 0.08);
}

.flow-bar-fill {
  fill: var(--teal);
}

.flow-bar-fill--secondary {
  fill: var(--gold);
}

.tooltip {
  position: absolute;
  pointer-events: none;
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(30, 45, 47, 0.18);
  color: var(--ink);
  font-size: 12px;
  transform: translate(-50%, calc(-100% - 12px));
  z-index: 5;
}

.tooltip strong {
  display: block;
  margin-bottom: 3px;
}

.empty-state {
  display: grid;
  min-height: 100%;
  place-content: center;
  padding: 28px;
  color: var(--muted);
}

.empty-state h2 {
  margin: 0 0 8px;
  color: var(--ink);
}

.empty-state p {
  max-width: 280px;
  margin: 0;
  line-height: 1.5;
}

.detail-card {
  display: grid;
  min-height: 100%;
  grid-template-rows: minmax(220px, 42%) 1fr;
}

.hidden {
  display: none;
}

.detail-image-wrap {
  position: relative;
  display: grid;
  min-height: 220px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #d8e3df;
}

.detail-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-image-wrap img.zoomable {
  cursor: zoom-in;
}

.detail-image-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 30px;
  border-color: rgba(45, 48, 44, 0.22);
  background: rgba(255, 253, 248, 0.92);
  color: var(--charcoal);
  font-size: 11px;
  font-weight: 900;
  padding: 0 10px;
  text-transform: uppercase;
}

.detail-image-zoom[hidden] {
  display: none;
}

.image-zoomer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(28, 27, 24, 0.9);
  color: #fffaf0;
}

.image-zoomer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  border-bottom: 1px solid rgba(255, 250, 240, 0.18);
  background: rgba(28, 27, 24, 0.94);
  padding: 10px 12px;
}

.image-zoomer__bar strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-zoomer__bar div {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.image-zoomer__bar button {
  min-height: 32px;
  border-color: rgba(255, 250, 240, 0.22);
  background: rgba(255, 250, 240, 0.1);
  color: #fffaf0;
  font-size: 12px;
  font-weight: 850;
  padding: 0 10px;
}

.image-zoomer__stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  cursor: grab;
  touch-action: none;
}

.image-zoomer__stage.dragging {
  cursor: grabbing;
}

.image-zoomer__stage img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  transform-origin: center;
  transition: transform 80ms linear;
  user-select: none;
  -webkit-user-drag: none;
}

.detail-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.detail-body h2 {
  margin: 4px 0 10px;
  font-size: 24px;
  line-height: 1.08;
}

.detail-body dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px 10px;
  margin: 0 0 12px;
  font-size: 13px;
}

.detail-body dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-body dd {
  margin: 0;
}

.page-strip {
  display: flex;
  gap: 7px;
  margin: 10px 0;
  overflow-x: auto;
  padding-bottom: 6px;
}

.page-thumb {
  width: 48px;
  height: 64px;
  flex: 0 0 auto;
  border: 2px solid transparent;
  border-radius: 6px;
  background: #dde8e4;
  object-fit: cover;
  cursor: pointer;
}

.page-thumb.active {
  border-color: var(--clay);
}

.evidence-panel {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 10px;
}

.evidence-panel > strong {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evidence-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.evidence-item {
  display: grid;
  gap: 3px;
  min-height: 0;
  border-radius: 7px;
  padding: 8px;
  text-align: left;
}

.evidence-item span,
.evidence-item small,
.evidence-item em {
  display: block;
  min-width: 0;
}

.evidence-item b {
  color: var(--ink);
}

.evidence-item em,
.evidence-item small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.transcript {
  display: -webkit-box;
  margin: 12px 0;
  overflow: hidden;
  white-space: pre-line;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
}

.result-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 280px);
  gap: 10px;
  height: 106px;
  margin-top: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
}

.result-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  min-height: 94px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 8px;
  text-align: left;
}

.result-item img {
  width: 58px;
  height: 76px;
  border-radius: 6px;
  background: #d8e3df;
  object-fit: cover;
}

.result-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.loading {
  padding: 18px;
  color: var(--muted);
}

body.ask-entry {
  background: #050505;
  color: #f4f1ea;
}

body.ask-entry .shell {
  display: none;
}

.ask-entry-root {
  display: grid;
  min-height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.045), transparent 220px),
    #050505;
  color: #f4f1ea;
}

.ask-entry-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 18px clamp(16px, 4vw, 34px) 12px;
}

.ask-entry-back,
.ask-entry-actions button,
.ask-entry-plus,
.ask-entry-send {
  min-height: 44px;
  border-color: rgba(255, 255, 255, 0.1);
  background: #171717;
  color: #f8f5ef;
}

.ask-entry-back {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0 14px;
}

.ask-entry-title {
  min-width: 0;
}

.ask-entry-title strong,
.ask-entry-title span,
.ask-entry-session-rail strong,
.ask-entry-session-rail span {
  display: block;
}

.ask-entry-title strong {
  overflow: hidden;
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ask-entry-title span,
.ask-entry-session-rail span,
.ask-entry-local-note {
  color: rgba(244, 241, 234, 0.58);
  font-size: 13px;
}

.ask-entry-actions {
  display: flex;
  gap: 8px;
}

.ask-entry-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.ask-entry-thread {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  padding: 12px clamp(16px, 4vw, 34px) 22px;
}

.ask-entry-empty,
.ask-entry-gate {
  align-self: center;
  width: min(100%, 720px);
  margin: 0 auto;
}

.ask-entry-empty h1,
.ask-entry-empty p {
  margin: 0;
}

.ask-entry-empty h1 {
  max-width: 680px;
  font-size: clamp(30px, 8vw, 58px);
  line-height: 1.03;
}

.ask-entry-empty p {
  max-width: 640px;
  margin-top: 14px;
  color: rgba(244, 241, 234, 0.68);
  line-height: 1.45;
}

.ask-entry-kicker {
  display: block;
  margin-bottom: 12px;
  color: #d8a14f;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ask-entry-prompts,
.ask-entry-refinements {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.ask-entry-prompts button,
.ask-entry-refinements button {
  min-height: 38px;
  border-color: rgba(244, 241, 234, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.08);
  color: #f4f1ea;
  padding: 0 13px;
}

.ask-entry-message {
  display: grid;
  width: min(100%, 880px);
}

.ask-entry-message--user {
  justify-self: end;
  max-width: min(86%, 720px);
}

.ask-entry-message--assistant {
  justify-self: start;
}

.ask-entry-bubble {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(244, 241, 234, 0.1);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.07);
  padding: 16px;
}

.ask-entry-message--user .ask-entry-bubble {
  border-color: rgba(216, 161, 79, 0.28);
  background: rgba(216, 161, 79, 0.14);
}

.ask-entry-bubble p {
  margin: 0;
  line-height: 1.45;
}

.ask-entry-chart-card,
.ask-entry-evidence,
.ask-entry-weak-data,
.ask-chart-provenance {
  border: 1px solid rgba(244, 241, 234, 0.12);
  border-radius: 12px;
  background: #f7f2e8;
  color: var(--ink);
}

.ask-entry-chart-card {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.ask-entry-chart-card .chat-chart-recommendation,
.ask-entry-chart-card .chat-chart {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ask-chart-provenance {
  padding: 0;
}

.ask-chart-provenance summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  padding: 12px 14px;
}

.ask-chart-provenance__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 14px 12px;
}

.ask-chart-provenance__grid div {
  border-top: 1px solid rgba(32, 32, 28, 0.1);
  padding-top: 8px;
}

.ask-chart-provenance__grid span,
.ask-entry-evidence small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ask-chart-provenance__grid strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.3;
}

.ask-chart-provenance p,
.ask-chart-provenance ul {
  margin: 0;
  padding: 0 14px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ask-chart-provenance ul {
  padding-left: 28px;
}

.ask-entry-weak-data {
  padding: 14px;
}

.ask-entry-weak-data strong,
.ask-entry-evidence > strong {
  display: block;
  margin-bottom: 6px;
}

.ask-entry-weak-data p {
  color: var(--muted);
  font-size: 13px;
}

.ask-entry-weak-data .ask-entry-refinements {
  margin-top: 12px;
}

.ask-entry-weak-data .ask-entry-refinements button {
  border-color: rgba(32, 32, 28, 0.14);
  background: #fffdf8;
  color: var(--ink);
}

.ask-entry-weak-data .ask-entry-refinements button:hover {
  border-color: rgba(49, 111, 115, 0.38);
  background: #eef5f1;
}

.ask-entry-evidence {
  padding: 12px;
}

.ask-entry-evidence__list {
  display: grid;
  gap: 8px;
}

.ask-entry-evidence-card {
  display: grid;
  height: auto;
  justify-items: start;
  min-height: 48px;
  padding: 9px 10px;
  text-align: left;
}

.ask-entry-evidence-card span {
  font-weight: 750;
}

.ask-entry-session-rail {
  display: none;
}

.ask-entry-composer {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px clamp(16px, 4vw, 34px) max(12px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, #050505 22%);
}

.ask-entry-composer input {
  min-width: 0;
  height: 48px;
  border-color: rgba(244, 241, 234, 0.12);
  border-radius: 999px;
  background: #171717;
  color: #f8f5ef;
  padding: 0 16px;
}

.ask-entry-composer input::placeholder {
  color: rgba(244, 241, 234, 0.52);
}

@media (min-width: 960px) {
  .ask-entry-main {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    padding-right: 24px;
  }

  .ask-entry-thread {
    padding-left: clamp(24px, 6vw, 92px);
  }

  .ask-entry-session-rail {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    overflow: auto;
    padding: 16px 0 24px;
  }

  .ask-entry-session-list {
    display: grid;
    gap: 8px;
  }

  .ask-entry-session-list button {
    height: auto;
    min-height: 42px;
    border-color: rgba(244, 241, 234, 0.12);
    background: rgba(255, 253, 248, 0.07);
    color: #f4f1ea;
    padding: 9px 11px;
    text-align: left;
  }

  .ask-entry-session-list button[data-active="true"] {
    border-color: rgba(216, 161, 79, 0.48);
    background: rgba(216, 161, 79, 0.16);
  }

  .ask-entry-composer {
    padding-left: clamp(24px, 6vw, 92px);
    padding-right: 324px;
  }
}

body.chat-expanded .workspace {
  height: auto;
  min-height: calc(100vh - 36px);
  grid-template-rows: auto minmax(420px, auto) minmax(246px, auto) minmax(0, 1fr);
}

body.chat-expanded .canvas-panel {
  overflow: visible;
}

body.chat-expanded .viz {
  flex: 0 0 auto;
}

body.chat-expanded .chat-panel {
  height: auto;
  grid-template-rows: auto auto auto auto;
}

body.chat-expanded .chat-messages {
  overflow: visible;
  padding-right: 0;
}

body.chat-expanded .chat-message--assistant {
  width: 100%;
  max-width: 100%;
}

body.chat-expanded .chat-discovery-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
}

@media (min-width: 1181px) and (max-width: 1439px) {
  .shell {
    padding: 16px;
  }

  .workspace {
    grid-template-columns: clamp(280px, 23vw, 320px) minmax(0, 1fr);
    grid-template-rows: auto clamp(420px, 52vh, 580px) minmax(246px, auto) minmax(380px, auto);
    width: 100%;
    max-width: none;
    height: auto;
    min-height: calc(100vh - 32px);
  }

  .filters {
    grid-column: 1;
    grid-row: 2 / -1;
  }

  .canvas-panel {
    grid-column: 2;
    grid-row: 2;
  }

  .results-strip {
    grid-column: 2;
    grid-row: 3;
  }

  .detail {
    grid-column: 2;
    grid-row: 4;
    min-height: 380px;
  }

  .detail-card {
    grid-template-columns: minmax(220px, 0.38fr) minmax(0, 0.62fr);
    grid-template-rows: minmax(360px, auto);
  }

  .detail-image-wrap {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .canvas-toolbar {
    min-height: 68px;
  }

  .canvas-toolbar h2 {
    font-size: clamp(20px, 2vw, 25px);
  }

  .toolbar-actions button {
    min-width: 0;
    padding: 0 10px;
  }
}

@media (min-width: 760px) and (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
    grid-template-rows: auto clamp(420px, 54vh, 560px) minmax(420px, auto) minmax(246px, auto);
    height: auto;
    min-height: calc(100vh - 36px);
    max-width: 100%;
  }

  .canvas-panel {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .filters {
    grid-column: 1;
    grid-row: 3;
  }

  .detail {
    grid-column: 2;
    grid-row: 3;
  }

  .results-strip {
    grid-column: 1 / -1;
    grid-row: 4;
  }
}

@media (max-width: 759px) {
  .shell {
    padding: 8px;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto clamp(390px, 58vh, 500px) minmax(240px, auto) minmax(420px, auto);
    gap: 10px;
    height: auto;
    width: 100%;
    max-width: none;
    min-height: calc(100vh - 16px);
  }

  body.chat-expanded .workspace {
    grid-template-rows: auto auto minmax(390px, auto) minmax(240px, auto) minmax(420px, auto);
    min-height: calc(100vh - 16px);
  }

  body[data-active-lens="chat"] .workspace {
    grid-template-rows: auto auto minmax(0, auto) minmax(240px, auto) minmax(420px, auto);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 4px 2px;
  }

  .topbar h1 {
    font-size: clamp(34px, 13vw, 48px);
  }

  .topbar__meta {
    flex-wrap: wrap;
    gap: 7px;
    font-size: 13px;
    line-height: 1.25;
  }

  .filters,
  .canvas-panel,
  .detail,
  .results-strip {
    grid-column: 1;
  }

  .filters {
    position: fixed;
    z-index: 30;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(92vw, 360px);
    max-width: 360px;
    height: 100dvh;
    border-radius: 0 10px 10px 0;
    transform: translateX(calc(-100% - 18px));
    transition: transform 180ms ease;
    box-shadow: 18px 0 42px rgba(30, 45, 47, 0.22);
  }

  body.filter-drawer-open {
    overflow: hidden;
  }

  body.filter-drawer-open .filters {
    transform: translateX(0);
  }

  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
  }

  .drawer-header p {
    margin: 0;
  }

  .drawer-header button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .drawer-lens-controls,
  .drawer-source-section {
    display: none;
  }

  .filter-backdrop {
    position: fixed;
    z-index: 20;
    inset: 0;
    width: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: rgba(26, 31, 36, 0.26);
    cursor: default;
  }

  .filter-backdrop[hidden] {
    display: none;
  }

  .mobile-controls {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    gap: 8px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    padding: 10px;
  }

  .filter-toggle {
    width: 100%;
    background: var(--charcoal);
    border-color: var(--charcoal);
    color: #ffffff;
  }

  .mobile-controls .lens-switch {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mobile-controls .source-switch {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0;
  }

  .canvas-panel {
    grid-row: 3;
  }

  body[data-active-lens="chat"] .canvas-panel {
    overflow: visible;
  }

  body[data-active-lens="chat"] .viz {
    flex: 0 0 auto;
  }

  .results-strip {
    grid-row: 4;
    padding: 12px;
  }

  .detail {
    grid-row: 5;
    min-height: 420px;
  }

  .canvas-toolbar,
  .toolbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .toolbar-actions button {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .activity-panel {
    grid-template-columns: 1fr;
  }

  .activity-meter {
    text-align: left;
  }

  .activity-copy strong,
  .activity-copy p {
    white-space: normal;
  }

  .result-list {
    grid-auto-columns: minmax(210px, 78vw);
  }

  .detail-card {
    grid-template-rows: minmax(220px, 36vh) 1fr;
  }

  .image-zoomer__bar {
    display: grid;
  }

  .image-zoomer__bar div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .image-zoomer__bar button {
    min-width: 0;
    padding: 0 6px;
  }

  .chat-panel {
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 9px;
    min-height: 0;
    padding: 12px;
  }

  body[data-active-lens="chat"] .chat-panel {
    height: auto;
    grid-template-rows: auto auto auto auto;
  }

  body[data-active-lens="chat"] .chat-messages {
    overflow: visible;
    padding-right: 0;
  }

  .chat-header {
    display: grid;
    gap: 8px;
  }

  .chat-engine {
    justify-self: start;
  }

  .ask-gate {
    align-content: start;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 16px;
  }

  .ask-gate__row,
  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-form input,
  .chat-form button,
  .ask-gate input,
  .ask-gate button {
    width: 100%;
  }

  body.chat-expanded .chat-form {
    top: 4px;
  }

  .chat-suggestions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chat-suggestions button {
    justify-content: flex-start;
    min-height: 36px;
    white-space: normal;
  }

  .chat-discovery-workspace,
  body.chat-expanded .chat-discovery-workspace {
    grid-template-columns: 1fr;
  }

  .chat-discovery-rail {
    order: -1;
  }

  .chat-diagnostics summary,
  .chat-diagnostics__grid,
  .chat-diagnostics__raw {
    grid-template-columns: 1fr;
  }

  .chat-diagnostics summary strong {
    white-space: normal;
  }

  .chat-refine-head {
    grid-template-columns: 1fr auto;
  }

  .chat-refine-head .chat-active-filter {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .chat-facet-menu {
    flex: 1 1 150px;
  }

  .chat-facet-menu summary {
    min-width: 0;
  }

  .chat-facet-menu__list {
    width: min(330px, calc(100vw - 44px));
  }

  .chat-chart-toggle {
    grid-template-columns: 1fr;
  }

  .chat-price-lens-toggle {
    max-width: none;
  }

  .chat-data-browser__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-data-browser__heading {
    display: grid;
  }

  .chat-chart-recommendation__heading {
    display: grid;
  }

  .chat-chart-bar {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .chat-chart-bar strong {
    text-align: left;
  }

  .chat-chart-table-row strong,
  .chat-chart-table-row span {
    white-space: normal;
  }

  .chat-data-browser__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-data-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .chat-data-row strong {
    text-align: left;
  }
}

body.mobile-lab {
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(49, 111, 115, 0.05) 0 1px, transparent 1px 48px),
    linear-gradient(0deg, rgba(170, 127, 46, 0.06) 0 1px, transparent 1px 48px),
    #e9dfcf;
}

body.mobile-lab .shell {
  display: none;
}

.mobile-lab-root {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  max-width: 480px;
  height: 100svh;
  min-width: 0;
  overflow: hidden;
  margin: 0 auto;
  background: #fbf7ed;
  box-shadow: 0 0 0 1px rgba(45, 40, 32, 0.08), 0 18px 50px rgba(45, 40, 32, 0.18);
}

.mobile-lab-screen {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 13px 13px 18px;
}

.mobile-lab-header {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.mobile-lab-header__copy {
  display: grid;
  gap: 2px;
}

.mobile-lab-header h1,
.mobile-lab-header p,
.mobile-lab-header span,
.mobile-section-header h2,
.mobile-section-header p {
  margin: 0;
}

.mobile-lab-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  line-height: 1;
}

.mobile-lab-header__copy > span,
.mobile-section-header p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.mobile-lab-eyebrow,
.mobile-kicker {
  color: var(--clay);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-variant-switcher,
.mobile-context-bar,
.mobile-term-row,
.mobile-suggestion-row,
.mobile-evidence-links,
.mobile-detail-actions,
.mobile-primary-actions,
.mobile-card-actions {
  display: flex;
  gap: 7px;
  min-width: 0;
}

.mobile-variant-switcher,
.mobile-context-bar,
.mobile-term-row,
.mobile-suggestion-row {
  overflow-x: auto;
  scrollbar-width: none;
}

.mobile-variant-switcher::-webkit-scrollbar,
.mobile-context-bar::-webkit-scrollbar,
.mobile-term-row::-webkit-scrollbar,
.mobile-suggestion-row::-webkit-scrollbar,
.mobile-card-rail::-webkit-scrollbar,
.mobile-evidence-tray__rail::-webkit-scrollbar {
  display: none;
}

.mobile-variant-chip,
.mobile-context-chip,
.mobile-context-clear,
.mobile-term-row span,
.mobile-suggestion-row button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(184, 173, 156, 0.86);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 850;
  padding: 8px 11px;
  text-decoration: none;
  white-space: nowrap;
}

.mobile-variant-chip[aria-current="page"],
.mobile-context-clear {
  border-color: rgba(162, 79, 57, 0.42);
  background: #f6e9df;
  color: var(--clay);
}

.mobile-context-bar {
  align-items: center;
  min-height: 38px;
  padding: 2px 0;
}

.mobile-context-chip {
  min-height: 30px;
  background: #f4ede0;
  color: var(--muted);
  font-size: 11px;
}

.mobile-context-clear {
  min-height: 30px;
  padding: 5px 10px;
}

.mobile-lab-view,
.mobile-discover,
.mobile-data,
.mobile-menus,
.mobile-lab-ask,
.mobile-inspire,
.mobile-section,
.mobile-menu-card__body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.mobile-hero {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(184, 173, 156, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(170, 127, 46, 0.16), transparent 42%),
    linear-gradient(25deg, rgba(49, 111, 115, 0.14), transparent 48%),
    #fffaf0;
  padding: 14px;
}

.mobile-hero h2 {
  max-width: 16ch;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.05;
}

.mobile-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.mobile-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  min-width: 0;
  border: 1px solid rgba(45, 48, 44, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.88);
  padding: 6px;
}

.mobile-command--compact {
  background: #fffdf8;
}

.mobile-command input {
  min-width: 0;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  outline: none;
  padding: 0 7px;
}

.mobile-command button,
.mobile-primary-actions button,
.mobile-card-actions button,
.mobile-lens-open,
.mobile-evidence-links button,
.mobile-evidence-links a,
.mobile-detail-actions button,
.mobile-detail-actions a,
.mobile-story-card button,
.mobile-ask-form button,
.mobile-ask-gate button {
  min-height: 44px;
  border-radius: 7px;
  border-color: rgba(45, 48, 44, 0.14);
  background: var(--charcoal);
  color: #fffdf8;
  font-size: 13px;
  font-weight: 850;
  padding: 0 13px;
  text-decoration: none;
}

.mobile-primary-actions {
  flex-wrap: wrap;
}

.mobile-primary-actions button {
  flex: 1 1 120px;
  background: #fffdf8;
  color: var(--charcoal);
}

.mobile-primary-actions button:first-child {
  background: var(--clay);
  color: #fffdf8;
}

.mobile-section-header {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mobile-section-header h2 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.mobile-story-grid,
.mobile-lens-grid,
.mobile-menu-deck,
.mobile-inspiration-grid {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.mobile-story-card,
.mobile-lens-card,
.mobile-menu-card,
.mobile-inspiration-card,
.mobile-lab-loading {
  display: grid;
  gap: 9px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(184, 173, 156, 0.72);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: 0 9px 26px rgba(45, 40, 32, 0.08);
  padding: 12px;
}

.mobile-story-card h3,
.mobile-lens-card h3,
.mobile-menu-card h3,
.mobile-inspiration-card h3 {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.mobile-story-card p,
.mobile-lens-card p,
.mobile-inspiration-card p,
.mobile-caveat,
.mobile-detail-transcript {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
}

.mobile-card-rail {
  display: grid;
  grid-auto-columns: minmax(248px, 78%);
  grid-auto-flow: column;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-snap-type: x mandatory;
}

.mobile-card-rail .mobile-menu-card {
  scroll-snap-align: start;
}

.mobile-menu-card {
  grid-template-columns: 96px minmax(0, 1fr);
  cursor: pointer;
  padding: 9px;
}

.mobile-menu-card:focus-visible,
.mobile-lens-card button:focus-visible,
.mobile-bottom-nav button:focus-visible,
.mobile-story-card button:focus-visible,
.mobile-command input:focus-visible,
.mobile-command button:focus-visible {
  outline: 3px solid rgba(49, 111, 115, 0.42);
  outline-offset: 2px;
}

.mobile-menu-card--compact {
  grid-template-columns: 86px minmax(0, 1fr);
}

.mobile-menu-card img {
  width: 100%;
  height: 126px;
  min-width: 0;
  border-radius: 6px;
  background: #efe4d3;
  object-fit: cover;
}

.mobile-menu-card--compact img {
  height: 112px;
}

.mobile-provenance {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.mobile-provenance span {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(184, 173, 156, 0.7);
  border-radius: 999px;
  background: #f6efe4;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  padding: 4px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-term-row span {
  max-width: 190px;
  overflow: hidden;
  min-height: 28px;
  color: var(--moss);
  font-size: 11px;
  padding: 5px 8px;
  text-overflow: ellipsis;
}

.mobile-card-actions {
  flex-wrap: wrap;
  margin-top: auto;
}

.mobile-card-actions button {
  flex: 1 1 74px;
  min-height: 38px;
  background: #f4ede0;
  color: var(--charcoal);
}

.mobile-card-actions button:first-child {
  background: var(--teal);
  color: #fffdf8;
}

.mobile-lens-card {
  background:
    linear-gradient(90deg, rgba(95, 113, 77, 0.08), transparent),
    #fffdf8;
}

.mobile-lens-card__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.mobile-mini-bars {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.mobile-mini-bars button {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 38px;
  overflow: hidden;
  border-radius: 7px;
  background: #faf4e8;
  padding: 7px 9px;
  text-align: left;
}

.mobile-mini-bars button::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  background: linear-gradient(90deg, rgba(49, 111, 115, 0.15), rgba(170, 127, 46, 0.08));
  content: "";
}

.mobile-mini-bars span,
.mobile-mini-bars strong {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-mini-bars strong {
  color: var(--muted);
}

.mobile-lens-open {
  justify-self: start;
  background: #f4ede0;
  color: var(--charcoal);
}

.mobile-lab-ask .ask-gate,
.mobile-ask-form {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(184, 173, 156, 0.72);
  border-radius: 8px;
  background: #fffdf8;
  padding: 12px;
}

.mobile-lab-ask .ask-gate strong,
.mobile-lab-ask .ask-gate span {
  display: block;
}

.mobile-lab-ask .ask-gate span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.mobile-ask-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.mobile-ask-form input,
.mobile-lab-ask .ask-gate input {
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbf7ed;
  color: var(--ink);
  font-size: 15px;
  padding: 0 11px;
}

.mobile-chat-stack {
  max-height: none;
  overflow: visible;
}

.mobile-lab-ask .chat-discovery-workspace {
  grid-template-columns: 1fr;
}

.mobile-lab-ask .chat-discovery-rail {
  order: -1;
}

.mobile-caveat {
  border: 1px solid rgba(162, 79, 57, 0.25);
  border-radius: 8px;
  background: #fbefe8;
  color: var(--clay);
  font-weight: 750;
  padding: 10px;
}

.mobile-inspiration-card {
  background:
    linear-gradient(135deg, rgba(162, 79, 57, 0.1), transparent 46%),
    #fffdf8;
}

.mobile-inspiration-card__caveat {
  border-left: 3px solid rgba(162, 79, 57, 0.52);
  color: var(--charcoal);
  padding-left: 9px;
}

.mobile-evidence-links,
.mobile-detail-actions {
  flex-wrap: wrap;
}

.mobile-evidence-links button,
.mobile-evidence-links a,
.mobile-detail-actions button,
.mobile-detail-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 112px;
  background: #f4ede0;
  color: var(--charcoal);
}

.mobile-evidence-links button:first-child,
.mobile-detail-actions button:first-child {
  background: var(--moss);
  color: #fffdf8;
}

.mobile-evidence-tray {
  position: fixed;
  z-index: 34;
  right: max(10px, calc((100vw - 480px) / 2 + 10px));
  bottom: 76px;
  left: max(10px, calc((100vw - 480px) / 2 + 10px));
  display: grid;
  gap: 6px;
  max-width: 460px;
  border: 1px solid rgba(45, 48, 44, 0.14);
  border-radius: 8px;
  background: rgba(45, 48, 44, 0.94);
  color: #fffdf8;
  padding: 8px;
  box-shadow: 0 12px 30px rgba(45, 40, 32, 0.22);
}

.mobile-evidence-tray[hidden] {
  display: none;
}

.mobile-evidence-tray strong {
  font-size: 12px;
}

.mobile-evidence-tray__rail {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
}

.mobile-evidence-tray__rail button {
  flex: 0 0 170px;
  min-height: 34px;
  overflow: hidden;
  border-color: rgba(255, 253, 248, 0.18);
  background: rgba(255, 253, 248, 0.1);
  color: #fffdf8;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-bottom-nav {
  position: relative;
  z-index: 35;
  right: auto;
  bottom: auto;
  left: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  max-width: none;
  min-height: 66px;
  border-top: 1px solid rgba(184, 173, 156, 0.86);
  background: rgba(255, 253, 248, 0.96);
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  box-shadow: 0 -14px 32px rgba(45, 40, 32, 0.14);
}

.mobile-bottom-nav button {
  min-width: 0;
  min-height: 48px;
  overflow: hidden;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  padding: 3px 2px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-bottom-nav button[aria-current="page"] {
  border-color: rgba(49, 111, 115, 0.34);
  background: #e8f0ec;
  color: var(--teal);
}

.mobile-detail-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  width: 100%;
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(31, 29, 25, 0.42);
}

.mobile-detail-sheet {
  position: fixed;
  z-index: 41;
  right: max(0px, calc((100vw - 480px) / 2));
  bottom: 0;
  left: max(0px, calc((100vw - 480px) / 2));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-width: 480px;
  max-height: 78svh;
  overflow: hidden;
  border: 1px solid rgba(184, 173, 156, 0.95);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fffdf8;
  box-shadow: 0 -18px 46px rgba(45, 40, 32, 0.24);
}

.mobile-detail-sheet--full {
  max-height: 96svh;
}

.mobile-detail-sheet__handle {
  justify-self: center;
  width: 46px;
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(109, 112, 104, 0.38);
}

.mobile-detail-sheet__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 11px;
}

.mobile-detail-sheet__bar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-detail-sheet__bar div {
  display: flex;
  gap: 5px;
}

.mobile-detail-sheet__bar button {
  min-height: 34px;
  border-radius: 7px;
  background: #f4ede0;
  color: var(--charcoal);
  font-size: 12px;
  font-weight: 850;
  padding: 0 9px;
}

.mobile-detail-sheet__body {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: auto;
  padding: 11px;
}

.mobile-detail-sheet__body > img {
  width: 100%;
  max-height: 270px;
  border-radius: 8px;
  background: #efe4d3;
  object-fit: contain;
}

.mobile-detail-transcript {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf4e8;
  color: var(--charcoal);
  padding: 10px;
  white-space: pre-wrap;
}

@media (min-width: 760px) {
  .mobile-lab-screen {
    padding-top: 18px;
  }

  .mobile-story-grid,
  .mobile-lens-grid,
  .mobile-inspiration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.mobile-lab .mobile-variant-switcher {
  align-items: center;
}

body.mobile-lab .mobile-variant-chip,
body.mobile-lab .mobile-context-chip,
body.mobile-lab .mobile-context-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  line-height: 1;
}

/* Common Crawl-inspired minimal refresh.
   Revert by removing cc-minimal-refresh from the body element, or delete this block. */
body.cc-minimal-refresh {
  --ink: #152a47;
  --muted: #617189;
  --paper: #f7f9fb;
  --paper-warm: #fbfcfd;
  --panel: #ffffff;
  --line: #dde2e8;
  --line-strong: #c8d2df;
  --charcoal: #152a47;
  --teal: #3287c5;
  --shadow: 0 2px 18px rgba(21, 42, 71, 0.07);
  --cc-accent: #3287c5;
  --cc-soft-blue: #f3f8fc;
  --cc-hover: #f9fafb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 251, 0.94) 46%, rgba(245, 241, 232, 0.62)),
    var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.cc-minimal-refresh .shell {
  padding: 18px 22px;
}

body.cc-minimal-refresh .workspace {
  gap: 16px;
}

body.cc-minimal-refresh .topbar {
  align-items: flex-end;
  min-height: 82px;
  border-bottom: 1px solid rgba(21, 42, 71, 0.08);
  padding: 5px 2px 11px;
}

body.cc-minimal-refresh .topbar__identity {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 2px 16px;
  align-items: end;
  min-width: 0;
}

body.cc-minimal-refresh .topbar__identity .eyebrow {
  grid-column: 1 / -1;
}

body.cc-minimal-refresh .topbar h1 {
  grid-column: 1;
  color: var(--ink);
  font-size: clamp(36px, 3.4vw, 56px);
  font-weight: 650;
  line-height: 1.02;
}

body.cc-minimal-refresh .topbar__summary {
  grid-column: 2;
  align-self: end;
  display: block;
  max-width: 68ch;
  color: #1a476c;
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.45;
  padding-bottom: 5px;
}

body.cc-minimal-refresh .topbar__lens-summary {
  display: inline-flex;
}

body.cc-minimal-refresh .topbar__meta {
  align-content: end;
  gap: 8px 14px;
  max-width: 520px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-transform: none;
}

body.cc-minimal-refresh .topbar__meta span,
body.cc-minimal-refresh .topbar__meta a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-bottom: 1px solid rgba(50, 135, 197, 0.26);
}

body.cc-minimal-refresh .eyebrow,
body.cc-minimal-refresh .activity-copy span,
body.cc-minimal-refresh .mobile-lab-eyebrow,
body.cc-minimal-refresh .mobile-kicker {
  color: var(--cc-accent);
  letter-spacing: 0.08em;
}

body.cc-minimal-refresh a {
  color: var(--teal);
}

body.cc-minimal-refresh a:hover {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

body.cc-minimal-refresh button {
  border-radius: 4px;
  box-shadow: none;
  transition:
    background 175ms ease,
    border-color 175ms ease,
    box-shadow 175ms ease,
    color 175ms ease;
}

body.cc-minimal-refresh button:hover {
  border-color: #cbd5e1;
  background: var(--cc-hover);
  box-shadow: 0 2px 10px -6px rgba(21, 42, 71, 0.28);
  transform: none;
}

body.cc-minimal-refresh button.active,
body.cc-minimal-refresh button[data-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
}

body.cc-minimal-refresh .panel,
body.cc-minimal-refresh .canvas-panel,
body.cc-minimal-refresh .results-strip,
body.cc-minimal-refresh .activity-panel,
body.cc-minimal-refresh .ask-gate,
body.cc-minimal-refresh .chat-message__body,
body.cc-minimal-refresh .chat-diagnostics,
body.cc-minimal-refresh .chat-overview,
body.cc-minimal-refresh .chat-data-browser,
body.cc-minimal-refresh .chat-chart-recommendation,
body.cc-minimal-refresh .chat-summary-card,
body.cc-minimal-refresh .evidence-panel,
body.cc-minimal-refresh .tooltip {
  border-color: var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

body.cc-minimal-refresh .filters {
  padding: 18px;
}

body.cc-minimal-refresh .canvas-toolbar {
  min-height: 78px;
  border-bottom-color: rgba(21, 42, 71, 0.08);
  padding: 15px 20px 12px;
}

body.cc-minimal-refresh .canvas-toolbar h2 {
  color: var(--ink);
  font-weight: 650;
}

body.cc-minimal-refresh .viz {
  background: linear-gradient(180deg, #ffffff, #f4f8fb);
}

body.cc-minimal-refresh .grid-line {
  stroke: rgba(21, 42, 71, 0.12);
}

body.cc-minimal-refresh .lens-switch,
body.cc-minimal-refresh .chat-chart-toggle,
body.cc-minimal-refresh .chat-price-lens-toggle {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--cc-soft-blue);
}

body.cc-minimal-refresh .source-switch button,
body.cc-minimal-refresh .ontology-tabs button,
body.cc-minimal-refresh .price-tabs button,
body.cc-minimal-refresh .lens-switch button,
body.cc-minimal-refresh .chat-chart-toggle button,
body.cc-minimal-refresh .chat-price-lens-toggle button {
  border-radius: 3px;
}

body.cc-minimal-refresh .search-field input,
body.cc-minimal-refresh .search-tools select,
body.cc-minimal-refresh .chat-form input,
body.cc-minimal-refresh .ask-gate input {
  border-color: var(--line);
  border-radius: 4px;
  background: #ffffff;
}

body.cc-minimal-refresh .facet-pill,
body.cc-minimal-refresh .chat-suggestions button,
body.cc-minimal-refresh .chat-facet-button,
body.cc-minimal-refresh .mobile-provenance span {
  border-radius: 999px;
  background: #ffffff;
}

body.cc-minimal-refresh .activity-panel {
  background: var(--paper-warm);
}

body.cc-minimal-refresh .progress-track {
  background: #e7edf3;
}

body.cc-minimal-refresh .progress-fill {
  background: linear-gradient(90deg, var(--cc-accent), var(--moss), var(--gold));
}

body.cc-minimal-refresh .insight-card,
body.cc-minimal-refresh .chat-chart-bar,
body.cc-minimal-refresh .chat-chart-table-row,
body.cc-minimal-refresh .chat-data-row,
body.cc-minimal-refresh .chat-result,
body.cc-minimal-refresh .chat-timeline-bar {
  border-radius: 4px;
  background: #ffffff;
}

body.cc-minimal-refresh .result-list {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--line);
  padding-bottom: 0;
}

body.cc-minimal-refresh .result-item {
  position: relative;
  min-height: 104px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  transition:
    background 175ms ease,
    color 175ms ease;
}

body.cc-minimal-refresh .result-item::after {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 76px;
  height: 1px;
  background: var(--cc-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
}

body.cc-minimal-refresh .result-item:hover {
  background: var(--cc-hover);
}

body.cc-minimal-refresh .result-item:hover::after,
body.cc-minimal-refresh .result-item:focus-visible::after {
  transform: scaleX(1);
}

body.cc-minimal-refresh .detail-image-wrap,
body.cc-minimal-refresh .page-thumb,
body.cc-minimal-refresh .result-item img {
  background: #e8eef4;
}

body.cc-minimal-refresh .bar-fill {
  fill: var(--cc-accent);
}

body.cc-minimal-refresh .bar-fill:nth-of-type(4n) {
  fill: var(--clay);
}

body.cc-minimal-refresh .bar-fill:nth-of-type(4n + 1) {
  fill: var(--moss);
}

body.cc-minimal-refresh .bar-fill:nth-of-type(4n + 2) {
  fill: var(--gold);
}

body.cc-minimal-refresh .chat-message--user .chat-message__body {
  background: var(--ink);
}

body.cc-minimal-refresh .mobile-controls {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

body.cc-minimal-refresh.mobile-lab {
  background: #f7f9fb;
}

body.cc-minimal-refresh.mobile-lab .mobile-lab-root {
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(21, 42, 71, 0.08),
    0 14px 36px rgba(21, 42, 71, 0.12);
}

body.cc-minimal-refresh.mobile-lab .mobile-hero,
body.cc-minimal-refresh.mobile-lab .mobile-story-card,
body.cc-minimal-refresh.mobile-lab .mobile-lens-card,
body.cc-minimal-refresh.mobile-lab .mobile-menu-card,
body.cc-minimal-refresh.mobile-lab .mobile-inspiration-card,
body.cc-minimal-refresh.mobile-lab .mobile-lab-loading,
body.cc-minimal-refresh.mobile-lab .mobile-lab-ask .ask-gate,
body.cc-minimal-refresh.mobile-lab .mobile-ask-form {
  border-color: var(--line);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 2px 14px rgba(21, 42, 71, 0.06);
}

body.cc-minimal-refresh.mobile-lab .mobile-hero {
  gap: 10px;
}

body.cc-minimal-refresh.mobile-lab .mobile-lab-header h1,
body.cc-minimal-refresh.mobile-lab .mobile-hero h2 {
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-weight: 650;
  letter-spacing: 0;
}

body.cc-minimal-refresh.mobile-lab .mobile-command,
body.cc-minimal-refresh.mobile-lab .mobile-bottom-nav,
body.cc-minimal-refresh.mobile-lab .mobile-detail-sheet {
  border-color: var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

body.cc-minimal-refresh.mobile-lab .mobile-bottom-nav button[aria-current="page"] {
  border-color: rgba(50, 135, 197, 0.36);
  background: var(--cc-soft-blue);
  color: var(--teal);
}

@media (prefers-reduced-motion: no-preference) {
  body.cc-minimal-refresh .panel,
  body.cc-minimal-refresh .canvas-panel,
  body.cc-minimal-refresh .results-strip,
  body.cc-minimal-refresh .mobile-lab-root {
    animation: cc-minimal-fade 240ms ease both;
  }

  body.cc-minimal-refresh .detail-card,
  body.cc-minimal-refresh .chat-message,
  body.cc-minimal-refresh .mobile-detail-sheet {
    animation: cc-minimal-rise 220ms ease both;
  }
}

@keyframes cc-minimal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cc-minimal-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 759px) {
  body.cc-minimal-refresh .shell {
    padding: 10px;
  }

  body.cc-minimal-refresh .topbar {
    align-items: flex-start;
    min-height: 0;
    padding: 6px 2px 14px;
  }

  body.cc-minimal-refresh .topbar__identity {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  body.cc-minimal-refresh .topbar__summary {
    grid-column: 1;
    padding-bottom: 0;
  }

  body.cc-minimal-refresh .topbar h1 {
    grid-column: 1;
    font-size: clamp(38px, 13vw, 52px);
  }

  body.cc-minimal-refresh .topbar__summary {
    max-width: 34ch;
    font-size: 13px;
  }

  body.cc-minimal-refresh .topbar__meta {
    justify-content: flex-start;
    max-width: none;
  }

  body.cc-minimal-refresh .filters {
    border-radius: 0 4px 4px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-lab-root *,
  .mobile-detail-sheet,
  .mobile-detail-backdrop {
    scroll-behavior: auto;
    transition-duration: 0.01ms;

/* Common Crawl-inspired minimal refresh.
   Revert by removing cc-minimal-refresh from the body element, or delete this block. */
body.cc-minimal-refresh {
  --ink: #152a47;
  --muted: #617189;
  --paper: #f7f9fb;
  --paper-warm: #fbfcfd;
  --panel: #ffffff;
  --line: #dde2e8;
  --line-strong: #c8d2df;
  --charcoal: #152a47;
  --teal: #3287c5;
  --shadow: 0 2px 18px rgba(21, 42, 71, 0.07);
  --cc-accent: #3287c5;
  --cc-soft-blue: #f3f8fc;
  --cc-hover: #f9fafb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 251, 0.94) 46%, rgba(245, 241, 232, 0.62)),
    var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.cc-minimal-refresh .shell {
  padding: 18px 22px;
}

body.cc-minimal-refresh .workspace {
  gap: 16px;
}

body.cc-minimal-refresh .topbar {
  align-items: flex-end;
  min-height: 82px;
  border-bottom: 1px solid rgba(21, 42, 71, 0.08);
  padding: 5px 2px 11px;
}

body.cc-minimal-refresh .topbar__identity {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  gap: 2px 16px;
  align-items: end;
  min-width: 0;
}

body.cc-minimal-refresh .topbar__identity .eyebrow {
  grid-column: 1 / -1;
}

body.cc-minimal-refresh .topbar h1 {
  grid-column: 1;
  color: var(--ink);
  font-size: clamp(36px, 3.4vw, 56px);
  font-weight: 650;
  line-height: 1.02;
}

body.cc-minimal-refresh .topbar__summary {
  grid-column: 2;
  align-self: end;
  display: block;
  max-width: 68ch;
  color: #1a476c;
  font-size: clamp(14px, 1.1vw, 17px);
  line-height: 1.45;
  padding-bottom: 5px;
}

body.cc-minimal-refresh .topbar__lens-summary {
  display: inline-flex;
}

body.cc-minimal-refresh .topbar__meta {
  align-content: end;
  gap: 8px 14px;
  max-width: 520px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  text-transform: none;
}

body.cc-minimal-refresh .topbar__meta span,
body.cc-minimal-refresh .topbar__meta a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-bottom: 1px solid rgba(50, 135, 197, 0.26);
}

body.cc-minimal-refresh .eyebrow,
body.cc-minimal-refresh .activity-copy span,
body.cc-minimal-refresh .mobile-lab-eyebrow,
body.cc-minimal-refresh .mobile-kicker {
  color: var(--cc-accent);
  letter-spacing: 0.08em;
}

body.cc-minimal-refresh a {
  color: var(--teal);
}

body.cc-minimal-refresh a:hover {
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

body.cc-minimal-refresh button {
  border-radius: 4px;
  box-shadow: none;
  transition:
    background 175ms ease,
    border-color 175ms ease,
    box-shadow 175ms ease,
    color 175ms ease;
}

body.cc-minimal-refresh button:hover {
  border-color: #cbd5e1;
  background: var(--cc-hover);
  box-shadow: 0 2px 10px -6px rgba(21, 42, 71, 0.28);
  transform: none;
}

body.cc-minimal-refresh button.active,
body.cc-minimal-refresh button[data-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
}

body.cc-minimal-refresh .panel,
body.cc-minimal-refresh .canvas-panel,
body.cc-minimal-refresh .results-strip,
body.cc-minimal-refresh .activity-panel,
body.cc-minimal-refresh .ask-gate,
body.cc-minimal-refresh .chat-message__body,
body.cc-minimal-refresh .chat-diagnostics,
body.cc-minimal-refresh .chat-overview,
body.cc-minimal-refresh .chat-data-browser,
body.cc-minimal-refresh .chat-chart-recommendation,
body.cc-minimal-refresh .chat-summary-card,
body.cc-minimal-refresh .evidence-panel,
body.cc-minimal-refresh .tooltip {
  border-color: var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

body.cc-minimal-refresh .filters {
  padding: 18px;
}

body.cc-minimal-refresh .canvas-toolbar {
  min-height: 78px;
  border-bottom-color: rgba(21, 42, 71, 0.08);
  padding: 15px 20px 12px;
}

body.cc-minimal-refresh .canvas-toolbar h2 {
  color: var(--ink);
  font-weight: 650;
}

body.cc-minimal-refresh .viz {
  background: linear-gradient(180deg, #ffffff, #f4f8fb);
}

body.cc-minimal-refresh .grid-line {
  stroke: rgba(21, 42, 71, 0.12);
}

body.cc-minimal-refresh .lens-switch,
body.cc-minimal-refresh .chat-chart-toggle,
body.cc-minimal-refresh .chat-price-lens-toggle {
  border-color: var(--line);
  border-radius: 4px;
  background: var(--cc-soft-blue);
}

body.cc-minimal-refresh .source-switch button,
body.cc-minimal-refresh .ontology-tabs button,
body.cc-minimal-refresh .price-tabs button,
body.cc-minimal-refresh .lens-switch button,
body.cc-minimal-refresh .chat-chart-toggle button,
body.cc-minimal-refresh .chat-price-lens-toggle button {
  border-radius: 3px;
}

body.cc-minimal-refresh .search-field input,
body.cc-minimal-refresh .search-tools select,
body.cc-minimal-refresh .chat-form input,
body.cc-minimal-refresh .ask-gate input {
  border-color: var(--line);
  border-radius: 4px;
  background: #ffffff;
}

body.cc-minimal-refresh .facet-pill,
body.cc-minimal-refresh .chat-suggestions button,
body.cc-minimal-refresh .chat-facet-button,
body.cc-minimal-refresh .mobile-provenance span {
  border-radius: 999px;
  background: #ffffff;
}

body.cc-minimal-refresh .activity-panel {
  background: var(--paper-warm);
}

body.cc-minimal-refresh .progress-track {
  background: #e7edf3;
}

body.cc-minimal-refresh .progress-fill {
  background: linear-gradient(90deg, var(--cc-accent), var(--moss), var(--gold));
}

body.cc-minimal-refresh .insight-card,
body.cc-minimal-refresh .chat-chart-bar,
body.cc-minimal-refresh .chat-chart-table-row,
body.cc-minimal-refresh .chat-data-row,
body.cc-minimal-refresh .chat-result,
body.cc-minimal-refresh .chat-timeline-bar {
  border-radius: 4px;
  background: #ffffff;
}

body.cc-minimal-refresh .result-list {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--line);
  padding-bottom: 0;
}

body.cc-minimal-refresh .result-item {
  position: relative;
  min-height: 104px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  transition:
    background 175ms ease,
    color 175ms ease;
}

body.cc-minimal-refresh .result-item::after {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 76px;
  height: 1px;
  background: var(--cc-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms ease;
}

body.cc-minimal-refresh .result-item:hover {
  background: var(--cc-hover);
}

body.cc-minimal-refresh .result-item:hover::after,
body.cc-minimal-refresh .result-item:focus-visible::after {
  transform: scaleX(1);
}

body.cc-minimal-refresh .detail-image-wrap,
body.cc-minimal-refresh .page-thumb,
body.cc-minimal-refresh .result-item img {
  background: #e8eef4;
}

body.cc-minimal-refresh .bar-fill {
  fill: var(--cc-accent);
}

body.cc-minimal-refresh .bar-fill:nth-of-type(4n) {
  fill: var(--clay);
}

body.cc-minimal-refresh .bar-fill:nth-of-type(4n + 1) {
  fill: var(--moss);
}

body.cc-minimal-refresh .bar-fill:nth-of-type(4n + 2) {
  fill: var(--gold);
}

body.cc-minimal-refresh .chat-message--user .chat-message__body {
  background: var(--ink);
}

body.cc-minimal-refresh .mobile-controls {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

body.cc-minimal-refresh.mobile-lab {
  background: #f7f9fb;
}

body.cc-minimal-refresh.mobile-lab .mobile-lab-root {
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(21, 42, 71, 0.08),
    0 14px 36px rgba(21, 42, 71, 0.12);
}

body.cc-minimal-refresh.mobile-lab .mobile-hero,
body.cc-minimal-refresh.mobile-lab .mobile-story-card,
body.cc-minimal-refresh.mobile-lab .mobile-lens-card,
body.cc-minimal-refresh.mobile-lab .mobile-menu-card,
body.cc-minimal-refresh.mobile-lab .mobile-inspiration-card,
body.cc-minimal-refresh.mobile-lab .mobile-lab-loading,
body.cc-minimal-refresh.mobile-lab .mobile-lab-ask .ask-gate,
body.cc-minimal-refresh.mobile-lab .mobile-ask-form {
  border-color: var(--line);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 2px 14px rgba(21, 42, 71, 0.06);
}

body.cc-minimal-refresh.mobile-lab .mobile-hero {
  gap: 10px;
}

body.cc-minimal-refresh.mobile-lab .mobile-lab-header h1,
body.cc-minimal-refresh.mobile-lab .mobile-hero h2 {
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-weight: 650;
  letter-spacing: 0;
}

body.cc-minimal-refresh.mobile-lab .mobile-command,
body.cc-minimal-refresh.mobile-lab .mobile-bottom-nav,
body.cc-minimal-refresh.mobile-lab .mobile-detail-sheet {
  border-color: var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

body.cc-minimal-refresh.mobile-lab .mobile-bottom-nav button[aria-current="page"] {
  border-color: rgba(50, 135, 197, 0.36);
  background: var(--cc-soft-blue);
  color: var(--teal);
}

@media (prefers-reduced-motion: no-preference) {
  body.cc-minimal-refresh .panel,
  body.cc-minimal-refresh .canvas-panel,
  body.cc-minimal-refresh .results-strip,
  body.cc-minimal-refresh .mobile-lab-root {
    animation: cc-minimal-fade 240ms ease both;
  }

  body.cc-minimal-refresh .detail-card,
  body.cc-minimal-refresh .chat-message,
  body.cc-minimal-refresh .mobile-detail-sheet {
    animation: cc-minimal-rise 220ms ease both;
  }
}

@keyframes cc-minimal-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes cc-minimal-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 759px) {
  body.cc-minimal-refresh .shell {
    padding: 10px;
  }

  body.cc-minimal-refresh .topbar {
    align-items: flex-start;
    min-height: 0;
    padding: 6px 2px 14px;
  }

  body.cc-minimal-refresh .topbar__identity {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  body.cc-minimal-refresh .topbar__summary {
    grid-column: 1;
    padding-bottom: 0;
  }

  body.cc-minimal-refresh .topbar h1 {
    grid-column: 1;
    font-size: clamp(38px, 13vw, 52px);
  }

  body.cc-minimal-refresh .topbar__summary {
    max-width: 34ch;
    font-size: 13px;
  }

  body.cc-minimal-refresh .topbar__meta {
    justify-content: flex-start;
    max-width: none;
  }

  body.cc-minimal-refresh .filters {
    border-radius: 0 4px 4px 0;
  }
}
