.fluid-statics-figure {
  margin: 1rem 0 0;
}

.fluid-statics-svg {
  display: block;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  overflow: visible;
}

.fluid-statics-figure figcaption {
  max-width: 720px;
  margin: 0.6rem auto 0;
  color: var(--muted, #5c6773);
  font-size: 0.92rem;
  line-height: 1.45;
}

.fluid-surface-guide {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  opacity: 0.45;
}

.fluid-surface-label,
.fluid-column-label,
.fluid-depth-label,
.fluid-pressure-label,
.fluid-floating-body-label,
.fluid-force-label,
.fluid-floating-fraction-label {
  fill: currentColor;
  font-family: system-ui, sans-serif;
}

.fluid-surface-label {
  font-size: 14px;
  opacity: 0.7;
}

.fluid-column-label,
.fluid-floating-body-label {
  font-size: 15px;
  font-weight: 700;
}

.fluid-depth-label,
.fluid-pressure-label,
.fluid-floating-fraction-label {
  font-size: 13px;
}

.fluid-vessel-outline,
.fluid-floating-tank {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fluid-water,
.fluid-floating-water {
  fill: #5ba7d8;
  fill-opacity: 0.28;
}

.fluid-depth-line {
  stroke: currentColor;
  stroke-width: 1.5;
  opacity: 0.75;
}

/*
 * La linea verticale è sufficiente a rendere la profondità. Le due tacche
 * terminali restano nel markup per compatibilità della view, ma sono nascoste:
 * gli elementi path non usano x/y come coordinate e altrimenti verrebbero
 * disegnati all'origine dell'SVG come segni isolati.
 */
.fluid-depth-cap {
  display: none;
}

.fluid-pressure-bar {
  fill: #d77724;
  opacity: 0.82;
}

.fluid-floating-body {
  fill: #d69a4b;
  fill-opacity: 0.72;
  stroke: currentColor;
  stroke-width: 2.5;
}

.fluid-floating-water-overlay {
  fill: #5ba7d8;
  fill-opacity: 0.34;
  pointer-events: none;
}

.fluid-force-arrow {
  stroke-width: 4;
  stroke-linecap: round;
}

.fluid-force-weight {
  stroke: #a64a44;
}

.fluid-force-buoyancy {
  stroke: #287fae;
}

.fluid-force-weight-head {
  fill: #a64a44;
}

.fluid-force-buoyancy-head {
  fill: #287fae;
}

.fluid-force-weight-label {
  fill: #a64a44;
}

.fluid-force-buoyancy-label {
  fill: #287fae;
}

.fluid-force-label {
  font-size: 15px;
  font-weight: 750;
}

.fluid-statics-panel {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.fluid-statics-scrubber,
.fluid-statics-density-control {
  display: grid;
  gap: 0.45rem;
}

.fluid-statics-scrubber label,
.fluid-statics-density-control label {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  font-weight: 650;
}

.fluid-statics-scrubber output,
.fluid-statics-density-control output {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.fluid-statics-scrubber input[type="range"],
.fluid-statics-density-control input[type="range"] {
  width: 100%;
}

.fluid-statics-slider-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted, #5c6773);
  font-size: 0.86rem;
}

.fluid-statics-values {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fluid-statics-width-note,
.fluid-statics-exploration-note {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  background: color-mix(in srgb, currentColor 5%, transparent);
  line-height: 1.45;
}

.fluid-statics-exploration-note {
  font-size: 0.92rem;
}

@media (max-width: 680px) {
  .fluid-statics-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fluid-statics-scrubber label,
  .fluid-statics-density-control label {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }
}

@media (max-width: 430px) {
  .fluid-statics-values {
    grid-template-columns: 1fr;
  }

  .fluid-statics-figure figcaption {
    font-size: 0.88rem;
  }
}


.fluid-pressure-guide {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-dasharray: 5 6;
  opacity: 0.28;
}

.fluid-pressure-point {
  fill: #d77724;
  stroke: currentColor;
  stroke-width: 2.5;
}

.fluid-pressure-point-moving {
  fill: #087f8c;
}

.fluid-pressure-point-label,
.fluid-pressure-relation {
  fill: currentColor;
  font-family: system-ui, sans-serif;
}

.fluid-pressure-point-label {
  font-size: 16px;
  font-weight: 750;
}

.fluid-pressure-relation {
  font-size: 16px;
  font-weight: 700;
}

/* Hydraulic press ------------------------------------------------------- */
.hydraulic-press-svg {
  max-width: 820px;
}

.hydraulic-fluid {
  fill: #5ba7d8;
  fill-opacity: 0.28;
  stroke: none;
}

.hydraulic-chamber {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
}

.hydraulic-piston {
  stroke: currentColor;
  stroke-width: 8;
  stroke-linecap: round;
}

.hydraulic-piston-rod {
  fill: currentColor;
  opacity: 0.78;
}

.hydraulic-car-body {
  fill: #d69a4b;
  fill-opacity: 0.78;
  stroke: currentColor;
  stroke-width: 2.5;
}

.hydraulic-wheel {
  fill: currentColor;
}

.hydraulic-force {
  stroke-width: 4;
  stroke-linecap: round;
}

.hydraulic-force-input {
  stroke: #a64a44;
}

.hydraulic-force-output {
  stroke: #287fae;
}

.hydraulic-force-weight {
  stroke: #7c4a88;
}

.hydraulic-force-text,
.hydraulic-label,
.hydraulic-ratio-label {
  fill: currentColor;
  font-family: system-ui, sans-serif;
}

.hydraulic-force-text {
  font-size: 14px;
  font-weight: 700;
}

.hydraulic-label {
  font-size: 15px;
  font-weight: 700;
}

.hydraulic-ratio-label {
  font-size: 17px;
  font-weight: 800;
}

.hydraulic-load-balanced {
  transform: translateY(-5px);
}

@media (prefers-reduced-motion: no-preference) {
  .hydraulic-load-balanced {
    transition: transform 160ms ease-out;
  }
}



/* Communicating vessels ------------------------------------------------ */
.communicating-vessels-svg {
  max-width: 820px;
}

.communicating-vessels-outline {
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.communicating-vessels-liquid,
.communicating-vessels-channel {
  fill: #5ba7d8;
  fill-opacity: 0.34;
}

.communicating-vessels-channel {
  stroke: currentColor;
  stroke-width: 3;
}

.communicating-vessels-reference {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-dasharray: 7 7;
  opacity: 0.34;
}

.communicating-vessels-pressure-point {
  fill: #d77724;
  stroke: currentColor;
  stroke-width: 2;
}

.communicating-vessels-pressure-label,
.communicating-vessels-fluid-label {
  fill: currentColor;
  font-family: system-ui, sans-serif;
  font-weight: 750;
}

.communicating-vessels-pressure-label {
  font-size: 15px;
}

.communicating-vessels-fluid-label {
  font-size: 16px;
}

@media (max-width: 520px) {
  .communicating-vessels-pressure-label {
    font-size: 13px;
  }
}
