/* Solar Lab shell extracted from Claude Design 2a-D, 2a-M1 and 2a-M2.
   Load after ui_design_tokens.css. The design document's fixed artboards are
   translated into responsive layout here; chart rendering stays with Plotly. */

body.lab-events {
  margin: 0;
  min-height: 100vh;
  background: var(--sl-page);
  color: var(--sl-ink);
  font-family: var(--sl-font-ui);
  --sl-nav-bg: #1a1a22;
  --sl-nav-ink: #fcf7ec;
  --sl-nav-muted: #c9c4b4;
  --sl-nav-border: #4a4a55;
  --sl-nav-soft-border: #6b6b78;
  --sl-active-bg: #1a1a22;
  --sl-active-ink: #fff;
}

body.lab-events *, body.lab-events *::before, body.lab-events *::after { box-sizing: border-box; }
body.lab-events :is(h1,h2,h3,p,dl,dd) { margin:0; }

body.lab-events.theme-dark {
  --sl-nav-bg: #1b1b23;
  --sl-nav-ink: #ece8dc;
  --sl-nav-muted: #9a9fae;
  --sl-nav-border: #3a3a48;
  --sl-nav-soft-border: #6b6b78;
  --sl-active-bg: #ece8dc;
  --sl-active-ink: #1b1b23;
}

body.lab-events .sl-app {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--sl-page);
  color: var(--sl-ink);
  font: 400 13px/1.4 var(--sl-font-ui);
}

body.lab-events .sl-app button,
body.lab-events .sl-app input,
body.lab-events .sl-app select {
  font: inherit;
}

body.lab-events .sl-app button { cursor: pointer; }
body.lab-events .sl-app [hidden] { display: none !important; }

/* The 48px dark menubar is a single row, not the old Lab masthead. */
body.lab-events .sl-topbar {
  position: relative;
  z-index: 30;
  flex: none;
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: var(--sl-nav-bg);
  color: var(--sl-nav-ink);
  white-space: nowrap;
}
body.lab-events .sl-app .sl-topbar > .rd-mobile-goto,
body.lab-events .sl-app .sl-menu-count,
body.lab-events .sl-app #evHamburger { display: none; }

body.lab-events .sl-brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

body.lab-events .sl-brand img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

body.lab-events .sl-surface-nav { display:flex; flex:none; gap:10px; align-items:center; }
body.lab-events .sl-surface-nav a { color:var(--sl-nav-muted); text-decoration:none; font:500 11px/1.2 var(--sl-font-mono); padding:5px 2px; }
body.lab-events .sl-surface-nav a[aria-current="page"] { color:var(--sl-nav-ink); }
body.lab-events .sl-surface-nav a:hover { color:var(--sl-accent); }
body.lab-events .sl-surface-nav a:focus-visible { outline:2px solid var(--sl-accent); outline-offset:3px; }
/* Director: the window summary is the single visible flare list. Keep the
   native host for catalogue updates and quiet-window state observers. */
body.lab-events .sl-app #slGoesFlareChips { display:none !important; }

body.lab-events .sl-brand-name,
body.lab-events .sl-brand strong {
  font: 700 17px/1.1 var(--sl-font-display);
  letter-spacing: -.01em;
}

body.lab-events .sl-brand-tag,
body.lab-events .sl-brand-lab {
  font: 500 11px/1.2 var(--sl-font-mono);
  letter-spacing: .1em;
  color: #a9a496;
}

body.lab-events .sl-event-chip {
  flex: none;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 10px;
  border: 1px solid var(--sl-nav-border);
  border-radius: var(--sl-radius-sm);
  color: var(--sl-nav-muted);
  font: 400 12px/1.2 var(--sl-font-mono);
}

body.lab-events .sl-event-chip strong,
body.lab-events .sl-event-chip b { color: #ff6b35; }

body.lab-events .sl-menu-bar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

body.lab-events .sl-menu-bar button,
body.lab-events .sl-menu-bar a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background: transparent;
  color: var(--sl-nav-muted);
  font: 500 13px/1.2 var(--sl-font-ui);
  text-decoration: none;
}

body.lab-events .sl-menu-bar button:hover,
body.lab-events .sl-menu-bar button[aria-expanded="true"],
body.lab-events .sl-menu-bar a:hover {
  background: #31323b;
  color: var(--sl-nav-ink);
}

