@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/jetbrains-mono-500-1.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/jetbrains-mono-700-2.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/plus-jakarta-sans-400-3.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/plus-jakarta-sans-600-4.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/plus-jakarta-sans-700-5.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("/fonts/plus-jakarta-sans-800-6.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/space-grotesk-600-7.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/space-grotesk-700-8.woff2") format("woff2"); }

:root {
  --fl-iron: #11161B;
  --fl-slate: #1B232C;
  --fl-slate-2: #25303C;
  --fl-limestone: #F6F4EF;
  --fl-paper: #FFFFFF;
  --fl-sand: #ECE8DF;
  --fl-border: #DAD4C7;
  --fl-copper: #D95D1E;
  --fl-copper-bright: #F0712C;
  --fl-copper-tint: #FFF3EC;
  --fl-signal: #15803D;
  --fl-signal-bg: #DCFCE7;
  --fl-signal-pulse: #22C55E;
  --fl-emergency: #DC2626;
  --fl-emergency-bg: #FEE2E2;
  --fl-amber: #B45309;
  --fl-amber-bg: #FEF3C7;
  --fl-ink: #0F172A;
  --fl-muted: #475569;
  --fl-radius: 10px;
  --fl-shadow: 0 2px 8px rgba(17, 22, 27, 0.06);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body.fl-body {
  margin: 0;
  background: var(--fl-limestone);
  color: var(--fl-ink);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.65rem 0;
  color: var(--fl-iron);
}

p {
  margin: 0 0 1rem 0;
}

a {
  color: var(--fl-copper);
  text-decoration: none;
}

pre {
  max-width: 100%;
  overflow-x: auto;
}

.fl-mono, .fl-mono-sm, .fl-mono-xs, code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  font-variant-numeric: tabular-nums;
}
.fl-mono-sm { font-size: 0.84rem; }
.fl-mono-xs { font-size: 0.76rem; }

.fl-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Header & Navigation */
.fl-header {
  background: var(--fl-iron);
  color: var(--fl-limestone);
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 2px solid var(--fl-copper);
}

.fl-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 10px;
}

.fl-brand-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  flex-shrink: 1;
  min-width: 0;
}

.fl-brand-logo-img {
  height: 38px;
  width: auto;
  max-width: 215px;
  display: block;
}

.fl-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.fl-nav a {
  color: #E2E8F0;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.fl-nav a:hover, .fl-nav a.is-active {
  color: var(--fl-copper-bright);
}

.fl-nav-dropdown {
  position: relative;
}
.fl-nav-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 245px;
  background: var(--fl-slate);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}
.fl-nav-dropdown:hover .fl-nav-menu {
  display: flex;
  flex-direction: column;
}
.fl-nav-menu a {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
}
.fl-nav-menu a:hover {
  background: var(--fl-slate-2);
}

.fl-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fl-mobile-subnav {
  display: none;
  background: var(--fl-slate);
  border-top: 1px solid #2D3846;
  padding: 0 10px;
  justify-content: space-around;
  gap: 4px;
}
.fl-mobile-subnav a {
  color: #E2E8F0;
  font-size: 0.86rem;
  font-weight: 700;
  min-height: 44px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.fl-mobile-subnav a.is-active {
  color: var(--fl-copper-bright);
  border-bottom-color: var(--fl-copper);
}

/* Buttons — Minimum 44–54px touch targets for gloved/tired contractor thumbs */
.fl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease;
  text-align: center;
  line-height: 1.2;
}
.fl-btn:active { transform: translateY(1px); }
.fl-btn-sm { min-height: 42px; padding: 8px 14px; font-size: 0.88rem; }
.fl-btn-xs { min-height: 38px; padding: 6px 12px; font-size: 0.81rem; }
.fl-btn-speed { min-height: 38px; min-width: 44px; padding: 5px 10px; font-size: 0.78rem; }
.fl-btn-lg { min-height: 54px; padding: 14px 24px; font-size: 1.04rem; }
.fl-btn-block { width: 100%; }

.fl-btn-copper {
  background: var(--fl-copper);
  color: #FFFFFF;
}
.fl-btn-copper:hover {
  background: var(--fl-copper-bright);
  color: #FFFFFF;
}

