/* GymRepTracker visual system.
 *
 * The interface is designed as a training console: high contrast, large targets
 * and clear numeric hierarchy while a lifter is between sets. Every flex and grid
 * descendant can shrink, long API values can wrap, and wide data tables scroll in
 * their own containers instead of widening the document.
 */

/* -------------------------------------------------------------------- tokens */

:root {
  color-scheme: dark light;

  --bg: #080b0a;
  --bg-glow: #14221b;
  --surface: #111714;
  --surface-raised: #171f1b;
  --surface-strong: #202a25;
  --surface-soft: rgba(23, 31, 27, 0.72);
  --line: #28342e;
  --line-strong: #3a4942;

  --text: #f1f6ef;
  --text-dim: #a7b2ac;
  --text-faint: #74827a;
  --ink: #10140d;

  --accent: #c7f65a;
  --accent-readable: #c7f65a;
  --accent-hover: #d8ff7c;
  --accent-soft: rgba(199, 246, 90, 0.11);
  --accent-line: rgba(199, 246, 90, 0.42);
  --measured: #45d9bd;
  --measured-soft: rgba(69, 217, 189, 0.1);
  --estimated: #9aa8a1;
  --danger: #ff7171;
  --danger-soft: rgba(255, 113, 113, 0.1);
  --warning: #ffc75c;
  --warning-soft: rgba(255, 199, 92, 0.1);
  --info: #7aa7ff;

  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.36);
  --ring: 0 0 0 3px rgba(199, 246, 90, 0.2);

  --radius-xs: 0.55rem;
  --radius-sm: 0.8rem;
  --radius: 1.15rem;
  --radius-lg: 1.65rem;
  --tap: 3rem;
  --pad: clamp(1rem, 4vw, 1.35rem);
  --gap: 0.9rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #edf1eb;
    --bg-glow: #dfead9;
    --surface: #f9fbf8;
    --surface-raised: #ffffff;
    --surface-strong: #e5ebe2;
    --surface-soft: rgba(255, 255, 255, 0.82);
    --line: #d3dcd1;
    --line-strong: #b6c4b5;

    --text: #172019;
    --text-dim: #526057;
    --text-faint: #738078;
    --accent: #b5e641;
    --accent-readable: #4f700b;
    --accent-hover: #a7d632;
    --accent-soft: rgba(102, 139, 19, 0.1);
    --accent-line: rgba(75, 108, 8, 0.35);
    --measured: #087f69;
    --measured-soft: rgba(8, 127, 105, 0.08);
    --estimated: #69756f;
    --danger: #be3434;
    --danger-soft: rgba(190, 52, 52, 0.08);
    --warning: #8a5b00;
    --warning-soft: rgba(180, 113, 0, 0.09);
    --info: #315eaf;

    --shadow-sm: 0 8px 24px rgba(33, 48, 38, 0.08);
    --shadow-lg: 0 24px 70px rgba(33, 48, 38, 0.14);
  }
}

/* ---------------------------------------------------------------------- base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  min-height: 100dvh;
  margin: 0;
  background:
    radial-gradient(circle at 88% 4%, var(--bg-glow) 0, transparent 28rem),
    linear-gradient(155deg, var(--bg) 0%, color-mix(in srgb, var(--bg), #000 6%) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: var(--measured);
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
p,
blockquote,
dd,
dt,
label,
span,
a {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  font-family: "Arial Narrow", "Roboto Condensed", Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(1.45rem, 5vw, 2rem);
}

h2 {
  font-size: clamp(1.12rem, 4vw, 1.38rem);
}

h3 {
  font-size: 1rem;
}

p {
  margin: 0 0 0.85rem;
}

p:last-child {
  margin-bottom: 0;
}

/* Every descendant of the application can shrink inside flex or grid layouts. */
.app-shell * {
  min-width: 0;
}

/* -------------------------------------------------------------------- shell */

