:root {
  --bg: #050505;
  --panel: #0c0c0c;
  --panel-2: #111111;
  --panel-3: #151515;
  --line: #222222;
  --line-soft: #181818;
  --text: #f3f3f3;
  --muted: #8a8a8a;
  --subtle: #5e5e5e;
  --cyan: #22d3ee;
  --green: #34d399;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #eab308;
  --purple: #a78bfa;
  --shadow: 0 20px 60px rgba(0,0,0,.45);
  --radius: 18px;
  --radius-sm: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: "Rajdhani", system-ui, sans-serif; }
button, input, select { font: inherit; }
.app {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(239,68,68,.10), transparent 30%),
    radial-gradient(circle at top right, rgba(34,211,238,.10), transparent 28%),
    linear-gradient(180deg, #080808 0%, #050505 100%);
}
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}
.hero {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.00));
  border-radius: 26px;
  padding: 32px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,.25), rgba(239,68,68,.15), transparent);
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34,211,238,.18), transparent 65%);
  pointer-events: none;
}
/* ── compact header bar ── */
.header-bar {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.005));
  border-radius: 16px;
  padding: 14px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.header-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.header-logo {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .03em;
  color: #e5e5e5;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-iq {
  color: var(--cyan);
  font-weight: 700;
}
.header-divider {
  width: 1px;
  height: 22px;
  background: var(--line);
  flex-shrink: 0;
}
.header-lifter-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  font-family: "Barlow Condensed", system-ui, sans-serif;
  letter-spacing: .03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.header-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.header-actions .btn svg {
  vertical-align: -2px;
  margin-right: 3px;
  flex-shrink: 0;
}
.btn-sm {
  padding: 8px 12px;
  font-size: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: 12px;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  margin-bottom: 10px;
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(34,211,238,.8);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr .95fr;
  gap: 18px;
  align-items: stretch;
}
h1 {
  margin: 0 0 10px;
  font-family: "Anton", Impact, sans-serif;
  letter-spacing: .02em;
  font-size: clamp(34px, 6vw, 62px);
  line-height: .95;
  font-weight: 400;
  text-transform: uppercase;
}
.lede {
  max-width: 760px;
  color: #d0d0d0;
  font-size: 19px;
  line-height: 1.35;
  margin-bottom: 0;
}
.hero-copy ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}
/* ── hero feature bullets ── */
.hero-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}
.hero-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.hero-feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
}
.hero-feature div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-feature strong {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
}
.hero-feature span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}
.upload-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100%;
}
.upload-zone {
  border: 1.5px dashed #2d2d2d;
  border-radius: 18px;
  padding: 22px;
  background: rgba(255,255,255,.015);
}
.upload-zone strong {
  display: block;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 20px;
  margin-bottom: 4px;
}
.upload-zone p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  border: 1px solid #2a2a2a;
  background: #111;
  color: #fff;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 14px;
}
.btn:hover { transform: translateY(-1px); border-color: #3d3d3d; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.btn-primary { background: linear-gradient(180deg, #1d2326, #101518); border-color: #22404a; color: var(--cyan); }
.btn-primary:hover { border-color: #2d5a66; box-shadow: 0 4px 16px rgba(34,211,238,.12); }
.btn-accent { background: linear-gradient(180deg, #1a231d, #0e1510); border-color: #264432; color: var(--green); }
.btn-accent:hover { border-color: #307848; box-shadow: 0 4px 16px rgba(52,211,153,.12); }
.btn-ghost { background: transparent; color: #bdbdbd; }
.btn-ghost:hover { color: #fff; }
.file-name {
  color: #d7d7d7;
  font-size: 14px;
  word-break: break-word;
}
.support-note {
  font-size: 13px;
  color: var(--subtle);
  line-height: 1.5;
}
.toolbar {
  display: none;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar.active { display: flex; }
.panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,.005));
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  pointer-events: none;
}
.toolbar .panel {
  flex: 1 1 220px;
  min-width: 220px;
  padding: 14px;
  box-shadow: none;
}
.field-label {
  display: block;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  color: var(--muted);
  margin-bottom: 7px;
  font-weight: 700;
}
.field-control, .field-control select {
  width: 100%;
}
select {
  width: 100%;
  background: #0c0c0c;
  color: #fff;
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  padding: 10px 32px 10px 12px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color .15s;
}
select:focus {
  border-color: var(--cyan);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.008));
  padding: 16px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
}
.stat-card:hover {
  border-color: #2a2a2a;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  transition: .2s ease;
}
.stat-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  margin-bottom: 8px;
}
.stat-value {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  font-weight: 700;
  margin-bottom: 6px;
}
.stat-sub {
  font-size: 14px;
  color: var(--muted);
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 18px;
}
.tab-btn {
  border: 1px solid #262626;
  background: #0c0c0c;
  color: #ccc;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  cursor: pointer;
}
.tab-btn.active {
  color: #fff;
  border-color: #3a3a3a;
  background: linear-gradient(180deg, #181818, #101010);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 2px 8px rgba(0,0,0,.3);
}
.tab-btn:not(.active):hover {
  border-color: #333;
  color: #e0e0e0;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.section-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  margin-bottom: 16px;
}
.section-grid.equal {
  grid-template-columns: 1fr 1fr;
}
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-title h2, .section-title h3 {
  margin: 0;
  font-size: 24px;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
}
.section-title h3 {
  font-size: 20px;
  color: #ddd;
}
.section-title .meta {
  color: var(--subtle);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: "Barlow Condensed", system-ui, sans-serif;
}
.chart-wrap {
  min-height: 340px;
  position: relative;
}
.scorecards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
.mini-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.02);
  padding: 14px;
  position: relative;
  transition: background .2s, border-color .2s;
}
.mini-card:hover {
  border-color: #2a2a2a;
  background: rgba(255,255,255,.035);
}
.mini-card[data-accent="red"] { border-left: 3px solid var(--red); }
.mini-card[data-accent="cyan"] { border-left: 3px solid var(--cyan); }
.mini-card[data-accent="green"] { border-left: 3px solid var(--green); }
.mini-card[data-accent="yellow"] { border-left: 3px solid var(--yellow); }
.mini-label {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  margin-bottom: 10px;
}
.mini-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.mini-sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}
.insight-box {
  border: 1px solid #2a312d;
  background: linear-gradient(180deg, rgba(52,211,153,.08), rgba(52,211,153,.02));
  border-radius: 18px;
  padding: 16px;
  margin-top: 14px;
}
.insight-box h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: var(--green);
  font-weight: 700;
}
.insight-box p {
  margin: 0;
  color: #c5e8d6;
  line-height: 1.55;
  font-size: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.015);
}
th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #1d1d1d;
  font-size: 14px;
  white-space: nowrap;
}
th {
  color: #cfcfcf;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  background: #111;
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 2px solid #252525;
}
tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td {
  background: rgba(255,255,255,.012);
}
tbody tr:hover td {
  background: rgba(255,255,255,.03);
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #1a1a1a, #131313);
  border: 1px solid #2a2a2a;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  color: var(--cyan);
}
.footer-note {
  margin-top: 18px;
  color: var(--subtle);
  font-size: 13px;
  text-align: center;
  line-height: 1.5;
}
/* ── feature preview grid (landing) ── */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.preview-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.005));
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.preview-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
}
.preview-card:hover {
  border-color: #2a2a2a;
  transform: translateY(-2px);
}
.preview-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.preview-card strong {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 17px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
}
.preview-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
/* ── lift contribution profile ── */
.contribution-wrap {
  min-height: 200px;
}
.contrib-bar-track {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  margin-bottom: 16px;
  border: 1px solid var(--line);
}
.contrib-bar-seg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  letter-spacing: .06em;
  color: #fff;
  min-width: 36px;
  transition: width .4s ease;
}
.contrib-bar-seg.squat { background: rgba(239,68,68,.75); }
.contrib-bar-seg.bench { background: rgba(34,211,238,.65); }
.contrib-bar-seg.deadlift { background: rgba(52,211,153,.65); }
.contrib-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.contrib-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.contrib-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.contrib-dot.squat { background: var(--red); }
.contrib-dot.bench { background: var(--cyan); }
.contrib-dot.deadlift { background: var(--green); }
.contrib-label {
  font-size: 13px;
  color: var(--muted);
}
.contrib-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.contrib-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.contrib-detail {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,.015);
  text-align: center;
}
.contrib-detail .stat-label { margin-bottom: 6px; }
.contrib-detail .stat-value { font-size: 22px; margin-bottom: 4px; }
.contrib-detail .stat-sub { font-size: 12px; }