body.lab-events .sl-topbar-actions {
  flex: none;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

body.lab-events .sl-theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  min-height: 36px;
  padding: 6px;
  border: 1px solid var(--sl-nav-soft-border);
  border-radius: var(--sl-radius-sm);
  color: var(--sl-nav-ink);
  background: transparent;
  cursor: pointer;
}
body.lab-events .sl-theme-toggle svg { width: 20px; height: 20px; }
body.lab-events .sl-theme-toggle:hover { background: #31323b; }
body.lab-events .sl-theme-toggle:focus-visible { outline: 2px solid #ffb590; outline-offset: 2px; }
@media(max-width:767px) {
  body.lab-events .sl-theme-toggle { width: 40px; min-height: 44px; padding: 8px; }
}
@media(max-width:480px) {
  body.lab-events .sl-app .sl-surface-nav { display: none; }
}
@media(max-width:380px) {
  body.lab-events .sl-app .sl-team-button { width: 32px; min-height: 32px; justify-content: center; padding: 3px; }
  body.lab-events .sl-app .sl-team-button > span:first-child { display: inline; font-size: 18px; }
  body.lab-events .sl-app .sl-team-mobile { display: none; }
}

body.lab-events .sl-topbar-action,
body.lab-events .sl-team-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  padding: 5px 12px;
  border: 1px solid var(--sl-nav-soft-border);
  border-radius: var(--sl-radius-sm);
  background: transparent;
  color: var(--sl-nav-ink);
  font: 600 13px/1.2 var(--sl-font-ui);
  white-space: nowrap;
}

body.lab-events .sl-topbar-action:hover,
body.lab-events .sl-team-button:hover { background: #31323b; }
body.lab-events .sl-topbar-action-icon,
body.lab-events .sl-team-button > span:first-child { color: #ff6b35; }

body.lab-events .sl-team-mobile { display: none; }
body.lab-events .sl-menu-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 3px 7px;
  border: 1px solid var(--sl-nav-soft-border);
  border-radius: var(--sl-radius-sm);
  color: var(--sl-nav-ink);
  font: 500 12px/1 var(--sl-font-mono);
}
body.lab-events .sl-menu-count > span { color: #ff6b35; }

body.lab-events .sl-status-pill,
body.lab-events .sl-vps-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 10px;
  border: 1px solid var(--sl-nav-border);
  border-radius: var(--sl-radius-pill);
  color: var(--sl-nav-muted);
  font: 400 11px/1.2 var(--sl-font-mono);
  white-space: nowrap;
}

body.lab-events .sl-status-pill::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf50;
}

body.lab-events .sl-vps-pill::before { display: none; }
body.lab-events button.sl-vps-pill { background: transparent; cursor: pointer; }
body.lab-events .sl-vps-pill i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf50;
}
body.lab-events .sl-vps-pill[data-health="checking…"] i { background: #a9a496; }
body.lab-events .sl-vps-pill[data-health="slow"] i { background: #d8a410; }
body.lab-events .sl-vps-pill[data-health="unavailable"] i { background: #e54845; }

body.lab-events .sl-hamburger { display: none; }

body.lab-events .sl-version {
  color: #a9a496;
  font: 400 11px/1.2 var(--sl-font-mono);
}

body.lab-events .sl-language {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--sl-nav-border);
  border-radius: var(--sl-radius-sm);
}

body.lab-events .sl-language button {
  min-height: 26px;
  padding: 4px 9px;
  border: 0;
  background: transparent;
  color: #a9a496;
  font: 500 11px/1.2 var(--sl-font-mono);
}

body.lab-events .sl-language button[aria-pressed="true"],
body.lab-events .sl-language button.is-active {
  background: #fcf7ec;
  color: #1a1a22;
  font-weight: 600;
}

/* Desktop composition: 232px data rail, flexible plotting column. */
body.lab-events .sl-workspace {
  flex: 1 0 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  align-items: stretch;
}

body.lab-events .sl-sidebar {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px 16px 24px;
  border-right: 1px solid var(--sl-border-soft);
  background: var(--sl-page);
}

body.lab-events .sl-sidebar-resize {
  position: absolute;
  z-index: 2;
  top: 0;
  right: -3px;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  background: linear-gradient(90deg, transparent 2px, var(--sl-border) 2px, var(--sl-border) 3px, transparent 3px);
}

body.lab-events .sl-sidebar-collapse {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: -12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--sl-border);
  border-radius: 50%;
  background: var(--sl-surface);
  color: var(--sl-muted);
  line-height: 1;
}

/* Collapse the current source-first rail; the old .ev-body grid is gone. */
@media (min-width: 768px) {
  body.lab-events.rd-sidebar-collapsed .sl-app .sl-workspace { grid-template-columns: 40px minmax(0, 1fr); }
  body.lab-events.rd-sidebar-collapsed .sl-sidebar { padding: 0; }
  body.lab-events.rd-sidebar-collapsed .sl-sidebar > :not(.sl-sidebar-collapse) { display: none; }
  body.lab-events.rd-sidebar-collapsed .sl-sidebar-collapse { right: 4px; width: 32px; height: 32px; border-radius: 8px; }
}
body.lab-events .sl-sidebar-collapse:focus-visible { outline: 2px solid var(--sl-accent); outline-offset: 2px; }

/* About uses the same modal tokens as the tutorial, with a content-sized card. */
body.lab-events .rd-help-dialog[data-help-tab="about"] .rd-help-card { width: min(1000px, 100%); height: auto; max-height: calc(100dvh - 48px); }
body.lab-events .rd-help-card .rd-help-about { max-width: 960px; margin: 0 auto; padding: 28px; font: 14px/1.6 var(--sl-font-ui); }
body.lab-events .rd-help-about > header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
body.lab-events .rd-help-about .rd-help-about-mark { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border: 1px solid var(--sl-border-soft); border-radius: 12px; background: var(--sl-surface-soft); color: var(--sl-accent); font-size: 30px; }
body.lab-events .rd-help-card .rd-help-about h3 { margin: 0 0 4px; font: 600 26px/1.15 var(--sl-font-display); }
body.lab-events .rd-help-card .rd-help-about header p { color: var(--sl-muted); font-size: 13px; }
body.lab-events .rd-help-about-sections { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
body.lab-events .rd-help-about-sections section { padding: 20px; border: 1px solid var(--sl-border-soft); border-radius: 10px; background: var(--sl-surface-soft); }
body.lab-events .rd-help-about-sections h4 { margin: 0 0 8px; color: var(--sl-ink); font: 600 14px/1.4 var(--sl-font-ui); }
body.lab-events .rd-help-about-sections p { color: var(--sl-ink-secondary); margin: 0; }
body.lab-events .rd-help-about-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
body.lab-events .rd-help-card .rd-help-about-actions button { min-height: 40px; padding: 9px 14px; border: 1px solid var(--sl-border); border-radius: 6px; background: var(--sl-surface); color: var(--sl-ink); text-decoration: none; font: 600 13px var(--sl-font-ui); cursor: pointer; }
body.lab-events .rd-help-card .rd-help-about-actions .rd-help-credits { border-color: var(--sl-ink); background: var(--sl-ink); color: var(--sl-surface); }
@media (max-width: 700px) {
  body.lab-events .rd-help-dialog[data-help-tab="about"] .rd-help-card { width: 100%; height: 100dvh; max-height: 100dvh; }
  body.lab-events .rd-help-card .rd-help-about { padding: 24px 17px; }
  body.lab-events .rd-help-about-sections { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body.lab-events .rd-help-about-sections section { padding: 16px; }
  body.lab-events .rd-help-card .rd-help-about h3 { font-size: 22px; }
  body.lab-events .rd-help-about .rd-help-about-mark { width: 44px; height: 44px; }
  body.lab-events .rd-help-card .rd-help-about-actions button { min-height: 44px; }
}

body.lab-events .sl-sidebar-section {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.lab-events .sl-instruments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  align-content: start;
}

body.lab-events .sl-instruments > h2,
body.lab-events .sl-instruments > h3,
body.lab-events .sl-instruments > .sl-instrument-grid,
body.lab-events .sl-instruments > .sl-coming-soon,
body.lab-events .sl-instruments > label:has(#chk-dst),
body.lab-events .sl-instruments > label:has(#chk-hmi) {
  grid-column: 1 / -1;
}

body.lab-events .sl-instruments > h3 {
  margin: 6px 0 0;
  color: var(--sl-muted);
  font: 600 9px/1.2 var(--sl-font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.lab-events .sl-sidebar-heading span {
  float: right;
  color: var(--sl-muted-soft);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

body.lab-events .sl-sidebar-heading,
body.lab-events .sl-toolbar-label {
  display: block;
  color: var(--sl-muted);
  font: 600 10px/1.2 var(--sl-font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

body.lab-events .sl-sidebar-heading {
  margin-bottom: 3px;
  letter-spacing: .12em;
}

body.lab-events .sl-instrument-grid,
body.lab-events .sl-coverage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

body.lab-events .sl-instrument {
  min-width: 0;
  min-height: 41px;
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--sl-border-soft);
  border-left: 3px solid var(--sl-instrument-color, var(--sl-border));
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface);
  color: var(--sl-ink);
  font-weight: 600;
  text-align: left;
}

body.lab-events .sl-instrument:has(input:checked) {
  border-color: var(--sl-border);
  border-left-color: var(--sl-instrument-color, var(--sl-border));
}

body.lab-events .sl-instrument input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 15px;
  height: 15px;
  margin: 0;
  appearance: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--sl-border);
  border-radius: 2px;
  background: var(--sl-surface);
  color: var(--sl-ink);
  cursor: pointer;
}
body.lab-events .sl-instrument input[type="checkbox"]:checked::after {
  content: "✓";
  font: 700 12px/1 var(--sl-font-ui);
}
body.lab-events .sl-instrument input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--sl-violet);
  outline-offset: 2px;
}

body.lab-events .sl-instrument-name { min-width: 0; line-height: 1.15; }
body.lab-events .sl-instrument > span { grid-column: 2; min-width: 0; line-height: 1.15; }
body.lab-events .sl-instrument-detail {
  display: block;
  margin-top: 2px;
  color: var(--sl-muted);
  font: 400 9px/1.1 var(--sl-font-mono);
}

body.lab-events .sl-instrument small {
  grid-column: 2;
  display: block;
  margin-left: 0;
  color: var(--sl-muted);
  font: 400 9px/1.1 var(--sl-font-mono);
}

body.lab-events .sl-instrument:has(#chk-goes) { --sl-instrument-color: #d32f2f; }
body.lab-events .sl-instrument:has(#chk-rstn) { --sl-instrument-color: #7e57c2; }
body.lab-events .sl-instrument:has(#chk-rhessi) { --sl-instrument-color: #e53935; }
body.lab-events .sl-instrument:has(#chk-poemas) { --sl-instrument-color: #d84315; }
body.lab-events .sl-instrument:has(#chk-aia) { --sl-instrument-color: #0e7490; }
body.lab-events .sl-instrument:has(#chk-halpha) { --sl-instrument-color: #b75a43; }
body.lab-events .sl-instrument:has(#chk-dst) { --sl-instrument-color: #64748b; }

body.lab-events .sl-instrument[data-instrument="goes"] { --sl-instrument-color: #d32f2f; }
body.lab-events .sl-instrument[data-instrument="rstn"] { --sl-instrument-color: #7e57c2; }
body.lab-events .sl-instrument[data-instrument="rhessi"] { --sl-instrument-color: #e53935; }
body.lab-events .sl-instrument[data-instrument="poemas"] { --sl-instrument-color: #d84315; }
body.lab-events .sl-instrument[data-instrument="aia"] { --sl-instrument-color: #0e7490; }
body.lab-events .sl-instrument[data-instrument="halpha"] { --sl-instrument-color: #b75a43; }
body.lab-events .sl-instrument[data-instrument="dst"] { --sl-instrument-color: #64748b; }

body.lab-events .sl-date-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

body.lab-events .sl-date-grid > div { min-width: 0; }
body.lab-events .sl-date-grid h3 {
  margin: 0 0 4px;
  color: var(--sl-muted-soft);
  font: 400 9px/1.2 var(--sl-font-mono);
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

body.lab-events .sl-date-grid [role="listbox"] {
  box-sizing: border-box;
  min-height: 326px;
  max-height: 326px;
  overflow-y: auto;
  scrollbar-width: none;
  border: 1px solid var(--sl-border-soft);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface);
  text-align: center;
}
body.lab-events .sl-date-grid [role="listbox"]::-webkit-scrollbar { display: none; }
body.lab-events .sl-date-grid #dpMonthList { overflow-y: hidden; }

body.lab-events .sl-date-grid [role="listbox"] > * {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 26px;
  min-height: 26px;
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--sl-muted);
  font: 600 11px/1.2 var(--sl-font-mono);
}

body.lab-events .sl-date-grid [role="listbox"] > [aria-selected="true"],
body.lab-events .sl-date-grid [role="listbox"] > .is-selected {
  background: var(--sl-violet);
  color: #fff;
}

body.lab-events .sl-date-summary {
  color: var(--sl-muted);
  font: 400 11px/1.2 var(--sl-font-mono);
}
body.lab-events .sl-date-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

body.lab-events .sl-date-column {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--sl-border-soft);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface);
  text-align: center;
}

body.lab-events .sl-date-column button {
  display: block;
  width: 100%;
  min-height: 23px;
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: var(--sl-muted);
  font: 600 11px/1.2 var(--sl-font-mono);
}

body.lab-events .sl-date-column button:hover { background: var(--sl-surface-soft); }
body.lab-events .sl-date-column button[aria-selected="true"],
body.lab-events .sl-date-column button.is-selected {
  background: var(--sl-violet);
  color: #fff;
}

body.lab-events .sl-list-card {
  box-sizing: border-box;
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: min-content minmax(0, 1fr) max-content;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 5px;
  row-gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--sl-border-soft);
  border-left: 3px solid var(--sl-list-accent, var(--sl-violet));
  border-radius: 0 var(--sl-radius-sm) var(--sl-radius-sm) 0;
  background: var(--sl-surface);
}

body.lab-events #evSidebarFlares { --sl-list-accent: #d4a017; --sl-list-count: #b8870b; }
body.lab-events #evSidebarCMEs { --sl-list-accent: #7e57c2; --sl-list-count: #7e57c2; }
body.lab-events.theme-dark #evSidebarFlares { --sl-list-count: #f0c465; }
body.lab-events.theme-dark #evSidebarCMEs { --sl-list-count: #b89dff; }

/* The live flare/CME modules insert h2, button, then a nested summary. */
body.lab-events .sl-list-card .ev-flare-summary { display: contents; }
body.lab-events .sl-list-card > .sl-window-row {
  grid-column: 1 / -1;
  grid-row: 1 / 3;
  min-width: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
}
body.lab-events .sl-list-card .sl-window-info {
  min-width: 0;
  display: grid;
  gap: 3px;
}
body.lab-events .sl-list-card .sl-window-info strong {
  color: var(--sl-ink);
  font: 700 11px/1.15 var(--sl-font-ui);
}
body.lab-events .sl-list-card h2 {
  grid-column: 2 / -1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  color: var(--sl-ink);
  font: 700 11px/1.15 var(--sl-font-ui);
  letter-spacing: 0;
  text-transform: none;
}
body.lab-events .sl-list-card .ev-flare-countrow {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  margin-right: 3px;
}
body.lab-events .sl-list-card .ev-flare-count {
  color: var(--sl-list-count);
  font: 700 28px/1 var(--sl-font-display);
  letter-spacing: -.03em;
}
body.lab-events .sl-list-card .sl-window-row > .ev-flare-count { grid-column: 1; }
body.lab-events .sl-list-card .ev-flare-classes {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
}
body.lab-events .sl-list-card .sl-window-info > .ev-flare-classes { grid-column: auto; grid-row: auto; }
body.lab-events .sl-list-card .ev-flare-classchip {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 2px;
  background: var(--sl-surface-muted);
  color: var(--sl-muted);
  font: 600 9px/1.2 var(--sl-font-mono);
  white-space: nowrap;
}
body.lab-events .sl-list-card .ev-flare-classchip--x,
body.lab-events .sl-list-card .ev-flare-classchip--halo { background: #f2e8bb; color: #765500; }
body.lab-events .sl-list-card .ev-flare-classchip--m { background: #ebe1f4; color: #654498; }
body.lab-events .sl-list-card .ev-flare-viewtable {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: var(--sl-accent);
  font: 600 10px/1.1 var(--sl-font-ui);
  text-decoration: none;
  white-space: nowrap;
}
body.lab-events .sl-list-card .sl-window-row > .ev-flare-viewtable {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  margin-bottom: 1px;
}
body.lab-events .sl-list-card .ev-flare-viewtable:hover { color: var(--sl-accent-hover); }
/* Director: the summary itself is the native table button, including its
   count, label, badges and outer padding. No nested click target. */
body.lab-events .sl-list-card:has(> .sl-window-button) { display:block; padding:0; border:0; background:transparent; }
body.lab-events .sl-list-card > button.sl-window-button {
  box-sizing:border-box; width:100%; min-height:72px; margin:0; padding:12px;
  display:grid; grid-template-columns:36px minmax(0,1fr) auto; gap:10px; align-items:center;
  border:1px solid var(--sl-border-soft); border-left:3px solid var(--sl-list-accent);
  border-radius:6px; background:var(--sl-surface); color:var(--sl-ink); text-align:left;
  font:500 12px/1.4 var(--sl-font-ui); cursor:pointer;
}
body.lab-events .sl-list-card > button.sl-window-button:hover { background:var(--sl-surface-soft); border-color:var(--sl-list-accent); color:var(--sl-ink); }
body.lab-events .sl-list-card > button.sl-window-button:focus-visible { outline:2px solid var(--sl-list-accent); outline-offset:3px; }
body.lab-events .sl-window-button .sl-window-info strong { font:600 14px/1.3 var(--sl-font-ui); }
body.lab-events .sl-window-button .ev-flare-classchip { font-size:10px; padding:2px 5px; }
body.lab-events .sl-window-button .sl-window-link { color:var(--sl-accent); font:600 12px/1.3 var(--sl-font-ui); white-space:nowrap; }
body.lab-events .sl-list-card > button.sl-window-button:disabled { cursor:default; opacity:.6; color:var(--sl-muted); }
body.lab-events .sl-list-card .ev-flare-viewtable:focus-visible { outline: 2px solid var(--sl-accent); outline-offset: 3px; }
body.lab-events .sl-list-card .ev-flare-viewtable:disabled {
  color: var(--sl-muted-soft);
  cursor: not-allowed;
}
body.lab-events .sl-list-card .ev-flare-catalog-warn {
  grid-column: 1 / -1;
  grid-row: 3;
  min-width: 0;
  margin-top: 3px;
  color: #8a6a00;
  font: 500 9px/1.3 var(--sl-font-mono);
  overflow-wrap: anywhere;
}
body.lab-events.theme-dark .sl-list-card .ev-flare-catalog-warn { color: #f0c465; }

body.lab-events .sl-coverage-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

body.lab-events .sl-coverage-buttons button {
  min-width: 0;
  min-height: 25px;
  padding: 5px 8px;
  border: 1px solid var(--sl-border-soft);
  border-left: 3px solid var(--sl-violet);
  border-radius: var(--sl-radius-xs);
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: 600 11px/1.2 var(--sl-font-ui);
  text-align: left;
}

body.lab-events .sl-coverage-buttons button:nth-child(2),
body.lab-events .sl-coverage-buttons button:nth-child(3) { border-left-color: #d84315; }
body.lab-events .sl-coverage-buttons button:nth-child(5) { border-left-color: var(--sl-ink); }
body.lab-events .sl-coverage-buttons button:nth-child(6) { border-left-color: #d4a017; }
body.lab-events .sl-coverage-buttons button[data-cov="joint"],
body.lab-events .sl-coverage-buttons button[data-cov="events"] { grid-column: 1 / -1; }
body.lab-events .sl-app #dpPlotBtn {
  min-height: 27px;
  padding: 5px 10px;
  border-color: var(--sl-violet);
  background: var(--sl-violet);
  color: #fff;
  font-size: 11px;
}
body.lab-events .sl-date-action #dpPlotBtn { flex: none; min-height: 25px; padding: 4px 10px; }
body.lab-events .sl-app #dpPlotBtn:disabled { opacity: .55; cursor: not-allowed; }

body.lab-events .sl-coming-soon {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--sl-border-soft);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: 600 11px/1.2 var(--sl-font-ui);
}
body.lab-events .sl-coming-soon .sl-soon-dot { width: 7px; height: 7px; border-radius: 50%; background: #f97316; }
body.lab-events .sl-coming-soon small {
  margin-left: auto;
  padding: 1px 4px;
  border: 1px solid #fed7aa;
  border-radius: 3px;
  color: #c2410c;
  font: 700 8px/1.2 var(--sl-font-mono);
  letter-spacing: .08em;
}
body.lab-events .sl-coming-soon > span:last-child { color: var(--sl-muted); font-size: 16px; }
body.lab-events:has(.sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"]) .sl-instrument:has(#chk-poemas) { position: relative; }
body.lab-events:has(.sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"]) .sl-instrument:has(#chk-poemas)::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f97316;
}

body.lab-events .sl-history { gap: 4px; }
body.lab-events #evHistoryList { display: flex; flex-direction: column; gap: 2px; }
body.lab-events #evHistoryList button {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 2px 3px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--sl-muted);
  font: 500 9px/1.1 var(--sl-font-mono);
  text-align: left;
  white-space: nowrap;
}
body.lab-events #evHistoryList button:hover,
body.lab-events #evHistoryList button:focus-visible { background: var(--sl-surface); }
body.lab-events #evHistoryList .sl-history-peak { color: #64748b; font-weight: 700; }
body.lab-events #evHistoryList .sl-history-peak--x { color: #b45309; }
body.lab-events #evHistoryList .sl-history-peak--m { color: #7e57c2; }
body.lab-events .sl-history > small {
  color: var(--sl-muted-soft);
  font: 400 9px/1.2 var(--sl-font-mono);
}

body.lab-events .sl-history .sl-sidebar-heading button {
  float: right;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sl-accent);
  font: 500 10px/1.2 var(--sl-font-ui);
  letter-spacing: 0;
  text-decoration: underline;
  text-transform: none;
}

body.lab-events .sl-sidebar-tools {
  margin: auto -16px -24px;
  padding: 12px 16px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border-top: 1px solid var(--sl-border-soft);
  background: var(--sl-page);
}

body.lab-events .sl-sidebar-tools button {
  display: block;
  min-height: 32px;
  padding: 6px 4px;
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: 600 11px/1.2 var(--sl-font-ui);
  white-space: nowrap;
}

body.lab-events .sl-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 20px 20px;
}

body.lab-events .sl-widgets {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.lab-events .sl-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Window toolbar: two rows, with a 34px vertical hide handle. */
body.lab-events .sl-toolbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--sl-border-soft);
  border-radius: 10px;
  background: var(--sl-surface);
}

body.lab-events .sl-toolbar-content { min-width: 0; }

body.lab-events .sl-toolbar-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
}

body.lab-events .sl-toolbar-row + .sl-toolbar-row {
  grid-template-columns: max-content max-content minmax(0, 1fr);
  border-top: 1px solid var(--sl-border-soft);
  background: var(--sl-surface-soft);
}

body.lab-events .sl-toolbar-status #status {
  min-width: 0;
  overflow: hidden;
  color: var(--sl-muted);
  font: 400 11px/1.2 var(--sl-font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.lab-events .sl-toolbar-window .sl-date-mirror { flex: 1 1 112px; }
body.lab-events .sl-toolbar-window .sl-time-mirror { flex: 0 1 70px; }

body.lab-events .sl-toolbar-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
}

body.lab-events .sl-toolbar-group + .sl-toolbar-group {
  border-left: 1px solid var(--sl-border-soft);
}

body.lab-events .sl-toolbar-controls {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

body.lab-events .sl-toolbar-controls > * { min-width: 0; }

/* Source 8e: the collapsed toolbar retains the primary window commands.
   The native toggle state also survives reloads; the secondary row returns
   when expanded. Mobile owns its separate Window sheet. */
@media (min-width: 768px) {
  body.lab-events.ev-toolbar2-hidden .sl-toolbar-row-secondary { display: none; }
  body.lab-events.ev-toolbar2-hidden .sl-toolbar-row:first-child .sl-toolbar-group {
    flex-direction: row; align-items: center;
  }
  body.lab-events.ev-toolbar2-hidden .sl-toolbar-row:first-child .sl-toolbar-group:not(.sl-toolbar-window) > .sl-toolbar-label { display: none; }
  body.lab-events.ev-toolbar2-hidden .sl-toolbar-window > .sl-toolbar-label { white-space: nowrap; }
  body.lab-events.ev-toolbar2-hidden .sl-toolbar-window .sl-date-mirror { flex: 0 1 112px; }
  body.lab-events.ev-toolbar2-hidden .sl-toolbar-window .sl-time-mirror { flex: 0 1 70px; }
}

body.lab-events .sl-input {
  min-height: 30px;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: 500 12px/1.2 var(--sl-font-mono);
}

body.lab-events .sl-input::placeholder { color: var(--sl-muted-soft); }

/* The native values remain in their original inputs for main.js. The visible
   mirrors use the day-first/24-hour typography of 2a-D and 2a-M2. */
body.lab-events .sl-native-field {
  position: relative;
  min-width: 0;
  display: inline-flex;
  align-items: center;
}
body.lab-events .sl-native-field > input.sl-native-value {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  pointer-events: none;
}
body.lab-events .sl-native-field > input.sl-input {
  box-sizing: border-box;
  width: 100%;
  text-align: center;
}
body.lab-events .sl-native-field > input[aria-invalid="true"] { border-color: #d32f2f; }
body.lab-events .sl-native-field > input:focus-visible,
body.lab-events select.sl-designed-select:focus-visible {
  outline: 2px solid var(--sl-violet);
  outline-offset: 2px;
}

body.lab-events .sl-button,
body.lab-events .sl-icon-button {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: 600 12px/1.2 var(--sl-font-ui);
  text-decoration: none;
  white-space: nowrap;
}

body.lab-events .sl-icon-button { width: 30px; padding: 5px; }
body.lab-events .sl-button:hover,
body.lab-events .sl-icon-button:hover { border-color: var(--sl-muted-soft); }

body.lab-events .sl-button--primary,
body.lab-events .sl-button-primary,
body.lab-events .sl-button[data-variant="primary"] {
  border-color: var(--sl-active-bg);
  background: var(--sl-active-bg);
  color: var(--sl-active-ink);
}

body.lab-events .sl-button-pair button,
body.lab-events .sl-toolbar-controls select {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: 600 12px/1.2 var(--sl-font-ui);
  white-space: nowrap;
}

body.lab-events .sl-button-pair { gap: 0; }
body.lab-events .sl-button-pair button + button { margin-left: -1px; }
body.lab-events .sl-button-pair button:first-child { border-radius: var(--sl-radius-sm) 0 0 var(--sl-radius-sm); }
body.lab-events .sl-button-pair button:last-child { border-radius: 0 var(--sl-radius-sm) var(--sl-radius-sm) 0; }

body.lab-events .sl-app select.sl-designed-select {
  appearance: none;
  min-height: 30px;
  padding: 5px 26px 5px 10px;
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-sm);
  background-color: var(--sl-surface);
  background-image: linear-gradient(45deg, transparent 50%, var(--sl-muted) 50%), linear-gradient(135deg, var(--sl-muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 49%, calc(100% - 9px) 49%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  color: var(--sl-ink);
  font: 600 12px/1.2 var(--sl-font-ui);
  cursor: pointer;
}
body.lab-events .sl-app select.sl-designed-select:hover { border-color: var(--sl-muted-soft); }
body.lab-events .sl-app #resetBtn {
  padding-inline: 4px;
  border: 0;
  background: transparent;
  color: var(--sl-muted);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.lab-events .sl-app #resetBtn:hover { color: var(--sl-accent); }

body.lab-events .sl-live-dot,
body.lab-events .sl-help-dot {
  display: inline-grid;
  place-items: center;
  flex: none;
}

body.lab-events .sl-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf50;
}

body.lab-events .sl-help-dot {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--sl-border);
  border-radius: 50%;
  background: var(--sl-surface);
  color: var(--sl-violet);
  font: 600 11px/1 var(--sl-font-ui);
}

body.lab-events .sl-button--accent,
body.lab-events .sl-button[data-variant="accent"] {
  border-color: var(--sl-violet);
  background: var(--sl-violet);
  color: #fff;
}

body.lab-events .sl-toolbar-hide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 34px;
  border: 0;
  border-left: 1px solid var(--sl-border-soft);
  background: var(--sl-surface-soft);
  color: var(--sl-muted);
  font: 600 9px/1 var(--sl-font-mono);
  letter-spacing: .1em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

body.lab-events .sl-toolbar-summary { display: none; }

body.lab-events .sl-toolbar.is-collapsed,
body.lab-events .sl-toolbar[data-collapsed="true"] {
  display: flex;
  align-items: center;
  min-height: 34px;
  max-height: 34px;
}

body.lab-events .sl-toolbar.is-collapsed .sl-toolbar-content,
body.lab-events .sl-toolbar[data-collapsed="true"] .sl-toolbar-content { display: none; }

body.lab-events .sl-toolbar.is-collapsed .sl-toolbar-summary,
body.lab-events .sl-toolbar[data-collapsed="true"] .sl-toolbar-summary {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 0 12px;
  color: var(--sl-muted);
  font: 500 11px/1.2 var(--sl-font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.lab-events .sl-toolbar.is-collapsed .sl-toolbar-hide,
body.lab-events .sl-toolbar[data-collapsed="true"] .sl-toolbar-hide {
  align-self: stretch;
  width: auto;
  min-width: 60px;
  padding: 0 10px;
  writing-mode: horizontal-tb;
  transform: none;
}

/* Common card shell. Instrument-specific headers and Plotly traces live elsewhere. */
body.lab-events .sl-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--sl-border-soft);
  border-radius: 10px;
  background: var(--sl-surface);
  color: var(--sl-ink);
}

body.lab-events .sl-card-head {
  position: relative;
  min-width: 0;
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--sl-border-soft);
}

body.lab-events .sl-card-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 14px/1.2 var(--sl-font-ui);
}

body.lab-events .sl-card-title h2 {
  margin: 0;
  font: 600 14px/1.2 var(--sl-font-ui);
}

body.lab-events .sl-card-title small {
  color: var(--sl-muted);
  font: 400 11px/1.2 var(--sl-font-mono);
}

body.lab-events .sl-drag {
  flex: none;
  margin-left: -4px;
  color: #b9b4a6;
  font-size: 13px;
  letter-spacing: -2px;
  cursor: grab;
}

body.lab-events .sl-card-title::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sl-instrument-color, var(--sl-violet));
}

body.lab-events .sl-card-subtitle,
body.lab-events .sl-card-meta {
  color: var(--sl-muted);
  font: 400 11px/1.3 var(--sl-font-mono);
}

body.lab-events .sl-card-controls {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

body.lab-events .sl-card-actions {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

body.lab-events .ev-widget-head > .ev-widget-chips {
  flex: none;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-sm);
}
body.lab-events .ev-widget-head > .ev-widget-chips button {
  min-height: 26px;
  padding: 4px 9px;
  border: 0;
  border-radius: 0;
}
body.lab-events .ev-widget-head > .ev-widget-chips button + button { border-left: 1px solid var(--sl-border); }
body.lab-events .ev-widget-head > select.sl-designed-select { flex: none; max-width: 145px; }
body.lab-events .sl-card[data-instrument="rhessi"] .rd-rh-source { order: 3; }
body.lab-events .sl-card[data-instrument="rhessi"] .sl-fold { order: 4; }

body.lab-events .sl-card-actions button,
body.lab-events .sl-card-actions select,
body.lab-events .sl-fold {
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: 600 11px/1.2 var(--sl-font-ui);
  white-space: nowrap;
}

body.lab-events .sl-card-actions button[aria-pressed="true"],
body.lab-events .sl-card-actions button.is-active {
  border-color: var(--sl-active-bg);
  background: var(--sl-active-bg);
  color: var(--sl-active-ink);
}

body.lab-events .sl-fold {
  flex: none;
  width: 24px;
  padding-inline: 0;
  color: var(--sl-muted);
}

body.lab-events .sl-card-body,
body.lab-events .sl-card-plot { min-width: 0; }

body.lab-events .sl-card-body {
  height: auto;
  min-height: 0;
  overflow: visible;
}

body.lab-events .sl-card-meta { padding: 8px 16px 0; }
body.lab-events .sl-app #goes-meta {padding:4px 16px 0;line-height:1.2;}
body.lab-events .sl-rstn-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 16px 0;
}
body.lab-events .sl-rstn-meta-row > #rstn-meta {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
}
body.lab-events .sl-rstn-meta-row > .ev-rstn-freqs {
  flex: none;
  justify-content: flex-end;
  padding: 0;
}
body.lab-events .sl-rstn-meta-row > .ev-rstn-stationhint {
  flex: none;
  max-width: 38%;
  padding: 3px 8px;
  border-radius: var(--sl-radius-pill);
  background: #e0f2f1;
  color: #0b5c56;
  font: 500 10px/1.2 var(--sl-font-mono);
}
body.lab-events .sl-rstn-meta-row > .ev-rstn-stationhint[data-tone="warn"] { background: #fff4df; color: #79520d; }
body.lab-events .sl-rstn-meta-row > .ev-rstn-stationhint:empty,
body.lab-events .sl-rstn-flare-note:empty { display: none; }
body.lab-events .sl-rstn-flare-note {
  position: absolute;
  right: 16px;
  bottom: 9px;
  margin: 0;
  color: var(--sl-muted);
  font: italic 400 10px/1.2 var(--sl-font-mono);
  text-align: right;
}
body.lab-events .sl-card[data-instrument="rstn"] .sl-card-body { position: relative; }

/* Persistent RSTN raw-time warning, using the information notice from 14c.
   The widget supplies inline fallback styles, so shell colors need priority. */
body.lab-events .sl-app .sl-card[data-instrument="rstn"] .ev-rstn-timenotice {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 520px;
  margin: 8px 16px 0 !important;
  padding: 10px 14px !important;
  border: 0 !important;
  border-radius: 10px;
  background: #1a1a22 !important;
  color: #fcf7ec !important;
  box-shadow: 0 12px 30px rgb(0 0 0 / 25%);
  font: 400 13px/1.4 var(--sl-font-ui) !important;
}

body.lab-events .sl-app .sl-card[data-instrument="rstn"] .ev-rstn-timenotice::before {
  content: "i";
  flex: none;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #7e57c2;
  color: #fff;
  font: 700 11px/1 var(--sl-font-ui);
}

body.lab-events .sl-flare-chips,
body.lab-events .sl-band-controls { padding: 8px 16px 0; }
body.lab-events .sl-flare-chips {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  white-space: nowrap;
}
body.lab-events .sl-flare-chips[hidden] { display: none !important; }
body.lab-events .sl-flare-chips-label {
  flex: none;
  margin-right: 3px;
  color: var(--sl-muted);
  font: 600 9px/1.2 var(--sl-font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.lab-events .sl-flare-chip {
  flex: none;
  min-height: 25px;
  padding: 4px 9px;
  border: 1px solid var(--sl-chip-border, var(--sl-border));
  border-radius: 13px;
  background: var(--sl-chip-bg, var(--sl-surface));
  color: var(--sl-chip-ink, var(--sl-ink));
  font: 600 10px/1.2 var(--sl-font-mono);
  white-space: nowrap;
  cursor: pointer;
}
body.lab-events .sl-flare-chip--a,
body.lab-events .sl-flare-chip--b { --sl-chip-bg: #edf4f5; --sl-chip-ink: #4b6972; --sl-chip-border: #cbdde2; }
body.lab-events .sl-flare-chip--c { --sl-chip-bg: #f1f0e8; --sl-chip-ink: #6b6b58; --sl-chip-border: #d7d4bd; }
body.lab-events .sl-flare-chip--m { --sl-chip-bg: #efe9f5; --sl-chip-ink: #7551a0; --sl-chip-border: #dbc9ec; }
body.lab-events .sl-flare-chip--x { --sl-chip-bg: #f5edc9; --sl-chip-ink: #765500; --sl-chip-border: #e2d391; }
body.lab-events .sl-flare-chip.is-peak {
  border-color: #d4a017;
  background: var(--sl-nav-bg);
  color: var(--sl-nav-ink);
  box-shadow: inset 0 0 0 1px #d4a017;
}
body.lab-events .sl-flare-chip:focus-visible { outline: 3px solid var(--sl-violet); outline-offset: 2px; }
body.lab-events .sl-band-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
body.lab-events .sl-band-controls label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 6px;
  border: 1px solid var(--sl-border);
  border-radius: 4px;
  background: var(--sl-surface);
  color: var(--sl-muted);
  font: 600 10px/1.1 var(--sl-font-mono);
  cursor: pointer;
}
body.lab-events .sl-band-controls label:has(input:checked) {
  border-color: var(--sl-active-bg);
  background: var(--sl-active-bg);
  color: var(--sl-active-ink);
}
body.lab-events .sl-band-controls label:focus-within {
  outline: 2px solid var(--sl-violet);
  outline-offset: 2px;
}
body.lab-events .sl-band-controls input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
body.lab-events .ev-widget-head > .ev-rhessi-bands {
  flex: none;
  gap: 4px;
  padding: 0;
}
body.lab-events .sl-plot { min-width: 0; width: 100%; min-height: 270px; }
body.lab-events .sl-card[data-instrument="goes"] .sl-plot { min-height: 320px; }
body.lab-events .sl-card[data-instrument="rstn"] .sl-plot { min-height: 295px; }
body.lab-events .sl-card[data-instrument="dst"] .sl-plot { height: 170px; min-height: 170px; }
body.lab-events .sl-card[data-instrument="dst"] #dst-meta {
  margin-left: auto;
  padding: 0;
  text-align: right;
}
body.lab-events .sl-card[data-instrument="dst"] #dst-meta:empty,
body.lab-events .sl-dst-context:empty { display: none; }
body.lab-events .sl-card[data-instrument="dst"] .sl-card-actions { margin-left: 0; }
body.lab-events .sl-dst-context { padding: 8px 16px 0; color: var(--sl-muted); font: 400 10px/1.3 var(--sl-font-mono); }
body.lab-events .sl-dst-quicklook {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font: 600 10px/1.2 var(--sl-font-ui);
  cursor: pointer;
}
body.lab-events .sl-dst-quicklook input {
  position: relative;
  width: 24px;
  height: 14px;
  margin: 0;
  appearance: none;
  border-radius: 9px;
  background: #cbd5e1;
  cursor: pointer;
}
body.lab-events .sl-dst-quicklook input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
body.lab-events .sl-dst-quicklook input:checked { background: var(--sl-violet); }
body.lab-events .sl-dst-quicklook input:checked::after { transform: translateX(10px); }
body.lab-events .sl-dst-quicklook input:focus-visible { outline: 2px solid var(--sl-violet); outline-offset: 2px; }
body.lab-events .sl-dst-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 14px;
  padding: 6px 16px 9px;
  border-top: 1px solid var(--sl-border-soft);
  color: var(--sl-muted);
  font: 400 9px/1.2 var(--sl-font-mono);
}
body.lab-events .sl-dst-legend-entry { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
body.lab-events .sl-dst-legend-entry i { width: 7px; height: 7px; border-radius: 50%; }
body.lab-events #slMobileLive::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #4caf50; vertical-align: 1px; }

/* 2a-D: an out-of-coverage POEMAS notice occupies the card's plot slot.
   The widget's info status is distinct from its loading, error and Plotly DOM. */
body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 10px max-content minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 14px;
}
body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) .sl-card-head {
  display: contents;
}
body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) .sl-drag { grid-column: 1; grid-row: 1; margin: 0; }
body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) .sl-card-title { grid-column: 2; grid-row: 1; }
body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) .sl-fold { grid-column: 4; grid-row: 1; }
body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) .sl-help-dot,
body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) .sl-card-actions,
body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) #poemas-meta,
body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) .ev-poemas-freqs { display: none; }
body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) .sl-card-body {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
}
body.lab-events .sl-card[data-instrument="poemas"] #widget-poemas:has(> .ev-error[role="status"]) {
  min-height: 0;
  height: auto;
}
body.lab-events .sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"] {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid #f1c5a8;
  border-radius: 6px;
  background: #fff7f3;
  color: #93441e;
}
body.lab-events .sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"] .ev-error-icon {
  flex: none;
  color: #b54a00;
  font-size: 13px;
}
body.lab-events .sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"] .ev-error-body {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 6px;
}
body.lab-events .sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"] .ev-error-title,
body.lab-events .sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"] .ev-error-msg {
  margin: 0;
  color: inherit;
  font: 500 10px/1.25 var(--sl-font-ui);
}
body.lab-events .sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"] .ev-error-title { font-weight: 700; }
body.lab-events .sl-card[data-instrument="poemas"] .sl-poemas-calendar {
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sl-accent);
  font: 500 11px/1.25 var(--sl-font-ui);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  cursor: pointer;
}
body.lab-events .sl-card[data-instrument="poemas"] .sl-poemas-calendar:focus-visible { outline: 2px solid var(--sl-violet); outline-offset: 2px; }
body.lab-events.theme-dark .sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"] {
  border-color: #80513c;
  background: #30221f;
  color: #ffc7ad;
}

