/* One-rep max calculator (T64 stream C). Tokens only, phone first.
   Every class is prefixed orm- or sits under .orm. */

.orm { display: grid; gap: 28px; }

/* ---- lift links */
.orm-lifts { display: grid; gap: 10px; }
.orm-lifts .chip { display: inline-flex; align-items: center; text-decoration: none; }
.orm-lifts .chip[aria-current="page"] { background: var(--chalk); color: var(--on-chalk); }

/* ---- the set: a weight, for some reps */
.orm-set { display: grid; gap: 16px; }
.orm-set-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.orm .pm-weight input { font-size: clamp(56px, 15vw, 104px); }
.orm .pm-weight .unit { font-size: clamp(22px, 4.4vw, 36px); }
.orm .pm-roll { font: 700 clamp(56px, 15vw, 104px)/.95 var(--f-display); letter-spacing: -.5px; }
.orm-for { font: 700 clamp(22px, 4.4vw, 36px)/1 var(--f-display); letter-spacing: .5px; text-transform: uppercase; color: var(--chalk-dim); }
.no-js .orm [data-orm-step], .no-js .orm-slide-row { display: none; }
.js .orm-go { display: none; }
.orm-go { justify-self: start; }

/* the reps slider: one plate on a bar */
.orm-slide-row { max-width: 560px; }
.orm-slide { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; padding: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.orm-slide::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--steel); }
.orm-slide::-moz-range-track { height: 6px; border-radius: 3px; background: var(--steel); }
.orm-slide::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 36px; margin-top: -15px; border: 0; border-radius: 6px; background: var(--chalk); }
.orm-slide::-moz-range-thumb { width: 18px; height: 36px; border: 0; border-radius: 6px; background: var(--chalk); }
.orm-slide:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; border-radius: 8px; }

.orm-controls { gap: 14px 28px; }
.orm-barpick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* ---- the answer */
.orm-result { display: grid; gap: 8px; padding-top: 24px; border-top: 1px solid var(--hairline); }
.orm-by { display: inline-block; margin-left: 6px; padding: 3px 8px; border-radius: 6px; background: var(--iron-raised); color: var(--chalk); letter-spacing: 1.2px; }
.orm-max { display: flex; align-items: baseline; margin: 0; font: 700 clamp(88px, 27vw, 240px)/.86 var(--f-display); letter-spacing: -1px; transition: opacity 200ms ease; }
.orm-max .unit { font-size: .28em; letter-spacing: 0; }
.orm-max .roll { height: .86em; }
.orm-max .roll .c, .orm-max .roll .col span, .orm-max .roll .sep { height: .86em; line-height: .86; }
.orm.is-rough .orm-max { opacity: .55; }
.orm-est { font: 700 clamp(22px, 3.6vw, 30px)/1.1 var(--f-display); letter-spacing: .5px; text-transform: uppercase; color: var(--chalk-dim); }
.orm-say { max-width: 40em; font-size: 17px; line-height: 1.5; }
.orm-beyond { position: relative; max-width: 40em; padding: 14px 16px 14px 28px; border-radius: var(--r-surface); background: var(--iron-plate); font-size: 15px; line-height: 1.5; }
.orm-beyond::before { content: ""; position: absolute; left: 12px; top: 14px; bottom: 14px; width: 5px; border-radius: 3px; background: var(--steel-light); }
.orm-beyond[hidden] { display: none; }

/* ---- the bar */
.orm-bleed { margin-top: 20px; padding-inline: var(--gutter); }
.orm-under { display: grid; gap: 16px; margin-top: 20px; }
.orm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.orm-actions [hidden] { display: none; }

/* ---- sections under the bar */
.orm-more { display: grid; gap: clamp(44px, 7vw, 72px); margin-top: clamp(44px, 7vw, 72px); }
.orm-sec { min-width: 0; }
.orm-sec .body-dim { margin-top: 10px; max-width: 40em; }
@media (min-width: 1000px) {
  .orm-more { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; }
  .orm-sec-f { grid-column: 1 / -1; }
}

