﻿/* â”€â”€ VARIABLES â”€â”€ */
@font-face {
  font-family: 'Inter';
  src: url('assets/inter-var.woff2') format('woff2-variations'),
       url('assets/inter-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:       #0d1117;
  --surface:  #161b27;
  --surface2: #1e2438;
  --border:   #252d42;
  --text:     #e2e8f0;
  --muted:    #64748b;
  --green:    #a855f7;
  --red:      #e74c3c;
  --yellow:   #f59e0b;
  --blue:     #3b82f6;
  --radius:   12px;
  --font:     'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --fs-display: 3rem;
  --fs-h1:      2rem;
  --fs-h2:      1.5rem;
  --fs-h3:      1.15rem;
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-xs:      0.75rem;

  --nav-h: 64px;
  --content-max: 1120px;
}

/* â”€â”€ RESET â”€â”€ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 10000;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ══════════════ ROUTES VISIBILITY ══════════════ */
.site-route { display: none; }
.site-route.active { display: block; }

/* ══════════════ SITE NAV ══════════════ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 850;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 1.5rem;
  height: var(--nav-h);
  background: rgba(13, 17, 23, 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  flex-shrink: 0;
}
.site-logo { flex-shrink: 0; }
.site-wordmark {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.site-nav-links {
  display: flex;
  gap: 0.2rem;
  flex: 1;
  margin-left: 1rem;
}
.site-nav-links a {
  padding: 0.5rem 0.9rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.site-nav-links a:hover { color: var(--text); background: var(--surface2); }
.site-nav-links a.active { color: var(--green); }
.site-nav-cta { flex-shrink: 0; }
.site-cta {
  padding: 0.55rem 1.2rem !important;
  font-size: 0.9rem !important;
}
.site-hamburger {
  display: none;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 0;
}
.site-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ══════════════ SITE DRAWER (mobile) ══════════════ */
.site-drawer {
  position: fixed;
  inset: 0;
  z-index: 1050;
  pointer-events: none;
}
.site-drawer[aria-hidden="false"] { pointer-events: auto; }
.site-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.site-drawer[aria-hidden="false"] .site-drawer-backdrop { opacity: 1; }
.site-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--bg);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0));
  gap: 0.25rem;
}
.site-drawer[aria-hidden="false"] .site-drawer-panel { transform: translateX(0); }
.site-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.site-drawer-panel a {
  color: var(--text);
  text-decoration: none;
  padding: 0.85rem 0.5rem;
  font-size: 1.02rem;
  font-weight: 600;
  border-radius: 8px;
}
.site-drawer-panel a.active { color: var(--green); background: var(--surface2); }
.site-drawer-panel a:active { background: var(--surface2); }
body.site-drawer-open { overflow: hidden; }

/* ══════════════ HERO / LANDING ══════════════ */
.hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-kicker {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(168, 85, 247, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero-title {
  font-size: clamp(2rem, 4.5vw, var(--fs-display));
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1.1rem;
  color: var(--text);
}
.hero-title .accent { color: var(--green); }
.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1.75rem;
  max-width: 540px;
}
.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.btn-xl {
  padding: 0.85rem 1.6rem !important;
  font-size: 1rem !important;
  border-radius: 10px !important;
}
.hero-proof {
  font-size: var(--fs-small);
  color: var(--muted);
  opacity: 0.85;
}
.hero-mock {
  position: relative;
}
.hero-mock-card {
  background: linear-gradient(135deg, var(--surface), var(--surface2));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(168, 85, 247, 0.15);
}
.hero-mock-bar {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.hero-mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.hero-mock-dot.red { background: var(--red); }
.hero-mock-dot.yellow { background: var(--yellow); }
.hero-mock-dot.green { background: var(--green); }
.hero-mock-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.hero-mock-kpis div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}
.hero-mock-kpis small {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.hero-mock-kpis strong {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hero-mock-kpis strong.red { color: var(--red); }
.hero-mock-kpis strong.muted { color: var(--muted); }
.hero-mock-chart {
  width: 100%;
  height: 90px;
  display: block;
}

/* Landing sections */
.landing-section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.landing-header {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.landing-header h2 {
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.landing-header p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: #000;
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}
.step-card h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.step-card p { color: var(--muted); line-height: 1.55; }

.firm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.firm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  position: relative;
}
.firm-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.12);
}
.firm-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}
.firm-card p {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.firm-card small {
  color: var(--muted);
  font-size: var(--fs-small);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.metric-label {
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  margin-bottom: 0.5rem;
}
.metric-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.who-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}
.who-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.005em;
}
.who-card p {
  color: var(--muted);
  line-height: 1.55;
}
.who-card p em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.landing-final-cta {
  max-width: 680px;
  margin: 2rem auto 5rem;
  padding: 3.5rem 1.5rem;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(168, 85, 247, 0.12), transparent 60%);
  border-radius: 20px;
}
.landing-final-cta h2 {
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.landing-final-cta p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
}
.landing-final-cta .hero-cta { justify-content: center; }