.app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 4.4rem;
  padding: 0.7rem var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 18%);
  backdrop-filter: blur(18px) saturate(125%);
}

.app-header__back {
  flex: none;
  display: inline-grid;
  width: var(--tap);
  min-height: var(--tap);
  padding: 0;
  place-items: center;
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.app-header__back-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.app-header__heading {
  flex: 1;
}

.app-header__eyebrow {
  display: none;
  margin-bottom: 0.15rem;
  color: var(--text-faint);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
}

.app-header__title {
  font-size: clamp(1.25rem, 5vw, 1.62rem);
}

.app-header__subtitle {
  display: block;
  margin-top: 0.18rem;
  color: var(--text-dim);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
}

.app-header__pulse {
  flex: none;
  width: 0.58rem;
  height: 0.58rem;
  background: var(--measured);
  border: 2px solid color-mix(in srgb, var(--measured), var(--bg) 70%);
  border-radius: 50%;
  box-shadow: 0 0 0 0.35rem var(--measured-soft);
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.15rem var(--pad) calc(5.6rem + env(safe-area-inset-bottom, 0px));
}

.app-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  padding: 0.42rem 0.45rem calc(0.42rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px) saturate(130%);
}

.app-nav__brand {
  display: none;
}

.app-nav__items {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.28rem;
}

.app-nav__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 3.75rem;
  padding: 0.42rem 0.2rem;
  background: transparent;
  color: var(--text-faint);
  border: 0;
  border-radius: 0.95rem;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.app-nav__item[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-readable);
}

.app-nav__item:active {
  transform: scale(0.96);
}

