/* FuelPhysique Editorial Performance — shared visual and responsive layer. */

:root {
  --fp-ink: #10131a;
  --fp-midnight: #10182b;
  --fp-midnight-soft: #172238;
  --fp-graphite: var(--fp-midnight);
  --fp-graphite-soft: var(--fp-midnight-soft);
  --fp-glacier: #eef3fb;
  --fp-glacier-surface: #f7f9fe;
  --fp-cool-blue: #e8eefa;
  --fp-paper: var(--fp-glacier-surface);
  --fp-paper-soft: var(--fp-glacier);
  --fp-ultramarine: #304ffe;
  --fp-ultramarine-strong: #243be8;
  --fp-ultramarine-soft: #e7ebff;
  --fp-coach: #18a979;
  --fp-nutrition: #e99a28;
  --fp-progress: #7957e8;
  --fp-social: #d54d79;
  --fp-steel: #73809a;
  --fp-steel-light: #a8b1c1;
  --fp-steel-dark: var(--fp-steel);
  --fp-border-light: #d3dae8;
  --fp-border-dark: #292d35;
  --fp-bg-deep: var(--fp-ink);
  --fp-bg-page: var(--fp-graphite);
  --fp-bg-section: var(--fp-graphite-soft);
  --fp-surface: var(--fp-graphite-soft);
  --fp-surface-raised: #22262d;
  --fp-surface-soft: var(--fp-border-dark);
  --fp-surface-input: var(--fp-ink);
  --fp-nav-surface: var(--fp-ink);
  --fp-border: var(--fp-border-dark);
  --fp-border-strong: #414754;
  --fp-text-primary: var(--fp-paper);
  --fp-text-secondary: var(--fp-border-light);
  --fp-text-muted: var(--fp-steel-light);
  --fp-text-inverse: var(--fp-paper);
  --fp-brand-primary: var(--fp-ultramarine);
  --fp-brand-primary-hover: #4661ff;
  --fp-brand-primary-active: var(--fp-ultramarine-strong);
  --fp-brand-secondary: var(--fp-ultramarine);
  --fp-brand-secondary-hover: #4661ff;
  --fp-brand-primary-soft: rgba(48, 79, 254, 0.18);
  --fp-brand-primary-softer: rgba(48, 79, 254, 0.09);
  --fp-brand-secondary-soft: rgba(48, 79, 254, 0.18);
  --fp-highlight: var(--fp-ultramarine);
  --fp-highlight-soft: rgba(48, 79, 254, 0.18);
  --fp-success: #62b37c;
  --fp-warning: #d8a542;
  --fp-danger: #e05a67;
  --fp-info: var(--fp-steel);
  --fp-success-soft: rgba(98, 179, 124, 0.16);
  --fp-warning-soft: rgba(216, 165, 66, 0.16);
  --fp-danger-soft: rgba(224, 90, 103, 0.16);
  --fp-info-soft: rgba(168, 177, 193, 0.16);
  --fp-focus-ring: #8292ff;
  --fp-hover-surface: rgba(255, 255, 255, 0.045);
  --fp-active-surface: rgba(48, 79, 254, 0.14);
  --fp-shadow-soft: 0 16px 48px rgba(0, 0, 0, 0.28);
  --fp-shadow-raised: 0 24px 64px rgba(0, 0, 0, 0.42);
  --fp-cat-workout: var(--fp-ultramarine);
  --fp-cat-nutrition: var(--fp-nutrition);
  --fp-cat-progress: var(--fp-progress);
  --fp-cat-coach: var(--fp-coach);
  --fp-cat-social: var(--fp-social);
  --fp-cat-workout-soft: var(--fp-brand-primary-soft);
  --fp-cat-nutrition-soft: rgba(233, 154, 40, 0.14);
  --fp-cat-progress-soft: rgba(121, 87, 232, 0.14);
  --fp-cat-coach-soft: rgba(24, 169, 121, 0.14);
  --fp-cat-social-soft: rgba(213, 77, 121, 0.14);
  --fp-chart-1: var(--fp-ultramarine);
  --fp-chart-2: var(--fp-paper);
  --fp-chart-3: var(--fp-success);
  --fp-chart-4: var(--fp-warning);
  --fp-chart-5: var(--fp-danger);
  --fp-chart-grid: var(--fp-border-dark);
  --fp-chart-axis: var(--fp-steel-dark);
  --fp-chart-label: var(--fp-border-light);
  --fp-chart-tooltip-bg: #22262d;
  --fp-chart-tooltip-text: var(--fp-paper);
  --fp-radius-xs: 2px;
  --fp-radius-sm: 4px;
  --fp-radius-md: 6px;
  --fp-radius-lg: 8px;
  --fp-content: min(1180px, calc(100vw - 48px));
  --fp-display: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  --fp-ui: Inter, "Segoe UI", Arial, sans-serif;
  --motion-instant: 80ms;
  --motion-fast: 160ms;
  --motion-standard: 280ms;
  --motion-slow: 560ms;
  --motion-moment: 900ms;
  --ease-effort: cubic-bezier(0.2, 0.78, 0.2, 1);
  --ease-velocity: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-recovery: cubic-bezier(0.22, 0.7, 0.28, 1);
  --ease-settle: cubic-bezier(0.34, 1.25, 0.5, 1);
  color-scheme: dark;
}

html[data-theme="light"] {
  --fp-bg-deep: var(--fp-cool-blue);
  --fp-bg-page: var(--fp-glacier);
  --fp-bg-section: var(--fp-cool-blue);
  --fp-surface: var(--fp-glacier-surface);
  --fp-surface-raised: #ffffff;
  --fp-surface-soft: var(--fp-cool-blue);
  --fp-surface-input: #ffffff;
  --fp-nav-surface: var(--fp-glacier-surface);
  --fp-border: var(--fp-border-light);
  --fp-border-strong: var(--fp-steel);
  --fp-text-primary: var(--fp-ink);
  --fp-text-secondary: #343843;
  --fp-text-muted: var(--fp-steel-dark);
  --fp-text-inverse: var(--fp-paper);
  --fp-brand-primary: var(--fp-ultramarine-strong);
  --fp-brand-primary-hover: #142ecf;
  --fp-brand-primary-active: #1025ad;
  --fp-brand-primary-soft: rgba(48, 79, 254, 0.12);
  --fp-brand-primary-softer: rgba(48, 79, 254, 0.06);
  --fp-focus-ring: #304ffe;
  --fp-chart-grid: var(--fp-border-light);
  --fp-chart-axis: var(--fp-steel-dark);
  --fp-chart-label: #343843;
  --fp-chart-tooltip-bg: #ffffff;
  --fp-chart-tooltip-text: var(--fp-ink);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--fp-bg-deep);
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body.fp-redesign {
  min-width: 0;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(900px 520px at 16% -12%, rgba(47, 155, 255, 0.24), transparent 66%),
    radial-gradient(720px 460px at 92% 8%, rgba(53, 207, 223, 0.12), transparent 68%),
    radial-gradient(840px 580px at 82% 106%, rgba(121, 87, 232, 0.12), transparent 72%),
    linear-gradient(160deg, #071426 0%, #0a1b31 46%, #071323 100%) !important;
  background-attachment: fixed !important;
  color: var(--fp-text-primary);
  font-family: var(--fp-ui) !important;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

/* Deliberate page rhythm: utility/editorial journeys stay paper-led, while
   training execution and data-heavy pages retain the neutral dark system. */
body.fp-composition-light {
  --fp-bg-deep: var(--fp-paper-soft);
  --fp-bg-page: var(--fp-paper);
  --fp-bg-section: var(--fp-paper-soft);
  --fp-surface: #ffffff;
  --fp-surface-raised: #ffffff;
  --fp-surface-soft: var(--fp-paper-soft);
  --fp-surface-input: #ffffff;
  --fp-nav-surface: var(--fp-paper);
  --fp-border: var(--fp-border-light);
  --fp-border-strong: var(--fp-steel);
  --fp-text-primary: var(--fp-ink);
  --fp-text-secondary: #343843;
  --fp-text-muted: var(--fp-steel-dark);
  --fp-text-inverse: var(--fp-paper);
  --fp-brand-primary: var(--fp-ultramarine-strong);
  --fp-brand-primary-hover: #142ecf;
  --fp-brand-primary-active: #1025ad;
  --fp-brand-primary-soft: rgba(48, 79, 254, 0.12);
  --fp-brand-primary-softer: rgba(48, 79, 254, 0.06);
  --fp-focus-ring: var(--fp-ultramarine);
  --fp-chart-grid: var(--fp-border-light);
  --fp-chart-axis: var(--fp-steel-dark);
  --fp-chart-label: #343843;
  --fp-chart-tooltip-bg: #ffffff;
  --fp-chart-tooltip-text: var(--fp-ink);
  color-scheme: light;
}

body.fp-composition-dark {
  color-scheme: dark;
}

/* V4.4 restores the earlier Deep Ocean stage on the public entry and planning
   journeys. The current V4.3 layouts, real-athlete assets and category accents
   remain above this layer; only the formerly paper-flat environment changes. */
body.fp-redesign:is(.fp-route-index, .fp-route-nutrition-builder, .fp-route-manual-nutrition-builder, .fp-route-my-nutrition-plans, .fp-route-workout-builder, .fp-route-my-workout-plans) {
  --fp-bg-deep: #061222;
  --fp-bg-page: #08182b;
  --fp-bg-section: #0c2139;
  --fp-surface: rgba(13, 34, 57, 0.9);
  --fp-surface-raised: #102945;
  --fp-surface-soft: #17395c;
  --fp-surface-input: #0b2037;
  --fp-nav-surface: rgba(6, 18, 34, 0.92);
  --fp-border: rgba(147, 197, 253, 0.19);
  --fp-border-strong: rgba(147, 197, 253, 0.38);
  --fp-text-primary: #f3f8ff;
  --fp-text-secondary: #ccdcf0;
  --fp-text-muted: #9bb1cc;
  --fp-text-inverse: #f3f8ff;
  --fp-chart-grid: rgba(147, 197, 253, 0.17);
  --fp-chart-label: #ccdcf0;
  --fp-chart-tooltip-bg: #102945;
  --fp-chart-tooltip-text: #f3f8ff;
  color-scheme: dark;
}

body.fp-redesign:is(.fp-route-index, .fp-route-nutrition-builder, .fp-route-manual-nutrition-builder, .fp-route-my-nutrition-plans, .fp-route-workout-builder, .fp-route-my-workout-plans) :where(.builder-card, .builder-wizard, .plans-page, .nutrition-plan-card, .plan-card, .program-result, .meal-option-card, .meal-option, .meal-options-carousel) {
  background-color: rgba(8, 27, 48, 0.8) !important;
  border-color: rgba(147, 197, 253, 0.2) !important;
}

body.fp-redesign::before,
body.fp-redesign::after,
.fp-redesign .ocean-depth-layer,
.fp-redesign .ocean-depth-glow,
.fp-redesign .social-abyss,
.fp-redesign .auth-container::before,
.fp-redesign .auth-container::after {
  display: none !important;
  content: none !important;
}

.fp-redesign [hidden],
.fp-redesign .hidden {
  display: none !important;
}

.fp-redesign :where(h1, h2, h3, h4) {
  margin-block: 0;
  color: var(--fp-text-primary) !important;
  font-family: var(--fp-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}

.fp-redesign h1 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.fp-redesign h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
}

.fp-redesign h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
}

.fp-redesign :where(p, ul, ol, figure) {
  margin-block: 0;
}

.fp-redesign :where(strong, output, data, time, .stat-value, .metric-value) {
  font-variant-numeric: tabular-nums;
}

.fp-redesign a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.fp-redesign :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--fp-focus-ring) !important;
  outline-offset: 3px;
}

