/* ============================================================
   FORGE DESIGN SYSTEM v1.0
   بدنساز هوشمند — Complete Frontend Rebuild

   Philosophy: Dark-first athletic energy. Lime + Pink duo
   for high contrast and conversion. Bold geometric typography.
   Inspired by: Strava, Nike Training, Whoop, Linear.
   ============================================================ */

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand — Athletic energy duo */
  --brand: #C6FF3D;             /* Electric lime */
  --brand-strong: #A8E020;
  --brand-soft: rgba(198, 255, 61, 0.12);
  --brand-softer: rgba(198, 255, 61, 0.06);
  --brand-glow: rgba(198, 255, 61, 0.3);
  --brand-contrast: #0E1116;

  --accent: #FF3D6E;            /* Hot pink */
  --accent-strong: #E62E5C;
  --accent-soft: rgba(255, 61, 110, 0.12);
  --accent-glow: rgba(255, 61, 110, 0.3);

  /* Day-type colors (preserved but energized) */
  --push: #FF3D6E;              /* Hot pink for push */
  --pull: #4DA8FF;              /* Bright blue for pull */
  --legs: #C6FF3D;              /* Lime for legs */
  --core: #B14DFF;              /* Purple for core */
  --rest: #6B7280;              /* Gray for rest */

  /* Status */
  --success: #34D399;
  --success-soft: rgba(52, 211, 153, 0.15);
  --warn: #FBBF24;
  --warn-soft: rgba(251, 191, 36, 0.15);
  --danger: #F87171;
  --danger-soft: rgba(248, 113, 113, 0.15);
  --info: #4DA8FF;
  --info-soft: rgba(77, 168, 255, 0.15);

  /* Dark theme (default) — high contrast for athletic feel */
  --bg: #0E1116;
  --bg-elevated: #161B22;
  --bg-subtle: #1C232C;
  --surface: #161B22;
  --surface-hover: #1C232C;
  --surface-active: #232B36;
  --surface-inverse: #F5F5F4;

  --border: #232B36;
  --border-strong: #2F3845;
  --border-subtle: #1C232C;

  --text: #F5F5F4;              /* High contrast off-white */
  --text-secondary: #C9D1D9;    /* Readable secondary */
  --text-muted: #8B95A5;        /* Still readable, not low-contrast */
  --text-inverse: #0E1116;

  /* Elevation — bold shadows for depth */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.5), 0 6px 12px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 32px 64px rgba(0, 0, 0, 0.6), 0 16px 32px rgba(0, 0, 0, 0.4);
  --shadow-brand: 0 8px 32px rgba(198, 255, 61, 0.35);
  --shadow-accent: 0 8px 32px rgba(255, 61, 110, 0.35);

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-2xl: 28px;
  --r-pill: 9999px;

  /* Spacing — 4px base, athletic rhythm */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 48px;
  --sp-10: 64px;
  --sp-11: 80px;
  --sp-12: 96px;

  /* Typography */
  --font-sans: 'Vazirmatn', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', monospace;

  --fs-2xs: 11px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 14px;
  --fs-md: 15px;
  --fs-lg: 17px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-3xl: 30px;
  --fs-4xl: 38px;
  --fs-5xl: 48px;
  --fs-6xl: 60px;
  --fs-7xl: 72px;

  --lh-tight: 1.15;
  --lh-snug: 1.35;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --fw-black: 900;

  --tracking-tight: -0.02em;
  --tracking-tighter: -0.03em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;

  /* Layout */
  --maxw: 1200px;
  --maxw-narrow: 720px;
  --maxw-wide: 1440px;
  --header-h: 60px;
  --bottomnav-h: 68px;
  --sidebar-w: 260px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 320ms;
  --dur-slower: 480ms;

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-drawer: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* Light theme — high-contrast variant */
[data-theme="light"] {
  --brand: #5B8C00;             /* Darker lime for contrast on white */
  --brand-strong: #4A7400;
  --brand-soft: rgba(91, 140, 0, 0.12);
  --brand-softer: rgba(91, 140, 0, 0.06);
  --brand-glow: rgba(91, 140, 0, 0.25);
  --brand-contrast: #FFFFFF;

  --accent: #D12552;
  --accent-strong: #B01A41;
  --accent-soft: rgba(209, 37, 82, 0.10);
  --accent-glow: rgba(209, 37, 82, 0.25);

  --bg: #F8F9FB;
  --bg-elevated: #FFFFFF;
  --bg-subtle: #F1F3F7;
  --surface: #FFFFFF;
  --surface-hover: #F1F3F7;
  --surface-active: #E5E9F0;
  --surface-inverse: #0E1116;

  --border: #E5E9F0;
  --border-strong: #CBD2DE;
  --border-subtle: #F1F3F7;

  --text: #0E1116;
  --text-secondary: #2D3748;
  --text-muted: #5C6878;
  --text-inverse: #F5F5F4;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 12px rgba(15, 23, 42, 0.07), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 32px rgba(15, 23, 42, 0.08), 0 6px 12px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 32px 64px rgba(15, 23, 42, 0.10), 0 16px 32px rgba(15, 23, 42, 0.06);
  --shadow-brand: 0 8px 32px rgba(91, 140, 0, 0.25);
  --shadow-accent: 0 8px 32px rgba(209, 37, 82, 0.25);

  --success-soft: rgba(52, 211, 153, 0.15);
  --warn-soft: rgba(251, 191, 36, 0.18);
  --danger-soft: rgba(248, 113, 113, 0.15);
  --info-soft: rgba(77, 168, 255, 0.15);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01' on, 'cv11' on;
  transition: background-color var(--dur-slow) var(--ease-out),
              color var(--dur-slow) var(--ease-out);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

a { color: inherit; text-decoration: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, optgroup, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

::selection {
  background: var(--brand);
  color: var(--brand-contrast);
}

.fa-nums { font-feature-settings: 'ss01' on; }

/* ============================================================
   3. LAYOUT PRIMITIVES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--sp-4);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--sp-6); }
}
.container-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding-inline: var(--sp-4); }
.container-wide { max-width: var(--maxw-wide); margin: 0 auto; padding-inline: var(--sp-4); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-sm > * + * { margin-top: var(--sp-2); }
.stack-lg > * + * { margin-top: var(--sp-6); }
.stack-xl > * + * { margin-top: var(--sp-8); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
.grid-4 { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--sp-1); }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* ============================================================
   4. TYPOGRAPHY — Bold & geometric
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
}
h1 { font-size: var(--fs-5xl); font-weight: var(--fw-black); letter-spacing: var(--tracking-tighter); }
h2 { font-size: var(--fs-4xl); font-weight: var(--fw-extrabold); }
h3 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); }
h4 { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
h5 { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
h6 { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }

p { line-height: var(--lh-relaxed); color: var(--text-secondary); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--sp-3);
}
[data-theme="light"] .eyebrow { color: var(--brand-strong); }

.lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-secondary);
  font-weight: var(--fw-normal);
}

.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-base { font-size: var(--fs-base); }
.text-md { font-size: var(--fs-md); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }

.font-medium { font-weight: var(--fw-medium); }
.font-semibold { font-weight: var(--fw-semibold); }
.font-bold { font-weight: var(--fw-bold); }
.font-extrabold { font-weight: var(--fw-extrabold); }
.font-black { font-weight: var(--fw-black); }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-brand { color: var(--brand); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
[data-theme="light"] .text-brand { color: var(--brand-strong); }
[data-theme="light"] .text-accent { color: var(--accent-strong); }

/* ============================================================
   5. ICONS — Font Awesome sizing helpers
   ============================================================ */
.icon { display: inline-flex; align-items: center; justify-content: center; }
.icon-xs { font-size: 11px; }
.icon-sm { font-size: 13px; }
.icon-md { font-size: 16px; }
.icon-lg { font-size: 20px; }
.icon-xl { font-size: 28px; }
.icon-2xl { font-size: 40px; }

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--surface-hover);
  color: var(--text);
  flex-shrink: 0;
  font-size: 15px;
}
.icon-box-sm { width: 28px; height: 28px; border-radius: var(--r-sm); font-size: 12px; }
.icon-box-lg { width: 48px; height: 48px; border-radius: var(--r-lg); font-size: 20px; }
.icon-box-xl { width: 64px; height: 64px; border-radius: var(--r-xl); font-size: 28px; }
.icon-box-brand { background: var(--brand); color: var(--brand-contrast); }
.icon-box-accent { background: var(--accent); color: white; }
.icon-box-success { background: var(--success-soft); color: var(--success); }
.icon-box-warn { background: var(--warn-soft); color: var(--warn); }
.icon-box-danger { background: var(--danger-soft); color: var(--danger); }
.icon-box-info { background: var(--info-soft); color: var(--info); }
.icon-box-soft { background: var(--brand-soft); color: var(--brand); }
[data-theme="light"] .icon-box-soft { color: var(--brand-strong); }