.app-nav__icon,
.empty-state__icon {
  display: block;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.app-nav__icon {
  width: 1.42rem;
  height: 1.42rem;
}

.app-nav__icon[data-icon="today"],
.empty-state__icon[data-icon="lift"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6M6 7v10M18 7v10M21 9v6M6 12h12' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.app-nav__icon[data-icon="exercises"],
.empty-state__icon[data-icon="list"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 6h12M8 12h12M8 18h12M4 6h.01M4 12h.01M4 18h.01' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.app-nav__icon[data-icon="leaderboard"],
.empty-state__icon[data-icon="trophy"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4h8v3c0 4-1.5 6-4 7-2.5-1-4-3-4-7V4Zm0 2H4v1c0 3 1.5 5 4.5 5M16 6h4v1c0 3-1.5 5-4.5 5M12 14v4M8 20h8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.app-nav__icon[data-icon="profile"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='3.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M5 20c.7-4 3-6 7-6s6.3 2 7 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.app-nav__icon[data-icon="settings"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='3' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M19 13.5v-3l-2-.7-.7-1.7.9-1.9-2.1-2.1-1.9.9-1.7-.7-.7-2h-3l-.7 2-1.7.7-1.9-.9-2.1 2.1.9 1.9-.7 1.7-2 .7v3l2 .7.7 1.7-.9 1.9 2.1 2.1 1.9-.9 1.7.7.7 2h3l.7-2 1.7-.7 1.9.9 2.1-2.1-.9-1.9.7-1.7 2-.7Z' fill='none' stroke='black' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.app-nav__label {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-nav__badge {
  position: absolute;
  top: 0.15rem;
  left: 50%;
  min-width: 1.15rem;
  padding: 0 0.28rem;
  margin-left: 0.35rem;
  background: var(--danger);
  color: #fff;
  border: 2px solid var(--surface-raised);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1rem;
  text-align: center;
}

.offline-banner {
  padding: 0.55rem var(--pad);
  background: var(--warning);
  color: #17130a;
  font-size: 0.78rem;
  font-weight: 750;
  text-align: center;
}

/* -------------------------------------------------------------- authentication */

.app-shell--auth {
  display: flex;
  min-height: 100dvh;
}

.app-shell--auth .app-header,
.app-shell--auth .app-nav {
  display: none;
}

.app-shell--auth .app-main {
  display: grid;
  max-width: 72rem;
  min-height: 100dvh;
  padding: clamp(1rem, 4vw, 2.5rem);
  place-items: center;
}

.auth-card {
  display: grid;
  width: 100%;
  max-width: 62rem;
  overflow: hidden;
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.auth-card__visual {
  position: relative;
  min-height: 13rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 65% 35%, rgba(199, 246, 90, 0.24), transparent 10rem),
    linear-gradient(145deg, #17231d 0%, #0a0d0c 72%);
}

.auth-card__visual::before,
.auth-card__visual::after {
  position: absolute;
  border: 1px solid rgba(199, 246, 90, 0.16);
  border-radius: 50%;
  content: "";
}

.auth-card__visual::before {
  top: -5rem;
  right: -4rem;
  width: 17rem;
  height: 17rem;
}

.auth-card__visual::after {
  right: 2rem;
  bottom: -7rem;
  width: 14rem;
  height: 14rem;
}

.auth-card__brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.25rem;
  color: #f1f6ef;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.auth-card__logo {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.72rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.auth-card__art {
  position: absolute;
  top: 58%;
  right: 8%;
  left: 8%;
  height: 3rem;
  transform: translateY(-50%) rotate(-5deg);
}

.auth-card__bar {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 0.55rem;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 0 2rem rgba(199, 246, 90, 0.28);
  transform: translateY(-50%);
}

.auth-card__plate {
  position: absolute;
  top: 50%;
  width: 2.4rem;
  height: 5.4rem;
  background: #eef6ed;
  border: 0.45rem solid #45d9bd;
  border-radius: 0.7rem;
  box-shadow: 0 0 0 0.5rem rgba(238, 246, 237, 0.08);
  transform: translateY(-50%);
}

.auth-card__plate--left {
  left: 8%;
}

.auth-card__plate--right {
  right: 8%;
}

.auth-card__body {
  padding: clamp(1.5rem, 6vw, 3.3rem);
}

.auth-card__kicker {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--measured);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.auth-card__title {
  max-width: 14ch;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 9vw, 3.7rem);
}

.auth-card__copy {
  max-width: 35rem;
  margin-bottom: 1.4rem;
  color: var(--text-dim);
}

.auth-card__action {
  margin-bottom: 1rem;
}

.auth-card__security {
  position: relative;
  padding-left: 1.65rem;
  color: var(--text-faint);
  font-size: 0.78rem;
}

.auth-card__security::before {
  position: absolute;
  top: 0.15rem;
  left: 0;
  width: 1rem;
  height: 1rem;
  background: var(--measured);
  clip-path: polygon(50% 0, 92% 16%, 84% 70%, 50% 100%, 16% 70%, 8% 16%);
  content: "";
}

/* --------------------------------------------------------------------- cards */

.card {
  position: relative;
  padding: var(--pad);
  margin-bottom: var(--gap);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-raised), white 1%), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card > h2:first-child,
.card > h3:first-child {
  margin-bottom: 0.85rem;
}

.card--flush {
  overflow: hidden;
  padding: 0;
}

.card--action {
  background:
    linear-gradient(145deg, var(--accent-soft), transparent 65%),
    var(--surface-raised);
  border-color: var(--accent-line);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.2), inset 0.22rem 0 0 var(--accent);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  margin: 1.7rem 0 0.7rem;
}

.section-title:first-child {
  margin-top: 0.35rem;
}

.section-title h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.section-title h2::before {
  flex: none;
  width: 0.42rem;
  height: 1.15rem;
  background: var(--accent);
  border-radius: 999px;
  content: "";
}

.section-title__count {
  flex: none;
  display: inline-grid;
  min-width: 1.8rem;
  min-height: 1.8rem;
  padding: 0 0.5rem;
  place-items: center;
  background: var(--surface-strong);
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

/* ------------------------------------------------------------- exercise list */

.exercise-list,
.history-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.exercise-list__item,
.history-list__item {
  border-bottom: 1px solid var(--line);
}

.exercise-list__item:last-child,
.history-list__item:last-child {
  border-bottom: 0;
}

.exercise-list__button {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 4.25rem;
  padding: 0.82rem var(--pad);
  background: transparent;
  color: var(--text);
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, padding 160ms ease;
}

.exercise-list__text {
  flex: 1;
}

.exercise-list__name {
  display: block;
  font-weight: 760;
  letter-spacing: -0.012em;
}

.exercise-list__meta {
  display: block;
  margin-top: 0.18rem;
  color: var(--text-faint);
  font-size: 0.73rem;
}

.exercise-list__chevron {
  flex: none;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  background: var(--surface-strong);
  color: var(--text-faint);
  border-radius: 50%;
  font-size: 1.1rem;
  transition: color 160ms ease, transform 160ms ease;
}

.exercise-list__button:active .exercise-list__chevron {
  color: var(--accent-readable);
  transform: translateX(0.15rem);
}

/* -------------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.13rem 0.48rem;
  background: var(--surface-strong);
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.badge--own,
.badge--accepted,
.badge--proof-submitted {
  color: var(--info);
  border-color: color-mix(in srgb, var(--info), transparent 40%);
}

.badge--proposed,
.badge--open {
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning), transparent 40%);
}

.badge--rejected,
.badge--disputed,
.badge--failed,
.badge--declined,
.badge--expired {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger), transparent 40%);
}

.badge--verified,
.badge--passed {
  color: var(--measured);
  border-color: color-mix(in srgb, var(--measured), transparent 40%);
}

/* --------------------------------------------------------------------- forms */

.field {
  display: block;
  margin-bottom: 1rem;
}

.field__label {
  display: block;
  margin-bottom: 0.38rem;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.035em;
}

.field__control,
.field select,
.field input,
.field textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 0.68rem 0.82rem;
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field__control:hover,
.field select:hover,
.field input:hover,
.field textarea:hover {
  border-color: color-mix(in srgb, var(--line-strong), var(--text) 18%);
}

.field__control:focus,
.field select:focus,
.field input:focus,
.field textarea:focus {
  background: var(--surface-raised);
  border-color: var(--accent);
  box-shadow: var(--ring);
}

.field input[type="checkbox"] {
  width: 1.35rem;
  min-height: 0;
  height: 1.35rem;
  padding: 0;
  accent-color: var(--accent);
}

textarea.field__control {
  min-height: 5rem;
  resize: vertical;
}

.field__hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-faint);
  font-size: 0.73rem;
  line-height: 1.42;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: var(--tap);
}

.checkbox-row input[type="checkbox"] {
  flex: none;
}

.checkbox-row__label {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 650;
}

.picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(5.5rem, 0.35fr);
  gap: var(--gap);
}

.stepper {
  display: grid;
  grid-template-columns: 3.65rem minmax(0, 1fr) 3.65rem;
  gap: 0.55rem;
}

.stepper__button {
  min-height: 3.65rem;
  padding: 0;
  background: var(--surface-strong);
  color: var(--accent-readable);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 1.6rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.stepper__button:active {
  background: var(--accent-soft);
  transform: scale(0.95);
}

.stepper__value {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.3rem;
  background: linear-gradient(145deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
}

.stepper__number {
  color: var(--text);
  font-family: "Arial Narrow", "Roboto Condensed", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.75rem, 9vw, 2.3rem);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stepper__unit {
  margin-top: 0.18rem;
  color: var(--text-faint);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------- buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: var(--tap);
  padding: 0.68rem 1rem;
  background: var(--accent);
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: 0 9px 22px rgba(147, 188, 50, 0.15);
  font-weight: 820;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, border 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

.button--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: none;
}

.button--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger), transparent 45%);
  box-shadow: none;
}

