/* ==========================================================================
   Calisthenics Tool — design tokens & base components
   Source of truth: Calisteniapp v26.5.1 (fonts/SVGs extracted from APK,
   colors pixel-sampled from screenshots/). See docs/DESIGN_SYSTEM.md.
   ========================================================================== */

/* ---- Fonts (extracted from APK, app/fonts/) ---- */
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-ExtraLight.ttf'); font-weight: 200; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-Light.ttf');      font-weight: 300; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-Regular.ttf');    font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-Medium.ttf');     font-weight: 500; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-SemiBold.ttf');   font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-Bold.ttf');       font-weight: 700; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/Manrope-ExtraBold.ttf');  font-weight: 800; font-display: swap; }
@font-face { font-family: 'ClashGrotesk'; src: url('fonts/ClashGrotesk-Bold.ttf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'ClashDisplay'; src: url('fonts/ClashDisplay-Bold.otf'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Syne'; src: url('fonts/Syne-Medium.ttf');    font-weight: 500; font-display: swap; }
@font-face { font-family: 'Syne'; src: url('fonts/Syne-Bold.ttf');      font-weight: 700; font-display: swap; }
@font-face { font-family: 'Syne'; src: url('fonts/Syne-ExtraBold.ttf'); font-weight: 800; font-display: swap; }

:root {
  /* ---- Surfaces (sampled: cards #111 on #000, rows #181818, pills #232323, chips #26252A) ---- */
  --bg: #000000;
  --surface-1: #111111;   /* cards, sheets, equipment rows */
  --surface-2: #181818;   /* set-table row blocks, inputs   */
  --surface-3: #232323;   /* tonal buttons (+ Notes, Add)   */
  --surface-chip: #26252A;/* gray chips (CLASSIC)           */
  --track: #141414;       /* skill-bar track on black       */
  --nav-bg: #050505;      /* floating bottom nav            */

  /* ---- Accent (brand SVGs: #FD3E00 primary; gradient family FF6D00→FCA13B) ---- */
  --accent: #FD3E00;
  --accent-bright: #FF6D00;
  --accent-soft: #FCA13B;
  --accent-grad: linear-gradient(90deg, #FD3E00, #FF8A3D);
  --accent-tonal: rgba(253, 62, 0, 0.14);  /* active pill-tab fill */
  --accent-glow: rgba(253, 62, 0, 0.35);
  --pink: #EE2269;                          /* rare brand secondary */

  /* ---- Text (sampled: #F5F5F5 primary, #8B8A8F secondary, #6A6A6A tertiary) ---- */
  --text-1: #F5F5F5;
  --text-2: #8B8A8F;
  --text-3: #6A6A6A;
  --text-mid: #B1B1B1;

  /* ---- Borders ---- */
  --border-subtle: #222222;  /* nav container, card seams        */
  --border-muted: #333333;   /* inactive set-table input borders */

  /* ---- Radii (measured off screenshots @3x) ---- */
  --radius-card: 24px;
  --radius-thumb: 20px;
  --radius-input: 14px;
  --radius-sheet: 28px;
  --radius-pill: 999px;

  /* ---- Spacing ---- */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --screen-pad: 14px;   /* screen edge → card edge   */
  --card-pad: 18px;     /* card edge → content       */

  /* ---- Type ---- */
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-display: 'ClashGrotesk', 'Manrope', system-ui, sans-serif;
}

/* ---- Base ---- */
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }

/* ---- Type scale ---- */
.t-display   { font-family: var(--font-display); font-weight: 700; font-size: 34px; line-height: 1.15; letter-spacing: 0; }          /* screen titles: "Shoulder" */
.t-title     { font-family: var(--font-display); font-weight: 700; font-size: 26px; line-height: 1.2; }                              /* card titles: "Climbing"   */
.t-section   { font-family: var(--font-display); font-weight: 700; font-size: 22px; }                                                /* "Journal", "Composition"  */
.t-row       { font-weight: 700; font-size: 21px; line-height: 1.25; }                                                               /* exercise row names        */
.t-body      { font-weight: 500; font-size: 16px; }
.t-meta      { font-weight: 500; font-size: 15px; color: var(--text-2); }
.t-caption   { font-weight: 600; font-size: 13px; color: var(--text-3); }
.t-reps-hero { font-family: var(--font-display); font-weight: 700; font-size: 44px; color: var(--accent); line-height: 1; }          /* player "15 reps"          */
.t-upper     { text-transform: uppercase; letter-spacing: 0.08em; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
       border: 0; cursor: pointer; font-family: var(--font-body); text-decoration: none; }
.btn-cta {   /* START SESSION — solid accent, full-width pill */
  width: 100%; padding: 17px 24px; border-radius: var(--radius-pill);
  background: var(--accent); color: #fff;
  font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: 0.08em;
}
.btn-tonal { /* + Notes, Add — dark surface pill */
  padding: 13px 22px; border-radius: var(--radius-pill);
  background: var(--surface-3); color: var(--text-1);
  font-weight: 700; font-size: 16px;
}
.btn-wide { width: 100%; }
.icon-btn-scrim { /* floating circular button over video */
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(20, 20, 20, 0.65); backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; border: 0;
}

/* ---- Chips ---- */
.chip { display: inline-flex; align-items: center; gap: 6px;
        padding: 7px 14px; border-radius: var(--radius-pill);
        font-weight: 700; font-size: 14px; }
.chip-solid { background: var(--accent); color: #fff; }              /* "On each side"  */
.chip-gray  { background: var(--surface-chip); color: var(--text-1);
              text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; } /* "CLASSIC" */

/* ---- Pill tab selector (Steps / Skills / Muscles / Equipment) ---- */
.pill-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pill-tabs::-webkit-scrollbar { display: none; }
.pill-tab { padding: 10px 18px; border-radius: var(--radius-pill); white-space: nowrap;
            font-weight: 700; font-size: 17px; color: var(--text-1);
            background: transparent; border: 1px solid transparent; }
.pill-tab.active { color: var(--accent); background: var(--accent-tonal);
                   border-color: rgba(253, 62, 0, 0.35); }

/* ---- Underline tabs (Activity / My sessions / Achievements) ---- */
.top-tabs { display: flex; }
.top-tab { flex: 1; text-align: center; padding: 14px 0 12px;
           font-weight: 700; font-size: 17px; color: var(--text-2);
           border-bottom: 3px solid transparent; }
.top-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- Cards & rows ---- */
.card { background: var(--surface-1); border-radius: var(--radius-card); padding: var(--card-pad); }
.list-row { display: flex; align-items: center; gap: 16px; }
.thumb { width: 84px; height: 84px; border-radius: var(--radius-thumb);
         object-fit: cover; background: var(--surface-2); flex: none; }
.row-chevron { margin-left: auto; color: var(--text-2); flex: none; }

/* ---- Meta row (icon + text + info) ---- */
.meta-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; font-size: 17px; }
.meta-row .mi { color: var(--accent); flex: none; width: 24px; }
.meta-row .info { margin-left: auto; color: var(--text-3); }

/* ---- Steps list ---- */
.step { display: flex; gap: 14px; margin: 18px 0; font-size: 19px; font-weight: 500; }
.step::before { content: ''; flex: none; width: 22px; height: 5px; border-radius: 3px;
                background: var(--accent); margin-top: 11px; }

/* ---- Skill bars ---- */
.skill { margin: 16px 0; }
.skill-head { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; margin-bottom: 8px; }
.skill-track { height: 9px; border-radius: 5px; background: var(--track); overflow: hidden; }
.skill-fill { height: 100%; border-radius: 5px; background: var(--accent-grad);
              box-shadow: 0 0 10px var(--accent-glow); }

/* ---- Set table (Journal) ---- */
.set-grid { display: grid; grid-template-columns: 44px 1fr 1fr 1fr; gap: 12px; align-items: center; }
.set-head { font-size: 15px; font-weight: 600; color: var(--text-mid); text-align: center; }
.set-input { height: 58px; border-radius: var(--radius-input); background: transparent;
             border: 1.5px solid var(--border-muted); color: var(--text-1);
             font: 700 20px var(--font-body); text-align: center; width: 100%; }
.set-input:disabled { color: var(--text-3); }
.set-row.active .set-input { border-color: var(--accent); }
.set-circle { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border-muted);
              display: flex; align-items: center; justify-content: center;
              font-weight: 700; font-size: 16px; color: var(--text-mid); margin: 0 auto; }
