/* Mesh Explorer: a live instrument surface built from observed catalog data. */
#scene .task-page.mesh-explorer-page {
  --page-width:1600px;
  padding:0;
  overflow:hidden;
}
#scene .mesh-explorer-page .mesh-explorer-shell {
  width:100%;
  max-width:none;
  height:100%;
  margin:0;
  padding:16px 20px 14px;
  box-sizing:border-box;
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr) auto;
  overflow:hidden;
}

#scene .mesh-explorer-header {
  max-width:none;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(410px,470px);
  gap:34px;
  align-items:stretch;
  padding:0 0 10px;
}
#scene .mesh-explorer-title-group {min-width:0;display:flex;flex-direction:column;justify-content:center;}
#scene .mesh-explorer-header .learning-eyebrow {margin:0 0 9px;color:hsl(var(--text-muted));font:500 9px/1.4 var(--mono-font,monospace);letter-spacing:.09em;}
#scene .mesh-explorer-header h1 {
  max-width:none;
  margin:0 0 7px;
  color:hsl(var(--primary));
  font:500 clamp(29px,2.5cqw,40px)/1.02 var(--font-sans,"Albert Sans",sans-serif);
  letter-spacing:-.045em;
}
#scene .mesh-explorer-deck {max-width:80ch;margin:0;color:hsl(var(--text));font:400 12px/1.46 var(--font-sans,"Albert Sans",sans-serif);}
#scene .mesh-explorer-status {
  min-height:48px;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:13px;
  padding:9px 12px;
  border:1px solid hsl(var(--border-default));
  border-radius:6px;
  background:hsl(var(--surface) / .3);
}
#scene .mesh-explorer-live-panel {min-width:0;display:grid;grid-template-rows:auto 1fr;}
#scene .mesh-explorer-live-panel .mesh-explorer-status {border-radius:6px 6px 0 0;}
#scene .mesh-explorer-status > div {min-width:0;display:grid;gap:3px;}
#scene .mesh-explorer-status strong {color:hsl(var(--text-strong));font:500 12px/1.35 var(--font-sans,sans-serif);}
#scene .mesh-explorer-status [data-explorer-message] {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:hsl(var(--text-muted));font:400 10px/1.4 var(--mono-font,monospace);}
#scene .mesh-explorer-status-dot {width:8px;height:8px;border-radius:2px;transform:rotate(45deg);background:hsl(var(--text-muted));box-shadow:none;}
#scene .mesh-explorer-page[data-connection="live"] .mesh-explorer-status-dot {background:hsl(var(--primary));box-shadow:0 0 0 4px hsl(var(--primary) / .1);}

#scene .mesh-explorer-connect {
  display:grid;
  grid-template-columns:1fr;
  gap:12px 22px;
  align-items:center;
  margin:0;
  padding:8px 0;
  border-block:1px solid hsl(var(--border-subtle));
}
#scene .task-page.mesh-explorer-page[data-connection="live"] .mesh-explorer-connect {
  grid-template-columns:1fr;
  margin:0;
  padding:8px 0;
}
#scene .task-page.mesh-explorer-page[data-connection="live"] .mesh-explorer-connect > .mesh-explorer-connect-actions:first-child {display:flex !important;}
#scene .mesh-explorer-connect-actions {display:flex;align-items:center;gap:10px;min-width:0;}
#scene .mesh-explorer-connect-actions > label {flex:0 1 420px;margin:0;color:hsl(var(--text-muted));font:500 8px/1.3 var(--mono-font,monospace);letter-spacing:.08em;}
#scene .mesh-explorer-connect-actions > label select {min-height:38px;margin:4px 0 0;padding:7px 10px;border-radius:5px;}
#scene .mesh-explorer-buttons {display:flex;gap:6px;flex:0 0 auto;}
#scene .mesh-explorer-buttons button {min-height:38px;padding:7px 11px;border-radius:5px;font-size:11px;}
#scene .mesh-explorer-buttons [data-explorer-connect] {border-color:hsl(var(--complement));background:hsl(var(--complement) / .09);color:hsl(var(--complement));}
#scene .mesh-operator-access {position:relative;flex:0 0 auto;}
#scene .mesh-operator-access > summary {min-height:38px;display:flex;align-items:center;padding:0 8px;color:hsl(var(--reference));font:500 10px/1.3 var(--font-sans,sans-serif);cursor:pointer;}
#scene .mesh-operator-access[open] {padding:8px 10px;border:1px solid hsl(var(--border-default));border-radius:5px;background:hsl(var(--canvas));}
#scene .mesh-operator-access label {font-size:10px;}
#scene .mesh-operator-access input {min-width:250px;min-height:38px;margin:6px 0 0;}
#scene .mesh-explorer-metrics {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:0;border:1px solid hsl(var(--border-default));border-top:0;border-radius:0 0 6px 6px;background:hsl(var(--surface) / .16);}
#scene .mesh-explorer-metrics > div {min-width:0;display:grid;align-content:center;gap:3px;padding:8px 12px;border-right:1px solid hsl(var(--border-subtle));border-top:1px solid hsl(var(--border-subtle));}
#scene .mesh-explorer-metrics > div:first-child {padding-left:12px;}
#scene .mesh-explorer-metrics > div:nth-child(2n) {border-right:0;}
#scene .mesh-explorer-metrics > div:last-child {padding-right:12px;}
#scene .mesh-explorer-metrics span {font-size:7px;letter-spacing:.08em;}
#scene .mesh-explorer-metrics strong {font:500 11px/1.3 var(--font-sans,sans-serif);white-space:nowrap;}