.fp-redesign input,
.fp-redesign select,
.fp-redesign textarea {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--fp-border-strong) !important;
  border-radius: var(--fp-radius-sm) !important;
  background: var(--fp-surface-input) !important;
  color: var(--fp-text-primary) !important;
  font: inherit;
  box-shadow: none !important;
}

.fp-redesign textarea {
  min-height: 112px;
  resize: vertical;
}

.fp-redesign label,
.fp-redesign legend {
  color: var(--fp-text-secondary);
  font-size: 0.875rem;
  font-weight: 700;
}

.fp-redesign :where(button, .primary-action, .secondary-action, .primary-button, .secondary-button, .hero-btn, .wizard-button, .submit-button, .nav-btn) {
  min-height: 44px;
  border-radius: var(--fp-radius-sm) !important;
  font-family: var(--fp-ui);
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: none !important;
  transition: background-color var(--motion-fast) var(--ease-effort), border-color var(--motion-fast) var(--ease-effort), color var(--motion-fast) var(--ease-effort), transform var(--motion-fast) var(--ease-settle);
  background-image: none !important;
}

.fp-redesign :where(.primary-action, .primary-button, .hero-btn.primary, .wizard-button--next, .wizard-button--generate, .submit-button, button[type="submit"]):not(.secondary-button):not(.text-action) {
  border: 1px solid var(--fp-brand-primary) !important;
  background: var(--fp-brand-primary) !important;
  color: var(--fp-text-inverse) !important;
}

.fp-redesign :where(.secondary-action, .secondary-button, .hero-btn.secondary, .wizard-button--back) {
  border: 1px solid var(--fp-border-strong) !important;
  background: transparent !important;
  color: var(--fp-text-primary) !important;
}

.fp-redesign :where(button, a[role="button"], .primary-action, .secondary-action):not(:disabled):hover {
  border-color: var(--fp-brand-primary) !important;
}

.fp-redesign :where(button, .primary-action, .secondary-action):active {
  transform: translateY(1px);
}

