/* rs-data-sheet.css v2 (30 Nov 2026, round 4): our own drawn data sheets (rs-data-sheet.js) in a pop-out
   window. Shared by the spectroscopy tools; load after 0-rs-spec-viewer.css. Ink on white, grey boxes,
   the control standard's segmented tabs (teal dot on the chosen part). The window sits outside every tool
   (in <body>, or in the full-screen element), so its rules are scoped by .ds-window and .ds-sheet only. */

.ds-sheet {
  --ds-ink: #25242f;
  --ds-muted: #394362;
  --ds-line: #848eae;
  --ds-soft: #f5f6fb;
  --ds-boxfill: #e6e9f0;
  color: var(--ds-ink);
  font-size: 0.92rem;
}

.ds-sheet .ds-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
}

.ds-sheet .ds-tabs[hidden] {
  display: none;
}

.ds-sheet .ds-tab {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 0 0 0 -1px;
  padding: 4px 14px;
  border: 1px solid var(--ds-line);
  background: #fff;
  color: var(--ds-ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.ds-sheet .ds-tab:first-child {
  margin-left: 0;
  border-radius: 8px 0 0 8px;
}

.ds-sheet .ds-tab:last-child {
  border-radius: 0 8px 8px 0;
}

.ds-sheet .ds-tab::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
  background: transparent;
}

.ds-sheet .ds-tab[aria-pressed="true"] {
  position: relative;
  z-index: 1;
  border-color: #0f766e;
  background: #e3f4f1;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #0f766e;
}

.ds-sheet .ds-tab[aria-pressed="true"]::before {
  background: #0f766e;
}

.ds-sheet .ds-tab:hover {
  background: var(--ds-soft);
}

.ds-sheet .ds-tab[aria-pressed="true"]:hover {
  background: #e3f4f1;
}

.ds-sheet .ds-tab:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 2px;
}

.ds-sheet .ds-part[hidden] {
  display: none;
}

.ds-source {
  margin: 6px 0 0;
  color: #394362;
  font-size: 0.8rem;
}

.ds-sheet .ds-cap {
  margin: 0 0 8px;
  caption-side: top;
  color: var(--ds-ink);
  font-size: 1rem;
  font-weight: 900;
  text-align: left;
}

/* tables */

.ds-sheet .ds-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.ds-sheet .ds-table :is(th, td) {
  padding: 4px 8px;
  border: 1px solid var(--ds-line);
  text-align: left;
  vertical-align: middle;
  line-height: 1.3;
  font-size: 0.88rem;
}

.ds-sheet .ds-table thead th {
  background: var(--ds-soft);
  font-weight: 800;
}

.ds-sheet .ds-table tbody th {
  font-weight: 700;
  width: 58%;
  overflow-wrap: anywhere;
}

.ds-sheet .ds-table td:last-child {
  width: 42%;
}

.ds-sheet .ds-where {
  display: block;
  color: var(--ds-muted);
  font-weight: 400;
  font-size: 0.8rem;
}

.ds-sheet .ds-table--draw {
  table-layout: fixed;
}

.ds-sheet .ds-table--draw .ds-col-lab {
  width: 40%;
}

.ds-sheet .ds-table--draw .ds-col-draw {
  width: 36%;
}

.ds-sheet .ds-table--draw .ds-col-val {
  width: 24%;
}

.ds-sheet .ds-table--draw tbody th, .ds-sheet .ds-table--draw td:last-child {
  width: auto;
}

.ds-sheet .ds-drawcell {
  padding: 2px 4px;
  text-align: center;
  background: #fff;
}

.ds-sheet .ds-val {
  font-weight: 800;
  white-space: nowrap;
}

/* drawn fragments (rs-shift-cards.js drawings: the H or carbon the range is for is circled) */

.ds-sheet .ds-frag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ds-sheet .ds-frag svg {
  display: block;
  max-width: 100%;
  height: auto;
}

.ds-sheet .ds-frag--words {
  font-weight: 800;
  padding: 2px 4px;
}

/* charts (OCR A): HTML boxes and cards over an SVG with the axis, grid and joining lines */

.ds-sheet .ds-chart {
  position: relative;
  width: 100%;
  margin: 0 0 4px;
}

.ds-sheet .ds-chart-svg {
  position: absolute;
  left: 0;
  top: 0;
  overflow: visible;
  font-family: inherit;
}

.ds-sheet .ds-chart-layer {
  position: absolute;
  inset: 0;
}

.ds-sheet .ds-grid {
  stroke: #e3e6ee;
  stroke-width: 1;
}