#scene .mesh-observatory {
  min-height:0;
  height:auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  margin-top:10px;
  border:1px solid hsl(var(--border-default));
  border-radius:7px;
  background:linear-gradient(145deg,hsl(var(--surface) / .28),hsl(var(--canvas) / .86));
  overflow:hidden;
}
#scene .mesh-source-plane {min-width:0;min-height:0;padding:14px 20px;display:flex;flex-direction:column;overflow:hidden;}
#scene .mesh-explorer-section-head {display:flex;align-items:end;justify-content:space-between;gap:20px;}
#scene .mesh-explorer-section-head h2,#scene .mesh-source-inspector h2 {margin:0;color:hsl(var(--text-strong));font:500 21px/1.15 var(--font-sans,"Albert Sans",sans-serif);letter-spacing:-.025em;}
#scene .mesh-explorer-section-head > span {color:hsl(var(--text-faint));font:500 8px/1.4 var(--mono-font,monospace);letter-spacing:.07em;}
#scene .mesh-explorer-kicker {margin:0 0 5px;color:hsl(var(--primary));font:500 8px/1.4 var(--mono-font,monospace);letter-spacing:.09em;}

#scene .mesh-explorer-core-stats {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:9px 0;border-block:1px solid hsl(var(--border-subtle));}
#scene .mesh-explorer-core-stats .mesh-explorer-stat {min-width:0;display:grid;gap:1px;padding:7px 10px;border:0;border-right:1px solid hsl(var(--border-subtle));}
#scene .mesh-explorer-core-stats .mesh-explorer-stat:first-child {padding-left:0;}
#scene .mesh-explorer-core-stats .mesh-explorer-stat:last-child {border-right:0;}
#scene .mesh-explorer-core-stats .mesh-explorer-stat span {font-size:7px;}
#scene .mesh-explorer-core-stats .mesh-explorer-stat strong {font-size:19px;color:hsl(var(--text-strong));}
#scene .mesh-explorer-core-stats .mesh-explorer-stat small {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:hsl(var(--text-muted));}