.fp-redesign :where(button, input, select, textarea):disabled,
.fp-redesign [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.fp-redesign :where(.badge, .eyebrow, .card-kicker, .section-kicker, .builder-badge, .status, .count-pill, .unread-badge) {
  color: var(--fp-brand-primary) !important;
  font-family: var(--fp-ui);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.fp-redesign :where(.card, .builder-card, .premium-card, .social-section, .request-panel, .visual-choice-card, .my-identity-card, .settings-card, .pricing-card, .legal-card) {
  border: 1px solid var(--fp-border) !important;
  border-radius: var(--fp-radius-md) !important;
  background: var(--fp-surface) !important;
  box-shadow: none !important;
}

.fp-redesign :where(.muted, small, .hint, .wizard-hint, .section-status, .builder-description) {
  color: var(--fp-text-muted) !important;
}

.fp-redesign .card-icon,
.fp-redesign .premium-icon,
.fp-redesign .athlete-core-prompt-icon,
.fp-redesign .empty-orbit,
.fp-redesign .chat-empty-art,
.fp-redesign .identity-art {
  display: none !important;
}

.fp-redesign .reveal-on-scroll,
.fp-redesign .reveal-on-scroll.is-visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.fp-redesign .theme-toggle-icon {
  display: none !important;
}

/* Product navigation */
.fp-global-nav {
  position: sticky;
  inset-block-start: 0;
  z-index: 950;
  display: flex;
  align-items: stretch;
  min-height: 64px;
  border-block-end: 1px solid var(--fp-border);
  background: color-mix(in srgb, var(--fp-nav-surface) 96%, transparent);
  backdrop-filter: blur(12px);
}

.fp-global-brand {
  display: grid;
  place-items: center;
  min-width: 220px;
  padding-inline: 24px;
  border-inline-end: 1px solid var(--fp-border);
  color: var(--fp-text-primary) !important;
  font-family: var(--fp-display);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-decoration: none;
  text-transform: uppercase;
}

.fp-global-brand::first-letter {
  color: var(--fp-brand-primary);
}

.fp-global-links {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  padding-inline: 22px;
}

.fp-global-link {
  position: relative;
  display: grid;
  place-items: center;
  padding-inline: 18px;
  color: var(--fp-text-muted) !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.fp-global-link:hover,
.fp-global-link[aria-current="page"] {
  color: var(--fp-text-primary) !important;
}

.fp-global-link[aria-current="page"]::after {
  content: "" !important;
  position: absolute;
  inset-inline: 18px;
  inset-block-end: -1px;
  height: 3px;
  background: var(--fp-brand-primary);
}

/* Landing */
.fp-route-index .navbar {
  position: sticky !important;
  inset-block-start: 0;
  z-index: 900;
  width: 100%;
  min-height: 64px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2)) !important;
  border-block-end: 1px solid var(--fp-border) !important;
  background: var(--fp-nav-surface) !important;
  box-shadow: none !important;
}

.fp-route-index .logo {
  background-image: none !important;
  color: var(--fp-paper) !important;
  -webkit-text-fill-color: currentColor;
}

.fp-route-index .comparison-handle {
  background-image: none !important;
  background-color: var(--fp-paper) !important;
}

.fp-route-index .logo,
.fp-route-index .navbar .logo {
  color: var(--fp-text-primary) !important;
  font-family: var(--fp-display);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fp-route-index .nav-link {
  color: var(--fp-text-secondary) !important;
}

.fp-route-index .hero {
  min-height: auto !important;
  padding: clamp(36px, 5vw, 72px) 0 64px !important;
  background: transparent !important;
}

.fp-route-index .hero::before,
.fp-route-index .hero::after,
.fp-route-index .hero-shell::before,
.fp-route-index .hero-shell::after,
.fp-route-index .hero-panel::before,
.fp-route-index .hero-panel::after {
  display: none !important;
  content: none !important;
}

.fp-route-index .hero-shell {
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr) !important;
  gap: 24px 48px !important;
  width: var(--fp-content) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.fp-route-index .hero-content {
  align-self: end;
  grid-column: 1;
  grid-row: 1;
}

.fp-route-index .hero h1 {
  max-width: 760px;
  margin-block: 18px 16px !important;
  font-size: clamp(3.55rem, 6vw, 5.85rem) !important;
  line-height: 0.89 !important;
  text-transform: uppercase;
}

.fp-route-index .hero h1 span {
  color: var(--fp-text-primary) !important;
  -webkit-text-fill-color: currentColor !important;
  background: none !important;
}

.fp-route-index .hero h1 span:last-child {
  color: var(--fp-brand-primary) !important;
}

.fp-route-index :where(.badge, .hero-meta-chip, .feature-pill) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.fp-route-index :where(.hero-meta-chip, .hero-meta-chip-muted) {
  color: var(--fp-text-secondary) !important;
}

.fp-route-index .hero-meta {
  display: flex;
  gap: 16px;
  padding-block-end: 12px;
  border-block-end: 1px solid var(--fp-border);
}

.fp-route-index .hero-lede {
  max-width: 700px;
  color: var(--fp-text-secondary) !important;
  font-size: clamp(1.08rem, 1.8vw, 1.35rem) !important;
}

.fp-route-index .hero-content :where(.hero-subcopy, .hero-support) {
  margin-block: 8px 0;
  line-height: 1.48;
}

.fp-route-index :where(.hero-subcopy, .hero-support) {
  max-width: 700px;
  color: var(--fp-text-muted) !important;
}

.fp-route-index .hero-panel {
  display: grid !important;
  align-content: end;
  gap: 0 !important;
  min-height: 640px;
  padding: clamp(230px, 28vw, 350px) 0 0 !important;
  border: 1px solid var(--fp-border-dark) !important;
  background-color: var(--fp-ink) !important;
  background-image: image-set(
    url("/images/brand/ultramarine-athlete-hero.webp") type("image/webp"),
    url("/images/brand/ultramarine-athlete-hero.png") type("image/png")
  ) !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  background-size: 100% auto !important;
  grid-column: 2;
  grid-row: 1 / span 3;
}

/* A restrained motion layer gives the two high-traffic entry surfaces more
   depth without reintroducing gradients, glow, or motion behind controls. */
.fp-route-index .hero-panel,
.fp-route-dashboard .dashboard-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.fp-route-index .hero-panel::before,
.fp-route-dashboard .dashboard-shell::before {
  display: block !important;
  position: absolute;
  z-index: 0;
  display: block;
  content: "" !important;
  pointer-events: none;
  background: rgba(48, 79, 254, 0.18);
  border-radius: 999px;
  transform: translate3d(-8%, -18%, 0) rotate(-12deg);
  animation: fp-surface-drift 18s var(--ease-recovery) 2 alternate;
}

.fp-route-index .hero-panel::before {
  top: -22%;
  right: -8%;
  width: 64%;
  height: 62%;
}

.fp-route-dashboard .dashboard-shell::before {
  top: -10%;
  right: -12%;
  width: 32rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(47, 155, 255, 0.2), rgba(53, 207, 223, 0.05) 48%, transparent 72%);
  transform: translate3d(6%, -14%, 0) rotate(8deg);
  animation-duration: 22s;
}

.fp-route-index .hero-panel > *,
.fp-route-dashboard .dashboard-shell > * {
  position: relative;
  z-index: 1;
}

@keyframes fp-surface-drift {
  0% { opacity: 0.42; transform: translate3d(-8%, -18%, 0) rotate(-12deg); }
  100% { opacity: 0.78; transform: translate3d(8%, 8%, 0) rotate(-4deg); }
}

.fp-route-index .system-card {
  min-height: 140px;
  padding: 24px !important;
  border: 0 !important;
  border-block-end: 1px solid var(--fp-border-dark) !important;
  border-radius: 0 !important;
  background: var(--fp-graphite) !important;
  color: var(--fp-border-light) !important;
  box-shadow: none !important;
}

.fp-route-index .system-card :where(strong, p, span) {
  color: inherit !important;
}

.fp-route-index .system-card:last-child {
  border-block-end: 0 !important;
}

.fp-route-index .system-card strong {
  display: block;
  max-width: 32ch;
  margin-block: 8px;
  font-family: var(--fp-display);
  font-size: 1.55rem;
  line-height: 1;
}

.fp-route-index .landing-stats {
  grid-column: 1 / -1;
  grid-row: 4;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block: 1px solid var(--fp-border);
}

.fp-route-index .landing-stat {
  min-height: 132px;
  padding: 24px !important;
  border: 0 !important;
  border-inline-end: 1px solid var(--fp-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.fp-route-index .landing-stat:last-child {
  border-inline-end: 0 !important;
}

.fp-route-index .landing-stat strong {
  font-family: var(--fp-display);
  font-size: 3.5rem !important;
}

.fp-route-index .hero-cta-row,
.fp-route-index .builder-chooser {
  grid-column: 1;
  grid-row: 2;
}

.fp-route-index .feature-pills {
  grid-column: 1;
  grid-row: 3;
}

.fp-route-index .feature-pills {
  justify-content: flex-start !important;
  gap: 20px !important;
}

.fp-route-index .feature-pill {
  color: var(--fp-text-muted) !important;
}

.fp-route-index .landing-section {
  width: var(--fp-content) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: clamp(64px, 9vw, 120px) 0 !important;
  border-block-start: 1px solid var(--fp-border);
}

.fp-route-index .results-section {
  --fp-border: var(--fp-border-dark);
  --fp-text-primary: var(--fp-paper);
  --fp-text-secondary: var(--fp-border-light);
  --fp-text-muted: var(--fp-steel-light);
  --fp-surface: var(--fp-graphite-soft);
  color: var(--fp-text-primary);
  background: var(--fp-ink) !important;
  box-shadow: 0 0 0 100vmax var(--fp-ink);
  clip-path: inset(0 -100vmax);
}

.fp-route-index .final-cta {
  --fp-brand-primary: var(--fp-paper);
  --fp-brand-primary-hover: #ffffff;
  --fp-text-primary: var(--fp-paper);
  --fp-text-secondary: var(--fp-ultramarine-soft);
  --fp-text-muted: var(--fp-ultramarine-soft);
  --fp-text-inverse: var(--fp-ink);
  --fp-border: rgba(250, 249, 246, 0.4);
  color: var(--fp-paper);
  background: var(--fp-ultramarine-strong) !important;
  box-shadow: 0 0 0 100vmax var(--fp-ultramarine-strong);
  clip-path: inset(0 -100vmax);
}

.fp-route-index .section-heading {
  max-width: 780px !important;
  margin-block-end: 48px !important;
  text-align: start !important;
}

.fp-route-index .section-heading h2 {
  margin-block: 12px 16px;
  font-size: clamp(2.7rem, 6vw, 5.5rem) !important;
  text-transform: uppercase;
}

.fp-route-index :where(.feature-card-grid, .platform-steps) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0 !important;
  border-block: 1px solid var(--fp-border);
}

.fp-route-index :where(.premium-card, .platform-step) {
  min-height: 220px;
  padding: 32px !important;
  border: 0 !important;
  border-inline-end: 1px solid var(--fp-border) !important;
  border-block-end: 1px solid var(--fp-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  transform: none !important;
}

.fp-route-index :where(.premium-card, .platform-step):nth-child(even) {
  border-inline-end: 0 !important;
}

.fp-route-index .results-grid {
  gap: 24px !important;
}

.fp-route-index .result-story,
.fp-route-index .transformation-invite {
  border: 1px solid var(--fp-border) !important;
  border-radius: var(--fp-radius-md) !important;
  background: var(--fp-surface) !important;
  box-shadow: none !important;
}

/* Authentication */
.fp-route-auth {
  display: block !important;
  min-height: 100vh;
  padding: 0 !important;
}

.fp-route-auth .auth-container {
  display: grid !important;
  grid-template-columns: minmax(320px, 0.8fr) minmax(460px, 1.2fr);
  width: min(1180px, calc(100vw - 48px)) !important;
  max-width: none !important;
  min-height: calc(100vh - 80px);
  margin: 40px auto !important;
  padding: 0 !important;
  border: 1px solid var(--fp-border) !important;
  border-radius: var(--fp-radius-md) !important;
  background: var(--fp-surface) !important;
  box-shadow: none !important;
  overflow: hidden;
}

.fp-route-auth .brand {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(32px, 6vw, 72px) !important;
  border-inline-end: 1px solid var(--fp-border);
  background: var(--fp-bg-deep) !important;
  text-align: start !important;
}

.fp-route-auth .brand h1 {
  margin-block-end: 20px !important;
  max-width: 100%;
  font-size: clamp(3rem, 3.5vw, 3.35rem) !important;
  letter-spacing: -0.045em !important;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.fp-route-auth .brand p {
  max-width: 34ch;
  color: var(--fp-text-muted) !important;
}

.fp-route-auth .auth-panel,
.fp-route-auth .auth-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(28px, 5vw, 64px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--fp-surface) !important;
  box-shadow: none !important;
  transform: none !important;
}

.fp-route-auth .auth-tabs {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0 !important;
  border-block-end: 1px solid var(--fp-border);
}

.fp-route-auth .tab-button {
  border: 0 !important;
  border-block-end: 3px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--fp-text-muted) !important;
}

.fp-route-auth .tab-button.active {
  border-block-end-color: var(--fp-brand-primary) !important;
  color: var(--fp-text-primary) !important;
}

.fp-route-auth .google-button {
  border: 1px solid var(--fp-border-strong) !important;
  border-radius: var(--fp-radius-sm) !important;
  background: var(--fp-surface-raised) !important;
  color: var(--fp-text-primary) !important;
}

.fp-route-auth .terms-consent,
.fp-route-auth .remember-consent,
.fp-route-auth .privacy-note {
  color: var(--fp-text-muted) !important;
  font-size: 0.82rem !important;
}

/* Dashboard */
.fp-route-dashboard .sidebar,
.fp-route-dashboard .mobile-topbar {
  display: none !important;
}

.fp-route-dashboard .dashboard-shell {
  display: block !important;
  width: var(--fp-content) !important;
  max-width: none !important;
  min-height: auto !important;
  margin: 0 auto !important;
  padding: clamp(32px, 5vw, 72px) 0 96px !important;
}

.fp-route-dashboard .dashboard-main {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.fp-route-dashboard .hero-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end !important;
  gap: 24px;
  padding-block-end: 32px;
  border-block-end: 1px solid var(--fp-border);
}

.fp-route-dashboard .hero-copy h1 {
  max-width: 760px;
  margin-block: 10px 16px !important;
  font-size: clamp(3rem, 6vw, 6.5rem) !important;
  text-transform: uppercase;
}

.fp-route-dashboard .hero-actions {
  align-self: end;
}

.fp-route-dashboard .dashboard-primary-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin-block: 0 32px !important;
  border-block-end: 1px solid var(--fp-border);
}

.fp-route-dashboard .dashboard-action {
  min-height: 72px;
  border: 0 !important;
  border-inline-end: 1px solid var(--fp-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--fp-text-secondary) !important;
  box-shadow: none !important;
}

.fp-route-dashboard .dashboard-action::before,
.fp-route-dashboard .dashboard-action::after {
  display: none !important;
  content: none !important;
}

.fp-route-dashboard :where(.stats-grid > article, .schedule-day) {
  background-image: none !important;
  background-color: var(--fp-surface-raised) !important;
}

.fp-route-dashboard .schedule-day.is-today {
  border-color: var(--fp-ultramarine) !important;
}

.fp-route-progress .chart-area {
  fill: rgba(48, 79, 254, 0.14) !important;
}

.fp-route-progress :where(.chart-line, .chart-dot) {
  stroke: var(--fp-ultramarine) !important;
}

.fp-route-workout-tracker :where(.brand-badge, .focus-badge, .quick-mode-button, .quick-action, .time-fit-summary) {
  border-color: var(--fp-border-strong) !important;
  background-image: none !important;
  background-color: var(--fp-surface-raised) !important;
  color: var(--fp-text-secondary) !important;
  box-shadow: none !important;
}

.fp-route-workout-tracker :where(.brand-badge, .focus-badge) {
  border-color: var(--fp-ultramarine) !important;
  color: var(--fp-paper) !important;
}

.fp-route-workout-tracker :where(.focus-panel, .focus-exercise-media, .quick-actions, .rest-strip) {
  background-image: none !important;
  background-color: var(--fp-surface-raised) !important;
  box-shadow: none !important;
}

.fp-route-workout-tracker .focus-panel::before {
  display: none !important;
  background-image: none !important;
}

.fp-route-workout-tracker .target-reps-card {
  background-image: none !important;
  background-color: var(--fp-warning-soft) !important;
}

.fp-route-workout-tracker .next-set-preview {
  background-image: none !important;
  background-color: var(--fp-success-soft) !important;
}

.fp-redesign .site-feedback-trigger {
  border: 1px solid var(--fp-border-strong) !important;
  border-radius: var(--fp-radius-sm) !important;
  background: var(--fp-surface-raised) !important;
  color: var(--fp-text-secondary) !important;
  box-shadow: none !important;
}

.fp-redesign .site-feedback-trigger > :first-child:not(.site-feedback-trigger-label) {
  display: none !important;
}

.fp-route-dashboard .dashboard-action:last-child {
  border-inline-end: 0 !important;
}

.fp-route-dashboard .stats-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin-block: 32px !important;
  border-block: 1px solid var(--fp-border);
}

