:root {
  --fcmel-blue: #1557d6;
  --fcmel-blue-dark: #0d3fa8;
  --fcmel-ink: #101828;
  --fcmel-muted: #667085;
  --fcmel-line: #e6eaf0;
  --fcmel-soft: #f4f7fb;
  --fcmel-white: #ffffff;
  --fcmel-bottom-nav-height: 68px;
  --fcmel-radius: 22px;
  --fcmel-shadow: 0 18px 44px rgba(16, 24, 40, .12);
}

.fcmel-root { display: none; }
.fcmel-home-layer { display: none; }

html.fcmel-mobile-active body.fcmel-ready {
  padding-bottom: calc(var(--fcmel-bottom-nav-height) + 18px + env(safe-area-inset-bottom, 0px));
}

html.fcmel-mobile-active body.fcmel-home {
  overflow: hidden !important;
}

html.fcmel-mobile-active .fcmel-root {
  display: block;
  position: relative;
  z-index: 999998;
}

html.fcmel-mobile-active.fcmel-home-active .fcmel-home-layer {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 999990;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--fcmel-white);
  color: var(--fcmel-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.admin-bar .fcmel-home-layer { top: 46px; }

.fcmel-home-scroll {
  min-height: 100%;
  padding: 0 18px calc(var(--fcmel-bottom-nav-height) + 42px + env(safe-area-inset-bottom, 0px));
}

.fcmel-home-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 -18px;
  padding: 0 18px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(230,234,240,.82);
}

.fcmel-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--fcmel-ink);
  text-decoration: none;
  font-weight: 850;
  letter-spacing: -.03em;
}

.fcmel-brand__logo {
  display: block;
  width: 34px;
  height: auto;
  max-height: 40px;
  object-fit: contain;
  flex: 0 0 auto;
}

.fcmel-brand__name { font-size: 16px; }

.fcmel-top-menu,
.fcmel-icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--fcmel-line);
  border-radius: 999px;
  background: #fff;
  color: var(--fcmel-ink);
}

.fcmel-top-menu svg,
.fcmel-icon-button svg { width: 22px; height: 22px; fill: currentColor; }

.fcmel-hero {
  padding: 42px 0 30px;
}

.fcmel-kicker,
.fcmel-eyebrow {
  margin: 0 0 10px;
  color: var(--fcmel-blue);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fcmel-hero h1,
.fcmel-search-card h2,
.fcmel-trust h2,
.fcmel-how h2,
.fcmel-verify-card h2 {
  margin: 0;
  color: var(--fcmel-ink);
  letter-spacing: -.045em;
}

.fcmel-hero h1 {
  max-width: 330px;
  font-size: clamp(38px, 10vw, 52px);
  line-height: .98;
  font-weight: 860;
}

.fcmel-hero__lead {
  margin: 18px 0 0;
  max-width: 330px;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 720;
  letter-spacing: -.025em;
}

.fcmel-hero__sub {
  margin: 10px 0 0;
  color: var(--fcmel-muted);
  font-size: 16px;
  line-height: 1.5;
}

.fcmel-primary-cta,
.fcmel-secondary-cta,
.fcmel-search-submit {
  min-height: 54px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
}

.fcmel-primary-cta {
  margin-top: 26px;
  width: 100%;
  padding: 0 18px;
  background: var(--fcmel-blue);
  color: #fff;
  box-shadow: 0 12px 26px rgba(21,87,214,.22);
}

.fcmel-primary-cta svg,
.fcmel-secondary-cta svg,
.fcmel-search-submit svg { width: 22px; height: 22px; fill: currentColor; }

.fcmel-search-card {
  scroll-margin-top: 86px;
  padding: 22px;
  border-radius: 26px;
  background: var(--fcmel-soft);
  border: 1px solid #e8edf5;
}

.fcmel-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.fcmel-section-number {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #dbe7ff;
  color: var(--fcmel-blue-dark);
  font-size: 12px;
  font-weight: 850;
}

.fcmel-search-card h2,
.fcmel-trust h2,
.fcmel-how h2,
.fcmel-verify-card h2 {
  font-size: 29px;
  line-height: 1.05;
  font-weight: 840;
}

.fcmel-quick-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.fcmel-field {
  display: grid;
  gap: 8px;
}

.fcmel-field__label {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 760;
  color: #344054;
}

.fcmel-field__control {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 15px;
  border: 1px solid #dbe2ec;
  background: #fff;
  color: #667085;
}

.fcmel-field__control svg { width: 21px; height: 21px; fill: currentColor; flex: 0 0 auto; }

.fcmel-field__control input,
.fcmel-field__control select {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  padding: 0;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--fcmel-ink) !important;
  font: inherit;
  font-size: 16px !important;
}