/* ── lifter type classification ── */
.lifter-type-box {
  border: 1px solid #2a2a2a;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}
.lifter-type-box.balanced {
  border-color: #2a2d2a;
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.008));
}
.lifter-type-label {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  margin-bottom: 10px;
}
.lifter-type-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.lifter-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  background: rgba(255,255,255,.03);
  border: 1.5px solid;
  box-shadow: 0 0 12px rgba(var(--tag-glow-rgb, 255,255,255), .15);
}
.lifter-type-tag.balanced {
  border-color: #3a3a3a;
  color: var(--muted);
  box-shadow: none;
}
.lifter-type-explanation {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  max-width: 360px;
  margin: 0 auto;
}

/* ── most improved lift card ── */
/* ── best class highlight ── */
.best-class-highlight {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(34,211,238,.08);
}

.improved-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.improved-highlight {
  border: 1px solid #2a312d;
  background: linear-gradient(180deg, rgba(52,211,153,.08), rgba(52,211,153,.02));
  border-radius: 18px;
  padding: 20px;
  text-align: center;
}
.improved-lift-name {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  margin-bottom: 8px;
}
.improved-gain {
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
  color: var(--green);
}
.improved-detail {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}
.improved-others {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── alt input buttons ── */
.alt-inputs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.alt-inputs .btn {
  font-size: 12px;
  padding: 8px 12px;
}
.upload-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
.btn-compare {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(180deg, #141a22, #0c1118);
  border: 1px solid #1e3040;
  color: var(--cyan);
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 14px;
}
.btn-compare:hover {
  border-color: #2d5a66;
  box-shadow: 0 4px 20px rgba(34,211,238,.12);
  transform: translateY(-1px);
}

/* ── modal system ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.modal.modal-wide {
  max-width: 600px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: .15s ease;
}
.modal-close:hover {
  background: rgba(255,255,255,.05);
  color: #fff;
}
.modal-body {
  padding: 20px;
}
.modal-desc {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ── OpenPowerlifting import ── */
.opl-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.opl-input {
  flex: 1;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font-size: 14px;
}
.opl-input:focus {
  outline: none;
  border-color: var(--cyan);
}
.opl-input::placeholder {
  color: var(--subtle);
}
.opl-example {
  font-size: 12px;
  color: var(--subtle);
  margin-bottom: 16px;
}
.opl-status {
  font-size: 13px;
  line-height: 1.5;
}
.opl-loading {
  color: var(--cyan);
}
.opl-error {
  color: var(--red);
}
.opl-error a {
  color: var(--cyan);
}

/* ── manual meet form ── */
.manual-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field input,
.form-field select {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-size: 14px;
}
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--cyan);
}
.form-field input::placeholder {
  color: var(--subtle);
}
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ── compare view ── */
.cmp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.cmp-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid;
  background: rgba(255,255,255,.03);
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 13px;
  transition: background .15s, border-color .15s;
}
.cmp-badge-add {
  border-style: dashed;
  border-color: #333;
  color: var(--cyan);
  cursor: pointer;
  gap: 6px;
}
.cmp-badge-add:hover, .cmp-badge-add.active {
  border-color: var(--cyan);
  background: rgba(34,211,238,.06);
}
.cmp-add-icon {
  font-size: 16px;
  line-height: 1;
  font-weight: 400;
}
.cmp-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cmp-badge-name {
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmp-badge-link,
.cmp-name-link {
  cursor: pointer;
  border-bottom: 1px dashed rgba(255,255,255,.25);
  transition: border-color .15s, opacity .15s;
}
.cmp-badge-link:hover,
.cmp-name-link:hover {
  border-bottom-color: currentColor;
  opacity: .8;
}
.cmp-badge-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  transition: color .15s;
}
.cmp-badge-remove:hover { color: var(--red); }
.cmp-add-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.015);
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmp-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.cmp-add-row .opl-input {
  max-width: 340px;
  flex: 1;
}
.cmp-add-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cmp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cmp-count {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  color: var(--muted);
  font-weight: 700;
}
.cmp-empty-msg {
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed #2a2a2a;
  border-radius: 12px;
  background: rgba(255,255,255,.01);
}
.cmp-table { width: 100%; }
.cmp-table th, .cmp-table td { font-size: 13px; padding: 10px 12px; }
.cmp-row-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.cmp-best {
  color: var(--green);
  font-weight: 700;
}
.cmp-rate-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid #1e3a2a;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(52,211,153,.06), rgba(52,211,153,.01));
  margin-bottom: 14px;
}
.cmp-rate-callout-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  color: var(--muted);
}
.cmp-rate-callout-name {
  font-size: 16px;
  font-weight: 700;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.cmp-rate-callout-value {
  font-size: 14px;
  color: var(--green);
  font-weight: 600;
}
.cmp-chart-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.cmp-metric-btn {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .15s ease;
}
.cmp-metric-btn:hover {
  border-color: rgba(255,255,255,.3);
  color: #e5e5e5;
}
.cmp-metric-btn.active {
  background: rgba(255,255,255,.06);
}

.cmp-contrib-item {
  margin-bottom: 14px;
}
.cmp-contrib-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.cmp-contrib-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-family: "Barlow Condensed", system-ui, sans-serif;
}
.cmp-spec-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.cmp-spec-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-family: "Barlow Condensed", system-ui, sans-serif;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid;
  background: rgba(255,255,255,.03);
  line-height: 1.3;
}
.cmp-spec-tag.balanced {
  color: var(--text-secondary);
  border-color: var(--text-secondary);
}