#scene .mesh-source-field {
  min-height:0;
  max-height:none;
  flex:1 1 auto;
  display:grid;
  grid-template-columns:repeat(8,minmax(90px,1fr));
  grid-auto-flow:row dense;
  gap:4px;
  overflow:auto;
  scrollbar-width:thin;
  align-content:start;
}
#scene .mesh-source-group,#scene .mesh-source-cells {display:contents;}
#scene .mesh-source-group[hidden],#scene .mesh-source-cell[hidden],#scene .mesh-source-filter[hidden] {display:none;}
#scene .mesh-source-empty {grid-column:1 / -1;margin:12px 0;color:hsl(var(--text-muted));font:400 11px/1.45 var(--font-sans,sans-serif);}
#scene .mesh-source-filter {display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0 0 8px;padding:0 0 8px;border-bottom:1px solid hsl(var(--border-subtle));}
#scene .mesh-source-search {flex:1 1 180px;min-width:150px;margin:0;}
#scene .mesh-source-search span {position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}
#scene .mesh-source-search input {width:100%;box-sizing:border-box;min-height:28px !important;margin:0 !important;padding:4px 9px !important;font-size:10px !important;}
#scene .mesh-source-chips {display:flex;flex-wrap:nowrap;gap:4px;min-width:0;}
#scene .mesh-source-chips[aria-label="Filter by category"] {flex:1 1 100%;overflow-x:auto;padding-bottom:3px;scrollbar-width:thin;}
#scene .mesh-source-chip {flex:0 0 auto;display:inline-flex;align-items:center;gap:5px;min-height:22px !important;padding:2px 8px !important;border:1px solid hsl(var(--border-subtle));border-radius:999px;background:transparent;color:hsl(var(--text-muted));font:500 9px/1.2 var(--mono-font,monospace);cursor:pointer;}
#scene .mesh-source-chip small {color:hsl(var(--text-faint));font:inherit;}
#scene .mesh-source-chip:hover {border-color:hsl(var(--reference));}
#scene .mesh-source-chip[aria-pressed="true"] {border-color:hsl(var(--reference));background:hsl(var(--reference) / .12);color:hsl(var(--text-strong));}
#scene .mesh-source-filter-status {flex:1 1 100%;margin:0;color:hsl(var(--text-faint));font:500 8px/1.4 var(--mono-font,monospace);}
#scene .mesh-source-group h3 {
  min-width:0;
  min-height:30px;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  margin:0;
  padding:6px 7px;
  border-top:1px solid hsl(var(--primary) / .42);
  color:hsl(var(--primary));
  font:500 7px/1.4 var(--mono-font,monospace);
  letter-spacing:.09em;
  text-transform:uppercase;
}
#scene .mesh-source-cell {
  position:relative;
  min-width:0;
  min-height:30px !important;
  padding:4px 6px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
  gap:2px;
  border:1px solid hsl(var(--border-subtle));
  border-radius:3px;
  background:hsl(var(--surface) / .18);
  color:hsl(var(--text-muted));
  text-align:left;
  cursor:pointer;
}
#scene .mesh-source-cell::before {content:"";position:absolute;top:5px;right:5px;width:4px;height:4px;background:hsl(var(--text-faint));}
#scene .mesh-source-cell span {max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 9px/1.25 var(--mono-font,monospace);}
#scene .mesh-source-cell small {max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:hsl(var(--text-faint));font:500 7px/1.2 var(--mono-font,monospace);}
#scene .mesh-source-cell[data-access="public"] {border-color:hsl(var(--primary) / .3);background:hsl(var(--primary) / .045);}
#scene .mesh-source-cell[data-access="public"]::before {background:hsl(var(--primary));}
#scene .mesh-source-cell[data-access="exact"] {border-style:dashed;}
#scene .mesh-source-cell[data-access="operator"] {opacity:.68;}
#scene .mesh-source-cell[data-access="excluded"] {opacity:.36;}
#scene .mesh-source-cell:is(:hover,[aria-pressed="true"]) {opacity:1;border-color:hsl(var(--reference));background:hsl(var(--reference) / .08);color:hsl(var(--text-strong));}
#scene .mesh-source-cell[aria-pressed="true"]::after {content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:hsl(var(--reference));}

#scene .mesh-source-inspector {min-width:0;padding:14px 16px;border-left:1px solid hsl(var(--border-default));background:hsl(var(--canvas) / .52);overflow:auto;}
#scene .mesh-source-inspector > [data-explorer-source-summary] {min-height:3em;margin:9px 0 15px;color:hsl(var(--text-muted));font:400 11px/1.45 var(--font-sans,sans-serif);}
#scene .mesh-source-facts {display:grid;margin:0 0 14px;border-top:1px solid hsl(var(--border-subtle));}
#scene .mesh-source-facts > div {display:grid;grid-template-columns:72px minmax(0,1fr);gap:10px;padding:7px 0;border-bottom:1px solid hsl(var(--border-subtle));}
#scene .mesh-source-facts dt {color:hsl(var(--text-faint));font:500 8px/1.4 var(--mono-font,monospace);text-transform:uppercase;}
#scene .mesh-source-facts dd {margin:0;color:hsl(var(--text-strong));font:500 10px/1.4 var(--mono-font,monospace);}
#scene .mesh-source-inspector .mesh-explorer-controls {display:grid;grid-template-columns:1fr;gap:4px;}
#scene .mesh-source-inspector .mesh-explorer-controls label {font-size:9px;}
#scene .mesh-source-inspector :is(input,select) {min-height:38px;margin:5px 0 8px;padding:7px 9px;font-size:11px;}
#scene .mesh-source-inspector form {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:end;}
#scene .mesh-source-inspector form label {min-width:0;}
#scene .mesh-source-inspector form button {min-height:38px;margin-bottom:8px;padding:7px 10px;border-color:hsl(var(--complement));background:hsl(var(--complement) / .09);color:hsl(var(--complement));}
#scene .mesh-source-inspector .mesh-explorer-boundary {margin:8px 0 0;padding-top:10px;border-top:1px solid hsl(var(--border-subtle));color:hsl(var(--text-muted));font:400 10px/1.45 var(--font-sans,sans-serif);}

#scene .mesh-node-strip {margin:14px 0 0;padding:14px 0;border-block:1px solid hsl(var(--border-subtle));}
#scene .mesh-node-strip .mesh-explorer-section-head h2 {font-size:16px;}
#scene .mesh-explorer-nodes {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-top:10px;border:0;}
#scene .mesh-explorer-node {min-width:0;display:grid;grid-template-columns:1fr auto;gap:3px 10px;padding:9px 10px;border:1px solid hsl(var(--border-subtle));border-radius:4px;color:hsl(var(--text-muted));font-size:9px;}
#scene .mesh-explorer-node strong {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 10px/1.3 var(--mono-font,monospace);}
#scene .mesh-explorer-node-state {font-size:7px;}
#scene .mesh-explorer-node > span:last-child {grid-column:1/-1;color:hsl(var(--text-faint));}