/* ============================================================
   6. BUTTONS — Bold, energetic
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 44px;
  padding: 0 var(--sp-5);
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-out);
  user-select: none;
  text-decoration: none;
  letter-spacing: var(--tracking-tight);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.97); }

.btn-sm { height: 36px; padding: 0 var(--sp-3); font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn-lg { height: 52px; padding: 0 var(--sp-7); font-size: var(--fs-md); border-radius: var(--r-md); }
.btn-xl { height: 60px; padding: 0 var(--sp-8); font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn-block { display: flex; width: 100%; }
.btn-icon { padding: 0; width: 44px; }
.btn-icon.btn-sm { width: 36px; }

.btn-primary {
  background: var(--brand);
  color: var(--brand-contrast);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-strong);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--brand-glow);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: scale(0.97); }
[data-theme="light"] .btn-primary { color: var(--brand-contrast); }

.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-accent:hover:not(:disabled) {
  background: var(--accent-strong);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-hover);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-danger:hover:not(:disabled) { background: #DC4444; }

.btn-success {
  background: var(--success);
  color: #06281A;
  box-shadow: var(--shadow-sm);
}
.btn-success:hover:not(:disabled) { background: #20B07C; }

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}
.btn-outline:hover:not(:disabled) {
  background: var(--brand-soft);
  color: var(--brand);
}
[data-theme="light"] .btn-outline { color: var(--brand-strong); }
[data-theme="light"] .btn-outline:hover { color: var(--brand-strong); }

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline-accent:hover:not(:disabled) { background: var(--accent-soft); }

/* Legacy button aliases */
.btn-gold { background: var(--brand); color: var(--brand-contrast); box-shadow: var(--shadow-sm); }
.btn-gold:hover:not(:disabled) { background: var(--brand-strong); box-shadow: var(--shadow-md), 0 0 0 1px var(--brand-glow); transform: translateY(-1px); color: var(--brand-contrast); }
.btn-ghost-legacy, .btn-ghost { background: transparent; color: var(--text-secondary); border-color: var(--border-strong); }
.btn-ghost-legacy:hover, .btn-ghost:hover { background: var(--surface-hover); color: var(--text); border-color: var(--text-muted); }
.btn-outline-gold { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline-gold:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand); }
.btn-success-legacy, .btn-success { background: var(--success); color: #06281A; }
.btn-danger-legacy, .btn-danger { background: var(--danger); color: white; }
.btn-dashboard { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-dashboard:hover { background: var(--surface-hover); border-color: var(--brand); color: var(--brand); }

/* ============================================================
   7. CARDS — Layered with bold borders
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-base) var(--ease-out);
}
.card-hover:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-pad-sm { padding: var(--sp-4); }
.card-pad-lg { padding: var(--sp-8); }
.card-pad-none { padding: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-brand { border-color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), transparent); }
.card-accent { border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), transparent); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.card-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.card-subtitle {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

.mb-1 { margin-bottom: var(--sp-1); }
.mb-2 { margin-bottom: var(--sp-2); }
.mb-3 { margin-bottom: var(--sp-3); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-5 { margin-bottom: var(--sp-5); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.mt-1 { margin-top: var(--sp-1); }
.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mt-8 { margin-top: var(--sp-8); }

/* ============================================================
   8. FORMS
   ============================================================ */
.form-group { margin-bottom: var(--sp-4); }
.form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin-bottom: var(--sp-2);
}
.form-label .req { color: var(--accent); margin-inline-start: 4px; }

.form-control, .form-control:is(input, textarea, select) {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 var(--sp-4);
  font-size: 16px; /* Prevents iOS zoom on focus */
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  transition: all var(--dur-base) var(--ease-out);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}
/* Hide number input spinner buttons (ugly up/down arrows) */
.form-control[type="number"]::-webkit-outer-spin-button,
.form-control[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.form-control[type="number"] {
  -moz-appearance: textfield;
}
/* Use textfield appearance but keep numeric keyboard via inputmode on the input element */
textarea.form-control {
  height: auto;
  min-height: 110px;
  padding: var(--sp-3) var(--sp-4);
  line-height: var(--lh-normal);
  resize: vertical;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
  background: var(--surface);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { background: var(--surface-hover); color: var(--text-muted); cursor: not-allowed; }

select.form-control {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%238B95A5' stroke-width='2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left var(--sp-4) center;
  padding-inline-end: var(--sp-9);
  cursor: pointer;
}

.input-ic { position: relative; display: flex; align-items: center; }
.input-ic .ic {
  position: absolute;
  inset-inline-start: var(--sp-4);
  pointer-events: none;
  color: var(--text-muted);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
}
.input-ic .form-control { padding-inline-start: var(--sp-10); }
.input-ic .form-control:focus + .ic, .input-ic:focus-within .ic { color: var(--brand); }
/* For number inputs with icon, add extra end padding so the (now hidden) spinner area doesn't crowd */
.input-ic input[type="number"].form-control { padding-inline-end: var(--sp-4); }

.input-suffix { position: relative; }
.input-suffix .form-control { padding-inline-end: var(--sp-12); }
.input-suffix .suffix {
  position: absolute;
  inset-inline-end: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  pointer-events: none;
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--sp-2);
}
.form-error {
  font-size: var(--fs-xs);
  color: var(--danger);
  margin-top: var(--sp-2);
  display: flex;
  align-items: center;
  gap: 4px;
}

input[type="checkbox"], input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
  cursor: pointer;
  vertical-align: middle;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

/* Checkbox card */
.check-card, .bodytype-card, .activity-opt {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--dur-base);
  margin-bottom: var(--sp-2);
  min-height: 60px;
  background: var(--surface);
  color: var(--text);
}
.check-card:hover, .bodytype-card:hover, .activity-opt:hover {
  border-color: var(--text-muted);
  background: var(--surface-hover);
}
.check-card.active, .bodytype-card.active, .activity-opt.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.check-dot {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: var(--r-xs);
  flex-shrink: 0;
  transition: all var(--dur-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 11px;
}
.check-card.active .check-dot { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }

.check-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-2); }
@media (min-width: 600px) { .check-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   9. PILLS & BADGES
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  background: var(--surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  white-space: nowrap;
  letter-spacing: var(--tracking-tight);
}
.pill-brand { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
[data-theme="light"] .pill-brand { color: var(--brand-strong); }
.pill-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
[data-theme="light"] .pill-accent { color: var(--accent-strong); }
.pill-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.pill-info { background: var(--info-soft); color: var(--info); border-color: transparent; }

.pill-lg { height: 34px; padding: 0 var(--sp-4); font-size: var(--fs-sm); }

/* Legacy badge aliases */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  background: var(--surface-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
}
.badge-green, .badge-tag.badge-green { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-gold, .badge-tag.badge-gold { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
[data-theme="light"] .badge-gold, [data-theme="light"] .badge-tag.badge-gold { color: var(--brand-strong); }
.badge-gray, .badge-tag.badge-gray { background: var(--surface-hover); color: var(--text-muted); border-color: var(--border); }
.badge-red, .badge-tag.badge-red { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-purple, .badge-tag.badge-purple { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge-tier { display: inline-flex; padding: 4px var(--sp-3); border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--fw-bold); }

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px var(--sp-4);
  background: var(--accent-soft);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--accent);
}
[data-theme="light"] .streak-badge { color: var(--accent-strong); }

/* ============================================================
   10. STATS & METRICS — Compact, optimized
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
@media (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  position: relative;
  transition: all var(--dur-base) var(--ease-out);
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: inherit;
}
.stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
}
.stat-card .ic {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: var(--r-sm);
  flex-shrink: 0;
  margin-bottom: 0;
}
[data-theme="light"] .stat-card .ic { color: var(--brand-strong); }
/* When .ic is followed by .num (siblings, no wrapper), group num+lb into a column */
.stat-card > .ic + .num,
.stat-card > .ic + .num + .lb {
  /* will be wrapped visually via flex column on a pseudo-wrapper */
}
/* Use subgrid-like behavior: make .num and .lb stack vertically next to .ic */
.stat-card > .num { margin-bottom: 0; }
.stat-card > .lb { margin-top: 0; }
/* Group the .num + .lb that come after .ic using a flex column trick: 
   We make .num take full remaining width and .lb wraps below it. */
.stat-card {
  flex-wrap: wrap;
}
.stat-card > .ic { order: 1; }
.stat-card > .num { order: 2; flex: 1; min-width: 0; }
.stat-card > .lb { order: 3; flex-basis: 100%; padding-inline-start: calc(36px + var(--sp-3)); margin-top: -2px; }
.stat-card > .info { order: 2; flex: 1; min-width: 0; }
.stat-card .info { flex: 1; min-width: 0; }
.stat-card .info .num { margin-bottom: 2px; }
.stat-card .info .lb { margin-top: 0; }
.stat-card .num {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-extrabold);
  color: var(--text);
  line-height: 1.1;
  letter-spacing: var(--tracking-tighter);
  font-variant-numeric: tabular-nums;
}
.stat-card .lb {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-card .trend {
  position: absolute;
  top: var(--sp-3);
  inset-inline-end: var(--sp-4);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.stat-card .trend.up { color: var(--success); }
.stat-card .trend.down { color: var(--danger); }

/* Stacked stat variant (smaller) */
.stat-card.stat-compact { padding: var(--sp-3); }
.stat-card.stat-compact .ic { width: 28px; height: 28px; font-size: 12px; }
.stat-card.stat-compact .num { font-size: var(--fs-xl); }

/* ============================================================
   11. TABLES
   ============================================================ */
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-inline: calc(-1 * var(--sp-1));
  padding-inline: var(--sp-1);
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  min-width: 480px;
}
.tbl thead th {
  text-align: right;
  padding: var(--sp-3) var(--sp-3);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  background: var(--surface-hover);
}
.tbl tbody td {
  padding: var(--sp-4) var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background var(--dur-base); }
.tbl tbody tr:hover { background: var(--surface-hover); }

/* Mobile cards alternative */
@media (max-width: 767px) {
  .tbl-mobile-cards .tbl { display: none; }
  .tbl-mobile-cards .mobile-cards-list { display: flex; flex-direction: column; gap: var(--sp-2); }
}
@media (min-width: 768px) {
  .tbl-mobile-cards .mobile-cards-list { display: none; }
}
.mobile-card-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  transition: all var(--dur-base);
}
.mobile-card-item:hover { border-color: var(--border-strong); }
.mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  padding: 4px 0;
  font-size: var(--fs-sm);
}
.mobile-card-row .lbl { color: var(--text-muted); font-size: var(--fs-xs); }
.mobile-card-row .val { font-weight: var(--fw-semibold); }

/* ============================================================
   12. EMPTY STATES
   ============================================================ */
.empty {
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}
.empty .ic {
  width: 80px;
  height: 80px;
  border-radius: var(--r-2xl);
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.empty h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text);
}
.empty p {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  max-width: 420px;
  margin: 0 auto;
  line-height: var(--lh-relaxed);
}

/* ============================================================
   13. FLASH MESSAGES
   ============================================================ */
.flash-wrap { margin: var(--sp-4) 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.flash {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border: 1px solid transparent;
}
.flash-success { background: var(--success-soft); color: var(--success); border-color: rgba(52, 211, 153, 0.25); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: rgba(248, 113, 113, 0.25); }
.flash-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(251, 191, 36, 0.25); }
.flash-info { background: var(--info-soft); color: var(--info); border-color: rgba(77, 168, 255, 0.25); }

/* ============================================================
   14. PUBLIC LAYOUT (landing, blog, about, contact, faq)
   ============================================================ */
.public-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(14, 17, 22, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .site-header { background: rgba(248, 249, 251, 0.85); }
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: var(--sp-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-weight: var(--fw-extrabold);
  font-size: var(--fs-md);
  color: var(--text);
  flex-shrink: 0;
  letter-spacing: var(--tracking-tight);
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--brand);
  border-radius: var(--r-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-contrast);
  flex-shrink: 0;
  box-shadow: var(--shadow-brand);
  line-height: 1;
}
.brand-mark svg, .brand-mark i {
  color: var(--brand-contrast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  width: auto;
  height: auto;
}
.brand-name { color: var(--text); }

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-base);
  font-size: 15px;
  color: var(--text-secondary);
}
.theme-toggle:hover {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
}
[data-theme="light"] .theme-toggle:hover { color: var(--brand-strong); }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav > a {
  padding: 8px var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  transition: all var(--dur-base);
  white-space: nowrap;
}
.site-nav > a:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.site-nav > a.active {
  color: var(--brand);
  background: var(--brand-soft);
}
[data-theme="light"] .site-nav > a.active { color: var(--brand-strong); }

.nav-cta {
  display: inline-flex !important;
  align-items: center;
  height: 40px;
  padding: 0 var(--sp-5) !important;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  border-radius: var(--r-md);
  transition: all var(--dur-base);
  background: var(--brand);
  color: var(--brand-contrast) !important;
  box-shadow: var(--shadow-sm);
  letter-spacing: var(--tracking-tight);
}
.nav-cta:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
  color: var(--brand-contrast) !important;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--brand-glow);
}
[data-theme="light"] .nav-cta { color: var(--brand-contrast) !important; }
.nav-cta.ghost {
  background: transparent !important;
  color: var(--text) !important;
  border: 1.5px solid var(--border-strong);
  box-shadow: none;
}
.nav-cta.ghost:hover {
  background: var(--surface-hover) !important;
  border-color: var(--text-muted);
  color: var(--text) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--dur-base);
}
.nav-toggle:hover { background: var(--surface-hover); }
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: var(--dur-base);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 899px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    inset-inline-end: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elevated);
    border-inline-start: 1px solid var(--border);
    padding: var(--sp-4);
    gap: 2px;
    /* RTL: menu anchored to left (inset-inline-end:0 in RTL = left). Hide to the left = translateX(-100%). */
    /* LTR: menu anchored to right (inset-inline-end:0 in LTR = right). Hide to the right = translateX(100%). */
    transform: translateX(-100%);
    transition: transform var(--dur-slow) var(--ease-out), visibility 0s linear var(--dur-slow);
    overflow-y: auto;
    z-index: var(--z-drawer);
    box-shadow: var(--shadow-xl);
    visibility: hidden;
  }
  [dir="ltr"] .site-nav { transform: translateX(100%); }
  .site-nav.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform var(--dur-slow) var(--ease-out), visibility 0s;
  }
  .site-nav > a { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-md); }
}

.site-main { flex: 1; }

.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  margin-top: var(--sp-12);
  padding: var(--sp-10) 0 var(--sp-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-col h4 {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-3);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.footer-col a, .footer-col span {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color var(--dur-base);
}
.footer-col a:hover { color: var(--brand); }
[data-theme="light"] .footer-col a:hover { color: var(--brand-strong); }
.footer-desc { color: var(--text-muted); font-size: var(--fs-sm); margin: var(--sp-3) 0; line-height: var(--lh-relaxed); max-width: 320px; }
.footer-social { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.footer-social a {
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--dur-base);
  font-size: 16px;
}
.footer-social a:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-2px);
}
[data-theme="light"] .footer-social a:hover { color: var(--brand-strong); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-4);
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.scroll-top {
  position: fixed;
  inset-inline-end: var(--sp-4);
  bottom: calc(var(--sp-4) + var(--safe-bottom));
  width: 48px;
  height: 48px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: var(--brand-contrast);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur-base);
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-brand);
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: var(--brand-strong); transform: translateY(-2px); }
.scroll-top:active { transform: scale(0.92); }

/* ============================================================
   15. APP LAYOUT (dashboard, program, logger, ...)
   ============================================================ */
.app-body { background: var(--bg); }