.fp-route-dashboard .stats-grid .card {
  min-height: 150px;
  padding: 24px !important;
  border: 0 !important;
  border-inline-end: 1px solid var(--fp-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.fp-route-dashboard .stats-grid .card:last-child {
  border-inline-end: 0 !important;
}

.fp-route-dashboard .stats-grid strong {
  display: block;
  margin-block: 10px;
  font-family: var(--fp-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
  line-height: 0.9;
  color: var(--fp-text-primary) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}

.fp-route-dashboard .stats-grid .card::before,
.fp-route-dashboard .stats-grid .card::after {
  display: none !important;
  content: none !important;
}

.fp-route-dashboard .dashboard-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.fp-route-dashboard .schedule-card {
  grid-column: span 8 !important;
}

.fp-route-dashboard .next-workout-card,
.fp-route-dashboard .nutrition-card {
  grid-column: span 4 !important;
}

.fp-route-dashboard .recent-card,
.fp-route-dashboard .missed-card {
  grid-column: span 6 !important;
}

.fp-route-dashboard .tools-accordion {
  grid-column: 1 / -1 !important;
}

.fp-route-dashboard .dashboard-grid > .card,
.fp-route-dashboard .dashboard-grid > details {
  padding: 28px !important;
}

.fp-route-dashboard .weekly-schedule-board {
  gap: 0 !important;
  border-block: 1px solid var(--fp-border);
}

.fp-route-dashboard .athlete-core-prompt {
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  overflow: auto;
}

.fp-route-dashboard .athlete-core-prompt-card {
  width: min(560px, 100%) !important;
  max-width: 100% !important;
  margin: auto !important;
  padding: 40px !important;
  border: 1px solid var(--fp-border-strong) !important;
  border-radius: var(--fp-radius-md) !important;
  background: var(--fp-surface-raised) !important;
  box-shadow: var(--fp-shadow-raised) !important;
  transform: none !important;
}

/* Builders and plan pages */
.fp-redesign :where(.builder-page, .manual-page, .manual-nutrition-page, .plans-page, .tracker-page, .history-page, .log-page, .progress-page, .submission-page, .leaderboard-page, .admin-page) {
  width: var(--fp-content) !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: clamp(32px, 5vw, 72px) 0 112px !important;
}

.fp-redesign :where(.builder-navigation, .page-nav, .top-nav) {
  min-height: 48px;
  margin-block-end: 40px !important;
  padding-block-end: 16px !important;
  border-block-end: 1px solid var(--fp-border) !important;
  background: transparent !important;
}

.fp-redesign .builder-navigation :where(a, button),
.fp-redesign :where(.page-nav, .top-nav) :where(a, button) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--fp-text-secondary) !important;
  box-shadow: none !important;
}

.fp-redesign :where(.builder-badge, .builder-navigation .brand, .builder-navigation .logo) {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--fp-brand-primary) !important;
}

.fp-redesign :where(.builder-header, .page-header, .progress-header) {
  max-width: 900px;
  margin-block-end: 48px !important;
  text-align: start !important;
}

.fp-redesign :where(.builder-header, .page-header, .progress-header) h1 {
  margin-block: 12px 18px !important;
  text-transform: uppercase;
}

.fp-redesign .builder-card {
  width: 100% !important;
  max-width: none !important;
  padding: clamp(24px, 4vw, 48px) !important;
}

.fp-redesign .wizard-progress {
  margin-block-end: 40px !important;
  padding: 16px 0 24px !important;
  border: 0 !important;
  border-block-end: 1px solid var(--fp-border) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.fp-redesign .wizard-progress-track {
  height: 3px !important;
  border-radius: 0 !important;
  background: var(--fp-border) !important;
}

.fp-redesign .wizard-progress-track > * {
  border-radius: 0 !important;
  background: var(--fp-brand-primary) !important;
}

.fp-redesign :where(.share-button, .share-progress-button, [data-share-action]) {
  border: 1px solid var(--fp-brand-primary) !important;
  border-radius: var(--fp-radius-sm) !important;
  background: transparent !important;
  color: var(--fp-brand-primary) !important;
  box-shadow: none !important;
}

.fp-redesign .wizard-step-heading {
  display: grid !important;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px !important;
  align-items: start;
  margin-block-end: 32px !important;
}

.fp-redesign .wizard-step-heading > :first-child {
  color: var(--fp-brand-primary) !important;
  font-family: var(--fp-display);
  font-size: 1.6rem;
}

.fp-redesign .visual-choice-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.fp-redesign .visual-choice-card {
  min-width: 0;
  min-height: 220px;
  overflow: hidden;
}

.fp-redesign .visual-choice-card:hover,
.fp-redesign .visual-choice-card:has(input:checked),
.fp-redesign .visual-choice-card.is-selected {
  border-color: var(--fp-brand-primary) !important;
}

.fp-redesign .visual-choice-image {
  min-height: 150px;
  filter: saturate(0.72) contrast(1.04);
}

.fp-redesign .visual-choice-shade {
  background: rgba(9, 10, 9, 0.42) !important;
}

/* Preserve the real first-party photography while removing the legacy color
   washes. These explicit URLs keep every builder asset intact without a
   gradient or third-party fallback. */
.fp-route-workout-builder .visual-choice-card--goal-muscle .visual-choice-image { background-image: url("/images/workout-builder/goals/build-muscle.webp") !important; }
.fp-route-workout-builder .visual-choice-card--goal-fat .visual-choice-image { background-image: url("/images/workout-builder/goals/lost-fat.webp") !important; }
.fp-route-workout-builder .visual-choice-card--goal-strength .visual-choice-image { background-image: url("/images/workout-builder/goals/increase-strength.webp") !important; }
.fp-route-workout-builder .visual-choice-card--goal-skills .visual-choice-image { background-image: url("/images/workout-builder/goals/calisthenics-skills.webp") !important; }
.fp-route-workout-builder .visual-choice-card--goal-performance .visual-choice-image { background-image: url("/images/workout-builder/goals/maintain-performance.webp") !important; }
.fp-route-workout-builder .visual-choice-card--beginner .visual-choice-image { background-image: url("/images/workout-builder/experience/beginner.webp") !important; }
.fp-route-workout-builder .visual-choice-card--intermediate .visual-choice-image { background-image: url("/images/workout-builder/experience/intermediate.webp") !important; }
.fp-route-workout-builder .visual-choice-card--advanced .visual-choice-image { background-image: url("/images/workout-builder/experience/advanced.webp") !important; }
.fp-route-workout-builder .visual-choice-card--gym .visual-choice-image { background-image: url("/images/workout-builder/styles/gym.webp") !important; }
.fp-route-workout-builder .visual-choice-card--calisthenics .visual-choice-image { background-image: url("/images/workout-builder/styles/calishtenics.webp") !important; }
.fp-route-workout-builder .visual-choice-card--hybrid .visual-choice-image { background-image: url("/images/workout-builder/styles/hybrid.webp") !important; }
.fp-route-workout-builder .visual-choice-card--bodyweight .visual-choice-image { background-image: url("/images/workout-builder/equipment/bodyweight.webp") !important; }
.fp-route-workout-builder .visual-choice-card--pullup .visual-choice-image { background-image: url("/images/workout-builder/equipment/pull-up-bar.webp") !important; }
.fp-route-workout-builder .visual-choice-card--rings .visual-choice-image { background-image: url("/images/workout-builder/equipment/rings.webp") !important; }
.fp-route-workout-builder .visual-choice-card--dumbbells .visual-choice-image { background-image: url("/images/workout-builder/equipment/dumbbells.webp") !important; }
.fp-route-workout-builder .visual-choice-card--barbell .visual-choice-image { background-image: url("/images/workout-builder/equipment/barbell.webp") !important; }
.fp-route-workout-builder .visual-choice-card--machines .visual-choice-image { background-image: url("/images/workout-builder/equipment/machines.webp") !important; }
.fp-route-workout-builder .visual-choice-card--hypertrophy .visual-choice-image { background-image: url("/images/workout-builder/priorities/hypertrophy.webp") !important; }
.fp-route-workout-builder .visual-choice-card--priority-strength .visual-choice-image { background-image: url("/images/workout-builder/priorities/strength.webp") !important; }
.fp-route-workout-builder .visual-choice-card--priority-skills .visual-choice-image { background-image: url("/images/workout-builder/priorities/skills.webp") !important; }
.fp-route-workout-builder .visual-choice-card--fitness .visual-choice-image { background-image: url("/images/workout-builder/priorities/general-fitness.webp") !important; }
.fp-route-nutrition-builder .visual-choice-card--nutr-muscle .visual-choice-image { background-image: url("/images/nutrition-builder/goals/build-muscle.webp") !important; }
.fp-route-nutrition-builder .visual-choice-card--nutr-fat .visual-choice-image { background-image: url("/images/nutrition-builder/goals/lose-fat.webp") !important; }
.fp-route-nutrition-builder .visual-choice-card--nutr-maintain .visual-choice-image { background-image: url("/images/nutrition-builder/goals/maintain-weight.webp") !important; }

.fp-redesign .wizard-fields-grid {
  gap: 20px !important;
}

.fp-redesign .wizard-actions {
  position: sticky;
  inset-block-end: 0;
  z-index: 30;
  margin-block-start: 40px !important;
  padding-block: 16px !important;
  border-block-start: 1px solid var(--fp-border);
  background: color-mix(in srgb, var(--fp-bg-page) 94%, transparent) !important;
  backdrop-filter: blur(12px);
}

.fp-redesign :where(.workout-card, .meal-card, .plan-card, .history-card) {
  border: 1px solid var(--fp-border) !important;
  border-radius: var(--fp-radius-md) !important;
  background: var(--fp-surface) !important;
  box-shadow: none !important;
}

.fp-redesign :where(.workout-block, .exercise-row, .target-section, .meal-section, .measurement-form, .form-section) {
  border-color: var(--fp-border) !important;
  border-radius: var(--fp-radius-md) !important;
  background: var(--fp-surface) !important;
  box-shadow: none !important;
}

/* Progress and data */
.fp-redesign :where(.metric-card, .chart-card, .summary-card, .progress-card) {
  border: 1px solid var(--fp-border) !important;
  border-radius: var(--fp-radius-md) !important;
  background: var(--fp-surface) !important;
  box-shadow: none !important;
}

.fp-table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--fp-border);
}