#scene .mesh-explorer-data {margin-top:18px;}
#scene .mesh-explorer-data .mesh-explorer-section-head {padding-bottom:10px;border-bottom:1px solid hsl(var(--border-subtle));}
#scene .mesh-explorer-data .mesh-explorer-section-head h2 {font-size:21px;}
#scene .mesh-explorer-result-message {min-height:20px;margin:9px 0;color:hsl(var(--text-muted));font:400 11px/1.45 var(--font-sans,sans-serif);}
#scene .mesh-explorer-records {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;border:0;}
#scene .mesh-record-box {border:1px solid hsl(var(--border-subtle));border-radius:4px;background:hsl(var(--surface) / .24);}
#scene .mesh-record-box > .mesh-explorer-record {grid-template-columns:minmax(90px,.55fr) minmax(0,1.7fr) minmax(130px,.85fr);min-height:54px;padding:10px 12px;border:0 !important;font-size:11px;}
#scene .mesh-explorer-record strong {font:500 12px/1.35 var(--mono-font,monospace);}
#scene .mesh-explorer-record-kind,#scene .mesh-explorer-record-meta {font-size:8px;}

#scene .mesh-explorer-secondary,#scene .mesh-explorer-reference {margin-top:10px;border-block:1px solid hsl(var(--border-subtle));}
#scene .mesh-explorer-secondary > summary,#scene .mesh-explorer-reference > summary {min-height:42px;display:flex;align-items:center;color:hsl(var(--reference));font:500 10px/1.4 var(--font-sans,sans-serif);cursor:pointer;}
#scene .mesh-explorer-secondary .mesh-explorer-stats {grid-template-columns:repeat(5,minmax(0,1fr));padding:8px 0 14px;border-top:1px solid hsl(var(--border-subtle));}
#scene .mesh-explorer-secondary .mesh-explorer-stat {padding:9px;border-bottom:0;border-right:1px solid hsl(var(--border-subtle));}
#scene .mesh-explorer-secondary .mesh-explorer-stat strong {font-size:18px;}
#scene .mesh-explorer-reference-body {padding:12px 0 20px;border-top:1px solid hsl(var(--border-subtle));}
#scene .mesh-explorer-reference-body p {font-size:12px;}

/* Secondary information lives in one-at-a-time drawers so the observatory remains a single viewport. */
#scene .mesh-observatory-dock {
  position:relative;
  z-index:8;
  min-height:42px;
  height:42px;
  align-self:end;
  display:flex;
  align-items:stretch;
  justify-content:flex-end;
  gap:0;
  border-top:1px solid hsl(var(--border-subtle));
}
#scene .mesh-observatory-popover {position:static;margin:0;border:0;}
#scene .mesh-observatory-popover > summary {
  min-height:42px;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 14px;
  border-left:1px solid hsl(var(--border-subtle));
  color:hsl(var(--text-muted));
  font:500 10px/1.3 var(--font-sans,sans-serif);
  list-style:none;
  cursor:pointer;
}
#scene .mesh-observatory-popover > summary::-webkit-details-marker {display:none;}
#scene .mesh-observatory-popover > summary span {color:hsl(var(--reference));font:500 7px/1 var(--mono-font,monospace);}
#scene .mesh-observatory-popover[open] > summary {background:hsl(var(--reference) / .08);color:hsl(var(--text-strong));}
#scene .mesh-observatory-popover > :not(summary) {
  position:absolute;
  left:0;
  right:0;
  bottom:42px;
  z-index:2;
  max-height:min(430px,calc(100vh - 210px));
  box-sizing:border-box;
  overflow:auto;
  margin:0;
  padding:18px 20px;
  border:1px solid hsl(var(--border-default));
  border-bottom:0;
  border-radius:7px 7px 0 0;
  background:hsl(var(--canvas) / .98);
  box-shadow:0 -18px 36px hsl(var(--canvas) / .32);
}
#scene .mesh-observatory-popover .mesh-explorer-stats {display:grid;}
#scene .mesh-observatory-popover .mesh-explorer-reference-body {display:grid;}
#scene .mesh-observatory-popover .mesh-node-strip,
#scene .mesh-observatory-popover .mesh-explorer-data {display:block;}
#scene .mesh-observatory-popover .mesh-explorer-nodes {margin-bottom:0;}
#scene .mesh-explorer-page :is(button,input,select,summary,a):focus-visible {outline:2px solid hsl(var(--reference));outline-offset:3px;}

.hero-alive[data-page="explorer"] .lattice-activity {opacity:0;pointer-events:none;}
.hero-alive[data-page="explorer"] .lattice-field {opacity:.13;}

