/* The document pages: the strength standards (one per ranked lift, plus their index), support and
   about. Read mode: the One road's frame (the nav, the obsidian ground, the captions, the emblem art,
   the badges at the close) around a calm reading column. Shares tokens.css and page.css (the nav, the
   captions, the footer, the badges) and adds only what a document needs. No cards, bands or 1px rules:
   rows separate by spacing, and the lavender gradient appears once, on the rung the reader's set lands
   on, the way a lit level node lights on the map. */

.doc { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 136px var(--gutter) 24px; }
.doc .cap { font-size: clamp(34px, 4.4vw, 60px); }
.doc .lede { margin-top: 20px; max-width: 44ch; }
.doc h2.h2 { margin: 72px 0 0; font-family: var(--font-sans); font-size: clamp(24px, 2.2vw, 30px); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; color: var(--on-surface); text-wrap: balance; }
.doc p, .doc li { font-family: var(--font-sans); font-size: 17px; line-height: 1.6; color: var(--on-surface-variant); }
.doc h2.h2 + p, .doc h2.h2 + ul, .doc h2.h2 + form, .doc h2.h2 + .rungs-wrap, .doc h2.h2 + .lift-groups { margin-top: 16px; }
.doc p + p { margin-top: 12px; }
.doc a { color: var(--on-surface); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(231,229,228,.35); transition: color 150ms, text-decoration-color 150ms; }
.doc a:hover { color: var(--primary); text-decoration-color: var(--primary); }
.doc ul.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.doc strong { color: var(--on-surface); font-weight: 600; }
.doc .note { font-size: 15px; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- the finder: men or women, lb or kg, a set, and where it lands ---------- */
.finder-form { display: flex; flex-direction: column; gap: 18px; }
.seg-row { display: flex; flex-wrap: wrap; gap: 12px; }
/* a segmented pill like the app's SlidingPillRow: a dark track, the chosen segment in the gradient */
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-container); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 9px 18px; border-radius: 999px; font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--on-surface-variant); transition: color 150ms, background 150ms; }
.seg input:checked + span { background: var(--gradient-primary); color: var(--on-primary); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.fields { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--on-surface-variant); }
.field .in { position: relative; display: flex; align-items: center; }
.field input { width: 128px; box-sizing: border-box; padding: 12px 44px 12px 14px; border: 0; border-radius: 12px; background: var(--surface-container); color: var(--on-surface); font-family: var(--font-sans); font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; appearance: textfield; -moz-appearance: textfield; caret-color: var(--primary); }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field input::placeholder { color: rgba(172,171,170,.72); font-weight: 500; }
.field input:focus { outline: 2px solid var(--primary); outline-offset: 0; }
.field input:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; }
.field .unit { position: absolute; right: 14px; font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--on-surface-variant); pointer-events: none; }
.field.reps input { width: 96px; padding-right: 14px; }
.times { font-family: var(--font-sans); font-size: 19px; color: var(--on-surface-variant); padding-bottom: 13px; }
.field[hidden] { display: none; }
.finder-result { display: flex; align-items: center; gap: 18px; margin-top: 24px; min-height: 84px; }
.result-crest { width: 84px; height: 84px; flex: none; object-fit: contain; }
.result-crest[hidden] { display: none; }
.result-rank { margin: 0; font-family: var(--font-sans); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--on-surface); }
.result-line { margin: 6px 0 0; font-size: 16px; }
.finder-result.empty .result-rank { display: none; }
.finder-result.empty .result-line { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .result-crest { transition: transform 300ms cubic-bezier(.2,1.6,.4,1); }
  .result-crest.pop { animation: crestPop 420ms cubic-bezier(.2,1.6,.4,1) both; }
}
@keyframes crestPop { from { transform: scale(.82); } 55% { transform: scale(1.1); } to { transform: scale(1); } }

/* ---------- the ladder: 25 rungs, the emblem art on each, tabular numbers ---------- */
.rungs-wrap { margin-top: 16px; }
/* the numbers stay close to the level names: the table is capped so the men's and women's columns
   never drift to the far edge of the reading column */
.rungs { width: 100%; max-width: 560px; border-collapse: separate; border-spacing: 0 2px; }
.rungs th { padding: 0 14px 10px; text-align: left; font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: var(--on-surface-variant); }
.rungs th.num, .rungs td.num { text-align: right; }
.rungs td { padding: 7px 14px; font-family: var(--font-sans); font-size: 17px; color: var(--on-surface); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rungs td.rung { font-weight: 600; }
/* the crest and the name sit in an inner span, so the cell stays a table cell */
.rungs .rung-in { display: flex; align-items: center; gap: 12px; }
.rungs td.rung img { width: 40px; height: 40px; flex: none; }
.rungs tr.olympian td { padding-top: 12px; padding-bottom: 12px; }
.rungs td:first-child { border-radius: 14px 0 0 14px; }
.rungs td:last-child { border-radius: 0 14px 14px 0; }
.rungs tr.here td { background: var(--gradient-primary); color: var(--on-primary); }
.rungs tr.here td.rung { font-weight: 700; }
.rungs td .muted { color: var(--on-surface-variant); font-weight: 500; }
.rungs tr.here td .muted { color: var(--on-primary); opacity: .8; }
.rungs tr.here td.num.dim { opacity: .55; }
.rungs-foot { margin-top: 14px; }

/* ---------- the index's row of the nine ranks ---------- */
.rank-row { display: flex; flex-wrap: wrap; gap: 14px 6px; margin-top: 32px; }
.rank-row figure { margin: 0; width: 72px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rank-row img { width: 56px; height: 56px; }
.rank-row figcaption { font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--on-surface-variant); }
@media (max-width: 599px) { .rank-row { gap: 12px 2px; } .rank-row figure { width: 64px; } .rank-row img { width: 48px; height: 48px; } }

/* ---------- the other lifts ---------- */
.lift-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.lift-groups h3 { margin: 0 0 10px; font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--on-surface-variant); }
.lift-groups ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lift-groups li { font-size: 16px; }
.lift-groups a { text-decoration: none; }
.lift-groups [aria-current="page"] { color: var(--primary); font-weight: 600; }

/* ---------- the close: the badges, the only other place the gradient's light falls ---------- */
.doc-close { text-align: center; padding: 96px 0 40px; }
.doc-close .cap { font-size: clamp(32px, 4vw, 52px); }
.doc-close p.body { margin: 20px auto 0; max-width: 40ch; }
.close-badges { display: flex; justify-content: center; margin-top: 32px; min-height: 60px; }
.doc-close .hero-trial { margin-top: 16px; }

/* ---------- support and about ---------- */
.doc .contact { margin-top: 20px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; color: var(--on-surface); }
.doc .contact a { text-decoration-color: rgba(231,229,228,.35); }

@media (max-width: 899px) {
  .doc { padding-top: 112px; }
  .doc h2.h2 { margin-top: 56px; }
  .lift-groups { grid-template-columns: 1fr 1fr; gap: 24px; }
  .doc-close { padding: 72px 0 24px; }
}
@media (max-width: 599px) {
  .doc { padding-top: 96px; }
  .doc p, .doc li { font-size: 16px; }
  .rungs th { padding: 0 10px 8px; }
  .rungs td { padding: 7px 10px; font-size: 15px; }
  .rungs .rung-in { gap: 10px; }
  .rungs td.rung img { width: 34px; height: 34px; }
  .field input { width: 118px; }
  .close-badges { justify-content: center; }
  .doc-close .hero-trial { text-align: center; }
}