.fp-redesign table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: transparent !important;
}

.fp-redesign :where(th, td) {
  padding: 14px 16px !important;
  border-block-end: 1px solid var(--fp-border) !important;
  text-align: start;
}

.fp-redesign th {
  color: var(--fp-text-muted) !important;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Social */
.fp-route-social .social-shell {
  width: var(--fp-content) !important;
  max-width: none !important;
  min-height: calc(100vh - 64px) !important;
  margin: 0 auto !important;
  padding: 24px 0 96px !important;
}

.fp-route-social .social-topbar {
  position: sticky;
  inset-block-start: 64px;
  z-index: 80;
  min-height: 64px;
  border: 1px solid var(--fp-border) !important;
  border-inline: 0 !important;
  background: var(--fp-bg-page) !important;
  box-shadow: none !important;
}

.fp-route-social .social-brand,
.fp-route-social .back-link {
  display: none !important;
}

.fp-route-social .social-tabs {
  gap: 0 !important;
}

.fp-route-social .social-tab {
  min-height: 64px;
  border: 0 !important;
  border-block-end: 3px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--fp-text-muted) !important;
}

.fp-route-social .social-tab.is-active {
  border-block-end-color: var(--fp-brand-primary) !important;
  color: var(--fp-text-primary) !important;
}

.fp-route-social .social-app {
  display: grid !important;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) !important;
  min-height: 660px;
  border-block-end: 1px solid var(--fp-border);
}

.fp-route-social .conversation-rail {
  border-inline-end: 1px solid var(--fp-border) !important;
  --fp-text-primary: var(--fp-paper);
  --fp-text-secondary: var(--fp-border-light);
  --fp-text-muted: var(--fp-steel-light);
  background: var(--fp-ink) !important;
}

.fp-route-social :where(.skeleton-list span, .message-skeletons span) {
  background-image: none !important;
  background-color: var(--fp-border-dark) !important;
  animation: none !important;
}

.fp-route-social .avatar {
  background-image: none !important;
  background-color: var(--fp-ultramarine) !important;
  box-shadow: none !important;
}

.fp-route-social :where(.artifact-card, .artifact-visual) {
  background-image: none !important;
  background-color: var(--fp-surface-raised) !important;
  box-shadow: none !important;
}

.fp-route-social :where(.primary-button, .send-button, .voice-preview-state .primary-button),
.fp-route-social .volume-bar i::after {
  background-image: none !important;
  background-color: var(--fp-ultramarine) !important;
  box-shadow: none !important;
}

.fp-route-social .rail-empty > span,
.fp-route-social .conversation-empty > span {
  display: none !important;
}

.fp-route-social :where(.friends-view, .messages-view) {
  min-width: 0;
  padding: clamp(24px, 4vw, 48px) !important;
  background: transparent !important;
}

.fp-route-social .view-hero {
  padding-block-end: 36px;
  border-block-end: 1px solid var(--fp-border);
}