.app-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-elevated);
  border-inline-end: 1px solid var(--border);
  padding: var(--sp-4);
  overflow-y: auto;
  z-index: var(--z-drawer);
  transform: translateX(0);
  transition: transform var(--dur-slow) var(--ease-out), visibility 0s;
  visibility: visible;
}
.app-sidebar .brand { margin-bottom: var(--sp-6); padding: 0 var(--sp-2); }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav > a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 11px var(--sp-3);
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  transition: all var(--dur-base);
  min-height: 44px;
}
.side-nav > a svg, .side-nav > a i {
  width: 18px;
  height: 18px;
  font-size: 15px;
  flex-shrink: 0;
  opacity: 0.85;
}
.side-nav > a:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.side-nav > a.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: var(--fw-bold);
}
[data-theme="light"] .side-nav > a.active { color: var(--brand-strong); }
.side-nav > a.active svg, .side-nav > a.active i { opacity: 1; }
.side-nav .sep {
  height: 1px;
  background: var(--border);
  margin: var(--sp-3) 0;
}
.side-nav .nav-ic {
  width: 22px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-main {
  grid-column: 1;
  min-height: 100vh;
  padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + var(--sp-4));
  min-width: 0;
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  .app-layout { grid-template-columns: var(--sidebar-w) 1fr; }
  .app-main {
    grid-column: 2;
    padding-bottom: var(--sp-6);
  }
  .sidebar-toggle { display: none !important; }
}

@media (max-width: 1023px) {
  .app-sidebar {
    transform: translateX(100%);
    z-index: var(--z-drawer);
    box-shadow: var(--shadow-xl);
    visibility: hidden;
    transition: transform var(--dur-slow) var(--ease-out), visibility 0s linear var(--dur-slow);
  }
  [dir="ltr"] .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.open {
    transform: translateX(0) !important;
    visibility: visible;
    transition: transform var(--dur-slow) var(--ease-out), visibility 0s;
  }
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(14, 17, 22, 0.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: var(--header-h);
  max-width: 100%;
  overflow: visible;
}
[data-theme="light"] .app-topbar { background: rgba(248, 249, 251, 0.85); }

.app-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-extrabold);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: var(--tracking-tight);
  color: var(--text);
}

.sidebar-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--dur-base);
}
.sidebar-toggle:hover {
  background: var(--surface-hover);
  border-color: var(--brand);
  color: var(--brand);
}
[data-theme="light"] .sidebar-toggle:hover { color: var(--brand-strong); }

.app-user {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.app-ava {
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: var(--brand-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-extrabold);
  font-size: var(--fs-sm);
  flex-shrink: 0;
  letter-spacing: 0;
}

/* Notification bell */
.notif-bell { position: relative; display: flex; }
.notif-btn {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: var(--r-md) !important;
  color: var(--text-secondary) !important;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-base);
}
.notif-btn:hover {
  border-color: var(--brand) !important;
  color: var(--brand) !important;
  background: var(--brand-soft) !important;
}
[data-theme="light"] .notif-btn:hover { color: var(--brand-strong) !important; }
.bell-count {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: var(--fw-bold);
  padding: 2px 6px;
  border-radius: var(--r-pill);
  min-width: 18px;
  text-align: center;
  border: 2px solid var(--bg-elevated);
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: 360px;
  max-width: 90vw;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-dropdown);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--dur-base), transform var(--dur-base);
  max-height: 70vh;
  overflow-y: auto;
}
.notif-dropdown.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.notif-head {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notif-head a { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-semibold); }
.notif-head a:hover { color: var(--brand); }
[data-theme="light"] .notif-head a:hover { color: var(--brand-strong); }
.notif-empty { padding: var(--sp-8); text-align: center; color: var(--text-muted); font-size: var(--fs-sm); }
.notif-empty .ic { font-size: 32px; margin-bottom: var(--sp-2); opacity: 0.5; }
.notif-item {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--dur-base);
  text-decoration: none;
  color: inherit;
}
.notif-item:hover { background: var(--surface-hover); }
.notif-item.unread { background: var(--brand-soft); }
.ni-ic {
  font-size: 15px;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hover);
  border-radius: var(--r-sm);
}
.ni-tx { flex: 1; min-width: 0; }
.ni-t { font-weight: var(--fw-bold); font-size: var(--fs-sm); margin-bottom: 2px; color: var(--text); }
.ni-b { font-size: var(--fs-xs); color: var(--text-secondary); line-height: var(--lh-normal); }
.ni-d { font-size: var(--fs-2xs); color: var(--text-muted); margin-top: 4px; }
.notif-foot {
  padding: var(--sp-3) var(--sp-4);
  text-align: center;
  border-top: 1px solid var(--border);
}
.notif-foot a { font-size: var(--fs-sm); color: var(--brand); font-weight: var(--fw-bold); }
[data-theme="light"] .notif-foot a { color: var(--brand-strong); }

/* Bottom navigation (mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  background: rgba(14, 17, 22, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: calc(var(--bottomnav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  z-index: var(--z-sticky);
}
[data-theme="light"] .bottom-nav { background: rgba(248, 249, 251, 0.95); }
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  padding: 6px 2px;
  transition: color var(--dur-base);
  min-height: 44px;
  text-decoration: none;
  position: relative;
}
.bottom-nav a svg, .bottom-nav a i { width: 22px; height: 22px; font-size: 20px; }
.bottom-nav a.active { color: var(--brand); }
[data-theme="light"] .bottom-nav a.active { color: var(--brand-strong); }
.bottom-nav a.active::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 30%;
  height: 3px;
  background: var(--brand);
  border-radius: var(--r-pill);
}
.bottom-nav a:active { transform: scale(0.95); }
.bottom-nav-label { font-size: 10px; line-height: 1; }

/* Primary center button (FAB) */
.bottom-nav a.primary {
  position: relative;
  /* Override column flex to center the FAB perfectly */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0;
  gap: 2px;
}
.bottom-nav-primary-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: var(--brand-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -20px;
  margin-bottom: -4px;
  box-shadow: var(--shadow-brand);
  transition: transform var(--dur-base);
  border: 4px solid var(--bg);
  font-size: 22px;
}
.bottom-nav-primary-icon i,
.bottom-nav-primary-icon svg {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
[data-theme="light"] .bottom-nav-primary-icon { color: var(--brand-contrast); }
.bottom-nav a.primary:active .bottom-nav-primary-icon { transform: scale(0.92); }
.bottom-nav a.primary.active::before { display: none; }
.bottom-nav a.primary.active .bottom-nav-primary-icon {
  box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow-brand);
}

@media (min-width: 1024px) {
  .bottom-nav { display: none; }
}

/* Backdrop for drawer */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: calc(var(--z-drawer) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slow);
}
.sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
@media (min-width: 1024px) { .sidebar-backdrop { display: none; } }

.app-content { padding: var(--sp-4); max-width: 100%; overflow-x: hidden; }
@media (min-width: 768px) {
  .app-content { padding: var(--sp-6); }
}

/* Mobile quick action */
.mobile-quick-log {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + var(--sp-3));
  inset-inline-end: var(--sp-4);
  background: var(--accent);
  color: white;
  padding: 12px var(--sp-5);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  display: none;
  align-items: center;
  gap: var(--sp-2);
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-accent);
  transition: all var(--dur-base);
  text-decoration: none;
}
.mobile-quick-log:hover { background: var(--accent-strong); transform: translateY(-2px); color: white; }
.mobile-quick-log:active { transform: scale(0.95); }
@media (max-width: 1023px) {
  .mobile-quick-log { display: inline-flex; }
}

/* ============================================================
   16. ADMIN LAYOUT
   ============================================================ */
.admin-body { background: var(--bg); }
.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}
@media (min-width: 1024px) {
  .admin-layout { grid-template-columns: var(--sidebar-w) 1fr; }
}

.admin-sidebar {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-elevated);
  border-inline-end: 1px solid var(--border);
  padding: var(--sp-4);
  overflow-y: auto;
  z-index: var(--z-drawer);
  /* RTL: anchored to right (inset-inline-start:0 in RTL = right). Hide right = translateX(100%). */
  /* LTR: anchored to left. Hide left = translateX(-100%). */
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out), visibility 0s linear var(--dur-slow);
  visibility: hidden;
}
[dir="ltr"] .admin-sidebar { transform: translateX(-100%); }
.admin-sidebar.open {
  transform: translateX(0) !important;
  visibility: visible;
  transition: transform var(--dur-slow) var(--ease-out), visibility 0s;
}
@media (min-width: 1024px) {
  .admin-sidebar { transform: translateX(0) !important; visibility: visible; }
}

.admin-main {
  grid-column: 1;
  min-height: 100vh;
}
@media (min-width: 1024px) {
  .admin-main { grid-column: 2; }
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(14, 17, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: var(--header-h);
}
[data-theme="light"] .admin-topbar { background: rgba(248, 249, 251, 0.85); }

.admin-title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-extrabold);
  flex: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--text);
}

.admin-content { padding: var(--sp-4); }
@media (min-width: 768px) {
  .admin-content { padding: var(--sp-6); }
}

.admin-user-mini {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.md\:inline { display: none; }
@media (min-width: 768px) {
  .md\:inline { display: inline; }
}

/* ============================================================
   17. HERO — Landing page (bold, conversion-focused)
   ============================================================ */
.hero {
  padding: var(--sp-10) 0 var(--sp-12);
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero { padding: var(--sp-12) 0; }
}
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  inset-inline-end: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  inset-inline-start: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 1fr; gap: var(--sp-10); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--brand);
  margin-bottom: var(--sp-5);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
[data-theme="light"] .hero-badge { color: var(--brand-strong); }
.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--brand);
  border-radius: var(--r-pill);
  box-shadow: 0 0 8px var(--brand);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: var(--fs-6xl);
  font-weight: var(--fw-black);
  line-height: 1.05;
  letter-spacing: var(--tracking-tighter);
  margin-bottom: var(--sp-5);
  color: var(--text);
}
@media (min-width: 768px) {
  .hero h1 { font-size: var(--fs-7xl); }
}
.hero h1 .accent-text { color: var(--brand); }
[data-theme="light"] .hero h1 .accent-text { color: var(--brand-strong); }
.hero h1 .accent-text-pink { color: var(--accent); }
[data-theme="light"] .hero h1 .accent-text-pink { color: var(--accent-strong); }

.hero-sub {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-7);
  max-width: 560px;
  font-weight: var(--fw-normal);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}
.hero-stats {
  display: flex;
  gap: var(--sp-7);
  flex-wrap: wrap;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}
.hero-stat .num {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  color: var(--text);
  line-height: 1;
  letter-spacing: var(--tracking-tighter);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.hero-stat .lb {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.hero-visual { position: relative; }
.phone-mock {
  max-width: 320px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2xl);
  padding: var(--sp-3);
  box-shadow: var(--shadow-xl);
  position: relative;
}
.phone-screen { background: var(--surface); border-radius: var(--r-xl); padding: var(--sp-4); }
.ps-eyebrow { font-size: var(--fs-xs); color: var(--brand); font-weight: var(--fw-bold); margin-bottom: 4px; text-transform: uppercase; letter-spacing: var(--tracking-wide); }
[data-theme="light"] .ps-eyebrow { color: var(--brand-strong); }
.ps-title { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin-bottom: var(--sp-3); color: var(--text); }
.ps-day {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--surface-hover);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-1);
  font-size: var(--fs-sm);
}
.prog-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.prog-dot.dp { background: var(--push); }
.prog-dot.dl { background: var(--pull); }
.prog-dot.dg { background: var(--legs); }
.prog-dot.dc { background: var(--core); }
.prog-dot.dr { background: var(--rest); }
.prog-dot.di { background: var(--info); }
.ps-day .nm { color: var(--text-secondary); }
.ps-day .lb { margin-inline-start: auto; font-weight: var(--fw-bold); color: var(--text); }

.floating-chip {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  padding: 8px var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.fc-1 { top: 10%; inset-inline-end: -8%; color: var(--brand); border-color: var(--brand); }
[data-theme="light"] .fc-1 { color: var(--brand-strong); }
.fc-2 { bottom: 30%; inset-inline-start: -10%; }
.fc-3 { bottom: 5%; inset-inline-end: 8%; color: var(--accent); border-color: var(--accent); }
[data-theme="light"] .fc-3 { color: var(--accent-strong); }

/* ============================================================
   18. SECTIONS
   ============================================================ */
.section { padding: var(--sp-12) 0; }
@media (min-width: 768px) {
  .section { padding: var(--sp-12) 0; }
}
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--sp-8);
}
.section-eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--sp-3);
}
[data-theme="light"] .section-eyebrow { color: var(--brand-strong); }
.section-title {
  font-size: var(--fs-5xl);
  font-weight: var(--fw-black);
  margin-bottom: var(--sp-4);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tighter);
  color: var(--text);
}
.section-desc {
  color: var(--text-secondary);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
}