/* ══════════════ PAGE-NARROW (about, faq, changelog) ══════════════ */
.page-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}
.page-header {
  margin-bottom: 2.5rem;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}
.page-sub {
  color: var(--muted);
  font-size: 1.1rem;
}
.page-section {
  margin-bottom: 2rem;
}
.page-section h2 {
  font-size: var(--fs-h2);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}
.page-section p {
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 0.85rem;
}
.page-section strong { color: var(--text); }
.page-section em { color: var(--muted); font-style: italic; }
.page-section a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
  transition: border-color 0.15s;
}
.page-section a:hover { border-color: var(--green); }

.page-disclaimer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--yellow);
}
.page-disclaimer h2 { color: var(--yellow); }
.page-disclaimer p { color: var(--muted); font-size: 0.95rem; }

/* ══════════════ FAQ ══════════════ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 1.15rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  transition: background 0.15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--surface2); }
.faq-chev {
  color: var(--muted);
  transition: transform 0.2s;
  font-weight: 400;
}
.faq-item[open] .faq-chev { transform: rotate(180deg); }
.faq-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ══════════════ CHANGELOG ══════════════ */
.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
}
.changelog-item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}
.changelog-item::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 1.4rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
  transform: translateX(-50%);
}
.changelog-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.changelog-meta strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.01em;
}
.changelog-meta span {
  font-size: var(--fs-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.changelog-body {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.changelog-body li {
  color: var(--muted);
  line-height: 1.55;
  padding-left: 1.2rem;
  position: relative;
}
.changelog-body li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 800;
}

/* ══════════════ WIKI ══════════════ */
.wiki-layout {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}
.wiki-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}
.wiki-sidebar h2 {
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding: 0 0.5rem;
}
.wiki-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.wiki-nav-item {
  background: transparent;
  border: none;
  color: var(--muted);
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-family: var(--font);
  transition: all 0.15s;
  border-left: 2px solid transparent;
}
.wiki-nav-item:hover { color: var(--text); background: var(--surface2); }
.wiki-nav-item.active {
  color: var(--green);
  background: rgba(168, 85, 247, 0.08);
  border-left-color: var(--green);
  font-weight: 600;
}
.wiki-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem 2.25rem;
  line-height: 1.65;
  min-height: 400px;
}
.wiki-content h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.wiki-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 1.75rem 0 0.75rem;
  color: var(--text);
}
.wiki-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
}
.wiki-content p {
  color: var(--text);
  margin-bottom: 0.85rem;
}
.wiki-content a {
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
}
.wiki-content a:hover { border-color: var(--green); }
.wiki-content code {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85em;
  color: var(--green);
}
.wiki-content pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  margin: 1rem 0;
}
.wiki-content pre code {
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0;
  font-size: 0.85rem;
}
.wiki-content ul, .wiki-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.wiki-content li { margin-bottom: 0.35rem; color: var(--text); }
.wiki-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}
.wiki-content th, .wiki-content td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.wiki-content th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wiki-content blockquote {
  border-left: 3px solid var(--green);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--muted);
  font-style: italic;
  background: rgba(168, 85, 247, 0.03);
  border-radius: 0 6px 6px 0;
}
.wiki-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}
.wiki-loading {
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding: 3rem;
}