.fp-route-social .user-search {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-block: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.fp-route-social .user-search > span {
  display: none;
}

.fp-route-social .requests-grid,
.fp-route-social .people-grid {
  gap: 12px !important;
}

.fp-route-social .composer {
  border-block-start: 1px solid var(--fp-border) !important;
  background: var(--fp-bg-deep) !important;
}

.fp-route-social .fp-text-action {
  width: auto !important;
  min-width: 64px;
  padding-inline: 10px !important;
  color: var(--fp-text-secondary) !important;
  font-size: 0.76rem;
}

.fp-route-social dialog,
.fp-route-social .social-dialog {
  width: min(680px, calc(100vw - 32px)) !important;
  max-height: min(860px, calc(100vh - 32px));
  border: 1px solid var(--fp-border-strong) !important;
  border-radius: var(--fp-radius-md) !important;
  background: var(--fp-surface-raised) !important;
  color: var(--fp-text-primary) !important;
  box-shadow: var(--fp-shadow-raised) !important;
}

.fp-route-social dialog::backdrop {
  background: rgba(0, 0, 0, 0.72) !important;
}

/* Settings, AI coach, pricing, legal, utility pages */
.fp-route-app .container {
  width: var(--fp-content) !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding-block: 32px 112px !important;
}

.fp-route-app :where(.settings-modal, .settings-panel, .settings-content, .settings-container) {
  max-width: 100% !important;
  border-color: var(--fp-border) !important;
  border-radius: var(--fp-radius-md) !important;
  background: var(--fp-surface-raised) !important;
  color: var(--fp-text-primary) !important;
  box-shadow: none !important;
}

.fp-route-app .settings-overlay {
  background-image: none !important;
  background-color: rgba(11, 11, 13, 0.76) !important;
}

.fp-route-app :where(.settings-nav, .settings-sidebar) {
  background: var(--fp-bg-deep) !important;
}

.fp-route-pricing .pricing-page,
.fp-redesign .billing-result,
.fp-redesign .action-container {
  width: var(--fp-content) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: clamp(48px, 8vw, 112px) 0 !important;
}

.fp-route-pricing :where(.pricing-hero, .pricing-grid, .pricing-card) {
  background: transparent !important;
  box-shadow: none !important;
}

.fp-legal-route .legal-page,
.fp-redesign :where(.legal-container, .legal-main) {
  width: min(900px, calc(100vw - 48px)) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: clamp(48px, 8vw, 96px) 0 112px !important;
}

.fp-legal-route :where(header, .legal-header) {
  margin-block-end: 48px !important;
  padding-block-end: 20px !important;
  border-block-end: 1px solid var(--fp-border) !important;
  background: transparent !important;
}

.fp-legal-route :where(section, article) {
  margin-block: 36px !important;
}

.fp-legal-route :where(p, li) {
  max-width: 72ch;
  color: var(--fp-text-secondary) !important;
}

.fp-legal-route h1 {
  margin-block: 16px 18px !important;
  text-transform: uppercase;
}

.fp-legal-route :where(.legal-nav-brand, .site-footer-brand) {
  background-image: none !important;
  color: var(--fp-ink) !important;
  -webkit-text-fill-color: currentColor;
}

.fp-legal-route :where(.legal-badge, .legal-highlight) {
  border-color: var(--fp-border-light) !important;
  background: var(--fp-ultramarine-soft) !important;
  color: var(--fp-ultramarine-strong) !important;
}

.fp-redesign footer {
  border-block-start: 1px solid var(--fp-border) !important;
  background: var(--fp-bg-deep) !important;
  color: var(--fp-text-muted) !important;
}

/* RTL */
html[dir="rtl"] .fp-redesign :where(.section-heading, .builder-header, .page-header, .view-hero, .hero-content, th, td) {
  text-align: right !important;
}

html[dir="rtl"] .fp-global-brand {
  border-inline-start: 1px solid var(--fp-border);
  border-inline-end: 0;
}

html[dir="rtl"] .fp-route-social .conversation-rail {
  border-inline-start: 1px solid var(--fp-border) !important;
  border-inline-end: 0 !important;
}

@media (max-width: 980px) {
  :root {
    --fp-content: min(100% - 32px, 900px);
  }

  .fp-global-brand {
    min-width: 174px;
    padding-inline: 16px;
  }

  .fp-global-links {
    padding-inline: 8px;
  }

  .fp-global-link {
    padding-inline: 10px;
    font-size: 0.7rem;
  }

  .fp-route-index .hero-shell {
    grid-template-columns: 1fr !important;
  }

  .fp-route-index .hero-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column: 1;
    grid-row: auto;
    min-height: auto;
    padding-block-start: min(58vw, 420px) !important;
  }

  .fp-route-index .hero-cta-row,
  .fp-route-index .feature-pills,
  .fp-route-index .landing-stats,
  .fp-route-index .builder-chooser {
    grid-column: 1;
    grid-row: auto;
  }

  .fp-route-index .system-card {
    padding: 20px !important;
    border-inline-end: 1px solid var(--fp-border) !important;
    border-block-end: 0 !important;
  }

  .fp-route-index .system-card:last-child {
    border-inline-end: 0 !important;
  }

  .fp-route-dashboard .dashboard-primary-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .fp-route-dashboard .dashboard-action:nth-child(3) {
    border-inline-end: 0 !important;
  }

  .fp-route-dashboard .dashboard-action:nth-child(n + 4) {
    border-block-start: 1px solid var(--fp-border) !important;
  }

  .fp-route-dashboard .schedule-card,
  .fp-route-dashboard .next-workout-card,
  .fp-route-dashboard .nutrition-card,
  .fp-route-dashboard .recent-card,
  .fp-route-dashboard .missed-card {
    grid-column: span 6 !important;
  }

  .fp-redesign .visual-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  :root {
    --fp-content: calc(100% - 24px);
  }

  body.fp-product-shell-active {
    padding-block-end: calc(76px + env(safe-area-inset-bottom)) !important;
  }

  .fp-global-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 1000;
    display: block;
    min-height: 0;
    padding-block-end: env(safe-area-inset-bottom);
    border-block-start: 1px solid var(--fp-border);
    border-block-end: 0;
    background: var(--fp-nav-surface);
    backdrop-filter: none;
  }

  .fp-global-brand {
    display: none;
  }

  .fp-global-links {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    padding: 0;
  }

  .fp-global-link {
    min-width: 0;
    min-height: 64px;
    padding: 7px 3px;
    font-size: clamp(0.58rem, 2.5vw, 0.7rem);
    letter-spacing: 0;
    text-align: center;
    text-transform: none;
    white-space: normal;
  }

  .fp-global-link[aria-current="page"]::after {
    inset: 0 20% auto;
    height: 3px;
  }

  .fp-route-index .navbar {
    min-height: 56px;
    padding-inline: 12px !important;
  }

  .fp-route-index .nav-link {
    display: none !important;
  }

  .fp-route-index .hero {
    padding-block: 48px 56px !important;
  }

  .fp-route-index .hero h1 {
    max-width: 100%;
    font-size: clamp(2.85rem, 13vw, 4.4rem) !important;
    letter-spacing: -.08em;
  }

  .fp-route-index .hero-meta-chip {
    max-width: 100%;
    white-space: normal;
  }

  .fp-route-index .hero-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .fp-route-index .hero-panel {
    grid-template-columns: 1fr;
    padding-block-start: min(66vw, 330px) !important;
  }

  .fp-route-index .system-card {
    min-height: 0;
    padding: 20px !important;
    border-inline-end: 0 !important;
    border-block-end: 1px solid var(--fp-border) !important;
  }

  .fp-route-index .landing-stats,
  .fp-route-index :where(.feature-card-grid, .platform-steps) {
    grid-template-columns: 1fr !important;
  }

  .fp-route-index .landing-stat,
  .fp-route-index :where(.premium-card, .platform-step) {
    border-inline-end: 0 !important;
  }

  .fp-route-index .hero-cta-row {
    display: grid !important;
    grid-template-columns: 1fr;
  }

  .fp-route-index .hero-btn {
    width: 100%;
  }

  .fp-route-index .landing-section {
    padding-block: 64px !important;
  }

  .fp-route-index .section-heading h2 {
    font-size: clamp(2.5rem, 14vw, 4rem) !important;
  }

  .fp-route-auth .auth-container {
    grid-template-columns: 1fr;
    width: 100% !important;
    min-height: 100vh;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible;
  }

  .fp-route-auth .brand {
    min-height: 240px;
    padding: 32px 20px !important;
    border-inline-end: 0;
    border-block-end: 1px solid var(--fp-border);
  }

  .fp-route-auth .brand h1 {
    max-width: 100%;
    font-size: clamp(2.4rem, 11vw, 3.5rem) !important;
    overflow-wrap: anywhere;
    white-space: normal !important;
  }

  .fp-route-auth .auth-panel,
  .fp-route-auth .auth-card {
    padding: 28px 20px 56px !important;
  }

  .fp-route-auth .forgot-password-row {
    justify-content: flex-start !important;
    margin-block: 0 16px !important;
  }

  .fp-route-dashboard .dashboard-shell {
    padding-block: 28px 48px !important;
  }

  .fp-route-dashboard .hero-row {
    grid-template-columns: 1fr;
    align-items: start !important;
  }

  .fp-route-dashboard .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2.65rem, 12vw, 4.4rem) !important;
    overflow-wrap: anywhere;
  }

  .fp-route-dashboard .dashboard-primary-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  .fp-route-dashboard .dashboard-action:nth-child(2n) {
    border-inline-end: 0 !important;
  }

  .fp-route-dashboard .dashboard-action:nth-child(n + 3) {
    border-block-start: 1px solid var(--fp-border) !important;
  }

  .fp-route-dashboard .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .fp-route-dashboard .stats-grid .card:nth-child(2n) {
    border-inline-end: 0 !important;
  }

  .fp-route-dashboard .stats-grid .card:nth-child(n + 3) {
    border-block-start: 1px solid var(--fp-border) !important;
  }

  .fp-route-dashboard .dashboard-grid {
    grid-template-columns: 1fr !important;
  }

  .fp-route-dashboard .dashboard-grid > * {
    grid-column: 1 / -1 !important;
  }

  .fp-route-dashboard .athlete-core-prompt-card {
    padding: 28px 20px !important;
  }

  .fp-redesign :where(.builder-page, .manual-page, .manual-nutrition-page, .plans-page, .tracker-page, .history-page, .log-page, .progress-page, .submission-page, .leaderboard-page, .admin-page) {
    padding-block: 28px 40px !important;
  }

  .fp-redesign .builder-card {
    padding: 24px 16px !important;
  }

  .fp-redesign .wizard-step-heading {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px !important;
  }

  .fp-redesign .visual-choice-grid,
  .fp-redesign .wizard-fields-grid {
    grid-template-columns: 1fr !important;
  }

  .fp-redesign .visual-choice-card {
    min-height: 180px;
  }

  .fp-redesign .wizard-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    inset-block-end: calc(64px + env(safe-area-inset-bottom));
  }

  .fp-route-social .social-shell {
    width: 100% !important;
    min-height: auto !important;
    padding: 0 0 16px !important;
  }

  .fp-route-social .social-topbar {
    inset-block-start: 0;
    padding-inline: 12px !important;
  }

  .fp-route-social .social-app {
    grid-template-columns: 1fr !important;
    min-height: calc(100vh - 140px);
  }

  .fp-route-social .conversation-rail {
    min-height: 160px;
    border-inline-end: 0 !important;
    border-block-end: 1px solid var(--fp-border);
  }

  .fp-route-social :where(.friends-view, .messages-view) {
    padding: 24px 12px !important;
  }

  .fp-route-social .view-hero,
  .fp-route-social .requests-grid {
    grid-template-columns: 1fr !important;
  }

  .fp-route-social .composer {
    inset-block-end: calc(64px + env(safe-area-inset-bottom)) !important;
  }

  .fp-redesign .site-feedback-trigger {
    inset-inline-end: 10px !important;
    inset-block-end: calc(10px + env(safe-area-inset-bottom)) !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
  }

  .fp-product-shell-active .site-feedback-trigger {
    inset-block-end: calc(76px + env(safe-area-inset-bottom)) !important;
  }

  .fp-redesign .site-feedback-trigger-label {
    display: none !important;
  }

  .fp-route-app .container {
    width: 100% !important;
    padding: 12px 12px 40px !important;
  }

  .fp-route-app :where(.settings-modal, .settings-panel, .settings-content, .settings-container) {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    border-radius: 0 !important;
  }

  .fp-legal-route .legal-page,
  .fp-redesign :where(.legal-container, .legal-main) {
    width: calc(100vw - 32px) !important;
    padding-block: 40px 56px !important;
  }

  .fp-redesign table {
    min-width: 560px;
  }
}

@media (max-width: 430px) {
  .fp-route-index .logo {
    font-size: 0.95rem !important;
  }

  .fp-route-index .nav-btn {
    padding-inline: 12px !important;
  }

  .fp-route-dashboard .stats-grid,
  .fp-route-dashboard .dashboard-primary-actions {
    grid-template-columns: 1fr !important;
  }

  .fp-route-dashboard .stats-grid .card,
  .fp-route-dashboard .dashboard-action {
    border-inline-end: 0 !important;
    border-block-start: 1px solid var(--fp-border) !important;
  }

  .fp-route-social .user-search {
    grid-template-columns: 1fr;
  }

  .fp-route-social .fp-text-action {
    min-width: 52px;
    padding-inline: 6px !important;
    font-size: 0.68rem;
  }
}

/* Performance motion -----------------------------------------------------
   Motion is opt-in after the shell has registered observers. No JavaScript
   means all content remains visible and usable. */
.fp-motion-enabled .fp-motion-target {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition:
    opacity var(--motion-slow) var(--ease-effort),
    transform var(--motion-slow) var(--ease-velocity),
    clip-path var(--motion-slow) var(--ease-velocity);
  transition-delay: var(--fp-motion-delay, 0ms);
  will-change: opacity, transform;
}

.fp-motion-enabled .fp-motion-target[data-fp-motion="train"] {
  transform: translate3d(-20px, 0, 0);
}

.fp-motion-enabled .fp-motion-target[data-fp-motion="fuel"] {
  transform: scaleX(0.94);
  transform-origin: left center;
}

.fp-motion-enabled .fp-motion-target[data-fp-motion="track"] {
  clip-path: inset(0 100% 0 0);
  transform: none;
}

.fp-motion-enabled .fp-motion-target[data-fp-motion="connect"] {
  transform: translate3d(20px, 0, 0);
}

.fp-motion-enabled .fp-motion-target.fp-motion-in {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 0 0);
  will-change: auto;
}

html[dir="rtl"] .fp-motion-enabled .fp-motion-target[data-fp-motion="train"] {
  transform: translate3d(20px, 0, 0);
}