.fl-btn-iron {
  background: var(--fl-iron);
  color: #FFFFFF;
}
.fl-btn-iron:hover { background: var(--fl-slate-2); color: #FFFFFF; }

.fl-btn-signal {
  background: var(--fl-signal);
  color: #FFFFFF;
}
.fl-btn-signal:hover { background: #166534; color: #FFFFFF; }

.fl-btn-outline {
  background: var(--fl-paper);
  border-color: var(--fl-iron);
  color: var(--fl-iron);
}
.fl-btn-outline:hover { background: var(--fl-sand); }

.fl-btn-outline-light {
  background: transparent;
  border-color: #64748B;
  color: #F8FAFC;
}
.fl-btn-outline-light:hover { border-color: #F8FAFC; color: #FFFFFF; }

.fl-btn-ghost-dark {
  background: rgba(255,255,255,0.09);
  color: #F1F5F9;
}
.fl-btn-ghost-dark:hover { background: rgba(255,255,255,0.18); }

/* Hero & Sections */
.fl-hero {
  background: linear-gradient(180deg, var(--fl-iron) 0%, #172029 100%);
  color: var(--fl-limestone);
  padding: 50px 0 60px;
  border-bottom: 1px solid #2D3748;
}
.fl-hero h1 {
  color: #FFFFFF;
  font-size: clamp(1.9rem, 4.3vw, 3.25rem);
  max-width: 19ch;
}
.fl-hero-lead {
  color: #CBD5E1;
  font-size: 1.1rem;
  max-width: 58ch;
  margin-bottom: 22px;
}
.fl-hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.96fr;
  gap: 32px;
  align-items: center;
}
/* CRITICAL: min-width: 0 prevents wide children (<pre>, URLs, tables) from blowing out mobile grids */
.fl-hero-grid > *, .fl-grid-2 > *, .fl-grid-3 > *, .fl-grid-4 > * {
  min-width: 0;
}

.fl-eyebrow, .fl-eyebrow-light {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 5px;
  margin-bottom: 14px;
}
.fl-eyebrow {
  background: var(--fl-copper-tint);
  color: var(--fl-copper);
  border: 1px solid #F7C7AE;
}
.fl-eyebrow-light {
  background: rgba(240, 113, 44, 0.16);
  color: #FF9B66;
  border: 1px solid rgba(240, 113, 44, 0.35);
}

.fl-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.fl-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  font-size: 0.88rem;
  color: #94A3B8;
  margin-top: 14px;
}
.fl-trust-strip strong { color: #F8FAFC; }

/* Architectural Proof Bar below Hero */
.fl-proof-strip {
  background: #0D1217;
  border-bottom: 1px solid #26313D;
  padding: 14px 0;
}
.fl-proof-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  text-align: center;
}
.fl-proof-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 6px;
}
.fl-proof-grid strong {
  color: #FFB088;
  font-size: 1.05rem;
}
.fl-proof-grid span {
  color: #94A3B8;
  font-size: 0.78rem;
}

/* Interactive 5-Ring Rollover Visualizer Steps */
.fl-rollover-step {
  background: #0B0F13;
  border: 1.5px solid #2D3846;
  border-radius: 10px;
  padding: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.fl-rollover-step.is-active {
  border-color: var(--fl-copper-bright);
  box-shadow: 0 0 0 3px rgba(240, 113, 44, 0.28);
  transform: translateY(-2px);
}
.fl-rollover-step.is-done {
  border-color: var(--fl-signal-pulse);
  background: #0D1F17;
}

.fl-trade-tab-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.fl-trade-tab-grid button {
  white-space: nowrap;
}

a.fl-card {
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
a.fl-card:hover {
  border-color: var(--fl-copper);
  box-shadow: 0 6px 18px rgba(17, 22, 27, 0.09);
  transform: translateY(-2px);
}

.fl-section {
  padding: 56px 0;
}
.fl-section-alt {
  background: var(--fl-sand);
  border-top: 1px solid var(--fl-border);
  border-bottom: 1px solid var(--fl-border);
}
.fl-section-dark {
  background: var(--fl-iron);
  color: var(--fl-limestone);
}
.fl-section-dark h2, .fl-section-dark h3 { color: #FFFFFF; }

.fl-section-header {
  max-width: 720px;
  margin-bottom: 32px;
}
.fl-section-header h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
}

/* Cards & Grids */
.fl-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.fl-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.fl-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.fl-card {
  background: var(--fl-paper);
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  padding: 22px;
  box-shadow: var(--fl-shadow);
  min-width: 0;
}
.fl-card-dark {
  background: var(--fl-slate);
  border: 1px solid #334155;
  color: #F1F5F9;
  border-radius: var(--fl-radius);
  padding: 22px;
  min-width: 0;
}
.fl-card-dark h3, .fl-card-dark h4 { color: #FFFFFF; }

.fl-card-featured {
  border: 2.5px solid var(--fl-copper);
  position: relative;
}
.fl-popular-ribbon {
  position: absolute;
  top: -13px;
  right: 18px;
  background: var(--fl-copper);
  color: #FFFFFF;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}

/* Badges */
.fl-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.fl-badge-emergency { background: var(--fl-emergency-bg); color: var(--fl-emergency); }
.fl-badge-ok { background: var(--fl-signal-bg); color: var(--fl-signal); }
.fl-badge-warn { background: var(--fl-amber-bg); color: var(--fl-amber); }
.fl-badge-neutral { background: #E2E8F0; color: #334155; }
.fl-badge-copper { background: var(--fl-copper-tint); color: var(--fl-copper); }

/* Sample Call Player Card */
.fl-call-player-card {
  background: var(--fl-paper);
  border: 1.5px solid var(--fl-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.fl-audio-bar {
  background: var(--fl-iron);
  color: #FFFFFF;
  padding: 12px 14px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fl-audio-bar audio {
  width: 100%;
  height: 38px;
}
.fl-transcript-scroll {
  max-height: 255px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.fl-turn {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.fl-turn-agent {
  background: #FFF6F0;
  border-left: 3px solid var(--fl-copper);
}
.fl-turn-caller {
  background: #F1F5F9;
  border-left: 3px solid #64748B;
}
.fl-turn.is-speaking {
  border-color: var(--fl-copper);
  box-shadow: 0 0 0 2px rgba(217, 93, 30, 0.2);
}
.fl-turn-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  color: var(--fl-muted);
  margin-bottom: 3px;
}

/* Forms & Inputs (16px+ so iOS Safari never auto-zooms) */
.fl-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 15px;
  min-width: 0;
}
.fl-field label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fl-iron);
}
.fl-input, .fl-select, .fl-textarea {
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  font-size: 16px;
  font-family: inherit;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--fl-ink);
}
.fl-textarea {
  min-height: 92px;
  resize: vertical;
}
.fl-input:focus, .fl-select:focus, .fl-textarea:focus {
  outline: none;
  border-color: var(--fl-copper);
  box-shadow: 0 0 0 3px rgba(217, 93, 30, 0.16);
}

/* Tables & Mobile Card Stacking */
.fl-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  background: var(--fl-paper);
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
}
.fl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.fl-table th {
  text-align: left;
  padding: 12px 14px;
  background: #F1EFE9;
  border-bottom: 1.5px solid var(--fl-border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fl-muted);
}
.fl-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #ECE8DF;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.fl-sms-bubble {
  border-radius: 12px;
  padding: 10px 13px;
  max-width: 92%;
  min-width: 0;
  font-size: 0.89rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fl-sms-bubble-out {
  background: var(--fl-limestone);
  border: 1px solid var(--fl-border);
  border-left: 3px solid var(--fl-copper);
  align-self: flex-start;
}
.fl-sms-bubble-in {
  background: var(--fl-iron);
  color: #F8FAFC;
  border-right: 3px solid var(--fl-signal-pulse);
  align-self: flex-end;
}
.fl-table tr:last-child td { border-bottom: none; }

/* Visual Kanban Board for Contractor CRM */
.fl-kanban-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(252px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: start;
}
.fl-kanban-col {
  background: #EFECE4;
  border: 1px solid var(--fl-border);
  border-radius: 10px;
  padding: 12px;
  min-height: 280px;
}
.fl-kanban-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fl-border);
}
.fl-kanban-card {
  background: var(--fl-paper);
  border: 1px solid var(--fl-border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(17,22,27,0.05);
}
.fl-kanban-card .fl-btn {
  min-height: 40px !important;
  white-space: nowrap;
  padding: 6px 9px !important;
  font-size: 0.79rem;
}

/* Good / Better / Best Interactive Proposal Cards (/quote/:contactId) */
.fl-quote-tiers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 16px;
}
.fl-quote-tier-card {
  display: block;
  border: 2px solid var(--fl-border);
  border-radius: 10px;
  padding: 14px;
  background: var(--fl-paper);
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.fl-quote-tier-card.is-selected {
  border-color: var(--fl-copper);
  background: #FFFBF7;
  box-shadow: 0 0 0 3px rgba(217, 93, 30, 0.16);
}
.fl-quote-tier-card input[type="radio"] {
  accent-color: var(--fl-copper);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* 6-Scenario AI Readiness QA Scorecard */
.fl-qa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.fl-qa-item {
  border: 1px solid var(--fl-border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--fl-limestone);
}
.fl-qa-item.is-pass {
  border-left: 3px solid var(--fl-signal);
}
.fl-qa-item.is-fail {
  border-left: 3px solid var(--fl-emergency);
  background: var(--fl-emergency-bg);
}

/* Live Homeowner Job & Arrival Tracker (/track/:contactId) */
.fl-tracker-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}
.fl-tracker-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1.5px solid var(--fl-border);
  background: var(--fl-limestone);
}
.fl-tracker-step.is-done {
  border-color: #86EFAC;
  background: #F0FDF4;
}
.fl-tracker-step.is-active {
  border-color: var(--fl-copper);
  background: #FFF7F2;
  box-shadow: 0 0 0 3px rgba(217, 93, 30, 0.14);
}
.fl-tracker-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.84rem;
  flex-shrink: 0;
  background: #CBD5E1;
  color: #334155;
}
.fl-tracker-step.is-done .fl-tracker-dot {
  background: var(--fl-signal);
  color: #FFFFFF;
}
.fl-tracker-step.is-active .fl-tracker-dot {
  background: var(--fl-copper);
  color: #FFFFFF;
}

/* Top Priority Spotlight Actions (Clean 1-Row / 2+1 on Phone) */
.fl-spotlight-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

/* Sticky Quick Section Jump Bar on Operator Console */
.fl-ops-jumpbar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 12px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.fl-ops-jumpbar a {
  white-space: nowrap;
  flex-shrink: 0;
}

/* Photo Thumbnail Grid */
.fl-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.fl-photo-thumb {
  border: 1px solid var(--fl-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--fl-limestone);
}
.fl-photo-thumb img {
  width: 100%;
  height: 105px;
  object-fit: cover;
  display: block;
}
.fl-photo-thumb-cap {
  padding: 6px 8px;
  font-size: 0.76rem;
  color: var(--fl-ink);
  line-height: 1.3;
}

/* Contractor Portal Specifics */
.fl-portal-topbar {
  background: var(--fl-iron);
  color: #FFFFFF;
  padding: 10px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.fl-portal-topbar-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
  min-width: 240px;
}
.fl-portal-logo-img {
  height: 30px;
  width: auto;
  max-width: 170px;
  display: block;
}
.fl-portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.fl-shop-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--fl-slate);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #334155;
  order: -1;
}
@media (min-width: 761px) {
  .fl-portal-topbar {
    flex-wrap: nowrap;
  }
  .fl-portal-topbar-row1,
  .fl-ops-topbar-top {
    display: contents;
  }
  .fl-portal-topbar-row1 > .fl-brand-link { order: 0; }
  .fl-ops-topbar-top > .fl-portal-brand { order: 0; margin-right: auto; }
  .fl-shop-pill { order: 1; margin-right: auto; }
  .fl-portal-user { order: 2; }
  .fl-ops-topbar-top > form { order: 3; }
}
.fl-mobile-bottom-nav {
  display: none;
}
/* Horizontal Non-Wrapping Pill Strip (CRM Stages / Event Filters) */
.fl-pill-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
  scrollbar-width: none;
}
.fl-pill-strip > * {
  white-space: nowrap;
  flex-shrink: 0;
}
/* Uniform Pickup Mode Switcher */
.fl-mode-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
/* Live Simulator Extracted Fields Strip & Audio Wave */
.fl-sim-extracted {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.fl-sim-pill {
  background: #172029;
  border: 1px solid #334155;
  color: #CBD5E1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
}
.fl-sim-pill.is-verified {
  border-color: #22C55E;
  color: #86EFAC;
  background: rgba(21, 128, 61, 0.18);
}
.fl-sim-pill.is-urgent {
  border-color: #EF4444;
  color: #FCA5A5;
  background: rgba(220, 38, 38, 0.18);
}
.fl-wave-bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.fl-wave-bars.is-active {
  display: inline-flex;
}
.fl-wave-bars span {
  width: 3px;
  background: var(--fl-copper-bright);
  border-radius: 2px;
  animation: flWave 0.75s ease-in-out infinite alternate;
}
.fl-wave-bars span:nth-child(2) { animation-delay: 0.15s; }
.fl-wave-bars span:nth-child(3) { animation-delay: 0.3s; }
.fl-wave-bars span:nth-child(4) { animation-delay: 0.45s; }
@keyframes flWave {
  from { height: 4px; }
  to { height: 14px; }
}
/* Tap-Friendly Camera Upload Dropzone */
.fl-camera-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed var(--fl-copper);
  background: var(--fl-copper-tint);
  border-radius: 10px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  color: var(--fl-iron);
  font-weight: 700;
}
.fl-camera-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  font-size: 16px;
  opacity: 0;
  overflow: hidden;
}
/* Guarantee Progress Bar (Ops Console) */
.fl-progress-track {
  width: 100%;
  height: 8px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 5px;
}
.fl-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--fl-signal);
}
.fl-progress-fill.is-zero {
  background: var(--fl-emergency);
}
.fl-shop-pill strong {
  display: block;
  font-size: 0.9rem;
  color: #FFFFFF;
}
.fl-shop-pill span { color: #94A3B8; }

.fl-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.fl-pulse-dot.is-live {
  background: var(--fl-signal-pulse);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.22);
}
.fl-pulse-dot.is-warn {
  background: #F59E0B;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
}

