/* Reclench tools pages (calculator) */

.tools-page main {
  overflow-x: clip;
  padding-bottom: clamp(64px, 10vw, 128px);
}

.tools-page .site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.tools-page .rh-quizbar,
.tools-page .site-header--rh .rh-quiz {
  display: none;
}

.tools-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.tools-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.tools-h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* ---------- sections ---------- */

.tools-section {
  padding-top: clamp(64px, 9vw, 120px);
}

.tools-head {
  margin-bottom: clamp(24px, 4vw, 40px);
}

.tools-h2 {
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.08;
}

.tools-sub {
  max-width: 42rem;
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.tools-note {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.tools-note a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- assessment ---------- */

.rx {
  padding: clamp(32px, 6vh, 72px) 0 0;
  text-align: center;
}

.rx [hidden] {
  display: none !important;
}

.rx-head {
  max-width: 780px;
  margin: 0 auto;
  transition: opacity 0.3s ease;
}

.rx.is-quiz .rx-head {
  opacity: 0;
}

.rx.is-quiz .rx-stage {
  margin-top: 0;
}

.rx-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 9px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--paper-soft);
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.rx-badge svg {
  width: 15px;
  height: 15px;
}

.rx-head h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 6.2vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}

.rx-lede {
  max-width: 34rem;
  margin: 18px auto 0;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.6;
  color: var(--muted);
}

.rx-stage {
  display: grid;
  margin-top: clamp(28px, 5vw, 52px);
}

.rx-hub,
.rx-quiz {
  grid-area: 1 / 1;
  min-width: 0;
}