html[dir="rtl"] .fp-motion-enabled .fp-motion-target[data-fp-motion="connect"] {
  transform: translate3d(-20px, 0, 0);
}

.fp-global-link::after,
.fp-route-index .nav-link::after {
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--motion-standard) var(--ease-velocity);
}

.fp-global-link[aria-current="page"]::after,
.fp-route-index .nav-link:hover::after,
.fp-route-index .nav-link:focus-visible::after {
  transform: scaleX(1);
}

.fp-redesign :where(button, a[role="button"], .primary-action, .secondary-action, .hero-btn):not(:disabled):active {
  transform: translateY(1px) scale(0.985);
  transition-duration: var(--motion-instant);
}

.fp-route-index .logo,
.fp-global-brand {
  position: relative;
}

.fp-motion-enabled.fp-redesign-ready .fp-route-index .logo,
.fp-motion-enabled.fp-redesign-ready .fp-global-brand {
  animation: fp-wordmark-establish var(--motion-standard) var(--ease-velocity) both;
}

.fp-motion-enabled .fp-route-index .hero-panel {
  animation: fp-performance-assemble var(--motion-moment) var(--ease-velocity) 120ms both;
}

.fp-motion-enabled .fp-route-index .hero-cta-row {
  animation: fp-action-lock var(--motion-standard) var(--ease-settle) 420ms both;
}

.fp-motion-enabled .visual-choice-card:has(input:checked),
.fp-motion-enabled .visual-choice-card.is-selected,
.fp-motion-enabled .fp-motion-selected {
  animation: fp-selection-lock var(--motion-standard) var(--ease-settle) both;
}

.fp-motion-enabled .fp-dynamic-entry {
  animation: fp-content-lock var(--motion-standard) var(--ease-velocity) both;
}

.fp-motion-enabled .message-row.fp-dynamic-entry.is-sent {
  animation-name: fp-message-sent;
}

.fp-motion-enabled .message-row.fp-dynamic-entry:not(.is-sent) {
  animation-name: fp-message-received;
}

.fp-motion-enabled :where(.set-row.complete-pulse, .set-row.fp-set-complete) {
  animation: fp-set-resolve 360ms var(--ease-settle) both !important;
}

.fp-redesign .set-row.active-set {
  outline: 2px solid var(--fp-ultramarine) !important;
  outline-offset: -2px;
  background: var(--fp-brand-primary-softer) !important;
  transition: background-color var(--motion-standard) var(--ease-recovery), outline-color var(--motion-standard) var(--ease-recovery);
}

.fp-redesign .set-row.completed {
  background: var(--fp-success-soft) !important;
}

.fp-redesign .set-complete {
  accent-color: var(--fp-ultramarine) !important;
  transition: transform var(--motion-fast) var(--ease-settle);
}

.fp-redesign .set-complete:checked {
  transform: scale(1.08);
}

.fp-redesign .rest-progress {
  overflow: hidden;
  background: var(--fp-border-dark) !important;
}

.fp-redesign .rest-progress::before {
  background: var(--fp-ultramarine) !important;
  transition: width 1s linear;
}

.fp-redesign :where(.rest-timer, #focusRestTimer) {
  animation: none !important;
  color: var(--fp-paper) !important;
  font-variant-numeric: tabular-nums;
}

.fp-redesign .finish-button.rest-button-active::after {
  display: none !important;
  animation: none !important;
}

.fp-motion-enabled :where(.success:not(.hidden), #successPanel:not(.hidden), .workout-complete:not(.hidden)) {
  animation: fp-completion-moment var(--motion-moment) var(--ease-velocity) both;
}

.fp-motion-enabled :where(.chart, .activity-chart, canvas, svg[data-chart]).fp-chart-reveal {
  animation: fp-chart-reveal var(--motion-slow) var(--ease-velocity) both;
}

.fp-redesign :where(.macro-progress, .macro-bar, .nutrition-progress, [data-macro-bar]) {
  transform-origin: left center;
  transition: transform var(--motion-standard) var(--ease-velocity);
}

html[dir="rtl"] .fp-redesign :where(.macro-progress, .macro-bar, .nutrition-progress, [data-macro-bar]) {
  transform-origin: right center;
}

.fp-motion-enabled .fp-metric-updated {
  animation: fp-metric-lock var(--motion-standard) var(--ease-settle) both;
}

.fp-motion-enabled .fp-muscle-active {
  animation: fp-muscle-activation 480ms var(--ease-recovery) both;
}

.fp-redesign .recording-dot {
  background: var(--fp-danger) !important;
}

.fp-motion-enabled .voice-recording-state:not([hidden]) .recording-dot {
  animation: fp-recording-truth 1200ms var(--ease-recovery) infinite;
}

.fp-motion-enabled :where(dialog[open], .modal.is-open, .settings-modal.is-open) {
  animation: fp-sheet-enter var(--motion-standard) var(--ease-velocity) both;
}

.fp-route-social .message-bubble,
.fp-route-social .is-sent .message-bubble {
  background-image: none !important;
  box-shadow: none !important;
}

.fp-route-social .is-sent .message-bubble {
  border-color: var(--fp-ultramarine) !important;
  background: var(--fp-ultramarine-strong) !important;
  color: var(--fp-paper) !important;
}

.fp-route-social .message-bubble:not(.voice-message) {
  background: var(--fp-paper-soft) !important;
  color: var(--fp-ink) !important;
}

.fp-route-pricing :where(.value-props, .price-card, .price-card.pro, .pricing-card),
.fp-route-app :where(.nav-section, .conversation-history, .settings-btn, .workout-btn),
.fp-redesign :where(.finish-button, .add-exercise) {
  background-image: none !important;
  box-shadow: none !important;
}