/* ── inline meet add row ── */
.meet-add-row td {
  padding: 4px 3px;
  vertical-align: middle;
}
.meet-input {
  width: 100%;
  min-width: 50px;
  padding: 6px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.05);
  color: #e5e5e5;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.meet-input:focus {
  border-color: var(--cyan);
}
.meet-input[type="date"] { min-width: 110px; }
.meet-input[type="number"] { min-width: 54px; }
select.meet-input { min-width: 65px; cursor: pointer; }
.meet-add-actions {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}
.meet-add-row {
  background: rgba(34,211,238,.04) !important;
  border-bottom: 1px solid rgba(34,211,238,.15);
}

/* ── library modal ── */
.lib-section { }
.lib-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.lib-section-header h4 {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #e5e5e5;
  margin: 0;
}
.lib-section-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 2px 8px;
}
.lib-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  margin-bottom: 6px;
  background: rgba(255,255,255,.02);
  transition: background .12s;
  gap: 10px;
}
.lib-row:hover {
  background: rgba(255,255,255,.05);
}
.lib-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.lib-row-name {
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #e5e5e5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lib-row-meta {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lib-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.lib-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 24px 12px;
  font-size: 13px;
}
.lib-save-session {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}
.lib-save-session .opl-input {
  flex: 1;
  min-width: 0;
}
.cmp-lib-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.cmp-lib-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: "Barlow Condensed", system-ui, sans-serif;
  margin-right: 2px;
}
.cmp-lib-pick {
  font-size: 12px !important;
  padding: 4px 10px !important;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  max-width: 360px;
  background: #111;
  border: 1px solid #282828;
  color: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 9999;
}
.toast.show { display: block; }
@media (max-width: 1100px) {
  .hero-grid, .section-grid, .section-grid.equal, .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .preview-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .shell { padding: 12px; }
  .hero { padding: 16px; border-radius: 20px; }
  .hero-grid, .section-grid, .section-grid.equal, .stats-grid, .scorecards {
    grid-template-columns: 1fr;
  }
  h1 { font-size: clamp(28px, 8vw, 44px); margin-bottom: 8px; }
  .lede { font-size: 16px; }
  .hero-copy ul { font-size: 14px; margin-top: 12px; }
  .upload-card { border-radius: 16px; padding: 14px; }
  .upload-zone { padding: 16px; border-radius: 14px; }
  .upload-zone strong { font-size: 17px; }
  .upload-zone p { font-size: 14px; }
  .chart-wrap { min-height: 260px; }
  .tabs { gap: 6px; }
  .tab-btn {
    flex: 1 1 calc(33% - 6px);
    text-align: center;
    padding: 10px 12px;
    font-size: 13px;
  }
  .panel { padding: 14px; border-radius: 14px; }
  .stat-card { padding: 14px; border-radius: 14px; }
  .stat-value { font-size: clamp(24px, 5vw, 32px); }
  .stat-sub { font-size: 13px; }
  .mini-card { padding: 12px; border-radius: 12px; }
  .mini-value { font-size: 24px; }
  .section-title h2, .section-title h3 { font-size: 20px; }
  .section-title .meta { font-size: 11px; }
  .section-title { flex-direction: column; gap: 4px; }
  .table-shell { border-radius: 12px; -webkit-overflow-scrolling: touch; }
  th, td { padding: 10px 12px; font-size: 13px; }
  .contrib-detail-grid { grid-template-columns: 1fr; }
  .improved-others { grid-template-columns: 1fr; }
  .footer-note { font-size: 12px; }
  .toolbar .panel { min-width: 0; flex: 1 1 calc(50% - 6px); }
  .preview-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .preview-card { padding: 16px 14px; border-radius: 14px; }
  .preview-card-icon { width: 38px; height: 38px; }
  .preview-card strong { font-size: 15px; }
  .hero-features { gap: 10px; margin-top: 18px; }
  .hero-feature-icon { width: 32px; height: 32px; border-radius: 8px; }
  .hero-feature strong { font-size: 14px; }
  .hero-feature span { font-size: 12px; }
  /* modals */
  .modal-overlay { padding: 12px; }
  .modal { border-radius: 16px; }
  .modal-header { padding: 14px 16px; }
  .modal-header h3 { font-size: 18px; }
  .modal-body { padding: 16px; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .opl-input-row { flex-direction: column; }
  /* header bar */
  .header-bar { padding: 10px 12px; border-radius: 14px; }
  .header-bar-inner { gap: 10px; }
  .header-logo { font-size: 17px; }
  .header-divider { height: 18px; }
  .header-lifter-name { font-size: 14px; }
  .header-actions { width: 100%; justify-content: flex-start; }
  .header-actions .btn svg { display: none; }
  /* compare mobile */
  .cmp-badges { gap: 6px; }
  .cmp-badge { padding: 7px 10px; font-size: 12px; }
  .cmp-badge-name { max-width: 120px; }
  .cmp-add-row { flex-direction: column; }
  .cmp-add-row .opl-input { max-width: 100%; width: 100%; }
  .cmp-add-actions { flex-direction: column; }
  .cmp-add-actions .btn { width: 100%; text-align: center; }
  .cmp-rate-callout { flex-direction: column; gap: 6px; text-align: center; }
  /* library mobile */
  .lib-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .lib-row-actions { width: 100%; }
  .lib-save-session { flex-direction: column; }
}
@media (max-width: 480px) {
  .shell { padding: 8px; }
  .hero { padding: 14px; border-radius: 16px; }
  .button-row { flex-direction: column; }
  .button-row .btn { width: 100%; text-align: center; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 12px; }
  .toolbar .panel { flex: 1 1 100%; }
  .chart-wrap { min-height: 220px; }
  .tab-btn { flex: 1 1 calc(50% - 4px); padding: 10px 8px; font-size: 12px; }
  /* modals */
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn { width: 100%; }
  .alt-inputs { flex-direction: column; }
  .alt-inputs .btn { width: 100%; text-align: center; }
  .preview-grid { grid-template-columns: 1fr; }
  .hero-features { display: none; }
  /* compare touch */
  .cmp-badge { padding: 9px 12px; min-height: 40px; }
  .cmp-badge-remove { min-width: 24px; min-height: 24px; font-size: 18px; }
  .cmp-badge-add { min-height: 40px; }
}