.button--inline {
  width: auto;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.button-row > * {
  flex: 1 1 9rem;
}

/* ------------------------------------------------------------------- notices */

.notice {
  position: relative;
  padding: 0.88rem 0.95rem 0.88rem 1rem;
  margin-bottom: var(--gap);
  background: var(--surface-soft);
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-left: 0.24rem solid var(--info);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  font-size: 0.84rem;
}

.notice--error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger), transparent 55%);
  border-left-color: var(--danger);
}

.notice--success {
  background: var(--measured-soft);
  color: var(--measured);
  border-color: color-mix(in srgb, var(--measured), transparent 55%);
  border-left-color: var(--measured);
}

.notice--warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning), transparent 60%);
  border-left-color: var(--warning);
}

/* --------------------------------------------------------------- empty state */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
  padding: 2.2rem var(--pad);
  color: var(--text-dim);
  text-align: center;
}

.empty-state__icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.9rem;
  color: var(--accent-readable);
}

.empty-state__icon[data-icon="search"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m15.5 15.5 4.5 4.5' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.empty-state__icon[data-icon="offline"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12a10 10 0 0 1 14 0M8 15a6 6 0 0 1 8 0M11 18a2 2 0 0 1 2 0M3 3l18 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.empty-state__icon[data-icon="check"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m8 12 2.5 2.5L16.5 9' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.empty-state__icon[data-icon="lock"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='10' width='14' height='10' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

.empty-state__icon[data-icon="warning"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2.5 20h19L12 3Zm0 6v5m0 3h.01' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.empty-state__icon[data-icon="spark"] {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2 1.8 6.2L20 10l-6.2 1.8L12 18l-1.8-6.2L4 10l6.2-1.8L12 2Z' fill='black'/%3E%3C/svg%3E");
}

.empty-state__title {
  margin-bottom: 0.25rem;
  color: var(--text);
  font-weight: 760;
}

/* ------------------------------------------------------------ rep-max curve */

.curve-wrap,
.lb-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.curve,
.lb {
  width: 100%;
  border-collapse: collapse;
}

.curve th,
.curve td,
.lb th,
.lb td {
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.curve thead th,
.lb thead th {
  padding: 0.7rem 0.75rem;
  background: color-mix(in srgb, var(--surface-strong), transparent 25%);
  color: var(--text-faint);
  font-size: 0.61rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.curve tbody tr:last-child th,
.curve tbody tr:last-child td,
.lb tbody tr:last-child td {
  border-bottom: 0;
}

.curve tr[data-source="measured"] {
  background: linear-gradient(90deg, var(--measured-soft), transparent 75%);
}

.curve__reps {
  width: 1%;
  padding: 0 0.5rem 0 0.85rem;
  color: var(--text-dim);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  white-space: nowrap;
}

.curve__cell {
  padding: 0;
}

.curve__pick {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  width: 100%;
  min-height: 3.6rem;
  padding: 0.55rem 0.85rem;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, padding 140ms ease;
}

.curve__value {
  font-family: "Arial Narrow", "Roboto Condensed", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.42rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
}

.curve__pick--measured .curve__value {
  color: var(--measured);
}

.curve__pick--estimated .curve__value {
  color: var(--estimated);
  font-weight: 700;
}

.curve__pick--unknown {
  color: var(--text-faint);
}

.curve__note {
  color: var(--text-faint);
  font-size: 0.66rem;
  line-height: 1.25;
}

.curve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 0.65rem 0 1rem;
  color: var(--text-dim);
  font-size: 0.7rem;
}

.curve-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, currentColor, transparent 82%);
}

.dot--measured {
  color: var(--measured);
}

.dot--estimated {
  color: var(--estimated);
}

/* ---------------------------------------------------------- history and data */

.history-list__item {
  display: flex;
  align-items: center;
  gap: var(--gap);
  min-height: 4rem;
  padding: 0.7rem var(--pad);
}

.history-list__main {
  flex: 1;
  min-width: 0;
}

.history-list__exercise {
  display: block;
  margin-bottom: 0.1rem;
  color: var(--text-dim);
  font-size: 0.72rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

/* The stored stamp, shown in the shape it is stored in. Monospaced and tabular so
 * the fields line up down the column and a changed digit is visible at a glance. */
.history-list__stamp {
  display: block;
  margin-top: 0.1rem;
  color: var(--text-faint);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.64rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.history-list__weight {
  display: block;
  color: var(--text);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.history-list__date {
  display: block;
  margin-top: 0.12rem;
  color: var(--text-faint);
  font-size: 0.69rem;
}

.data-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 0.35rem 0.8rem;
  margin: 0 0 0.9rem;
  font-size: 0.78rem;
}

.data-list dt {
  color: var(--text-faint);
}

.data-list dd {
  margin: 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

/* ----------------------------------------------------------- tabs / filters */

.tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.25rem;
  margin-bottom: 0.55rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.tab {
  min-height: var(--tap);
  padding: 0.5rem 0.3rem;
  background: transparent;
  color: var(--text-dim);
  border: 0;
  border-radius: 0.62rem;
  font-size: 0.76rem;
  font-weight: 780;
  cursor: pointer;
}

.tab--active {
  background: var(--surface-raised);
  color: var(--accent-readable);
  box-shadow: var(--shadow-sm);
}

.filters {
  margin-bottom: var(--gap);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filters__summary {
  min-height: var(--tap);
  padding: 0.86rem var(--pad);
  color: var(--text);
  font-weight: 780;
  cursor: pointer;
}

.filters__summary::marker {
  color: var(--accent-readable);
}

.filters__body {
  padding: 0 var(--pad) var(--pad);
}

/* -------------------------------------------------------------- leaderboard */

.lb {
  min-width: 34rem;
}

.lb__rank {
  width: 1%;
  padding: 0 0.45rem 0 0.8rem;
  color: var(--accent-readable);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  white-space: nowrap;
}

.lb__user {
  padding: 0;
}

.lb__toggle {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  width: 100%;
  min-height: 3.8rem;
  padding: 0.55rem 0.4rem;
  background: transparent;
  color: var(--text);
  border: 0;
  text-align: left;
  cursor: pointer;
}

.lb__name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.lb__name {
  font-weight: 780;
}

.lb__meta,
.lb__unverified {
  color: var(--text-faint);
  font-size: 0.64rem;
}

.lb__weight,
.lb__metric {
  padding: 0.5rem 0.42rem;
  font-variant-numeric: tabular-nums;
  text-align: right !important;
  white-space: nowrap;
}

.lb__metric {
  padding-right: 0.8rem;
  color: var(--text-dim);
}

.lb__weight-value {
  font-weight: 820;
}

.lb__note {
  display: block;
  max-width: 8rem;
  margin-left: auto;
  color: var(--warning);
  font-size: 0.61rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: normal;
}

.lb__row--me {
  background: var(--accent-soft);
}

.lb__detail-cell {
  padding: 0.9rem;
  background: color-mix(in srgb, var(--surface-strong), transparent 18%);
}

.lb__form {
  margin-top: 0.65rem;
}

.lb__me {
  background:
    radial-gradient(circle at 95% 10%, var(--accent-soft), transparent 9rem),
    var(--surface-raised);
  border-color: var(--accent-line);
}

.lb__me-rank {
  margin-bottom: 0.25rem;
  color: var(--accent-readable);
  font-size: 1.18rem;
  font-weight: 850;
}

/* --------------------------------------------------------------- challenges */

.challenge__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.challenge__title {
  font-size: 1.12rem;
}

.challenge__head .badge {
  white-space: nowrap;
}

.challenge__lift {
  margin-bottom: 0.22rem;
  color: var(--text);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.challenge__deadline {
  margin: 0.65rem 0;
  color: var(--warning);
  font-size: 0.76rem;
  font-weight: 750;
}

.challenge__message {
  margin: 0.8rem 0;
  padding: 0.75rem 0.85rem;
  background: var(--surface-strong);
  color: var(--text-dim);
  border-left: 0.22rem solid var(--accent-line);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-size: 0.84rem;
}

.proof {
  margin-bottom: 0.8rem;
  padding: 0.85rem;
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.proof__domain {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

.proof__domain > * {
  margin-bottom: 0;
}

.proof__host {
  color: var(--text);
  font-weight: 800;
}

.proof__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: 0.76rem;
}

/* ------------------------------------------------------------------ quick log */

/* The exercise offer. A wrapping row rather than a list: eight options as full-width
 * rows would push the reps, the weight and the register button off a 360px screen,
 * and everything that matters here has to be reachable without scrolling. */
.picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.picker__option {
  flex: 1 1 8.5rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-height: var(--tap);
  padding: 0.55rem 0.7rem;
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.picker__option--selected {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  box-shadow: inset 0.18rem 0 0 var(--accent);
}

.picker__name {
  font-size: 0.88rem;
  font-weight: 780;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.picker__reason {
  color: var(--text-faint);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.picker__option--selected .picker__reason {
  color: var(--accent-readable);
}

.picker-search {
  margin-top: 0.85rem;
}

.picker-search__results {
  max-height: 17rem;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.picker-search__results .field__hint {
  padding: 0.8rem var(--pad);
}

.button--large {
  min-height: 3.9rem;
  font-size: 1.02rem;
}

/* ---------------------------------------------------------- confirmation sheet */

/* Anchored to the bottom edge on a phone, where the thumb already is, and centred
 * once there is room for it to be. */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--pad);
}

.sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.sheet__panel {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 27rem;
  padding: var(--pad);
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.sheet__title {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

/* The first line is what is being confirmed, so it is the one sized to be read
 * rather than skimmed. */
.sheet__lead {
  margin: 0 0 0.2rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 820;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.sheet__line {
  margin: 0 0 0.35rem;
  color: var(--text-dim);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.sheet__stamp {
  margin: 0.55rem 0 1rem;
  padding: 0.55rem 0.6rem;
  background: var(--surface-strong);
  color: var(--measured);
  border: 1px dashed color-mix(in srgb, var(--measured), transparent 55%);
  border-radius: var(--radius-xs);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  text-align: center;
}

/* -------------------------------------------------------------- toast / boot */

.toast-stack {
  position: fixed;
  right: 0;
  bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  left: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0 var(--pad);
  pointer-events: none;
}

.toast {
  width: 100%;
  max-width: 27rem;
  padding: 0.8rem 0.95rem;
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
}

.toast--record,
.toast--success {
  color: var(--measured);
  border-color: color-mix(in srgb, var(--measured), transparent 45%);
}

.toast--error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger), transparent 45%);
}

.boot-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 100dvh;
  color: var(--text-dim);
}

.boot-mark {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  background: var(--accent);
  color: var(--ink);
  border-radius: 1.2rem;
  box-shadow: 0 16px 40px rgba(153, 198, 45, 0.2);
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.boot-text {
  font-size: 0.8rem;
}

/* ---------------------------------------------------------------- utilities */

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

pre,
code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.85em;
}

pre {
  padding: 0.75rem;
  overflow-wrap: anywhere;
  background: var(--surface-strong);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
}

/* ----------------------------------------------------------- hover-capable */

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 12px 30px rgba(147, 188, 50, 0.22);
    transform: translateY(-1px);
  }

  .button--ghost:hover {
    background: var(--surface-strong);
    color: var(--accent-readable);
    border-color: var(--accent-line);
    box-shadow: none;
  }

  .button--danger:hover {
    background: color-mix(in srgb, var(--danger-soft), var(--danger) 6%);
    border-color: var(--danger);
    box-shadow: none;
  }

  .exercise-list__button:hover,
  .curve__pick:hover,
  .lb__toggle:hover {
    background: var(--surface-strong);
  }

  .picker__option:hover {
    border-color: var(--accent-line);
  }

  .exercise-list__button:hover .exercise-list__chevron {
    color: var(--accent-readable);
    transform: translateX(0.15rem);
  }

  .app-nav__item:hover:not([aria-current="page"]) {
    background: var(--surface-strong);
    color: var(--text);
  }
}

/* -------------------------------------------------------------- small phone */

@media (max-width: 359px) {
  :root {
    --pad: 0.85rem;
  }

  .app-nav {
    padding-right: 0.2rem;
    padding-left: 0.2rem;
  }

  .app-nav__label {
    font-size: 0.6rem;
  }

  .picker-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .stepper {
    grid-template-columns: 3.25rem minmax(0, 1fr) 3.25rem;
  }

  pre {
    padding: 0.5rem;
    font-size: 0.73rem;
  }
}

/* --------------------------------------------------------------- wide layout */

@media (min-width: 800px) {
  .app-shell:not(.app-shell--auth) {
    display: grid;
    grid-template-areas:
      "offline offline"
      "nav header"
      "nav main";
    grid-template-columns: 16.5rem minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .offline-banner {
    grid-area: offline;
  }

  .app-header {
    grid-area: header;
    min-height: 5.2rem;
    padding: 1rem clamp(1.5rem, 4vw, 3rem);
  }

  .app-header__eyebrow {
    display: block;
  }

  .app-header__title {
    font-size: 1.72rem;
  }

  .app-main {
    grid-area: main;
    max-width: 68rem;
    padding: 2rem clamp(1.5rem, 4vw, 3rem) 3rem;
  }

  .sheet {
    align-items: center;
  }

  .app-nav {
    position: sticky;
    top: 0;
    grid-area: nav;
    align-self: start;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    padding: 1.2rem 0.9rem;
    background:
      radial-gradient(circle at 30% 10%, var(--accent-soft), transparent 12rem),
      color-mix(in srgb, var(--surface) 95%, transparent);
    border-top: 0;
    border-right: 1px solid var(--line);
    box-shadow: none;
  }

  .app-nav__brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.25rem 0.35rem 1.35rem;
    color: var(--text);
    text-decoration: none;
  }

  .app-nav__logo {
    flex: none;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.82rem;
    box-shadow: var(--shadow-sm);
  }

  .app-nav__brand-copy {
    display: flex;
    flex-direction: column;
  }

  .app-nav__brand-copy strong {
    font-size: 0.9rem;
    letter-spacing: -0.02em;
  }

  .app-nav__brand-copy span {
    color: var(--text-faint);
    font-size: 0.64rem;
  }

  .app-nav__items {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
  }

  .app-nav__item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.75rem;
    min-height: 3.2rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
  }

  .app-nav__item[aria-current="page"]::after {
    position: absolute;
    top: 0.65rem;
    right: 0.35rem;
    bottom: 0.65rem;
    width: 0.2rem;
    background: var(--accent);
    border-radius: 999px;
    content: "";
  }

  .app-nav__icon {
    width: 1.3rem;
    height: 1.3rem;
  }

  .app-nav__label {
    font-size: 0.78rem;
  }

  .app-nav__badge {
    top: 0.35rem;
    left: 1.7rem;
  }

  .toast-stack {
    right: 1.5rem;
    bottom: 1.5rem;
    left: auto;
    align-items: flex-end;
    width: min(28rem, calc(100% - 18rem));
  }

  .auth-card {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  }

  .auth-card__visual {
    min-height: 37rem;
  }

  .auth-card__brand {
    padding: 1.8rem;
  }

  .auth-card__art {
    top: 56%;
    right: 10%;
    left: 10%;
  }

  .auth-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .app-shell[data-route="profile"] .app-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: var(--gap);
  }

  .app-shell[data-route="profile"] .app-main > * {
    margin-bottom: 0;
  }
}

@media (min-width: 1180px) {
  .app-shell[data-route="exercise"] .app-main {
    max-width: 76rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