.fl-portal-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fl-link-muted { color: #CBD5E1; font-size: 0.85rem; display: inline-flex; align-items: center; min-height: 38px; padding: 0 4px; }
.fl-back-link { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; padding: 4px 0; }
.fl-user-tag { font-size: 0.85rem; color: #94A3B8; }

.fl-portal-tabs {
  background: var(--fl-paper);
  border-bottom: 1.5px solid var(--fl-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.fl-portal-tabs-inner {
  display: flex;
  overflow-x: auto;
  gap: 2px;
  scrollbar-width: none;
}
.fl-portal-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 14px;
  min-height: 46px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fl-muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.fl-portal-tab:hover { color: var(--fl-iron); }
.fl-portal-tab.is-active {
  color: var(--fl-copper);
  border-bottom-color: var(--fl-copper);
}
.fl-tab-badge {
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 0.72rem;
  background: var(--fl-copper-tint);
  color: var(--fl-copper);
  font-family: 'JetBrains Mono', monospace;
}
.fl-tab-badge.is-alert { background: var(--fl-emergency); color: #FFFFFF; }
.fl-tab-badge.is-ok { background: var(--fl-signal-bg); color: var(--fl-signal); }

.fl-portal-main {
  padding-top: 24px;
  padding-bottom: 72px;
}

.fl-toast-banner {
  background: #14532D;
  color: #F0FDF4;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: 20px;
}

.fl-kpi-card {
  background: var(--fl-paper);
  border: 1px solid var(--fl-border);
  border-radius: var(--fl-radius);
  padding: 18px;
}
.fl-kpi-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--fl-muted);
}
.fl-kpi-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--fl-iron);
  margin: 4px 0;
}
.fl-kpi-sub {
  font-size: 0.83rem;
  color: var(--fl-muted);
}
.fl-kpi-sub a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}

