.density-workspace {
  --density-blue: #2365a8;
  --density-border: #c4d2df;
}
.density-note {
  padding: 1rem 1.2rem;
  border-left: 4px solid #28717d;
  background: #eff7f8;
  border-radius: 5px;
  color: #163d46;
}
.density-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: end;
  margin: 1.25rem 0;
}
.density-controls label {
  display: grid;
  gap: 0.4rem;
  flex: 1 1 180px;
}
.density-workspace input[type="number"] {
  max-width: 100%;
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #8599ae;
  border-radius: 6px;
  background: #fff;
  color: #152f48;
  font: inherit;
}
.density-workspace button {
  margin: 0.4rem 0.25rem 0.4rem 0;
}
.density-apparatus-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid var(--density-border);
  border-radius: 12px;
  background: #f5f9fc;
}
.density-workspace [data-density-apparatus] {
  width: 100%;
  min-width: 720px;
  display: block;
}
.density-workspace svg text {
  font:
    16px system-ui,
    sans-serif;
  fill: #243d55;
}
.density-instruments {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}
.density-instruments > div {
  flex: 1 1 200px;
  padding: 1rem;
  border: 1px solid var(--density-border);
  border-radius: 12px;
  background: #f2f6fa;
}
.density-instruments output {
  display: block;
  font:
    600 1.8rem ui-monospace,
    monospace;
  background: #102c40;
  color: #bcf5e1;
  padding: 0.7rem;
  border-radius: 6px;
  margin-top: 0.6rem;
}
.density-table-wrap,
[data-density-graph] {
  overflow-x: auto;
  margin: 1.3rem 0;
}
.density-workspace [data-density-graph] svg {
  width: 100%;
  min-width: 640px;
  background: #fff;
  display: block;
}
.density-minor {
  stroke: #e9eef3;
  stroke-width: 0.6;
}
.density-major {
  stroke: #bac9d7;
  stroke-width: 1;
}
.density-point {
  fill: #2468a5;
}
.density-fit {
  stroke: #d06e2d;
  stroke-width: 2.3;
}
.density-workspace table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.92rem;
}
.density-workspace th,
.density-workspace td {
  padding: 0.7rem;
  text-align: left;
  border: 1px solid #d3dde7;
  white-space: nowrap;
}
.density-workspace th {
  background: #eaf1f7;
  color: #193b5a;
}
.density-workspace tbody tr:nth-child(even) {
  background: #f7fafc;
}
.density-workspace td input {
  min-width: 120px;
}
.density-correction {
  background: #fff1d2 !important;
  color: #734600;
  font-weight: 600;
}
.density-equilibrated {
  color: #1c6743;
}
.density-restart {
  margin-top: 2rem;
  padding: 1rem;
  border-top: 1px solid #d2dce5;
}
.density-workspace details summary {
  cursor: pointer;
  font-weight: 600;
}
.density-workspace [data-density-status]:not(:empty) {
  padding: 0.8rem;
  border: 1px solid #c8d9e7;
  border-radius: 7px;
  background: #f0f6fb;
}
.density-workspace button:focus-visible,
.density-workspace input:focus-visible {
  outline: 3px solid #d59a34;
  outline-offset: 3px;
}
.density-workspace input:disabled {
  opacity: 0.65;
}
.density-workspace form {
  margin: 1rem 0;
}

.density-workspace select {
  font: inherit;
  padding: 0.65rem;
  border: 1px solid #8599ae;
  border-radius: 6px;
  background: #fff;
  color: #152f48;
}
.density-workspace input[type="range"] {
  width: 100%;
  min-height: 36px;
}
.density-workspace [data-density-probe-graph] {
  overflow-x: auto;
  margin: 1.3rem 0;
}
.density-workspace [data-density-probe-graph] svg {
  display: block;
  width: 100%;
  min-width: 640px;
  background: #fff;
}
.density-errorbar {
  stroke: #497992;
  stroke-width: 1.5;
}
.density-unknown {
  stroke: #8c3b78;
  stroke-width: 2;
  stroke-dasharray: 7 5;
  fill: none;
}
.density-probe {
  fill: none;
  stroke: #2468a5;
  stroke-width: 2;
}

.density-workspace select {
  font: inherit;
  padding: 0.65rem;
  border: 1px solid #8599ae;
  border-radius: 6px;
  background: #fff;
}
.density-workspace [data-density-vernier],
.density-workspace [data-density-micrometer] {
  display: block;
  width: 100%;
  min-width: 900px;
}
.density-workspace [data-density-cylinder] {
  display: block;
  width: 100%;
  min-width: 720px;
}
.density-movable {
  cursor: ew-resize;
  touch-action: none;
}
.density-sight {
  cursor: ns-resize;
  touch-action: none;
}
.density-movable:focus,
.density-sight:focus {
  outline: none;
  stroke: #bd7b13;
  stroke-width: 3;
}

.density-workspace [data-density-vernier] {
  min-width: 1000px;
}
.density-weigh-bench { display: block; width: 100%; height: auto; max-height: 320px; margin: 1rem 0; background: #f1f6f8; border: 1px solid #d2dee5; border-radius: 16px; touch-action: none; }
.density-weigh-bench text { font-family: system-ui, sans-serif; font-size: 14px; }
.density-workspace svg text.density-digits { fill: #e0fff4; font-family: monospace !important; font-size: 19px !important; font-weight: 700; }
.density-bench-note { font-size: 13px !important; fill: #334f63; }
.density-draggable { cursor: grab; }
.density-draggable:focus { outline: 3px solid #e28920; outline-offset: 3px; }
