.modal-body { padding: 1.5rem 1.6rem; flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

body.modal-scroll-lock {
  overscroll-behavior: none;
}
/* ============================================================
   PROP FIRM SECRET — Light Professional Theme
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary:    #f4f0e8;
  --bg-secondary:  #fffdf9;
  --bg-card:       rgba(255,255,255,0.84);
  --bg-card-hover: rgba(255,255,255,0.96);
  --bg-muted:      #efe7d8;
  --accent:        #0f5f56;
  --accent-light:  #eef8f2;
  --accent-dim:    #0a4d46;
  --accent-glow:   rgba(15,95,86,0.10);
  --accent-warm:   #c46f2d;
  --danger:        #c2412d;
  --success:       #15803d;
  --warning:       #a16207;
  --text-primary:  #14211d;
  --text-secondary:#44534d;
  --text-muted:    #7d8b83;
  --border:        rgba(20,33,29,0.10);
  --border-accent: rgba(15,95,86,0.18);
  --radius:        16px;
  --radius-lg:     26px;
  --shadow-sm:     0 8px 22px rgba(20,33,29,0.06);
  --shadow:        0 18px 48px rgba(20,33,29,0.10);
  --shadow-lg:     0 30px 80px rgba(20,33,29,0.14);
  --font:          'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display:  'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, rgba(196,111,45,0.10), transparent 26%),
    radial-gradient(circle at top right, rgba(15,95,86,0.14), transparent 34%),
    linear-gradient(180deg, #f7f3eb 0%, #f1ece2 44%, #f6f2ea 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
  width: 100%;
  overflow-x: clip;
}
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  filter: blur(24px);
}
body::before {
  width: 320px;
  height: 320px;
  top: 92px;
  left: -72px;
  background: rgba(196,111,45,0.12);
}
body::after {
  width: 380px;
  height: 380px;
  top: 40px;
  right: -120px;
  background: rgba(15,95,86,0.10);
}

/* ════════════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 14px;
  left: 2rem;
  right: 2rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.05rem 0 1.15rem;
  height: 64px;
  max-width: 1220px;
  margin: 0 auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.82);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,245,238,0.97));
  box-shadow: 0 16px 30px rgba(20,33,29,0.05);
  backdrop-filter: blur(18px);
  gap: 1.25rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -.03em;
  text-decoration: none;
  flex: 0 0 auto;
}
.nav-logo-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: .3rem;
  line-height: 1;
  white-space: nowrap;
}
.nav-logo-accent {
  color: var(--accent);
}
.nav-logo-icon {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #113c38 0%, var(--accent) 52%, #c46f2d 100%);
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 10px 24px rgba(15,95,86,0.22);
  overflow: hidden;
}
.nav-logo-icon::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,255,255,0.04));
}
.nav-logo-icon::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: -6px;
  right: -4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  filter: blur(1px);
}
.nav-logo-icon span {
  position: relative;
  z-index: 1;
}
.nav-logo:hover .nav-logo-icon {
  transform: translateY(-1px);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
}
.nav-links li {
  position: relative;
}
.nav-main {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.2rem;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 1.2rem;
}
.nav-links a {
  position: relative;
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s, opacity .2s;
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: none;
}
.nav-links a.is-active {
  color: var(--accent);
}
.nav-links a.is-active::after {
  transform: scaleX(var(--nav-ind-scale, 1));
}
.nav-links a:hover {
  color: var(--accent);
}
.nav-view-toggle {
  flex-shrink: 0;
}
/* AI Chat button in top nav */
.nav-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  height: 38px;
  padding: 0 .95rem 0 .82rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: color .18s ease, opacity .18s ease, transform .18s ease;
  box-shadow: none;
}
.nav-ai-btn:hover {
  opacity: .72;
  transform: translateY(-1px);
}
.nav-ai-btn:active { transform: scale(.97); }
.nav-ai-btn svg { flex-shrink: 0; }
.nav-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: .72rem;
  min-width: 126px;
  height: 44px;
  padding: 0 .82rem 0 1rem;
  border: 1px solid rgba(15,95,86,0.12);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(243,248,246,0.96));
  color: var(--accent-dim);
  font: inherit;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(20,33,29,0.09);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.nav-menu-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(20,33,29,0.12);
  border-color: rgba(15,95,86,0.18);
}
.nav-menu-toggle-bars {
  display: inline-flex;
  position: relative;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(15,95,86,0.12), rgba(196,111,45,0.14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}
.nav-menu-toggle-bars span {
  position: absolute;
  display: block;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.nav-menu-toggle-bars span:nth-child(1) {
  transform: translateY(-4px);
}
.nav-menu-toggle-bars span:nth-child(3) {
  transform: translateY(4px);
}

@media (max-width: 768px) {
  nav {
    gap: .85rem;
  }
  /* AI Chat btn: icon-only on mobile */
  .nav-ai-btn span {
    display: none;
  }
  .nav-ai-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 999px;
  }
  nav.is-menu-open {
    box-shadow: 0 18px 34px rgba(20,33,29,0.08);
  }
  .nav-main {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    width: min(360px, calc(100vw - 40px));
    display: grid;
    gap: 1rem;
    padding: 1rem;
    margin-left: 0;
    border: 1px solid rgba(255,255,255,0.82);
    border-radius: 26px;
    background:
      radial-gradient(circle at top right, rgba(15,95,86,0.12), transparent 34%),
      radial-gradient(circle at bottom left, rgba(196,111,45,0.12), transparent 38%),
      linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,241,233,0.98));
    box-shadow: 0 30px 56px rgba(20,33,29,0.16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(.98);
    transform-origin: top right;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    overflow: hidden;
  }
  .nav-main::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255,255,255,0.38);
    pointer-events: none;
  }
  nav.is-menu-open .nav-main {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
  nav.is-menu-open .nav-menu-toggle {
    background: linear-gradient(180deg, rgba(231,246,241,0.98), rgba(247,241,231,0.98));
    border-color: rgba(15,95,86,0.22);
  }
  nav.is-menu-open .nav-menu-toggle-bars span:nth-child(1) {
    transform: rotate(45deg);
  }
  nav.is-menu-open .nav-menu-toggle-bars span:nth-child(2) {
    opacity: 0;
  }
  nav.is-menu-open .nav-menu-toggle-bars span:nth-child(3) {
    transform: rotate(-45deg);
  }
  .nav-links {
    display: grid;
    gap: .42rem;
  }
  .nav-links a {
    display: block;
    position: relative;
    padding: .9rem 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,0.58);
    border: 1px solid rgba(15,95,86,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
    transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
  }
  .nav-links a::after {
    content: '›';
    position: absolute;
    top: 50%;
    bottom: auto;
    left: auto;
    right: 1rem;
    width: auto;
    height: auto;
    background: none;
    transform: translateY(-50%);
    color: rgba(15,95,86,0.55);
    font-size: 1rem;
    transition: transform .18s ease, color .18s ease;
  }
  .nav-links a.is-active::after {
    transform: translateY(-50%); /* cancel desktop scaleX inside hamburger menu */
  }
  .nav-links a:hover {
    color: var(--accent-dim);
    background: linear-gradient(180deg, rgba(239,248,245,0.92), rgba(255,250,244,0.92));
    border-color: rgba(15,95,86,0.16);
    transform: translateX(3px);
  }
  .nav-links a:hover::after {
    color: var(--accent-dim);
    transform: translate(2px, -50%);
  }
  .nav-view-toggle {
    width: 100%;
    margin-left: 0;
    padding: .22rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(15,95,86,0.09);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.76);
  }
  .nav-view-toggle .compare-view-btn {
    flex: 1 1 0;
  }
  .nav-menu-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }
}

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6.9rem 2rem 2rem;
  position: relative;
  overflow: hidden;
  background: transparent;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 48% 42% at 18% 18%, rgba(196,111,45,0.18) 0%, transparent 72%),
    radial-gradient(ellipse 58% 44% at 78% 26%, rgba(15,95,86,0.16) 0%, transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(244,240,232,0));
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(15,95,86,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,95,86,0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 78% 62% at 50% 30%, black 28%, transparent 100%);
}
.hero-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: center;
  min-height: calc(100svh - 8.9rem);
}
.hero-content,
.hero-visual,
.hero-stats {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s ease, transform .75s ease;
}
.hero-shell.is-visible .hero-content,
.hero-shell.is-visible .hero-visual,
.hero-shell.is-visible .hero-stats {
  opacity: 1;
  transform: translateY(0);
}
.hero-shell.is-visible .hero-visual { transition-delay: .12s; }
.hero-shell.is-visible .hero-stats { transition-delay: .22s; }
.hero-content {
  padding: 1rem 0;
  text-align: left;
  max-width: 530px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,253,249,0.78);
  border: 1px solid rgba(255,255,255,0.72);
  color: var(--accent);
  padding: .42rem .95rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: 1.55rem;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(20,33,29,0.06);
}
.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-warm);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.4); }
}
.hero-kicker {
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .8rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 5rem);
  font-weight: 700;
  line-height: .93;
  letter-spacing: -.06em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}
.hero-br { display: none; }
.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-warm) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-lead {
  font-size: .98rem;
  color: var(--text-muted);
  max-width: 510px;
  margin: 0 0 1rem;
  line-height: 1.72;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #0d7669 100%);
  color: #fff;
  border: none;
  padding: .9rem 1.55rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .82rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 16px 32px rgba(15,95,86,.2);
  transition: transform .15s, box-shadow .2s;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 38px rgba(15,95,86,.28); }