/* ══════════════ FOOTER ══════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 2rem;
}
.site-footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 2fr 1.4fr;
  gap: 2rem;
  align-items: start;
}
.site-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}
.site-footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s;
}
.site-footer-links a:hover { color: var(--text); }
.site-footer-legal {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: right;
}
.site-footer-copy {
  font-size: 0.78rem;
  opacity: 0.7;
}

/* ══════════════ TOUR OVERLAY ══════════════ */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.tour-overlay[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
}
.tour-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 15, 0.78);
  backdrop-filter: blur(2px);
}
.tour-spotlight {
  position: absolute;
  border-radius: 10px;
  box-shadow:
    0 0 0 4px rgba(168, 85, 247, 0.6),
    0 0 0 9999px rgba(5, 8, 15, 0.78);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  display: none;
}
.tour-tooltip {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  max-width: 420px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 2001;
}
.tour-step-indicator {
  font-size: var(--fs-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 0.5rem;
}
.tour-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.tour-body {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.15rem;
}
.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.tour-nav {
  display: flex;
  gap: 0.5rem;
}
body.tour-active { overflow: hidden; }

/* ══════════════ APP route body chrome ══════════════ */
body[data-route="app"] .app-content {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
body[data-route="app"] > header:not(.site-nav) {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ══════════════ RESPONSIVE tweaks non-mobile ══════════════ */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 3rem 1.5rem 2rem; }
  .hero-mock { max-width: 420px; }
  .step-grid,
  .firm-grid,
  .metric-grid,
  .who-grid { grid-template-columns: 1fr 1fr; }
  .site-footer-inner { grid-template-columns: 1fr; }
  .site-footer-legal { text-align: left; }
}
@media (max-width: 768px) {
  .site-nav-links { display: none; }
  .site-nav-cta { display: none; }
  .site-hamburger { display: flex; }
  .site-nav { padding: 0 1rem; }
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-sidebar {
    position: static;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  .wiki-sidebar nav {
    flex-direction: row;
    gap: 0.4rem;
  }
  .wiki-nav-item {
    white-space: nowrap;
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0.85rem;
  }
  .wiki-nav-item.active { border-left: none; border-bottom-color: var(--green); }
  .wiki-content { padding: 1.5rem 1.25rem; }
}
@media (max-width: 640px) {
  .step-grid,
  .firm-grid,
  .metric-grid,
  .who-grid { grid-template-columns: 1fr; gap: 1rem; }
  .hero-title { font-size: 2rem; }
  .hero-cta .btn-xl { width: 100%; }
  .landing-final-cta .hero-cta { flex-direction: column; }
  .landing-final-cta .hero-cta .btn-xl { width: 100%; }
  .page-narrow { padding: 2rem 1rem 4rem; }
  .tour-tooltip { max-width: calc(100vw - 24px); }
}

/* â”€â”€ HEADER â”€â”€ */
header {
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.header-left h1 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -0.02em;
}
.subtitle {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

/* â”€â”€ FIRM SELECTOR â”€â”€ */
.firm-selector {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.firm-selector label {
  display: flex;
  flex-direction: column;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  gap: 0.25rem;
}
.firm-selector select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.88rem;
  outline: none;
  cursor: pointer;
  min-width: 130px;
}
.firm-selector select:focus { border-color: var(--green); }

/* â”€â”€ MAIN â”€â”€ */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* â”€â”€ CARDS â”€â”€ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.card-header h2 { font-size: 0.95rem; font-weight: 600; }
.card-header h3 { font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); }

/* â”€â”€ BADGE â”€â”€ */
.badge {
  font-size: 0.7rem;
  background: var(--green);
  color: #000;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 700;
  white-space: nowrap;
}

/* â”€â”€ PARAMS SECTION â”€â”€ */
.params-section { padding: 1.25rem 1.5rem; }

.params-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.param-group label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.input-wrap {
  position: relative;
}
.input-wrap input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 2.4rem 0.5rem 0.7rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.input-wrap input:focus { border-color: var(--green); }
.input-wrap .unit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: var(--muted);
  pointer-events: none;
}

/* â”€â”€ EV BAR â”€â”€ */
.ev-bar {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  align-items: center;
}
.ev-bar .sep { color: var(--border); }
.ev-bar .positive { color: var(--green); font-weight: 600; }
.ev-bar .negative { color: var(--red); font-weight: 600; }
#rrDisplay, #dailyEVDisplay { color: var(--muted); }
#beWRDisplay { font-size: 0.82rem; font-weight: 600; }
#beWRDisplay.be-ok   { color: var(--green); }
#beWRDisplay.be-warn { color: var(--red); }
.ev-toggles {
  display: flex;
  gap: 0.75rem;
  margin-left: auto;
}
.comm-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.comm-toggle input[type="checkbox"] { accent-color: var(--green); cursor: pointer; }

/* â”€â”€ TAB BAR â”€â”€ */
.tab-bar {
  display: flex;
  gap: 0.5rem;
}
.tab-btn {
  padding: 0.55rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: var(--font);
  transition: all 0.15s;
}
.tab-btn.active {
  background: var(--green);
  color: #000;
  border-color: var(--green);
  font-weight: 700;
}
.tab-btn:not(.active):hover { border-color: var(--green); color: var(--text); }

/* â”€â”€ TAB CONTENT â”€â”€ */
.tab-content { display: none; flex-direction: column; gap: 1.25rem; }
.tab-content.active { display: flex; }

/* â”€â”€ RUN BAR â”€â”€ */
.run-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.rules-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}
.pill {
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  white-space: nowrap;
}
.pill.accent  { border-color: var(--green); color: var(--green); }
.pill.warn    { border-color: var(--yellow); color: var(--yellow); }
.pill.danger  { border-color: var(--red); color: var(--red); }
.pill.comm    { border-color: #7b8cde; color: #7b8cde; }

/* â”€â”€ TOOLTIP INFO â”€â”€ */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  cursor: default;
  position: relative;
  margin-left: 4px;
  vertical-align: middle;
}
.info-icon .tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.6;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  width: 270px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  white-space: normal;
  z-index: 100;
  pointer-events: none;
}
.info-icon:hover .tooltip,
.info-icon:focus .tooltip { display: block; }

