/* =============================================================
   1RM calculator. Page-only styles, layered on editorial.css + tools.css.
   Same vocabulary as the WOD timer (wod-timer/timer.css): dark tool spread,
   round steppers, chips, mono-white selected states, one hero number.
   Type rule: Archivo Black italic for display and big numbers only; every
   other word is upright Inter. Hover is guarded behind (hover: hover) so a
   tap on a phone never leaves a button stuck in its hover colour.
   ============================================================= */

.orm { padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(56px, 8vw, 104px); }
.orm .timer__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 40px; margin-bottom: 36px; }
.orm .timer__head .h-hero { font-size: clamp(48px, 8vw, 104px); }
.orm .timer__head .lead { max-width: 440px; }

.orm-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #A0A0A0; }

.orm-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 960px) { .orm-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 40px; align-items: stretch; } }

/* ---------- Inputs panel ---------- */
.orm-in { display: flex; flex-direction: column; gap: 22px; padding: 22px; border: 1px solid #262626; border-radius: 22px; background: #0C0C0D; }

.orm-units { display: inline-grid; grid-template-columns: 1fr 1fr; align-self: flex-start; padding: 4px; border-radius: 100px; background: #161618; border: 1px solid #262626; }
.orm-units button {
  min-width: 72px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 100px; background: transparent;
  color: #A0A0A0; font-size: 15px; font-weight: 800; letter-spacing: .5px; transition: background .2s ease, color .2s ease;
}
.orm-units button[aria-checked="true"] { background: #fff; color: #0A0A0A; }
.orm-units button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.orm-weight { display: flex; flex-direction: column; gap: 12px; }
.orm-weight__ctl { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; gap: 10px; }
.orm-weight__field { display: flex; align-items: baseline; justify-content: center; gap: 8px; min-width: 0; cursor: text; }
.orm-weight__field input {
  width: 100%; min-width: 0; max-width: 5.2ch; border: 0; border-bottom: 2px solid #2E2E2E; background: transparent; color: #fff; text-align: center;
  font-family: 'Archivo Black', 'Inter', sans-serif; font-style: italic; font-size: clamp(48px, 13vw, 68px); line-height: 1.05; letter-spacing: -0.01em;
  padding: 0 0 4px; border-radius: 0; transition: border-color .2s ease;
}
.orm-weight__field input:focus { outline: none; border-color: #fff; }
.orm-weight__unit { font-size: 18px; font-weight: 800; color: #8A8A93; }

/* Round stepper buttons, identical to the timer's (.wt-step__btn). The rule is
   restated here rather than loading timer.css for one selector. */
.orm .wt-step__btn {
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid #2E2E2E; background: #111113; color: #fff;
  font-size: 26px; font-weight: 500; line-height: 1; display: grid; place-items: center;
  touch-action: manipulation; user-select: none; -webkit-user-select: none; transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.orm .wt-step__btn:active { transform: scale(.94); background: #1C1C1E; }
.orm .wt-step__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.orm-reps { display: flex; flex-direction: column; gap: 12px; }
.orm-chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.orm-chip {
  min-height: 48px; border-radius: 14px; border: 1px solid #2E2E2E; background: transparent; color: #D4D4D8;
  font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; touch-action: manipulation;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.orm-chip:active { transform: scale(.95); }
.orm-chip.is-warn { color: #8A8A93; }
.orm-chip[aria-checked="true"] { background: #fff; border-color: #fff; color: #0A0A0A; }
.orm-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Result ---------- */
.orm-out { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 26px 22px; border-radius: 22px; background:
  radial-gradient(90% 80% at 100% 0%, rgba(255,72,72,.16), rgba(255,72,72,0) 60%), #0C0C0D; border: 1px solid #262626; }
.orm-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: nowrap; margin-top: 6px; min-width: 0; }
.orm-big b { font-family: 'Archivo Black', 'Inter', sans-serif; font-style: italic; font-weight: 400; font-size: clamp(64px, 19vw, 132px); line-height: .88; letter-spacing: -0.02em; color: #fff; }
.orm-big span { font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; color: #8A8A93; }
.orm-big b.is-long { font-size: clamp(52px, 15vw, 110px); }
.orm-caption { margin-top: 10px; font-size: 15px; color: #A0A0A0; }
.orm-warn { margin-top: 12px; font-size: 14px; line-height: 1.55; color: #E4E4E7; border-left: 2px solid var(--accent); padding-left: 14px; }
.orm-warn[hidden] { display: none; }
.orm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; border-top: 1px solid #1F1F1F; }
.orm-facts div { padding: 14px 10px 0 0; min-width: 0; }
.orm-facts div + div { padding-left: 14px; border-left: 1px solid #1F1F1F; }
.orm-facts dt { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: #71717A; }
.orm-facts dd { margin-top: 6px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: #fff; }

/* ---------- Barbell ---------- */
.orm-bar { margin-top: 22px; padding: 22px; border-radius: 22px; border: 1px solid #262626; background: #0C0C0D; }
.orm-bar__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.orm-bar__what { font-size: 15px; font-weight: 700; color: #fff; }
.orm-bar__load { font-size: 16px; font-weight: 800; color: #8A8A93; }
.orm-bar__load b { font-family: 'Archivo Black', 'Inter', sans-serif; font-style: italic; font-weight: 400; font-size: 34px; color: #fff; letter-spacing: -0.01em; }
.orm-bar__svg { display: block; width: 100%; max-width: 620px; height: auto; margin: 14px auto 10px; }
.orm-bar__note { font-size: 14px; color: #A0A0A0; font-variant-numeric: tabular-nums; text-align: center; }

/* ---------- Tap-to-select tables ---------- */
.orm-tables { display: grid; grid-template-columns: 1fr; gap: 28px; margin-top: 36px; }
@media (min-width: 760px) { .orm-tables { grid-template-columns: 1fr 1fr; gap: 40px; } }
.orm-rows { display: flex; flex-direction: column; margin-top: 12px; border-top: 1px solid #1F1F1F; }
.orm-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; width: 100%;
  min-height: 52px; padding: 12px 14px; margin: 0 -14px; width: calc(100% + 28px);
  border: 0; border-bottom: 1px solid #1F1F1F; border-radius: 0; background: transparent; color: #D4D4D8; text-align: left;
  touch-action: manipulation; transition: background .15s ease, color .15s ease;
}
.orm-row__k { font-size: 16px; font-weight: 600; color: #A0A0A0; }
.orm-row__v { font-size: 18px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.orm-row__v small { font-size: 13px; font-weight: 600; color: #71717A; }
.orm-row__v em { font-style: normal; margin-left: 10px; font-size: 13px; font-weight: 600; color: #71717A; }
.orm-row.is-on { background: #fff; border-radius: 12px; border-bottom-color: transparent; }
.orm-row.is-on .orm-row__k, .orm-row.is-on .orm-row__v, .orm-row.is-on small, .orm-row.is-on em { color: #0A0A0A; }
.orm-row:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }

@media (hover: hover) {
  .orm-units button:hover:not([aria-checked="true"]) { color: #fff; }
  .orm .wt-step__btn:hover { border-color: #52525B; }
  .orm-chip:hover:not([aria-checked="true"]) { border-color: #52525B; color: #fff; }
  .orm-row:hover:not(.is-on) { background: #141416; }
}

@media (max-width: 420px) {
  .orm-in, .orm-out, .orm-bar { padding: 18px; }
  .orm-weight__ctl { grid-template-columns: 52px minmax(0, 1fr) 52px; }
  .orm .wt-step__btn { width: 52px; height: 52px; }
  .orm-facts dd { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .orm-units button, .orm .wt-step__btn, .orm-chip, .orm-row, .orm-weight__field input { transition: none; }
}