/* The T·EM strip is generated by ui_redesign_tem.js after GOES mounts.
   Its compact summary belongs inside the source card border. */
body.lab-events .sl-app .rd-tem-panel {
  margin: 8px 12px 12px;
  padding: 8px 10px;
  border: 1px dashed var(--sl-border);
  border-radius: 8px;
  background: var(--sl-surface-soft);
  color: var(--sl-ink);
  font: 11px/1.4 var(--sl-font-mono);
}
body.lab-events .sl-app .rd-tem-panel[hidden] { display: none; }
body.lab-events .sl-app .rd-tem-panel:not(.rd-tem-collapsed) {
  margin: 6px 0 0; padding: 0 14px 12px; border: 0;
  border-top: 1px dashed var(--sl-border-soft); border-radius: 0;
  background: var(--sl-surface);
}
body.lab-events .sl-app .rd-tem-bar { display: flex; align-items: center; gap: 8px; min-width: 0; }
body.lab-events .sl-app .rd-tem-bar > strong { flex: none; white-space: nowrap; font: 700 11px/1.3 var(--sl-font-mono); }
body.lab-events .sl-app .rd-tem-bar > span { color: var(--sl-muted); }
body.lab-events .sl-app .rd-tem-summary {
  display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: baseline;
  gap: 2px 8px; min-width: 0; color: var(--sl-ink);
}
body.lab-events .sl-app .rd-tem-bar > .rd-tem-summary { color: var(--sl-ink); }
body.lab-events .sl-app .rd-tem-summary [data-rd-tem-summary-time] { color: var(--sl-muted); }
body.lab-events .sl-app .rd-tem-summary[hidden],
body.lab-events .sl-app .rd-tem-readout[hidden] { display: none !important; }
body.lab-events .sl-app .rd-tem-fold {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  flex: none; min-height: 26px; margin-left: auto; padding: 4px 8px;
  border: 1px solid var(--sl-border); border-radius: 5px;
  background: var(--sl-surface); color: var(--sl-ink);
  font: 600 10px/1 var(--sl-font-ui); white-space: nowrap; cursor: pointer;
}
body.lab-events .sl-app .rd-tem-fold:hover { background: var(--sl-surface-muted); }
body.lab-events .sl-app .rd-tem-fold:focus-visible { outline: 3px solid var(--sl-violet); outline-offset: 2px; }
body.lab-events .sl-app .rd-tem-fold-arrow { font: 700 14px/1 var(--sl-font-ui); }
body.lab-events .sl-app .rd-tem-readout { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 5px; }
body.lab-events .sl-app .rd-tem-readout [data-rd-tem-time] { color: var(--sl-muted); }
body.lab-events .sl-app .rd-tem-readout button,
body.lab-events .sl-app .rd-tem-modes button,
body.lab-events .sl-app .rd-tem-set-bg {
  padding: 3px 7px;
  border: 1px solid var(--sl-border);
  border-radius: 4px;
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: 600 10px/1.2 var(--sl-font-ui);
  cursor: pointer;
}
body.lab-events .sl-app .rd-tem-modes { display: inline-flex; gap: 3px; margin-left: auto; }
body.lab-events .sl-app .rd-tem-panel:not(.rd-tem-collapsed) .rd-tem-bar { padding: 4px 0 3px; gap: 6px; flex-wrap: wrap; }
body.lab-events .sl-app .rd-tem-panel:not(.rd-tem-collapsed) .rd-tem-bar > strong { font: 700 12px var(--sl-font-ui); }
body.lab-events .sl-app .rd-tem-panel:not(.rd-tem-collapsed) .rd-tem-modes {
  margin-left: 0; gap: 0; border: 1px solid var(--sl-ink); border-radius: 6px; overflow: hidden;
}
body.lab-events .sl-app .rd-tem-modes button { padding: 4px 10px; border: 0; border-radius: 0; font-size: 11px; }
body.lab-events .sl-app .rd-tem-modes button + button { border-left: 1px solid var(--sl-ink); }
body.lab-events .sl-app .rd-tem-modes button:disabled { opacity: 1; color: var(--sl-muted-soft); background: repeating-linear-gradient(135deg,var(--sl-surface-muted) 0 3px,var(--sl-surface) 3px 7px); }
body.lab-events .sl-app .rd-tem-set-bg { padding: 0; border: 0; color: var(--sl-accent); background: transparent; text-decoration: underline; }
body.lab-events .sl-app .rd-tem-modes button[aria-pressed="true"] { background: var(--sl-active-bg); color: var(--sl-active-ink); }
body.lab-events .sl-app .rd-tem-modes button:disabled { opacity: .55; cursor: not-allowed; }
body.lab-events .sl-app .rd-tem-chart { min-height: 170px; }
body.lab-events .sl-app .rd-tem-note { margin: 6px 0 0; color: var(--sl-muted); }
body.lab-events .rd-tem-quality { border: 1px solid var(--sl-border); border-radius: 4px; padding: 2px 6px; color: var(--sl-muted); font: 600 10px var(--sl-font-mono); }
body.lab-events .rd-tem-quality[hidden] { display: none; }
body.lab-events .rd-tem-quality[data-flag="saturated"] { color: #9a3b13; background: #fff0e4; border-color: #e7bda7; }
body.lab-events .rd-tem-quality[data-flag="to_verify"] { color: #675211; background: #fff3cc; border-color: #dccb90; }
body.lab-events.theme-dark .rd-tem-quality[data-flag="saturated"] { color: #ffb68a; background: #44291d; }
body.lab-events.theme-dark .rd-tem-quality[data-flag="to_verify"] { color: #fff2b3; background: #665527; }
body.lab-events .sl-app .rd-tem-collapsed .rd-tem-chart,
body.lab-events .sl-app .rd-tem-collapsed .rd-tem-modes,
body.lab-events .sl-app .rd-tem-collapsed .rd-tem-set-bg,
body.lab-events .sl-app .rd-tem-collapsed .rd-tem-note,
body.lab-events .sl-app .rd-tem-collapsed .rd-tem-readout button { display: none; }

/* RHESSI Observing summary is mounted by ui_redesign_rhessi.js. Keep its
   source warning, status tracks and CSV action legible in the new card. */
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-source {
  flex: none;
  min-height: 26px;
  max-width: 220px;
  padding: 4px 9px;
  border: 0;
  border-radius: var(--sl-radius-sm);
  background-color: transparent;
  background-image: none;
  color: var(--sl-ink);
  font: 600 11px/1.2 var(--sl-font-ui);
  cursor: default;
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"].rd-rh-summary-mode #widget-rhessi,
body.lab-events .sl-app .sl-card[data-instrument="rhessi"].rd-rh-summary-mode #rhessi-meta { display: none !important; }
/* The applied-background banner replaces the legacy loose status text. */
body.lab-events .sl-app .sl-card [data-bgsub-status] { display: none; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-summary {
  min-width: 0;
  padding: 10px 16px 14px;
  color: var(--sl-ink);
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-summary[hidden] { display: none; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 10px;
  padding: 9px 11px;
  border: 1px solid #e7d287;
  border-radius: 6px;
  background: #fff8df;
  color: #6b5819;
  font: 400 11px/1.4 var(--sl-font-ui);
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-notice::before {
  content: "ⓘ";
  flex: none;
  font-size: 17px;
  line-height: 1;
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-notice span { flex: 1 1 230px; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-notice a {
  margin-left: auto;
  color: #9b4b18;
  white-space: nowrap;
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-chart {
  min-height: 276px;
  margin-inline: -16px;
  width: calc(100% + 32px);
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-band-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 14px;
  padding: 7px 2px 2px;
  color: var(--sl-muted);
  font: 400 10px/1.2 var(--sl-font-mono);
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-band-legend:empty { display: none; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-band-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-band-legend i { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 1px; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-status {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  align-items: center;
  gap: 2px 0;
  margin: 0 17px 0 2px;
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-status-label {
  padding: 0 5px;
  color: var(--sl-muted);
  font: 400 10px/1.2 var(--sl-font-mono);
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-status-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border: 1px solid var(--sl-border);
  background: var(--sl-surface-soft);
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-segment {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 1px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-right: 1px solid #fff;
  color: #fff;
  font: 400 9px/1.2 var(--sl-font-mono);
  white-space: nowrap;
  cursor: pointer;
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-night { background: #21212a; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-saa { background: repeating-linear-gradient(135deg, #d3a016 0 3px, #fff6da 3px 6px); color: #352507; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-gap { background: repeating-linear-gradient(90deg, #b8b5af 0 2px, #f4f2ed 2px 4px); color: #353535; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-a1 { background: #83d9d0; color: #1c3d3a; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-a3 { background: #076d5f; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  padding: 10px 0;
  color: var(--sl-muted);
  font: 400 10px/1.3 var(--sl-font-mono);
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-legend span { display: inline-flex; align-items: center; gap: 5px; }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-legend i { display: inline-block; width: 17px; height: 9px; border: 1px solid var(--sl-border); }
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 35px;
  padding: 6px 10px;
  border: 1px solid var(--sl-border);
  border-radius: 5px;
  color: var(--sl-ink);
  font: 400 10px/1.3 var(--sl-font-mono);
}
body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-readout button {
  margin-left: auto;
  padding: 4px 7px;
  border: 1px solid var(--sl-border);
  border-radius: 4px;
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: 600 10px/1.2 var(--sl-font-ui);
  cursor: pointer;
}
body.lab-events.theme-dark .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-notice {
  border-color: #675c38;
  background: #413c2c;
  color: #f8de88;
}
body.lab-events.theme-dark .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-notice a { color: #ffb474; }

body.lab-events .sl-card-footer {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 6px 16px 10px;
  border-top: 1px solid var(--sl-border-soft);
  background: var(--sl-surface-soft);
  color: var(--sl-muted);
  font: 400 11px/1.3 var(--sl-font-ui);
}

body.lab-events .sl-card[data-instrument="goes"] { --sl-instrument-color: #d32f2f; }
body.lab-events .sl-card[data-instrument="rstn"] { --sl-instrument-color: #7e57c2; }
body.lab-events .sl-card[data-instrument="rhessi"] { --sl-instrument-color: #e53935; }
body.lab-events .sl-card[data-instrument="poemas"] { --sl-instrument-color: #d84315; }
body.lab-events .sl-card[data-instrument="dst"] { --sl-instrument-color: #64748b; }
body.lab-events .sl-card[data-instrument="aia"] { --sl-instrument-color: #0e7490; }
body.lab-events .sl-card[data-instrument="halpha"] { --sl-instrument-color: #b75a43; }

/* AIA and H-alpha are revealed on demand and still use their compact markup. */
body.lab-events .sl-card[data-instrument="aia"] .sl-card-head h2,
body.lab-events .sl-card[data-instrument="halpha"] .sl-card-head h2 {
  margin: 0;
  font: 600 14px/1.2 var(--sl-font-ui);
}
body.lab-events .sl-card[data-instrument="aia"] .sl-card-head h2::before,
body.lab-events .sl-card[data-instrument="halpha"] .sl-card-head h2::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--sl-instrument-color);
}
body.lab-events .sl-card[data-instrument="aia"] .sl-card-head > #aia-open-roi,
body.lab-events .sl-card[data-instrument="halpha"] .sl-card-head > #halpha-open-roi,
body.lab-events .sl-card[data-instrument="hmi"] .sl-card-head > #hmi-open-roi {
  min-height: 28px;
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-sm);
  background: var(--sl-surface);
  color: var(--sl-ink);
  font: 600 11px/1.2 var(--sl-font-ui);
}
/* The idle launcher already contains the locator action. Keep the header
   Edit action available after a result instead of duplicating Open. */
body.lab-events .sl-card.rd-roi-idle .sl-card-head > #aia-open-roi,
body.lab-events .sl-card.rd-roi-idle .sl-card-head > #halpha-open-roi,
body.lab-events .sl-card.rd-roi-idle .sl-card-head > #hmi-open-roi { display: none; }

body.lab-events .sl-footer {
  flex: none;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  border-top: 1px solid var(--sl-border-soft);
  color: var(--sl-muted);
  font: 400 12px/1.5 var(--sl-font-ui);
}

body.lab-events .sl-footer a {
  color: var(--sl-ink);
  text-decoration: none;
}
body.lab-events .sl-footer a:hover { color: var(--sl-accent); text-decoration: underline; }
body.lab-events .sl-footer-identity { min-width: 0; display: grid; gap: 6px; }
body.lab-events .sl-footer-heading,
body.lab-events .sl-footer-meta,
body.lab-events .sl-footer-credit,
body.lab-events .sl-aperture,
body.lab-events .sl-linkedin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
body.lab-events .sl-footer-heading { gap: 16px; }
body.lab-events .sl-footer-site { font-weight: 600; }
body.lab-events .sl-footer-meta { flex-wrap: wrap; column-gap: 12px; row-gap: 2px; }
body.lab-events .sl-footer-meta [data-native-copy="curated"] {
  border-left: 1px solid var(--sl-border);
  padding-left: 12px;
  white-space: nowrap;
}
body.lab-events .sl-footer-credit { gap: 24px; }
body.lab-events .sl-footer-author,
body.lab-events .sl-aperture-label { display: grid; gap: 2px; }
body.lab-events .sl-footer-author > a { font-weight: 600; }
body.lab-events .sl-footer-author [data-native-copy="developed"],
body.lab-events .sl-aperture-label [data-native-copy="with"] { font-size: 11px; }
body.lab-events .sl-aperture {
  flex: none;
  gap: 12px;
  padding-left: 24px;
  border-left: 1px solid var(--sl-border);
  color: var(--sl-ink);
}
body.lab-events .sl-aperture-label strong { font-size: 13px; font-weight: 600; }
body.lab-events .sl-aperture-mark {
  flex: none;
  width: 40px;
  height: 40px;
  background: url('../assets/aperture-8a-icono-color-claro.svg') center / contain no-repeat;
}
body.lab-events.theme-dark .sl-aperture-mark {
  background-image: url('../assets/aperture-8a-icono-color-oscuro.svg');
}
body.lab-events .sl-linkedin-badge {
  gap: 6px;
  font-size: 11px;
  color: var(--sl-muted);
  white-space: nowrap;
}
body.lab-events .sl-linkedin-badge > span {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: #0a66c2;
  color: #fff;
  font: 700 9px/1 var(--sl-font-ui);
}

/* Mobile artboards 2a-M1 and 2a-M2: one scroll with an expandable bottom sheet. */
body.lab-events .sl-mobile-summary,
body.lab-events .sl-mobile-chips,
body.lab-events .sl-mobile-window,
body.lab-events .sl-mobile-sheet,
body.lab-events .sl-mobile-sheet-backdrop,
body.lab-events .sl-mobile-sheet-handle { display: none; }

@media (min-width: 768px) and (max-width: 1279px) {
  body.lab-events .sl-topbar { gap: 8px; padding-inline: 10px; }
  body.lab-events .sl-topbar-actions { gap: 7px; }
  body.lab-events .sl-brand-name,
  body.lab-events .sl-brand strong { font-size: 15px; }
  body.lab-events .sl-event-chip { max-width: 145px; }
  body.lab-events .sl-menu-bar button,
  body.lab-events .sl-menu-bar a { padding-inline: 7px; }
}

@media (max-width: 767px) {
  body.lab-events .sl-app { min-width: 0; }

  body.lab-events .sl-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    width: 100%;
    min-width: 0;
    gap: 5px;
    padding-inline: 12px;
    overflow: hidden;
    box-sizing: border-box;
  }
  body.lab-events .sl-app .sl-menu-count { display: inline-flex; }
  body.lab-events .sl-app #evHamburger { display: inline-grid; }

  body.lab-events .sl-brand {
    flex: 1 1 auto;
    gap: 5px;
    overflow: hidden;
  }
  /* Go to stays in the mobile menu and Window sheet; the old floating
     shortcut would consume the space reserved for the source wordmark. */
  body.lab-events .sl-app .sl-topbar > .rd-mobile-goto { display: none; }
  body.lab-events .sl-brand img { width: 20px; height: 20px; }
  body.lab-events .sl-brand-name,
  body.lab-events .sl-brand strong {
    min-width: 0;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
  }
  body.lab-events .sl-brand::after {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-radius: 50%;
    background: #4caf50;
  }
  body.lab-events .sl-brand-tag,
  body.lab-events .sl-brand-lab,
  body.lab-events .sl-event-chip,
  body.lab-events .sl-menu-bar,
  body.lab-events .sl-status-pill,
  body.lab-events .sl-vps-pill,
  body.lab-events .sl-version { display: none; }

  body.lab-events .sl-topbar-actions {
    flex: none;
    gap: 5px;
    margin-left: 0;
  }

  body.lab-events .sl-topbar-action,
  body.lab-events .sl-team-button {
    min-height: 25px;
    padding: 3px 8px;
    font-size: 12px;
  }

  body.lab-events .sl-team-button {
    gap: 0;
  }
  body.lab-events .sl-team-button > span:first-child,
  body.lab-events .sl-team-full { display: none; }
  body.lab-events .sl-team-mobile { display: inline; }
  body.lab-events .sl-menu-count { padding-inline: 6px; }

  body.lab-events .sl-language button { padding: 3px 7px; }
  body.lab-events .sl-language button:not([aria-pressed="true"]) { display: none; }
  body.lab-events .sl-hamburger {
    display: inline-grid;
    width: 32px;
    min-height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--sl-nav-ink);
    font-size: 18px;
  }

  body.lab-events .sl-mobile-summary {
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--sl-border-soft);
    background: var(--sl-surface);
    font: 400 11px/1.2 var(--sl-font-mono);
  }

  body.lab-events .sl-mobile-summary-text {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.lab-events .sl-mobile-summary .sl-button {
    min-height: 29px;
    padding-inline: 10px;
    font-size: 11px;
  }

  body.lab-events .sl-mobile-summary > button {
    flex: none;
    min-height: 29px;
    padding: 6px 10px;
    border: 0;
    border-radius: var(--sl-radius-sm);
    background: var(--sl-active-bg);
    color: var(--sl-active-ink);
    font: 600 11px/1.2 var(--sl-font-ui);
  }

  body.lab-events .sl-mobile-summary > span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.lab-events .sl-mobile-chips {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 14px 4px;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }

  body.lab-events .sl-mobile-chips::-webkit-scrollbar { display: none; }

  body.lab-events .sl-mobile-chip {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 25px;
    padding: 5px 10px;
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius-pill);
    background: var(--sl-surface);
    color: var(--sl-ink);
    font: 600 11px/1.2 var(--sl-font-ui);
  }

  body.lab-events .sl-mobile-chips > button:not(.sl-mobile-chip) {
    flex: none;
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius-pill);
    background: var(--sl-surface);
    color: var(--sl-ink);
    font: 600 11px/1.2 var(--sl-font-ui);
  }

  body.lab-events .sl-mobile-chips > button:not(.sl-mobile-chip)::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sl-instrument-color, var(--sl-violet));
  }

  body.lab-events .sl-mobile-chips > button:nth-child(1) { --sl-instrument-color: #d32f2f; }
  body.lab-events .sl-mobile-chips > button:nth-child(2) { --sl-instrument-color: #7e57c2; }
  body.lab-events .sl-mobile-chips > button:nth-child(3) { --sl-instrument-color: #e53935; }
  body.lab-events .sl-mobile-chips > button:nth-child(4) { --sl-instrument-color: #d84315; }
  body.lab-events .sl-mobile-chips > button:nth-child(5) { --sl-instrument-color: #64748b; }
  body.lab-events .sl-mobile-chips > button:nth-child(6) { --sl-instrument-color: #0e7490; }
  body.lab-events .sl-mobile-chips > button:nth-child(7) { --sl-instrument-color: #b75a43; }

  body.lab-events .sl-mobile-chip::before {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sl-instrument-color, var(--sl-violet));
  }

  body.lab-events .sl-mobile-chip[aria-pressed="true"],
  body.lab-events .sl-mobile-chip.is-active {
    border-color: var(--sl-active-bg);
    background: var(--sl-active-bg);
    color: var(--sl-active-ink);
  }

  body.lab-events .sl-mobile-chips > button[aria-pressed="true"] {
    border-color: var(--sl-active-bg);
    background: var(--sl-active-bg);
    color: var(--sl-active-ink);
  }

  body.lab-events .sl-workspace { display: block; }
  body.lab-events .sl-workspace > .sl-sidebar { display: none; }

  body.lab-events .sl-main {
    gap: 10px;
    padding: 8px 14px 90px;
  }

  body.lab-events .sl-main > .sl-toolbar { display: none; }

  body.lab-events .sl-card-head {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px;
  }
  body.lab-events .sl-card-head > .sl-drag { display: none; }

  body.lab-events .sl-card-title { max-width: calc(100% - 110px); }
  body.lab-events .sl-card-head > select.ev-sat,
  body.lab-events .sl-card-head > select.ev-rstn-station {
    position: absolute;
    top: 8px;
    right: 12px;
    max-width: 110px;
    min-height: 28px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.lab-events .sl-card-head > .sl-fold { display: none; }

  body.lab-events .sl-card-title { font-size: 13px; }
  body.lab-events .sl-card-title h2 { font-size: 13px; }
  body.lab-events .sl-card-title small { display: none; }
  body.lab-events .sl-card-subtitle { font-size: 10px; }
  body.lab-events .sl-card-controls {
    flex: 1 0 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  body.lab-events .sl-card-actions {
    flex: 1 0 100%;
    order: 4;
    margin-left: 0;
    overflow-x: auto;
  }
  body.lab-events .ev-widget-head > .ev-widget-chips {
    flex: 1 0 100%;
    width: max-content;
    max-width: 100%;
  }
  body.lab-events .ev-widget-head > .ev-widget-chips button { padding-inline: 8px; }
  body.lab-events .sl-rstn-meta-row {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px 0;
  }
  body.lab-events .sl-rstn-meta-row > #rstn-meta { flex-basis: 100%; }
  body.lab-events .sl-rstn-meta-row > .ev-rstn-freqs {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    scrollbar-width: none;
  }
  body.lab-events .sl-rstn-meta-row > .ev-rstn-freqs::-webkit-scrollbar { display: none; }
  body.lab-events .sl-rstn-meta-row > .ev-rstn-freqs label { flex: none; padding-inline: 4px; font-size: 9px; }
  body.lab-events .sl-rstn-meta-row > .ev-rstn-stationhint { max-width: 100%; }
  body.lab-events .sl-rstn-flare-note { position: static; margin: 0 12px 7px; }

  body.lab-events .sl-widgets { gap: 10px; }
  body.lab-events .sl-card-meta { padding: 8px 12px 0; }
  body.lab-events .sl-app .sl-card[data-instrument="rstn"] .ev-rstn-timenotice {
    width: calc(100% - 24px);
    margin: 8px 12px 0 !important;
  }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-source {
    order: 1;
    flex: 0 1 auto;
    width: auto;
    max-width: 128px;
    min-width: 0;
    min-height: 32px;
    margin-left: auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-summary { padding: 10px 12px 14px; }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-disclosure {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: calc(100% - 24px);
    min-height: 44px;
    margin: 10px 12px 0;
    padding: 8px 12px;
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius-sm);
    background: var(--sl-surface);
    color: var(--sl-ink);
    font: 600 11px/1.3 var(--sl-font-ui);
    text-align: left;
    cursor: pointer;
  }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .ev-widget-head > .rd-rh-disclosure {
    flex: none;
    order: 5;
    width: auto;
    min-height: 28px;
    margin: 0;
    padding: 4px 8px;
  }
  body.lab-events .ev-widget-head > .ev-rhessi-bands {
    flex: 1 0 100%;
    order: 6;
    padding: 0;
  }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-disclosure:hover { background: var(--sl-surface-muted); }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-disclosure:focus-visible { outline: 3px solid var(--sl-violet); outline-offset: 2px; }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-disclosure [data-rd-rh-arrow] { font-size: 14px; }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-disclosure[hidden],
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-brief[hidden],
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-caveat[hidden],
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-details[hidden],
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-feedback[hidden],
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .ev-rhessi-bands[hidden] { display: none !important; }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-brief {
    margin: 0 0 8px;
    padding: 7px 9px;
    border: 1px solid #e7d287;
    border-radius: 6px;
    background: #fff8df;
    color: #6b5819;
    font: 400 10px/1.4 var(--sl-font-ui);
  }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-caveat { margin: 4px 0 10px; }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-chart { min-height: 220px; margin-inline: -12px; width: calc(100% + 24px); }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-band-legend { gap: 4px 10px; padding-top: 6px; font-size: 9px; }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-feedback {
    margin: 8px 0 0;
    color: var(--sl-muted);
    font: 400 10px/1.4 var(--sl-font-ui);
  }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-details { margin-top: 10px; }
  body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-status {
    grid-template-columns: 84px minmax(0, 1fr);
    margin-right: 0;
  }
  body.lab-events .sl-flare-chips,
  body.lab-events .sl-band-controls { padding: 8px 12px 0; }
  body.lab-events .sl-flare-chips { scrollbar-width: none; }
  body.lab-events .sl-flare-chips::-webkit-scrollbar { display: none; }
  body.lab-events .sl-plot { min-height: 168px; }
  body.lab-events .sl-card[data-instrument="goes"] .sl-plot { min-height: 240px; }
  body.lab-events .sl-card[data-instrument="rstn"] .sl-plot { min-height: 220px; }
  body.lab-events .sl-card[data-instrument="dst"] .sl-plot { height: 150px; min-height: 150px; }
  body.lab-events .sl-card[data-instrument="dst"] #dst-meta { flex: 1 0 100%; margin-left: 0; text-align: left; }
  body.lab-events .sl-card[data-instrument="dst"] .sl-card-actions { flex: 0 0 auto; width: auto; order: 0; margin-left: auto; }
  body.lab-events .sl-dst-context { padding: 7px 12px 0; }
  body.lab-events .sl-dst-legend { padding-inline: 12px; }
  body.lab-events .sl-app .rd-tem-panel { margin: 8px 12px 12px; padding: 9px 10px; }
  body.lab-events .sl-app .rd-tem-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  }
  body.lab-events .sl-app .rd-tem-bar > strong { grid-column: 1; grid-row: 1; align-self: center; }
  body.lab-events .sl-app .rd-tem-fold { grid-column: 2; grid-row: 1; align-self: center; }
  body.lab-events .sl-app .rd-tem-bar > [data-rd-tem-from] { margin-left: -3px; }
  body.lab-events .sl-app .rd-tem-modes {
    flex-wrap: nowrap; min-width: 0; margin-left: 0;
  }
  body.lab-events .sl-app .rd-tem-modes button { min-height: 28px; padding: 5px 8px; white-space:nowrap; }
  body.lab-events .sl-app .rd-tem-set-bg { order:1; flex-basis: 100%; text-align: left; }
  body.lab-events .sl-app .rd-tem-summary {
    display: grid; grid-column: 1 / -1; grid-row: 2;
    gap: 2px; min-width: 0; font-size: 10px;
  }
  body.lab-events .sl-app .rd-tem-summary [data-rd-tem-summary-value],
  body.lab-events .sl-app .rd-tem-readout [data-rd-tem-value] { overflow-wrap: anywhere; }
  body.lab-events .sl-app .rd-tem-summary [data-rd-tem-summary-time] { font-size: 9px; }
  body.lab-events .sl-app .rd-tem-readout {
    display: grid; gap: 3px; margin-top: 9px; padding: 8px 9px;
    border: 1px solid var(--sl-border); border-radius: 6px;
    background: var(--sl-surface);
  }
  body.lab-events .sl-app .rd-tem-readout button { justify-self: start; margin-top: 2px; }
  body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 2px;
    padding: 10px 12px;
  }
  body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) .sl-card-title { grid-column: 1; grid-row: 1; }
  body.lab-events .sl-card[data-instrument="poemas"]:has(#widget-poemas > .ev-error[role="status"]) .sl-card-body { grid-column: 1; grid-row: 2; }
  body.lab-events .sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"] {
    padding: 0;
    border: 0;
    background: transparent;
  }
  body.lab-events .sl-card[data-instrument="poemas"] #widget-poemas > .ev-error[role="status"] .ev-error-icon { display: none; }

  body.lab-events .sl-card-footer {
    gap: 12px;
    padding: 6px 12px 8px;
  }

  body.lab-events .sl-footer { display: none; }

  body.lab-events .sl-mobile-sheet-backdrop {
    position: fixed;
    z-index: 89;
    inset: 48px 0 0;
    background: rgb(26 26 34 / 42%);
  }

  body.lab-events .sl-mobile-sheet-handle {
    position: fixed;
    z-index: 91;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border: 0;
    border-radius: 14px 14px 0 0;
    background: var(--sl-nav-bg);
    color: var(--sl-nav-ink);
    box-shadow: 0 -6px 20px rgb(0 0 0 / 15%);
    text-align: left;
    text-transform: uppercase;
    font: 600 11px/1.2 var(--sl-font-mono);
    letter-spacing: .1em;
  }

  body.lab-events.sl-sheet-open .sl-mobile-sheet-handle {
    top: clamp(72px, 20dvh, 168px);
    bottom: auto;
  }

  body.lab-events.sl-sheet-open .sl-workspace > .sl-sidebar {
    position: fixed;
    z-index: 90;
    top: calc(clamp(72px, 20dvh, 168px) + 48px);
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    gap: 18px;
    overflow-y: auto;
    padding: 14px 16px 24px;
    border: 0;
    background: var(--sl-surface);
    overscroll-behavior: contain;
  }

  body.lab-events.sl-sheet-open .sl-mobile-window { display: flex; order: -1; }
  body.lab-events .sl-mobile-window-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  body.lab-events .sl-mobile-window-grid label {
    display: grid;
    gap: 3px;
    color: var(--sl-muted);
    font: 500 0/1 var(--sl-font-mono);
  }
  body.lab-events .sl-mobile-window-grid .sl-native-field { width: 100%; }
  body.lab-events .sl-mobile-window-grid .sl-native-field > input.sl-input {
    min-height: 36px;
    padding: 8px 10px;
    text-align: left;
    font: 500 12px/1.2 var(--sl-font-mono);
  }
  body.lab-events .sl-mobile-window-grid .sl-date-mirror > input.sl-input { padding-right: 45px; }
  body.lab-events .sl-mobile-window-grid .sl-native-hint {
    position: absolute;
    right: 10px;
    color: var(--sl-muted-soft);
    font: 400 11px/1.2 var(--sl-font-mono);
    pointer-events: none;
  }
  body.lab-events .sl-app #slMobilePlot {
    width: 100%;
    min-height: 38px;
    border-color: var(--sl-nav-bg);
    background: var(--sl-nav-bg);
    color: var(--sl-nav-ink);
  }
  body.lab-events .sl-mobile-window-grid input,
  body.lab-events .sl-mobile-window-jump button,
  body.lab-events .sl-mobile-window-links select {
    min-width: 0;
    min-height: 30px;
    padding: 4px 7px;
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius-sm);
    background: var(--sl-surface);
    color: var(--sl-ink);
    font: 500 11px/1.2 var(--sl-font-ui);
  }
  body.lab-events .sl-mobile-window-jump {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  body.lab-events .sl-mobile-window-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.lab-events.sl-sheet-open .sl-sidebar-collapse { display: none; }
  body.lab-events.sl-sheet-open .sl-sidebar-tools { margin: 0; padding: 0; border: 0; background: transparent; }
  body.lab-events.sl-sheet-open .sl-instruments {
    order: 10; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 6px;
  }
  body.lab-events.sl-sheet-open .sl-instruments > :is(h2,h3,.sl-coming-soon) { display: none; }
  body.lab-events.sl-sheet-open .sl-instruments > .sl-instrument-grid {
    display: inline-flex; align-items: center; gap: 6px; padding-left: 6px;
    border-left: 1px solid var(--sl-border);
  }
  body.lab-events.sl-sheet-open .sl-instruments > .sl-instrument-grid:first-of-type {
    padding-left: 0; border-left: 0;
  }
  body.lab-events.sl-sheet-open .sl-instruments .sl-instrument {
    display: inline-flex; align-items: center; gap: 3px; min-height: 26px;
    padding: 0; border: 0; border-radius: 0; background: transparent;
    font: 600 10px/1.2 var(--sl-font-ui); white-space: nowrap;
  }
  body.lab-events.sl-sheet-open .sl-instruments .sl-instrument input { width: 12px; height: 12px; }
  body.lab-events.sl-sheet-open .sl-instruments .sl-instrument small { display: none; }
  body.lab-events.sl-sheet-open .sl-instruments > label:has(#chk-dst) {
    padding-left: 6px; border-left: 1px solid var(--sl-border);
  }
  body.lab-events.sl-sheet-open .sl-history { order: 3; }
  body.lab-events.sl-sheet-open .sl-sidebar-tools { order: 4; }
  body.lab-events.sl-sheet-open .sl-sidebar-section:has(.sl-coverage-buttons) { order: 5; }
  body.lab-events.sl-sheet-open .sl-coverage-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.lab-events.sl-sheet-open .sl-coverage-buttons button[data-cov="joint"],
  body.lab-events.sl-sheet-open .sl-coverage-buttons button[data-cov="events"] { grid-column: auto; }
  body.lab-events.sl-sheet-open .sl-sidebar-section:has(> #evSidebarFlares) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  body.lab-events.sl-sheet-open .sl-sidebar-section:has(> #evSidebarFlares) > .sl-sidebar-heading {
    grid-column: 1 / -1;
  }
  body.lab-events.sl-sheet-open .sl-list-card {
    min-height: 48px;
    padding: 9px 10px;
    border-color: transparent;
    border-left-color: var(--sl-list-accent);
    background: var(--sl-page);
  }
  body.lab-events.sl-sheet-open .sl-list-card .ev-flare-count { font-size: 26px; }
  body.lab-events.sl-sheet-open .sl-list-card:has(> .sl-window-button) { display:block; padding:0; border:0; }
  body.lab-events.sl-sheet-open .sl-list-card > button.sl-window-button { width:100%; min-height:72px; gap:10px; padding:12px; }
  body.lab-events.sl-sheet-open .sl-list-card > .sl-window-row { gap: 10px; }
  body.lab-events.sl-sheet-open .sl-list-card .sl-window-info { gap: 2px; }
  body.lab-events.sl-sheet-open .sl-list-card .sl-window-info strong { font-size: 14px; }
  body.lab-events.sl-sheet-open .sl-list-card .ev-flare-classchip { padding-inline: 5px; font-size: 10px; }
  body.lab-events.sl-sheet-open .sl-list-card .ev-flare-viewtable { font-size: 9px; }

  body.lab-events.sl-sheet-open .sl-mobile-sheet-backdrop { display: block; }

  body.lab-events .sl-mobile-sheet {
    position: fixed;
    z-index: 90;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    max-height: 48px;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    background: var(--sl-surface);
    box-shadow: 0 -6px 20px rgb(0 0 0 / 15%);
  }

  body.lab-events .sl-mobile-sheet-handle {
    flex: none;
    min-height: 48px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) max-content 10px;
    grid-template-rows: auto;
    align-items: center;
    gap: 1px 7px;
    width: 100%;
    padding: 6px 12px;
    border: 0;
    border-radius: 14px 14px 0 0;
    background: var(--sl-nav-bg);
    color: var(--sl-nav-ink);
    text-align: left;
    font: 600 10px/1.2 var(--sl-font-mono);
    letter-spacing: .05em;
  }

  body.lab-events .sl-mobile-sheet-handle .sl-mobile-sheet-title {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    white-space: nowrap;
  }
  body.lab-events .sl-mobile-sheet-handle .sl-mobile-sheet-count {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    min-width: 0;
    max-width: none;
    color: #d7d3c8;
    font: 400 9px/1.2 var(--sl-font-mono);
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
  }
  body.lab-events .sl-mobile-sheet-handle .sl-mobile-sheet-arrow { grid-column: 4; grid-row: 1; }
  body.lab-events.sl-sheet-open .sl-mobile-sheet-handle .sl-mobile-sheet-arrow { transform: rotate(180deg); }

  body.lab-events .sl-mobile-sheet-grip {
    grid-column: 1;
    grid-row: 1;
    width: 18px;
    height: 3px;
    border-radius: 2px;
    background: #6b6b78;
  }

  body.lab-events .sl-mobile-sheet-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px 24px;
    overscroll-behavior: contain;
  }

  body.lab-events.sl-sheet-open .sl-mobile-sheet,
  body.lab-events .sl-mobile-sheet.is-open {
    top: clamp(72px, 20dvh, 168px);
    max-height: none;
  }

  body.lab-events .sl-mobile-sheet .sl-date-grid { gap: 6px; }
  body.lab-events .sl-mobile-sheet .sl-coverage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.lab-events .sl-mobile-sheet .sl-instrument-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  body.lab-events .sl-topbar { padding-inline: 8px; }
  body.lab-events .sl-brand-name,
  body.lab-events .sl-brand strong { font-size: 13px; }
  body.lab-events .sl-topbar-actions { gap: 3px; }
  body.lab-events .sl-topbar-action { padding-inline: 5px; }
  body.lab-events .sl-main { padding-inline: 10px; }
}

/* Source 6a: factual quiet-day and compact unavailable-widget states. */
body.lab-events.ev-compact .sl-card .sl-plot { min-height: 0 !important; }
body.lab-events.ev-compact .sl-app .sl-card > .ev-widget-body { height: auto; }
body.lab-events.ev-compact .sl-card-head { min-height: 40px; padding-block: 8px; }
body.lab-events .sl-compact-peak { display: none; }
/* A native newPlot may append its canvas beside the old idle/loading card.
   Hide that obsolete chrome only when an actual canvas exists. Alerts and
   loading-only hosts remain visible, including failed result recovery. */
body.lab-events .sl-app .js-plotly-plot:has(> .plot-container .main-svg) > .ev-error[role="status"],
body.lab-events .sl-app .js-plotly-plot:has(> .plot-container .main-svg) > .ev-loading { display: none; }
@media (max-width: 767px) {
  /* 8g-M keeps the actual curves in a reduced reading view. Window controls
     and the native menus remain available; Comfortable restores all chrome. */
  body.lab-events.ev-compact .sl-mobile-chips,
  body.lab-events.ev-compact .sl-card .sl-card-controls,
  body.lab-events.ev-compact .sl-card .sl-card-actions > :not(.sl-fold):not(.sl-card-empty-reason):not(.sl-card-empty-calendar),
  body.lab-events.ev-compact .sl-card .sl-card-meta,
  body.lab-events.ev-compact .sl-card .sl-card-footer,
  body.lab-events.ev-compact .sl-card .sl-flare-chips,
  body.lab-events.ev-compact .sl-card .rd-tem-panel,
  body.lab-events.ev-compact .sl-card .sl-band-controls { display: none !important; }
  body.lab-events.ev-compact .sl-card-head > .sl-card-actions,
  body.lab-events.ev-compact .sl-card .sl-rstn-meta-row,
  body.lab-events.ev-compact .sl-card .sl-rstn-flare-note { display: none !important; }
  body.lab-events.ev-compact .sl-card-head > select,
  body.lab-events.ev-compact .sl-card-head > .sl-help-dot,
  body.lab-events.ev-compact .sl-card-head > .ev-rhessi-bands,
  body.lab-events.ev-compact .sl-card-head > .rd-rh-disclosure { display: none !important; }
  body.lab-events.ev-compact .sl-card-head > .sl-fold { display: inline-flex !important; margin-left: auto; }
  body.lab-events.ev-compact .sl-card .sl-card-head { flex-wrap: nowrap; }
  body.lab-events.ev-compact .sl-card .sl-card-title { max-width: none; flex: 0 1 auto; }
  body.lab-events.ev-compact .sl-card .sl-card-title h2 { white-space: nowrap; font-size: 12px; }
  body.lab-events.ev-compact .sl-card .sl-compact-peak { display: inline; flex: 1; white-space: nowrap; font: 9px var(--sl-font-mono); color: var(--sl-muted); }
  body.lab-events.ev-compact .sl-card .sl-card-actions { margin-left: auto; }
  body.lab-events.ev-compact .sl-card .sl-card-title small { display: none; }
  body.lab-events.ev-compact .sl-card { margin-bottom: 10px; }
  body.lab-events.ev-compact:not(.sl-sheet-open) .sl-mobile-sheet-handle { display: flex; min-height: 70px; border: 1px solid var(--sl-border); padding: 10px 16px; }
  body.lab-events.ev-compact:not(.sl-sheet-open) .sl-mobile-sheet-grip { display: none; }
  body.lab-events.ev-compact:not(.sl-sheet-open) .sl-mobile-sheet-title { order: 2; padding: 12px; border-radius: 8px; background: var(--sl-active-bg); color: var(--sl-active-ink); letter-spacing: 0; text-transform: none; font: 600 12px var(--sl-font-ui); }
  body.lab-events.ev-compact:not(.sl-sheet-open) .sl-mobile-sheet-count { order: 1; flex: 1; font-size: 10px; }
  body.lab-events.ev-compact:not(.sl-sheet-open) .sl-mobile-sheet-arrow { order: 3; }
}
.sl-app .sl-quiet-day { display:inline-flex; margin:5px 0 2px; padding:3px 10px; border-radius:999px; background:var(--sl-surface-muted,#f3f1ea); color:var(--sl-muted,#5a6170); font:11px/1.4 var(--sl-font-ui,Inter,sans-serif); }
.sl-app .sl-quiet-day[hidden], .sl-app .sl-nearest-event[hidden], .sl-app .sl-empty-summary[hidden], .sl-app .sl-card-empty-reason[hidden] { display:none; }
.sl-app .sl-nearest-event { margin:14px 0; padding:12px; border:1px solid var(--sl-border,#d8d6c8); border-radius:8px; background:var(--sl-surface,#fff); }
.sl-app .sl-nearest-event h2 { margin:0 0 7px; font:600 11px Inter,sans-serif; }
.sl-app .sl-list-card .sl-nearest-event {grid-column:1/-1;margin:5px 0 0;padding:0;border:0;background:transparent;}
.sl-app .sl-card-empty-calendar {border:0;padding:0;background:transparent;color:var(--sl-accent);font:11px var(--sl-font-ui);text-decoration:underline;cursor:pointer;}
.sl-app .sl-card-empty-calendar[hidden] {display:none;}
body.lab-events .sl-card.sl-card-folded .ev-widget-head > :is(.sl-band-controls,.rd-rh-source,.rd-rh-disclosure) {display:none!important;}
body.lab-events .sl-card.sl-card-folded[data-instrument='poemas']:has(#widget-poemas > .ev-error[role='status']) {display:block;padding:0;}
body.lab-events .sl-card.sl-card-folded[data-instrument='poemas']:has(#widget-poemas > .ev-error[role='status']) .sl-card-head {display:flex;}
body.lab-events .sl-card.sl-card-folded .sl-card-empty-calendar {white-space:nowrap;}
.sl-native-choice {position:fixed;z-index:150;width:min(400px,calc(100vw - 16px));padding:6px;border:1px solid var(--sl-border);border-radius:10px;background:var(--sl-surface);color:var(--sl-ink);box-shadow:0 18px 35px #0003;max-height:calc(100dvh - 16px);overflow:auto;}
.sl-native-choice header {padding:10px;font:9px var(--sl-font-mono);letter-spacing:1px;text-transform:uppercase;color:var(--sl-muted);}
.sl-native-choice button {display:flex;align-items:center;gap:20px;width:100%;min-height:32px;padding:8px 10px;border:0;border-radius:6px;background:transparent;color:inherit;text-align:left;font:11px var(--sl-font-mono);cursor:pointer;}
.sl-native-choice button:is(:hover,:focus-visible,.is-current) {background:var(--sl-bg);}
.sl-native-choice button b {color:var(--sl-accent);font-weight:400;}
.sl-native-choice button small {margin-left:auto;color:var(--sl-muted);font-size:10px;}
.sl-native-choice footer {margin-top:6px;padding:8px 10px;border-top:1px solid var(--sl-border);font:11px/1.35 var(--sl-font-ui);color:var(--sl-muted);}
.sl-native-choice button {display:grid;gap:4px;min-height:60px;}
.sl-native-choice .sl-quick-event-row {display:flex;align-items:center;gap:16px;}
.sl-native-choice button .sl-quick-event-description {margin:0;color:var(--sl-ink);font:12px/1.4 var(--sl-font-ui);white-space:normal;}
body.lab-events .sl-app :is(.sl-plot,.rd-rh-chart):has(> .ev-loading) {position:relative;}
body.lab-events .sl-app :is(.sl-plot,.rd-rh-chart) > .ev-loading {
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  position:absolute;inset:0;width:100%;height:100%;box-sizing:border-box;padding:20px;gap:10px;
  color:var(--sl-muted);font:13px/1.4 var(--sl-font-ui);text-align:center;
}
body.lab-events .sl-app :is(.sl-plot,.rd-rh-chart) > .ev-loading svg {flex:none;}
body.lab-events .ev-quickdate-popover {position:fixed;z-index:150;width:360px;padding:14px;border-radius:10px;background:#1b1b23;color:#f7f6f0;box-shadow:0 18px 35px #0003;font:12px/1.5 var(--sl-font-ui);}
body.lab-events .ev-quickdate-popover h4 {margin:0 0 8px;font-size:13px;}
body.lab-events .ev-quickdate-popover ul {padding:0;margin:0;list-style:none;}
body.lab-events .ev-quickdate-popover li {padding:5px 0;border-top:1px solid #fff2;}
body.lab-events .ev-quickdate-popover code {font:12px var(--sl-font-mono);}
body.lab-events .ev-qp-foot {margin-top:8px;color:#e8bf75;}
.sl-app .sl-nearest-event p { margin:0 0 8px; font:10px/1.5 'JetBrains Mono',monospace; }
.sl-app .sl-nearest-event button, .sl-app .sl-empty-summary button { border:0; padding:0; background:transparent; color:var(--sl-accent,#bc4a1a); text-decoration:underline; font:inherit; cursor:pointer; }
.sl-app .sl-empty-summary { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:0 0 12px; padding:10px 12px; border:1px solid var(--sl-border,#d8d6c8); border-radius:8px; background:var(--sl-surface,#fff); font:11px/1.4 Inter,sans-serif; }
.sl-app .sl-empty-summary span { flex:1; }
.sl-app .sl-card-empty-reason { margin-left:auto; font:10px/1.4 'JetBrains Mono',monospace; color:var(--sl-muted,#5a6170); }
.sl-app .sl-card.sl-card-folded > :not(.ev-widget-head) { display:none !important; }
@media(max-width:767px) { .sl-app .sl-card-empty-reason { font-size:9px; max-width:45%; } }

body.lab-events .sl-walker-track {position:absolute;left:60%;top:14px;width:70px;height:20px;pointer-events:none;overflow:visible;}
body.lab-events > :is(svg.ghost,svg.piggy) {position:fixed;pointer-events:none;filter:drop-shadow(0 14px 18px #0002);}
body.lab-events > svg.g1 {top:18px;left:18px;width:82px;animation:sl-roam-ghost 18s ease-in-out infinite;}
body.lab-events > svg.p1 {bottom:18px;right:18px;width:90px;animation:sl-roam-pig 20s ease-in-out infinite;}
body.lab-events .ghost-tail {transform-origin:center top;animation:sl-wiggle 1.6s ease-in-out infinite;}
body.lab-events .pig-wing-l {transform-origin:58px 52px;animation:sl-flap .35s ease-in-out infinite;}
body.lab-events .pig-wing-r {transform-origin:82px 52px;animation:sl-flap .35s ease-in-out infinite reverse;}
@keyframes sl-roam-ghost {0%,100%{transform:translate(0,0) rotate(-5deg)}20%{transform:translate(120px,30px) rotate(6deg)}40%{transform:translate(60px,140px) rotate(-4deg)}60%{transform:translate(200px,100px) rotate(5deg)}80%{transform:translate(40px,60px) rotate(-3deg)}}
@keyframes sl-roam-pig {0%,100%{transform:translate(0,0) rotate(4deg)}20%{transform:translate(-140px,-40px) rotate(-5deg)}40%{transform:translate(-70px,-160px) rotate(3deg)}60%{transform:translate(-220px,-110px) rotate(-4deg)}80%{transform:translate(-50px,-70px) rotate(5deg)}}
@keyframes sl-wiggle {0%,100%{transform:skewX(-4deg)}50%{transform:skewX(4deg)}}
@keyframes sl-flap {0%,100%{transform:rotate(-18deg)}50%{transform:rotate(18deg)}}
@media(prefers-reduced-motion:reduce) {body.lab-events :is(svg.ghost,svg.piggy,.ghost-tail,.pig-wing-l,.pig-wing-r){animation:none !important;}}

/* Director review: compact navigation, units and accessible card affordances. */
body.lab-events .sl-app .sl-date-grid [role="listbox"] { min-height:242px; max-height:242px; }
body.lab-events .sl-app .sl-date-grid [role="listbox"] > * { height:20px; min-height:20px; padding:2px 4px; line-height:16px; }
body.lab-events .sl-field-groups { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
body.lab-events .sl-field-groups > div { min-width:0; }
body.lab-events .sl-field-groups h3 { min-height:24px; line-height:12px; margin:8px 0 4px; }
body.lab-events .sl-field-groups:has(#hmi-sidebar-row[hidden]) { grid-template-columns:1fr; }
body.lab-events .sl-field-groups > div:has(#hmi-sidebar-row[hidden]) { display:none; }
body.lab-events .sl-field-groups .sl-instrument { min-height:42px; }
body.lab-events .sl-app .sl-window-button .sl-window-link { color:var(--sl-ink); font:600 12px/1.3 var(--sl-font-ui); padding:5px 7px; border:1px solid var(--sl-border-soft); border-radius:5px; background:var(--sl-surface-soft); }
body.lab-events .sl-app .sl-window-button:hover .sl-window-link { border-color:var(--sl-list-accent); }
body.lab-events .sl-app .sl-window-button { grid-template-columns:28px minmax(0,1fr) auto; gap:7px; padding:10px 8px; }
body.lab-events .sl-app .sl-goes-units { display:inline; padding:0; margin:0; color:var(--sl-muted); font:400 10px/1.2 var(--sl-font-mono); }
body.lab-events .sl-app #goes-meta { min-height:0; margin:0; padding:3px 16px 0; font-size:10px; line-height:14px; }
@media (min-width:768px) and (max-width:1099px) {
  body.lab-events .sl-footer { column-gap:16px; padding-inline:20px; }
  body.lab-events .sl-footer-meta { display:grid; gap:2px; }
  body.lab-events .sl-footer-meta [data-native-copy="curated"] { border:0; padding:0; }
  body.lab-events .sl-footer-credit { gap:16px; }
  body.lab-events .sl-aperture { gap:8px; padding-left:16px; }
}
@media (min-width:768px) {
  body.lab-events .sl-app .sl-toolbar { position:relative; grid-template-columns:minmax(0,1fr); padding-right:72px; }
  body.lab-events .sl-app .sl-toolbar-hide { position:absolute; right:8px; top:8px; width:56px; min-height:30px; flex-direction:row; gap:4px; writing-mode:horizontal-tb; transform:none; border:1px solid var(--sl-border-soft); border-radius:6px; letter-spacing:0; font:600 11px/1.2 var(--sl-font-ui); }
  body.lab-events .sl-app .sl-toolbar-hide:hover { background:var(--sl-active-bg); color:var(--sl-active-ink); }
  body.lab-events .sl-app .sl-toolbar-window .sl-date-mirror { flex:0 0 116px; width:116px; }
  body.lab-events .sl-app .sl-toolbar-window .sl-time-mirror { flex:0 0 62px; width:62px; }
}
body.lab-events .sl-app .sl-toolbar-status { margin:6px 8px; padding:8px 10px; align-self:center; border:1px solid var(--sl-border-soft); border-radius:7px; background:var(--sl-active-bg); gap:4px; }
body.lab-events .sl-app .sl-toolbar-status > .sl-toolbar-label { color:var(--sl-active-ink); }
body.lab-events .sl-app .sl-toolbar-status #status { color:var(--sl-ink); white-space:normal; line-height:1.4; font-family:var(--sl-font-ui); }
body.lab-events .sl-app .sl-toolbar-status:has(#status[data-level="error"]) { background:#fff0ed; border-color:#df6d56; }
body.lab-events .sl-app .sl-toolbar-status:has(#status[data-level="loading"]) { border-color:var(--sl-violet); }

body.lab-events .sl-app .sl-instruments > .sl-field-groups { grid-column:1 / -1; }
body.lab-events .sl-app .sl-field-groups h3 { color:var(--sl-muted); font:400 9px/12px var(--sl-font-mono); letter-spacing:.04em; text-transform:uppercase; min-height:24px; }
body.lab-events .sl-app .sl-toolbar-status { background:color-mix(in srgb, var(--sl-violet) 10%, var(--sl-surface)); }
body.lab-events .sl-app .sl-toolbar-status > .sl-toolbar-label { color:var(--sl-violet); }
body.lab-events .sl-app .sl-toolbar-status:has(#status:empty) { display:none; }

@media (min-width:768px) and (max-width:1200px) {
  body.lab-events .sl-app .sl-toolbar-row { grid-template-columns:max-content minmax(0,1fr); }
  body.lab-events .sl-app .sl-toolbar-window { grid-column:1 / -1; }
  body.lab-events .sl-app .sl-toolbar-row-secondary { grid-template-columns:minmax(0,1fr) max-content; }
  body.lab-events .sl-app .sl-toolbar-row-secondary .sl-toolbar-status { grid-column:1 / -1; }
  body.lab-events .sl-app .sl-toolbar-row-secondary .lab-quickdate { width:130px; }
  body.lab-events .sl-app .sl-card-head { flex-wrap:wrap; }
  body.lab-events .sl-app .sl-card-title { flex:0 0 auto; max-width:calc(100% - 65px); }
  body.lab-events .sl-app .sl-card-head .sl-card-actions { margin-left:auto; }
}

body.lab-events .sl-app .sl-field-groups .sl-instrument { box-sizing:border-box; height:48px; }
body.lab-events .sl-app .sl-goes-units::before { content:' \00b7 '; }

@media (min-width:768px) and (max-width:1200px) {
  body.lab-events .sl-app .sl-topbar { flex-wrap:wrap; height:auto; row-gap:6px; padding-block:8px; }
  body.lab-events .sl-app .sl-topbar-actions { margin-left:auto; }
  body.lab-events .sl-app .sl-rstn-meta-row { flex-wrap:wrap; }
  body.lab-events .sl-app .sl-rstn-meta-row > .sl-card-meta { flex:1 0 100%; }
}

body.lab-events .sl-app .sl-field-groups .sl-instrument { width:100%; }

/* Director review12: group related controls and remove redundant rows. */
body.lab-events .sl-app .sl-field-groups > div { padding:6px; border:1px solid var(--sl-border-soft); border-radius:6px; background:var(--sl-surface); }
body.lab-events .sl-app .sl-field-groups h3 { margin:0 0 4px; min-height:24px; line-height:12px; letter-spacing:0; }
body.lab-events .sl-app .sl-field-groups .sl-instrument { height:46px; border:0; padding:4px; }
body.lab-events .sl-app .sl-field-groups > div:has(#chk-hmi) { border-top:3px solid #7e57c2; }
body.lab-events .sl-app .sl-field-groups > div:has(#chk-dst) { border-top:3px solid #64748b; }
body.lab-events .sl-app .sl-card-title #goes-meta { display:inline; padding:0; margin:0 0 0 6px; color:var(--sl-ink); font:400 11px/1.3 var(--sl-font-ui); }
body.lab-events .sl-app #evHistoryList button { grid-template-columns:32px minmax(0,1fr); white-space:normal; row-gap:3px; padding:5px 3px; }
body.lab-events .sl-app #evHistoryList .sl-history-date { overflow-wrap:anywhere; min-width:0; }
body.lab-events .sl-app #evHistoryList .sl-history-time { grid-column:2; font-size:9px; color:var(--sl-muted); }
body.lab-events .sl-app .rd-rh-mobile-controls { display:contents; }
body.lab-events .sl-app .rd-rh-csv-short { display:none; }
@media (min-width:1201px) {
 body.lab-events .sl-app .sl-toolbar-row:first-child { grid-template-columns:max-content max-content max-content minmax(160px,1fr); }
 body.lab-events .sl-app .sl-toolbar-row-secondary { grid-template-columns:max-content max-content; }
 body.lab-events .sl-app .sl-toolbar-group { flex-direction:row; align-items:center; gap:8px; padding:7px 10px; }
 body.lab-events .sl-app .sl-toolbar-status { flex-direction:column; align-items:flex-start; margin:5px 7px; padding:5px 8px; gap:2px; }
 body.lab-events .sl-app .sl-toolbar-label { white-space:nowrap; }
}
@media (min-width:768px) and (max-width:1200px) {
 body.lab-events .sl-app .sl-toolbar-row:first-child .sl-toolbar-status { grid-column:1/-1; }
}
@media (max-width:767px) {
 body.lab-events .sl-app .sl-card-title #goes-meta { display:block; margin:2px 0 0; font-size:10px; }
 body.lab-events .sl-app .rd-tem-collapsed { padding:5px 10px; margin:0; }
 body.lab-events .sl-app .rd-tem-collapsed .rd-tem-bar { flex-wrap:nowrap; padding:0; min-height:28px; gap:5px; }
 body.lab-events .sl-app .rd-tem-collapsed .rd-tem-bar > .rd-tem-summary { flex:1 1 auto; min-width:0; font-size:9px; }
 body.lab-events .sl-app .rd-tem-collapsed [data-rd-tem-summary-time] { display:none; }
 body.lab-events .sl-app .rd-tem-collapsed .rd-tem-summary [data-rd-tem-summary-value] { white-space:nowrap; }
 body.lab-events .sl-app .rd-tem-fold-label { display:none; }
 body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-mobile-controls { order:4; display:flex; flex:1 0 100%; gap:6px; align-items:center; min-width:0; }
 body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-mobile-controls .ev-widget-chips { flex:0 1 auto; order:0; margin:0; width:auto; min-width:0; }
 body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-mobile-controls .rd-rh-disclosure { flex:none; width:auto; min-height:28px; margin:0; padding:4px 8px; gap:5px; }
 body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-readout { flex-wrap:nowrap; min-height:30px; gap:5px; padding:4px 6px; }
 body.lab-events .sl-app .rd-rh-readout > span { flex:1; min-width:0; overflow-x:auto; white-space:nowrap; scrollbar-width:thin; }
 body.lab-events .sl-app .rd-rh-readout button { flex:none; }
 body.lab-events .sl-app .rd-rh-csv-full { display:none; }
 body.lab-events .sl-app .rd-rh-csv-short { display:inline; }
}

/* Director mobile review13: centered independent controls and a shorter date sheet. */
@media(max-width:767px){
 body.lab-events .sl-app .sl-card[data-instrument="goes"] .ev-widget-chips,
 body.lab-events .sl-app .sl-card[data-instrument="rstn"] .ev-widget-chips {display:flex;justify-content:center;gap:6px;background:none;border:0;width:100%;flex:1 0 100%;}
 body.lab-events .sl-app .sl-card[data-instrument="goes"] .ev-widget-chips button,
 body.lab-events .sl-app .sl-card[data-instrument="rstn"] .ev-widget-chips button {border:1px solid var(--sl-border);border-radius:5px;margin:0;flex:0 0 auto;min-height:30px;}
 body.lab-events .sl-app .rd-rh-mobile-controls{justify-content:center;flex-wrap:wrap;}
 body.lab-events .sl-app .rd-rh-mobile-controls .ev-widget-chips{display:contents;}
 body.lab-events .sl-app .rd-rh-mobile-controls > button {min-height:28px;border:1px solid var(--sl-border);border-radius:5px;padding:4px 7px;font:600 10px var(--sl-font-ui);}
 body.lab-events .sl-app .sl-card[data-instrument="rhessi"] .rd-rh-readout {display:none;}
 body.lab-events.sl-sheet-open .sl-mobile-window{order:2;}
 body.lab-events.sl-sheet-open .sl-mobile-window > h2,
 body.lab-events.sl-sheet-open .sl-sidebar-section:has(> .sl-sheet-options) > h2 {display:none;}
 body.lab-events .sl-sheet-options {width:100%;border:1px solid var(--sl-border);border-radius:8px;background:var(--sl-surface);padding:0 10px;}
 body.lab-events .sl-sheet-options > summary{cursor:pointer;padding:12px 2px;font:600 12px var(--sl-font-ui);}
 body.lab-events .sl-sheet-options[open]{padding-bottom:10px;}
 body.lab-events.sl-sheet-open .sl-date-grid :is(#dpYearList,#dpMonthList,#dpDayList){height:140px;min-height:0;max-height:140px;overflow-y:auto;touch-action:pan-y;}
 body.lab-events.sl-sheet-open #evHistoryList {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;}
 body.lab-events .sl-app .sl-card[data-instrument="dst"] .ev-widget-chips{width:auto;flex-wrap:wrap;gap:6px;justify-content:flex-end;}
}

@media(min-width:768px){body.lab-events .sl-sheet-options > summary{display:none;}}
@media(max-width:767px){body.lab-events.sl-sheet-open .sl-app .sl-instruments{display:none;}}

/* Preview 14: balanced rows and readable summaries. */
body.lab-events .sl-app #hmi-sidebar-title, body.lab-events .sl-app #dst-sidebar-title { white-space:nowrap; min-height:12px; }
body.lab-events .sl-app #evHistoryList button { font-size:11px; line-height:1.4; grid-template-columns:36px minmax(0,1fr); }
body.lab-events .sl-app #evHistoryList .sl-history-time { font-size:11px; }
body.lab-events .sl-app .rd-tem-collapsed .rd-tem-bar { align-items:center; gap:12px; }
body.lab-events .sl-app .rd-tem-collapsed .rd-tem-summary { font:400 12px/1.5 var(--sl-font-ui); }
body.lab-events .sl-app .rd-tem-summary [data-rd-tem-summary-value] { font-size:12px; }
body.lab-events .sl-app .rd-tem-fold { padding:7px 10px; min-height:32px; font:600 12px/1.2 var(--sl-font-ui); border-radius:6px; }
body.lab-events .sl-app .rd-tem-fold-label { display:inline; }
@media (min-width:768px) {
 body.lab-events .sl-app .sl-toolbar { padding-right:34px; }
 body.lab-events .sl-app .sl-toolbar-hide { top:0; right:0; bottom:0; width:34px; height:100%; flex-direction:row; writing-mode:vertical-rl; transform:rotate(180deg); border:0; border-right:1px solid var(--sl-border-soft); border-radius:0; }
 body.lab-events .sl-app .sl-toolbar-row:first-child { grid-template-columns:max-content max-content max-content; justify-content:center; }
 body.lab-events .sl-app .sl-toolbar-row-secondary { grid-template-columns:max-content max-content minmax(0,1fr); align-items:center; }
 body.lab-events .sl-app .sl-toolbar-row-secondary .sl-toolbar-status { grid-column:auto; flex-direction:row; align-items:center; justify-content:center; margin:4px 8px; padding:7px 10px; }
 body.lab-events .sl-app .sl-toolbar-status #status { white-space:nowrap; line-height:1.4; }
}
@media (min-width:768px) and (max-width:1200px) {
 body.lab-events .sl-app .sl-toolbar-row-secondary .sl-toolbar-status { grid-column:1/-1; }
}
@media (max-width:767px) {
 body.lab-events .sl-app .rd-tem-collapsed .rd-tem-bar { gap:7px; }
 body.lab-events .sl-app .rd-tem-collapsed .rd-tem-bar > strong { display:none; }
 body.lab-events .sl-app .rd-tem-collapsed .rd-tem-bar > .rd-tem-summary { font-size:11px; }
 body.lab-events .sl-app .rd-tem-collapsed .rd-tem-summary [data-rd-tem-summary-value] { white-space:normal; font-size:11px; }
 body.lab-events .sl-app .rd-tem-fold { flex-shrink:0; font-size:11px; padding:6px 8px; }
}

@media (min-width:768px) and (max-width:1200px) {
 body.lab-events .sl-app .sl-toolbar-row:first-child { grid-template-columns:minmax(0,1fr) max-content; justify-content:stretch; }
 body.lab-events .sl-app .sl-toolbar-row:first-child > .sl-toolbar-group:last-child { grid-column:1/-1; justify-content:center; }
}

/* Preview 16: compact HMI control and a usable space-weather menu. */
body.lab-events .sl-app .sl-field-groups {grid-template-columns:1fr;}
body.lab-events .sl-app .sl-field-groups > div:has(#chk-hmi) {padding:0;border:0;background:transparent;}
body.lab-events .sl-app .sl-field-groups #hmi-sidebar-title {margin:8px 0 4px;}
body.lab-events .sl-app .sl-field-groups #hmi-sidebar-row {height:40px;min-height:40px;border:1px solid var(--sl-border-soft);border-left:3px solid #7e57c2;padding:7px 8px;}
body.lab-events .sl-app .sl-space-weather {min-width:0;grid-column:1/-1;}
body.lab-events .sl-app .sl-space-weather summary {cursor:pointer;list-style:none;}
body.lab-events .sl-app .sl-space-weather summary::-webkit-details-marker {display:none;}
body.lab-events .sl-app .sl-space-weather summary:focus-visible {outline:2px solid var(--sl-violet);outline-offset:2px;}
body.lab-events .sl-app .sl-space-weather[open] summary {background:var(--sl-active-bg);color:var(--sl-active-ink,#fff);}
body.lab-events .sl-app .sl-space-weather-panel {position:fixed;z-index:8000;box-sizing:border-box;padding:12px;border:1px solid var(--sl-border);border-radius:9px;background:var(--sl-surface);box-shadow:var(--sl-shadow-dialog);}
body.lab-events .sl-app .sl-space-weather-panel h3 {margin:0 0 8px;color:var(--sl-muted);font:10px var(--sl-font-mono);text-transform:uppercase;}
body.lab-events .sl-app .sl-space-weather-panel .sl-instrument {height:44px;min-height:44px;}
body.lab-events .sl-app .sl-space-weather:not([open]) .sl-space-weather-panel {display:none;}
@media(max-width:767px) {
 body.lab-events .sl-app .sl-mobile-chips > .sl-space-weather {flex:none;}
 body.lab-events .sl-app .sl-mobile-chips .sl-coming-soon {display:flex;align-items:center;gap:6px;min-height:28px;margin:0;padding:4px 9px;border-radius:20px;white-space:nowrap;font:600 11px var(--sl-font-ui);}
 body.lab-events .sl-app .sl-mobile-chips .sl-coming-soon small {font-size:8px;}
 body.lab-events .sl-app .sl-space-weather-panel .sl-instrument {display:grid;}
}

@media(max-width:767px) {
 body.lab-events .sl-app .sl-mobile-chips .sl-coming-soon {background:var(--sl-surface);color:var(--sl-ink);}
 body.lab-events .sl-app .sl-mobile-chips .sl-coming-soon > span {display:inline;color:inherit;}
 body.lab-events .sl-app .sl-mobile-chips .sl-coming-soon > .sl-soon-dot {display:block;}
}

/* First-visit lesson: real Plotly axes, with an illustrative gesture overlay. */
body.lab-events .rd-help-card .rd-help-quick { box-sizing:border-box; max-width:900px; margin:0 auto; padding:24px 26px; }
body.lab-events .rd-help-card .rd-help-quick > h3 { margin:0 0 8px; font:600 24px var(--sl-font-display); }
body.lab-events .rd-help-card .rd-help-quick > p { margin:0; color:var(--sl-muted); font:14px/1.5 var(--sl-font-ui); }
body.lab-events .rd-help-card .rd-gesture-more ol { display:grid; gap:12px; padding-left:24px; }
body.lab-events .rd-help-card .rd-gesture-more li strong, body.lab-events .rd-help-card .rd-gesture-more li span { display:block; }
body.lab-events .rd-help-card .rd-gesture-more li span { color:var(--sl-muted); }
body.lab-events .rd-gesture-lesson { min-width:0; margin:18px 0 24px; border:1px solid var(--sl-border); border-radius:12px; overflow:hidden; background:var(--sl-surface); color:var(--sl-ink); }
body.lab-events .rd-gesture-lesson > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px 4px; }
body.lab-events .rd-gesture-lesson > header strong { font:600 16px var(--sl-font-ui); }
body.lab-events .rd-help-card .rd-gesture-lesson button { min-height:34px; padding:6px 11px; border:1px solid var(--sl-border); border-radius:6px; background:var(--sl-surface); color:var(--sl-ink); font:600 12px var(--sl-font-ui); text-decoration:none; cursor:pointer; }
body.lab-events .rd-gesture-lesson button:hover { background:var(--sl-surface-muted); }
body.lab-events .rd-gesture-lesson button:focus-visible { outline:2px solid var(--sl-violet); outline-offset:2px; }
body.lab-events .rd-gesture-modes { display:flex; gap:4px; flex:none; }
body.lab-events .rd-gesture-modes button[aria-pressed=true], body.lab-events .rd-gesture-lesson [data-gesture-practice] { border-color:var(--sl-active-bg); background:var(--sl-active-bg); color:var(--sl-active-ink,#fff); }
body.lab-events .rd-gesture-stage { position:relative; height:230px; }
body.lab-events .rd-gesture-plot { height:230px; width:100%; }
body.lab-events .rd-gesture-plot:focus-visible { outline:2px solid var(--sl-violet); outline-offset:-4px; }
body.lab-events .rd-gesture-overlay { position:absolute; inset:16px 14px 33px 38px; pointer-events:none; }
body.lab-events .rd-gesture-cursor { position:absolute; left:37%; top:40%; width:25px; height:31px; fill:#20212a; stroke:#fff; stroke-width:1.7; filter:drop-shadow(0 2px 3px #0003); }
body.lab-events .rd-gesture-selection { position:absolute; left:37%; top:22%; height:60%; width:26%; border:1px dashed var(--sl-violet); background:color-mix(in srgb,var(--sl-violet) 12%,transparent); opacity:0; transform-origin:left; }
body.lab-events .rd-gesture-finger { position:absolute; top:43%; width:26px; height:26px; margin:-13px; border:3px solid #fff; border-radius:50%; background:var(--sl-violet); box-shadow:0 0 0 2px var(--sl-violet),0 4px 12px #0003; }
body.lab-events .rd-gesture-left { left:42%; }
body.lab-events .rd-gesture-right { left:58%; }
body.lab-events .rd-gesture-ripple { position:absolute; left:50%; top:43%; width:24px; height:24px; margin:-12px; border:2px solid var(--sl-violet); border-radius:50%; opacity:0; }
body.lab-events .rd-gesture-lesson[data-mode=mouse] .rd-gesture-finger, body.lab-events .rd-gesture-lesson[data-mode=touch] .rd-gesture-cursor, body.lab-events .rd-gesture-lesson[data-mode=touch] .rd-gesture-selection { display:none; }
body.lab-events .rd-gesture-lesson[data-stage=zoom] .rd-gesture-cursor { animation:rd-gesture-drag 2.1s ease-in-out both; }
body.lab-events .rd-gesture-lesson[data-stage=zoom] .rd-gesture-selection { animation:rd-gesture-select 2.1s ease-in-out both; }
body.lab-events .rd-gesture-lesson[data-stage=zoom] .rd-gesture-left { animation:rd-gesture-spread-left 2.1s ease-in-out both; }
body.lab-events .rd-gesture-lesson[data-stage=zoom] .rd-gesture-right { animation:rd-gesture-spread-right 2.1s ease-in-out both; }
body.lab-events .rd-gesture-lesson[data-stage=reset] .rd-gesture-cursor { left:50%; top:43%; }
body.lab-events .rd-gesture-lesson[data-stage=reset] .rd-gesture-left { left:50%; }
body.lab-events .rd-gesture-lesson[data-stage=reset] .rd-gesture-right { display:none; }
body.lab-events .rd-gesture-lesson[data-stage=reset] .rd-gesture-ripple { animation:rd-gesture-double-tap 1.3s ease-out both; }
body.lab-events .rd-gesture-lesson[data-stage=detail] .rd-gesture-overlay, body.lab-events .rd-gesture-lesson[data-stage=full] .rd-gesture-overlay, body.lab-events .rd-gesture-lesson[data-practice=true] .rd-gesture-overlay { display:none; }
body.lab-events .rd-gesture-lesson[data-playing=false] .rd-gesture-overlay * { animation-play-state:paused; }
body.lab-events .rd-gesture-lesson:not([data-stage]) .rd-gesture-overlay { display:none; }
body.lab-events .rd-gesture-instructions { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:0 16px 14px; }
body.lab-events .rd-gesture-instructions p { margin:0; padding:10px 12px; border:1px solid var(--sl-border-soft); border-radius:8px; background:var(--sl-surface-soft); font:12px/1.5 var(--sl-font-ui); }
body.lab-events .rd-gesture-instructions b, body.lab-events .rd-gesture-instructions span { display:block; }
body.lab-events .rd-gesture-instructions span { margin-top:3px; color:var(--sl-muted); }
body.lab-events .rd-gesture-lesson[data-stage=zoom] .rd-gesture-instructions p:first-child, body.lab-events .rd-gesture-lesson[data-stage=reset] .rd-gesture-instructions p:last-child { border-color:var(--sl-violet); }
body.lab-events .rd-gesture-lesson > footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-top:1px solid var(--sl-border-soft); }
body.lab-events .rd-gesture-lesson > footer small { color:var(--sl-muted); font:11px/1.4 var(--sl-font-ui); }
body.lab-events .rd-gesture-lesson > footer > div { display:flex; gap:6px; flex:none; }
body.lab-events .rd-gesture-practice-controls { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:0 16px 14px; font:12px/1.5 var(--sl-font-ui); }
body.lab-events .rd-gesture-practice-controls[hidden] { display:none; }
body.lab-events .rd-gesture-practice-controls span { flex:1; min-width:140px; color:var(--sl-muted); }
body.lab-events .rd-gesture-more { margin:0 0 16px; font:13px/1.5 var(--sl-font-ui); }
body.lab-events .rd-gesture-more summary { min-height:36px; cursor:pointer; color:var(--sl-ink); }
@keyframes rd-gesture-drag { 0%,18% {left:37%;top:22%;} 85%,100% {left:63%;top:82%;} }
@keyframes rd-gesture-select { 0%,18% {opacity:0;transform:scale(0);} 25% {opacity:1;} 85%,100% {opacity:1;transform:scale(1);} }
@keyframes rd-gesture-spread-left { 0%,18% {left:42%;} 85%,100% {left:29%;} }
@keyframes rd-gesture-spread-right { 0%,18% {left:58%;} 85%,100% {left:71%;} }
@keyframes rd-gesture-double-tap { 0% {opacity:0;transform:scale(.6);} 10% {opacity:1;} 35% {opacity:0;transform:scale(2);} 36% {opacity:0;transform:scale(.6);} 46% {opacity:1;} 85%,100% {opacity:0;transform:scale(2);} }
@media(max-width:767px) {
  body.lab-events .rd-help-card .rd-help-quick { padding:22px 17px; }
  body.lab-events .rd-gesture-lesson > header { align-items:flex-start; padding:12px 12px 0; }
  body.lab-events .rd-gesture-lesson > header strong { font-size:14px; padding-top:8px; }
  body.lab-events .rd-help-card .rd-gesture-lesson button { min-height:44px; padding:8px 10px; }
  body.lab-events .rd-gesture-instructions { grid-template-columns:1fr; gap:6px; padding:0 12px 12px; }
  body.lab-events .rd-gesture-instructions p { padding:8px 10px; }
  body.lab-events .rd-gesture-lesson > footer { flex-wrap:wrap; padding:10px 12px; gap:8px; }
  body.lab-events .rd-gesture-lesson > footer > div { margin-left:auto; }
  body.lab-events .rd-gesture-practice-controls { padding:0 12px 12px; }
}
@media(prefers-reduced-motion:reduce) { body.lab-events .rd-gesture-overlay * { animation:none !important; } }

/* Catalogue search: numeric class families, visible ordering and year bounds. */
@media (min-width:768px) {
  body.lab-events .rd-nav-dialog .rd-nav-card { width:min(760px,100%); }
}
body.lab-events .rd-search-filters { display:flex; align-items:flex-end; gap:10px; padding:12px 20px 8px; }
body.lab-events .rd-search-filters label { display:grid; gap:4px; min-width:0; font:11px/1.4 var(--sl-font-ui); color:var(--sl-muted); }
body.lab-events .rd-search-filters label:first-child { flex:1; }
body.lab-events .rd-search-filters :is(input,select,button), body.lab-events .rd-search-pagination button { box-sizing:border-box; min-height:36px; border:1px solid var(--sl-border); border-radius:6px; padding:6px 9px; background:var(--sl-surface); color:var(--sl-ink); font:12px/1.3 var(--sl-font-ui); }
body.lab-events .rd-search-filters input { width:95px; min-width:0; font-family:var(--sl-font-mono); }
body.lab-events .rd-search-filters input[aria-invalid=true] { border-color:var(--sl-accent); }
body.lab-events .rd-search-filters button, body.lab-events .rd-search-pagination button { cursor:pointer; }
body.lab-events .rd-search-rule { margin:0; padding:2px 20px 4px; color:var(--sl-muted); font:11px/1.4 var(--sl-font-ui); }
body.lab-events .rd-search-headings { flex:none; display:grid; grid-template-columns:145px 75px 90px minmax(0,1fr); align-items:center; gap:10px; padding:4px 22px 6px; border-bottom:1px solid var(--sl-border-soft); color:var(--sl-muted); font:10px var(--sl-font-ui); }
body.lab-events .rd-search-headings button { justify-self:start; border:0; padding:7px 0; background:transparent; color:var(--sl-muted); font:600 11px var(--sl-font-ui); cursor:pointer; }
body.lab-events .rd-search-pagination { flex:none; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 20px; border-top:1px solid var(--sl-border-soft); color:var(--sl-muted); font:11px var(--sl-font-mono); }
body.lab-events .rd-search-pagination button:disabled { opacity:.45; cursor:default; }
body.lab-events :is(.rd-search-filters,.rd-search-headings,.rd-search-pagination,.rd-search-rule)[hidden] { display:none; }
@media(max-width:767px) {
  body.lab-events .rd-search-filters { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; gap:8px; padding:12px 17px 8px; }
  body.lab-events .rd-search-filters label:first-child { grid-column:1 / -1; }
  body.lab-events .rd-search-filters :is(input,select) { width:100%; }
  body.lab-events .rd-search-filters :is(input,select,button), body.lab-events .rd-search-pagination button { min-height:44px; }
  body.lab-events .rd-search-headings { grid-template-columns:1fr 1fr; padding:0 22px; }
  body.lab-events .rd-search-headings button { min-height:40px; }
  body.lab-events .rd-search-headings span { display:none; }
  body.lab-events .rd-search-rule { padding:2px 17px 4px; }
  body.lab-events .rd-search-pagination { padding:10px 17px; }
}

/* One colour key and selector per instrument, using the curve palette. */
body.lab-events :is(.ev-rstn-freqs,.ev-rhessi-bands) label {
  border-color:var(--sl-channel-color); color:var(--sl-channel-color);
}
body.lab-events :is(.ev-rstn-freqs,.ev-rhessi-bands) label:has(input:checked) {
  background:var(--sl-channel-color);border-color:var(--sl-channel-color);color:var(--sl-channel-ink);
}
body.lab-events .sl-app .hmi-strip-main {grid-template-columns:minmax(0,1fr);}
body.lab-events .sl-app .hmi-strip-values {display:flex;flex-wrap:wrap;gap:12px;}
body.lab-events [data-rh-unit] {color:var(--sl-muted);font:400 9px/1.3 var(--sl-font-mono);}
body.lab-events .sl-card[data-instrument="rhessi"] .sl-card-title {flex:0 0 auto;max-width:100%;flex-wrap:wrap;}
body.lab-events .sl-card[data-instrument="rhessi"] .sl-card-title h2,
body.lab-events .sl-card[data-instrument="rhessi"] .sl-card-title small {flex:none;white-space:nowrap;}

body.lab-events .founder-bio-approved {text-align:justify;text-align-last:left;hyphens:auto;}
body.lab-events .founder-bio-approved .founder-bio-inline {color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:color-mix(in srgb,currentColor 35%,transparent);text-underline-offset:3px;}
body.lab-events .founder-bio-approved .founder-bio-inline:hover,
body.lab-events .founder-bio-approved .founder-bio-inline:focus-visible {color:var(--sl-ink,var(--rd-ink,#1a1a22));text-decoration-color:currentColor;}
body.lab-events .founder-bio-approved .founder-bio-inline:focus-visible {outline:2px solid currentColor;outline-offset:3px;}
@media(max-width:700px){body.lab-events .founder-bio-approved {text-align:left;}}
body.lab-events .rd-founder-links {flex-wrap:wrap;}

/* Compact founder destinations. Names stay available to assistive technology. */
body.lab-events :is(.omdc-founder-links,.rd-founder-links) {gap:8px;}
body.lab-events :is(.omdc-founder-links,.rd-founder-links) .founder-profile-link {
  display:inline-flex;align-items:center;justify-content:center;flex:none;
  box-sizing:border-box;width:32px;height:32px;padding:0;
  border:1px solid var(--sl-border-soft,var(--rd-line,#e6e4da));border-radius:8px;
  background:transparent;color:var(--sl-muted,var(--rd-muted,#5a6170));text-decoration:none;
}
body.lab-events :is(.omdc-founder-links,.rd-founder-links) .founder-profile-link:hover {
  background:var(--sl-surface-soft,var(--rd-surface,#fbfaf5));color:var(--sl-ink,var(--rd-ink,#1a1a22));
  border-color:var(--sl-border,var(--rd-line,#d8d6c8));
}
body.lab-events .founder-profile-link:focus-visible {outline:2px solid currentColor;outline-offset:3px;}
body.lab-events .founder-profile-icon {display:inline-grid;place-items:center;width:18px;height:18px;flex:none;}
body.lab-events .founder-profile-orcid {border-radius:50%;background:#a6ce39;color:#fff;font:700 11px/1 Arial,sans-serif;letter-spacing:-.8px;padding-right:1px;box-sizing:border-box;}
body.lab-events .founder-profile-linkedin {border-radius:3px;background:#0a66c2;color:#fff;font:700 13px/1 Arial,sans-serif;letter-spacing:-.6px;padding-top:2px;box-sizing:border-box;}
body.lab-events .founder-profile-website {width:20px;height:20px;}
body.lab-events .founder-profile-website svg {display:block;width:100%;height:100%;}
@media(max-width:700px){
  body.lab-events .omdc-founder .omdc-founder-head {padding-right:0;}
  body.lab-events .omdc-founder-links {position:static;display:flex;}
  body.lab-events :is(.omdc-founder-links,.rd-founder-links) .founder-profile-link {width:44px;height:44px;}
}