.fcmel-field__control input::placeholder { color: #98a2b3; opacity: 1; }
.fcmel-field__control select:disabled { color: #98a2b3 !important; opacity: 1; cursor: not-allowed; }
.fcmel-search-submit {
  width: 100%;
  border: 0;
  padding: 0 18px;
  background: var(--fcmel-ink);
  color: #fff;
}

.fcmel-form-note {
  margin: 0;
  color: #7b8494;
  font-size: 12px;
  line-height: 1.45;
}

.fcmel-trust,
.fcmel-how {
  padding: 42px 2px 6px;
}

.fcmel-trust-grid {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.fcmel-trust-item {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--fcmel-line);
  border-radius: 16px;
  background: #fff;
  font-weight: 700;
}

.fcmel-check {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--fcmel-blue);
}

.fcmel-check svg { width: 19px; height: 19px; fill: currentColor; }

.fcmel-steps {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.fcmel-step {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr);
  gap: 14px;
  align-items: center;
  padding: 15px;
  border-radius: 18px;
  background: var(--fcmel-soft);
}

.fcmel-step > span {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: var(--fcmel-blue);
  color: #fff;
  font-weight: 850;
}

.fcmel-step h3 { margin: 0 0 3px; font-size: 17px; letter-spacing: -.02em; }
.fcmel-step p { margin: 0; color: var(--fcmel-muted); font-size: 14px; line-height: 1.4; }

.fcmel-verify-card {
  margin-top: 42px;
  padding: 24px;
  border-radius: 26px;
  background: var(--fcmel-ink);
  color: #fff;
}

.fcmel-verify-card .fcmel-eyebrow { color: #8fb5ff; }
.fcmel-verify-card h2 { color: #fff; }
.fcmel-verify-card > p:not(.fcmel-eyebrow) { margin: 14px 0 0; color: #cbd5e1; line-height: 1.55; }

.fcmel-secondary-cta {
  width: 100%;
  margin-top: 20px;
  padding: 0 17px;
  background: #fff;
  color: var(--fcmel-ink);
}

.fcmel-mobile-footer {
  padding: 42px 4px 14px;
  text-align: center;
  color: var(--fcmel-muted);
}

.fcmel-mobile-footer strong { color: var(--fcmel-ink); letter-spacing: -.02em; }
.fcmel-mobile-footer p { margin: 7px auto 0; max-width: 260px; font-size: 13px; line-height: 1.45; }

.fcmel-bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 1000001;
  height: var(--fcmel-bottom-nav-height);
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  align-items: stretch;
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  color: var(--fcmel-ink);
  box-shadow: var(--fcmel-shadow);
  border: 1px solid rgba(16,24,40,.09);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
}

.fcmel-bottom-nav__item {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.fcmel-bottom-nav__item svg { width: 23px; height: 23px; fill: currentColor; }
body.fcmel-home .fcmel-bottom-nav__item[data-fcmel-key="home"] { color: var(--fcmel-blue); }

.fcmel-scrim {
  position: fixed;
  inset: 0;
  z-index: 1000002;
  background: rgba(16,24,40,.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.fcmel-drawer {
  position: fixed;
  z-index: 1000003;
  left: 10px;
  right: 10px;
  bottom: calc(var(--fcmel-bottom-nav-height) + 20px + env(safe-area-inset-bottom, 0px));
  max-height: min(68vh, 620px);
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  background: #fff;
  color: var(--fcmel-ink);
  box-shadow: var(--fcmel-shadow);
  border: 1px solid rgba(16,24,40,.09);
  opacity: 0;
  transform: translateY(24px) scale(.985);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  overflow: hidden;
}

.fcmel-root.is-open .fcmel-scrim { opacity: 1; pointer-events: auto; }
.fcmel-root.is-open .fcmel-drawer { opacity: 1; transform: none; pointer-events: auto; }

.fcmel-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}

.fcmel-drawer__content {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 12px 16px;
}

.fcmel-drawer__content ul { list-style: none; margin: 0; padding: 0; }
.fcmel-drawer__content li { margin: 0; padding: 0; }
.fcmel-drawer__content a,
.fcmel-drawer__content button {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.fcmel-drawer__content a:hover,
.fcmel-drawer__content a:focus-visible,
.fcmel-drawer__content button:hover,
.fcmel-drawer__content button:focus-visible { background: var(--fcmel-soft); }

html.fcmel-mobile-active .fc-contact-modal { z-index: 1000010; }


/* Stage 23 · v0.3.0 — dedicated mobile presenters for Verifica impresa and Per le aziende. */
.fcmel-page-layer { display: none; }

html.fcmel-mobile-active.fcmel-verify-active .fcmel-verify-layer,
html.fcmel-mobile-active.fcmel-business-active .fcmel-business-layer {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 999990;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  color: var(--fcmel-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.fcmel-mobile-active.fcmel-verify-active body,
html.fcmel-mobile-active.fcmel-business-active body {
  overflow: hidden !important;
}

body.admin-bar .fcmel-page-layer { top: 46px; }

.fcmel-page-scroll {
  min-height: 100%;
  padding: 0 18px calc(var(--fcmel-bottom-nav-height) + 42px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 100% 0, rgba(21,87,214,.045), transparent 30%),
    linear-gradient(180deg, #fff 0, #fbfcfe 58%, #f7fafc 100%);
}

.fcmel-page-header__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.fcmel-page-context {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--fcmel-line);
  background: rgba(255,255,255,.9);
  color: #4d5d70;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.fcmel-page-hero {
  padding: 34px 0 24px;
}

.fcmel-page-hero h1 {
  max-width: 355px;
  margin: 0;
  color: var(--fcmel-ink);
  font-size: clamp(36px, 10vw, 48px);
  line-height: 1;
  letter-spacing: -.045em;
  font-weight: 860;
}

.fcmel-page-lead {
  max-width: 355px;
  margin: 16px 0 0;
  color: #5e6f81;
  font-size: 16px;
  line-height: 1.55;
}

.fcmel-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.fcmel-chip-row span {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px 5px 25px;
  border: 1px solid #dce5ee;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: #415467;
  font-size: 12px;
  font-weight: 780;
}

.fcmel-chip-row span::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0a9672;
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(10,150,114,.08);
}

.fcmel-page-cta { margin-top: 22px; }

.fcmel-text-action {
  width: 100%;
  margin-top: 12px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #31536c;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.fcmel-compact-steps {
  display: grid;
  overflow: hidden;
  margin: 4px 0 22px;
  border: 1px solid var(--fcmel-line);
  border-radius: 20px;
  background: rgba(255,255,255,.94);
}

.fcmel-compact-steps article {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 15px;
  border-bottom: 1px solid #edf1f5;
}

.fcmel-compact-steps article:last-child { border-bottom: 0; }

.fcmel-compact-steps article > span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #edf7f3;
  color: #087459;
  font-size: 10px;
  font-weight: 900;
}

.fcmel-compact-steps strong {
  display: block;
  color: #15364e;
  font-size: 14px;
}

.fcmel-compact-steps p {
  margin: 2px 0 0;
  color: #6a7a89;
  font-size: 12px;
  line-height: 1.4;
}

.fcmel-native-section {
  scroll-margin-top: 86px;
  margin: 0 0 20px;
}

.fcmel-verify-layer .facilecheck-app > .fcLandingHeroClean,
.fcmel-verify-layer .facilecheck-app #trova-impresa,
.fcmel-verify-layer .facilecheck-app .fcLandingAltRoute {
  display: none !important;
}

.fcmel-verify-layer .facilecheck-app {
  margin: 0 !important;
  background: transparent !important;
}

.fcmel-verify-layer .facilecheck-app .fcProjectFitPublicSection {
  padding: 0 !important;
  border: 0 !important;
}

.fcmel-verify-layer .facilecheck-app .fcProjectFitPublicSection .wrap {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.fcmel-verify-layer .facilecheck-app .fcProjectFitPublicSection .fc-pfl {
  padding: 0 0 8px !important;
}

.fcmel-verify-layer .fc-pfl-publicintro { display: none !important; }

.fcmel-verify-layer .facilecheck-app .fc-pfl-form {
  margin: 0 !important;
  padding: 18px !important;
  border: 1px solid #e1e8ee !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 14px 36px rgba(16,41,65,.065) !important;
}

.fcmel-verify-layer .fc-pfl-formgrid { grid-template-columns: 1fr !important; gap: 15px !important; }
.fcmel-verify-layer .fc-pfl-actions { display: grid !important; grid-template-columns: 1fr !important; gap: 10px !important; }
.fcmel-verify-layer .fc-pfl-actions .fc-pfl-primary { width: 100% !important; }
.fcmel-verify-layer .fc-pfl-privacy { display: block; line-height: 1.45; }
.fcmel-verify-layer .facilecheck-app .fc-pfl-publicnote { margin-top: 16px; }

html.fcmel-mobile-active.fcmel-verify-active .checkRecoveryModal {
  z-index: 1000012 !important;
}

/* Request Builder is appended to <body>; keep it above the dedicated mobile presenter. */
html.fcmel-mobile-active.fcmel-verify-active .fcr-modal {
  z-index: 1000014 !important;
}

.fcmel-principle-card {
  margin: 0 0 20px;
  padding: 20px;
  border-radius: 22px;
  background: var(--fcmel-ink);
  color: #fff;
}

.fcmel-principle-card .fcmel-eyebrow { color: #8fb5ff; }
.fcmel-principle-card h2 { margin: 0; color: #fff; font-size: 25px; line-height: 1.08; letter-spacing: -.035em; }
.fcmel-principle-card p:not(.fcmel-eyebrow) { margin: 12px 0 0; color: #cbd5e1; font-size: 14px; line-height: 1.55; }

.fcmel-business-layer .fcs-shell {
  max-width: none !important;
  margin: 0 !important;
  padding: 18px !important;
  border: 1px solid #e1e8ee !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 14px 36px rgba(16,41,65,.065) !important;
}

.fcmel-business-layer .fcs-intro { display: none !important; }
.fcmel-business-layer .fcs-form {
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.fcmel-business-layer .fcs-btn { width: 100% !important; }
.fcmel-business-layer .fcs-gates,
.fcmel-business-layer .fcs-facts { grid-template-columns: 1fr !important; }
.fcmel-business-layer .fcs-result { padding: 17px !important; }

.fcmel-compact-details {
  margin: 12px 0 0;
  overflow: hidden;
  border: 1px solid #dfe6ed;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
}

.fcmel-compact-details summary {
  position: relative;
  padding: 15px 42px 15px 15px;
  color: #17364f;
  font-size: 14px;
  font-weight: 820;
  cursor: pointer;
  list-style: none;
}

.fcmel-compact-details summary::-webkit-details-marker { display: none; }
.fcmel-compact-details summary::after {
  content: "+";
  position: absolute;
  right: 15px;
  top: 50%;
  color: var(--fcmel-blue);
  font-size: 20px;
  line-height: 1;
  transform: translateY(-50%);
}
.fcmel-compact-details[open] summary::after { content: "−"; }
.fcmel-compact-details p { margin: 0; padding: 0 15px 15px; color: #667789; font-size: 13px; line-height: 1.55; }
.fcmel-compact-details a { display: inline-flex; margin: -4px 15px 15px; color: #0b7458; font-size: 13px; font-weight: 850; text-decoration: none; }

.fcmel-page-footer { padding-top: 38px; }

/* Stage 23 — Verifica impresa keeps the Frontend responsive content but uses the mobile shell. */
html.fcmel-mobile-active body.page-template-facilecheck-landing-template.fc-operational-page > .fc-header {
  display: none !important;
}
.fcmel-drawer__empty { margin: 8px 4px; color: var(--fcmel-muted); font-size: 14px; }

html.fcmel-lock,
html.fcmel-lock body { overflow: hidden !important; }

html.fcmel-debug::before {
  content: "FC MOBILE v0.3.0";
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2147483647;
  padding: 6px 9px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font: 700 11px/1.2 system-ui, sans-serif;
  letter-spacing: .03em;
  pointer-events: none;
}

@media (min-width: 821px) {
  .fcmel-root { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .fcmel-scrim,
  .fcmel-drawer { transition: none; }
  html { scroll-behavior: auto; }
}