/* ============================================================
   19. FEATURES GRID
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 600px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-7);
  transition: all var(--dur-base) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: scaleX(0);
  transform-origin: inset-inline-start;
  transition: transform var(--dur-slow) var(--ease-out);
}
.feature-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: var(--sp-5);
}
[data-theme="light"] .feature-icon { color: var(--brand-strong); }
.feature-card h3 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-2);
  color: var(--text);
}
.feature-card p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

/* ============================================================
   20. AUTH PAGES — Split screen
   ============================================================ */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 1024px) {
  .auth-wrap { grid-template-columns: 1fr 1fr; }
}
.auth-visual {
  display: none;
  background: var(--bg-elevated);
  padding: var(--sp-10);
  color: var(--text);
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .auth-visual { display: flex; }
}
.auth-visual::before {
  content: '';
  position: absolute;
  top: -30%;
  inset-inline-end: -30%;
  width: 80%;
  height: 80%;
  background: var(--brand-glow);
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
}
.auth-visual::after {
  content: '';
  position: absolute;
  bottom: -20%;
  inset-inline-start: -20%;
  width: 60%;
  height: 60%;
  background: var(--accent-glow);
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual .brand-mark { background: var(--brand); }
.auth-visual h2 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-black);
  color: var(--text);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tighter);
  margin-bottom: var(--sp-4);
}
.auth-visual p {
  color: var(--text-secondary);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  max-width: 440px;
}
.auth-visual ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.auth-visual li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.auth-visual li .check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--brand);
  color: var(--brand-contrast);
  border-radius: var(--r-pill);
  font-size: 11px;
  flex-shrink: 0;
}
[data-theme="light"] .auth-visual li .check { color: var(--brand-contrast); }

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6) var(--sp-4);
}
.auth-card {
  width: 100%;
  max-width: 440px;
}
.auth-logo {
  margin-bottom: var(--sp-6);
  display: none;
}
.auth-logo .brand { justify-content: flex-start; }
body:not(.public-layout):not(.app-body):not(.admin-body) .auth-logo { display: block; }
.auth-title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  text-align: start;
  margin-bottom: var(--sp-2);
  letter-spacing: var(--tracking-tighter);
  color: var(--text);
}
.auth-sub {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  text-align: start;
  margin-bottom: var(--sp-6);
  line-height: var(--lh-relaxed);
}
.auth-foot {
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
}
.auth-foot a { color: var(--brand); font-weight: var(--fw-bold); }
[data-theme="light"] .auth-foot a { color: var(--brand-strong); }
.auth-card.wide { max-width: 560px; }

/* ============================================================
   21. PROGRESS BAR
   ============================================================ */
.prog-progress-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.ppb-track {
  flex: 1;
  height: 10px;
  background: var(--surface-hover);
  border-radius: var(--r-pill);
  overflow: hidden;
  border: 1px solid var(--border);
}
.ppb-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-strong));
  border-radius: var(--r-pill);
  transition: width var(--dur-slow) var(--ease-out);
  box-shadow: 0 0 8px var(--brand-glow);
}
.ppb-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--brand);
  min-width: 70px;
  text-align: end;
  font-variant-numeric: tabular-nums;
}
[data-theme="light"] .ppb-label { color: var(--brand-strong); }

/* ============================================================
   22. ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 var(--brand-glow); }
  50% { box-shadow: 0 0 0 16px transparent; }
}
@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px var(--brand-glow); }
  50% { box-shadow: 0 0 24px var(--brand-glow); }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: var(--r-pill);
  animation: spin 0.7s linear infinite;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-hover) 25%, var(--surface-active) 50%, var(--surface-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   23. TABS & SEGMENTED
   ============================================================ */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  padding: 12px var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--dur-base);
  cursor: pointer;
  background: none;
  min-height: 44px;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: var(--fw-bold); }
[data-theme="light"] .tab.active { color: var(--brand-strong); }

.segmented {
  display: inline-flex;
  background: var(--surface-hover);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
}
.segmented button {
  padding: 8px var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  border-radius: var(--r-sm);
  transition: all var(--dur-base);
  min-height: 36px;
}
.segmented button:hover { color: var(--text); }
.segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
  font-weight: var(--fw-bold);
}

/* ============================================================
   24. PAGE HEAD
   ============================================================ */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.page-head h1, .page-head h2 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  letter-spacing: var(--tracking-tighter);
  color: var(--text);
  margin: 0;
}
.page-head .lead { margin-top: var(--sp-2); }
.page-head .actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--brand); }
[data-theme="light"] .breadcrumb a:hover { color: var(--brand-strong); }
.breadcrumb .sep { color: var(--text-muted); }

/* ============================================================
   25. MODAL & DIALOG
   ============================================================ */
.modal-backdrop, .timer-modal, .quicklog-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base);
}
.modal-backdrop.open, .timer-modal.open, .quicklog-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.modal, .timer-card, .quicklog-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2xl);
  padding: var(--sp-6);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96);
  transition: transform var(--dur-base);
  box-shadow: var(--shadow-xl);
  position: relative;
}
.modal-backdrop.open .modal,
.timer-modal.open .timer-card,
.quicklog-modal.open .quicklog-card { transform: scale(1); }

.modal-head, .timer-label, .ql-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--text);
}
.modal-title { font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--text); }
.modal-close, .timer-close, .ql-close {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--dur-base);
  background: var(--surface-hover);
}
.modal-close:hover, .timer-close:hover, .ql-close:hover {
  background: var(--surface-active);
  color: var(--text);
}

/* Timer specific */
.timer-ring-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin: var(--sp-5) auto;
}
.timer-ring { transform: rotate(-90deg); }
.timer-ring .bg { fill: none; stroke: var(--surface-hover); stroke-width: 8; }
.timer-ring .fg {
  fill: none;
  stroke: var(--brand);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.timer-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.timer-display {
  font-size: 64px;
  font-weight: var(--fw-black);
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: var(--tracking-tighter);
}
[data-theme="light"] .timer-display { color: var(--brand-strong); }
.timer-display.warn { color: var(--accent); }
.timer-status {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  margin-top: var(--sp-2);
  font-weight: var(--fw-medium);
}
.timer-presets {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  flex-wrap: wrap;
  margin: var(--sp-5) 0;
}
.timer-preset {
  padding: 8px var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-base);
  min-height: 36px;
}
.timer-preset:hover { border-color: var(--brand); color: var(--brand); }
[data-theme="light"] .timer-preset:hover { color: var(--brand-strong); }
.timer-preset.active { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
[data-theme="light"] .timer-preset.active { color: var(--brand-contrast); }
.timer-controls {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  flex-wrap: wrap;
}

/* Quick log modal */
.ql-ex-name { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--text); margin-bottom: 4px; }
.ql-ex-en { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-4); }
.ql-sets-mini { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.ql-set-row {
  display: grid;
  grid-template-columns: 40px 1fr 1fr 1fr;
  gap: var(--sp-2);
  align-items: center;
}
.ql-set-num {
  text-align: center;
  font-weight: var(--fw-bold);
  color: var(--text-muted);
}
.ql-set-input {
  padding: 10px var(--sp-2);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  min-height: 40px;
  width: 100%;
  text-align: center;
  color: var(--text);
}
.ql-set-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.ql-add-set {
  width: 100%;
  padding: 10px;
  background: var(--surface-hover);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-base);
  margin-bottom: var(--sp-4);
}
.ql-add-set:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
[data-theme="light"] .ql-add-set:hover { color: var(--brand-strong); }
.ql-actions { display: flex; gap: var(--sp-2); }

/* ============================================================
   26. TOAST
   ============================================================ */
.toast-wrap {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  inset-inline-end: var(--sp-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  pointer-events: none;
  max-width: 340px;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 12px var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: fadeInUp var(--dur-slow) var(--ease-out);
  color: var(--text);
}
.toast .ic {
  width: 24px; height: 24px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--fw-bold);
  flex-shrink: 0;
  color: white;
}
.toast.success { border-color: rgba(52, 211, 153, 0.3); }
.toast.success .ic { background: var(--success); }
.toast.error { border-color: rgba(248, 113, 113, 0.3); }
.toast.error .ic { background: var(--danger); }
.toast.info { border-color: rgba(77, 168, 255, 0.3); }
.toast.info .ic { background: var(--info); }

/* ============================================================
   27. PWA PROMPT
   ============================================================ */
.pwa-prompt {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  inset-inline: var(--sp-3);
  max-width: 400px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-toast);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--dur-slow) var(--ease-out);
}
.pwa-prompt.show { opacity: 1; transform: translateY(0); }
.pwa-prompt .ic {
  width: 44px;
  height: 44px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
[data-theme="light"] .pwa-prompt .ic { color: var(--brand-strong); }
.pwa-prompt .tx { flex: 1; }
.pwa-prompt .tx h5 { font-size: var(--fs-sm); font-weight: var(--fw-bold); margin-bottom: 2px; color: var(--text); }
.pwa-prompt .tx p { font-size: var(--fs-xs); color: var(--text-muted); }
.pwa-prompt .actions { flex-shrink: 0; }
.pwa-prompt .close-x {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 28px;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

/* ============================================================
   28. LANDING EXTRAS
   ============================================================ */
.adv-section {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.adv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 768px) { .adv-grid { grid-template-columns: 1fr 1fr; } }

.adv-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-7);
}
.adv-col.trad { opacity: 0.85; }
.adv-col.ai { border-color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), transparent); }
.adv-col h3 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.adv-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
}
.adv-ic {
  width: 28px;
  height: 28px;
  border-radius: var(--r-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--fw-bold);
  flex-shrink: 0;
}
.adv-col.trad .adv-ic { background: var(--danger-soft); color: var(--danger); }
.adv-col.ai .adv-ic { background: var(--success-soft); color: var(--success); }
.adv-item p { font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-relaxed); }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 600px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-7);
  text-align: center;
  position: relative;
  transition: all var(--dur-base);
}
.step:hover { border-color: var(--brand); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-num {
  width: 48px;
  height: 48px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: var(--brand-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-lg);
  font-weight: var(--fw-black);
  margin: 0 auto var(--sp-4);
  box-shadow: var(--shadow-brand);
}
[data-theme="light"] .step-num { color: var(--brand-contrast); }
.step h4 { font-size: var(--fs-md); font-weight: var(--fw-bold); margin-bottom: var(--sp-2); color: var(--text); }
.step p { font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-relaxed); }

.testi-grid {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--sp-3);
  margin-inline: calc(-1 * var(--sp-4));
  padding-inline: var(--sp-4);
}
@media (min-width: 768px) {
  .testi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
}
.testi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 0 0 85%;
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .testi-card { flex: 1; padding: var(--sp-7); gap: var(--sp-4); }
}
.testi-stars { color: var(--warn); font-size: var(--fs-md); letter-spacing: 2px; }
.testi-text { color: var(--text-secondary); font-size: var(--fs-sm); line-height: var(--lh-relaxed); flex: 1; }
.testi-user { display: flex; align-items: center; gap: var(--sp-3); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.testi-ava {
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: var(--brand-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  flex-shrink: 0;
}
[data-theme="light"] .testi-ava { color: var(--brand-contrast); }
.testi-user .nm { font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--text); }
.testi-user .lb { font-size: var(--fs-xs); color: var(--text-muted); }

.cta-banner {
  background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft));
  border: 1px solid var(--brand);
  border-radius: var(--r-2xl);
  padding: var(--sp-10);
  text-align: center;
  margin: var(--sp-8) 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  inset-inline-end: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
  pointer-events: none;
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2, .cta-banner h3 { font-size: var(--fs-4xl); font-weight: var(--fw-black); margin-bottom: var(--sp-3); color: var(--text); letter-spacing: var(--tracking-tighter); }
.cta-banner p { color: var(--text-secondary); margin-bottom: var(--sp-5); font-size: var(--fs-md); max-width: 540px; margin-inline: auto; }

/* ============================================================
   29. PROGRAM DISPLAY (CRITICAL — Mobile-first)
   ============================================================ */
.prog-wrap { background: var(--bg); }
.prog-topbar {
  position: relative;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: var(--header-h);
}
[data-theme="light"] .prog-topbar { background: var(--bg-elevated); }
.prog-topbar .brand-back {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: var(--fw-semibold);
  transition: color var(--dur-base);
  text-decoration: none;
}
.prog-topbar .brand-back:hover { color: var(--brand); }
[data-theme="light"] .prog-topbar .brand-back:hover { color: var(--brand-strong); }
.prog-topbar .brand-name {
  font-weight: var(--fw-extrabold);
  font-size: var(--fs-sm);
  color: var(--brand);
  white-space: nowrap;
}
[data-theme="light"] .prog-topbar .brand-name { color: var(--brand-strong); }
.prog-topbar .btn-dashboard {
  font-size: var(--fs-xs);
  padding: 8px var(--sp-3);
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  white-space: nowrap;
  font-weight: var(--fw-semibold);
  transition: all var(--dur-base);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.prog-topbar .btn-dashboard:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}