.btn-secondary {
  background: rgba(255,253,249,0.72);
  color: var(--text-primary);
  border: 1px solid rgba(20,33,29,0.10);
  padding: .9rem 1.3rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: .8rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color .2s, background .2s, transform .15s;
  box-shadow: 0 10px 24px rgba(20,33,29,.06);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.btn-secondary:hover { border-color: var(--accent); background: rgba(255,255,255,.92); color: var(--accent); transform: translateY(-2px); }

.hero-visual {
  position: relative;
  min-height: 470px;
}
.hero-plan-carousel {
  position: relative;
  z-index: 2;
  display: grid;
  gap: .9rem;
  min-height: 470px;
  padding: 1.1rem;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(248,252,250,0.86));
  border: 1px solid rgba(255,255,255,0.84);
  box-shadow: 0 30px 68px rgba(20,33,29,0.12);
  backdrop-filter: blur(14px);
}
.hero-plan-carousel-head {
  display: grid;
  gap: .32rem;
}
.hero-plan-kicker {
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-plan-carousel-head strong {
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.15;
  letter-spacing: -.03em;
}
.hero-plan-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  touch-action: pan-y pinch-zoom;
  -webkit-user-select: none;
  user-select: none;
}
.hero-plan-track {
  display: flex;
  transition: transform .42s cubic-bezier(.2, .9, .2, 1);
  will-change: transform;
}
.hero-plan-card {
  flex: 0 0 100%;
  display: grid;
  gap: .72rem;
  padding: 1rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(249,252,251,0.92));
  border: 1px solid rgba(20,33,29,0.08);
  box-shadow: 0 18px 36px rgba(20,33,29,0.08);
}
/* ── Hero plan loader (replaces loading card) ── */
.hero-plan-loader {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  min-height: 320px;
}
.hpl-ring {
  position: relative;
  width: 52px;
  height: 52px;
}
.hpl-ring span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  animation: hpl-spin 1.4s linear infinite;
}
.hpl-ring span:nth-child(1) {
  border-top-color: rgba(15,95,86,0.9);
  animation-duration: 1.2s;
}
.hpl-ring span:nth-child(2) {
  inset: 7px;
  border-top-color: rgba(196,111,45,0.7);
  animation-duration: 1.6s;
  animation-direction: reverse;
}
.hpl-ring span:nth-child(3) {
  inset: 14px;
  border-top-color: rgba(15,95,86,0.4);
  animation-duration: 2s;
}
@keyframes hpl-spin {
  to { transform: rotate(360deg); }
}
.hpl-dots {
  display: flex;
  gap: .42rem;
}
.hpl-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(15,95,86,0.35);
  animation: hpl-pulse 1.2s ease-in-out infinite;
}
.hpl-dots span:nth-child(2) { animation-delay: .2s; }
.hpl-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes hpl-pulse {
  0%, 100% { transform: scale(.7); opacity: .4; }
  50%       { transform: scale(1.15); opacity: 1; }
}
.ranking-shell {
  margin-bottom: 1.35rem;
  padding: 1rem 1rem .9rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(249,252,251,.88));
  border: 1px solid rgba(20,33,29,.08);
  box-shadow: 0 18px 34px rgba(20,33,29,.06);
}
.ranking-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 1rem;
  margin-bottom: .8rem;
}
.ranking-kicker {
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.ranking-head strong {
  font-size: 1rem;
  color: var(--text-primary);
}
.ranking-table {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(20,33,29,.08);
}
.ranking-header-row,
.ranking-row {
  display: grid;
  align-items: center;
}
.ranking-row--interactive {
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.ranking-row--interactive:hover,
.ranking-row--interactive:focus-visible {
  background: rgba(15,95,86,.06);
  box-shadow: inset 0 0 0 1px rgba(15,95,86,.14);
  outline: none;
}
.ranking-header-row--firm,
.ranking-row--firm {
  grid-template-columns: 52px minmax(190px, 1.7fr) repeat(8, minmax(64px, .62fr));
}
.ranking-header-row--plan,
.ranking-row--plan {
  grid-template-columns: 52px minmax(240px, 1.9fr) minmax(82px, .74fr) minmax(92px, .84fr) repeat(4, minmax(78px, .7fr));
}
.ranking-header-row {
  background: rgba(15,95,86,.08);
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ranking-row {
  background: rgba(255,255,255,.9);
  border-top: 1px solid rgba(20,33,29,.06);
}
.ranking-row--top {
  background: linear-gradient(90deg, rgba(255,247,219,.9), rgba(255,255,255,.96));
}
.ranking-cell {
  min-width: 0;
  padding: .46rem .5rem;
  display: flex;
  align-items: center;
  gap: .34rem;
  white-space: nowrap;
}
.ranking-cell--pos,
.ranking-header-row .ranking-cell--pos {
  align-items: center;
  justify-content: center;
}
.ranking-cell--club {
  gap: .45rem;
  overflow: hidden;
}
.ranking-pos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(15,95,86,.1);
  color: var(--accent-dim);
  font-weight: 900;
  font-size: .84rem;
}
.ranking-club-name {
  font-size: .8rem;
  font-weight: 800;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
}
.ranking-club-meta {
  font-size: .68rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
}
.ranking-stat {
  font-size: .84rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ranking-stat--positive {
  color: #0f8a5f;
}
.ranking-stat--negative {
  color: #c24145;
}
.ranking-stat--neutral {
  color: var(--text-muted);
}
.ranking-empty {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(20,33,29,.08);
  color: var(--text-muted);
  text-align: center;
}
.ranking-row--plan .ranking-club-name,
.ranking-row--plan .ranking-stat,
.ranking-row--firm .ranking-club-name,
.ranking-row--firm .ranking-stat {
  line-height: 1.1;
}
.ranking-stat-label {
  display: none;
}
.hero-plan-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.hero-plan-rank,
.hero-plan-ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .32rem .58rem;
  border-radius: 999px;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-plan-ai {
  border: 0;
  cursor: pointer;
}
.hero-plan-rank {
  color: var(--accent-warm);
  background: rgba(196,111,45,0.12);
}
.hero-plan-ai {
  color: var(--accent);
  background: rgba(15,95,86,0.1);
}
.hero-plan-ai:disabled {
  cursor: default;
}
.hero-plan-ai,
.hero-ai-badge,
.hero-plan-tag,
.hero-plan-open,
.hero-plan-chip {
  touch-action: manipulation;
}
.hero-plan-firm {
  display: flex;
  align-items: center;
  gap: .58rem;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.1;
}
.hero-plan-firm-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  border: 1px solid rgba(20,33,29,0.08);
}
.hero-plan-firm-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* ── AI Score Badge (hero card firm row) ── */
.hero-ai-badge {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-shrink: 0;
  margin-left: .1rem;
  padding: .36rem .72rem;
  border-radius: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  gap: .28rem;
  box-shadow: none;
  transition: transform .15s, box-shadow .15s, background-color .15s;
}
.hero-ai-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(20,33,29,.08);
}
.hero-ai-badge-label {
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-ai-badge-value {
  display: inline-flex;
  align-items: baseline;
  gap: .06rem;
  font-size: 1rem;
  font-weight: 900;
  font-family: var(--font-display);
}
.hero-ai-badge-max {
  font-size: .56rem;
  font-weight: 700;
  opacity: .72;
}
.hero-ai-badge--elite    { color: #8f7700; background: transparent; }
.hero-ai-badge--strong   { color: #0f5f56; background: transparent; }
.hero-ai-badge--good     { color: #1e6fa0; background: transparent; }
.hero-ai-badge--watchlist{ color: #9b6514; background: transparent; }
.hero-ai-badge--pressure { color: #a92d2d; background: transparent; }

/* ── AI Score Breakdown Dialog ── */
.ai-score-hero {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  margin-bottom: 1.1rem;
}
.ai-score-hero--elite    { background: linear-gradient(135deg, rgba(255,221,0,.13) 0%, rgba(180,150,0,.08) 100%); border: 1.5px solid rgba(181,154,0,.3); }
.ai-score-hero--strong   { background: linear-gradient(135deg, rgba(15,95,86,.12)  0%, rgba(15,95,86,.06)   100%); border: 1.5px solid rgba(15,95,86,.3);  }
.ai-score-hero--good     { background: linear-gradient(135deg, rgba(30,111,160,.11)0%, rgba(30,111,160,.06) 100%); border: 1.5px solid rgba(30,111,160,.28);}
.ai-score-hero--watchlist{ background: linear-gradient(135deg, rgba(176,118,25,.12)0%, rgba(176,118,25,.06) 100%); border: 1.5px solid rgba(176,118,25,.3); }
.ai-score-hero--pressure { background: linear-gradient(135deg, rgba(182,50,50,.11) 0%, rgba(182,50,50,.06)  100%); border: 1.5px solid rgba(182,50,50,.28); }
.ai-score-ring {
  display: flex;
  align-items: baseline;
  gap: .15rem;
  flex-shrink: 0;
}
.ai-score-ring-num {
  font-size: 3.2rem;
  font-weight: 900;
  font-family: var(--font-display);
  line-height: 1;
}
.ai-score-ring-max {
  font-size: 1.1rem;
  font-weight: 600;
  opacity: .55;
}
.ai-score-hero--elite    .ai-score-ring-num { color: #b59a00; }
.ai-score-hero--strong   .ai-score-ring-num { color: #0f5f56; }
.ai-score-hero--good     .ai-score-ring-num { color: #1e6fa0; }
.ai-score-hero--watchlist .ai-score-ring-num { color: #b07619; }
.ai-score-hero--pressure .ai-score-ring-num { color: #b63232; }
.ai-score-hero-info { display: flex; flex-direction: column; gap: .4rem; }
.ai-score-tier-pill {
  display: inline-block;
  padding: .22rem .7rem;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  width: fit-content;
}
.ai-score-tier--elite    { background: rgba(255,221,0,.18);   color: #a08700; }
.ai-score-tier--strong   { background: rgba(15,95,86,.15);    color: #0f5f56; }
.ai-score-tier--good     { background: rgba(30,111,160,.15);  color: #1e6fa0; }
.ai-score-tier--watchlist{ background: rgba(176,118,25,.15);  color: #b07619; }
.ai-score-tier--pressure { background: rgba(182,50,50,.14);   color: #b63232; }
.ai-score-hero-sub {
  font-size: .75rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}
.ai-factor-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: .85rem;
}
.ai-factor-row {
  display: flex;
  cursor: pointer;
  align-items: center;
  flex-wrap: wrap;
  gap: .7rem;
  padding: .72rem .8rem;
  min-height: 62px;
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(20,33,29,.07);
}
.ai-factor-row:focus-visible {
  outline: 2px solid rgba(15,95,86,.35);
  outline-offset: 2px;
}
.ai-factor-row--open {
  border-color: rgba(15,95,86,.22);
  box-shadow: 0 6px 18px rgba(15,95,86,.08);
}
.ai-factor-meta {
  display: flex;
  flex-direction: column;
  gap: .18rem;
  flex: 1 1 140px;
  min-width: 0;
}
.ai-factor-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.ai-factor-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ai-factor-note {
  font-size: .64rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ai-factor-right {
  display: grid;
  grid-template-columns: 90px 64px 34px 52px;
  align-items: center;
  column-gap: .5rem;
  justify-content: end;
  width: 292px;
  flex-shrink: 0;
}
.ai-factor-bar-track {
  width: 100%;
  height: 7px;
  border-radius: 10px;
  background: rgba(20,33,29,.1);
  overflow: hidden;
}
.ai-factor-bar-fill {
  height: 100%;
  border-radius: 10px;
}
.ai-factor-bar--high { background: linear-gradient(90deg, #0f5f56, #2cc18e); }
.ai-factor-bar--mid  { background: linear-gradient(90deg, #b07619, #f0a72c); }
.ai-factor-bar--low  { background: linear-gradient(90deg, #b63232, #e05c5c); }
.ai-factor-bar--penalty-low  { background: linear-gradient(90deg, #ce6a3a, #e97d5f); }
.ai-factor-bar--penalty-mid  { background: linear-gradient(90deg, #c63f3f, #eb5b5b); }
.ai-factor-bar--penalty-high { background: linear-gradient(90deg, #8f101f, #cf243a); }
.ai-factor-score {
  display: inline-grid;
  grid-template-columns: 4ch auto;
  align-items: baseline;
  column-gap: 0;
  font-size: .82rem;
  font-weight: 800;
  color: var(--text-primary);
  min-width: 0;
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.ai-factor-score-value {
  width: 4ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ai-factor-score-denom {
  font-size: .62rem;
  font-weight: 500;
  opacity: .55;
}
.ai-factor-weight {
  font-size: .62rem;
  color: var(--text-muted);
  min-width: 0;
  width: 34px;
  text-align: center;
}
.ai-factor-contrib {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 0;
  width: 52px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ai-factor-detail {
  width: 100%;
  margin-top: .1rem;
  padding-top: .7rem;
  border-top: 1px solid rgba(20,33,29,.08);
}
.ai-factor-detail-stack {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.ai-factor-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.ai-detail-disclosure {
  border: 1px solid rgba(20,33,29,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  overflow: hidden;
}
.ai-detail-disclosure--risk {
  border-color: rgba(143,47,47,.14);
  background: rgba(255,247,247,.92);
}
.ai-detail-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .68rem .82rem;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ai-detail-summary::-webkit-details-marker {
  display: none;
}
.ai-detail-chevron {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(20,33,29,.12);
  color: var(--text-muted);
  transition: transform .18s ease, color .18s ease, border-color .18s ease;
}
.ai-detail-disclosure[open] .ai-detail-chevron {
  transform: rotate(45deg);
  color: #0f5f56;
  border-color: rgba(15,95,86,.22);
}
.ai-detail-body {
  padding: 0 .82rem .78rem;
}
.ai-factor-col {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.ai-factor-col-title {
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
}
.ai-factor-listing {
  margin: 0;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: .22rem;
  color: var(--text-secondary);
  font-size: .69rem;
  line-height: 1.45;
}
.ai-factor-listing--risk {
  color: #8f2f2f;
}
.ai-factor-item {
  display: flex;
  align-items: baseline;
  gap: .38rem;
  list-style: none;
  margin-left: -1rem;
}
.ai-item-sev-dot {
  flex-shrink: 0;
  display: inline-block;
  width: .45rem;
  height: .45rem;
  border-radius: 999px;
  margin-top: .12rem;
}
.ai-item-sev-dot--critical { background: #dc2626; }
.ai-item-sev-dot--warning  { background: #d97706; }
.ai-item-sev-dot--info     { background: #3b82f6; }
.ai-item-sev-dot--positive { background: #16a34a; }
.ai-factor-item--critical  { color: #7f1d1d; }
.ai-factor-item--warning   { color: #78350f; }
.ai-factor-item--info      { color: var(--text-secondary); }
.ai-factor-item--positive  { color: #14532d; }
.ai-factor-empty {
  margin: 0;
  font-size: .68rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.ai-factor-facts {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .7rem;
}
.ai-factor-fact {
  display: inline-flex;
  align-items: center;
  padding: .22rem .5rem;
  border-radius: 999px;
  background: rgba(20,33,29,.06);
  border: 1px solid rgba(20,33,29,.08);
  font-size: .62rem;
  color: var(--text-secondary);
}
.ai-bonus-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .8rem;
  border-radius: 10px;
  background: rgba(255,221,0,.1);
  border: 1px solid rgba(181,154,0,.25);
  margin-bottom: .75rem;
  font-size: .75rem;
  color: #a08700;
}
.ai-bonus-icon { font-size: 1rem; flex-shrink: 0; }
.ai-bonus-text { line-height: 1.4; }
.ai-dd-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  background: rgba(20,33,29,.04);
  border: 1px solid rgba(20,33,29,.07);
}
.ai-dd-item {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  flex: 1 1 110px;
}
.ai-dd-key {
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ai-dd-val {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-primary);
}
@media (max-width: 720px) {
  .ai-factor-right {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) max-content max-content max-content;
    column-gap: .45rem;
  }
  .ai-factor-bar-track {
    grid-column: 1 / -1;
    width: 100%;
    order: 4;
  }
  .ai-factor-detail-grid {
    grid-template-columns: 1fr;
  }
}
.hero-plan-name {
  font-size: .9rem;
  color: var(--text-secondary);
  font-weight: 700;
}
.hero-plan-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .46rem;
}
.hero-plan-metric {
  padding: .54rem .62rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(20,33,29,0.08);
}
.hero-plan-metric-label {
  display: block;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero-plan-metric-value {
  display: block;
  margin-top: .18rem;
  font-size: .88rem;
  font-weight: 800;
  color: var(--text-primary);
}
.hero-plan-summary {
  font-size: .77rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.hero-plan-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .44rem;
}
.hero-plan-empty-state {
  width: 100%;
  min-height: 310px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .7rem;
  text-align: center;
  padding: 2rem 1.2rem;
}
.hero-plan-empty-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .82rem;
  border-radius: 999px;
  background: rgba(194,65,45,0.08);
  border: 1px solid rgba(194,65,45,0.12);
  color: var(--danger);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hero-plan-empty-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 6px rgba(194,65,45,0.12);
}
.hero-plan-empty-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  line-height: 1.06;
  letter-spacing: -.04em;
  color: var(--text-primary);
}
.hero-plan-empty-copy {
  max-width: 420px;
  margin: 0;
  color: var(--text-secondary);
  font-size: .95rem;
  line-height: 1.7;
}
.hero-plan-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .34rem .54rem;
  border-radius: 999px;
  background: rgba(15,95,86,0.07);
  border: 1px solid rgba(15,95,86,0.08);
  color: var(--accent-dim);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.hero-plan-tag:hover {
  background: rgba(15,95,86,0.11);
  border-color: rgba(15,95,86,0.14);
}
.hero-plan-open {
  justify-self: start;
  padding: .58rem .86rem;
  border-radius: 999px;
  border: 1px solid rgba(15,95,86,0.16);
  background: rgba(255,255,255,0.9);
  color: var(--accent);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
}
.hero-plan-open:hover {
  border-color: rgba(15,95,86,0.3);
  background: rgba(240,253,247,0.96);
}
.hero-plan-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .46rem;
}
.hero-plan-chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .48rem .76rem;
  border-radius: 999px;
  border: 1px solid rgba(20,33,29,0.12);
  background: rgba(255,255,255,0.88);
  font-size: .6rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.hero-plan-chip--prohibited {
  color: #92400e;
  border-color: rgba(180,83,9,0.2);
  background: rgba(255,248,225,0.9);
}
.hero-plan-chip--prohibited:hover {
  background: rgba(254,243,199,0.96);
  border-color: rgba(180,83,9,0.35);
}
.hero-plan-chip--redflag {
  color: #b91c1c;
  border-color: rgba(185,28,28,0.18);
  background: rgba(255,241,241,0.9);
}
.hero-plan-chip--redflag:hover {
  background: rgba(254,226,226,0.96);
  border-color: rgba(185,28,28,0.32);
}
.hero-plan-chip--program {
  color: #1d4ed8;
  border-color: rgba(29,78,216,0.18);
  background: rgba(239,246,255,0.9);
}
.hero-plan-chip--program:hover {
  background: rgba(219,234,254,0.96);
  border-color: rgba(29,78,216,0.32);
}
.hero-plan-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3em;
  height: 1.3em;
  padding: 0 .3em;
  border-radius: 999px;
  background: rgba(180,83,9,0.14);
  color: #92400e;
  font-size: .72em;
  font-weight: 900;
  line-height: 1;
}
.hero-plan-chip-count--red {
  background: rgba(185,28,28,0.12);
  color: #b91c1c;
}
.hero-plan-chip-count--program {
  background: rgba(29,78,216,0.12);
  color: #1d4ed8;
}
/* Hero dialog content styles */
.hdlg-kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem .8rem;
  padding: .2rem 0;
}
.hdlg-kv {
  display: flex;
  flex-direction: column;
  gap: .18rem;
}
.hdlg-k {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted, #6b7280);
}
.hdlg-v {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text, #14211d);
}
.hdlg-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.hdlg-list-item {
  padding: .5rem .75rem;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 600;
}
.hdlg-list-item--banned {
  background: rgba(254,242,242,0.9);
  border-left: 3px solid #ef4444;
  color: #7f1d1d;
}
.hdlg-rule {
  padding: .65rem .85rem;
  border-radius: 8px;
  border-left: 3px solid #9ca3af;
  background: rgba(249,250,251,0.9);
  margin-bottom: .5rem;
}
.hdlg-rule--critical { border-left-color: #ef4444; background: rgba(254,242,242,0.8); }
.hdlg-rule--warning  { border-left-color: #f59e0b; background: rgba(255,251,235,0.8); }
.hdlg-rule--info     { border-left-color: #3b82f6; background: rgba(239,246,255,0.8); }
.hdlg-rule--positive { border-left-color: #22c55e; background: rgba(240,253,244,0.8); }
.hdlg-rule-title {
  font-size: .78rem;
  font-weight: 700;
  color: #14211d;
  margin-bottom: .25rem;
}
.hdlg-rule-detail {
  font-size: .72rem;
  color: #374151;
  line-height: 1.5;
}
.hdlg-rule-impact {
  font-size: .65rem;
  color: #6b7280;
  margin-top: .3rem;
  font-style: italic;
}
.hdlg-empty {
  text-align: center;
  color: #9ca3af;
  font-size: .78rem;
  padding: 1.5rem 0;
}
.hdlg-kv--full {
  grid-column: 1 / -1;
}
.hdlg-section {
  margin-top: .9rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.hdlg-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .3rem;
}
.hdlg-tag {
  display: inline-flex;
  align-items: center;
  padding: .28rem .6rem;
  border-radius: 6px;
  background: rgba(20,33,29,0.07);
  color: #14211d;
  font-size: .7rem;
  font-weight: 600;
}
/* ── Prohibited Rules dialog ── */
.pr-summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1rem;
  border-radius: 10px;
  background: rgba(254,226,226,0.6);
  border: 1px solid rgba(239,68,68,0.18);
  margin-bottom: 1rem;
}
.pr-summary-count {
  font-size: 1.5rem;
  font-weight: 900;
  color: #b91c1c;
  line-height: 1;
  flex-shrink: 0;
}
.pr-summary-label {
  font-size: .73rem;
  color: #7f1d1d;
  line-height: 1.45;
}
.pr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .45rem;
}
.pr-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .75rem;
  border-radius: 9px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(239,68,68,0.14);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.pr-item-icon {
  font-size: .9rem;
  flex-shrink: 0;
  opacity: .75;
}
.pr-item-name {
  font-size: .74rem;
  font-weight: 600;
  color: #7f1d1d;
  line-height: 1.35;
}
/* ── Program Rules — filter row & grid ── */
.hr-filter-wrap { display: flex; flex-direction: column; gap: 0; }
.hr-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .85rem;
}
.hr-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1.5px solid rgba(20,33,29,.14);
  background: rgba(255,255,255,.7);
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  letter-spacing: .02em;
}
.hr-filter-btn:hover { background: rgba(20,33,29,.07); }
.hr-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 .28rem;
  border-radius: 999px;
  font-size: .6rem;
  font-weight: 800;
  background: rgba(20,33,29,.1);
  color: inherit;
}
/* Active states by tier */
.hr-filter-btn--all.active    { background: #0f172a; color: #fff; border-color: #0f172a; }
.hr-filter-btn--all.active .hr-filter-count { background: rgba(255,255,255,.25); color: #fff; }
.hr-filter-btn--critical.active { background: rgba(254,226,226,.9); color: #b91c1c; border-color: #fca5a5; }
.hr-filter-btn--critical.active .hr-filter-count { background: rgba(185,28,28,.12); color: #b91c1c; }
.hr-filter-btn--warning.active  { background: rgba(255,243,205,.9); color: #92400e; border-color: #fcd34d; }
.hr-filter-btn--warning.active  .hr-filter-count { background: rgba(146,64,14,.12); color: #92400e; }
.hr-filter-btn--info.active     { background: rgba(219,234,254,.9); color: #1d4ed8; border-color: #93c5fd; }
.hr-filter-btn--info.active     .hr-filter-count { background: rgba(29,78,216,.12); color: #1d4ed8; }
.hr-filter-btn--positive.active { background: rgba(220,252,231,.9); color: #15803d; border-color: #86efac; }
.hr-filter-btn--positive.active .hr-filter-count { background: rgba(21,128,61,.12); color: #15803d; }
/* Cards grid: 1 col mobile, 2 col desktop */
.hr-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .65rem;
}
@media (min-width: 640px) {
  .hr-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* ── Program Rules cards ── */
.hr-sum-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1rem;
}
.hr-sum-badge {
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: capitalize;
}
.hr-sum-badge--critical { background: rgba(254,226,226,0.9); color: #b91c1c; }
.hr-sum-badge--warning  { background: rgba(255,243,205,0.9); color: #92400e; }
.hr-sum-badge--info     { background: rgba(219,234,254,0.9); color: #1d4ed8; }
.hr-sum-badge--positive { background: rgba(220,252,231,0.9); color: #15803d; }
.hr-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.07);
  border-left-width: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  padding: 1rem 1.1rem 0.85rem;
  margin-bottom: 0;
}
.hr-card--critical { border-left-color: #ef4444; }
.hr-card--warning  { border-left-color: #f59e0b; }
.hr-card--info     { border-left-color: #3b82f6; }
.hr-card--positive { border-left-color: #22c55e; }
.hr-card-top {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin-bottom: .6rem;
}
.hr-card-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: .05rem;
}
.hr-card-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.hr-card-title {
  font-size: .88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}
.hr-pill {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: .18rem .55rem;
  border-radius: 999px;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.hr-pill--critical { background: rgba(254,226,226,0.8); color: #b91c1c; }
.hr-pill--warning  { background: rgba(255,243,205,0.8); color: #92400e; }
.hr-pill--info     { background: rgba(219,234,254,0.8); color: #1d4ed8; }
.hr-pill--positive { background: rgba(220,252,231,0.8); color: #15803d; }
.hr-card-desc {
  font-size: .76rem;
  color: #374151;
  line-height: 1.65;
  margin: 0 0 .65rem;
}
.hr-scenario {
  border-top: 1px solid rgba(0,0,0,.07);
  padding-top: .55rem;
}
.hr-scenario-sum {
  display: block;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: .3rem 0;
}
.hr-scenario-sum-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hr-scenario-sum::-webkit-details-marker { display: none; }
.hr-scenario-label {
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
}
.hr-scenario-chevron {
  font-size: 1rem;
  color: #94a3b8;
  transition: transform .2s;
  font-weight: 700;
}
.hr-scenario[open] .hr-scenario-chevron { transform: rotate(90deg); }
/* Always-visible scenario block (no toggle) */
.hr-scenario-inline {
  border-top: 1px solid rgba(0,0,0,.07);
  padding-top: .55rem;
  margin-top: .1rem;
}
.hr-scenario-inline .hr-scenario-label {
  display: block;
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #64748b;
  margin-bottom: .3rem;
}
.hr-scenario-body {
  margin: .55rem 0 .2rem;
  padding: .7rem .9rem;
  border-radius: 8px;
  border-left: 3px solid #94a3b8;
  background: rgba(248,250,252,0.9);
  font-size: .74rem;
  font-style: italic;
  color: #1e293b;
  line-height: 1.65;
}
.hero-plan-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
}
.hero-plan-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(20,33,29,0.12);
  background: rgba(255,255,255,0.9);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}
.hero-plan-counter {
  min-width: 78px;
  text-align: center;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero-visual::before,
.hero-visual::after {
  content: '';
  position: absolute;
  inset: auto;
  border-radius: 999px;
  filter: blur(28px);
  pointer-events: none;
}
.hero-visual::before {
  width: 220px;
  height: 220px;
  top: 42px;
  left: 40px;
  background: rgba(196,111,45,0.14);
}
.hero-visual::after {
  width: 280px;
  height: 280px;
  right: 8px;
  bottom: 18px;
  background: rgba(15,95,86,0.16);
}
.hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 164px minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  min-height: 470px;
}
.hero-stage::before {
  content: '';
  position: absolute;
  inset: 10% 25%;
  border-radius: 36px;
  background: linear-gradient(180deg, rgba(255,255,255,0.44), rgba(255,255,255,0.08));
  border: 1px solid rgba(255,255,255,0.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
}
.hero-path,
.hero-stage-core {
  position: relative;
  z-index: 1;
}
.hero-path {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.2rem;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,251,246,0.86));
  border: 1px solid rgba(255,255,255,0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease, opacity .35s ease;
}
.hero-path::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent 35%, rgba(20,33,29,0.03) 100%);
  pointer-events: none;
}
.hero-path--trap {
  border-color: rgba(194,65,45,0.12);
}
.hero-path--win {
  border-color: rgba(15,95,86,0.20);
  background: linear-gradient(180deg, rgba(242,255,248,0.96), rgba(248,255,251,0.90));
  box-shadow: 0 24px 58px rgba(15,95,86,0.16);
}
.hero-path--win::after {
  content: '';
  position: absolute;
  inset: -30% auto -30% -20%;
  width: 72%;
  background: linear-gradient(90deg, transparent, rgba(110,231,183,0.20), transparent);
  transform: rotate(18deg);
  animation: heroSweep 4.6s ease-in-out infinite;
}
.hero-path.is-active {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 28px 70px rgba(20,33,29,0.16);
}
.hero-path--trap.is-active {
  border-color: rgba(194,65,45,0.26);
}
.hero-path--win.is-active {
  border-color: rgba(15,95,86,0.24);
  box-shadow: 0 30px 72px rgba(15,95,86,0.22);
}
.hero-path-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  margin-bottom: 1rem;
}
.hero-path-head strong {
  font-family: var(--font-display);
  font-size: .94rem;
  letter-spacing: -.03em;
}
.hero-path-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .3rem .56rem;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero-path-chip--danger {
  background: rgba(194,65,45,0.10);
  color: var(--danger);
}
.hero-path-chip--success {
  background: rgba(15,95,86,0.10);
  color: var(--accent);
}
.hero-path-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  flex: 1;
}
.hero-node {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
  padding: .92rem .88rem;
  border-radius: 22px;
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(20,33,29,0.08);
  box-shadow: 0 12px 26px rgba(20,33,29,0.06);
}
.hero-node::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  pointer-events: none;
}
.hero-node-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  background: rgba(20,33,29,0.06);
  grid-row: 1 / span 2;
}
.hero-node-label,
.hero-node-note {
  display: block;
}
.hero-node-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
  grid-column: 2;
}
.hero-node-note {
  margin-top: .26rem;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  grid-column: 2;
}
.hero-shell.is-visible .hero-node {
  animation: heroNodeRise .78s cubic-bezier(.2, .9, .2, 1) both;
}
.hero-shell.is-visible .hero-node--dream,
.hero-shell.is-visible .hero-node--rules-good {
  animation-delay: .14s;
}
.hero-shell.is-visible .hero-node--rules,
.hero-shell.is-visible .hero-node--decode {
  animation-delay: .32s;
}
.hero-shell.is-visible .hero-node--fail,
.hero-shell.is-visible .hero-node--pass {
  animation-delay: .5s;
}
.hero-node--dream .hero-node-icon,
.hero-node--rules .hero-node-icon,
.hero-node--fail .hero-node-icon {
  background: rgba(194,65,45,0.09);
  color: var(--danger);
}
.hero-node--rules-good .hero-node-icon,
.hero-node--decode .hero-node-icon,
.hero-node--pass .hero-node-icon {
  background: rgba(15,95,86,0.10);
  color: var(--accent);
  box-shadow: 0 0 0 10px rgba(15,95,86,0.04);
}
.hero-node--fail {
  background: linear-gradient(180deg, rgba(254,242,242,0.95), rgba(255,247,245,0.88));
}
.hero-node--pass {
  background: linear-gradient(180deg, rgba(240,253,244,0.98), rgba(248,255,250,0.88));
  animation: heroPulseGreen 2.8s ease-in-out infinite;
}
.hero-node--fail::after {
  border-color: rgba(194,65,45,0.16);
}
.hero-node--pass::after {
  border-color: rgba(15,95,86,0.18);
}
.hero-connector {
  position: relative;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-connector-line {
  position: relative;
  width: 2px;
  height: 100%;
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20,33,29,0.05), rgba(20,33,29,0.18), rgba(20,33,29,0.05));
  overflow: hidden;
}
.hero-path--trap .hero-connector-line::after,
.hero-path--win .hero-connector-line::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.35);
  animation: heroTravel 2.8s linear infinite;
}
.hero-path--trap .hero-connector-line::after {
  background: var(--danger);
}
.hero-path--win .hero-connector-line::after {
  background: var(--accent);
}
.hero-path--win .hero-connector-line {
  background: linear-gradient(180deg, rgba(15,95,86,0.05), rgba(15,95,86,0.28), rgba(110,231,183,0.10));
}
.hero-path-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid rgba(20,33,29,0.08);
}
.hero-path-footer span {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-path-footer--danger span {
  color: var(--danger);
}
.hero-path-footer--success span {
  color: var(--accent);
}
.hero-stage-core {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-core-rings {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 156px;
  height: 156px;
  margin: -78px 0 0 -78px;
  border-radius: 50%;
  border: 1px solid rgba(15,95,86,0.12);
  box-shadow:
    0 0 0 18px rgba(15,95,86,0.05),
    0 0 0 38px rgba(196,111,45,0.05);
  animation: heroOrbit 9s linear infinite;
}
.hero-core-rings::before,
.hero-core-rings::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}
.hero-core-rings::before {
  width: 10px;
  height: 10px;
  top: -5px;
  left: 50%;
  margin-left: -5px;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(15,95,86,0.35);
}
.hero-core-rings::after {
  width: 12px;
  height: 12px;
  right: 10px;
  bottom: 18px;
  background: var(--accent-warm);
  box-shadow: 0 0 22px rgba(196,111,45,0.3);
}
.hero-core-card {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1rem .9rem;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,253,250,0.9));
  border: 1px solid rgba(255,255,255,0.82);
  box-shadow: 0 18px 42px rgba(20,33,29,0.10);
  text-align: center;
}
.hero-core-label {
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-core-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.04em;
  margin: .55rem 0 .7rem;
}
.hero-core-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
}
.hero-core-tags span {
  padding: .36rem .55rem;
  border-radius: 999px;
  background: rgba(15,95,86,0.08);
  color: var(--accent);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  grid-column: 1 / -1;
  margin-top: .1rem;
  padding: .72rem;
  background: rgba(255,253,249,0.74);
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 24px;
  box-shadow: 0 20px 48px rgba(20,33,29,0.08);
  backdrop-filter: blur(16px);
}
.hero-stat {
  text-align: left;
  padding: .72rem .86rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(20,33,29,0.08);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -.05em;
}
.hero-stat-label {
  font-size: .58rem;
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: .22rem;
}
@keyframes heroTravel {
  0% { top: -8px; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: calc(100% - 6px); opacity: 0; }
}
@keyframes heroOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes heroSweep {
  0%, 100% { transform: translateX(-12%) rotate(18deg); opacity: .2; }
  50% { transform: translateX(115%) rotate(18deg); opacity: .7; }
}
@keyframes heroPulseGreen {
  0%, 100% { box-shadow: 0 10px 26px rgba(20,33,29,0.06), 0 0 0 0 rgba(110,231,183,0.0); }
  50% { box-shadow: 0 16px 32px rgba(15,95,86,0.10), 0 0 0 12px rgba(110,231,183,0.12); }
}
@keyframes heroFitTravel {
  0% { transform: translateX(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateX(26px); opacity: 0; }
}
@keyframes heroFitTravelMobile {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(18px); opacity: 0; }
}
@keyframes heroNodeRise {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-content,
  .hero-visual,
  .hero-stats,
  .hero-path,
  .hero-badge-dot,
  .hero-connector-line::after,
  .hero-core-rings {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

/* ════════════════════════════════════════════════════════════
   SECTION SHARED
   ════════════════════════════════════════════════════════════ */
section { padding: 5rem 2rem; }

#hero,
#profile,
#compare,
#directory {
  scroll-margin-top: 108px;
}

@media (max-width: 768px) {
  #hero,
  #profile,
  #compare,
  #directory {
    scroll-margin-top: 106px;
  }
}
.section-header {
  text-align: center;
  margin-bottom: 2.8rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.section-label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .5rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -.05em;
  margin-bottom: .65rem;
  color: var(--text-primary);
  line-height: 1.04;
}
.section-sub { color: var(--text-secondary); font-size: .92rem; line-height: 1.75; }
.container { max-width: 1220px; margin: 0 auto; }

/* ════════════════════════════════════════════════════════════
   USER PROFILE / TRADER MATCH
   ════════════════════════════════════════════════════════════ */
.profile-section {
  background: linear-gradient(180deg, rgba(255,253,249,0.66), rgba(255,255,255,0.88));
}
.profile-section .trader-profile-box {
  max-width: 820px;
  margin: 0 auto;
}
.profile-section .tp-selectors {
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  margin-bottom: .4rem;
}
.profile-section .tp-options {
  gap: .45rem;
}
.profile-section .tp-btn {
  font-size: .75rem;
  padding: .52rem .9rem;
}

/* ════════════════════════════════════════════════════════════
   RULES IMPACT
   ════════════════════════════════════════════════════════════ */
#impact {
  background: linear-gradient(180deg, rgba(255,253,249,0.66), rgba(255,255,255,0.88));
}
.impact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 1.15rem;
  align-items: stretch;
}
.impact-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 1.5rem;
  border: 1px solid rgba(255,255,255,0.78);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(249,244,235,0.94));
  box-shadow: 0 24px 48px rgba(20,33,29,0.08);
}
.impact-card::before {
  content: '';
  position: absolute;
  inset: auto -8% -25% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15,95,86,0.12), transparent 70%);
  pointer-events: none;
}
.impact-card-head {
  position: relative;
  z-index: 1;
  margin-bottom: 1.1rem;
}
.impact-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .45rem;
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.impact-card-head h3 {
  font-family: var(--font-display);
  font-size: clamp(1.22rem, 2.2vw, 1.78rem);
  line-height: 1.02;
  letter-spacing: -.04em;
}
.impact-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .95rem;
}
.impact-lane {
  position: relative;
  padding: 1rem;
  border-radius: 24px;
  border: 1px solid rgba(20,33,29,0.08);
  background: rgba(255,255,255,0.72);
}
.impact-lane--blind {
  background: linear-gradient(180deg, rgba(255,247,245,0.98), rgba(255,255,255,0.76));
  border-color: rgba(194,65,45,0.15);
}
.impact-lane--clear {
  background: linear-gradient(180deg, rgba(240,253,244,0.98), rgba(255,255,255,0.8));
  border-color: rgba(15,95,86,0.16);
}
.impact-lane-head {
  display: grid;
  gap: .38rem;
  margin-bottom: .95rem;
}
.impact-lane-head strong {
  font-size: .96rem;
  line-height: 1.18;
}
.impact-lane-chip {
  display: inline-flex;
  width: fit-content;
  padding: .32rem .58rem;
  border-radius: 999px;
  font-size: .6rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.impact-lane-chip--danger {
  background: rgba(194,65,45,0.10);
  color: var(--danger);
}
.impact-lane-chip--success {
  background: rgba(15,95,86,0.10);
  color: var(--accent);
}
.impact-steps {
  display: grid;
  gap: .78rem;
}
.impact-step {
  display: grid;
  gap: .38rem;
}
.impact-step-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
}
.impact-step-top span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.04em;
}
.impact-step-top strong {
  font-size: .78rem;
  font-weight: 800;
  color: var(--text-secondary);
}
.impact-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(20,33,29,0.08);
  overflow: hidden;
}
.impact-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f5f56, #6ee7b7);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14) inset;
  animation: impactGrow 1.6s cubic-bezier(.22, 1, .36, 1) both;
  transform-origin: left center;
}
.impact-lane--blind .impact-bar span {
  background: linear-gradient(90deg, #c2412d, #f59e7b);
}
.impact-step--drop .impact-step-top span,
.impact-step--drop .impact-step-top strong {
  color: var(--danger);
}
.impact-step--soft .impact-step-top span,
.impact-step--soft .impact-step-top strong {
  color: #9a3412;
}
.impact-step--end .impact-step-top span,
.impact-step--end .impact-step-top strong {
  color: var(--accent);
}
.impact-step--strong .impact-step-top span {
  text-shadow: 0 0 14px rgba(15,95,86,0.12);
}
.impact-note {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: .74rem;
  line-height: 1.7;
}
.impact-rule-list {
  display: grid;
  gap: .9rem;
}
.impact-rule-item {
  display: grid;
  gap: .45rem;
}
.impact-rule-copy {
  display: grid;
  gap: .14rem;
}
.impact-rule-copy strong {
  font-size: .9rem;
}
.impact-rule-copy span {
  font-size: .76rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.impact-rule-meter {
  height: 11px;
  border-radius: 999px;
  background: rgba(20,33,29,0.08);
  overflow: hidden;
}
.impact-rule-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(196,111,45,0.95), rgba(15,95,86,0.98));
  animation: impactGrow 1.7s cubic-bezier(.22, 1, .36, 1) both;
  transform-origin: left center;
}
.impact-rule-item em {
  font-size: .68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.impact-summary {
  margin-top: 1.2rem;
  padding: .95rem 1rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15,95,86,0.12), rgba(255,255,255,0.82));
  border: 1px solid rgba(15,95,86,0.14);
}
.impact-summary-badge {
  display: inline-flex;
  margin-bottom: .38rem;
  padding: .32rem .56rem;
  border-radius: 999px;
  background: rgba(15,95,86,0.12);
  color: var(--accent);
  font-size: .6rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.impact-summary p {
  font-size: .8rem;
  line-height: 1.7;
  color: var(--text-secondary);
}
@keyframes impactGrow {
  from { transform: scaleX(0); opacity: .35; }
  to { transform: scaleX(1); opacity: 1; }
}
.trader-profile-box {
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(250,247,241,0.95));
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.8rem;
  margin-bottom: 1.7rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.trader-profile-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm), #dd9d5f);
}
.trader-profile-box::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  right: -80px;
  bottom: -90px;
  background: radial-gradient(circle, rgba(15,95,86,0.12), transparent 70%);
}
.tp-header { text-align: center; margin-bottom: 1.2rem; }
.tp-icon { font-size: 1.4rem; }
.tp-title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: .3rem 0 .2rem;
}
.tp-sub {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0;
}
.tp-selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.tp-label {
  display: block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: .4rem;
}
.tp-options {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.tp-btn {
  padding: .42rem .72rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.74);
  color: var(--text-secondary);
  font-size: .69rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(20,33,29,0.04);
}
.tp-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(238,248,242,0.92);
}
.tp-btn.active {
  background: linear-gradient(135deg, var(--accent) 0%, #0d7669 100%);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 12px 22px rgba(15,95,86,0.18);
}

/* ════════════════════════════════════════════════════════════
   COMPARE SECTION — FILTER / SEARCH
   ════════════════════════════════════════════════════════════ */
#compare {
  background:
    linear-gradient(180deg, rgba(243,238,228,0.55), rgba(255,255,255,0) 18%),
    linear-gradient(180deg, rgba(255,253,249,0.82), rgba(247,243,235,0.9));
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.filter-btn {
  padding: .46rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(20,33,29,0.08);
  background: rgba(255,255,255,0.72);
  color: var(--text-secondary);
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 8px 18px rgba(20,33,29,0.04);
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(238,248,242,0.96);
}
.search-wrap { display: flex; justify-content: center; margin-bottom: 1.3rem; }
.search-box {
  display: flex;
  align-items: center;
  gap: .7rem;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(20,33,29,0.08);
  border-radius: 18px;
  padding: .7rem 1rem;
  width: 100%;
  max-width: 480px;
  transition: border-color .2s, box-shadow .2s;
  box-shadow: var(--shadow-sm);
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15,95,86,.09), var(--shadow); }
.search-box svg { color: var(--text-muted); flex-shrink: 0; }
.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  width: 100%;
}
.search-box input::placeholder { color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════
   ALERT BANNER
   ════════════════════════════════════════════════════════════ */
.alert-banner {
  background: linear-gradient(180deg, rgba(255,248,236,0.95), rgba(255,252,245,0.98));
  border: 1px solid rgba(196,111,45,0.18);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin-bottom: 1.3rem;
  box-shadow: var(--shadow-sm);
}
.alert-banner .alert-icon { font-size: 1rem; flex-shrink: 0; }
.alert-banner p { font-size: .8rem; color: #92400e; line-height: 1.6; }
.alert-banner strong { color: #78350f; }

.compare-deck {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.compare-mobile-shell {
  position: relative;
}
.compare-mobile-fab,
.compare-mobile-sheet-head,
.compare-mobile-close {
  display: none;
}
.compare-panel {
  padding: 1.15rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.78);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,245,238,0.95));
  box-shadow: 0 22px 42px rgba(20,33,29,0.07);
}
.compare-panel--search {
  background:
    radial-gradient(circle at top left, rgba(196,111,45,0.10), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(249,245,238,0.95));
}
.compare-panel--style {
  background:
    radial-gradient(circle at top right, rgba(15,95,86,0.12), transparent 36%),
    linear-gradient(180deg, rgba(245,253,250,0.94), rgba(255,255,255,0.96));
}
.compare-panel-head {
  display: grid;
  gap: .45rem;
  margin-bottom: .95rem;
}
.compare-panel-head--tight { margin-bottom: .82rem; }
.compare-panel-kicker {
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .2rem;
}
.compare-panel-head h3 {
  font-family: var(--font-display);
  font-size: 1.32rem;
  line-height: 1.03;
  letter-spacing: -.04em;
  color: var(--text-primary);
}
.compare-panel-head p {
  margin: 0;
  font-size: .78rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.compare-search-wrap {
  justify-content: flex-start;
  margin-bottom: .9rem;
  width: 100%;
}
.compare-panel--search .compare-search-box {
  display: flex;
  flex: 1 1 100%;
  align-self: stretch;
  width: 100%;
  max-width: none;
  min-height: 56px;
  padding: .8rem .95rem;
  border-radius: 10px;
  border: 1px solid rgba(15,95,86,0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,248,243,0.98));
  box-shadow: 0 16px 28px rgba(20,33,29,0.06), inset 0 1px 0 rgba(255,255,255,0.82);
}
.compare-panel--search .compare-search-box svg {
  width: 21px;
  height: 21px;
}
.compare-panel--search .compare-search-box input {
  font-size: 1rem;
}
.compare-chip-group {
  display: grid;
  gap: .45rem;
}
.compare-chip-group + .compare-chip-group { margin-top: .85rem; }
.compare-chip-group--compact { margin-top: .72rem; }
.compare-chip-label {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.compare-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
}
.compare-chip-row--soft { gap: .38rem; }
.compare-chip,
.compare-hint-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  padding: .34rem .64rem;
  border-radius: 999px;
  border: 1px solid rgba(20,33,29,0.08);
  background: rgba(255,255,255,0.74);
  color: var(--text-secondary);
  font-size: .66rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .18s;
  box-shadow: 0 8px 18px rgba(20,33,29,0.04);
  white-space: nowrap;
}
.compare-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.compare-chip.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, #0d7669 100%);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 16px 28px rgba(15,95,86,0.14);
}
.compare-chip--method.is-active {
  background: linear-gradient(135deg, #8c5524 0%, #c46f2d 100%);
  border-color: #c46f2d;
}
.compare-hint-chip {
  cursor: default;
  background: rgba(247,244,237,0.9);
  color: var(--text-muted);
  box-shadow: none;
}
.compare-deck-footer {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-top: .95rem;
  padding-top: 1.05rem;
  border-top: 1px solid rgba(20,33,29,0.08);
}
.compare-filter-summary {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-height: 56px;
  padding: .6rem 6.7rem .6rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(15,95,86,0.18);
  background:
    linear-gradient(135deg, rgba(240,249,246,0.96), rgba(255,249,242,0.94)),
    linear-gradient(90deg, rgba(15,95,86,0.18), rgba(196,111,45,0.16));
  box-shadow: 0 16px 28px rgba(15,95,86,0.08);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}
.compare-filter-summary::before,
.compare-filter-summary::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.compare-filter-summary::before {
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(90deg, rgba(15,95,86,0.95), rgba(196,111,45,0.58), rgba(15,95,86,0.95));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .92;
}
.compare-filter-summary::after {
  top: 0;
  bottom: 0;
  left: -24%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.75), transparent);
  transform: skewX(-18deg);
  animation: compareSummarySweep 4.6s ease-in-out infinite;
}
.compare-clear-btn {
  position: absolute;
  top: calc(1.05rem + 7px);
  right: 7px;
  height: 42px;
  min-height: 42px;
  padding: 0 .9rem;
  border-radius: 0 10px 10px 0;
  border: 1px solid rgba(194,65,45,0.24);
  background: linear-gradient(180deg, #fff5f3, #fee8e3);
  color: #b42318;
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.88);
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.compare-clear-btn:hover {
  border-color: #b42318;
  background: linear-gradient(180deg, #feeae5, #fdd8d1);
  color: #912018;
}

/* View Results button & footer actions — mobile only */
.compare-view-results,
.compare-footer-actions {
  display: block;
}
.compare-view-results {
  display: none;
}

.compare-match-lists {
  margin: .35rem 0 1.25rem;
}
.compare-match-lists:empty {
  display: none;
}
.compare-match-panel {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.compare-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .95rem;
}
.compare-match-col {
  display: grid;
  gap: .82rem;
  align-content: start;
  padding: .9rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.84);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(249,246,239,0.94));
  box-shadow: 0 16px 34px rgba(20,33,29,0.05);
}
.compare-match-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border-radius: 0;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .01em;
  border: none;
  background: transparent;
  text-transform: uppercase;
}
.compare-match-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 .55rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  font-size: .7rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}
.compare-match-head--good {
  color: #166534;
}
.compare-match-head--bad {
  color: #b42318;
}
.compare-match-list {
  min-height: 0;
  padding: 0;
  border: none;
  background: transparent;
}
.compare-match-list--chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: .58rem;
}
.compare-match-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: .28rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(20,33,29,0.09);
  background: rgba(255,255,255,0.96);
  font-size: .66rem;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(20,33,29,0.04);
}
.compare-match-chip--good {
  border-color: rgba(134,239,172,0.5);
  background: linear-gradient(180deg, rgba(245,254,248,0.98), rgba(255,255,255,0.98));
}
.compare-match-chip--bad {
  border-color: rgba(252,165,165,0.52);
  background: linear-gradient(180deg, rgba(255,248,247,0.98), rgba(255,255,255,0.98));
}
.compare-match-chip--clickable {
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.compare-match-chip--clickable:hover {
  border-color: rgba(180,35,24,0.36);
  background: linear-gradient(180deg, rgba(255,242,239,0.98), rgba(255,255,255,1));
  box-shadow: 0 8px 18px rgba(180,35,24,0.08);
}
.compare-match-chip-name {
  font-size: .66rem;
  font-weight: 800;
  color: var(--text-primary);
}
.compare-match-empty {
  padding: .78rem .92rem;
  border-radius: 10px;
  border: 1px dashed rgba(20,33,29,0.14);
  background: rgba(255,255,255,0.72);
  font-size: .72rem;
  color: var(--text-muted);
}

@keyframes compareSummarySweep {
  0%, 12% { transform: translateX(0) skewX(-18deg); opacity: 0; }
  18% { opacity: .25; }
  48% { transform: translateX(520%) skewX(-18deg); opacity: .72; }
  64%, 100% { transform: translateX(620%) skewX(-18deg); opacity: 0; }
}

.tp-result {
  margin-top: 1rem;
  min-height: 0;
  transition: all .2s;
}
.tp-result:empty { margin: 0; }
.tp-result-summary {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .6rem;
}
.tp-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .5rem;
}
.tp-firm-card {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  font-size: .75rem;
  cursor: pointer;
  transition: border-color .15s;
}
.tp-firm-card:hover { border-color: var(--accent); }
.tp-firm-card--good { border-left: 3px solid var(--success); }
.tp-firm-card--warn { border-left: 3px solid var(--warning); }
.tp-firm-card--bad { border-left: 3px solid var(--danger); }
.tp-firm-name {
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}
.tp-firm-score {
  font-weight: 800;
  font-size: .7rem;
}
.tp-firm-card--good .tp-firm-score { color: var(--success); }
.tp-firm-card--warn .tp-firm-score { color: var(--warning); }
.tp-firm-card--bad .tp-firm-score { color: var(--danger); }
.tp-firm-flags {
  display: flex;
  gap: .2rem;
  flex-wrap: wrap;
}
.tp-firm-flag {
  font-size: .55rem;
  font-weight: 600;
  padding: .1rem .3rem;
  border-radius: 3px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  white-space: nowrap;
}
.tp-clear {
  display: block;
  margin: .8rem auto 0;
  padding: .3rem .8rem;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  border-radius: 6px;
  font-size: .7rem;
  cursor: pointer;
  transition: all .15s;
}
.tp-clear:hover { border-color: var(--danger); color: var(--danger); }
/* COMPARE SECTION — FILTER / SEARCH */
#compare { background: var(--bg-primary); }
.compare-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem;
  border-radius: 999px;
  border: 1px solid rgba(20,33,29,0.08);
  background: rgba(255,255,255,0.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.92);
}
.compare-view-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: .72rem;
  font-weight: 800;
  padding: .48rem .85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.compare-view-btn.is-active {
  background: linear-gradient(135deg, var(--accent), #0c776a);
  color: #fff;
  box-shadow: 0 10px 20px rgba(15,95,86,0.18);
}
.nav-view-toggle .compare-view-btn {
  padding: .42rem .78rem;
  font-size: .68rem;
}
.filter-bar {
  display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
  margin-bottom: 1.5rem;
}
.filter-btn {
  padding: .38rem .95rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-secondary);
  color: var(--text-secondary); font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent); color: var(--accent); background: var(--accent-light);
}

.search-wrap {
  display: flex; justify-content: center; margin-bottom: 1.3rem;
}
.search-box {
  display: flex; align-items: center; gap: .7rem;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 10px; padding: .5rem 1rem;
  width: 100%; max-width: 400px;
  transition: border-color .2s, box-shadow .2s;
}
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.07); }
.search-box svg { color: var(--text-muted); flex-shrink: 0; }
.search-box input {
  background: none; border: none; outline: none;
  color: var(--text-primary); font-size: .88rem; width: 100%;
}
.search-box input::placeholder { color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════
   ALERT BANNER
   ════════════════════════════════════════════════════════════ */
.alert-banner {
  background: #fffbeb; border: 1px solid #fde68a;
  border-radius: var(--radius); padding: .8rem 1.1rem;
  display: flex; align-items: flex-start; gap: .7rem;
  margin-bottom: 1.3rem;
}
.alert-banner .alert-icon { font-size: 1rem; flex-shrink: 0; }
.alert-banner p { font-size: .8rem; color: #92400e; line-height: 1.6; }
.alert-banner strong { color: #78350f; }

/* ════════════════════════════════════════════════════════════
   FIRM PANELS (full-page detailed layout)
   ════════════════════════════════════════════════════════════ */
.firms-carousel-wrapper {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}
.firms-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.35rem;
  overflow: visible;
  padding: 0.6rem 0 1.7rem;
}
.firms-grid.firms-grid--loading {
  display: block;
  overflow: visible;
  padding: 1.2rem 0 1.9rem;
}
.firms-grid .firm-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
}

@media (min-width: 769px) {
  .firms-carousel-wrapper {
    overflow: visible;
  }
  #firms-grid {
    gap: 1.5rem;
    padding-right: 0;
  }
  #firms-grid > .firm-panel {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
  }
}

/* Carousel Navigation */
.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.carousel-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.84);
  border: 1.5px solid rgba(20,33,29,0.08);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  box-shadow: 0 10px 18px rgba(20,33,29,0.06);
}
.carousel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(238,248,242,0.96);
  box-shadow: var(--shadow);
  transform: scale(1.05);
}
.carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.carousel-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all .25s;
  padding: 0;
}
.carousel-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}
.carousel-counter {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 45px;
  text-align: center;
}
.firms-empty {
  width: min(100%, 440px);
  margin: 0 auto;
  display: grid;
  place-items: center;
  min-height: 168px;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: .92rem;
}
.firms-empty--loading {
  display: grid;
  place-items: center;
  gap: .72rem;
  width: min(100%, 420px);
  margin: 0 auto;
  min-height: 168px;
  padding: 2rem 1rem;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.firms-loader {
  position: relative;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
}
.firms-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(15,95,86,0.10);
  background: conic-gradient(from 180deg, rgba(15,95,86,0.04), rgba(15,95,86,0.58), rgba(196,111,45,0.42), rgba(15,95,86,0.04));
  -webkit-mask: radial-gradient(circle, transparent 63%, #000 65%);
  mask: radial-gradient(circle, transparent 63%, #000 65%);
  animation: firmsLoaderSpin 1.6s linear infinite;
}
.firms-loader-core {
  position: relative;
  z-index: 1;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(15,95,86,0.96), rgba(18,47,43,0.96));
  color: #fff;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .12em;
  box-shadow: 0 10px 22px rgba(15,23,42,0.18);
}
.firms-loader-glow {
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196,111,45,0.12), rgba(15,95,86,0.04) 58%, transparent 74%);
  animation: firmsLoaderGlow 2.4s ease-in-out infinite;
}
.firms-empty-title {
  color: var(--text-primary);
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.firms-empty-sub {
  max-width: 360px;
  color: var(--text-secondary);
  font-size: .8rem;
  line-height: 1.55;
}
@keyframes firmsLoaderSpin {
  to { transform: rotate(360deg); }
}
@keyframes firmsLoaderGlow {
  0%, 100% { transform: scale(.9); opacity: .42; }
  50% { transform: scale(1.06); opacity: .78; }
}

/* ── Panel Container ── */
.firm-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,252,247,0.96));
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: none;
  transition: border-color .35s ease, opacity .4s ease, filter .4s ease, transform .4s ease;
  backdrop-filter: blur(14px);
}
.firm-panel:hover {
  box-shadow: none;
  border-color: rgba(15,95,86,0.18);
}
/* Vertical layout: all cards always fully visible, no dimming */
.firms-grid .firm-panel {
  opacity: 1;
  filter: none;
  transform: none;
  cursor: default;
}
.carousel-nav { display: none !important; }

/* ── Panel Header ── */
.fp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.55rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.68) 0%, rgba(238,248,242,0.72) 62%, rgba(255,244,233,0.8) 100%);
  border-bottom: 1px solid rgba(20,33,29,0.08);
  border-top: 4px solid var(--accent);
  gap: 1rem;
}
.fp-header-left {
  display: flex;
  align-items: center;
  gap: .9rem;
  flex: 1 1 auto;
  min-width: 0;
}
.fp-logo {
  width: 52px; height: 52px;
  border-radius: 16px;
  object-fit: contain;
  flex-shrink: 0;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(20,33,29,0.08);
  box-shadow: 0 10px 18px rgba(20,33,29,0.08);
  padding: 4px;
}
.fp-initials {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(15,95,86,0.12), rgba(196,111,45,0.12));
  border: 1px solid rgba(15,95,86,0.12);
  flex-shrink: 0;
}
.fp-identity { min-width: 0; }
.fp-name {
  font-family: var(--font-display);
  font-size: 1.28rem; font-weight: 700;
  color: var(--text-primary);
  margin: 0; line-height: 1.3;
}
.fp-legal-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .1rem;
}
.fp-legal {
  font-size: .76rem; color: var(--text-muted); font-weight: 500;
}
.fp-ai-inline {
  display: inline-flex;
  align-items: baseline;
  gap: .28rem;
  font-size: .72rem;
  font-weight: 800;
  color: #8a5a20;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.fp-ai-inline strong {
  color: var(--text-primary);
  font-size: .74rem;
}
.fp-meta {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  margin-top: .2rem;
}
.fp-meta span, .fp-meta a {
  font-size: .74rem; color: var(--text-muted); font-weight: 500;
  text-decoration: none;
}
.fp-domain-readonly {
  color: var(--text-muted);
}
.fp-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--text-muted); flex-shrink: 0;
}
.fp-header-right {
  flex: 0 1 17rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
  min-width: 0;
  margin-left: auto;
}
.fp-rank-chip {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  padding: .24rem .62rem;
  border-radius: 999px;
  border: 1px solid rgba(15,95,86,0.16);
  background: rgba(255,255,255,0.92);
  color: var(--text-secondary);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .01em;
}
.fp-rank-chip strong {
  color: var(--accent);
  font-size: .7rem;
}
.fp-ai-score-chip {
  display: inline-flex;
  align-items: center;
  gap: .52rem;
  padding: .3rem .68rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,252,239,0.96), rgba(255,246,229,0.98));
  border: 1px solid rgba(196,111,45,0.2);
  box-shadow: 0 10px 20px rgba(196,111,45,0.08);
}
.fp-ai-score-copy {
  display: grid;
  gap: .02rem;
}
.fp-ai-score-kicker {
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8a5a20;
}
.fp-ai-score-rank {
  font-size: .6rem;
  color: var(--text-muted);
  font-weight: 700;
}
.fp-ai-score-value {
  display: inline-flex;
  align-items: baseline;
  gap: .1rem;
  color: #8b5a13;
}
.fp-ai-score-value strong {
  font-size: 1rem;
  line-height: 1;
}
.fp-ai-score-value span {
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Header Chips (Scaling / Salary compact) ── */
.fp-hdr-chip {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .22rem .62rem;
  border-radius: 100px;
  font-size: .63rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.4;
  letter-spacing: .01em;
  position: relative;
  overflow: hidden;
}
.fp-hdr-chip--yes {
  background: #f0fdf4;
  color: #15803d;
  border: 1.5px solid #86efac;
}
.fp-hdr-chip--no {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1.5px solid #cbd5e1;
  opacity: .82;
}
.fp-hdr-chip--muted {
  background: var(--bg-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
/* Clickable chip variant */
.fp-hdr-chip--btn {
  cursor: pointer;
  isolation: isolate;
  transition: color .22s ease, background-color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.fp-hdr-chip--btn::before,
.fp-hdr-chip--btn::after {
  content: '';
  position: absolute;
  inset: -1.5px;
  border: 1.5px solid currentColor;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: transform .26s ease, opacity .2s ease;
}
.fp-hdr-chip--btn::before {
  clip-path: inset(0 50% 0 0 round 999px);
  transform: scaleX(.18);
  transform-origin: left center;
}
.fp-hdr-chip--btn::after {
  clip-path: inset(0 0 0 50% round 999px);
  transform: scaleX(.18);
  transform-origin: right center;
}
.fp-hdr-chip--btn:hover,
.fp-hdr-chip--btn:focus-visible {
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.fp-hdr-chip--btn:hover::before,
.fp-hdr-chip--btn:hover::after,
.fp-hdr-chip--btn:focus-visible::before,
.fp-hdr-chip--btn:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}
.fp-hdr-chip--yes.fp-hdr-chip--btn:hover,
.fp-hdr-chip--yes.fp-hdr-chip--btn:focus-visible {
  background: #f6fffa;
  color: #166534;
  border-color: rgba(134, 239, 172, .45);
}
.fp-hdr-chip--no.fp-hdr-chip--btn:hover,
.fp-hdr-chip--no.fp-hdr-chip--btn:focus-visible {
  background: #f8fafc;
  color: #64748b;
  border-color: rgba(148, 163, 184, .45);
}
/* Badge circle inside chip */
.fp-hdr-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-left: .15rem;
  line-height: 1;
  position: relative;
}
.fp-hdr-check--yes {
  background: #16a34a;
  color: #fff;
}
.fp-hdr-check--no {
  background: #cbd5e1;
  color: #64748b;
}
.fp-hdr-check::before {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
}
.fp-hdr-check--yes::before {
  width: 6px;
  height: 3px;
  border-left: 1.8px solid #fff;
  border-bottom: 1.8px solid #fff;
  transform: translate(-44%, -62%) rotate(-45deg);
}
.fp-hdr-check--no::before {
  width: 7px;
  height: 0;
  border-top: 1.8px solid #64748b;
  transform: translate(-50%, -50%);
}
/* Scale / salary dialog grid */
.scale-dlg-grid {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  margin-bottom: .7rem;
}
.scale-dlg-row {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .35rem .5rem;
  border-radius: 6px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-size: .8rem;
}
.scale-dlg-k {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  min-width: 115px;
  flex-shrink: 0;
}
.scale-dlg-v {
  font-weight: 600;
  color: var(--text-primary);
}
.scale-dlg-steps {
  font-size: .78rem;
  line-height: 1.65;
  color: var(--text-secondary);
  padding: .45rem .6rem;
  background: var(--bg-secondary);
  border-radius: 6px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}

/* ── Stats Row ── */
.fp-stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(239,231,216,0.78), rgba(255,255,255,0.64));
}
.fp-stat {
  text-align: center;
  padding: .85rem .5rem;
  border-right: 1px solid var(--border);
}
.fp-stat:last-child { border-right: none; }
.fp-stat-val {
  font-size: .95rem; font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}
.fp-stat-val.accent  { color: var(--accent); }
.fp-stat-val.success { color: var(--success); }
.fp-stat-val.danger  { color: var(--danger); }
.fp-stat-val.warn    { color: var(--warning); }
.fp-stat-label {
  font-size: .6rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted);
  margin-top: .15rem;
}