.payout-target-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}
.payout-target-group input,
.payout-target-group select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
}
.payout-target-group input {
  width: 56px;
  text-align: center;
  -moz-appearance: textfield;
}
.payout-target-group input::-webkit-outer-spin-button,
.payout-target-group input::-webkit-inner-spin-button { -webkit-appearance: none; }
.payout-target-group input:focus,
.payout-target-group select:focus { border-color: var(--green); }
.payout-target-group select { cursor: pointer; }

.btn-primary {
  padding: 0.6rem 1.4rem;
  background: var(--green);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { opacity: 0.72; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--green); color: #000; }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

/* â”€â”€ OVERLAY BAR â”€â”€ */
.overlay-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}
.overlay-legend {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
}
.overlay-empty { color: var(--muted); font-style: italic; font-size: 0.78rem; }
.overlay-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
}
.overlay-remove {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.1rem;
}
.overlay-remove:hover { color: var(--red); }

/* â”€â”€ MODAL â”€â”€ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden { display: none; }
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  min-width: 440px;
  max-width: 90vw;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.modal-content h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--green);
}
.modal-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.modal-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.modal-row select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.86rem;
  outline: none;
  cursor: pointer;
}
.modal-row select:focus { border-color: var(--green); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* â”€â”€ COMPARE TAB â”€â”€ */
.compare-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.compare-row {
  display: grid;
  grid-template-columns: 14px 1fr 1fr 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.compare-row select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}
.compare-row select:focus { border-color: var(--green); }
.compare-row .dot { width: 10px; height: 10px; }
.cmp-remove {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.cmp-remove:hover { border-color: var(--red); color: var(--red); }

.compare-strategy-bar {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.compare-strategy-bar .payout-target-group {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}
.compare-strategy-bar label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

/* â”€â”€ COMPARE RESULTS â”€â”€ */
.kpi-grid-multi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.firm-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.firm-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
}
.firm-label .dot { width: 10px; height: 10px; }
.firm-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.firm-kpis .kpi-card {
  padding: 0.6rem 0.75rem;
  background: var(--surface);
}
.firm-kpis .kpi-value { font-size: 1.05rem; }

.rank-table tbody tr.ranked-1 td:first-child { color: var(--green); font-weight: 700; }
.rank-table tbody tr.ranked-1 { border-left: 3px solid var(--green); }
.rank-table tbody tr.ranked-2 { border-left: 3px solid var(--yellow); }
.rank-table tbody tr.ranked-3 { border-left: 3px solid var(--blue); }
.rank-table td .dot { width: 8px; height: 8px; margin-right: 4px; vertical-align: middle; }

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-right: 0.6rem;
}

/* disabled tabs */
.tab-btn.disabled, .tab-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.tab-btn.disabled:hover { border-color: var(--border); color: var(--muted); }

/* disabled input */
.input-wrap input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--surface);
}

/* â”€â”€ RESULTS PANEL â”€â”€ */
.results-panel { display: flex; flex-direction: column; gap: 1.25rem; }
.results-panel.hidden { display: none; }

/* â”€â”€ KPI ROW â”€â”€ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.kpi-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.kpi-value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.kpi-value.green  { color: var(--green); }
.kpi-value.red    { color: var(--red); }
.kpi-value.yellow { color: var(--yellow); }
.kpi-value.blue   { color: var(--blue); }

/* â”€â”€ CHARTS ROW â”€â”€ */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 860px) { .charts-row { grid-template-columns: 1fr; } }

.chart-card {
  padding: 1.1rem 1.25rem;
  overflow: hidden;
}
.chart-card canvas {
  display: block;
  width: 100%;
}

/* â”€â”€ LEGEND â”€â”€ */
.legend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot.green      { background: var(--green); }
.dot.green-fade { background: rgba(0,196,125,0.35); border: 1px solid var(--green); }
.dot.red        { background: var(--red); }
.dot.blue       { background: var(--blue); }
.dot.gray       { background: var(--muted); }

