.ored { max-width: 820px; }

.ored-top-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ored-dim-toggle { display: flex; gap: 6px; }
.ored-dim-btn {
  padding: 8px 14px; font-size: 13px; font-weight: 700; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; cursor: pointer; color: #27331f;
}
.ored-dim-active { background: #19616a; border-color: #19616a; color: #fff; }

.ored-version-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #27331f; }
.ored-version-label select {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; background: #fff; color: #27331f;
}
.ored-version-label select:focus { outline: 2px solid #19616a; outline-offset: 1px; }

.ored-version-note { margin: 0 0 18px; font-size: 12.5px; color: #5b6b56; min-height: 1.2em; }

.ored-main { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 24px; margin-bottom: 26px; align-items: start; }

.ored-viz-col { display: flex; flex-direction: column; gap: 8px; }
.ored-viz-wrap { display: flex; align-items: stretch; gap: 6px; }

/*
 * The ruler is 92px, not 44px, because the deepslate label has to fit INSIDE it.
 *
 * The label is `position: absolute; right: 6px; white-space: nowrap` — inherited from
 * `.ored-ruler span` below — and "deepslate begins" paints 83px. Anchored 6px from the right edge of
 * a 44px box, its left edge landed at 44 - 6 - 83 = -45px, i.e. 45px outside the ruler. At 768px the
 * ruler sits flush against the 16px page padding, so the label ran 29px off the left of the viewport
 * and the first two characters were simply not on screen.
 *
 * THIS WAS NEVER AN RTL BUG, though only /ar reported it. `scrollWidth` grows for overflow in the
 * INLINE-END direction, so a box hanging off to the LEFT is invisible to it in LTR and plainly
 * visible in RTL. audit-rendered.mjs --locale en measured 0 findings on this page while the label
 * was 29px off-screen for English readers too. Any overflow sweep run only on a left-to-right locale
 * can only ever see half the defect class.
 *
 * Widening rather than shrinking the label: the flex row is ruler(44) + gap(6) + strip(120) = 170px
 * inside a 320-328px column at every measured width, so ~150px sat unused. The extra width is empty
 * space to the LEFT of the tick numbers, which stay right-aligned against the strip, so the change is
 * invisible except that the label now has somewhere to go. Measured after: label left = ruler.left+1
 * at 360, 768 and 1440, in both directions.
 */
.ored-ruler {
  position: relative; width: 92px; height: 480px; flex: none;
  font-size: 10.5px; font-weight: 700; color: #5b6b56;
}
.ored-ruler span {
  position: absolute; right: 6px; transform: translateY(-50%); white-space: nowrap;
}
.ored-ruler .ored-ruler-tick {
  position: absolute; right: 0; width: 5px; height: 1px; background: #d9e0d4; transform: translateY(-50%);
}
.ored-ruler .ored-deepslate-label {
  color: #19616a; font-weight: 700;
  /* A backstop for translation, not for English. "deepslate begins" is 83px; the same label is
   * longer in several locales, and without this it would walk straight back out of the ruler that
   * was just widened for it. Wrapping to a second line is the right failure here — the label is a
   * chart annotation next to the Y=0 tick, so two short lines read fine and nothing shifts. */
  max-width: 86px; white-space: normal; text-align: right; line-height: 1.15;
}

.ored-strip-wrap { position: relative; width: 120px; height: 480px; flex: none; }
.ored-strip-wrap canvas {
  display: block; width: 120px; height: 480px; border: 1px solid #d9e0d4; border-radius: 6px; background: #f3f4f8;
}
.ored-depth-line {
  position: absolute; left: 0; right: 0; height: 2px; background: #19616a; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.8);
}
.ored-depth-line::before {
  content: ""; position: absolute; left: -6px; top: -4px; width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 6px solid #19616a;
}

.ored-slider {
  writing-mode: vertical-lr; direction: rtl;
  width: 22px; height: 480px; flex: none; cursor: grab; accent-color: #19616a;
}
.ored-slider:active { cursor: grabbing; }

.ored-viz-hint { margin: 4px 0 0; font-size: 12px; color: #5b6b56; max-width: 320px; }

.ored-depth-panel {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; background: #f3f4f8;
  border: 1px solid #d9e0d4; border-radius: 8px; min-width: 0;
}
.ored-depth-title { margin: 0; font-size: 15px; font-weight: 700; color: #27331f; }
.ored-y-input-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: #27331f; }
.ored-y-input-label input {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; width: 100px; box-sizing: border-box;
}
.ored-y-input-label input:focus { outline: 2px solid #19616a; outline-offset: 1px; }

.ored-depth-caption { margin: 0; font-size: 12px; color: #5b6b56; }

.ored-density-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ored-density-list li {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: #27331f; background: #fff;
  border: 1px solid #d9e0d4; border-radius: 6px; padding: 7px 9px;
}
.ored-density-swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.ored-density-name { font-weight: 700; flex: 1; }
.ored-density-bar-wrap { position: relative; width: 70px; height: 8px; background: #f3f4f8; border-radius: 4px; overflow: hidden; flex: none; }
.ored-density-bar { position: absolute; left: 0; top: 0; bottom: 0; background: #19616a; }
.ored-density-pct { font-weight: 700; color: #19616a; width: 42px; text-align: right; flex: none; }

.ored-table-wrap { margin-bottom: 22px; }
.ored-table-title { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: #27331f; }
.ored-table-scroll { overflow-x: auto; }
.ored-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.ored-table th, .ored-table td { text-align: left; padding: 9px 10px; border: 1px solid #d9e0d4; }
.ored-table th { background: #f3f4f8; color: #27331f; font-weight: 700; }
.ored-table td { color: #27331f; }
.ored-table tbody tr:nth-child(even) td { background: #f3f4f8; }
.ored-table .ored-ore-cell { display: flex; align-items: center; gap: 7px; font-weight: 700; white-space: nowrap; }

.ored-prose { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.ored-prose h3 { margin: 14px 0 2px; font-size: 15px; font-weight: 700; color: #27331f; }
.ored-prose h3:first-child { margin-top: 0; }
.ored-prose p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.55; color: #27331f; }

.ored-note { margin-top: 16px; font-size: 13px; color: #5b6b56; }

@media (max-width: 640px) {
  .ored-main { grid-template-columns: 1fr; }
  .ored-viz-wrap { justify-content: center; }
}