@keyframes fp-wordmark-establish {
  from { opacity: 0; transform: translate3d(-10px, 0, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes fp-performance-assemble {
  from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translate3d(0, 18px, 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
}

@keyframes fp-action-lock {
  from { opacity: 0; transform: translate3d(0, 10px, 0) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes fp-selection-lock {
  0% { transform: scale(0.985); }
  58% { transform: scale(1.008); }
  100% { transform: scale(1); }
}

@keyframes fp-content-lock {
  from { opacity: 0; transform: translate3d(0, 12px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes fp-message-sent {
  from { opacity: 0; transform: translate3d(12px, 0, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes fp-message-received {
  from { opacity: 0; transform: translate3d(-12px, 0, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes fp-set-resolve {
  0% { transform: scale(0.992); }
  45% { transform: scale(1.006); }
  100% { transform: scale(1); }
}

@keyframes fp-completion-moment {
  0% { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.985); border-color: var(--fp-border); }
  55% { opacity: 1; transform: translate3d(0, -2px, 0) scale(1.005); border-color: var(--fp-ultramarine); }
  100% { opacity: 1; transform: none; border-color: var(--fp-border); }
}

@keyframes fp-chart-reveal {
  from { opacity: 0.55; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}

@keyframes fp-metric-lock {
  0% { transform: translate3d(0, 3px, 0); opacity: 0.72; }
  55% { transform: translate3d(0, -2px, 0); opacity: 1; }
  100% { transform: none; opacity: 1; }
}

@keyframes fp-muscle-activation {
  0% { opacity: 0.62; transform: scale(0.99); }
  55% { opacity: 1; transform: scale(1.015); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes fp-recording-truth {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.82); }
}

@keyframes fp-sheet-enter {
  from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.99); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fp-redesign *,
  .fp-redesign *::before,
  .fp-redesign *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .fp-motion-target,
  .fp-dynamic-entry,
  .fp-chart-reveal {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }

  .fp-route-index .hero-panel::before,
  .fp-route-dashboard .dashboard-shell::before {
    animation: none !important;
    opacity: 0.42 !important;
    transform: none !important;
  }

  .voice-recording-state:not([hidden]) .recording-dot {
    opacity: 1 !important;
  }
}

/* Dashboard and product navigation polish ---------------------------------
   The feature bar is the first orientation cue after sign-in. Keep the five
   primary destinations visible, but give the rest of the product a clear,
   keyboard-accessible home behind one familiar menu button. */
.fp-global-nav {
  position: sticky;
  isolation: isolate;
  z-index: 2100;
  min-height: 72px;
  padding-inline: max(16px, calc((100vw - 1520px) / 2));
  gap: 8px;
  box-shadow: 0 12px 30px rgba(16, 24, 43, 0.12);
}

.fp-global-brand {
  min-width: 198px;
  padding-inline: 18px;
  font-size: 1.18rem;
}

.fp-global-links {
  gap: 2px;
  padding-inline: 8px;
}

.fp-global-link {
  padding-inline: 18px;
  font-size: 0.9rem;
  font-weight: 850;
  letter-spacing: 0.035em;
}

.fp-global-link[aria-current="page"]::after {
  inset-inline: 14px;
  height: 4px;
  border-radius: 999px 999px 0 0;
}

.fp-global-menu-button {
  display: inline-grid;
  flex: 0 0 44px;
  place-items: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--fp-brand-primary) 38%, var(--fp-border));
  border-radius: 12px;
  background: var(--fp-active-surface);
  color: var(--fp-text-primary);
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-effort), transform var(--motion-fast) var(--ease-effort), border-color var(--motion-fast) var(--ease-effort);
}

.fp-global-menu-button:hover,
.fp-global-menu-button:focus-visible,
.fp-global-nav.is-menu-open .fp-global-menu-button {
  background: var(--fp-brand-primary);
  border-color: var(--fp-brand-primary);
  color: #fff;
  transform: translateY(-1px);
}

.fp-global-menu-button span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.fp-global-menu {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 2202;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(420px, calc(100vw - 24px));
  height: 100dvh;
  padding: 22px 20px max(28px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-inline-end: 1px solid rgba(92, 176, 255, 0.3);
  background:
    radial-gradient(circle at 12% 2%, rgba(47, 155, 255, 0.2), transparent 34%),
    linear-gradient(180deg, #08182c 0%, #06111f 100%);
  box-shadow: 28px 0 80px rgba(1, 7, 18, 0.6);
  animation: fp-global-drawer-enter 180ms var(--ease-effort) both;
}

.fp-global-menu[hidden] { display: none; }

.fp-global-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2201;
  width: 100vw;
  height: 100dvh;
  padding: 0;
  border: 0;
  background: rgba(1, 6, 15, 0.72);
  backdrop-filter: blur(3px);
  cursor: default;
}

.fp-global-menu-backdrop[hidden] { display: none; }

body.fp-global-menu-open {
  overflow: hidden;
}

.fp-global-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block-end: 16px;
  border-block-end: 1px solid rgba(151, 196, 235, 0.18);
}

.fp-global-menu-title {
  color: #f4f9ff;
  font-family: var(--fp-display);
  font-size: clamp(1.45rem, 4vw, 1.8rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.fp-global-menu-close {
  min-width: 84px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(151, 196, 235, 0.28);
  border-radius: 12px;
  background: rgba(47, 155, 255, 0.1);
  color: #e9f4ff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
}

.fp-global-menu-close:hover,
.fp-global-menu-close:focus-visible {
  border-color: #35cfdf;
  background: rgba(53, 207, 223, 0.16);
  outline: 3px solid rgba(53, 207, 223, 0.2);
  outline-offset: 2px;
}

.fp-global-menu-group {
  display: grid;
  gap: 6px;
}

.fp-global-menu-group-title {
  margin: 0 0 4px;
  color: #79a7cd;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fp-global-menu-link {
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #c8d9e8 !important;
  font-size: 0.96rem;
  font-weight: 820;
  line-height: 1.25;
  text-decoration: none;
  transition: background var(--motion-fast) var(--ease-effort), color var(--motion-fast) var(--ease-effort), transform var(--motion-fast) var(--ease-effort);
}

.fp-global-menu-link:hover,
.fp-global-menu-link:focus-visible,
.fp-global-menu-link[aria-current="page"] {
  border-color: rgba(53, 207, 223, 0.28);
  background: linear-gradient(90deg, rgba(47, 155, 255, 0.2), rgba(53, 207, 223, 0.08));
  color: #ffffff !important;
  outline: none;
  transform: translateX(3px);
}

html[dir="rtl"] .fp-global-menu-link:hover,
html[dir="rtl"] .fp-global-menu-link:focus-visible,
html[dir="rtl"] .fp-global-menu-link[aria-current="page"] {
  transform: translateX(-3px);
}

@keyframes fp-global-drawer-enter {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: none; }
}

html[dir="rtl"] .fp-global-menu {
  animation-name: fp-global-drawer-enter-rtl;
}

@keyframes fp-global-drawer-enter-rtl {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}

body.fp-route-dashboard {
  position: relative;
  background: #10182b !important;
}

body.fp-route-dashboard .hero-copy h1 {
  color: #dce6ff !important;
  text-shadow: 0 0 22px rgba(79, 111, 255, 0.24);
}

@media (max-width: 1100px) {
  body.fp-route-dashboard .dashboard-shell {
    position: relative;
    z-index: 100;
  }

  body.fp-route-dashboard.drawer-open .fp-global-nav {
    z-index: 80;
  }
}

body.fp-route-dashboard::before,
body.fp-route-dashboard::after,
body.fp-route-index::before,
body.fp-route-index::after {
  position: fixed;
  z-index: 0;
  display: block !important;
  content: "" !important;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.52;
  will-change: transform;
}

body.fp-route-dashboard::before,
body.fp-route-index::before {
  inset-block-start: 8vh;
  inset-inline-end: -12vw;
  width: min(46vw, 620px);
  height: min(46vw, 620px);
  background: rgba(48, 79, 254, 0.18);
  animation: fp-page-orbit 24s var(--ease-recovery) 2 alternate;
}

body.fp-route-dashboard::after,
body.fp-route-index::after {
  inset-block-end: -18vh;
  inset-inline-start: -10vw;
  width: min(38vw, 520px);
  height: min(38vw, 520px);
  background: rgba(24, 169, 121, 0.13);
  animation: fp-page-orbit-reverse 28s var(--ease-recovery) 2 alternate;
}

body.fp-route-dashboard > *,
body.fp-route-index > * {
  position: relative;
  z-index: 1;
}

body.fp-route-dashboard > .fp-global-nav,
body.fp-route-index > .fp-global-nav {
  z-index: 3100;
}

.fp-route-dashboard .dashboard-shell {
  background: rgba(16, 24, 43, 0.7);
  border-inline: 1px solid rgba(130, 146, 255, 0.1);
  border-radius: 0 0 28px 28px;
}

.fp-route-dashboard .dashboard-shell::after {
  position: absolute;
  inset-block-start: 26%;
  inset-inline-start: -10rem;
  z-index: 0;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: rgba(213, 77, 121, 0.08);
  content: "";
  pointer-events: none;
  animation: fp-page-orbit-reverse 22s var(--ease-recovery) 2 alternate;
}

.fp-route-dashboard .dashboard-compact-header {
  background: #182441 !important;
  border-color: rgba(130, 146, 255, 0.24) !important;
  box-shadow: 0 18px 42px rgba(8, 13, 24, 0.2);
}

.fp-route-dashboard .dashboard-context-item span,
.fp-route-dashboard .dashboard-context-item strong {
  font-size: 0.83rem;
}

@keyframes fp-page-orbit {
  0% { transform: translate3d(0, -3vh, 0) scale(0.92); }
  100% { transform: translate3d(-9vw, 10vh, 0) scale(1.08); }
}

@keyframes fp-page-orbit-reverse {
  0% { transform: translate3d(0, 5vh, 0) scale(0.9); }
  100% { transform: translate3d(12vw, -8vh, 0) scale(1.1); }
}

@media (max-width: 760px) {
  .fp-global-nav {
    position: fixed;
    inset: auto 0 0;
    min-height: 0;
    padding-inline: 0;
    padding-block-end: env(safe-area-inset-bottom);
  }

  .fp-global-menu-button {
    position: fixed;
    inset-block-start: max(12px, env(safe-area-inset-top));
    inset-inline-start: 12px;
    z-index: 2200;
    display: inline-grid;
    background: rgba(6, 17, 31, 0.94);
    box-shadow: 0 10px 28px rgba(1, 7, 18, 0.34);
  }

  .fp-global-menu {
    width: min(390px, calc(100vw - 16px));
  }

  .fp-global-links {
    padding-inline: 0;
  }

  .fp-global-link {
    font-size: clamp(0.64rem, 2.7vw, 0.76rem);
    font-weight: 850;
  }

  body.fp-route-dashboard .dashboard-shell {
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.fp-route-dashboard::before,
  body.fp-route-dashboard::after,
  body.fp-route-index::before,
  body.fp-route-index::after,
  .fp-route-dashboard .dashboard-shell::after {
    animation: none !important;
    transform: none !important;
  }
}

/* RTL and drawer hardening --------------------------------------------------
   Hebrew copy must follow the document direction, not the Latin display
   typography used by the English treatment. The menu is a real overlay: it
   owns its width, spacing, and safe-area padding so it cannot compress or
   visually merge with the page behind it. */
html[dir="rtl"] .fp-redesign :where(h1, h2, h3, h4, h5, h6, p, a, button, label, li, th, td, input, select, textarea, .fp-global-link, .fp-global-menu-link, .fp-global-menu-title) {
  letter-spacing: normal;
}

html[dir="rtl"] .fp-redesign :where(h1, h2, h3, h4, h5, h6) {
  max-width: 100%;
  font-family: var(--fp-ui);
  font-weight: 850;
  line-height: 1.14;
  text-transform: none;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
  transform: none !important;
  filter: none !important;
}

html[dir="rtl"] .fp-redesign :where(h1, h2, h3, h4, h5, h6, p, label, li, th, td) {
  direction: rtl;
  unicode-bidi: plaintext;
}

html[dir="rtl"] .fp-global-brand {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

.fp-global-menu,
.fp-global-menu * {
  box-sizing: border-box;
}

.fp-global-menu {
  padding-block-start: max(28px, env(safe-area-inset-top));
  padding-inline: clamp(18px, 3vw, 28px);
  gap: 24px;
  isolation: isolate;
}

.fp-global-menu-header {
  flex: 0 0 auto;
  min-height: 52px;
  gap: 20px;
}

.fp-global-menu-title,
.fp-global-menu-close,
.fp-global-menu-group-title,
.fp-global-menu-link {
  letter-spacing: normal;
  direction: inherit;
  unicode-bidi: plaintext;
  text-align: start;
}

.fp-global-menu-group {
  gap: 8px;
}

.fp-global-menu-group-title {
  margin-block: 2px 6px;
  line-height: 1.35;
}

.fp-global-menu-link {
  min-height: 52px;
  padding-block: 13px;
  line-height: 1.35;
}

html[dir="rtl"] .fp-global-menu {
  inset-inline-start: auto;
  inset-inline-end: 0;
  border-inline-start: 1px solid rgba(92, 176, 255, 0.3);
  border-inline-end: 0;
  box-shadow: -28px 0 80px rgba(1, 7, 18, 0.6);
}

html[dir="ltr"] .fp-global-menu {
  inset-inline-start: 0;
  inset-inline-end: auto;
}

html[dir="rtl"] .fp-global-menu-link:hover,
html[dir="rtl"] .fp-global-menu-link:focus-visible,
html[dir="rtl"] .fp-global-menu-link[aria-current="page"] {
  transform: translateX(-3px);
}

@media (max-width: 760px) {
  .fp-global-menu {
    width: min(390px, calc(100vw - 16px));
    padding-block-end: max(32px, env(safe-area-inset-bottom));
  }

  .fp-global-menu-link {
    min-height: 54px;
  }
}