[data-theme="light"] .prog-topbar .btn-dashboard:hover { color: var(--brand-strong); }
@media (max-width: 600px) {
  .prog-topbar .brand-name { display: none; }
}

.prog-hero {
  padding: var(--sp-8) var(--sp-4);
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg));
  border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) {
  .prog-hero { padding: var(--sp-10) var(--sp-6); }
}
.prog-hero-inner { max-width: 900px; margin: 0 auto; }
.prog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: var(--sp-3);
}
[data-theme="light"] .prog-eyebrow { color: var(--brand-strong); }
.prog-hero h1 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-black);
  letter-spacing: var(--tracking-tighter);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-3);
  color: var(--text);
}
@media (min-width: 768px) {
  .prog-hero h1 { font-size: var(--fs-5xl); }
}
.v-badge {
  display: inline-block;
  padding: 4px var(--sp-3);
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  margin-inline-end: var(--sp-2);
  vertical-align: middle;
  letter-spacing: var(--tracking-wide);
}
[data-theme="light"] .v-badge { color: var(--brand-strong); }
.prog-sub {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  margin-bottom: var(--sp-5);
  line-height: var(--lh-relaxed);
  max-width: 700px;
}
.prog-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.prog-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  min-width: 0;
  flex: 0 1 auto;
}
.prog-chip .cl {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  white-space: nowrap;
}
.prog-chip .cv {
  font-size: var(--fs-sm);
  color: var(--text);
  font-weight: var(--fw-bold);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .prog-chip { padding: 5px var(--sp-2); }
  .prog-chip .cl { font-size: 9px; }
  .prog-chip .cv { font-size: var(--fs-xs); }
}

/* Day tabs nav */
.prog-nav-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: var(--z-sticky);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-3) 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.prog-nav-inner {
  display: flex;
  gap: var(--sp-2);
  padding: 0 var(--sp-4);
  max-width: 1200px;
  margin: 0 auto;
  scroll-snap-type: x mandatory;
}
.prog-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-base);
  white-space: nowrap;
  scroll-snap-align: start;
  min-height: 44px;
  flex-shrink: 0;
}
.prog-tab:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--text-muted);
}
.prog-tab.on {
  background: var(--brand);
  color: var(--brand-contrast);
  border-color: var(--brand);
}
[data-theme="light"] .prog-tab.on { color: var(--brand-contrast); }
.prog-tab .check-dot {
  display: none;
  width: 18px;
  height: 18px;
  background: var(--success);
  color: white;
  border-radius: var(--r-pill);
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--fw-bold);
}
.prog-tab.completed .check-dot { display: inline-flex; }
.prog-tab.on .check-dot { background: rgba(255,255,255,0.3); color: var(--brand-contrast); }
.prog-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.prog-dot.dp { background: var(--push); }
.prog-dot.dl { background: var(--pull); }
.prog-dot.dg { background: var(--legs); }
.prog-dot.dc { background: var(--core); }
.prog-dot.dr { background: var(--rest); }
.prog-dot.di { background: var(--info); }
.prog-tab.on .prog-dot { box-shadow: 0 0 0 2px rgba(255,255,255,0.4); }

.prog-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-4);
}
@media (min-width: 768px) {
  .prog-main { padding: var(--sp-8) var(--sp-6); }
}

/* Progress bar in program */
.prog-progress-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  flex-wrap: wrap;
}
.prog-progress-bar > .ppb-track { flex: 1; min-width: 200px; order: 2; }
@media (max-width: 480px) {
  .prog-progress-bar > .ppb-track { order: 3; width: 100%; flex: none; }
}

/* View toggle */
.prog-view-toggle { margin-bottom: var(--sp-5); }
.view-toggle-pill {
  display: inline-flex;
  background: var(--surface-hover);
  border-radius: var(--r-md);
  padding: 3px;
}
.view-toggle-pill button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px var(--sp-4);
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-base);
  min-height: 36px;
}
.view-toggle-pill button:hover { color: var(--text); }
.view-toggle-pill button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
  font-weight: var(--fw-bold);
}

/* Calendar view */
.cal-legend {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}
.cal-legend .li { display: inline-flex; align-items: center; gap: 4px; }
.cal-legend .sw { width: 10px; height: 10px; border-radius: var(--r-pill); display: inline-block; }
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-2);
}
.cal-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-3);
  cursor: pointer;
  transition: all var(--dur-base);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.cal-cell:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cal-cell.today { border-color: var(--brand); background: var(--brand-soft); }
[data-theme="light"] .cal-cell.today { background: var(--brand-softer); }
.cal-cell.rest { opacity: 0.6; }
.cal-cell.done { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
[data-theme="light"] .cal-cell.done { color: var(--brand-contrast); }
.cal-day-name { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.cal-cell.done .cal-day-name { color: rgba(255,255,255,0.85); }
.cal-type-pill {
  display: inline-block;
  padding: 2px var(--sp-2);
  background: var(--surface-hover);
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text);
  align-self: flex-start;
}
.cal-cell.done .cal-type-pill { background: rgba(255,255,255,0.2); color: white; }
.cal-type-pill.push-t { background: rgba(255, 61, 110, 0.15); color: var(--push); }
.cal-type-pill.pull-t { background: rgba(77, 168, 255, 0.15); color: var(--pull); }
.cal-type-pill.legs-t { background: rgba(198, 255, 61, 0.15); color: var(--legs); }
.cal-type-pill.core-t { background: rgba(177, 77, 255, 0.15); color: var(--core); }
.cal-type-pill.rest-t { background: rgba(107, 114, 128, 0.15); color: var(--rest); }
.cal-label { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text); margin-top: var(--sp-1); }
.cal-cell.done .cal-label { color: white; }
.cal-desc { font-size: var(--fs-2xs); color: var(--text-muted); line-height: 1.4; }
.cal-cell.done .cal-desc { color: rgba(255,255,255,0.7); }
.cal-go {
  margin-top: auto;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
[data-theme="light"] .cal-go { color: var(--brand-strong); }
.cal-cell.done .cal-go { color: white; }

@media (max-width: 600px) {
  .cal-week { grid-template-columns: repeat(2, 1fr); }
  .cal-cell { min-height: 110px; }
}

/* Info section */
.prog-sec { display: none; animation: fadeInUp var(--dur-base) var(--ease-out); }
.prog-sec.on { display: block; }

.wo, .mcov, .ig { margin-bottom: var(--sp-6); }
.wo h3, .mcov h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-4);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.wk-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-2);
}
@media (max-width: 600px) {
  .wk-row { grid-template-columns: repeat(2, 1fr); }
}
.wd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wd-n { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-bold); }
.wd-t { font-size: var(--fs-2xs); font-weight: var(--fw-bold); padding: 2px var(--sp-2); border-radius: var(--r-sm); align-self: flex-start; }
.wd-t.push-t { background: rgba(255, 61, 110, 0.15); color: var(--push); }
.wd-t.pull-t { background: rgba(77, 168, 255, 0.15); color: var(--pull); }
.wd-t.legs-t { background: rgba(198, 255, 61, 0.15); color: var(--legs); }
.wd-t.core-t { background: rgba(177, 77, 255, 0.15); color: var(--core); }
.wd-t.rest-t { background: rgba(107, 114, 128, 0.15); color: var(--rest); }
.wd-d { font-size: var(--fs-2xs); color: var(--text-secondary); line-height: 1.4; }

.mcov-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
@media (min-width: 600px) {
  .mcov-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .mcov-grid { grid-template-columns: repeat(4, 1fr); }
}
.mcov-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mcov-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text); }
.mcov-freq { font-size: var(--fs-xs); font-weight: var(--fw-bold); padding: 4px var(--sp-2); border-radius: var(--r-sm); }
.mcov-freq.f2 { background: var(--info-soft); color: var(--info); }
.mcov-freq.f3 { background: var(--warn-soft); color: var(--warn); }
.mcov-freq.f4 { background: var(--brand-soft); color: var(--brand); }
[data-theme="light"] .mcov-freq.f4 { color: var(--brand-strong); }

.ig {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 768px) {
  .ig { grid-template-columns: repeat(2, 1fr); }
}
.ic-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}
.ic-card h3 {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-3);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.ic-card ul { display: flex; flex-direction: column; gap: var(--sp-2); }
.ic-card li {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding-inline-start: var(--sp-4);
  position: relative;
  line-height: var(--lh-normal);
}
.ic-card li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: var(--r-pill);
}
[data-theme="light"] .ic-card li::before { background: var(--brand-strong); }
.ic-card p { font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-relaxed); }

.ptab {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ptab th {
  background: var(--surface-hover);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.ptab td {
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  color: var(--text);
}
.ptab td:first-child { font-weight: var(--fw-bold); color: var(--brand); }
[data-theme="light"] .ptab td:first-child { color: var(--brand-strong); }

.warn-box, .mmc-box {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}
.warn-box { background: var(--warn-soft); color: var(--warn); border: 1px solid rgba(251, 191, 36, 0.25); }
.warn-box .ic, .warn-box span:first-child { font-size: 18px; flex-shrink: 0; }
.mmc-box { background: var(--info-soft); color: var(--info); border: 1px solid rgba(77, 168, 255, 0.25); }
.mmc-box span:first-child { font-size: 18px; flex-shrink: 0; }

/* Day header */
.dh {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-4);
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}
.dh-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  font-weight: var(--fw-black);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  flex-shrink: 0;
}
.dh-badge.bp { background: rgba(255, 61, 110, 0.15); color: var(--push); }
.dh-badge.bl { background: rgba(77, 168, 255, 0.15); color: var(--pull); }
.dh-badge.bg { background: rgba(198, 255, 61, 0.15); color: var(--legs); }
.dh-badge.br { background: rgba(107, 114, 128, 0.15); color: var(--rest); }
.dh-badge.bc { background: rgba(177, 77, 255, 0.15); color: var(--core); }

.dh-info { flex: 1; min-width: 200px; }
.dh-info h2 {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-black);
  color: var(--text);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--sp-2);
}
.dh-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dh-tag {
  display: inline-block;
  padding: 4px var(--sp-3);
  background: var(--surface-hover);
  border-radius: var(--r-sm);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
}
.dh-tag.hi { background: var(--brand-soft); color: var(--brand); font-weight: var(--fw-bold); }
[data-theme="light"] .dh-tag.hi { color: var(--brand-strong); }

.day-check-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px var(--sp-4);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--text);
  cursor: pointer;
  transition: all var(--dur-base);
  min-height: 44px;
}
.day-check-btn:hover { border-color: var(--brand); color: var(--brand); }
[data-theme="light"] .day-check-btn:hover { color: var(--brand-strong); }
.day-check-btn.done {
  background: var(--success);
  color: white;
  border-color: var(--success);
}
.day-check-btn .ic {
  width: 20px;
  height: 20px;
  border-radius: var(--r-pill);
  border: 2px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}
.day-check-btn.done .ic { background: white; color: var(--success); border-color: white; }

/* Phase blocks */
.ph { margin-bottom: var(--sp-5); }
.ph-title {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
}
.ph-title .bar {
  width: 4px;
  height: 20px;
  background: var(--brand);
  border-radius: var(--r-sm);
}
[data-theme="light"] .ph-title .bar { background: var(--brand-strong); }
.ph-title .num {
  background: var(--brand-soft);
  color: var(--brand);
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
}
[data-theme="light"] .ph-title .num { color: var(--brand-strong); }

.warmup {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--warn-soft);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--text);
  font-weight: var(--fw-medium);
}
.warmup .ic { color: var(--warn); font-size: 18px; flex-shrink: 0; }