/* Star Code Box */
.fl-starcode-box {
  background: var(--fl-iron);
  color: #FFFFFF;
  border-radius: 10px;
  padding: 18px;
  margin: 12px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.fl-starcode-digits {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.38rem;
  font-weight: 700;
  color: #FFB088;
  word-break: break-all;
}

/* Bottom CTA & Footer */
.fl-bottom-cta {
  background: var(--fl-slate);
  color: #FFFFFF;
  padding: 50px 0;
  border-top: 3px solid var(--fl-copper);
}
.fl-bottom-cta h2 { color: #FFFFFF; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.fl-bottom-cta p { color: #CBD5E1; margin-bottom: 0; }
.fl-bottom-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.fl-bottom-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fl-footer {
  background: #0B0F13;
  color: #94A3B8;
  padding: 46px 0;
  font-size: 0.92rem;
}
.fl-footer h4 {
  color: #F8FAFC;
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.fl-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.fl-footer li { margin-bottom: 6px; }
.fl-footer a {
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
.fl-footer a:hover { color: var(--fl-copper-bright); }
.fl-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}
.fl-footer-copy { max-width: 42ch; margin-top: 10px; }

/* Live Interactive Simulator Box */
.fl-sim-box {
  background: var(--fl-iron);
  color: #F8FAFC;
  border: 2px solid var(--fl-copper);
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
}
.fl-sim-log {
  background: #0B0F13;
  border: 1px solid #2D3846;
  border-radius: 8px;
  padding: 14px;
  min-height: 200px;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}
.fl-sim-msg {
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 0.91rem;
  max-width: 90%;
  word-wrap: break-word;
}
.fl-sim-msg-agent {
  background: #1E293B;
  border-left: 3px solid var(--fl-copper-bright);
  align-self: flex-start;
}
.fl-sim-msg-user {
  background: var(--fl-copper);
  color: #FFFFFF;
  align-self: flex-end;
}
.fl-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.fl-chip {
  background: #25303C;
  color: #E2E8F0;
  border: 1px solid #3E4C5E;
  border-radius: 99px;
  padding: 8px 13px;
  min-height: 38px;
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
}
.fl-chip:hover {
  border-color: var(--fl-copper-bright);
  color: #FFFFFF;
}

.fl-mic-btn.is-listening {
  background: var(--fl-emergency) !important;
  color: #FFFFFF !important;
  border-color: #FCA5A5 !important;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.3);
}

@media (max-width: 900px) {
  .fl-nav { display: none; }
  .fl-mobile-subnav { display: flex; }
  .fl-brand-logo-img { height: 31px; max-width: 170px; }
  .fl-header-cta { padding: 8px 12px; font-size: 0.84rem; min-height: 40px; }
  .fl-hero { padding: 30px 0 44px; }
  .fl-hero-grid, .fl-grid-2, .fl-grid-3, .fl-grid-4, .fl-footer-grid {
    grid-template-columns: 1fr;
  }
  .fl-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
  }
  .fl-proof-grid > div:last-child {
    grid-column: span 2;
  }
  .fl-btn-mobile-full { width: 100%; }
  .fl-footer { padding-bottom: 92px; }
}

@media (max-width: 760px) {
  .fl-hide-xs { display: none !important; }
  .fl-container { padding-left: 14px; padding-right: 14px; }
  .fl-portal-main { padding-top: 18px; padding-bottom: 92px; }
  .fl-portal-topbar { padding: 8px 14px; gap: 7px; }
  .fl-portal-topbar-row1 { width: 100%; }
  .fl-portal-logo-img { height: 26px; max-width: 148px; }
  .fl-shop-pill { order: 2; width: 100%; padding: 5px 10px; }
  .fl-shop-pill strong { font-size: 0.84rem; }
  .fl-card, .fl-card-dark, .fl-call-player-card, .fl-sim-box { padding: 15px; }

  /* 2x2 Compact KPI Grid on Phone Shop Board so Active Leads sit right near top! */
  .fl-kpi-grid-mobile-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .fl-kpi-grid-mobile-2 .fl-kpi-card {
    padding: 12px;
  }
  .fl-kpi-grid-mobile-2 .fl-kpi-value {
    font-size: 1.48rem;
  }
  .fl-kpi-grid-mobile-2 .fl-kpi-sub {
    font-size: 0.76rem;
  }
  .fl-mode-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .fl-mode-bar form {
    width: 100%;
  }
  .fl-mode-bar button {
    width: 100%;
    padding: 6px 4px;
    min-height: 44px;
    font-size: 0.72rem;
    line-height: 1.15;
    white-space: nowrap;
  }
  .fl-sms-presets {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }
  .fl-sms-presets button {
    width: 100%;
  }
  .fl-trade-tab-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }
  .fl-trade-tab-grid button {
    width: 100%;
    padding: 8px 6px;
    font-size: 0.78rem;
    white-space: normal;
    line-height: 1.2;
  }
  .fl-starcode-box {
    padding: 13px 14px;
    gap: 10px;
  }
  .fl-starcode-digits {
    font-size: 1.4rem;
  }
  .fl-demo-hero-card {
    padding: 12px 13px !important;
    gap: 8px !important;
  }
  .fl-demo-hero-card .fl-btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  .fl-demo-hero-card .fl-btn:last-child {
    width: calc(100% - 56px);
  }
  .fl-ops-topbar {
    padding: 8px 14px !important;
    gap: 6px !important;
  }
  .fl-ops-topbar-top {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .fl-ops-nav-links {
    display: flex;
    align-items: center;
    gap: 6px 12px;
    flex-wrap: wrap;
    width: 100%;
  }
  .fl-ops-nav-links a, .fl-ops-nav-links span {
    white-space: nowrap;
    font-size: 0.8rem;
  }
  .fl-ops-qa-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
  }
  .fl-ops-qa-controls select.fl-select,
  .fl-ops-qa-controls button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
  }
  .fl-ops-jumpbar,
  .fl-pill-strip {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 6px;
  }
  .fl-ops-jumpbar a,
  .fl-pill-strip > * {
    flex-shrink: 1;
    padding: 6px 10px;
    font-size: 0.78rem;
    min-height: 38px;
  }
  .fl-desktop-qr-box {
    display: none !important;
  }
  .fl-portal-tab {
    padding: 9px 11px;
    min-height: 40px;
    font-size: 0.84rem;
  }
  .fl-trust-strip {
    padding-right: 54px;
    gap: 8px 14px;
    font-size: 0.84rem;
  }
  .fl-search-input {
    width: 100% !important;
  }
  .fl-stage-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }
  .fl-stage-grid form, .fl-stage-grid button {
    width: 100%;
    height: 100%;
    min-height: 46px;
  }
  .fl-table-mobile-cards td a:not(.fl-btn),
  .fl-table td a:not(.fl-btn),
  .fl-kanban-card a:not(.fl-btn),
  .fl-card strong > a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 4px 0;
  }
  .fl-qa-grid {
    grid-template-columns: 1fr;
  }
  .fl-spotlight-actions {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 7px;
    width: 100%;
    margin-top: 6px;
  }
  .fl-spotlight-actions > *:last-child {
    grid-column: span 2;
  }
  .fl-spotlight-actions form,
  .fl-spotlight-actions a,
  .fl-spotlight-actions button {
    width: 100%;
  }
  .fl-table-mobile-cards select.fl-select {
    font-size: 16px !important;
    min-height: 44px !important;
  }

  /* Fixed 1-Thumb Mobile Bottom Navigation Bar inside Contractor Portal */
  .fl-mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    background: var(--fl-iron);
    border-top: 2px solid var(--fl-copper);
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom, 0px));
  }
  .fl-mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 50px;
    color: #94A3B8;
    font-size: 0.7rem;
    font-weight: 700;
  }
  .fl-mobile-bottom-nav a.is-active {
    color: var(--fl-copper-bright);
  }

  /* Transform data tables with .fl-table-mobile-cards into clean mobile contractor cards! */
  .fl-table-mobile-cards thead { display: none; }
  .fl-table-mobile-cards,
  .fl-table-mobile-cards tbody,
  .fl-table-mobile-cards tr,
  .fl-table-mobile-cards td {
    display: block;
    width: 100%;
  }
  .fl-table-mobile-cards tr {
    padding: 14px;
    border-bottom: 2px solid var(--fl-sand);
  }
  .fl-table-mobile-cards td {
    padding: 5px 0;
    border: none;
    min-width: 0 !important;
  }
}