@media(max-width:1180px) {
  #scene .mesh-explorer-header {grid-template-columns:1fr;gap:16px;}
  #scene .mesh-explorer-live-panel {grid-template-columns:minmax(280px,1fr) minmax(0,1fr);grid-template-rows:1fr;}
  #scene .mesh-explorer-live-panel .mesh-explorer-status {border-radius:6px 0 0 6px;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics {border-top:1px solid hsl(var(--border-default));border-left:0;border-radius:0 6px 6px 0;}
  #scene .mesh-explorer-connect,#scene .task-page.mesh-explorer-page[data-connection="live"] .mesh-explorer-connect {grid-template-columns:1fr;}
  #scene .mesh-observatory {grid-template-columns:minmax(0,1fr) 310px;}
  #scene .mesh-source-field {grid-template-columns:repeat(5,minmax(100px,1fr));}
  #scene .mesh-explorer-nodes {grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-height:760px) and (min-width:821px) {
  #scene .mesh-explorer-header {min-height:58px;align-items:center;padding-bottom:6px;}
  #scene .mesh-explorer-header .learning-eyebrow {margin-bottom:3px;}
  #scene .mesh-explorer-header h1 {max-width:none;margin-bottom:0;font-size:30px;}
  #scene .mesh-explorer-deck {display:none;}
  #scene .mesh-explorer-connect {padding-block:5px;}
  #scene .mesh-explorer-connect-actions {flex-wrap:nowrap;}
  #scene .mesh-explorer-connect-actions > label {flex:0 1 330px;}
  #scene .mesh-explorer-buttons button {padding-inline:8px;}
  #scene .mesh-operator-access > summary {padding-inline:3px;white-space:nowrap;}
  #scene .mesh-explorer-live-panel {grid-template-columns:1fr 1fr;grid-template-rows:1fr;}
  #scene .mesh-explorer-live-panel .mesh-explorer-status {border-radius:6px 0 0 6px;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics {border-top:1px solid hsl(var(--border-default));border-left:0;border-radius:0 6px 6px 0;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics {grid-template-columns:repeat(3,minmax(0,1fr));}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div {border-top:0;padding-inline:8px;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div:nth-child(3) {display:none;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div:nth-child(2) {border-right:1px solid hsl(var(--border-subtle));}
  #scene .mesh-explorer-core-stats {display:none;}
  #scene .mesh-source-plane {padding-block:10px;}
  #scene .mesh-source-field {gap:3px;}
}
@media(max-width:820px) {
  #scene .mesh-explorer-page .mesh-explorer-shell {padding:14px 18px 8px;}
  #scene .mesh-explorer-section-head {align-items:flex-start;gap:8px;}
  #scene .mesh-explorer-connect-actions {align-items:stretch;flex-wrap:wrap;}
  #scene .mesh-explorer-connect-actions > label {flex-basis:100%;}
  #scene .mesh-explorer-metrics {grid-template-columns:repeat(2,minmax(0,1fr));width:100%;}
  #scene .mesh-observatory {grid-template-columns:1fr;overflow:auto;}
  #scene .mesh-source-inspector {border-left:0;border-top:1px solid hsl(var(--border-default));}
  #scene .mesh-source-field {grid-template-columns:repeat(3,minmax(105px,1fr));}
  #scene .mesh-explorer-core-stats {grid-template-columns:repeat(2,minmax(0,1fr));}
  #scene .mesh-explorer-core-stats .mesh-explorer-stat:nth-child(2) {border-right:0;}
  #scene .mesh-explorer-nodes {grid-template-columns:1fr 1fr;}
  #scene .mesh-explorer-records {grid-template-columns:1fr;}
  #scene .mesh-explorer-secondary .mesh-explorer-stats {grid-template-columns:repeat(2,minmax(0,1fr));}
  #scene .mesh-observatory-dock {justify-content:stretch;}
  #scene .mesh-observatory-popover {flex:1 1 0;}
  #scene .mesh-observatory-popover > summary {justify-content:center;padding:0 7px;font-size:0;}
  #scene .mesh-observatory-popover > summary span {font-size:8px;}
}
@media(max-width:520px) {
  #scene .mesh-explorer-header h1 {font-size:35px;}
  #scene .mesh-source-field {grid-template-columns:repeat(2,minmax(0,1fr));}
  #scene .mesh-explorer-nodes {grid-template-columns:1fr;}
  #scene .mesh-source-inspector form {grid-template-columns:1fr;}
  #scene .mesh-source-inspector form button {width:max-content;margin:0;}
}
@media(prefers-reduced-motion:reduce) {
  #scene .mesh-explorer-page * {scroll-behavior:auto !important;transition:none !important;animation:none !important;}
}