/* Exercise table — mobile-first CRITICAL */
.tw {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--sp-1));
  padding: 0 var(--sp-1);
}
.prog-tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-sm);
  min-width: 720px;
}
.prog-tbl thead th {
  background: var(--surface-hover);
  padding: var(--sp-3) var(--sp-3);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.prog-tbl thead th:first-child { border-start-start-radius: var(--r-md); }
.prog-tbl thead th:last-child { border-start-end-radius: var(--r-md); }
.prog-tbl tbody td {
  padding: var(--sp-4) var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  color: var(--text);
}
.prog-tbl tbody tr { transition: background var(--dur-base); }
.prog-tbl tbody tr:hover { background: var(--surface-hover); }
.prog-tbl tbody tr.act-row { background: rgba(251, 191, 36, 0.04); }
.prog-tbl tbody tr.mmc-row { background: rgba(77, 168, 255, 0.04); }
.prog-tbl tbody tr:last-child td { border-bottom: none; }

.tnum {
  font-weight: var(--fw-bold);
  color: var(--brand);
  text-align: center;
  width: 40px;
}
[data-theme="light"] .tnum { color: var(--brand-strong); }

.ex-name-fa {
  display: block;
  font-weight: var(--fw-bold);
  color: var(--text);
  margin-bottom: 2px;
  font-size: var(--fs-sm);
}
.ex-link {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
[data-theme="light"] .ex-link { color: var(--brand-strong); }
.ex-link:hover { color: var(--brand-strong); }
.ex-name-en {
  display: block;
  font-size: var(--fs-2xs);
  color: var(--text-muted);
  font-style: italic;
}
.atag, .ctag, .stag {
  display: inline-block;
  padding: 2px 6px;
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: var(--r-xs);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  margin-inline-end: 4px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
.ctag { background: var(--info-soft); color: var(--info); }
.stag { background: var(--accent-soft); color: var(--accent); }
[data-theme="light"] .stag { color: var(--accent-strong); }

.sub-btn, .ql-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur-base);
  font-size: 12px;
  margin-inline-start: 4px;
  vertical-align: middle;
}
.sub-btn:hover, .ql-btn:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}
[data-theme="light"] .sub-btn:hover, [data-theme="light"] .ql-btn:hover { color: var(--brand-strong); }

.tb-pill {
  display: inline-block;
  padding: 4px var(--sp-3);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  white-space: nowrap;
}

.sb {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-bold);
  color: var(--text);
}
.sb .sx { color: var(--text-muted); font-weight: var(--fw-normal); }

.rt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}
.rest-timer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: var(--r-sm);
  color: var(--brand);
  cursor: pointer;
  transition: all var(--dur-base);
  font-size: 12px;
}
[data-theme="light"] .rest-timer-btn { color: var(--brand-strong); }
.rest-timer-btn:hover { background: var(--brand); color: var(--brand-contrast); }
[data-theme="light"] .rest-timer-btn:hover { color: var(--brand-contrast); }

.tip {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  max-width: 280px;
}
.tip strong { color: var(--text); }

/* Notes grid */
.ng {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}
@media (min-width: 768px) {
  .ng { grid-template-columns: repeat(2, 1fr); }
  .nc.full { grid-column: span 2; }
}
.nc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}
.nc h4 {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-3);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.nc ul { display: flex; flex-direction: column; gap: var(--sp-2); }
.nc li {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  padding-inline-start: var(--sp-5);
  position: relative;
  line-height: var(--lh-normal);
}
.nc li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro';
  font-weight: 900;
  position: absolute;
  inset-inline-start: 0;
  top: 2px;
  color: var(--brand);
  font-size: 11px;
}
[data-theme="light"] .nc li::before { color: var(--brand-strong); }
.nc p { font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-relaxed); }

/* Mobile exercise cards (alternative to table on small screens) */
.ex-mobile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  display: none;
}
.ex-mc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.ex-mc-num {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: var(--fs-xs);
  flex-shrink: 0;
}
[data-theme="light"] .ex-mc-num { color: var(--brand-strong); }
.ex-mc-name { flex: 1; }
.ex-mc-name-fa { font-weight: var(--fw-bold); color: var(--text); font-size: var(--fs-sm); margin-bottom: 2px; }
.ex-mc-name-en { font-size: var(--fs-2xs); color: var(--text-muted); font-style: italic; }
.ex-mc-actions { display: flex; gap: 4px; }
.ex-mc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.ex-mc-stat {
  background: var(--surface-hover);
  border-radius: var(--r-sm);
  padding: var(--sp-2) var(--sp-3);
}
.ex-mc-stat .lbl { font-size: var(--fs-2xs); color: var(--text-muted); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.ex-mc-stat .val { font-size: var(--fs-sm); color: var(--text); font-weight: var(--fw-bold); margin-top: 2px; }
.ex-mc-tip {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border-subtle);
}

@media (max-width: 767px) {
  .prog-tbl { display: none; }
  .ex-mobile-card { display: block; }
}

/* ============================================================
   30. DASHBOARD EXTRAS
   ============================================================ */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
@media (min-width: 1024px) {
  .dash-two-col { grid-template-columns: 1.4fr 1fr; }
}

.dash-quick-stat {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-2);
  transition: all var(--dur-base);
  text-decoration: none;
  color: inherit;
  min-height: 68px;
}
.dash-quick-stat:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
  background: var(--brand-soft);
}
[data-theme="light"] .dash-quick-stat:hover { background: var(--brand-softer); }
.dash-quick-stat:last-child { margin-bottom: 0; }

.programs-mobile-list { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.program-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--dur-base);
  min-height: 68px;
}
.program-list-item:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.pli-main { flex: 1; min-width: 0; }
.pli-title { font-weight: var(--fw-bold); font-size: var(--fs-sm); margin-bottom: 2px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pli-meta { font-size: var(--fs-xs); color: var(--text-muted); display: flex; gap: 4px; flex-wrap: wrap; }
.pli-side { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; }

@media (min-width: 768px) {
  .programs-mobile-list { display: none; }
  .desktop-only { display: block; }
}
@media (max-width: 767px) {
  .desktop-only { display: none; }
}

/* ============================================================
   31. CALENDAR (Activity calendar page)
   ============================================================ */
.act-cal-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-6); }
.act-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); gap: var(--sp-3); flex-wrap: wrap; }
.act-cal-nav { display: flex; gap: var(--sp-2); }
.act-cal-stat { font-size: var(--fs-sm); color: var(--text-secondary); margin-bottom: var(--sp-1); }
.act-cal-stat .num { font-weight: var(--fw-bold); color: var(--text); font-size: var(--fs-md); }
.act-cal-summary { display: flex; gap: var(--sp-5); flex-wrap: wrap; padding-top: var(--sp-4); border-top: 1px solid var(--border); margin-top: var(--sp-4); }
.act-cal-legend { display: flex; gap: var(--sp-3); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-medium); }
.act-cal-legend .dot { width: 8px; height: 8px; border-radius: var(--r-pill); display: inline-block; margin-inline-end: 4px; vertical-align: middle; }
.act-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.act-cal-dow { text-align: center; font-size: var(--fs-2xs); color: var(--text-muted); padding: 4px 0; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.act-cal-day {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: var(--sp-1);
  font-size: var(--fs-2xs);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 0;
  color: var(--text-secondary);
}
.act-cal-day.today { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: var(--fw-bold); }
[data-theme="light"] .act-cal-day.today { color: var(--brand-strong); background: var(--brand-softer); }
.act-cal-day.has-activity { background: var(--brand); color: #FFFFFF; border-color: var(--brand); font-weight: var(--fw-bold); }
[data-theme="light"] .act-cal-day.has-activity { background: #5B8C00; color: #FFFFFF; border-color: #5B8C00; }
.act-cal-day.has-activity .day-num { color: #FFFFFF; }
.act-cal-day.has-activity .day-icons i { color: #FFFFFF; }
.act-cal-day.rest { opacity: 0.4; }

/* Day icons inside calendar cells — colored by activity type for high contrast */
.day-icons { display: flex; gap: 2px; align-items: center; justify-content: center; font-size: 9px; line-height: 1; margin-top: 2px; }
.day-icons i { color: var(--text-muted); }
.act-cal-day.has-activity .day-icons i { color: #FFFFFF; }
.act-cal-day.today .day-icons i { color: var(--brand); }
[data-theme="light"] .act-cal-day.today .day-icons i { color: var(--brand-strong); }
.day-num { font-weight: var(--fw-bold); color: var(--text); }
.act-cal-day.has-activity .day-num { color: #FFFFFF; }
.act-cal-day.today .day-num { color: var(--brand); }
[data-theme="light"] .act-cal-day.today .day-num { color: var(--brand-strong); }

.cal-cell-2 {
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--sp-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  transition: all var(--dur-base);
  min-height: 44px;
}
.cal-cell-2:hover { border-color: var(--brand); }
.cal-cell-2.today { border-color: var(--brand); background: var(--brand-soft); }
[data-theme="light"] .cal-cell-2.today { background: var(--brand-softer); }
.cal-cell-2.has-activity { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: var(--fw-bold); }
[data-theme="light"] .cal-cell-2.has-activity { color: var(--brand-strong); background: var(--brand-softer); }
.cal-cell-2.rest { opacity: 0.5; }

/* ============================================================
   32. CHARTS
   ============================================================ */
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-6); }
.chart-container { margin-top: var(--sp-4); }
.chart-sub { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-2); }
.chart-summary { display: flex; gap: var(--sp-5); flex-wrap: wrap; padding-top: var(--sp-4); border-top: 1px solid var(--border); margin-top: var(--sp-4); }
.chart-summary-item { font-size: var(--fs-sm); }
.chart-summary-item .lbl { color: var(--text-muted); display: block; margin-bottom: 2px; font-weight: var(--fw-medium); }
.chart-summary-item .val { font-weight: var(--fw-bold); color: var(--text); font-size: var(--fs-lg); }
.chart-metric-toggle { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.chart-metric-btn { padding: 8px var(--sp-3); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-secondary); cursor: pointer; transition: all var(--dur-base); min-height: 32px; }
.chart-metric-btn:hover { border-color: var(--brand); color: var(--brand); }
[data-theme="light"] .chart-metric-btn:hover { color: var(--brand-strong); }
.chart-metric-btn.active { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
[data-theme="light"] .chart-metric-btn.active { color: var(--brand-contrast); }
.axis-text { font-size: var(--fs-2xs); fill: var(--text-muted); }
.data-point { fill: var(--brand); }
[data-theme="light"] .data-point { fill: var(--brand-strong); }
.area-fill { fill: var(--brand-soft); }

.bar-chart { display: flex; align-items: flex-end; gap: var(--sp-2); height: 220px; padding: var(--sp-3) 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.bar-fill { width: 100%; max-width: 36px; background: linear-gradient(180deg, var(--brand), var(--brand-strong)); border-radius: var(--r-xs) var(--r-xs) 0 0; transition: height var(--dur-slow) var(--ease-out); min-height: 4px; box-shadow: 0 0 8px var(--brand-glow); display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; }
[data-theme="light"] .bar-fill { background: linear-gradient(180deg, var(--brand), var(--brand-strong)); }
.bar-fill:hover { filter: brightness(1.15); }
.bar-label { font-size: var(--fs-2xs); color: var(--text-muted); white-space: nowrap; }
.bar-val { font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: var(--text); }

/* Donut chart */
.donut-wrap { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; justify-content: center; padding: var(--sp-4) 0; }
.donut-svg { width: 160px; height: 160px; flex-shrink: 0; }
.donut-svg circle { fill: none; stroke-width: 16; transition: stroke-dashoffset var(--dur-slow); }
.donut-svg circle:first-child { stroke: var(--surface-hover); }
.donut-svg circle:last-child { stroke: var(--brand); }
[data-theme="light"] .donut-svg circle:last-child { stroke: var(--brand-strong); }
.donut-center { fill: var(--text); font-size: 22px; font-weight: var(--fw-black); text-anchor: middle; dominant-baseline: middle; }
.donut-legend { display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; min-width: 140px; }
.donut-legend .li { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-secondary); }
.donut-legend .li strong { color: var(--text); }
.donut-legend .sw { width: 12px; height: 12px; border-radius: var(--r-xs); display: inline-block; flex-shrink: 0; }

/* ============================================================
   33. DAY ICONS / WATER / ETC
   ============================================================ */
.day-icons { display: flex; gap: 4px; align-items: center; }
.day-num { font-weight: var(--fw-bold); color: var(--brand); }
[data-theme="light"] .day-num { color: var(--brand-strong); }
.day-water-bar { background: var(--surface-hover); border-radius: var(--r-pill); height: 6px; overflow: hidden; margin-top: var(--sp-1); }
.day-water-fill { height: 100%; background: linear-gradient(90deg, var(--info), #6FB7FF); border-radius: var(--r-pill); }

.day-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
}
.day-icon { width: 10px; height: 10px; border-radius: var(--r-pill); display: inline-block; }
.day-icon.push { background: var(--push); }
.day-icon.pull { background: var(--pull); }
.day-icon.legs { background: var(--legs); }
.day-icon.rest { background: var(--rest); }
.day-icon.core { background: var(--core); }

.cal-week-2 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day-name { text-align: center; font-size: var(--fs-2xs); color: var(--text-muted); padding: 4px 0; font-weight: var(--fw-bold); }
.cal-type-pill-2 { display: inline-block; padding: 2px var(--sp-2); background: var(--surface-hover); border-radius: var(--r-pill); font-size: var(--fs-2xs); font-weight: var(--fw-bold); }
.cal-go-2 { padding: 8px var(--sp-3); background: var(--brand-soft); border: 1px solid var(--brand); color: var(--brand); border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: var(--fw-bold); cursor: pointer; min-height: 36px; }
[data-theme="light"] .cal-go-2 { color: var(--brand-strong); }
.cal-label { font-size: var(--fs-xs); color: var(--text-muted); }
.cal-desc { font-size: var(--fs-sm); color: var(--text-secondary); }
.cal-legend-2 { display: flex; gap: var(--sp-3); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--sp-3); font-weight: var(--fw-medium); }
.cal-legend-2 .dot { width: 8px; height: 8px; border-radius: var(--r-pill); display: inline-block; margin-inline-end: 4px; vertical-align: middle; }

/* ============================================================
   34. MISC LEGACY COMPAT
   ============================================================ */
.tag { display: inline-block; padding: 2px var(--sp-2); background: var(--surface-hover); border-radius: var(--r-sm); font-size: var(--fs-xs); color: var(--text-secondary); }
.cols-3 { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
@media (min-width: 600px) { .cols-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2-md { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 900px) { .grid-2-md { grid-template-columns: repeat(2, 1fr); } }

.ci-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border-subtle); }
.ci-row:last-child { border-bottom: none; }
.ci-ic { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; color: var(--brand); }
[data-theme="light"] .ci-ic { color: var(--brand-strong); }
.ci-lbl { flex: 1; font-size: var(--fs-sm); color: var(--text-secondary); }
.ci-val { font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--text); }
.ao-lb { font-size: var(--fs-sm); font-weight: var(--fw-bold); margin-bottom: var(--sp-1); color: var(--text); }
.ao-mult { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.bps-bar-wrap { background: var(--surface-hover); border-radius: var(--r-pill); height: 6px; overflow: hidden; margin: var(--sp-2) 0; }
.bps-bar-fill { height: 100%; background: var(--brand); border-radius: var(--r-pill); transition: width var(--dur-slow); }
.bps-count { font-size: var(--fs-3xl); font-weight: var(--fw-black); color: var(--text); letter-spacing: var(--tracking-tighter); }
.bps-label { font-size: var(--fs-sm); color: var(--text-muted); }
.bps-bar { background: var(--surface-hover); border-radius: var(--r-pill); height: 6px; overflow: hidden; }

.cc-ic { font-size: 24px; line-height: 1; margin-bottom: var(--sp-1); }
.cc-lb { font-size: var(--fs-xs); color: var(--text-muted); }

/* Calculator */
.calc-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); margin-bottom: var(--sp-4); }
@media (min-width: 600px) { .calc-grid { grid-template-columns: repeat(2, 1fr); } }
.calc-input-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4); }
.calc-result-card { background: linear-gradient(135deg, var(--brand-soft), transparent); border: 1px solid var(--brand); border-radius: var(--r-lg); padding: var(--sp-6); text-align: center; margin-top: var(--sp-4); }
.calc-big-result { font-size: 64px; font-weight: var(--fw-black); color: var(--brand); line-height: 1; letter-spacing: var(--tracking-tighter); }
[data-theme="light"] .calc-big-result { color: var(--brand-strong); }
.calc-formula-box { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3); font-family: var(--font-mono); font-size: var(--fs-sm); margin-top: var(--sp-3); color: var(--text-secondary); }
.calc-rm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); margin-top: var(--sp-3); }