/* ── Quick Glance Strip ── */
.fp-glance-strip {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  align-items: start;
}
.fp-glance-section {
  padding: .7rem 1rem;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.fp-glance-section:last-child { border-right: none; }
.fp-glance-label {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin-bottom: .45rem;
  padding-top: 0;
}

/* Trader list (one line per type) */
.fp-glance-trader-list {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.fp-glance-trader-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .2rem .45rem;
  border-radius: 6px;
  font-size: .7rem;
}
.fp-glance-trader-item.glance-good {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.fp-glance-trader-item.glance-ok {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fde68a;
}
.fp-glance-trader-item.glance-bad {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.fp-glance-trader-name { font-weight: 600; }
.fp-glance-trader-score {
  font-weight: 800;
  font-size: .6rem;
  opacity: .8;
  margin-left: auto;
}
.fp-glance-trader-item .info-btn {
  font-size: .7rem;
  width: 18px;
  height: 18px;
  padding: 0;
  flex-shrink: 0;
}

/* Scaling list */
.fp-scale-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  flex: 1;
}
.fp-scale-item {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .15rem .4rem;
  border-radius: 6px;
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.fp-scale-ic {
  font-size: .7rem;
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
}
.fp-scale-k {
  font-size: .5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--accent);
  flex-shrink: 0;
}
.fp-scale-item--method {
  background: var(--accent-light);
  border-color: var(--border-accent);
  padding: .15rem .4rem;
}
.fp-scale-method {
  display: inline-block;
  padding: .08rem .35rem;
  border-radius: 4px;
  font-size: .6rem;
  font-weight: 800;
}
.fp-scale-method--auto {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.fp-scale-method--request {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fde68a;
}

/* Scaling & Salary cards */
.fp-glance-card {
  border-radius: 8px;
  padding: .45rem .6rem;
}
.fp-glance-card--accent {
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
}
.fp-glance-card--muted {
  background: var(--bg-muted);
  border: 1px solid var(--border);
}
.fp-glance-card-val {
  font-size: .85rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.3;
}
.fp-glance-card--muted .fp-glance-card-val {
  color: var(--text-muted);
  font-size: .78rem;
  font-weight: 600;
}
.fp-glance-card-sub {
  font-size: .65rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: .15rem;
}
.fp-glance-card-req {
  font-size: .6rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: .2rem;
  padding-top: .2rem;
  border-top: 1px solid rgba(0,0,0,.05);
}

/* ── Donut Charts (Pressure) ── */
.fp-donut-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding-top: 0;
  flex: 1;
}
.fp-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  min-width: 64px;
  background: none;
  border: none;
  padding: 0;
  cursor: default;
}
.fp-glance-donuts {
  justify-content: center;
}
.fp-donut-wrap--btn {
  cursor: pointer;
  transition: transform .15s;
}
.fp-donut-wrap--btn:hover { transform: scale(1.07); }
.fp-donut-wrap--btn:hover .fp-donut-arc { filter: brightness(1.15); }
.fp-donut {
  width: 58px;
  height: 58px;
}
.fp-donut-arc {
  transition: stroke-dashoffset .9s ease, filter .15s ease;
}
.fp-donut-arc--low       { stroke: #22c55e; }
.fp-donut-arc--moderate  { stroke: #f59e0b; }
.fp-donut-arc--high      { stroke: #ef4444; }
.fp-donut-arc--extreme   { stroke: #991b1b; }
.fp-donut-arc--good      { stroke: #22c55e; }
.fp-donut-arc--poor      { stroke: #ef4444; }
.fp-donut-val {
  font-size: 14px;
  font-weight: 800;
  fill: var(--text-primary);
  text-anchor: middle;
  dominant-baseline: auto;
}
.fp-donut-unit {
  font-size: 7px;
  font-weight: 600;
  fill: var(--text-muted);
  text-anchor: middle;
  dominant-baseline: auto;
}
.fp-donut-label {
  font-size: .58rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .4px;
}
.fp-donut-score-tag {
  font-size: .48rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8ba09a;
}
.fp-donut-sub {
  font-size: .55rem;
  font-weight: 700;
  padding: .08rem .3rem;
  border-radius: 4px;
}
.fp-donut-sub--low      { background: #f0fdf4; color: #15803d; }
.fp-donut-sub--moderate { background: #fefce8; color: #a16207; }
.fp-donut-sub--high     { background: #fef2f2; color: #dc2626; }
.fp-donut-sub--extreme  { background: #fef2f2; color: #991b1b; }
.fp-donut-sub--good     { background: #f0fdf4; color: #15803d; }
.fp-donut-sub--poor     { background: #fef2f2; color: #dc2626; }
.fp-dd-indicator-wrap {
  gap: .2rem;
}
.fp-dd-indicator-svg {
  overflow: visible;
}
.fp-dd-indicator-arc {
  transition: stroke-dasharray .9s ease, filter .15s ease;
  fill: none;
}
.fp-dd-indicator-arc--overall {
  stroke: #f59e0b;
}
.fp-dd-indicator-arc--daily {
  stroke: #0f766e;
}
.fp-dd-indicator-main {
  font-size: 14px;
  font-weight: 900;
  fill: var(--text-primary);
  text-anchor: middle;
}
.fp-dd-indicator-sub {
  font-size: 6px;
  font-weight: 800;
  fill: var(--text-muted);
  text-anchor: middle;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Donut dialog score badge */
.donut-dlg-score {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem .85rem; border-radius: 8px;
  margin-bottom: .75rem;
  border: 1.5px solid transparent;
}
.donut-dlg-score--low, .donut-dlg-score--good { background: #f0fdf4; border-color: #bbf7d0; }
.donut-dlg-score--moderate                     { background: #fefce8; border-color: #fde68a; }
.donut-dlg-score--high                         { background: #fef2f2; border-color: #fecaca; }
.donut-dlg-score--extreme, .donut-dlg-score--poor { background: #fff1f2; border-color: #fda4af; }
.donut-dlg-num { font-size: 1.1rem; font-weight: 800; }
.donut-dlg-sev { font-size: .78rem; font-weight: 700; }
.donut-dlg-score--low    .donut-dlg-num, .donut-dlg-score--low    .donut-dlg-sev,
.donut-dlg-score--good   .donut-dlg-num, .donut-dlg-score--good   .donut-dlg-sev { color: #15803d; }
.donut-dlg-score--moderate .donut-dlg-num, .donut-dlg-score--moderate .donut-dlg-sev { color: #a16207; }
.donut-dlg-score--high   .donut-dlg-num, .donut-dlg-score--high   .donut-dlg-sev { color: #dc2626; }
.donut-dlg-score--extreme .donut-dlg-num, .donut-dlg-score--extreme .donut-dlg-sev,
.donut-dlg-score--poor   .donut-dlg-num, .donut-dlg-score--poor   .donut-dlg-sev { color: #991b1b; }
/* inline severity text used in sim results */
.donut-dlg-sev--low, .donut-dlg-sev--good     { color: #15803d; }
.donut-dlg-sev--moderate                       { color: #a16207; }
.donut-dlg-sev--high                           { color: #dc2626; }
.donut-dlg-sev--extreme, .donut-dlg-sev--poor  { color: #991b1b; }

/* ── Forbidden / Hidden Rules strip (between flags) ── */
.fp-forbidden-strip {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #fefbf3;
}
.fp-forbidden-header {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .5rem;
}
.fp-forbidden-icon { font-size: .85rem; }
.fp-forbidden-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
}
.fp-forbidden-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  align-items: start;
}
.fp-forbidden-item {
  border-radius: 6px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  background: #fff;
  overflow: hidden;
}
.fp-forbidden-item.sev-critical { border-left-color: var(--danger); }
.fp-forbidden-item.sev-warning  { border-left-color: var(--warning); }
.fp-forbidden-item.sev-positive { border-left-color: var(--success); }
.fp-forbidden-item.sev-info     { border-left-color: var(--accent); }
.fp-forbidden-sum {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .5rem;
  cursor: pointer;
  font-size: .7rem;
  list-style: none;
}
.fp-forbidden-sum::-webkit-details-marker,
.fp-forbidden-sum::marker { display: none; content: ''; }
.fp-forbidden-sum::before {
  content: '\25B8';
  font-size: .6rem;
  color: var(--text-muted);
  transition: transform .15s;
}
.fp-forbidden-item[open] .fp-forbidden-sum::before {
  transform: rotate(90deg);
}
.fp-forbidden-sev { font-size: .75rem; flex-shrink: 0; }
.fp-forbidden-name {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fp-forbidden-body {
  padding: .25rem .5rem .4rem 1.6rem;
  border-top: 1px solid rgba(0,0,0,.05);
}
.fp-forbidden-body p {
  font-size: .68rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 .2rem;
}
.fp-forbidden-country-list {
  margin: .35rem 0 0;
  padding-left: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .15rem .8rem;
  font-size: .66rem;
  color: var(--text-secondary);
}
.fp-forbidden-country-list li {
  line-height: 1.45;
}
.fp-forbidden-source {
  margin: .4rem 0 0;
  font-size: .62rem;
}
.fp-forbidden-source a {
  color: var(--text-muted);
  text-decoration: none;
  opacity: .75;
}
.fp-forbidden-source a:hover {
  opacity: 1;
  text-decoration: underline;
}
.fp-forbidden-impact {
  font-size: .62rem !important;
  color: var(--text-muted) !important;
  font-style: italic;
}
.fp-forbidden-impacts {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .3rem;
}
.fp-impact-tag {
  font-size: .55rem;
  font-weight: 700;
  padding: .15rem .4rem;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: .3px;
}
.fp-impact-tag.impact-scalper   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.fp-impact-tag.impact-day       { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.fp-impact-tag.impact-swing     { background: #fefce8; color: #a16207; border: 1px solid #fde68a; }
.fp-impact-tag.impact-position  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.fp-impact-tag.impact-ea        { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }
.fp-impact-tag.impact-all       { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.fp-forbidden-item .info-btn {
  font-size: .6rem;
  width: 16px;
  height: 16px;
  padding: 0;
  flex-shrink: 0;
  margin-left: auto;
}

/* ── Body (sections container) ── */
.fp-body {
  display: flex;
  flex-direction: column;
}

/* ── Section Base ── */
.fp-section {
  border-bottom: 1px solid var(--border);
}
.fp-section:last-child { border-bottom: none; }

.fp-section-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.5rem;
  background: var(--bg-secondary);
}
.fp-section-icon {
  font-size: 1rem;
  flex-shrink: 0;
}
.fp-section-title {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--accent);
  margin: 0;
}
.fp-count {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-size: .55rem; font-weight: 800;
  padding: .1rem .35rem; border-radius: 4px;
  margin-left: .3rem; vertical-align: middle;
}
.fp-section-hint {
  font-size: .65rem; color: var(--text-muted); font-weight: 500;
  margin-left: auto;
}
.fp-section-content {
  padding: 0 1.5rem 1.2rem;
}

/* ── Collapsible (toggle) Sections ── */
.fp-toggle {
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.fp-toggle:hover { background: var(--bg-muted); }
.fp-arrow {
  margin-left: auto;
  font-size: .7rem;
  color: var(--text-muted);
  transition: transform .2s;
}
.fp-collapsible.collapsed .fp-arrow {
  transform: rotate(-90deg);
}
.fp-section-body {
  padding: 0 1.5rem 1.2rem;
}
.fp-collapsible.collapsed .fp-section-body {
  display: none;
}

/* ── Field Grid (2-col key-value for payout, profile, restrictions) ── */
.fp-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
}
.fp-field {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(0,0,0,.04);
  gap: .6rem;
}
.fp-field:last-child { border-bottom: none; }
.fp-field-label {
  font-size: .78rem; color: var(--text-muted); font-weight: 600;
  flex-shrink: 0;
  display: flex; align-items: center; gap: .2rem;
}
.fp-field-val {
  font-size: .8rem; color: var(--text-primary); font-weight: 500;
  text-align: right; max-width: 60%; line-height: 1.5;
}

/* Full-width fields (for long text like rules) */
.fp-field-list { display: flex; flex-direction: column; }
.fp-field-full {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .6rem 0;
  border-bottom: 1px solid rgba(0,0,0,.04);
}
.fp-field-full:last-child { border-bottom: none; }
.fp-field-full .fp-field-val {
  text-align: left; max-width: 100%;
  font-size: .78rem; line-height: 1.6;
}

.fp-caps-note {
  margin-top: .6rem; padding: .5rem .7rem;
  background: var(--bg-muted); border-radius: var(--radius);
  font-size: .72rem; color: var(--text-secondary); line-height: 1.5;
}

.fp-section--payout {
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.98));
}
.fp-section-content--payout {
  padding-top: .65rem;
}
.fp-payout-tabs {
  margin-bottom: .72rem;
}
.fp-section--payout .flag-dlg-panels {
  min-height: 0;
  margin: 0;
}
.fp-section--payout .flag-dlg-panel.active {
  min-height: 0;
}

.fp-payout-overview {
  display: flex;
  flex-direction: column;
  gap: .72rem;
}
.fp-pay-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr);
  gap: .85rem;
  padding: .9rem;
  border: 1px solid rgba(37,99,235,.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.12), transparent 36%),
    linear-gradient(135deg, #f8fbff 0%, #ffffff 55%, #f3f7ff 100%);
}
.fp-pay-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .45rem;
  min-width: 0;
}
.fp-pay-kicker {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.fp-pay-headline {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-pay-sub {
  margin: 0;
  font-size: .78rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 42ch;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-pay-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.fp-pay-highlight {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-height: 100%;
  min-width: 0;
  padding: .9rem;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.18);
  background: rgba(255,255,255,.82);
  box-shadow: 0 12px 28px rgba(15,23,42,.06);
}
.fp-pay-highlight--accent {
  background: linear-gradient(180deg, rgba(219,234,254,.8), rgba(255,255,255,.95));
}
.fp-pay-highlight--calm {
  background: linear-gradient(180deg, rgba(224,242,254,.7), rgba(255,255,255,.95));
}
.fp-pay-highlight--warm {
  background: linear-gradient(180deg, rgba(255,247,237,.85), rgba(255,255,255,.95));
}
.fp-pay-highlight-label {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-pay-highlight-value {
  font-size: .95rem;
  line-height: 1.3;
  font-weight: 800;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-pay-highlight-note {
  font-size: .68rem;
  line-height: 1.55;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fp-pay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.fp-pay-card {
  padding: .95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,250,252,.96));
  box-shadow: 0 10px 22px rgba(15,23,42,.05);
  min-width: 0;
}
.fp-pay-card--accent { border-color: rgba(59,130,246,.18); }
.fp-pay-card--calm { border-color: rgba(6,182,212,.18); }
.fp-pay-card--warn { border-color: rgba(245,158,11,.2); }
.fp-pay-card--neutral { border-color: rgba(99,102,241,.16); }
.fp-pay-card--wide { grid-column: 1 / -1; }
.fp-pay-card-title {
  font-size: .8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .75rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-pay-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.fp-pay-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .9rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid rgba(148,163,184,.14);
}
.fp-pay-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.fp-pay-item-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-pay-item-value {
  max-width: 58%;
  text-align: right;
  font-size: .76rem;
  line-height: 1.55;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.fp-pay-story {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.fp-pay-story-step {
  display: flex;
  gap: .7rem;
  padding: .8rem;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(241,245,249,.85), rgba(255,255,255,.92));
  border: 1px solid rgba(148,163,184,.14);
  min-width: 0;
}
.fp-pay-story-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  flex-shrink: 0;
}
.fp-pay-story-label {
  font-size: .72rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: .2rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-pay-story-text {
  font-size: .7rem;
  line-height: 1.55;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-caps-note--payout {
  margin-top: .85rem;
  border: 1px solid rgba(59,130,246,.12);
  background: linear-gradient(180deg, rgba(219,234,254,.35), rgba(255,255,255,.95));
}

/* ── Payout Reality Simulator ── */
.pysim-wrap { display: flex; flex-direction: column; gap: .7rem; }
.pysim-btn-row { display: flex; gap: .28rem; flex-wrap: wrap; margin-top: .2rem; }
.pysim-btn {
  padding: .26rem .58rem; border-radius: 18px;
  border: 1.5px solid var(--border); background: var(--bg-card);
  font-size: .68rem; font-weight: 700; color: var(--text-muted);
  cursor: pointer; transition: all .15s; user-select: none;
}
.pysim-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(37,99,235,.06); }
.pysim-btn--active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.25); }
.pysim-result { min-height: 40px; }

/* Flow diagram */
.pysim-flow {
  display: flex; align-items: flex-start; gap: .25rem;
  flex-wrap: wrap; margin-bottom: .7rem;
  padding: .6rem; background: var(--bg-muted);
  border: 1px solid var(--border); border-radius: 10px;
}
.pysim-flow-step {
  display: flex; align-items: flex-start; gap: .35rem;
  flex: 1; min-width: 100px;
}
.pysim-flow-icon { font-size: 1.1rem; line-height: 1; }
.pysim-flow-detail { display: flex; flex-direction: column; gap: 1px; }
.pysim-flow-label { font-size: .58rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.pysim-flow-val { font-size: .88rem; font-weight: 800; line-height: 1.1; }
.pysim-flow-sub { font-size: .6rem; color: var(--text-muted); }
.pysim-flow-arrow { font-size: .8rem; color: var(--text-muted); align-self: center; font-weight: 700; padding-top: .6rem; }

/* Myth-busters */
.pysim-scenarios { margin-top: .3rem; }
.pysim-scenarios-title {
  font-size: .72rem; font-weight: 800; color: var(--text-primary);
  margin-bottom: .45rem; letter-spacing: .01em;
}
.pysim-myth {
  background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: 10px; padding: .55rem .7rem; margin-bottom: .4rem;
}
.pysim-myth-q {
  font-size: .74rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: .3rem;
}
.pysim-myth-a {
  font-size: .68rem; line-height: 1.6; color: var(--text-secondary);
}

/* Issues */
.pysim-issues {
  margin-top: .55rem; padding: .55rem .7rem;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
}
.pysim-issues-title {
  font-size: .7rem; font-weight: 800; color: #92400e;
  margin-bottom: .35rem;
}
.pysim-issue {
  display: flex; align-items: flex-start; gap: .4rem;
  font-size: .68rem; line-height: 1.5; margin-bottom: .25rem;
}
.pysim-issue-icon { flex-shrink: 0; }

/* ── Plan Tabs ── */
.fp-plan-tabs {
  display: flex; gap: .35rem; flex-wrap: wrap;
  margin-bottom: .7rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.fp-plan-tab {
  position: relative;
  background: var(--bg-muted); border: 1.5px solid var(--border);
  border-radius: 8px; padding: .35rem .65rem;
  font-size: .72rem; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.fp-plan-tab:hover { border-color: var(--accent); color: var(--accent); }
.fp-plan-tab.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(37,99,235,.2);
}
/* Star badge in top-right corner of ranked tab buttons */
.fp-plan-tab-star {
  position: absolute; top: -7px; right: -7px;
  width: 16px; height: 16px; border-radius: 50%;
  font-size: .58rem; font-weight: 900; line-height: 16px; text-align: center;
  cursor: default; pointer-events: none;
  z-index: 2;
  isolation: isolate;
}
.fp-plan-tab-star--gold   { background: #f59e0b; color: #fff; box-shadow: 0 3px 10px rgba(245,158,11,.42); }
.fp-plan-tab-star--silver { background: #9ca3af; color: #fff; box-shadow: 0 1px 4px rgba(156,163,175,.5); }
.fp-plan-tab-star--bronze { background: #cd7c3a; color: #fff; box-shadow: 0 1px 4px rgba(205,124,58,.4); }

/* ── Plan Panels ── */
.fp-plan-panel { display: none; }
.fp-plan-panel.active { display: block; }
.fp-plan-panel > * + * { margin-top: .82rem; }

.fp-plan-head {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  margin-bottom: .6rem;
}
.fp-plan-name {
  font-size: .95rem; font-weight: 800; color: var(--text-primary);
}
.fp-plan-badge {
  display: inline-block; font-size: .6rem; font-weight: 700;
  padding: .12rem .4rem; border-radius: 5px;
  background: var(--accent-light); color: var(--accent);
}
.fp-plan-tagline {
  font-size: .76rem; color: var(--text-secondary); font-style: italic;
  margin-left: .3rem;
}
/* Trading style chip (replaces star rating) */
.fp-plan-trading-style {
  display: inline-flex; align-items: center; gap: .22rem;
  margin-left: auto;
  padding: .16rem .5rem;
  border-radius: 100px;
  font-size: .6rem; font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}
.style-cons  { background: #f0fdf4; border-color: #86efac; color: #15803d; }
.style-swing { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.style-bal   { background: #fafafa; border-color: var(--border); color: var(--text-secondary); }
.style-mod   { background: #fef9c3; border-color: #fde68a; color: #92400e; }
.style-scalp { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.style-agg   { background: #fff1f2; border-color: #fca5a5; color: #b91c1c; }
/* Best plan rank badge in panel head */
.fp-plan-rank {
  position: relative;
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .16rem .52rem; border-radius: 100px;
  font-size: .58rem; font-weight: 800; border: 1.5px solid;
  white-space: nowrap;
  isolation: isolate;
}
.fp-plan-rank--gold   {
  background: linear-gradient(180deg, #fff9e8, #fff3cd);
  border-color: rgba(245,158,11,.72);
  color: #9a5506;
  box-shadow: 0 8px 18px rgba(245,158,11,.18);
}
.fp-plan-rank--silver { background: #f9fafb; border-color: #9ca3af; color: #4b5563; }
.fp-plan-rank--bronze { background: #fff7ed; border-color: #cd7c3a; color: #9a3412; }
/* DD converts badge */
.fp-plan-converts {
  display: inline-flex; align-items: center;
  padding: .14rem .4rem; border-radius: 100px;
  font-size: .58rem; font-weight: 700;
  background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46;
}

/* Plan key-value grid */
.fp-plan-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: .1rem 1.2rem;
  margin-bottom: 0;
  padding: .5rem .8rem;
  background: var(--bg-muted);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.fp-kv {
  display: flex; justify-content: space-between; align-items: center;
  padding: .3rem 0;
  border-bottom: 1px solid rgba(0,0,0,.04);
  font-size: .78rem;
}
.fp-kv:last-child { border-bottom: none; }
.fp-k {
  color: var(--text-muted); font-weight: 600; font-size: .7rem;
}
.fp-v {
  font-weight: 600; color: var(--text-primary);
}
.fp-v.accent  { color: var(--accent); font-weight: 700; }
.fp-v.success { color: var(--success); font-weight: 700; }
.fp-v.danger  { color: var(--danger); font-weight: 700; }
.fp-v.warn    { color: var(--warning); font-weight: 700; }

/* Profit target chips */
.fp-targets {
  display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .5rem;
}

/* ════════════════════════════════════════════════════════════
   SITE DIRECTORY
   ════════════════════════════════════════════════════════════ */
.section-header--compact {
  margin-bottom: 1.2rem;
}

.site-directory {
  padding: 1.4rem 1.25rem 2rem;
}

.site-directory-stack {
  display: grid;
  gap: 1.45rem;
}

.site-directory-card {
  padding: 1rem 1.1rem 1.3rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(248,245,238,0.92));
  box-shadow: var(--shadow-sm);
}

.site-directory-kicker {
  margin-bottom: .45rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-directory-text-links {
  margin: 0;
  font-size: .98rem;
  line-height: 2;
}

.site-directory-link {
  display: inline;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
  transition: color .16s ease;
}

.site-directory-text-links .site-directory-link:not(:last-child)::after {
  content: '\00a0\00b7';
  color: var(--text-muted);
  font-weight: 400;
  margin-left: .1rem;
}

.site-directory-separator {
  display: none;
}

.site-directory-link:hover,
.site-directory-link:focus-visible {
  color: var(--accent);
}

.audit-request-widget {
  padding: 1.15rem 1.1rem 1.25rem;
  border: 1px solid rgba(15,95,86,0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,244,238,0.96));
  box-shadow: var(--shadow-sm);
}

.audit-request-head {
  margin-bottom: .9rem;
}

.audit-request-kicker {
  margin-bottom: .18rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.audit-request-head h3 {
  margin: 0;
  font-size: 1rem;
}

.audit-request-form {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: .35rem;
}

.audit-request-input {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  height: 46px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(20,33,29,0.12);
  background: rgba(255,255,255,0.92);
  color: var(--text-primary);
  font: inherit;
}

.audit-request-input:focus {
  outline: none;
  border-color: rgba(15,95,86,0.34);
  box-shadow: 0 0 0 4px rgba(15,95,86,0.08);
}

.audit-request-btn {
  width: 100%;
  height: 46px;
  padding: 0 1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(15,95,86,0.96), rgba(18,47,43,0.96));
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.audit-request-btn:hover,
.audit-request-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15,23,42,0.12);
}

.audit-request-btn:disabled {
  opacity: .7;
  cursor: wait;
}

.audit-request-status {
  min-height: 1.2rem;
  margin-top: .55rem;
  font-size: .78rem;
  color: var(--text-secondary);
}

.audit-request-status[data-state="success"] {
  color: #0f766e;
}

.audit-request-status[data-state="error"] {
  color: #b42318;
}

.audit-request-log {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(20,33,29,0.08);
}

.audit-request-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .45rem;
}

.audit-request-log-title {
  font-size: .82rem;
  font-weight: 800;
  color: var(--text-primary);
}

.audit-request-total {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.audit-request-table-wrap {
  border: 1px solid rgba(20,33,29,0.08);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.76);
}

.audit-request-table {
  width: 100%;
  border-collapse: collapse;
}

.audit-request-table th,
.audit-request-table td {
  padding: .72rem .9rem;
  text-align: left;
  border-bottom: 1px solid rgba(20,33,29,0.06);
}

.audit-request-table th {
  background: rgba(247,244,238,0.96);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.audit-request-table tbody tr:last-child td {
  border-bottom: none;
}

.audit-request-table th:last-child,
.audit-request-table td:last-child {
  text-align: right;
}

.audit-request-domain {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.audit-request-count {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.audit-request-empty {
  font-size: .82rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 720px) {
  .audit-request-log-head,
  .audit-request-form {
    flex-direction: column;
    align-items: flex-start;
  }

  .audit-request-btn {
    width: 100%;
  }

  .audit-request-table th,
  .audit-request-table td {
    padding: .68rem .75rem;
  }
}
.fp-target-chip {
  display: inline-block; font-size: .62rem; font-weight: 700;
  padding: .14rem .4rem; border-radius: 5px;
  background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0;
}

/* Best/worst for */
.fp-plan-bw {
  display: flex; flex-direction: column; gap: .15rem;
  margin-bottom: 0;
  padding: .5rem .7rem;
  background: #fafbff; border-radius: var(--radius); border: 1px solid var(--border);
}
.fp-bw-best  { font-size: .78rem; color: var(--success); line-height: 1.5; }
.fp-bw-worst { font-size: .78rem; color: var(--warning); line-height: 1.5; }
.fp-bw-best strong, .fp-bw-worst strong { font-weight: 700; }
.fp-bw-best, .fp-bw-worst {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Plan pros/cons */
.fp-plan-pc {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.05rem;
  margin-bottom: 0;
  align-items: start;
}
.fp-pros, .fp-cons { min-width: 0; }
.fp-pc-title {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: .3rem;
}
.fp-pros-title { color: var(--success); }
.fp-cons-title { color: var(--danger); }
.fp-pc-list {
  list-style: none; padding: 0; margin: 0;
  font-size: .76rem; line-height: 1.6;
}
.fp-pc-list li {
  padding: .22rem 0;
  border-bottom: 1px solid rgba(0,0,0,.04);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-pc-list li:last-child { border-bottom: none; }

/* ── Funded Stage Pressure Panel ── */
.fp-pressure-panel {
  margin-top: 0;
  padding: .9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #fefefe 0%, #f8f9fc 100%);
}
.fp-pressure-head {
  display: flex; flex-direction: column; gap: .45rem;
  margin-bottom: .65rem;
}
.fp-pressure-title {
  font-size: .78rem; font-weight: 700; color: var(--fg);
}
.fp-pressure-rule-badges {
  display: flex; flex-wrap: wrap; gap: .3rem;
}
.fp-pr-badge {
  font-size: .58rem; font-weight: 600; padding: .18rem .55rem;
  border-radius: 999px; line-height: 1.3;
}
.fp-pr-badge em {
  font-style: normal; font-weight: 500; opacity: .7;
}
.fp-pr-badge--bd { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.fp-pr-badge--cr { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; }
.fp-pr-badge--md { background: #f0f9ff; color: #0369a1; border: 1px solid #7dd3fc; }
.fp-pr-badge--none { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
/* Meters */
.fp-pressure-meters {
  display: flex; flex-direction: column; gap: .6rem;
  margin-bottom: .7rem;
}
.fp-meter-label {
  font-size: .6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--fg-muted); margin-bottom: .2rem;
}
.fp-meter-bar-wrap {
  height: 10px; border-radius: 5px; background: #e9ecef;
  overflow: hidden;
}
.fp-meter-bar {
  height: 100%; border-radius: 5px; transition: width .4s ease;
}
/* Trading Pressure colors */
.fp-meter-bar--low { background: linear-gradient(90deg, #2ecc71, #58d68d); }
.fp-meter-bar--moderate { background: linear-gradient(90deg, #f39c12, #f7b731); }
.fp-meter-bar--high { background: linear-gradient(90deg, #e67e22, #e74c3c); }
.fp-meter-bar--extreme { background: linear-gradient(90deg, #c0392b, #8e1b1b); }
/* Survival colors */
.fp-meter-bar--sv-good { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.fp-meter-bar--sv-moderate { background: linear-gradient(90deg, #f39c12, #e67e22); }
.fp-meter-bar--sv-poor { background: linear-gradient(90deg, #e74c3c, #c0392b); }
.fp-meter-val {
  font-size: .6rem; font-weight: 600; margin-top: .15rem;
}
.fp-meter-val--low { color: #27ae60; }
.fp-meter-val--moderate { color: #e67e22; }
.fp-meter-val--high { color: #e74c3c; }
.fp-meter-val--extreme { color: #8e1b1b; }
.fp-meter-val--sv-good { color: #27ae60; }
.fp-meter-val--sv-moderate { color: #e67e22; }
.fp-meter-val--sv-poor { color: #e74c3c; }

/* Contributing Factors */
.fp-pressure-factors {
  border-top: 1px solid var(--border); padding-top: .55rem;
}
.fp-pressure-factors-title {
  font-size: .62rem; font-weight: 700; color: var(--fg-muted);
  text-transform: uppercase; letter-spacing: .4px;
  margin-bottom: .4rem;
}
.fp-pfactor {
  display: flex; align-items: flex-start; gap: .35rem;
  padding: .25rem .5rem; border-radius: 6px;
  font-size: .66rem; line-height: 1.45;
  margin-bottom: .2rem;
}
.fp-pfactor--good { background: #f0fdf4; color: #15803d; }
.fp-pfactor--bad { background: #fef2f2; color: #b91c1c; }
.fp-pfactor--neutral { background: #f8fafc; color: #475569; }
.fp-pfactor-icon { flex-shrink: 0; font-size: .7rem; }
.fp-pfactor-text { font-weight: 500; }

/* ── Drawdown Simulator ── */
.fp-dd-sim {
  margin-top: 0;
  padding: .9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #f8faff 0%, #f1f5fb 100%);
}
.fp-dd-sim-head {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin-bottom: .7rem;
}
.fp-dd-sim-title {
  font-size: .78rem; font-weight: 700; color: var(--fg);
}
.fp-dd-badges {
  display: flex; gap: .35rem; flex-wrap: wrap; margin-left: auto;
}
.fp-dd-badge {
  font-size: .6rem; font-weight: 600; padding: .18rem .55rem;
  border-radius: 999px; line-height: 1.3;
}
.fp-dd-badge--max { background: #fee; color: #c0392b; }
.fp-dd-badge--daily { background: #fff4e5; color: #e67e22; }
.fp-dd-badge--type { border: 1px solid var(--border); }
.fp-dd-badge--dynamic { background: #fef0f0; color: #e74c3c; border-color: #f5c6cb; }
.fp-dd-badge--static { background: #eafaf1; color: #27ae60; border-color: #b7e4c7; }
.fp-dd-badge--open-loss { background: #fff8e1; color: #b45309; border-color: #fcd34d; }
.fp-kv--open-loss .fp-k { color: #b45309; }
.fp-kv--open-loss .fp-v { grid-column: 1 / -1; white-space: normal; line-height: 1.45; }

/* Bar visualisation */
.fp-dd-bar-wrap {
  margin-bottom: .6rem;
}
.fp-dd-bar-labels {
  display: flex; justify-content: space-between;
  font-size: .55rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .4px; color: var(--fg-muted); margin-bottom: .2rem;
}
.fp-dd-bar-label--breach { color: #c0392b; }
.fp-dd-bar-label--start { color: #34495e; }
.fp-dd-bar-label--profit { color: #27ae60; }
.fp-dd-bar {
  position: relative; height: 22px; border-radius: 6px;
  background: #e9ecef; overflow: hidden;
  display: flex;
}
.fp-dd-bar-dd {
  background: linear-gradient(90deg, #e74c3c, #f39c9c);
  height: 100%; transition: width .15s;
}
.fp-dd-bar-balance {
  background: linear-gradient(90deg, #3498db, #74b9f0);
  height: 100%; transition: width .15s;
}
.fp-dd-bar-profit {
  background: linear-gradient(90deg, #2ecc71, #a3e4bf);
  height: 100%; transition: width .15s;
}
.fp-dd-bar-daily {
  position: absolute; top: 0; height: 100%;
  background: rgba(230, 126, 34, .28);
  border-left: 2px dashed #e67e22;
  border-right: 2px dashed #e67e22;
  pointer-events: none;
  transition: width .15s, left .15s;
}
.fp-dd-bar-vals {
  display: flex; justify-content: space-between;
  font-size: .6rem; font-weight: 600; color: var(--fg-muted);
  margin-top: .2rem;
}

.fp-dd-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem .7rem;
  margin-bottom: .72rem;
}
.fp-dd-legend-item {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  min-width: 0;
  padding: .55rem .62rem;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,.16);
  background: rgba(255,255,255,.66);
}
.fp-dd-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: .18rem;
}
.fp-dd-legend-copy {
  display: grid;
  gap: .12rem;
  min-width: 0;
}
.fp-dd-legend-copy strong {
  font-size: .63rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.fp-dd-legend-copy span {
  font-size: .66rem;
  line-height: 1.5;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.fp-dd-legend-item--breach .fp-dd-legend-swatch { background: #e74c3c; }
.fp-dd-legend-item--buffer .fp-dd-legend-swatch { background: #3498db; }
.fp-dd-legend-item--daily .fp-dd-legend-swatch { background: #f39c12; }
.fp-dd-legend-item--lock .fp-dd-legend-swatch { background: #8e44ad; }

/* Slider */
.fp-dd-controls {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin-bottom: .5rem;
}
.fp-dd-slider-label {
  font-size: .65rem; font-weight: 600; color: var(--fg-muted);
  white-space: nowrap;
}
.fp-dd-slider {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, #e74c3c 0%, #e9ecef 40%, #2ecc71 100%);
  outline: none; cursor: pointer;
}
.fp-dd-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  cursor: grab;
}
.fp-dd-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  cursor: grab;
}
.fp-dd-readout {
  display: flex; gap: .8rem; font-size: .68rem; font-weight: 600;
  color: var(--fg-muted);
}
.fp-dd-readout-danger { color: #e74c3c !important; }
.fp-dd-readout-warn { color: #e67e22 !important; }

/* DD info row */
.fp-dd-info-row {
  display: flex; align-items: center; gap: .6rem; padding: .1rem 0;
}
.fp-dd-payout-info {
  font-size: .62rem; color: var(--text-muted); line-height: 1.4;
}
.fp-dd-payout-info--breach { color: #e74c3c; font-weight: 600; }
.fp-dd-payout-info--warn { color: #e67e22; font-weight: 600; }
.fp-dd-payout-info--payout { color: #27ae60; font-weight: 600; }
.fp-dd-payout-outcome {
  margin-top: .38rem;
  padding: .55rem .7rem;
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(148,163,184,.14);
  font-size: .68rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.fp-dd-payout-outcome--warn {
  background: #fff7ed;
  border-color: #fdba74;
  color: #b45309;
}
.fp-dd-payout-outcome--breach {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
  font-weight: 700;
}
.fp-dd-payout-outcome--safe {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

/* Scenario chips */
.fp-dd-scenarios {
  margin-bottom: .6rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.fp-dd-sc-scroll {
  display: flex; gap: .35rem; padding-bottom: .25rem;
}
.fp-dd-sc-chip {
  flex-shrink: 0;
  font-size: .6rem; font-weight: 600;
  padding: .28rem .6rem; border-radius: 999px;
  background: var(--bg-muted); color: var(--fg);
  border: 1px solid var(--border);
  cursor: pointer; white-space: nowrap;
  transition: all .15s;
}
.fp-dd-sc-chip:hover {
  border-color: var(--accent); background: #eef4ff;
}
.fp-dd-sc-chip.active {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(59,130,246,.3);
}

/* Step box */
.fp-dd-step-box {
  margin-bottom: .6rem; padding: .65rem .8rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffbea 0%, #fff3cd 100%);
  border: 1px solid #f5d76e;
}
.fp-dd-step-text {
  font-size: .72rem; line-height: 1.55; color: #5a4e1e;
  margin-bottom: .45rem; font-weight: 500;
}
.fp-dd-step-nav {
  display: flex; align-items: center; gap: .5rem;
}
.fp-dd-step-prev, .fp-dd-step-next, .fp-dd-step-reset {
  font-size: .62rem; font-weight: 600;
  padding: .22rem .55rem; border-radius: 5px;
  border: 1px solid #d4a837; background: #fff;
  color: #5a4e1e; cursor: pointer;
  transition: all .12s;
}
.fp-dd-step-prev:hover:not(:disabled), .fp-dd-step-next:hover:not(:disabled) {
  background: #f5d76e; color: #3e3510;
}
.fp-dd-step-prev:disabled, .fp-dd-step-next:disabled {
  opacity: .35; cursor: default;
}
.fp-dd-step-reset {
  margin-left: auto; border-color: #e74c3c; color: #e74c3c; background: #fff;
}
.fp-dd-step-reset:hover { background: #fdecea; }
.fp-dd-step-counter {
  font-size: .6rem; font-weight: 700; color: #8a7620;
}

/* HWM marker */
.fp-dd-bar-hwm {
  position: absolute; top: -4px; bottom: -4px; width: 2.5px;
  background: #8e44ad; z-index: 2; border-radius: 2px;
  transition: left .2s;
}
.fp-dd-bar-hwm::after {
  content: 'HWM';
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  font-size: .45rem; font-weight: 800; color: #8e44ad;
  letter-spacing: .3px;
}

/* Payout log */
.fp-dd-payout-log {
  display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .45rem;
}
.fp-dd-plog-item {
  font-size: .58rem; font-weight: 600; color: #27ae60;
  background: #eafaf1; padding: .15rem .45rem;
  border-radius: 999px; border: 1px solid #b7e4c7;
}
.fp-dd-plog-total {
  font-size: .58rem; font-weight: 700; color: var(--accent);
  padding: .15rem .45rem; background: #eef4ff;
  border-radius: 999px; border: 1px solid #bcd4f7;
}

/* ── Hidden Rules ── */
.fp-rules-list {
  display: flex; flex-direction: column; gap: .5rem;
}
.fp-rule {
  padding: .7rem .9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  background: var(--bg-muted);
  transition: border-color .15s;
}
.fp-rule:hover { border-color: var(--accent); }
.fp-rule.sev-critical { border-left-color: var(--danger); background: #fef8f8; }
.fp-rule.sev-warning  { border-left-color: var(--warning); background: #fffef5; }
.fp-rule.sev-positive { border-left-color: var(--success); background: #f7fdf9; }
.fp-rule.sev-info     { border-left-color: var(--accent); background: #f8faff; }

.fp-rule-head {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  margin-bottom: .3rem;
}
.fp-rule-icon { font-size: .9rem; }
.fp-rule-sev {
  font-size: .65rem; font-weight: 700;
  white-space: nowrap;
}
.fp-rule-title {
  font-size: .82rem; font-weight: 700;
  color: var(--text-primary);
}
.fp-rule-detail {
  font-size: .78rem; color: var(--text-secondary); line-height: 1.6;
  margin: 0;
}
.fp-rule-impact {
  font-size: .72rem; color: var(--text-muted); margin-top: .25rem;
  font-style: italic;
}

/* ── Trader Suitability Grid ── */
.fp-suit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .5rem;
}
.fp-suit-card {
  padding: .7rem .8rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, border-color .15s;
  text-align: center;
}
.fp-suit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.fp-suit-card.suit-good { background: #f0fdf4; border-color: #bbf7d0; }
.fp-suit-card.suit-ok   { background: #fefce8; border-color: #fde68a; }
.fp-suit-card.suit-bad  { background: #fef2f2; border-color: #fecaca; }

.fp-suit-card.suit-good:hover { border-color: #16a34a; }
.fp-suit-card.suit-ok:hover   { border-color: #d97706; }
.fp-suit-card.suit-bad:hover  { border-color: #dc2626; }

.fp-suit-top {
  display: flex; align-items: center; justify-content: center;
  gap: .3rem; margin-bottom: .25rem;
}
.fp-suit-icon { font-size: 1rem; }
.fp-suit-label { font-size: .72rem; font-weight: 700; }
.fp-suit-rating {
  font-size: 1.3rem; font-weight: 900; line-height: 1.2;
}
.fp-suit-card.suit-good .fp-suit-rating { color: #15803d; }
.fp-suit-card.suit-ok .fp-suit-rating   { color: #a16207; }
.fp-suit-card.suit-bad .fp-suit-rating  { color: #dc2626; }
.fp-suit-rating span { font-size: .65rem; font-weight: 600; opacity: .6; }
.fp-suit-verdict {
  font-size: .66rem; color: var(--text-secondary); line-height: 1.4;
  margin-top: .15rem;
}

/* ── Flags ── */
.fp-flags-wrap {
  display: flex; flex-direction: column; gap: .8rem;
}
.fp-flags-label {
  font-size: .7rem; font-weight: 700; margin-bottom: .35rem;
  color: var(--text-secondary);
}
.fp-flag {
  font-size: .78rem; padding: .45rem .7rem;
  border-radius: 8px; line-height: 1.5;
  margin-bottom: .3rem;
}
.fp-flag.is-red   { background: #fef2f2; color: #991b1b; border-left: 3px solid #dc2626; }
.fp-flag.is-green { background: #f0fdf4; color: #166534; border-left: 3px solid #16a34a; }

/* ── Flag Carousel Strips ── */
.fp-flag-carousel {
  padding: .55rem 1.2rem;
  border-bottom: 1px solid var(--border);
}
.fp-flag-carousel--green {
  background: linear-gradient(90deg, #f0fdf4 0%, #f8fffe 100%);
}
.fp-flag-carousel--red {
  background: linear-gradient(90deg, #fef2f2 0%, #fff8f8 100%);
  border-bottom: 1px solid var(--border);
}
.fp-flag-carousel-label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: .45rem;
  user-select: none;
}
.fp-flag-carousel--green .fp-flag-carousel-label { color: #15803d; }
.fp-flag-carousel--red .fp-flag-carousel-label { color: #b91c1c; }
.fp-flag-carousel-icon { font-size: .85rem; }
.fp-count--red {
  background: #dc2626;
}
.fp-flag-track {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .25rem 0 .4rem;
}

/* Flag Cards (visual box style) */
.fp-flag-card {
  display: flex;
  flex-direction: column;
  flex: 0 1 185px;
  min-height: 90px;
  padding: .65rem .75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.fp-flag-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.fp-flag-card--green {
  background: #fff;
  border: 1.5px solid #bbf7d0;
}
.fp-flag-card--green:hover { border-color: #16a34a; }
.fp-flag-card--red {
  background: #fff;
  border: 1.5px solid #fecaca;
}
.fp-flag-card--red:hover { border-color: #dc2626; }

.fp-flag-card-top {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-bottom: .35rem;
}
.fp-flag-card-icon {
  font-size: 1rem;
  line-height: 1;
}
.fp-flag-card-cat {
  font-size: .58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 4px;
  padding: .08rem .35rem;
}
.fp-flag-card--green .fp-flag-card-cat {
  background: #dcfce7;
  color: #15803d;
}
.fp-flag-card--red .fp-flag-card-cat {
  background: #fee2e2;
  color: #b91c1c;
}
.fp-flag-card-title {
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .2rem;
}
.fp-flag-card--green .fp-flag-card-title { color: #166534; }
.fp-flag-card--red .fp-flag-card-title { color: #991b1b; }
.fp-flag-card-desc {
  font-size: .66rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-secondary);
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fp-flag-card .fp-flag-info {
  align-self: flex-end;
  margin-top: auto;
  padding-top: .25rem;
}

/* ── Flag 3-Step Dialog ── */
.flag-dlg-wrap { display: flex; flex-direction: column; }
.flag-dlg-tabs {
  display: flex;
  gap: .3rem;
  margin-bottom: .9rem;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: .55rem;
}
.flag-dlg-tab {
  padding: .38rem .82rem;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg-muted);
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .18s;
  letter-spacing: .01em;
}
.flag-dlg-tab:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.flag-dlg-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.22);
}
.flag-dlg-panels { min-height: 200px; }
.flag-dlg-panel { display: none; }
.flag-dlg-panel.active { display: block; }

/* Tab 1 — What it means */
.flag-what-cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: .3rem; }
.flag-what-title { font-size: 1rem; font-weight: 800; margin: 0 0 .5rem; line-height: 1.4; }
.flag-what-body { font-size: .88rem; line-height: 1.7; color: var(--text-primary); margin: 0 0 .75rem; }
.flag-impact-tag {
  display: inline-block; padding: .3rem .65rem;
  border-radius: 6px; font-size: .75rem; font-weight: 600; line-height: 1.5;
}
.flag-impact-tag--red   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flag-impact-tag--green { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* Tab 2 — Scenario */
.flag-scenario { display: flex; flex-direction: column; gap: .55rem; }
.fsc-step {
  padding: .5rem .75rem;
  border-radius: 8px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-size: .83rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text-primary);
}
.fsc-step--red  { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.fsc-step--green { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.fsc-outcome {
  margin-top: .3rem;
  padding: .5rem .75rem;
  border-radius: 8px;
  font-size: .83rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  letter-spacing: -.005em;
}
.fsc-outcome--red   { background: #fef2f2; border-color: #f87171; color: #991b1b; }
.fsc-outcome--green { background: #f0fdf4; border-color: #4ade80; color: #15803d; }

/* Scenario section dividers (A / B split) */
.fsc-scenario-divider {
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  padding: .3rem .6rem; border-radius: 6px; margin: .35rem 0 .1rem;
}
.fsc-scenario-divider--red   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.fsc-scenario-divider--green { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }

/* B-Book context block in "What it means" tab */
.flag-bbook-context {
  background: var(--bg-muted); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px; padding: .85rem 1rem; margin: .65rem 0;
  display: flex; flex-direction: column; gap: .55rem;
}
.flag-bbook-title {
  font-size: .72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; color: var(--accent);
}
.flag-bbook-context p {
  font-size: .82rem; line-height: 1.7; color: var(--text-secondary); margin: 0;
}
.flag-bbook-affected {
  display: flex; flex-direction: column; gap: .3rem;
  padding-top: .4rem; border-top: 1px solid var(--border);
}
.flag-bbook-at-risk {
  font-size: .73rem; color: #b91c1c;
}
.flag-bbook-safe {
  font-size: .73rem; color: #15803d;
}
.flag-sim { display: flex; flex-direction: column; gap: .6rem; }
.fsim-title {
  font-size: .82rem; font-weight: 700; color: var(--text-primary);
  padding-bottom: .35rem; border-bottom: 1px solid var(--border);
}
.fsim-table {
  width: 100%; border-collapse: collapse; font-size: .78rem;
}
.fsim-table th {
  padding: .35rem .5rem; text-align: left;
  background: var(--bg-muted); color: var(--text-muted);
  font-size: .66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .3px; border-bottom: 1px solid var(--border);
}
.fsim-table td {
  padding: .35rem .5rem; border-bottom: 1px solid rgba(0,0,0,.04);
  color: var(--text-primary); font-weight: 500;
}
.fsim-table tr:last-child td { border-bottom: none; }
.sim-pos { color: #15803d; font-weight: 700; }
.sim-neg { color: #dc2626; font-weight: 700; }
.sim-warn { color: #d97706; font-weight: 700; }
.fsim-note {
  font-size: .7rem; color: var(--text-muted); font-style: italic;
  padding-top: .2rem; border-top: 1px solid var(--border);
}

/* ── Interactive Flag Sim Outputs ── */
.fsim-out { display: flex; flex-direction: column; gap: .5rem; margin-top: .2rem; }
.fsim-bar-wrap { display: flex; height: 38px; border-radius: 9px; overflow: hidden; gap: 2px; }
.fsim-bar-seg {
  display: flex; align-items: center; justify-content: center;
  font-size: .62rem; font-weight: 700; color: #fff;
  transition: width .3s ease; overflow: hidden; min-width: 0;
}
.fsim-bar-you   { background: #16a34a; }
.fsim-bar-firm  { background: #d1d5db; color: #6b7280; }
.fsim-bar-defer { background: #f59e0b; }
.fsim-bar-long  { background: #2563eb; }
.fsim-bar-short { background: #7c3aed; }
.fsim-kv-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .7rem;
}
.fsim-kv2 { display: flex; flex-direction: column; gap: 1px; }
.fsim-k2  { font-size: .6rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .2px; }
.fsim-v2  { font-size: .8rem; font-weight: 700; color: var(--text-primary); }
.fsim-room-track { height: 8px; background: var(--bg-muted); border-radius: 4px; overflow: hidden; }
.fsim-room-fill  { height: 100%; border-radius: 4px; transition: width .35s ease; }
.fsim-room-fill.sim-pos  { background: #16a34a; }
.fsim-room-fill.sim-warn { background: #f59e0b; }
.fsim-room-fill.sim-neg  { background: #dc2626; }
.fsim-dd-story  { display: flex; flex-direction: column; gap: .22rem; }
.fsim-dd-step2  { font-size: .74rem; color: var(--text-secondary); line-height: 1.4; }
.fsim-bd-track  {
  position: relative; height: 10px; background: var(--bg-muted);
  border-radius: 5px; overflow: visible; margin-bottom: 1.6rem;
}
.fsim-bd-fill   { height: 100%; border-radius: 5px; transition: width .3s ease; }
.fsim-bd-pass   { background: #16a34a; }
.fsim-bd-fail   { background: #dc2626; }
.fsim-bd-limit  {
  position: absolute; top: -4px; bottom: -4px; width: 2px;
  background: #d97706; border-radius: 1px;
}
.fsim-bd-labels {
  position: relative; display: flex; justify-content: space-between;
  font-size: .6rem; color: var(--text-muted);
}
.fsim-alert {
  background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b;
  border-radius: 7px; padding: .45rem .65rem; font-size: .72rem; line-height: 1.45;
}
.fsim-warn-note {
  background: #fefce8; border: 1px solid #fde68a; color: #92400e;
  border-radius: 7px; padding: .45rem .65rem; font-size: .72rem; line-height: 1.45;
}
.fsim-ok-note {
  background: #f0fdf4; border: 1px solid #86efac; color: #15803d;
  border-radius: 7px; padding: .45rem .65rem; font-size: .72rem; line-height: 1.45;
}

/* ── Interactive Simulation Controls ── */
.isc-wrap { display: flex; flex-direction: column; gap: .6rem; }
.isc-controls {
  display: flex; flex-direction: column; gap: .45rem;
  background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: 10px; padding: .65rem .85rem;
}
.isc-control-row {
  display: flex; align-items: center; gap: .65rem;
}
.isc-label {
  font-size: .63rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: var(--text-muted);
  min-width: 130px; flex-shrink: 0;
}
.isc-input-row {
  display: flex; align-items: center; gap: .55rem; flex: 1;
}
.isc-range {
  flex: 1;
  height: 5px;
  accent-color: var(--accent);
  cursor: pointer;
  transition: opacity .15s;
}
.isc-range:hover { opacity: .9; }
.isc-val {
  font-size: .78rem; font-weight: 800; color: var(--accent);
  min-width: 72px; text-align: right; white-space: nowrap;
  letter-spacing: -.01em;
}
.isc-result { margin-top: .2rem; }
.isc-summary {
  display: flex; gap: .6rem; flex-wrap: wrap;
  padding: .4rem .5rem;
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  border-radius: 7px;
  margin-bottom: .4rem;
}
.isc-sum-item { font-size: .75rem; color: var(--text-primary); }

/* ════════════════════════════════════════════════════════════
   SCALE JOURNEY — Progress-bar simulation
   ════════════════════════════════════════════════════════════ */
.scj-wrap { display: flex; flex-direction: column; gap: .7rem; }

/* ── Selector buttons (account tiers + period) ── */
.scj-sel-row { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .25rem; }
.scj-sel-btn {
  padding: .28rem .62rem;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  font-size: .7rem; font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s cubic-bezier(.4,0,.2,1);
  user-select: none;
}
.scj-sel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(37,99,235,.06);
}
.scj-sel-btn--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.28);
}

/* ── Progress bar row ── */
.scj-bar-row {
  display: flex; align-items: center; gap: .6rem;
  margin: .1rem 0;
}
.scj-bar-step-label {
  font-size: .68rem; font-weight: 700; color: var(--text-muted);
  white-space: nowrap; min-width: 68px;
  letter-spacing: .01em;
}
.scj-bar-track {
  flex: 1; height: 9px;
  background: var(--bg-muted); border-radius: 5px; overflow: hidden;
  border: 1px solid var(--border);
}
.scj-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, #22c55e 100%);
  border-radius: 5px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.scj-bar-max-badge {
  font-size: .64rem; font-weight: 800; color: #16a34a;
  white-space: nowrap; padding: .18rem .5rem;
  background: #dcfce7; border-radius: 20px; border: 1px solid #86efac;
  letter-spacing: .04em;
}

/* ── Step pills row ── */
.scj-steps-row {
  display: flex; gap: .28rem; flex-wrap: wrap;
  margin-top: -.1rem;
}
.scj-step-btn {
  min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--bg-muted);
  font-size: .6rem; font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; justify-content: center;
}
.scj-step-btn:hover {
  border-color: var(--accent); color: var(--accent);
  background: rgba(37,99,235,.07);
  transform: scale(1.1);
}
.scj-step-btn--active {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.2);
  animation: milePulse .4s ease;
}
@keyframes milePulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,.5); }
  60%  { box-shadow: 0 0 0 9px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 3px rgba(37,99,235,.2); }
}
.scj-step-btn--max {
  background: #22c55e; border-color: #16a34a; color: #fff;
  font-size: .57rem; letter-spacing: .03em;
}
.scj-step-btn--max:hover {
  background: #16a34a; border-color: #15803d; color: #fff;
  transform: scale(1.1);
}
.scj-step-btn--active.scj-step-btn--max {
  background: #16a34a; border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(34,197,94,.3);
  animation: maxPulse .55s ease;
}
@keyframes maxPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
  60%  { box-shadow: 0 0 0 11px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 3px rgba(34,197,94,.3); }
}

/* Card */
.scj-card {
  background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem 1.1rem;
  transition: border-color .2s;
}
.scj-card-header {
  display: flex; align-items: center; gap: .65rem;
  margin-bottom: .75rem; flex-wrap: wrap;
}
.scj-card-step {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
}
.scj-card-acct {
  font-size: 1.55rem; font-weight: 800; color: var(--text-primary);
  line-height: 1; letter-spacing: -.02em;
}
.scj-card-badge {
  font-size: .63rem; font-weight: 700; padding: .22rem .55rem;
  border-radius: 20px; letter-spacing: .01em;
}
.scj-easy   { background: #dcfce7; color: #15803d; }
.scj-medium { background: #fef9c3; color: #92400e; }
.scj-hard   { background: #fee2e2; color: #b91c1c; }
.scj-card-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .55rem .9rem; margin-bottom: .7rem;
}
.scj-kv { display: flex; flex-direction: column; gap: 2px; }
.scj-k { font-size: .62rem; color: var(--text-muted); font-weight: 600; letter-spacing: .01em; }
.scj-v { font-size: .82rem; font-weight: 700; }
.scj-maxcap-badge {
  text-align: center; font-size: .74rem; font-weight: 700;
  color: #15803d; background: linear-gradient(135deg,#dcfce7,#f0fdf4);
  border: 1px solid #bbf7d0; border-radius: 8px;
  padding: .5rem .75rem; letter-spacing: .01em;
}
.scj-next {
  text-align: right; font-size: .7rem; color: var(--text-muted); font-style: italic;
}

/* ── Sources ── */
.fp-sources-list {
  display: flex; flex-direction: column; gap: .35rem;
}
.fp-source {
  background: var(--bg-muted); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .5rem .7rem;
  font-size: .72rem; line-height: 1.45;
}
.fp-source-field {
  font-size: .6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); margin-bottom: .1rem;
}
.fp-source-url {
  color: var(--accent); word-break: break-all;
  text-decoration: none; font-size: .7rem;
}
.fp-source-url:hover { text-decoration: underline; }
.fp-source-quote {
  color: var(--text-secondary); font-style: italic; font-size: .68rem;
  margin-top: .15rem; border-left: 2px solid var(--border-accent);
  padding-left: .4rem;
}

/* ── Recommendation & Confidence ── */
.fp-recommendation {
  background: var(--accent-light); border-top: 1px solid var(--border);
  padding: .9rem 1.5rem;
  font-size: .82rem; color: var(--text-secondary); line-height: 1.6;
}
.fp-recommendation strong { color: var(--accent); }
.fp-confidence {
  padding: .5rem 1.5rem;
  font-size: .7rem; color: var(--text-muted);
  border-top: 1px solid var(--border);
  text-align: right;
}
.fp-confidence strong { color: var(--text-primary); }

.view-simplified #compare .alert-banner,
.view-simplified #compare .fp-body,
.view-simplified #compare .fp-forbidden-strip,
.view-simplified #compare .fp-flag-carousel,
.view-simplified #compare .fp-recommendation,
.view-simplified #compare .fp-confidence {
  display: none;
}
.view-simplified #compare .fp-glance-strip {
  grid-template-columns: 1fr;
}
.view-simplified #compare .fp-glance-section {
  border-right: none;
  border-bottom: 1px solid var(--border);
}
.view-simplified #compare .fp-glance-section:last-child {
  border-bottom: none;
}
.view-simplified #compare .firm-panel {
  border-radius: 24px;
}

/* ── Info Button (ⓘ for sources/details) ── */
.info-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-size: .65rem; font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
  vertical-align: middle;
  padding: 0;
  line-height: 1;
}
.info-btn:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.1);
}

/* ════════════════════════════════════════════════════════════
   BADGES
   ════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: .18rem .5rem; border-radius: 999px;
  font-size: .68rem; font-weight: 600; white-space: nowrap;
}
.badge-danger  { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-warning { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-pure-a  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-info    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-neutral { background: var(--bg-muted); color: var(--text-secondary); border: 1px solid var(--border); }

/* ════════════════════════════════════════════════════════════
   INFO DIALOG — Fullscreen Modal
   ════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(15,23,42,0.55); backdrop-filter: blur(8px);
  display: flex; align-items: stretch; justify-content: stretch;
  padding: 0;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card); border: none;
  border-radius: 0; box-shadow: none;
  width: 100vw; max-width: 100vw;
  height: 100dvh; max-height: 100dvh;
  overflow: hidden;
  display: flex; flex-direction: column;
  transform: translateY(22px) scale(.99);
  opacity: 0;
  transition: transform .26s cubic-bezier(.22,1,.36,1), opacity .2s ease;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1.15rem 1.5rem .9rem; border-bottom: 1px solid var(--border);
  gap: 1rem; flex-shrink: 0;
  background: var(--bg-card);
}
.modal-close {
  background: var(--bg-muted); border: 1px solid var(--border);
  color: var(--text-secondary); border-radius: 10px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; font-size: 1rem;
  transition: color .15s, background .15s, border-color .15s;
}
.modal-close:hover { color: var(--text-primary); background: var(--border); border-color: var(--text-muted); }
.modal-body { padding: 1.5rem 1.6rem; flex: 1; overflow-y: auto; }

/* Modal firm bar — logo + name above dialog title */
.modal-firm-bar {
  display: flex; align-items: center; gap: .45rem; margin-bottom: .3rem;
}
.modal-firm-logo {
  width: 20px; height: 20px; border-radius: 4px; object-fit: contain; flex-shrink: 0;
}
.modal-firm-initials {
  width: 20px; height: 20px; border-radius: 4px; background: var(--accent);
  color: #fff; font-size: .6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.modal-firm-name {
  font-size: .7rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em;
}
.modal-dlg-title {
  font-size: 1.15rem; font-weight: 800; color: var(--text-primary);
  line-height: 1.25; letter-spacing: -.015em;
}

/* Make 3-tab flag dialogs fill the modal body height */
.modal-body .flag-dlg-wrap { display: flex; flex-direction: column; min-height: calc(100dvh - 120px); }
.modal-body .flag-dlg-panels { flex: 1; overflow-y: auto; }
.modal-body .flag-dlg-panel.active { min-height: 0; }

/* Dialog content styles */
.dlg-source-field {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); margin-bottom: .4rem;
}
.dlg-source-url {
  color: var(--accent); word-break: break-all;
  text-decoration: none; font-size: .82rem;
  display: block; margin-bottom: .6rem;
}
.dlg-source-quote {
  background: var(--bg-muted); border-left: 3px solid var(--accent);
  padding: .6rem .8rem; border-radius: 6px;
  font-size: .8rem; color: var(--text-secondary); line-height: 1.6;
  font-style: italic; margin: 0;
}

/* Dialog flag */
.dlg-flag-cat {
  display: inline-block;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: .12rem .4rem;
  border-radius: 4px;
  background: var(--bg-muted);
  color: var(--text-muted);
  margin-bottom: .5rem;
}

.dlg-suit-verdict {
  font-size: .92rem; font-weight: 700; color: var(--text-primary);
  margin-bottom: .6rem; line-height: 1.5;
}
.dlg-suit-reasons {
  padding-left: 1.2rem; margin: 0 0 .7rem;
  font-size: .82rem; color: var(--text-secondary); line-height: 1.65;
}
.dlg-suit-reasons li { margin-bottom: .2rem; }
.dlg-scenario {
  background: var(--bg-muted); border-radius: var(--radius);
  padding: .7rem .9rem; margin-bottom: .7rem;
  font-size: .8rem; line-height: 1.6;
}
.dlg-scenario strong { color: var(--text-primary); display: block; margin-bottom: .2rem; }
.dlg-scenario p { color: var(--text-secondary); margin: 0; font-style: italic; }
.dlg-suit-rules { margin-top: .5rem; }
.dlg-suit-rules strong {
  font-size: .72rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .04em; display: block; margin-bottom: .3rem;
}
.dlg-rule-tags {
  display: flex; flex-wrap: wrap; gap: .25rem;
}
.dlg-rule-tag {
  display: inline-block; font-size: .62rem; font-weight: 600;
  padding: .15rem .4rem; border-radius: 4px;
  background: var(--accent-light); color: var(--accent);
  border: 1px solid var(--border-accent);
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
footer {
  background: linear-gradient(180deg, rgba(255,253,249,0.76), rgba(243,238,228,0.92)); border-top: 1px solid rgba(20,33,29,0.08);
  padding: 2.6rem 2rem 2.2rem;
  text-align: center;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .45rem;
  color: var(--text-primary);
}
.footer-logo > span:last-child { color: var(--accent); }
.footer-logo-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #113c38 0%, var(--accent) 52%, #c46f2d 100%);
  color: #fff;
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .08em;
  box-shadow: 0 8px 20px rgba(15,95,86,0.16);
}
footer p { color: var(--text-muted); font-size: .74rem; margin-top: .25rem; }
.footer-links {
  display: flex; gap: 1.2rem; list-style: none;
  justify-content: center; margin: .8rem 0;
  flex-wrap: wrap;
}
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: .8rem; transition: color .2s; }
.footer-links a:hover { color: var(--accent); }

/* ── AI Chat Widget ──────────────────────────────────────────── */
.ai-chat-shell {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 1600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .9rem;
  pointer-events: none; /* shell bounding box must never block underlying touches */
}

/* Intercom-style compact icon launcher */
.ai-chat-launcher {
  display: none !important; /* FAB hidden — chat opened via top nav AI Chat button */
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease;
  pointer-events: auto; /* override shell's pointer-events: none */
}
.ai-chat-launcher:hover {
  transform: scale(1.07);
  box-shadow: 0 12px 38px rgba(15,95,86,0.48), 0 3px 10px rgba(0,0,0,0.2);
}
.ai-chat-launcher:active { transform: scale(.97); }

/* Online ping dot */
.ai-chat-launcher-ping {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #6ef5d0;
  border: 2px solid rgba(15,95,86,0.6);
  animation: ai-chat-pulse 2.4s infinite;
}

/* Chat icon */
.ai-chat-launcher-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Hide text label entirely — icon-only style */
.ai-chat-launcher-copy { display: none; }

/* Unread badge (shown when panel is closed and there's history) */
.ai-chat-launcher-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e44;
  color: #fff;
  font-size: .62rem;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.ai-chat-shell.has-unread .ai-chat-launcher-badge { display: inline-flex; }

/* Panel */
.ai-chat-panel {
  width: min(380px, calc(100vw - 1rem));
  max-height: min(560px, calc(100vh - 4.5rem));
  min-height: 360px;
  height: auto;
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto auto;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.72);
  background: #f5f2ed;
  box-shadow: 0 28px 72px rgba(14,30,27,0.26), 0 4px 18px rgba(14,30,27,0.10);
  opacity: 0;
  transform: translateY(16px) scale(.96);
  pointer-events: none;
  transition: opacity .22s ease, transform .28s cubic-bezier(.34,1.56,.64,1);
  transform-origin: bottom right;
}
.ai-chat-shell.is-open .ai-chat-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Panel header */
.ai-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .82rem .9rem .82rem 1rem;
  color: #fff;
  background: radial-gradient(ellipse at top left, rgba(255,255,255,0.18), transparent 60%),
              linear-gradient(140deg, #0d3e38 0%, #0f5f56 55%, #c57230 100%);
}
.ai-chat-head-left {
  display: flex;
  align-items: center;
  gap: .72rem;
  min-width: 0;
}
.ai-chat-head-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-chat-head-copy {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.ai-chat-head-kicker {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  opacity: .7;
}
.ai-chat-head-copy strong {
  font-family: var(--font-display);
  font-size: .97rem;
  letter-spacing: -.025em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-chat-head-sub {
  font-size: .72rem;
  opacity: .82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Header action buttons (clear + close) */
.ai-chat-head-actions {
  display: flex;
  align-items: center;
  gap: .34rem;
  flex-shrink: 0;
}
.ai-chat-head-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.88);
  font-size: .78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.ai-chat-head-btn:hover { background: rgba(255,255,255,0.24); color: #fff; }
.ai-chat-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.9);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.ai-chat-close:hover { background: rgba(255,255,255,0.26); }

/* Messages area */
.ai-chat-messages {
  overflow-y: auto;
  overflow-x: hidden;
  padding: .8rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  background: #f5f2ed;
  scroll-behavior: smooth;
}
.ai-chat-bubble {
  max-width: 84%;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.ai-chat-bubble--user { align-self: flex-end; }
.ai-chat-bubble--assistant { align-self: flex-start; }
.ai-chat-bubble-meta {
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(20,33,29,0.34);
  padding: 0 .35rem;
}
.ai-chat-bubble--user .ai-chat-bubble-meta { text-align: right; }
.ai-chat-bubble-body {
  padding: .82rem 1rem;
  border-radius: 18px;
  font-size: .875rem;
  line-height: 1.58;
  color: #1a2820;
  box-shadow: 0 2px 10px rgba(20,33,29,0.06);
}
.ai-chat-bubble--assistant .ai-chat-bubble-body {
  border-top-left-radius: 5px;
  background: #fff;
  border: 1px solid rgba(20,33,29,0.07);
}
.ai-chat-bubble--user .ai-chat-bubble-body {
  border-top-right-radius: 5px;
  color: #fff;
  background: linear-gradient(140deg, #0d3e38 0%, #0f5f56 65%, #1a7065 100%);
  box-shadow: 0 4px 16px rgba(15,95,86,0.28);
}
.ai-chat-bubble--typing .ai-chat-bubble-body { display: none; }
.ai-chat-typing {
  display: inline-flex;
  gap: .34rem;
  padding: .78rem .9rem;
  border-radius: 18px;
  border-top-left-radius: 5px;
  background: #fff;
  border: 1px solid rgba(20,33,29,0.07);
  box-shadow: 0 2px 10px rgba(20,33,29,0.06);
}
.ai-chat-typing span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(15,95,86,0.45);
  animation: ai-chat-bounce 1.1s infinite ease-in-out;
}
.ai-chat-typing span:nth-child(2) { animation-delay: .14s; }
.ai-chat-typing span:nth-child(3) { animation-delay: .28s; }

/* Suggestion chips */
.ai-chat-suggestions {
  display: flex;
  gap: .42rem;
  overflow-x: auto;
  padding: .42rem .85rem .58rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-top: 1px solid rgba(20,33,29,0.05);
  background: rgba(255,255,255,0.6);
}
.ai-chat-suggestions::-webkit-scrollbar { display: none; }
.ai-chat-suggestion {
  flex: 0 0 auto;
  border: 1.5px solid rgba(15,95,86,0.14);
  border-radius: 999px;
  padding: .48rem .88rem;
  background: #fff;
  color: #1a2820;
  font-size: .74rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.ai-chat-suggestion:hover {
  border-color: rgba(15,95,86,0.36);
  background: rgba(15,95,86,0.05);
}
.ai-chat-suggestion:active { transform: scale(.96); }

/* Input form */
.ai-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  align-items: end;
  padding: .58rem .85rem .72rem;
  border-top: 1px solid rgba(20,33,29,0.07);
  background: #fff;
}
.ai-chat-input {
  min-height: 48px;
  max-height: 140px;
  resize: none;
  border: 1.5px solid rgba(15,95,86,0.13);
  border-radius: 16px;
  padding: .78rem .9rem;
  background: #f5f2ed;
  color: #1a2820;
  font: inherit;
  font-size: 16px; /* MUST be ≥16px — iOS Safari zooms viewport on focus if smaller */
  line-height: 1.46;
  transition: border-color .15s, box-shadow .15s;
  -webkit-text-size-adjust: 100%;
}
.ai-chat-input::placeholder { color: rgba(20,33,29,0.36); }
.ai-chat-input:focus {
  outline: none;
  border-color: rgba(15,95,86,0.34);
  box-shadow: 0 0 0 3px rgba(15,95,86,0.09);
  background: #fff;
}
.ai-chat-send {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: none;
  border-radius: 15px;
  background: linear-gradient(145deg, #0d3e38 0%, #0f5f56 65%, #c57230 100%);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(15,95,86,0.28);
  transition: transform .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
}
.ai-chat-send:hover { transform: scale(1.06); box-shadow: 0 8px 24px rgba(15,95,86,0.34); }
.ai-chat-send:active { transform: scale(.95); }
.ai-chat-send svg { display: block; }

@keyframes ai-chat-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(110,245,208,0.6); }
  70%  { box-shadow: 0 0 0 9px rgba(110,245,208,0); }
  100% { box-shadow: 0 0 0 0 rgba(110,245,208,0); }
}
@keyframes ai-chat-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .4; }
  40%           { transform: translateY(-4px); opacity: 1; }
}

/* Mobile: shell + panel go fullscreen when open */
@media (max-width: 1024px) {
  /* Shell expands to cover full viewport — already position:fixed so just reset offsets */
  .ai-chat-shell.is-open {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100dvh;
    align-items: stretch;   /* panel fills width */
    justify-content: flex-end;
    gap: 0;
  }

  /* Panel fills the shell — no fixed-inside-fixed tricks */
  .ai-chat-shell.is-open .ai-chat-panel {
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: none;
    transform: none;
    box-shadow: none;
  }

  /* Tighten internal gutters on mobile so the layout feels edge-to-edge */
  .ai-chat-shell.is-open .ai-chat-head {
    gap: .5rem;
    padding: calc(.6rem + env(safe-area-inset-top, 0px)) .7rem .6rem;
  }
  .ai-chat-shell.is-open .ai-chat-head-left {
    gap: .6rem;
  }
  .ai-chat-shell.is-open .ai-chat-head-avatar,
  .ai-chat-shell.is-open .ai-chat-head-btn,
  .ai-chat-shell.is-open .ai-chat-close {
    width: 44px;
    height: 44px;
  }
  .ai-chat-shell.is-open .ai-chat-messages {
    padding: .7rem;
    gap: .65rem;
  }
  .ai-chat-shell.is-open .ai-chat-bubble {
    max-width: 92%;
  }
  .ai-chat-shell.is-open .ai-chat-bubble-body {
    padding: .76rem .88rem;
  }
  .ai-chat-shell.is-open .ai-chat-suggestions {
    gap: .42rem;
    padding: .45rem .7rem .55rem;
  }
  .ai-chat-shell.is-open .ai-chat-suggestion {
    padding: .42rem .72rem;
  }
  .ai-chat-shell.is-open .ai-chat-form {
    gap: .5rem;
    padding: .55rem .7rem calc(.7rem + env(safe-area-inset-bottom, 0px));
  }
  .ai-chat-shell.is-open .ai-chat-input {
    padding: .72rem .8rem;
  }

  /* Safe area: header clears notch, form clears home indicator */
  .ai-chat-head {
    padding-top: calc(.85rem + env(safe-area-inset-top, 0px));
  }
  .ai-chat-form {
    padding-bottom: calc(.9rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Backdrop overlay — shown on mobile when chat is open */
.ai-chat-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1599;
  background: rgba(14,30,27,0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
@media (max-width: 1024px) {
  .ai-chat-backdrop { display: block; }
  .ai-chat-backdrop.is-visible { opacity: 1; pointer-events: auto; }
}

/* AI Chat — custom confirm dialog */
.ai-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(14,30,27,0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: ai-confirm-fadein .18s ease;
}
.ai-confirm-box {
  background: #fff;
  border-radius: 22px;
  padding: 1.8rem 1.6rem 1.5rem;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(14,30,27,0.22), 0 4px 16px rgba(14,30,27,0.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  animation: ai-confirm-scalein .22s cubic-bezier(.34,1.56,.64,1);
}
.ai-confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(196,114,48,0.10);
  color: #c47230;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-confirm-msg {
  font-size: .94rem;
  line-height: 1.52;
  color: var(--text-primary);
  font-weight: 500;
}
.ai-confirm-actions {
  display: flex;
  gap: .7rem;
  width: 100%;
}
.ai-confirm-btn {
  flex: 1;
  height: 46px;
  border: none;
  border-radius: 13px;
  font: inherit;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .14s, box-shadow .14s;
}
.ai-confirm-btn:hover { transform: scale(1.02); }
.ai-confirm-btn:active { transform: scale(.97); }
.ai-confirm-btn--cancel {
  background: rgba(20,33,29,0.07);
  color: var(--text-secondary);
}
.ai-confirm-btn--cancel:hover { background: rgba(20,33,29,0.11); }
.ai-confirm-btn--ok {
  background: linear-gradient(140deg, #c24133 0%, #e05545 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(194,65,51,0.26);
}
.ai-confirm-btn--ok:hover { box-shadow: 0 8px 22px rgba(194,65,51,0.34); }
@keyframes ai-confirm-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes ai-confirm-scalein {
  from { transform: scale(.88); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ════════════════════════════════════════════════════════════
   BOTTOM NAV (mobile only)
   ════════════════════════════════════════════════════════════ */
.bottom-nav {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  /* Offset body so content doesn't hide behind the bar */
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    z-index: 110;
    height: calc(64px + env(safe-area-inset-bottom, 0px));
    padding: 0 6px env(safe-area-inset-bottom, 0px);
    align-items: stretch;
    justify-content: space-around;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,245,238,0.97));
    border-top: 1px solid rgba(255,255,255,0.82);
    border-radius: 0;
    box-shadow: 0 -8px 28px rgba(20,33,29,0.07);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }

  /* Sliding active indicator */
  .bottom-nav-indicator {
    position: absolute;
    top: 0;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: var(--accent);
    pointer-events: none;
  }

  .bottom-nav-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .22rem;
    padding: .48rem .2rem .52rem;
    text-decoration: none;
    color: rgba(20,33,29,0.42);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: color .2s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  .bottom-nav-item.is-active {
    color: var(--accent);
  }

  .bottom-nav-label {
    line-height: 1;
  }

  /* Push ai-chat FAB up to clear the bottom nav (only when NOT open) */
  .ai-chat-shell:not(.is-open) {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  /* Push compare FAB up too */
  .compare-mobile-fab {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

.policy-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 7.5rem 1.25rem 4rem;
}
.policy-card {
  padding: 1.4rem 1.35rem;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.78);
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(249,245,238,0.97));
  box-shadow: 0 18px 40px rgba(20,33,29,0.07);
}
.policy-kicker {
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .4rem;
}
.policy-card h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -.05em;
  margin-bottom: .75rem;
}
.policy-updated {
  font-size: .76rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}
.policy-card section + section {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(20,33,29,0.08);
}
.policy-card h2 {
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: .42rem;
}
.policy-card p,
.policy-card li {
  font-size: .86rem;
  line-height: 1.75;
  color: var(--text-secondary);
}
.policy-card ul {
  margin-left: 1.1rem;
}
.policy-card a {
  color: var(--accent);
}

/* ════════════════════════════════════════════════════════════
   SCROLLBAR + UTILITY
   ════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.hidden { display: none !important; }
.text-accent  { color: var(--accent); }
.text-danger  { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.firm-cell { display: flex; align-items: center; gap: .6rem; }
.firm-logo {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800; color: var(--accent); flex-shrink: 0;
  background: var(--accent-light); border: 1px solid var(--border-accent);
}

/* Spinner */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid rgba(37,99,235,.2);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Input field */
.checker-input {
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(20,33,29,0.08);
  border-radius: 14px;
  padding: .6rem .85rem;
  color: var(--text-primary);
  font-size: .88rem;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.checker-input::placeholder { color: var(--text-muted); }
.checker-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15,95,86,.08);
}

/* ════════════════════════════════════════════════════════════
   ADMIN FAB + OVERLAY
   ════════════════════════════════════════════════════════════ */
.admin-fab {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 1000;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #0d7669 100%); color: #fff;
  border: none;
  font-size: 1.4rem; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 28px rgba(15,95,86,.26);
  transition: transform .15s, box-shadow .15s;
}
.admin-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 16px 34px rgba(15,95,86,.34);
}

.admin-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.3);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.admin-overlay.open { opacity: 1; pointer-events: all; }

.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(440px, 92vw);
  box-shadow: var(--shadow-lg);
  transform: translateY(12px);
  transition: transform .2s;
}
.admin-overlay.open .admin-panel { transform: translateY(0); }

.admin-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.admin-panel-title { font-size: .92rem; font-weight: 700; color: var(--text-primary); }
.admin-panel-body { padding: 1.1rem; }
.admin-panel-sub { font-size: .76rem; color: var(--text-muted); margin-bottom: .9rem; line-height: 1.55; }

.admin-field { display: flex; flex-direction: column; gap: .3rem; }
.admin-label {
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted);
}

.admin-status {
  margin-top: .7rem;
  padding: .65rem .85rem;
  border-radius: var(--radius);
  font-size: .78rem;
  line-height: 1.5;
  border: 1px solid transparent;
}
.admin-status--running { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.admin-status--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.admin-status--error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ════════════════════════════════════════════════════════════
   TOAST
   ════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 4rem; right: 1.5rem;
  z-index: 3000;
  max-width: 280px;
  padding: .6rem .9rem;
  border-radius: var(--radius);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.toast-show { opacity: 1; transform: translateY(0); }
.toast-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.toast-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.toast-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body::before,
  body::after { display: none; }
  body.compare-mobile-open {
    overflow: hidden;
  }
  .firms-carousel-wrapper { overflow-x: clip; }
  .firms-grid { gap: .8rem; padding-bottom: 1.1rem; }
  nav {
    top: 8px;
    left: 10px;
    right: 10px;
    height: 54px;
    padding: 0 .8rem;
    border-radius: 18px;
  }
  .nav-logo { font-size: .84rem; min-width: 0; }
  .nav-logo-icon { width: 30px; height: 30px; font-size: .72rem; border-radius: 10px; }
  .nav-main {
    position: static;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
    width: auto;
    margin-left: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    overflow: visible;
  }
  .nav-main::before { display: none; }
  .nav-links {
    display: none; /* bottom nav handles section navigation on mobile */
  }
  .nav-links li:nth-child(2) {
    display: none;
  }
  .nav-links a {
    padding: .48rem .72rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.88);
    border: 1px solid rgba(15,95,86,0.10);
    font-size: .67rem;
    font-weight: 800;
    color: var(--accent-dim);
    box-shadow: 0 8px 16px rgba(20,33,29,0.06);
  }
  .nav-links a::after { display: none; }
  .nav-menu-toggle {
    display: none !important;
  }
  section { padding: 3rem 10px; }
  .section-header { margin-bottom: 2rem; }
  .section-title { font-size: clamp(1.35rem, 8vw, 2rem); }
  .section-sub { font-size: .82rem; }
  .hero { min-height: auto; padding: 5.8rem 10px 2.8rem; }
  .hero-shell { grid-template-columns: 1fr; grid-template-rows: none; gap: 1rem; min-height: auto; }
  .hero-content { padding: .35rem; text-align: center; }
  .hero-badge { font-size: .58rem; padding: .34rem .72rem; letter-spacing: .08em; }
  .hero-kicker { font-size: .62rem; margin-bottom: .62rem; }
  .hero h1 { font-size: clamp(2rem, 11vw, 3rem); line-height: .98; }
  .hero-br { display: block; }
  .hero-lead { font-size: .84rem; max-width: 34ch; margin: 0 auto 1.5rem; }
  .hero-visual {
    min-height: auto;
    padding: .25rem 0 0;
    overflow: visible;
  }
  .hero-plan-carousel {
    min-height: auto;
    padding: .84rem;
    border-radius: 24px;
  }
  .hero-plan-carousel-head strong {
    font-size: 1rem;
  }
  .hero-plan-card {
    padding: .82rem;
    border-radius: 20px;
  }
  .ranking-shell {
    padding: .82rem;
    border-radius: 20px;
  }
  .ranking-head {
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
  }
  .ranking-head strong {
    font-size: .88rem;
  }
  .ranking-table {
    overflow-x: auto;
  }
  .ranking-header-row--firm,
  .ranking-row--firm {
    min-width: 980px;
  }
  .ranking-header-row--plan,
  .ranking-row--plan {
    min-width: 900px;
  }
  .hero-plan-firm {
    font-size: .98rem;
  }
  .hero-plan-name {
    font-size: .8rem;
  }
  .hero-plan-summary {
    font-size: .7rem;
  }
  .hero-plan-btn {
    width: 32px;
    height: 32px;
  }
  .hero-stage {
    min-height: 360px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 132px minmax(0, 1fr);
    gap: .65rem;
    padding: .35rem 0 1rem;
    align-items: center;
  }
  .hero-stage::before {
    inset: 12% 3% 12% 3%;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255,255,255,0.54), rgba(255,255,255,0.14));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.72), 0 26px 44px rgba(20,33,29,0.07);
  }
  .hero-stage-core {
    min-height: 0;
    margin: 0;
    z-index: 3;
    align-self: center;
  }
  .hero-path {
    padding: .78rem;
    border-radius: 24px;
    box-shadow: 0 22px 42px rgba(20,33,29,0.08);
  }
  .hero-path--trap {
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,248,244,0.92));
  }
  .hero-path--win {
    background: linear-gradient(180deg, rgba(241,255,249,0.98), rgba(248,255,252,0.94));
    box-shadow: 0 24px 48px rgba(15,95,86,0.13);
  }
  .hero-path-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: .72rem;
  }
  .hero-path-head strong {
    font-size: .82rem;
    line-height: 1.05;
  }
  .hero-path-chip {
    padding: .3rem .54rem;
    font-size: .5rem;
    letter-spacing: .14em;
  }
  .hero-path-track {
    gap: .62rem;
  }
  .hero-node {
    padding: .72rem .64rem;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: .5rem;
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(20,33,29,0.07);
  }
  .hero-node-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    font-size: .78rem;
  }
  .hero-node-label {
    font-size: .76rem;
    line-height: 1.08;
  }
  .hero-node-note {
    margin-top: .18rem;
    font-size: .56rem;
    line-height: 1.35;
  }
  .hero-connector {
    min-height: 28px;
  }
  .hero-connector-line {
    width: 3px;
    min-height: 28px;
  }
  .hero-path-footer {
    margin-top: .72rem;
    padding-top: .62rem;
  }
  .hero-path-footer span { font-size: .5rem; }
  .hero-core-rings {
    width: 112px;
    height: 112px;
    margin: -56px 0 0 -56px;
    box-shadow:
      0 0 0 16px rgba(15,95,86,0.04),
      0 0 0 30px rgba(196,111,45,0.04);
  }
  .hero-core-card {
    max-width: 132px;
    margin: 0 auto;
    padding: .82rem .6rem;
    border-radius: 24px;
    box-shadow: 0 22px 44px rgba(20,33,29,0.10);
  }
  .hero-core-label {
    font-size: .44rem;
    letter-spacing: .16em;
  }
  .hero-core-title {
    font-size: .76rem;
    margin: .42rem 0 .58rem;
  }
  .hero-core-tags {
    gap: .28rem;
  }
  .hero-core-tags span {
    font-size: .44rem;
    padding: .26rem .4rem;
    background: rgba(15,95,86,0.09);
  }
  .btn-primary, .btn-secondary { padding: .72rem 1rem; font-size: .66rem; }
  .hero-stats { gap: .55rem; grid-template-columns: 1fr 1fr 1fr; padding: .55rem; margin-top: .4rem; border-radius: 18px; }
  .hero-stat { padding: .72rem .78rem; border-radius: 14px; }
  .hero-stat-num { font-size: 1.28rem; }
  .hero-stat-label { font-size: .56rem; }
  .impact-grid { grid-template-columns: 1fr; gap: .85rem; }
  .impact-card { padding: 1rem; border-radius: 22px; }
  .impact-lanes { grid-template-columns: 1fr; }
  .impact-lane { padding: .9rem; border-radius: 18px; }
  .impact-card-head h3 { font-size: 1.16rem; }
  .impact-step-top span { font-size: .96rem; }
  .impact-step-top strong { font-size: .72rem; }
  .impact-rule-copy strong { font-size: .82rem; }
  .impact-rule-copy span,
  .impact-summary p,
  .impact-note { font-size: .72rem; }
  #compare { padding-bottom: 2rem; }

  /* ── Mobile Bottom Sheet System ── */
  .compare-mobile-shell {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0s .35s;
  }
  .compare-mobile-shell.is-visible,
  .compare-mobile-shell.is-open,
  .compare-mobile-shell.is-collapsed {
    visibility: visible;
    pointer-events: none;
    transition: visibility 0s;
  }

  /* Scrim / backdrop */
  .compare-mobile-backdrop {
    position: fixed;
    inset: 0;
    border: none;
    background: rgba(15,22,20,0.32);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s cubic-bezier(.4,0,.2,1);
    z-index: 0;
  }
  .compare-mobile-shell.is-open .compare-mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .compare-mobile-shell.is-collapsed .compare-mobile-backdrop {
    opacity: 0;
    pointer-events: none;
  }
  .compare-mobile-shell.is-collapsed .compare-deck {
    transform: translateY(100%);
    pointer-events: none;
  }
  .compare-mobile-shell.is-collapsed .compare-mobile-sheet-head,
  .compare-mobile-shell.is-collapsed .compare-mobile-close,
  .compare-mobile-shell.is-collapsed .compare-mobile-grab {
    pointer-events: none;
  }

  /* FAB — circular search icon */
  .compare-mobile-fab {
    position: fixed;
    right: 1.1rem;
    bottom: 1.2rem;
    left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 6px 20px rgba(15,95,86,0.32), 0 2px 6px rgba(15,95,86,0.12);
    pointer-events: auto;
    z-index: 1;
    transition: opacity .25s ease, transform .25s ease, box-shadow .2s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .compare-mobile-fab:active {
    transform: scale(0.92);
    box-shadow: 0 3px 12px rgba(15,95,86,0.28);
  }
  .compare-mobile-fab svg {
    flex-shrink: 0;
  }
  .compare-mobile-shell.is-open .compare-mobile-fab {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.8);
  }

  /* Sheet container */
  .compare-deck {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    grid-template-columns: 1fr;
    gap: .65rem;
    padding: 0 1rem 1.2rem;
    margin-bottom: 0;
    border-radius: 20px 20px 0 0;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.7);
    background: var(--bg-secondary);
    box-shadow: 0 -8px 40px rgba(20,33,29,0.12);
    max-height: 88dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 2;
    pointer-events: auto;
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
  }
  .compare-deck::before { display: none; }
  .compare-deck::after { display: none; }
  .compare-deck::-webkit-scrollbar { display: none; }

  .compare-mobile-shell.is-open .compare-deck {
    transform: translateY(0);
  }

  /* Sheet header with grab handle */
  .compare-mobile-sheet-head {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .5rem 0 .6rem;
    background: var(--bg-secondary);
    z-index: 4;
    flex-wrap: wrap;
  }

  .compare-mobile-grab {
    width: 36px;
    height: 4px;
    margin: .15rem auto .4rem;
    border: none;
    border-radius: 999px;
    background: rgba(20,33,29,0.18);
    cursor: grab;
    touch-action: none;
    flex: 0 0 100%;
    -webkit-tap-highlight-color: transparent;
  }
  .compare-mobile-grab:active { background: rgba(20,33,29,0.28); }

  .compare-mobile-sheet-copy {
    display: flex;
    flex-direction: column;
    gap: .06rem;
    flex: 1 1 auto;
    min-width: 0;
  }
  .compare-mobile-sheet-kicker {
    font-size: .56rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--accent);
  }
  .compare-mobile-sheet-copy strong {
    font-size: .78rem;
    line-height: 1.15;
    color: var(--text-primary);
  }

  /* Close / collapse button */
  .compare-mobile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(20,33,29,0.08);
    background: rgba(20,33,29,0.04);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background .15s ease;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .compare-mobile-close:active {
    background: rgba(20,33,29,0.1);
  }
  .compare-mobile-close-icon {
    position: relative;
    display: block;
    width: 14px;
    height: 14px;
  }
  .compare-mobile-close-icon::before,
  .compare-mobile-close-icon::after {
    content: '';
    position: absolute;
    left: 1px;
    right: 1px;
    top: 50%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .2s ease;
  }
  .compare-mobile-close-icon::before {
    transform: translateY(-50%) rotate(45deg);
  }
  .compare-mobile-close-icon::after {
    transform: translateY(-50%) rotate(-45deg);
  }
  .compare-panel {
    padding: 1rem;
    border-radius: 20px;
    box-shadow: none;
  }
  .compare-panel--search,
  .compare-panel--style {
    background-size: cover;
  }
  .compare-panel--search {
    min-height: 0;
  }
  .compare-panel-head h3 { font-size: 1.12rem; }
  .compare-panel-head p,
  .compare-filter-summary { font-size: .72rem; }
  .compare-match-grid {
    display: flex;
    gap: .6rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: .2rem;
  }
  .compare-match-grid::-webkit-scrollbar { display: none; }
  .compare-match-col {
    min-width: calc(100vw - 2.4rem);
    scroll-snap-align: start;
    border-radius: 4px;
    padding: .82rem;
  }
  .compare-search-box {
    min-height: 64px;
    padding: .92rem 1rem;
    border-radius: 16px;
  }
  .compare-chip-group { gap: .4rem; }
  .compare-chip-row { gap: .28rem; }
  .compare-chip, .compare-hint-chip {
    font-size: .58rem;
    padding: .22rem .52rem;
    width: auto;
    justify-content: center;
  }
  .compare-deck-footer {
    display: block;
  }
  .compare-filter-summary {
    min-height: 52px;
    padding-right: 1rem;
    border-radius: 14px;
  }
  .compare-clear-btn {
    position: static;
    height: 42px;
    min-height: 42px;
    padding: 0 1rem;
    font-size: .68rem;
    border-radius: 10px;
    flex: 0 0 auto;
  }
  .compare-footer-actions {
    display: flex;
    gap: .5rem;
    margin-top: .6rem;
  }
  .compare-view-results {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    flex: 1 1 0;
    padding: .62rem .8rem;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-family: var(--font);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(15,95,86,0.2);
    transition: background .15s ease, transform .1s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .compare-view-results:active {
    transform: scale(0.97);
    background: var(--accent-dim);
  }
  .compare-view-results-icon {
    flex-shrink: 0;
    opacity: .85;
  }
  .compare-match-panel { padding: 0; }
  .compare-match-head { font-size: .68rem; }
  .compare-match-list { min-height: 0; }
  .filter-btn { font-size: .68rem; padding: .4rem .7rem; }
  .search-box { border-radius: 14px; padding: .58rem .82rem; }
  .search-box input { font-size: .76rem; }
  .alert-banner p { font-size: .72rem; }
  .compare-view-toggle {
    justify-content: space-between;
  }
  .compare-view-btn {
    flex: 1 1 0;
    text-align: center;
  }
  .firms-grid .firm-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 0 0 auto;
  }
  .firm-panel {
    max-width: 100%;
    border-radius: 24px;
  }
  .carousel-btn { width: 36px; height: 36px; font-size: .95rem; }
  .fp-stats-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
  }
  .fp-stat {
    padding: .62rem .16rem;
    border-right: none;
  }
  .fp-stat-val { font-size: .74rem; }
  .fp-stat-label {
    font-size: .46rem;
    letter-spacing: .26px;
  }
  .fp-header { flex-direction: column; align-items: flex-start; gap: .7rem; }
  .fp-header-right {
    align-self: flex-start;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }
  .fp-header-left, .fp-identity, .fp-meta,
  .fp-section, .fp-section-head, .fp-section-content, .fp-section-body,
  .fp-plan-panel, .fp-pressure-panel, .fp-dd-sim, .fp-pay-card,
  .fp-scale-item, .fp-glance-trader-item, .fp-kv,
  .scale-dlg-row, .isc-control-row, .isc-input-row,
  .scj-bar-row, .pysim-flow-step {
    min-width: 0;
    max-width: 100%;
  }
  .fp-meta span, .fp-meta a,
  .fp-kv, .fp-glance-trader-item, .fp-pay-item,
  .fp-pay-story-text, .fp-dd-payout-info {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .fp-legal-row {
    width: 100%;
  }
  .fp-ai-inline {
    font-size: .64rem;
  }
  .fp-hdr-chip { font-size: .58rem; padding: .15rem .4rem; }
  .fp-ai-score-chip {
    width: 100%;
    justify-content: space-between;
  }
  .fp-hdr-chip, .fp-rule-sev, .fp-dd-slider-label,
  .scj-bar-step-label, .scj-bar-max-badge {
    white-space: normal;
  }
  .fp-glance-strip { grid-template-columns: 1fr; }
  .fp-donut-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .28rem;
    width: 100%;
  }
  .fp-donut-wrap {
    min-width: 0;
    gap: .08rem;
  }
  .fp-donut { width: 44px; height: 44px; }
  .fp-donut-val { font-size: 10px; }
  .fp-donut-label { font-size: .44rem; letter-spacing: .22px; }
  .fp-donut-sub { font-size: .5rem; }
  .fp-glance-section { border-right: none; border-bottom: 1px solid var(--border); }
  .fp-glance-section:last-child { border-bottom: none; }
  .fp-forbidden-grid { grid-template-columns: 1fr; }
  .fp-section-head { padding: .7rem 1rem; }
  .fp-section-content, .fp-section-body { padding: 0 1rem 1rem; }
  .fp-field-grid { grid-template-columns: 1fr; }
  .fp-section-content--payout { padding-top: .85rem; }
  .fp-payout-tabs { margin-bottom: .8rem; }
  .fp-pay-hero { grid-template-columns: 1fr; }
  .fp-pay-highlight-grid { grid-template-columns: 1fr; }
  .fp-pay-grid { grid-template-columns: 1fr; }
  .fp-pay-item { flex-direction: column; gap: .25rem; }
  .fp-pay-item-value { max-width: 100%; text-align: left; }
  .fp-pay-story { grid-template-columns: 1fr; }
  .fp-plan-grid { grid-template-columns: 1fr; }
  .fp-plan-pc { grid-template-columns: 1fr; }
  .fp-plan-tabs,
  .flag-dlg-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .2rem;
  }
  .fp-plan-tabs::-webkit-scrollbar,
  .flag-dlg-tabs::-webkit-scrollbar { display: none; }
  .fp-plan-tab, .flag-dlg-tab { flex: 0 0 auto; }
  .fp-name { font-size: 1rem; }
  .fp-meta span, .fp-meta a { font-size: .64rem; }
  .fp-stat { padding: .72rem .35rem; }
  .fp-stat-val { font-size: .82rem; }
  .fp-stat-label { font-size: .54rem; }
  .fp-dd-sim-head { flex-direction: column; align-items: flex-start; }
  .fp-dd-badges {
    margin-left: 0;
    flex-wrap: wrap;
    max-width: 100%;
  }
  .fp-dd-legend { grid-template-columns: 1fr; }
  .fp-dd-controls { flex-direction: column; align-items: stretch; }
  .fp-dd-readout {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .35rem .6rem;
  }
  .fp-dd-info-row { flex-direction: column; align-items: flex-start; }
  .fp-dd-payout-outcome { padding: .5rem .6rem; }
  .fp-dd-bar-labels {
    flex-wrap: wrap;
    gap: .2rem .55rem;
  }
  .fp-dd-step-nav { flex-wrap: wrap; }
  .fp-dd-step-reset { margin-left: 0; }
  .fp-dd-sc-scroll { padding-bottom: .35rem; }
  .fp-pressure-panel { padding: .7rem .8rem; }
  .fp-pfactor { font-size: .6rem; }
  .fp-pressure-rule-badges {
    gap: .2rem;
    flex-wrap: wrap;
    max-width: 100%;
  }
  .fp-pr-badge { font-size: .52rem; }
  .scale-dlg-row,
  .isc-control-row,
  .scj-bar-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .isc-controls {
    padding: .7rem .8rem;
    gap: .38rem;
  }
  .scale-dlg-k,
  .isc-label,
  .scj-bar-step-label {
    min-width: 0;
  }
  .isc-label {
    width: 100%;
    font-size: .58rem;
    letter-spacing: .06em;
  }
  .isc-input-row { width: 100%; }
  .isc-val { min-width: 56px; }
  .scj-sel-row,
  .scj-steps-row { max-width: 100%; }
  .pysim-btn-row { gap: .24rem; }
  .pysim-btn {
    padding: .24rem .5rem;
    font-size: .63rem;
  }
  .pysim-flow {
    padding: .55rem;
    gap: .2rem;
  }
  .pysim-flow-step {
    flex: 1 1 120px;
    min-width: 0;
  }
  .pysim-flow-val { font-size: .82rem; }
  .pysim-flow-sub,
  .pysim-flow-label,
  .pysim-myth-a,
  .pysim-issue { font-size: .62rem; }
  .pysim-myth,
  .pysim-issues { padding: .5rem .62rem; }
  .pysim-myth-q,
  .pysim-scenarios-title,
  .pysim-issues-title { font-size: .66rem; }
  .fp-suit-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .fp-recommendation, .fp-confidence { padding-left: 1rem; padding-right: 1rem; }
  .fp-recommendation { font-size: .72rem; }
  .fp-confidence { font-size: .62rem; }
  .modal-body, .modal-header { padding: .9rem; }
  .toast { right: .8rem; max-width: calc(100vw - 1.6rem); }
  footer { padding: 2rem 1rem 1.7rem; }
  .footer-logo { font-size: .9rem; }
  .footer-links a, footer p { font-size: .69rem; }
}
@media (max-width: 480px) {
  nav { height: 50px; }
  .nav-logo-wordmark {
    gap: .18rem;
    font-size: .8rem;
  }
  .nav-links {
    gap: .3rem;
  }
  .nav-links a {
    padding: .42rem .58rem;
    font-size: .6rem;
  }
  section { padding: 2.4rem 10px; }
  .hero { padding-top: 5.25rem; }
  .hero-badge { margin-bottom: 1rem; }
  .hero h1 { font-size: clamp(1.72rem, 9.5vw, 2.3rem); }
  .hero-lead { font-size: .76rem; }
  .hero-focus { padding: .72rem .82rem; }
  .hero-stage {
    grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr);
    gap: .5rem;
    min-height: 320px;
    padding-bottom: .7rem;
  }
  .hero-stage::before {
    inset: 13% 1% 13% 1%;
    border-radius: 28px;
  }
  .hero-path {
    padding: .68rem;
    border-radius: 20px;
  }
  .hero-path-head { margin-bottom: .8rem; }
  .hero-path-head strong { font-size: .8rem; }
  .hero-path-chip { font-size: .56rem; }
  .hero-node {
    padding: .62rem .56rem;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: .44rem;
  }
  .hero-node-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
  }
  .hero-node-label { font-size: .7rem; }
  .hero-node-note { font-size: .52rem; }
  .hero-connector,
  .hero-connector-line {
    min-height: 24px;
  }
  .hero-core-card {
    max-width: 104px;
    padding: .7rem .48rem;
  }
  .hero-core-title { font-size: .66rem; }
  .hero-core-tags {
    gap: .34rem;
  }
  .hero-core-tags span {
    font-size: .4rem;
    padding: .24rem .32rem;
  }
  .hero-plan-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .42rem;
  }
  .hero-plan-metric {
    min-width: 0;
    padding: .52rem .56rem;
  }
  .hero-plan-metric-label,
  .hero-plan-metric-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hero-plan-metric-value {
    font-size: .8rem;
  }
  .hero-plan-open {
    width: 100%;
    justify-self: stretch;
    text-align: center;
  }
  .hero-stats { grid-template-columns: 1fr; }
  .btn-primary, .btn-secondary { padding: .64rem .9rem; font-size: .6rem; }
  .impact-card { padding: .88rem; }
  .impact-card-head h3 { font-size: 1.02rem; }
  .impact-step-top { align-items: center; }
  .impact-step-top span { font-size: .88rem; }
  .impact-step-top strong { font-size: .68rem; }
  .impact-rule-copy span,
  .impact-summary p,
  .impact-note { font-size: .68rem; }
  .compare-panel { padding: .82rem; }
  .compare-deck {
    max-height: 90dvh;
    padding: 0 .85rem 1rem;
    border-radius: 18px 18px 0 0;
  }
  .compare-mobile-fab {
    right: .85rem;
    bottom: .85rem;
    width: 48px;
    height: 48px;
  }
  .compare-panel-head h3 { font-size: 1rem; }
  .compare-match-panel {
    padding: .82rem;
    border-radius: 14px;
  }
  .compare-match-head,
  .compare-match-empty {
    border-radius: 10px;
  }
  .compare-match-list {
    border-radius: 10px;
    min-height: 0;
  }
  .compare-match-chip {
    width: 100%;
    justify-content: center;
  }
  .compare-search-box {
    min-height: 62px;
    padding: .82rem .9rem;
  }
  .compare-search-box input { font-size: .86rem; }
  .compare-deck-footer {
    display: grid;
    gap: .55rem;
  }
  .compare-filter-summary {
    min-height: 0;
    padding: .8rem .85rem;
    border-radius: 10px;
  }
  .compare-clear-btn {
    position: static;
    min-height: 38px;
    height: 38px;
    padding: 0 .8rem;
    font-size: .62rem;
    border-radius: 8px;
  }
  .compare-view-results {
    font-size: .66rem;
    padding: .55rem .7rem;
    border-radius: 8px;
  }
  }
  .compare-chip-row { gap: .34rem; }
  .compare-chip, .compare-hint-chip { width: auto; justify-content: center; }
  .filter-btn { font-size: .64rem; }
  .alert-banner { padding: .82rem .88rem; }
  .alert-banner p { font-size: .68rem; }
  .firms-grid { gap: .65rem; }
  .firms-grid .firm-panel,
  .firm-panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 0 0 auto;
  }
  .fp-stats-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .fp-stat { padding: .56rem .08rem; }
  .fp-stat-val { font-size: .68rem; }
  .fp-stat-label { font-size: .42rem; }
  .fp-suit-grid { grid-template-columns: 1fr 1fr; }
  .fp-plan-tabs { gap: .25rem; }
  .fp-plan-tab { font-size: .65rem; padding: .28rem .45rem; }
  .flag-dlg-tab {
    padding: .32rem .68rem;
    font-size: .66rem;
  }
  .fp-header { padding: .9rem; }
  .fp-rank-chip,
  .fp-ai-score-chip {
    width: 100%;
  }
  .fp-ai-inline strong {
    font-size: .68rem;
  }
  .fp-hdr-chip { font-size: .54rem; padding: .13rem .35rem; }
  .fp-section-head { padding: .62rem .82rem; }
  .fp-section-content, .fp-section-body { padding: 0 .82rem .82rem; }
  .fp-pay-highlight-value { font-size: .82rem; }
  .fp-pay-card-title { font-size: .74rem; }
  .fp-pay-item-label, .fp-pay-item-value, .fp-pay-story-text { font-size: .66rem; }
  .fp-hdr-chip, .fp-dd-sc-chip, .scj-sel-btn, .scj-step-btn { font-size: .56rem; }
  .isc-controls {
    padding: .65rem .7rem;
    border-radius: 14px;
  }
  .isc-control-row { gap: .34rem; }
  .pysim-btn-row { margin-top: .1rem; }
  .pysim-btn {
    padding: .22rem .46rem;
    font-size: .6rem;
    border-radius: 16px;
  }
  .pysim-flow {
    padding: .48rem;
    border-radius: 9px;
  }
  .pysim-flow-step { flex-basis: 100px; }
  .pysim-flow-arrow {
    width: 100%;
    padding-top: 0;
    text-align: center;
  }
  .pysim-flow-val { font-size: .76rem; }
  .pysim-flow-sub,
  .pysim-flow-label,
  .pysim-myth-a,
  .pysim-issue { font-size: .6rem; }
  .pysim-myth-q,
  .pysim-scenarios-title,
  .pysim-issues-title { font-size: .64rem; }
  .modal-close { width: 30px; height: 30px; }
}