/* Compact masthead: title, live status and connection controls share at most 150px on desktop. */
@media(min-width:821px) {
  #scene .mesh-explorer-page .mesh-explorer-shell {padding-top:10px;}
  #scene .mesh-explorer-header {grid-template-columns:minmax(0,1fr) minmax(430px,560px);gap:20px;align-items:center;min-height:0;padding:0 0 6px;}
  #scene .mesh-explorer-header .learning-eyebrow {margin:0 0 2px;font-size:8px;}
  #scene .mesh-explorer-header h1 {margin:0;font-size:clamp(22px,2vw,28px);line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  #scene .mesh-explorer-deck {display:none;}
  #scene .mesh-explorer-live-panel {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;}
  #scene .mesh-explorer-live-panel .mesh-explorer-status {min-height:0;padding:5px 10px;gap:9px;border-radius:5px 5px 0 0;}
  #scene .mesh-explorer-status strong {font-size:11px;line-height:1.2;}
  #scene .mesh-explorer-status > div {gap:0;grid-template-columns:auto minmax(0,1fr);align-items:baseline;column-gap:10px;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics {grid-template-columns:repeat(4,minmax(0,1fr));border-radius:0 0 5px 5px;border-top:0;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div,
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div:nth-child(3) {display:grid;gap:1px;padding:4px 8px;border-top:0;border-right:1px solid hsl(var(--border-subtle));}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div:last-child {border-right:0;}
  #scene .mesh-explorer-metrics span {font-size:6.5px;}
  #scene .mesh-explorer-metrics strong {overflow:hidden;text-overflow:ellipsis;font-size:10px;}
  #scene .mesh-explorer-connect,#scene .task-page.mesh-explorer-page[data-connection="live"] .mesh-explorer-connect {padding:5px 0;}
  #scene .mesh-explorer-connect-actions {gap:8px;}
  #scene .mesh-explorer-connect-actions > label {display:flex;align-items:center;gap:8px;flex:0 1 380px;}
  #scene .mesh-explorer-connect-actions > label select {flex:1 1 auto;min-height:30px;margin:0;padding:4px 9px;font-size:11px;}
  #scene .mesh-explorer-buttons button,#scene .mesh-operator-access > summary {min-height:30px;padding-block:3px;}
}
@media(min-width:1100px) {
  #scene .mesh-explorer-header {grid-template-columns:minmax(300px,1fr) minmax(0,780px);}
  #scene .mesh-explorer-live-panel {grid-template-columns:minmax(0,1.15fr) minmax(0,1.5fr);grid-template-rows:auto;height:44px;}
  #scene .mesh-explorer-live-panel .mesh-explorer-status {display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;height:100%;box-sizing:border-box;border-radius:5px 0 0 5px;overflow:hidden;}
  #scene .mesh-explorer-live-panel .mesh-explorer-status > div {display:grid;gap:1px;grid-template-columns:minmax(0,1fr);}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics {height:100%;box-sizing:border-box;border:1px solid hsl(var(--border-default));border-left:0;border-radius:0 5px 5px 0;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div:nth-child(1),
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div:nth-child(4) {display:none;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics {grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(min-width:1100px) {
  #scene .mesh-explorer-live-panel {overflow:hidden;align-self:center;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div,
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div:nth-child(3) {align-content:center;padding:2px 8px;min-height:0;}
}
@media(min-width:1100px) {
  #scene .mesh-explorer-live-panel {height:auto;min-height:44px;overflow:visible;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics {height:auto;}
}
@media(min-width:821px) {
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics {margin:0 !important;}
  #scene .mesh-explorer-live-panel .mesh-explorer-metrics > div {padding:3px 8px !important;}
}

/* Source field: category cards drill into one category's sources in place. */
#scene .mesh-source-field {grid-template-columns:repeat(auto-fill,minmax(150px,1fr)) !important;gap:8px;align-content:start;}
#scene .mesh-source-field[data-view="cells"] {grid-template-columns:repeat(auto-fill,minmax(170px,1fr)) !important;gap:6px;}
#scene .mesh-source-card {position:relative;min-height:64px !important;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;align-items:center;gap:2px 8px;padding:10px 12px;border:1px solid hsl(var(--border-subtle));border-radius:6px;background:hsl(var(--surface) / .18);color:hsl(var(--text-muted));text-align:left;cursor:pointer;}
#scene .mesh-source-card span {color:hsl(var(--text-strong));font:500 12px/1.2 var(--font-sans,sans-serif);text-transform:capitalize;}
#scene .mesh-source-card strong {grid-row:1 / 3;grid-column:2;color:hsl(var(--primary));font:500 20px/1 var(--font-sans,sans-serif);}
#scene .mesh-source-card small {color:hsl(var(--text-faint));font:500 9px/1.2 var(--mono-font,monospace);}
#scene .mesh-source-card:hover,#scene .mesh-source-card:focus-visible {border-color:hsl(var(--reference));background:hsl(var(--reference) / .08);}
#scene .mesh-source-crumb {display:flex;align-items:center;gap:10px;margin:0 0 8px;color:hsl(var(--text-faint));font:500 9px/1.3 var(--mono-font,monospace);}
#scene .mesh-source-crumb[hidden] {display:none;}
#scene .mesh-source-crumb strong {color:hsl(var(--text-strong));font:500 12px/1.2 var(--font-sans,sans-serif);text-transform:capitalize;}
#scene .mesh-source-back {min-height:26px !important;padding:2px 10px !important;border:1px solid hsl(var(--border-default));border-radius:999px;background:transparent;color:hsl(var(--reference));font:500 10px/1.2 var(--font-sans,sans-serif);cursor:pointer;}
#scene .mesh-source-cell {min-height:40px !important;padding:6px 9px;}
#scene .mesh-source-cell span {font-size:10px;}
#scene .mesh-source-cell small {font-size:8px;}
/* Quieter summary: one slim line of figures instead of four tall tiles. */
#scene .mesh-explorer-core-stats .mesh-explorer-stat {display:flex;align-items:baseline;gap:7px;padding:5px 10px;}
#scene .mesh-explorer-core-stats .mesh-explorer-stat small {display:none;}
#scene .mesh-explorer-core-stats .mesh-explorer-stat strong {font-size:13px;}
#scene .mesh-explorer-core-stats .mesh-explorer-stat span {font-size:8px;}
#scene .mesh-source-filter {margin-bottom:8px;padding-bottom:0;border-bottom:0;}

/* Inspector: a plain-language guide for the selected source and an in-place inspection result. */
#scene .mesh-source-guide {display:grid;gap:9px;margin:0 0 14px;}
#scene .mesh-source-guide-step h4 {margin:0 0 2px;color:hsl(var(--primary));font:500 8px/1.4 var(--mono-font,monospace);letter-spacing:.09em;text-transform:uppercase;}
#scene .mesh-source-guide-step p {margin:0;color:hsl(var(--text-muted));font:400 11px/1.45 var(--font-sans,sans-serif);}
#scene .mesh-source-inspector > [data-explorer-source-summary] {display:none;}
#scene .mesh-inspect-result {margin:4px 0 0;padding:10px 12px;border:1px solid hsl(var(--border-default));border-radius:6px;background:hsl(var(--surface) / .22);}
#scene .mesh-inspect-result[hidden] {display:none;}
#scene .mesh-inspect-result p {margin:0;color:hsl(var(--text-muted));font:400 11px/1.45 var(--font-sans,sans-serif);}
#scene .mesh-inspect-result[data-state="error"] {border-color:hsl(var(--danger) / .6);}
#scene .mesh-inspect-result[data-state="error"] p {color:hsl(var(--danger));}
#scene .mesh-inspect-result[data-state="found"] {border-color:hsl(var(--primary) / .5);}
#scene .mesh-inspect-result h4 {margin:0 0 4px;color:hsl(var(--primary));font:500 8px/1.4 var(--mono-font,monospace);letter-spacing:.09em;text-transform:uppercase;}
#scene .mesh-inspect-result .mesh-inspect-id {margin-bottom:8px;color:hsl(var(--text-strong));font:500 11px/1.4 var(--mono-font,monospace);overflow-wrap:anywhere;}
#scene .mesh-inspect-result .mesh-explorer-fields {display:grid;gap:4px;margin:0;font-size:10px;}
#scene .mesh-inspect-result .mesh-explorer-fields {grid-template-columns:1fr;}
#scene .mesh-inspect-result .mesh-explorer-field {display:grid;grid-template-columns:84px minmax(0,1fr);gap:8px;padding:4px 0;border-top:1px solid hsl(var(--border-subtle));}
#scene .mesh-inspect-result :is(dt,dd) {margin:0;overflow-wrap:anywhere;font:500 10px/1.4 var(--mono-font,monospace);}
#scene .mesh-inspect-result dt {color:hsl(var(--text-faint));}
#scene .mesh-inspect-result dd {color:hsl(var(--text-strong));}
#scene .mesh-source-inspector > h2 {margin-bottom:8px;}
#scene .mesh-inspect-retry {margin-top:8px;min-height:28px !important;padding:3px 10px !important;border:1px solid hsl(var(--reference));border-radius:999px;background:transparent;color:hsl(var(--reference));font:500 10px/1.2 var(--font-sans,sans-serif);cursor:pointer;}
#scene .mesh-inspect-result[data-state="error"] .mesh-inspect-retry {color:hsl(var(--reference));}

/* Connection controls live in a popover beside the status strip; the masthead is one row. */
#scene .mesh-explorer-header {position:relative;grid-template-columns:minmax(260px,1fr) minmax(0,720px) auto !important;align-items:center;}
#scene .mesh-explorer-header > .mesh-explorer-connect {display:none;}
#scene .mesh-connect-popover {position:relative;align-self:stretch;margin:0;}
#scene .mesh-connect-popover > summary {height:100%;min-height:36px;box-sizing:border-box;display:flex;align-items:center;gap:8px;padding:0 12px;border:1px solid hsl(var(--border-default));border-radius:5px;background:hsl(var(--surface) / .3);color:hsl(var(--text-strong));font:500 11px/1.2 var(--font-sans,sans-serif);white-space:nowrap;list-style:none;cursor:pointer;}
#scene .mesh-connect-popover > summary::-webkit-details-marker {display:none;}
#scene .mesh-connect-popover > summary::after {content:"";width:6px;height:6px;margin-left:2px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-2px) rotate(45deg);}
#scene .mesh-connect-popover[open] > summary {border-color:hsl(var(--reference));background:hsl(var(--reference) / .08);}
#scene .mesh-connect-dot {width:7px;height:7px;border-radius:2px;transform:rotate(45deg);background:hsl(var(--text-muted));}
#scene .mesh-explorer-page[data-connection="live"] .mesh-connect-dot {background:hsl(var(--primary));}
#scene .mesh-connect-popover > .mesh-explorer-connect {position:absolute;top:calc(100% + 6px);right:0;z-index:20;width:min(420px,calc(100vw - 48px));box-sizing:border-box;padding:12px !important;border:1px solid hsl(var(--border-default)) !important;border-radius:7px;background:hsl(var(--canvas) / .98);box-shadow:0 18px 36px hsl(var(--canvas) / .45);}
#scene .mesh-connect-popover .mesh-explorer-connect-actions {display:grid !important;grid-template-columns:1fr;gap:8px;}
#scene .mesh-connect-popover .mesh-explorer-connect-actions > label {display:grid;gap:4px;flex:none;}
#scene .mesh-connect-popover .mesh-explorer-buttons {display:flex;gap:6px;}
#scene .mesh-connect-popover .mesh-explorer-buttons button {flex:1 1 0;}
#scene .mesh-connect-popover .mesh-operator-access > summary {padding:0;}
#scene .mesh-connect-popover .mesh-operator-access input {min-width:0;width:100%;box-sizing:border-box;}

/* Source field heading: title, figures and timestamp share one row. */
#scene .mesh-source-head {align-items:center;gap:16px;padding-bottom:8px;}
#scene .mesh-source-head h2 {display:flex;align-items:baseline;gap:8px;flex:0 0 auto;font-size:16px !important;white-space:nowrap;}
#scene .mesh-source-head h2 .mesh-explorer-kicker {margin:0;font-size:8px;}
#scene .mesh-source-head .mesh-explorer-core-stats {flex:1 1 auto;display:flex;justify-content:flex-end;gap:0;margin:0;border:0;min-width:0;}
#scene .mesh-source-head .mesh-explorer-core-stats .mesh-explorer-stat {padding:2px 10px;border-right:1px solid hsl(var(--border-subtle));white-space:nowrap;}
#scene .mesh-source-head .mesh-explorer-core-stats .mesh-explorer-stat:last-child {border-right:0;}
#scene .mesh-source-stamp {flex:0 0 auto;color:hsl(var(--text-faint));font:500 8px/1.4 var(--mono-font,monospace);}

/* The dock is always a single row. */
#scene .mesh-observatory-dock {flex-wrap:nowrap !important;}
#scene .mesh-observatory-dock > .mesh-observatory-popover {flex:0 0 auto;margin:0 !important;padding:0 !important;align-self:stretch;}
#scene .mesh-observatory-popover > summary {white-space:nowrap;}
#scene .mesh-explorer-page .mesh-explorer-shell {grid-template-rows:auto minmax(0,1fr) auto;}
#scene .mesh-explorer-header {grid-template-columns:auto minmax(0,1fr) auto !important;}
#scene .mesh-explorer-header .mesh-explorer-title-group {max-width:none;}
#scene .mesh-explorer-header h1 {overflow:visible;text-overflow:clip;}
#scene .mesh-source-inspector .mesh-explorer-boundary {display:none;}
@media(max-width:1099px) {
  #scene .mesh-explorer-header {grid-template-columns:minmax(0,1fr) auto !important;}
  #scene .mesh-explorer-header > .mesh-explorer-live-panel {grid-column:1 / -1;grid-row:2;}
}
#scene .mesh-explorer-header {z-index:30;}
#scene .mesh-connect-popover > .mesh-explorer-connect {background:hsl(var(--canvas));}
#scene .mesh-source-head {flex-wrap:wrap;row-gap:4px;}
#scene .mesh-source-head .mesh-explorer-core-stats .mesh-explorer-stat {flex:0 0 auto;}
#scene .mesh-source-head .mesh-explorer-core-stats {flex-wrap:wrap;}