/* â”€â”€ TABLE â”€â”€ */
.table-wrap { overflow-x: auto; }
.card > .card-header + .table-wrap,
.card > .card-header { padding: 1.1rem 1.25rem 0; }
.card > .table-wrap { padding: 0 1.25rem 1.1rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th, td {
  padding: 0.55rem 0.85rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
th { color: var(--muted); font-weight: 600; }
th:first-child, td:first-child { text-align: left; }
tr:last-child td { border-bottom: none; }
td.green  { color: var(--green);  font-weight: 600; }
td.red    { color: var(--red);    font-weight: 600; }
td.yellow { color: var(--yellow); font-weight: 600; }

/* â”€â”€ EXPORT BAR â”€â”€ */
.export-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.export-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-right: 0.25rem;
}
.btn-export {
  padding: 0.35rem 0.85rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 6px;
  font-size: 0.78rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-export:hover { border-color: var(--green); color: var(--text); }
.btn-report { border-color: var(--green); color: var(--green); font-weight: 600; margin-left: auto; }
.btn-report:hover { background: var(--green); color: #000; }

/* â”€â”€ COMPARE SECTION â”€â”€ */
.compare-section { padding: 1.1rem 1.25rem; }
.compare-section.hidden { display: none; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.compare-table th, .compare-table td {
  padding: 0.55rem 0.85rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.compare-table th { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.compare-table th:first-child, .compare-table td:first-child { text-align: left; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td.green  { color: var(--green);  font-weight: 600; }
.compare-table td.red    { color: var(--red);    font-weight: 600; }
.compare-table td.yellow { color: var(--yellow); font-weight: 600; }
.scenario-label { color: var(--text); font-weight: 600; white-space: nowrap; }

/* â”€â”€ SCREENSHOT BUTTON â”€â”€ */
.btn-screenshot {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 999;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}
.btn-screenshot:hover   { border-color: var(--green); background: var(--surface); }
.btn-screenshot:disabled { opacity: 0.5; cursor: not-allowed; }

/* â”€â”€ SCROLLBAR â”€â”€ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â• MOBILE APP SHELL (nascosto su desktop) â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.m-app,
.m-sheet { display: none; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â• MOBILE / TABLET (â‰¤640px) â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 640px) {
  /* Tokens locali mobile */
  :root {
    --m-topbar-h: 60px;
    --m-subbar-h: 38px;
    --m-cta-h: 60px;
    --m-tabbar-h: 66px;
    --m-radius: 14px;
    --m-radius-lg: 20px;
    --m-accent: var(--green);
    --m-surface-1: #0f1420;
    --m-surface-2: #171d2c;
    --m-surface-3: #1f2638;
    --m-hairline: #2a3249;
  }

  /* â”€â”€ Nascondi desktop chrome â”€â”€ */
  body[data-route="app"] > header:not(.site-nav) { display: none; }
  body[data-route="app"] .tab-bar { display: none !important; }
  body[data-route="app"] .btn-screenshot { display: none !important; }
  body[data-route="app"] .params-section { display: none !important; }
  body[data-route="app"] .run-bar { display: none !important; }
  body[data-route="app"] .overlay-bar { display: none !important; }
  body[data-route="app"] .compare-strategy-bar .btn-primary { display: none !important; }
  body:not([data-route="app"]) .m-app { display: none !important; }
  body:not([data-route="app"]) .m-sheet { display: none !important; }

  /* Body: fondo leggermente piÃ¹ scuro, font piÃ¹ nitido */
  body {
    background: var(--m-surface-1);
    font-size: 14px;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
  }

  /* â•â•â•â•â•â•â•â•â•â• APP SHELL â•â•â•â•â•â•â•â•â•â• */
  .m-app {
    display: block;
    /* Static elements fixed; this container exists for semantic grouping only. */
  }

  /* â”€â”€ TOPBAR â”€â”€ */
  .m-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: calc(var(--m-topbar-h) + env(safe-area-inset-top, 0));
    padding-top: env(safe-area-inset-top, 0);
    padding-left: 12px;
    padding-right: 12px;
    background: rgba(15, 20, 32, 0.92);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--m-hairline);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 900;
  }
  .m-firm-btn {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 8px;
    background: var(--m-surface-3);
    border: 1px solid var(--m-hairline);
    border-radius: 999px;
    color: var(--text);
    cursor: pointer;
    height: 44px;
    font-family: var(--font);
  }
  .m-firm-btn:active { background: var(--border); transform: scale(0.985); }
  .m-firm-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--m-accent);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
  }
  .m-firm-stack {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    overflow: hidden;
  }
  .m-firm-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .m-firm-meta {
    font-size: 0.66rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .m-firm-chev {
    color: var(--muted);
    font-size: 1rem;
    margin-left: 2px;
    flex-shrink: 0;
  }
  .m-icon-btn {
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--m-surface-3);
    border: 1px solid var(--m-hairline);
    border-radius: 12px;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s, background 0.15s;
  }
  .m-icon-btn:active { transform: scale(0.92); background: var(--border); }
  .m-icon-btn svg { display: block; }

  /* â”€â”€ SUBBAR (chips) â”€â”€ */
  .m-subbar {
    position: fixed;
    top: calc(var(--m-topbar-h) + env(safe-area-inset-top, 0));
    left: 0; right: 0;
    height: var(--m-subbar-h);
    padding: 0 14px;
    background: var(--m-surface-1);
    border-bottom: 1px solid var(--m-hairline);
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    z-index: 899;
  }
  .m-subbar::-webkit-scrollbar { display: none; }
  .m-chip {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 5px 10px;
    background: var(--m-surface-2);
    border: 1px solid var(--m-hairline);
    border-radius: 999px;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
  }
  .m-chip-phase {
    color: var(--m-accent);
    border-color: var(--m-accent);
    background: rgba(168, 85, 247, 0.08);
  }

  /* â”€â”€ MAIN SCROLL AREA spacing â”€â”€ */
  body[data-route="app"] {
    padding-top: calc(var(--m-topbar-h) + var(--m-subbar-h) + env(safe-area-inset-top, 0) + 12px);
    padding-bottom: calc(var(--m-cta-h) + var(--m-tabbar-h) + env(safe-area-inset-bottom, 0) + 24px);
  }
  body[data-route="app"] .app-content {
    max-width: 100%;
    padding: 0 12px 0;
    gap: 12px;
  }

  /* â”€â”€ DESKTOP CARD nel flow mobile â”€â”€ */
  .card {
    background: var(--m-surface-2);
    border: 1px solid var(--m-hairline);
    border-radius: var(--m-radius);
    overflow: hidden;
  }
  .card-header {
    padding: 14px 14px 0;
    margin-bottom: 10px;
  }
  .card-header h2 { font-size: 0.88rem; font-weight: 700; }
  .card-header h3 {
    font-size: 0.7rem;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .badge { display: none; } /* troppo rumoroso su mobile */

  /* Tab content: sempre attivo â€” il switch avviene tramite bottom tabbar */
  .tab-content { padding: 0; }

  /* â”€â”€ KPI â”€â”€ */
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .kpi-card {
    background: var(--m-surface-2);
    border: 1px solid var(--m-hairline);
    border-radius: var(--m-radius);
    padding: 12px 14px;
  }
  .kpi-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 4px;
  }
  .kpi-value { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
  .kpi-grid-multi { grid-template-columns: 1fr; gap: 10px; }

  /* â”€â”€ CHART CARDS â”€â”€ */
  .chart-card { padding: 14px; }
  .card > .table-wrap { padding: 0 14px 14px; }

  /* â”€â”€ TABELLE â”€â”€ */
  table { font-size: 0.76rem; }
  th, td { padding: 8px 6px; }

  /* â”€â”€ EXPORT BAR â”€â”€ */
  .export-bar {
    gap: 6px;
    padding: 4px 0;
    flex-wrap: wrap;
  }
  .export-label {
    flex: 1 0 100%;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }
  .btn-export {
    flex: 1 1 calc(50% - 3px);
    padding: 11px 8px;
    font-size: 0.78rem;
    min-height: 44px;
    background: var(--m-surface-3);
    border-color: var(--m-hairline);
    border-radius: 10px;
  }
  .btn-report {
    flex: 1 0 100%;
    order: 99;
    border-color: var(--m-accent);
    color: var(--m-accent);
    background: rgba(168, 85, 247, 0.08);
    margin-left: 0;
  }

  /* â”€â”€ COMPARE ROW restyle â”€â”€ */
  .compare-row {
    grid-template-columns: 14px 1fr auto;
    grid-template-areas:
      "dot firm rm"
      "dot plan plan"
      "dot size size";
    gap: 6px 8px;
    padding: 12px;
    background: var(--m-surface-2);
    border: 1px solid var(--m-hairline);
    border-radius: var(--m-radius);
  }
  .compare-row > .dot { grid-area: dot; align-self: start; margin-top: 10px; }
  .compare-row > .cmp-remove { grid-area: rm; }
  .compare-row > select:nth-of-type(1) { grid-area: firm; }
  .compare-row > select:nth-of-type(2) { grid-area: plan; }
  .compare-row > select:nth-of-type(3) { grid-area: size; }
  .compare-row select {
    background: var(--m-surface-3);
    border-color: var(--m-hairline);
    min-height: 40px;
    font-size: 0.88rem;
    border-radius: 10px;
  }

  .compare-strategy-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  /* â”€â”€ TOOLTIP fallback â”€â”€ */
  .info-icon .tooltip {
    width: calc(100vw - 48px);
    max-width: 300px;
    left: 0;
    transform: none;
  }

  /* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
     STICKY CTA BAR (sopra la tabbar)
     â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
  .m-cta-wrap {
    position: fixed;
    bottom: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom, 0));
    left: 0; right: 0;
    padding: 10px 14px 8px;
    background: linear-gradient(to top, rgba(15, 20, 32, 0.98) 60%, rgba(15, 20, 32, 0));
    z-index: 898;
  }
  .m-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: var(--m-cta-h);
    background: linear-gradient(135deg, #b77ff8 0%, #a855f7 55%, #8b3fe0 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 800;
    font-family: var(--font);
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(168, 85, 247, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.12s, filter 0.15s, opacity 0.15s;
    letter-spacing: 0.01em;
  }
  .m-cta:active { transform: scale(0.97); filter: brightness(0.92); }
  .m-cta:disabled {
    background: var(--m-surface-3);
    color: var(--muted);
    box-shadow: none;
    cursor: wait;
  }
  #mRunIcon { font-size: 0.85rem; }

  /* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
     BOTTOM TAB BAR
     â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
  .m-tabbar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--m-tabbar-h) + env(safe-area-inset-bottom, 0));
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: rgba(15, 20, 32, 0.97);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-top: 1px solid var(--m-hairline);
    display: flex;
    z-index: 900;
  }
  .m-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px 8px;
    background: transparent;
    border: none;
    color: var(--muted);
    font-family: var(--font);
    font-size: 0.66rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.18s;
    position: relative;
  }
  .m-tab svg { transition: transform 0.18s; }
  .m-tab.active { color: var(--m-accent); }
  .m-tab.active::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 26px; height: 3px;
    background: var(--m-accent);
    border-radius: 0 0 3px 3px;
  }
  .m-tab.active svg { transform: translateY(-1px); }
  .m-tab:disabled { opacity: 0.4; cursor: not-allowed; }

  /* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
     BOTTOM SHEETS (Params, Firm picker)
     â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
  .m-sheet {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1100;
    pointer-events: none;
  }
  .m-sheet[aria-hidden="false"] { pointer-events: auto; }
  .m-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .m-sheet[aria-hidden="false"] .m-sheet-backdrop { opacity: 1; }
  .m-sheet-panel {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    max-height: 92vh;
    background: var(--m-surface-1);
    border-radius: var(--m-radius-lg) var(--m-radius-lg) 0 0;
    box-shadow: 0 -12px 42px rgba(0, 0, 0, 0.6);
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .m-sheet[aria-hidden="false"] .m-sheet-panel {
    transform: translateY(0);
  }
  .m-sheet-handle {
    width: 40px; height: 4px;
    background: var(--m-hairline);
    border-radius: 2px;
    margin: 10px auto 6px;
    flex-shrink: 0;
  }
  .m-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 16px 12px;
    border-bottom: 1px solid var(--m-hairline);
    flex-shrink: 0;
  }
  .m-sheet-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  .m-sheet-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--m-surface-3);
    border: none;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
  }
  .m-sheet-close:active { background: var(--border); }
  .m-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
    -webkit-overflow-scrolling: touch;
  }
  .m-sheet-footer {
    position: sticky;
    bottom: 0;
    margin: 16px -16px -16px;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0));
    background: linear-gradient(to top, var(--m-surface-1) 70%, rgba(15, 20, 32, 0));
  }
  .m-sheet-primary {
    width: 100%;
    height: 52px;
    background: var(--m-accent);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
  }
  .m-sheet-primary:active { transform: scale(0.98); }

  /* â”€â”€ FIELDS nel sheet params â”€â”€ */
  .m-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
  }
  .m-field-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }
  .m-field-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .m-field-label small {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
  }
  .m-field-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--m-accent);
    letter-spacing: -0.01em;
  }
  .m-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }
  .m-grid-2 .m-field { margin-bottom: 0; }

  /* â”€â”€ Slider â”€â”€ */
  .m-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 36px;
    background: transparent;
    cursor: pointer;
  }
  .m-slider::-webkit-slider-runnable-track {
    height: 6px;
    background: linear-gradient(to right, var(--m-accent) 0%, var(--m-accent) var(--pct, 55%), var(--m-surface-3) var(--pct, 55%), var(--m-surface-3) 100%);
    border-radius: 3px;
  }
  .m-slider::-moz-range-track {
    height: 6px;
    background: var(--m-surface-3);
    border-radius: 3px;
  }
  .m-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--m-accent);
    margin-top: -9px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: grab;
  }
  .m-slider::-moz-range-thumb {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--m-accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  }
  .m-slider:active::-webkit-slider-thumb { transform: scale(1.15); }
  .m-slider-marks {
    display: flex;
    justify-content: space-between;
    font-size: 0.66rem;
    color: var(--muted);
    padding: 0 2px;
    margin-top: -4px;
  }

  /* â”€â”€ Stepper â”€â”€ */
  .m-stepper {
    display: flex;
    align-items: center;
    background: var(--m-surface-3);
    border: 1px solid var(--m-hairline);
    border-radius: 12px;
    height: 52px;
    overflow: hidden;
  }
  .m-step {
    width: 48px; height: 100%;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
  .m-step:active { background: var(--border); }
  .m-stepper input {
    flex: 1;
    background: transparent;
    border: none;
    text-align: center;
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font);
    outline: none;
    width: 100%;
    -moz-appearance: textfield;
    padding: 0;
  }
  .m-stepper input::-webkit-outer-spin-button,
  .m-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
  .m-step-unit {
    padding-right: 10px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
  }

  .m-plain-input {
    width: 100%;
    height: 44px;
    background: var(--m-surface-3);
    border: 1px solid var(--m-hairline);
    color: var(--text);
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: var(--font);
    outline: none;
    -moz-appearance: textfield;
  }
  .m-plain-input::-webkit-outer-spin-button,
  .m-plain-input::-webkit-inner-spin-button { -webkit-appearance: none; }
  .m-plain-input:focus { border-color: var(--m-accent); }

  /* â”€â”€ RR / BE preview â”€â”€ */
  .m-rr-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--m-surface-2);
    border: 1px solid var(--m-hairline);
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--muted);
  }
  .m-rr-row strong { color: var(--text); font-size: 0.95rem; }
  .m-rr-sep { color: var(--m-hairline); }

  /* â”€â”€ Switch iOS-like â”€â”€ */
  .m-switches {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
    background: var(--m-surface-2);
    border: 1px solid var(--m-hairline);
    border-radius: 14px;
    overflow: hidden;
  }
  .m-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--m-hairline);
    position: relative;
  }
  .m-switch:last-child { border-bottom: none; }
  .m-switch-txt {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .m-switch-txt strong { font-size: 0.9rem; font-weight: 700; color: var(--text); }
  .m-switch-txt small { font-size: 0.72rem; color: var(--muted); }
  .m-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
  }
  .m-switch-track {
    position: relative;
    width: 46px; height: 28px;
    background: var(--m-hairline);
    border-radius: 999px;
    transition: background 0.22s;
    flex-shrink: 0;
  }
  .m-switch-track::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 24px; height: 24px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.22s;
  }
  .m-switch input:checked ~ .m-switch-track { background: var(--m-accent); }
  .m-switch input:checked ~ .m-switch-track::after { transform: translateX(18px); }

  /* â”€â”€ Advanced collapsible â”€â”€ */
  .m-advanced {
    background: var(--m-surface-2);
    border: 1px solid var(--m-hairline);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
  }
  .m-advanced summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    list-style: none;
  }
  .m-advanced summary::-webkit-details-marker { display: none; }
  .m-adv-chev {
    color: var(--muted);
    transition: transform 0.2s;
  }
  .m-advanced[open] .m-adv-chev { transform: rotate(180deg); }
  .m-advanced-body {
    padding: 4px 16px 16px;
    border-top: 1px solid var(--m-hairline);
  }
  .m-advanced-body .m-grid-2 { margin-bottom: 0; }

  /* â”€â”€ Edge preview box â”€â”€ */
  .m-edge-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px;
    background: var(--m-surface-2);
    border: 1px solid var(--m-hairline);
    border-radius: 14px;
    margin-bottom: 10px;
  }
  .m-edge-item { display: flex; flex-direction: column; gap: 4px; }
  .m-edge-key {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .m-edge-val { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; }
  .m-edge-val.positive { color: var(--m-accent); }
  .m-edge-val.negative { color: var(--red); }

  /* â”€â”€ PICKER (firm sheet) â”€â”€ */
  .m-picker-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 4px 4px 8px;
  }
  .m-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--m-surface-2);
    border: 1px solid var(--m-hairline);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 18px;
  }
  .m-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--m-hairline);
    color: var(--text);
    font-size: 0.92rem;
    font-family: var(--font);
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
  }
  .m-picker-item:last-child { border-bottom: none; }
  .m-picker-item:active { background: var(--border); }
  .m-picker-item-label { flex: 1; min-width: 0; }
  .m-picker-item-check {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid var(--m-hairline);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.18s;
  }
  .m-picker-item.active .m-picker-item-check {
    border-color: var(--m-accent);
    background: var(--m-accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
  }
  .m-picker-item.active .m-picker-item-label { color: var(--m-accent); font-weight: 700; }

  /* Lock body scroll when sheet open */
  body.m-sheet-open { overflow: hidden; height: 100vh; }

  /* Modal legacy overlay: tocca bene su mobile */
  .modal-content {
    min-width: 0;
    width: calc(100vw - 1.5rem);
    max-width: 100%;
    padding: 18px 16px;
    margin: 0.75rem;
    border-radius: var(--m-radius-lg);
  }
  .modal-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .modal-row select {
    min-height: 44px;
    font-size: 0.95rem;
    background: var(--m-surface-3);
    border-color: var(--m-hairline);
    border-radius: 10px;
  }
  .modal-actions .btn-primary,
  .modal-actions .btn-secondary { flex: 1; min-height: 44px; }

  /* Results panel spacing */
  .results-panel { gap: 12px; padding-top: 6px; }

  /* Pill filtered styling */
  .rules-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
  }

}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â• PHONE STRETTO â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
@media (max-width: 380px) {
  .params-grid { grid-template-columns: 1fr; }
  .firm-selector label { flex: 1 1 100%; }
  .kpi-row { grid-template-columns: 1fr; }
}