.ds-sheet .ds-tick, .ds-sheet .ds-axis {
  stroke: var(--ds-ink);
  stroke-width: 1.5;
}

.ds-sheet .ds-num {
  fill: var(--ds-ink);
  font-size: 13px;
  font-weight: 700;
}

.ds-sheet .ds-unit {
  fill: var(--ds-ink);
  font-size: 13px;
  font-weight: 800;
}

.ds-sheet .ds-leader {
  stroke: #5a6277;
  stroke-width: 1.3;
}

.ds-sheet .ds-box {
  position: absolute;
  box-sizing: border-box;
  border: 1.5px solid var(--ds-ink);
  border-radius: 6px;
  background: var(--ds-boxfill);
}

.ds-sheet .ds-box--in, .ds-sheet .ds-box--long {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  overflow: hidden;
}

.ds-sheet .ds-box--long {
  flex-direction: row;
  gap: 10px;
  padding: 3px 8px;
}

.ds-sheet .ds-box--long-up {
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  padding: 6px 2px;
  text-align: center;
}

.ds-sheet .ds-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border: 1px solid #b9bfcf;
  border-radius: 8px;
  background: #fff;
}

.ds-sheet .ds-card--row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.ds-sheet .ds-card-frags {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ds-sheet .ds-card--row .ds-card-frags, .ds-sheet .ds-box--in .ds-card-frags {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 8px;
}

.ds-sheet .ds-box--long-up .ds-card-frags {
  flex-direction: column;
}

.ds-sheet .ds-card-val {
  color: var(--ds-ink);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ds-sheet .ds-box-note {
  font-size: 0.78rem;
  line-height: 1.15;
  text-align: center;
}

.ds-sheet .ds-box--long-up .ds-card-val {
  white-space: normal;
  font-size: 0.8rem;
}

.ds-sheet .ds-notes {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--ds-muted);
  font-size: 0.85rem;
}

.ds-sheet .ds-notes li {
  margin: 2px 0;
}

.ds-sheet .sv-sr-only, .ds-sheet .ds-values {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* the pop-out window (as the viewers' Data sheet windows: fixed, centred, dragged by its title bar,
   resized from its corner; its body scrolls, never the page) */

.ds-window {
  position: fixed;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 280px;
  padding: 12px 16px 14px;
  border: 1px solid #d0d4e0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
  color: #25242f;
  font-family: var(--rs-font-body, "ABeeZee", system-ui, sans-serif);
  font-size: 16px;
  overflow: hidden;
}

.ds-window[hidden] {
  display: none;
}

.ds-window .ds-win-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  margin: 0 0 6px;
  cursor: move;
  user-select: none;
  touch-action: none;
}

.ds-window .ds-win-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: #25242f;
}

.ds-window .ds-win-title:focus {
  outline: none;
}

.ds-window .ds-win-close {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #394362;
  font: inherit;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.ds-window .ds-win-close:hover {
  background: #f5f6fb;
}

.ds-window .ds-win-close:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: 1px;
}

.ds-window .ds-win-tabs {
  flex: none;
  margin: 0 0 8px;
}

.ds-window .ds-win-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px 2px 4px;
}

.ds-window .ds-win-body:focus-visible {
  outline: 3px solid #185abc;
  outline-offset: -1px;
}

.ds-window .ds-win-source {
  flex: none;
}

.ds-window .ds-win-grip {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  touch-action: none;
  background: linear-gradient(135deg, transparent 50%, #b9bfcf 50%, #b9bfcf 60%, transparent 60%, transparent 72%, #b9bfcf 72%, #b9bfcf 82%, transparent 82%);
}

@media (max-width: 599.98px) {
  .ds-window {
    padding: 8px 10px 10px;
  }
}

@media (max-width: 599.98px) {
  .ds-sheet .ds-table :is(th, td) {
    padding: 3px 5px;
  }
}

@media (max-width: 599.98px) {
  .ds-sheet .ds-val {
    white-space: normal;
  }
}

@media (max-width: 599.98px) {
  .ds-sheet .ds-table--draw .ds-col-lab {
    width: 38%;
  }
}

@media (max-width: 599.98px) {
  .ds-sheet .ds-table--draw .ds-col-draw {
    width: 37%;
  }
}

@media (max-width: 599.98px) {
  .ds-sheet .ds-table--draw .ds-col-val {
    width: 25%;
  }
}

@media (max-width: 599.98px) {
  .ds-window .ds-win-grip {
    display: none;
  }
}

@media (max-width: 599.98px) {
  .ds-sheet .ds-tab {
    padding: 4px 10px;
  }
}

.ds-sheet .ds-nw {
  white-space: nowrap;
}