.set-row.active .set-circle { border-color: var(--accent); color: var(--accent); }
.set-circle.done { border-color: var(--accent); color: var(--accent); }
.block-accent { border-left: 4px solid var(--accent); }  /* active exercise marker in Journal */

/* ---- Segmented progress (player top) ---- */
.seg-progress { display: flex; gap: 6px; }
.seg { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.25); }
.seg.active { background: #fff; height: 7px; margin-top: -1px; }

/* ---- Difficulty stars ---- */
.difficulty { display: inline-flex; align-items: center; gap: 8px;
              color: var(--accent); font-weight: 600; font-size: 17px; }
.difficulty .stars { display: inline-flex; gap: 4px; }
.difficulty .star { width: 18px; height: 18px; }
.difficulty .star.empty { opacity: 0.35; filter: grayscale(1); }

/* ---- Bottom sheet ---- */
.sheet { background: var(--surface-1); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; }
.sheet-grabber { width: 56px; height: 4px; border-radius: 2px; background: #3A3A3A; margin: 10px auto 0; }

/* ---- Floating bottom nav (TODAY / EXPLORE / COMMUNITY / PROFILE) ---- */
.bottom-nav { display: flex; background: var(--nav-bg); border: 1px solid var(--border-subtle);
              border-radius: 32px; padding: 10px 6px;
              position: fixed; left: 12px; right: 12px; bottom: 12px; }
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px;
            color: var(--text-2); text-decoration: none;
            font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.nav-item.active { color: var(--accent); }
.nav-item svg { width: 24px; height: 24px; }

/* ---- Profile top wash (warm gradient over black) ---- */
.top-wash { background: linear-gradient(180deg, rgba(253, 62, 0, 0.22), rgba(253, 62, 0, 0.0) 70%); }

/* ---- Search field (Jefit pattern, reskinned) ---- */
.search-field { display: flex; align-items: center; gap: 12px;
                background: var(--surface-2); border-radius: 16px; padding: 15px 18px;
                color: var(--text-3); font-size: 17px; }

/* ---- Utility ---- */
.screen { max-width: 430px; margin: 0 auto; padding: 0 var(--screen-pad); }
.muted { color: var(--text-2); }
.divider { height: 1px; background: var(--border-subtle); }