/* Badges grid */
.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
@media (min-width: 600px) { .badge-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .badge-grid { grid-template-columns: repeat(4, 1fr); } }
.badge-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-5); text-align: center; transition: all var(--dur-base); }
.badge-card.earned { border-color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), transparent); }
[data-theme="light"] .badge-card.earned { background: linear-gradient(135deg, var(--brand-softer), transparent); }
.badge-card.locked { opacity: 0.5; filter: grayscale(0.8); }
.badge-icon { font-size: 36px; line-height: 1; margin-bottom: var(--sp-2); color: var(--brand); }
[data-theme="light"] .badge-icon { color: var(--brand-strong); }
.badge-title { font-size: var(--fs-sm); font-weight: var(--fw-bold); margin-bottom: var(--sp-1); color: var(--text); }
.badge-desc { font-size: var(--fs-xs); color: var(--text-muted); line-height: var(--lh-normal); }
.badge-progress-summary { margin-top: var(--sp-3); }

/* Leaderboard */
.leaderboard-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border-subtle); transition: background var(--dur-base); }
.leaderboard-row:hover { background: var(--surface-hover); }
.leaderboard-row.me { background: var(--brand-soft); }
[data-theme="light"] .leaderboard-row.me { background: var(--brand-softer); }
.leaderboard-rank {
  width: 36px;
  height: 36px;
  border-radius: var(--r-pill);
  background: var(--surface-hover);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  flex-shrink: 0;
}
.leaderboard-rank.gold { background: linear-gradient(135deg, #FFD700, #FFA500); color: #4A2C00; }
.leaderboard-rank.silver { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); color: #2A2A2A; }
.leaderboard-rank.bronze { background: linear-gradient(135deg, #CD7F32, #A0522D); color: white; }
.leaderboard-row.me .leaderboard-rank { background: var(--brand); color: var(--brand-contrast); }

/* Affiliate */
.affiliate-card { background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft)); border: 1px solid var(--brand); border-radius: var(--r-xl); padding: var(--sp-6); }
[data-theme="light"] .affiliate-card { background: linear-gradient(135deg, var(--brand-softer), var(--accent-soft)); }

/* Pagination */
.pagination { display: flex; gap: var(--sp-1); justify-content: center; padding: var(--sp-4) 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 8px var(--sp-3); border-radius: var(--r-md); font-size: var(--fs-sm); font-weight: var(--fw-bold); border: 1px solid var(--border); color: var(--text-secondary); min-width: 36px; text-align: center; background: var(--surface); }
.pagination a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
[data-theme="light"] .pagination a:hover { color: var(--brand-strong); background: var(--brand-softer); }
.pagination .current { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
[data-theme="light"] .pagination .current { color: var(--brand-contrast); }

/* Article / blog */
.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all var(--dur-base);
  display: block;
}
.article-card:hover { border-color: var(--brand); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.article-cover { aspect-ratio: 16/9; background: var(--bg-subtle); overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; font-size: 56px; color: var(--brand); }
[data-theme="light"] .article-cover { color: var(--brand-strong); }
.article-body { padding: var(--sp-5); }
.article-meta { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: var(--sp-2); display: flex; gap: var(--sp-2); align-items: center; }
.article-excerpt { font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-relaxed); margin-top: var(--sp-2); }
.article-cat {
  position: absolute;
  top: var(--sp-2);
  inset-inline-start: var(--sp-2);
  background: var(--brand);
  color: var(--brand-contrast);
  padding: 4px var(--sp-2);
  border-radius: var(--r-sm);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}
[data-theme="light"] .article-cat { color: var(--brand-contrast); }
.article-meta .views { margin-inline-start: auto; }

.blog-grid {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--sp-3);
  margin-inline: calc(-1 * var(--sp-4));
  padding-inline: var(--sp-4);
}
.blog-grid > .article-card {
  flex: 0 0 80%;
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
  .blog-grid > .article-card { flex: 1; }
}
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-filter { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.blog-hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-8); margin-bottom: var(--sp-6); text-align: center; }

.article-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-8); }
.ad-body { line-height: var(--lh-relaxed); color: var(--text-secondary); font-size: var(--fs-md); }
.ad-body p { margin-bottom: var(--sp-4); }
.ad-body h2, .ad-body h3 { color: var(--text); margin: var(--sp-6) 0 var(--sp-3); }
.ad-body ul, .ad-body ol { margin: var(--sp-4) 0; padding-inline-start: var(--sp-6); }
.ad-body li { margin-bottom: var(--sp-2); }
.ad-cover { aspect-ratio: 16/9; background: var(--bg-subtle); border-radius: var(--r-lg); margin-bottom: var(--sp-6); display: flex; align-items: center; justify-content: center; font-size: 80px; color: var(--brand); }
[data-theme="light"] .ad-cover { color: var(--brand-strong); }
.ad-meta { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-4); display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* Comments */
.comment-item {
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-3);
  transition: all var(--dur-base);
}
.comment-item:hover { border-color: var(--border-strong); }
.comment-item.pending { background: var(--warn-soft); border-color: rgba(251, 191, 36, 0.25); }
.comment-meta { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.comment-ava { width: 36px; height: 36px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: var(--fw-bold); }
[data-theme="light"] .comment-ava { color: var(--brand-strong); background: var(--brand-softer); }
.comment-author { font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--text); }
.comment-date { font-size: var(--fs-xs); color: var(--text-muted); }
.comment-body { font-size: var(--fs-sm); color: var(--text-secondary); line-height: var(--lh-relaxed); }
.comment-form { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-4); margin-top: var(--sp-4); }
.comments-section { margin-top: var(--sp-8); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-6); }
.comments-count { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin-bottom: var(--sp-4); color: var(--text); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: var(--sp-2); }
.comments-empty { text-align: center; padding: var(--sp-8); color: var(--text-muted); font-size: var(--fs-sm); }
.comment-reply { margin-inline-start: var(--sp-6); margin-top: var(--sp-3); }
.comment-badge { display: inline-block; padding: 2px var(--sp-2); background: var(--brand-soft); color: var(--brand); border-radius: var(--r-xs); font-size: 10px; font-weight: var(--fw-bold); margin-inline-start: var(--sp-2); }
[data-theme="light"] .comment-badge { color: var(--brand-strong); background: var(--brand-softer); }
.comment-text { font-size: var(--fs-sm); color: var(--text); line-height: var(--lh-relaxed); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--sp-6); }
.contact-info-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.contact-info-item:last-child { border-bottom: none; }
.contact-info-ic {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
[data-theme="light"] .contact-info-ic { color: var(--brand-strong); }
.contact-info-text .lbl { font-size: var(--fs-xs); color: var(--text-muted); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.contact-info-text .val { font-size: var(--fs-sm); color: var(--text); font-weight: var(--fw-bold); margin-top: 2px; }

/* FAQ */
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: var(--sp-2); overflow: hidden; }
.faq-q {
  padding: var(--sp-4) var(--sp-5);
  font-weight: var(--fw-bold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 60px;
  color: var(--text);
  font-size: var(--fs-md);
  list-style: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-a { padding: 0 var(--sp-5) var(--sp-5); color: var(--text-secondary); font-size: var(--fs-sm); line-height: var(--lh-relaxed); }
.faq-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  transition: transform var(--dur-base);
}
[data-theme="light"] .faq-icon { color: var(--brand-strong); }
details[open] .faq-icon { transform: rotate(45deg); }

/* Body type */
.bt-ic, .bt-name, .bt-desc { margin-bottom: var(--sp-1); }
.bt-ic { font-size: 32px; line-height: 1; color: var(--brand); }
[data-theme="light"] .bt-ic { color: var(--brand-strong); }
.bt-name { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text); }
.bt-desc { font-size: var(--fs-sm); color: var(--text-secondary); }

/* Compare grid */
.compare-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); margin: var(--sp-5) 0; }
@media (min-width: 768px) { .compare-grid { grid-template-columns: 1fr 1fr; } }
.compare-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--sp-6); }
.compare-col h4 { font-size: var(--fs-md); font-weight: var(--fw-bold); margin-bottom: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--border); color: var(--text); }
.compare-item { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; font-size: var(--fs-sm); color: var(--text-secondary); }
.compare-icon { color: var(--success); }

/* Misc */
.accent { color: var(--brand); }
[data-theme="light"] .accent { color: var(--brand-strong); }
.arrow { color: var(--brand); }
[data-theme="light"] .arrow { color: var(--brand-strong); }
.atag, .ctag { display: inline-block; padding: 2px var(--sp-2); background: var(--surface-hover); border-radius: var(--r-xs); font-size: var(--fs-xs); color: var(--text-secondary); }
.avatar { width: 40px; height: 40px; border-radius: var(--r-pill); background: var(--brand); color: var(--brand-contrast); display: flex; align-items: center; justify-content: center; font-weight: var(--fw-bold); flex-shrink: 0; }
[data-theme="light"] .avatar { color: var(--brand-contrast); }
.author { font-weight: var(--fw-bold); font-size: var(--fs-sm); color: var(--text); }
.bg { background: var(--surface-hover); border-radius: var(--r-md); padding: var(--sp-2); }
.actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.admin-head { background: var(--bg-elevated); border-bottom: 1px solid var(--border); padding: var(--sp-3) var(--sp-4); display: flex; align-items: center; justify-content: space-between; }
.completed, .done { color: var(--success); }
.current { color: var(--brand); }
[data-theme="light"] .current { color: var(--brand-strong); }
.earned { color: var(--brand); }
[data-theme="light"] .earned { color: var(--brand-strong); }
.goal-met { color: var(--success); font-weight: var(--fw-bold); }
.locked { opacity: 0.5; filter: grayscale(0.8); }
.pending { color: var(--warn); }
.pr { color: var(--brand); font-weight: var(--fw-bold); }
[data-theme="light"] .pr { color: var(--brand-strong); }
.archived { color: var(--text-muted); }
.unread { background: var(--brand-soft); }
[data-theme="light"] .unread { background: var(--brand-softer); }
.has-activity, .has-pr { background: var(--brand-soft); }
[data-theme="light"] .has-activity, [data-theme="light"] .has-pr { background: var(--brand-softer); }
.rest { opacity: 0.5; }
.active { color: var(--brand); font-weight: var(--fw-bold); }
[data-theme="light"] .active { color: var(--brand-strong); }
.all { font-size: var(--fs-xs); color: var(--text-muted); }
.count { display: inline-block; min-width: 20px; padding: 2px 6px; background: var(--surface-hover); border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-secondary); }