/* six formulas: one mark each, on one scale */
.orm-spread { margin-top: 14px; max-width: 40em; font-size: 17px; line-height: 1.5; }
.orm-formulas { list-style: none; display: grid; margin: 20px 0 0; padding: 0; max-width: 820px; }
.orm-f { display: grid; gap: 6px; padding: 14px 0 12px; border-top: 1px solid var(--hairline); }
.orm-f-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.orm-f-name { font: 700 24px/1 var(--f-display); letter-spacing: .5px; text-transform: uppercase; }
.orm-tag { margin-left: 6px; font: 600 11px/1 var(--f-body); letter-spacing: 1.2px; color: var(--chalk-dim); vertical-align: middle; }
.orm-f-val { font: 700 24px/1 var(--f-display); white-space: nowrap; }
.orm-f-val > span { font-size: .62em; color: var(--chalk-dim); }
.orm-f-diff { margin-left: 4px; }
.orm-rail { position: relative; height: 30px; overflow: hidden; }
.orm-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--steel); }
.orm-mark { position: absolute; left: 0; top: 0; bottom: 0; width: calc(100% - 10px); transition: transform 260ms cubic-bezier(.2, .8, .2, 1); }
.orm-mark i { position: absolute; left: 0; top: 5px; bottom: 5px; width: 10px; border-radius: 4px; background: var(--chalk); }
.orm-mark.ember-able i { top: 0; bottom: 0; transition: background-color 360ms ease; }
.orm-mark.ember-able.is-live i { background: var(--ember); }
.orm-f-form { font-size: 13px; line-height: 1.4; color: var(--chalk-dim); font-variant-numeric: tabular-nums; }
.orm-scale { display: flex; justify-content: space-between; gap: 12px; max-width: 820px; padding-top: 10px; border-top: 1px solid var(--steel-light); font-size: 13px; color: var(--chalk-dim); }
.orm-scale b { color: var(--chalk); font-weight: 600; }

/* percentage chart and rep maxes */
.orm-tbl { width: 100%; margin-top: 18px; border-collapse: collapse; }
.orm-tbl thead th { padding: 0 12px 8px 0; border-bottom: 1px solid var(--steel-light); text-align: left; vertical-align: bottom; font: 600 12px/1.3 var(--f-body); letter-spacing: 1.2px; text-transform: uppercase; color: var(--chalk-dim); }
.orm-tbl tbody th, .orm-tbl td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: middle; }
.orm-tbl tbody th { width: 3.4em; font: 700 22px/1 var(--f-display); color: var(--chalk-dim); }
.orm-tbl td { font-size: 15px; }
.orm-load { white-space: nowrap; }
.orm-load b { font: 700 26px/1 var(--f-display); }
.orm-load span { font-size: 13px; color: var(--chalk-dim); }
.orm-side { width: 52%; }
.orm-b { display: block; }
.orm-mini { display: block; width: 100%; max-width: 150px; height: auto; }
.orm-ps { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--chalk-dim); }
.orm-x { display: none; color: var(--chalk-dim); }
@media (min-width: 480px) { .orm-tbl .orm-x { display: table-cell; } }
.orm-reps tr.is-set th { color: var(--chalk); }
.orm-reps tr.is-set td, .orm-reps tr.is-set th { border-bottom-color: var(--steel-light); }

.orm-rack { max-width: 560px; margin-top: 22px; }
.orm-rack-svg { display: block; width: 100%; height: auto; overflow: visible; }
.orm-rack-w { font: 700 11px/1 var(--f-display); fill: var(--chalk); font-variant-numeric: tabular-nums; }
.orm-rack-w.is-long { font-size: 9px; }
.orm-rack-r { font: 600 11px/1 var(--f-body); fill: var(--chalk-dim); }
.orm-rack-axis { max-width: 560px; text-align: center; }

.orm-sources li { overflow-wrap: anywhere; }

/* ---- print sheet */
.orm-sheet-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.orm-sheet-form .field { margin: 0; }
.orm-sheet-form .input { min-height: 44px; }
.orm-sheet-tbl { margin-top: 5mm; }
.orm-sheet-tbl td, .orm-sheet-tbl th { height: 9.5mm; }
.orm-sheet-tbl .orm-sheet-n { font: 700 13pt/1 var(--f-display); white-space: nowrap; }
.orm-sheet-tbl .orm-mini { width: 38mm; height: auto; }
.orm-sheet-write { width: 22%; }
.orm-sheet-h2 { margin-top: 8mm; font-size: 15pt; }
.orm-sheet-reps { margin-top: 3mm; table-layout: fixed; }
.orm-sheet-reps th, .orm-sheet-reps td { padding: 1.4mm 1mm; text-align: center; }
.orm-sheet-reps th:first-child { width: 16mm; text-align: left; }
.orm-sheet-note { margin-top: 4mm; font-size: 8.5pt; }

@media (prefers-reduced-motion: reduce) {
  .orm-mark, .orm-max, .orm-mark.ember-able i { transition: none; }
}

/* without the script the field is the number: no rolling twin, and a line to type on */
.orm:not(.has-roll) .pm-roll { display: none; }
.no-js .orm .pm-weight input { border-bottom-color: var(--steel-light); }
.orm .pm-weight input { min-width: 44px; }
.orm-sheet-tbl .orm-sheet-side { white-space: nowrap; }