/* The hidden panel collapses so the stage is only as tall as what's showing. */
.rx-hub.is-off,
.rx-quiz.is-off {
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* hub: draggable category dial */

.rx-hub {
  position: relative;
  width: min(100%, 960px);
  margin: 0 auto;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.4s ease;
}

.rx-hub.is-out {
  opacity: 0;
  transform: scale(0.95) translateY(10px);
  filter: blur(6px);
}

.rx-arc {
  --rr: 42%;
  --gap: 36deg;
  --icon: 96px;
  position: relative;
  aspect-ratio: 2 / 1;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.rx-arc.is-dragging {
  cursor: grabbing;
}

/* Soft floor and spotlight only — no rings or rules behind the icons. */
.rx-arc::before {
  content: "";
  position: absolute;
  inset: 6% 4% 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: radial-gradient(ellipse 60% 85% at 50% 100%, var(--surface-soft), rgba(241, 245, 249, 0.55) 50%, rgba(241, 245, 249, 0) 78%);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  pointer-events: none;
}

.rx-glow {
  position: absolute;
  top: calc(100% - 2 * var(--rr));
  left: 50%;
  width: calc(var(--icon) * 3);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(254, 73, 2, 0.12), rgba(254, 73, 2, 0.04) 55%, rgba(254, 73, 2, 0));
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.rx-cats {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rx-cat-item {
  --a: 0deg;
  --s: 1;
  position: absolute;
  left: calc(50% + var(--rr) * sin(var(--a)));
  top: calc(100% - 2 * var(--rr) * cos(var(--a)));
  transform: translate(-50%, calc(var(--icon) / -2));
  will-change: left, top, opacity;
}

.rx-cat {
  --rx-on: #fe4902;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 128px;
  padding: 0;
  border: 0;
  background: none;
  font: 500 13px/1.25 var(--sans);
  color: var(--muted);
  cursor: inherit;
  transition: color 0.3s;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-drag: none;
}

.rx-cat-icon {
  position: relative;
  display: block;
  width: var(--icon);
  height: var(--icon);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 12px 28px -16px rgba(15, 23, 42, 0.28), 0 2px 6px rgba(15, 23, 42, 0.05);
  scale: var(--s);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s;
}

/* The stroke: hairline at rest, #FE4902 when selected. */
.rx-cat-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1.5px solid var(--hairline);
  border-radius: 50%;
  pointer-events: none;
  transition: border-color 0.3s, border-width 0.3s;
}

.rx-cat-media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  transition: opacity 0.3s ease;
}

/* Both state images stay stacked inside the circle, edit mode included. */
.rx-cat-icon > .rx-cat-media {
  position: absolute !important;
}

.rx-cat-media svg {
  width: 44%;
  height: 44%;
}

.rx-cat-media {
  color: var(--ink);
}

.rx-cat:hover .rx-cat-icon,
.rx-cat:focus-visible .rx-cat-icon {
  transform: translateY(-3px);
}

.rx-cat:not(.is-active):hover .rx-cat-icon::after {
  border-color: #cbd5e1;
}

.rx-cat.is-active {
  color: var(--ink);
}

.rx-cat.is-active .rx-cat-name {
  font-weight: 600;
}

.rx-cat.is-active .rx-cat-icon {
  box-shadow: 0 0 0 6px rgba(254, 73, 2, 0.07), 0 18px 34px -16px rgba(254, 73, 2, 0.45), 0 2px 6px rgba(15, 23, 42, 0.05);
}

.rx-cat.is-active .rx-cat-icon::after {
  border: 2px solid var(--rx-on);
}

.rx-cat.is-active .rx-cat-media {
  color: var(--rx-on);
}

.rx-cat:focus-visible {
  outline: none;
}

.rx-cat:focus-visible .rx-cat-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rx-cat.is-picked .rx-cat-icon {
  transform: scale(1.1);
}

/* Uploaded icon art replaces the built-in line icon and sits inside the stroke. */
.rx-upload.has-upload {
  background-image: none !important;
}

.rx-upload.has-upload svg {
  display: none;
}

.rx-cat-media .seo-upload-img,
.rx-opt-icon .seo-upload-img {
  inset: 10%;
  width: 80%;
  height: 80%;
  object-fit: contain;
}

body.dev-mode.dev-editing .rx-upload .upload-canva-size {
  display: none;
}

.rx-center {
  position: relative;
  z-index: 1;
  width: max-content;
  margin: -6% auto 0;
}

.rx-center .rx-btn {
  gap: 10px;
  min-width: 300px;
  padding: 22px 44px;
  font-size: 18px;
  box-shadow: 0 10px 28px -10px rgba(254, 73, 2, 0.55);
}

.rx-center .rx-btn svg {
  width: 20px;
  height: 20px;
}

/* buttons */

.rx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font: 600 15px/1 var(--sans);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.rx-btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

.rx-btn:active {
  transform: scale(0.98);
}

.rx-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.rx-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.rx-btn:hover svg {
  transform: translateX(3px);
}

.rx-btn--block {
  width: 100%;
  margin-top: 28px;
}

.rx-btn--ghost {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.rx-btn--ghost:hover {
  background: var(--paper-soft);
  color: var(--ink);
}

/* quiz: app-style onboarding */

.rx-quiz {
  width: min(100%, 600px);
  margin: 0 auto;
  text-align: left;
}

.rx-quiz.is-in {
  animation: rxIn 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.rx-quiz.is-leaving {
  animation: rxOut 0.3s ease both;
}

.rx-card {
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  --rx-pad: clamp(4px, 2vw, 24px);
  padding: clamp(64px, 9vw, 76px) var(--rx-pad) clamp(24px, 5vw, 44px);
}

.rx-back {
  position: absolute;
  top: 4px;
  left: clamp(14px, 3vw, 22px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper-soft);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.rx-back:hover {
  background: var(--surface-soft);
}

.rx-back:active {
  transform: scale(0.94);
}

.rx-back svg {
  width: 18px;
  height: 18px;
}

/* Answered gender / age collect top right; tap one to change it. */
.rx-chips {
  position: absolute;
  top: 4px;
  right: clamp(14px, 3vw, 22px);
  z-index: 2;
  display: flex;
  gap: 8px;
}

.rx-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.3, 1.5, 0.5, 1), border-color 0.2s;
}

.rx-chip.is-on {
  opacity: 1;
  transform: none;
}

.rx-chip:hover {
  border-color: #cbd5e1;
}

.rx-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rx-chip img {
  width: 64%;
  height: 64%;
  object-fit: contain;
}

.rx-chip--sex {
  width: 40px;
  font-size: 20px;
  line-height: 1;
}

.rx-chip--ex {
  width: 40px;
}

.rx-chip--ex img {
  width: 76%;
  height: 76%;
}

.rx-chip--ex svg {
  width: 20px;
  height: 20px;
}

.rx-chip--age {
  gap: 3px;
  padding: 0 13px;
  font: 600 14px/1 var(--mono);
}

.rx-chip--age small {
  font: 500 10px/1 var(--sans);
  color: var(--muted);
}

.rx-card .rx-fly {
  position: absolute;
  z-index: 5;
  margin: 0;
  pointer-events: none;
  transform-origin: 0 0;
}

.rx-step.is-entering > :not(.rx-continue) {
  animation: rxFade 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.rx-step.is-entering > :nth-child(2) { animation-delay: 50ms; }
.rx-step.is-entering > :nth-child(3) { animation-delay: 100ms; }
.rx-step.is-entering > :nth-child(4) { animation-delay: 160ms; }
.rx-step.is-entering > :nth-child(n + 5) { animation-delay: 220ms; }

.rx-step.is-leaving {
  animation: rxFadeOut 0.2s ease both;
}

.rx-crumb {
  margin: 0 0 10px;
  font: 600 11px/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.rx-q {
  margin: 0;
  font: 700 clamp(26px, 4vw, 36px)/1.1 var(--display);
  letter-spacing: -0.03em;
  color: var(--ink);
  outline: none;
  text-wrap: balance;
}

.rx-step > .rx-q:first-child {
  margin-top: 20px;
}

.rx-hint {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* exercise list */

.rx-opts {
  display: grid;
  gap: 8px;
  max-height: min(56vh, 470px);
  margin: 22px calc(var(--rx-pad) * -1) 0;
  padding: 10px var(--rx-pad) 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-snap-type: y proximity;
  scrollbar-width: none;
  list-style: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14px, #000 calc(100% - 40px), transparent);
}

.rx-opts::-webkit-scrollbar {
  display: none;
}

.rx-opts li {
  scroll-snap-align: start;
  scroll-margin-top: 10px;
}

.rx-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  animation: rxFade 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(120ms + var(--i, 0) * 40ms);
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.rx-opt:hover {
  border-color: #cbd5e1;
  background: var(--paper-soft);
}

.rx-opt:active {
  transform: scale(0.99);
}

.rx-opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Exercise icons are hidden for now; remove this rule to bring them back. */
.rx-opt-icon {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper-soft);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--ink);
  transition: color 0.2s, background-color 0.2s;
}

.rx-opt-icon svg {
  width: 24px;
  height: 24px;
}

.rx-opt:hover .rx-opt-icon {
  background: #fff;
  color: var(--accent);
}

.rx-opt-copy {
  min-width: 0;
}

.rx-opt-t {
  display: block;
  font: 600 15px/1.3 var(--sans);
  color: var(--ink);
}

.rx-opt-d {
  display: block;
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
}

.rx-opt-go {
  flex: none;
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #cbd5e1;
  transition: color 0.2s, transform 0.2s;
}

.rx-opt:hover .rx-opt-go {
  color: var(--accent);
  transform: translateX(2px);
}

/* number entry: big value + ruler */

.rx-dial {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(28px, 5vw, 44px);
  text-align: center;
}

.rx-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  background: none;
  font: 600 15px/1 var(--sans);
  color: var(--ink);
  cursor: pointer;
}

.rx-switch span {
  transition: color 0.25s;
}

.rx-switch[aria-checked="false"] span:last-child,
.rx-switch[aria-checked="true"] span:first-child {
  color: #cbd5e1;
}

.rx-switch i {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.rx-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(15, 23, 42, 0.04);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rx-switch[aria-checked="true"] i::after {
  transform: translateX(20px);
}

.rx-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

.rx-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
}

.rx-value input {
  width: 3ch;
  min-width: 1ch;
  max-width: 7ch;
  padding: 0;
  border: 0;
  background: transparent;
  font: 500 clamp(60px, 13vw, 84px)/1.05 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  text-align: center;
  color: var(--ink);
  caret-color: transparent;
  outline: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.rx-value input::-webkit-outer-spin-button,
.rx-value input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rx-value input::placeholder {
  color: #e2e8f0;
}

.rx-value-unit {
  font: 500 18px/1 var(--mono);
  color: var(--muted);
}

.rx-ruler {
  position: relative;
  width: calc(100% + 2 * var(--rx-pad));
  margin: clamp(22px, 4vw, 30px) calc(var(--rx-pad) * -1) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}

.rx-ruler-track {
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
}

.rx-ruler-track::-webkit-scrollbar {
  display: none;
}

.rx-ruler-track.is-grabbing {
  cursor: grabbing;
}

.rx-ruler-track:focus {
  outline: none;
}

.rx-ruler:has(.rx-ruler-track:focus-visible) .rx-ruler-needle {
  box-shadow: 0 0 0 4px rgba(254, 73, 2, 0.22);
}

.rx-ruler-scale {
  box-sizing: content-box;
  width: max-content;
  padding: 0 50%;
}

.rx-ruler-ticks {
  position: relative;
  height: 64px;
  background-repeat: repeat-x;
}

.rx-ruler-ticks span {
  position: absolute;
  top: 40px;
  font: 500 11px/1 var(--mono);
  color: #94a3b8;
  transform: translateX(-50%);
}

.rx-ruler-needle {
  position: absolute;
  top: -6px;
  left: 50%;
  width: 3px;
  height: 40px;
  margin-left: -1px;
  border-radius: 3px;
  background: var(--accent);
  pointer-events: none;
}

.rx-reps {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font: 500 15px/1 var(--sans);
  color: var(--muted);
}

.rx-reps[hidden] {
  display: none;
}

.rx-reps-box {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.rx-reps select {
  height: 44px;
  padding: 0 40px 0 18px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: #fff;
  font: 600 16px/1 var(--mono);
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rx-reps select:hover {
  border-color: #cbd5e1;
}

.rx-reps select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(254, 73, 2, 0.15);
}

.rx-reps-box svg {
  position: absolute;
  right: 14px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.rx-link {
  margin-top: 16px;
  padding: 8px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: #fff;
  font: 500 13px/1 var(--sans);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s;
}

.rx-link:hover {
  background: var(--paper-soft);
}

.rx-num .rx-continue {
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.45s, background-color 0.2s;
}

.rx-num.is-ready .rx-continue {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.rx-err {
  margin: 14px 0 0;
  font-size: 13px;
  text-align: center;
  color: #b42318;
}

/* gender */

.rx-sex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.rx-sex button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: clamp(22px, 4vw, 32px) 16px;
  border: 1px solid var(--hairline);
  border-radius: 22px;
  background: #fff;
  font: 600 16px/1 var(--sans);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.25s;
}

.rx-sex button:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -18px rgba(15, 23, 42, 0.3);
}

.rx-sex button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rx-sex button[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.12);
}

.rx-emoji {
  display: grid;
  place-items: center;
  width: clamp(68px, 14vw, 88px);
  height: clamp(68px, 14vw, 88px);
  border-radius: 50%;
  background: var(--paper-soft);
  font-size: clamp(36px, 7vw, 46px);
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rx-sex .rx-emoji {
  position: relative !important;
  overflow: hidden;
}

.rx-emoji.has-upload .rx-emoji-glyph {
  display: none;
}

.rx-emoji .seo-upload-img {
  inset: 14%;
  width: 72%;
  height: 72%;
  object-fit: contain;
}

.rx-sex button:hover .rx-emoji,
.rx-sex button[aria-pressed="true"] .rx-emoji {
  transform: scale(1.08) rotate(-4deg);
}

/* result */

.rx-result {
  text-align: center;
}

.rx-r-figs {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(14px, 4vw, 40px);
  margin: 26px 0 0;
}

.rx-r-num {
  margin: 0;
  font: 500 clamp(56px, 11vw, 88px)/1 var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: var(--ink);
}

.rx-r-num sup {
  position: relative;
  top: -0.9em;
  margin-left: 0.04em;
  font-size: 0.34em;
  letter-spacing: 0;
  color: var(--muted);
}

.rx-r-num--sm {
  font-size: clamp(32px, 6vw, 50px);
}

.rx-r-num small {
  margin-left: 0.15em;
  font-size: 0.42em;
  letter-spacing: 0;
  color: var(--muted);
}

.rx-r-lab {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.rx-r-div {
  align-self: center;
  width: 1px;
  height: 64px;
  background: var(--hairline);
}

.rx-r-level {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 22px 0 0;
}

.rx-stars {
  display: inline-flex;
  gap: 3px;
}

.rx-stars i {
  display: block;
  width: 20px;
  height: 20px;
}

.rx-stars svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #e2e8f0;
}

.rx-stars i.on svg {
  fill: var(--accent);
}

.rx-level-name {
  font: 600 15px/1 var(--sans);
  color: var(--ink);
}

.rx-r-ctx {
  max-width: 32rem;
  margin: 10px auto 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

.rx-chart {
  margin: 24px 0 0;
  padding: 16px 14px 12px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, var(--paper-soft));
}

.rx-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.rx-chart figcaption {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.rx-chart .g {
  stroke: var(--hairline);
  stroke-width: 1;
}

.rx-chart text {
  font: 500 7.5px var(--mono);
  fill: #94a3b8;
}

.rx-chart .line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rx-chart .guide {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0.35;
}

.rx-chart .dot {
  fill: var(--accent);
  stroke: #fff;
  stroke-width: 3;
}

.rx-chart .halo {
  fill: var(--accent);
  opacity: 0.15;
}

.rx-chart .bell {
  fill: #f1f5f9;
}

.rx-chart .reveal {
  transform-box: fill-box;
  transform-origin: left center;
  transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.rx-chart .you rect {
  fill: var(--ink);
}

.rx-chart .you text {
  font: 600 9px var(--sans);
  letter-spacing: 0.02em;
  fill: #fff;
}

.rx-r-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  margin: 16px 0 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--hairline);
  text-align: left;
}

.rx-r-stats[hidden] {
  display: none;
}

.rx-r-stats div {
  padding: 12px 14px;
  background: #fff;
}

.rx-r-stats dt {
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--muted);
}

.rx-r-stats dd {
  margin: 0;
  font: 500 15px/1.3 var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.rx-r-note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* try another lift + your lifts */
.rx-try,
.rx-board {
  margin-top: 32px;
  text-align: left;
}

.rx-try {
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

.rx-sub {
  margin: 0;
  font: 700 19px/1.2 var(--display);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.rx-sub-note {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.rx-try-rail {
  display: flex;
  gap: 10px;
  margin: 14px calc(-1 * var(--rx-pad)) 0;
  padding: 2px var(--rx-pad) 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--rx-pad);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.rx-try-rail::-webkit-scrollbar {
  display: none;
}

.rx-try-tile {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 96px;
  padding: 12px 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: #fff;
  scroll-snap-align: start;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.rx-try-tile:hover {
  border-color: #cbd5e1;
  background: var(--paper-soft);
}

.rx-try-tile:active {
  transform: scale(0.97);
}

.rx-try-tile:focus-visible,
.rx-board-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.rx-pic {
  display: grid;
  flex: none;
  place-items: center;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper-soft);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--ink);
}

.rx-pic img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.rx-pic svg {
  width: 26px;
  height: 26px;
}

.rx-try-name {
  font: 600 13px/1.2 var(--sans);
  color: var(--ink);
  text-align: center;
}

.rx-try-tag {
  margin-top: auto;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: var(--paper-soft);
  font: 600 11px/1 var(--mono);
  color: var(--muted);
}

.rx-try-tag.is-done {
  background: rgba(254, 73, 2, 0.1);
  color: var(--accent);
}

.rx-board {
  padding: 18px 18px 8px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
}

.rx-board[hidden] {
  display: none;
}

.rx-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rx-board-reset {
  padding: 4px 0;
  border: 0;
  background: none;
  font: 500 13px/1 var(--sans);
  color: var(--muted);
  cursor: pointer;
}

.rx-board-reset:hover {
  color: var(--ink);
}

.rx-board-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.rx-board-list li + li {
  border-top: 1px solid var(--hairline);
}

.rx-board-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.rx-board-row.is-current {
  cursor: default;
}

.rx-board-row .rx-pic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.rx-board-row .rx-pic svg {
  width: 18px;
  height: 18px;
}

.rx-board-copy {
  min-width: 0;
}

.rx-board-name {
  display: block;
  overflow: hidden;
  font: 600 14px/1.3 var(--sans);
  color: var(--ink);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rx-board-bar {
  display: block;
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 2px;
  background: #f1f5f9;
}

.rx-board-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #cbd5e1;
}

.rx-board-row.is-current .rx-board-bar i {
  background: var(--accent);
}

.rx-board-pct {
  font: 600 15px/1 var(--mono);
  color: var(--ink);
}

.rx-board-row.is-current .rx-board-pct {
  color: var(--accent);
}

.rx-r-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.rx-fine {
  margin: 18px 0 0;
  font-size: 11px;
  color: #94a3b8;
}

/* dev edit mode: keep upload slots tappable inside the dial and list */
body.dev-mode.dev-editing .rx-upload .upload-hint {
  padding: 4px 7px;
  font-size: 9px;
  letter-spacing: 0.08em;
}

@keyframes rxIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes rxOut {
  to { opacity: 0; transform: translateY(12px) scale(0.98); filter: blur(4px); }
}

@keyframes rxFade {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes rxFadeOut {
  to { opacity: 0; transform: translateY(-6px); filter: blur(3px); }
}

/* ---------- coming soon ---------- */

.tools-cards {
  display: grid;
  gap: 12px;
}

.tools-card {
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--paper-soft);
  cursor: default;
}

.tools-badge {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--paper);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tools-card h3 {
  margin: 20px 0 6px;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  opacity: 0.6;
}

.tools-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- CTA band ---------- */

.tools-cta {
  display: grid;
  gap: 28px;
  align-items: center;
  margin-top: clamp(64px, 9vw, 120px);
  padding: clamp(36px, 6vw, 72px) clamp(24px, 5vw, 64px);
  border-radius: 24px;
  background: var(--ink);
}

.tools-cta .tools-h2 {
  color: #fff;
}

.tools-cta p {
  max-width: 34rem;
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.66);
}

.tools-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  padding: 17px 30px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font: 600 15px/1 var(--sans);
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s;
}

.tools-btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

.tools-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- grip table ---------- */

.grip-tables {
  display: grid;
  gap: 16px;
}

.grip-table-card {
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--paper);
}

.grip-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.grip-table caption {
  padding: 18px 20px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-align: left;
  color: var(--ink);
}

.grip-table thead th {
  padding: 12px 20px;
  background: var(--paper-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--muted);
}

.grip-table tbody th,
.grip-table td {
  padding: 12px 20px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: left;
  color: var(--ink);
}

.grip-table th:not(:first-child),
.grip-table td {
  text-align: right;
}

.grip-table td small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- FAQ ---------- */

.tools-faq {
  max-width: 760px;
  margin: 0 auto;
}

.tools-faq .tools-head {
  text-align: center;
}

.tools-faq .faq-item p a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- breakpoints ---------- */

@media (max-width: 719px) {
  .rx-hub {
    width: auto;
    margin: 0 calc(-1 * var(--gutter));
  }

  .rx-arc {
    --rr: 39%;
    --icon: 60px;
  }

  .rx-cat {
    gap: 7px;
    width: 80px;
    font-size: 11px;
  }

  .rx-center {
    margin-top: -2%;
  }

  .rx-center .rx-btn {
    min-width: 260px;
    padding: 19px 36px;
    font-size: 17px;
  }

  .rx-r-actions .rx-btn {
    flex: 1 1 100%;
  }
}

@media (min-width: 640px) {
  .tools-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 760px) {
  .grip-tables {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .tools-cta {
    grid-template-columns: 1fr auto;
    gap: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rx-hub,
  .rx-cat-icon,
  .rx-cat-icon::after,
  .rx-chart .line,
  .rx-btn,
  .rx-opt,
  .rx-switch i::after,
  .rx-num .rx-continue,
  .rx-sex button,
  .rx-emoji,
  .tools-btn {
    transition: none;
  }

  .rx-quiz.is-in,
  .rx-quiz.is-leaving,
  .rx-step.is-entering > *,
  .rx-step.is-leaving,
  .rx-opt {
    animation: none;
  }
}