.tag-gold { background: var(--brand-soft); color: var(--brand); }
[data-theme="light"] .tag-gold { color: var(--brand-strong); }
.kbd { display: inline-block; padding: 2px 6px; background: var(--surface-hover); border: 1px solid var(--border); border-radius: var(--r-xs); font-family: var(--font-mono); font-size: var(--fs-xs); }
.divider { height: 1px; background: var(--border); margin: var(--sp-4) 0; }

/* Generate page multi-step */
.gen-step-indicator {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.gen-step {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--text-muted);
}
.gen-step.active { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }
[data-theme="light"] .gen-step.active { color: var(--brand-contrast); }
.gen-step.done { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
[data-theme="light"] .gen-step.done { color: var(--brand-strong); }
.gen-step-num {
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--surface-hover);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
}
.gen-step.active .gen-step-num {
  background: rgba(14, 17, 22, 0.25);
  color: #0E1116;
  backdrop-filter: blur(4px);
}
[data-theme="light"] .gen-step.active .gen-step-num {
  background: rgba(255, 255, 255, 0.9);
  color: #5B8C00;
}
.gen-step.done .gen-step-num { background: var(--brand); color: var(--brand-contrast); }
[data-theme="light"] .gen-step.done .gen-step-num { background: #5B8C00; color: #FFFFFF; }

.gen-section { display: none; }
.gen-section.on { display: block; animation: fadeInUp var(--dur-base) var(--ease-out); }

.gen-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.gen-summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
}
.gen-summary-row:last-child { border-bottom: none; }
.gen-summary-row .lbl { color: var(--text-muted); }
.gen-summary-row .val { font-weight: var(--fw-bold); color: var(--text); }

/* Activity options grid (generate page) */
.activity-select {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}
@media (min-width: 600px) {
  .activity-select { grid-template-columns: repeat(2, 1fr); }
}

/* Loading screen for program generation */
.gen-loading {
  text-align: center;
  padding: var(--sp-12) var(--sp-4);
}
.gen-loading-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--sp-6);
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  animation: glow 2s ease-in-out infinite;
}
[data-theme="light"] .gen-loading-icon { color: var(--brand-strong); }
.gen-loading h2 { font-size: var(--fs-3xl); font-weight: var(--fw-black); margin-bottom: var(--sp-3); color: var(--text); letter-spacing: var(--tracking-tighter); }
.gen-loading p { color: var(--text-secondary); font-size: var(--fs-md); max-width: 480px; margin: 0 auto var(--sp-6); line-height: var(--lh-relaxed); }
.gen-loading-steps {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  max-width: 480px;
  margin: 0 auto;
  text-align: right;
}
.gen-loading-step {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
  opacity: 0.5;
  transition: all var(--dur-base);
}
.gen-loading-step.active { opacity: 1; border-color: var(--brand); background: var(--brand-soft); color: var(--text); }
[data-theme="light"] .gen-loading-step.active { background: var(--brand-softer); }
.gen-loading-step.done { opacity: 1; color: var(--success); }
.gen-loading-step .ic {
  width: 28px;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--surface-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.gen-loading-step.active .ic { background: var(--brand); color: var(--brand-contrast); }
[data-theme="light"] .gen-loading-step.active .ic { color: var(--brand-contrast); }
.gen-loading-step.done .ic { background: var(--success); color: white; }

/* Affiliate stats */
.affiliate-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
@media (min-width: 600px) { .affiliate-stat-grid { grid-template-columns: repeat(4, 1fr); } }
.affiliate-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  text-align: center;
}
.affiliate-stat .num { font-size: var(--fs-3xl); font-weight: var(--fw-black); color: var(--brand); line-height: 1; letter-spacing: var(--tracking-tighter); }
[data-theme="light"] .affiliate-stat .num { color: var(--brand-strong); }
.affiliate-stat .lb { font-size: var(--fs-xs); color: var(--text-muted); margin-top: var(--sp-2); font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: var(--tracking-wide); }

.referral-code-box {
  background: var(--surface);
  border: 2px dashed var(--brand);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  text-align: center;
  margin-bottom: var(--sp-4);
}
.referral-code {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-black);
  color: var(--brand);
  letter-spacing: var(--tracking-wider);
  font-family: var(--font-mono);
  margin: var(--sp-2) 0;
}
[data-theme="light"] .referral-code { color: var(--brand-strong); }

/* Reward tiers */
.reward-tier {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}
.reward-tier.achieved { border-color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), transparent); }
[data-theme="light"] .reward-tier.achieved { background: linear-gradient(135deg, var(--brand-softer), transparent); }
.reward-tier-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
[data-theme="light"] .reward-tier-icon { color: var(--brand-strong); }
.reward-tier-info { flex: 1; }
.reward-tier-name { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--text); margin-bottom: 2px; }
.reward-tier-desc { font-size: var(--fs-xs); color: var(--text-muted); }
.reward-tier-status { font-size: var(--fs-xs); font-weight: var(--fw-bold); padding: 4px var(--sp-3); border-radius: var(--r-pill); }
.reward-tier-status.achieved { background: var(--success-soft); color: var(--success); }
.reward-tier-status.pending { background: var(--surface-hover); color: var(--text-muted); }

/* Settings tabs (admin) */
.settings-section { margin-bottom: var(--sp-6); }
.settings-section-title {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
}

/* API key card (admin) */
.api-key-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.api-key-card.active { border-color: var(--brand); background: linear-gradient(135deg, var(--brand-soft), transparent); }
[data-theme="light"] .api-key-card.active { background: linear-gradient(135deg, var(--brand-softer), transparent); }
.api-key-info { flex: 1; min-width: 200px; }
.api-key-name { font-weight: var(--fw-bold); color: var(--text); font-size: var(--fs-sm); }
.api-key-meta { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; }

/* Stats card variant (small) */
.mini-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.mini-stat .ic {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
[data-theme="light"] .mini-stat .ic { color: var(--brand-strong); }
.mini-stat .info { flex: 1; }
.mini-stat .num { font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--text); line-height: 1; }
.mini-stat .lb { font-size: var(--fs-2xs); color: var(--text-muted); font-weight: var(--fw-medium); margin-top: 2px; }

/* Print */
@media print {
  .site-header, .site-footer, .bottom-nav, .app-sidebar, .scroll-top, .sidebar-toggle, .prog-topbar, .prog-nav-wrap, .prog-view-toggle, .timer-modal, .quicklog-modal, .day-check-btn, .sub-btn, .ql-btn, .rest-timer-btn, .floating-chip, .phone-mock { display: none !important; }
  body { background: white !important; color: #000 !important; }
  .prog-wrap, .prog-hero, .prog-main { background: white !important; }
  .prog-hero { padding: 0 0 12px 0 !important; border-bottom: 2px solid #000; margin-bottom: 16px; }
  .prog-hero h1 { color: #000 !important; font-size: 24px !important; }
  .prog-sub { color: #333 !important; }
  .prog-eyebrow { color: #000 !important; }
  .v-badge { background: #eee !important; color: #000 !important; border: 1px solid #999; }
  .prog-chip { background: #f5f5f5 !important; border: 1px solid #ccc !important; }
  .prog-chip .cl { color: #666 !important; }
  .prog-chip .cv { color: #000 !important; }
  /* Show ALL day sections when printing */
  .prog-sec { display: block !important; page-break-after: always; }
  .prog-sec:last-child { page-break-after: auto; }
  .dh { border-bottom: 2px solid #000 !important; }
  .dh-badge { background: #eee !important; color: #000 !important; border: 1px solid #999; }
  .dh-info h2 { color: #000 !important; }
  .dh-tag { background: #f5f5f5 !important; color: #333 !important; }
  .dh-tag.hi { background: #eee !important; color: #000 !important; }
  .ph-title { color: #000 !important; border-bottom: 1px solid #999 !important; }
  .ph-title .bar { background: #000 !important; }
  .ph-title .num { background: #eee !important; color: #000 !important; }
  .prog-tbl { min-width: 0 !important; width: 100% !important; }
  .prog-tbl thead th { background: #eee !important; color: #000 !important; border-bottom: 1px solid #999; }
  .prog-tbl tbody td { color: #000 !important; border-bottom: 1px solid #ccc; }
  .ex-name-fa { color: #000 !important; }
  .ex-name-en { color: #666 !important; }
  .ex-link { color: #000 !important; text-decoration: underline; }
  .tnum { color: #000 !important; }
  .tb-pill { background: #f5f5f5 !important; color: #333 !important; border: 1px solid #ccc; }
  .sb { color: #000 !important; }
  .rt { color: #333 !important; }
  .tip { color: #333 !important; }
  .tip strong { color: #000 !important; }
  .warmup { background: #fff8e1 !important; border: 1px solid #ccc; color: #000 !important; }
  .warn-box, .mmc-box { background: #fff8e1 !important; color: #000 !important; border: 1px solid #ccc; }
  .nc { background: #f9f9f9 !important; border: 1px solid #ccc !important; page-break-inside: avoid; }
  .nc h4 { color: #000 !important; }
  .nc li { color: #333 !important; }
  .nc li::before { color: #000 !important; }
  .atag, .ctag, .stag { background: #eee !important; color: #000 !important; }
  .card { background: white !important; border: 1px solid #ccc !important; box-shadow: none !important; }
  .ppb-track { background: #eee !important; }
  .ppb-fill { background: #000 !important; }
  .ppb-label { color: #000 !important; }
  .wd { background: #f9f9f9 !important; border: 1px solid #ccc !important; }
  .wd-t { background: #eee !important; color: #000 !important; }
  .mcov-item { background: #f9f9f9 !important; border: 1px solid #ccc !important; }
  .mcov-freq { background: #eee !important; color: #000 !important; }
  .ig .ic-card { background: #f9f9f9 !important; border: 1px solid #ccc !important; }
  .ic-card h3 { color: #000 !important; }
  .ic-card li { color: #333 !important; }
  .ic-card li::before { background: #000 !important; }
  .ptab { border: 1px solid #ccc !important; }
  .ptab th { background: #eee !important; color: #000 !important; }
  .ptab td { color: #000 !important; }
  .ptab td:first-child { color: #000 !important; }
  .prog-progress-bar { background: #f5f5f5 !important; border: 1px solid #ccc !important; }
  /* Hide mobile cards in print, show table */
  .ex-mobile-card { display: none !important; }
  .prog-tbl { display: table !important; }
  .tw { overflow: visible !important; }
}

/* High contrast */
@media (prefers-contrast: high) {
  :root { --border: var(--text-muted); }
  .btn { border-width: 2px; }
}

/* Legacy surf tokens (compat) */
:root {
  --surf1: var(--bg-elevated);
  --surf2: var(--surface);
  --surf3: var(--surface-hover);
  --bg-2: var(--bg-subtle);
  --border2: var(--border-strong);
  --text-2: var(--text-secondary);
  --muted: var(--text-muted);
  --dim: var(--text-muted);
  --gold: var(--brand);
  --gold2: var(--brand-strong);
  --gold-dim: var(--brand-soft);
  --gold-glow: var(--brand-glow);
  --gold-glow-legacy: var(--brand-glow);
  --shadow: var(--shadow-md);
  --shadow-gold: var(--shadow-brand);
  --r: var(--r-xl);
  --r-md-old: var(--r-md);
  --r-sm-old: var(--r-sm);
}
[data-theme="light"] {
  --gold: var(--brand);
  --gold2: var(--brand-strong);
  --gold-dim: var(--brand-soft);
  --gold-glow: var(--brand-glow);
}
