/* =====================================================================
   mFunnel shared components: header, hero, chat shell, replies, progress
   card, lead form, closing CTA and the parts result cards are built from.
   Colours and fonts come from _core/brand/theme.css only.
   A tool's own stylesheet holds only its own result cards.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 16px;
  color: var(--mf-ink);
  background: var(--mf-white);
  line-height: 1.45;
  --header-h: 64px;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--mf-green); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
:focus-visible { outline: 3px solid var(--mf-focus); outline-offset: 2px; }
em, .em { font-style: italic; font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  background: var(--mf-white);
  border-bottom: 1px solid var(--mf-border);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo img { height: 26px; width: auto; }
.start-over {
  border: 1px solid var(--mf-border); background: var(--mf-white); color: var(--mf-muted);
  border-radius: var(--radius-pill); padding: 7px 16px; font-size: 15px; font-family: var(--font-subtitle); font-weight: 700;
}
.start-over:hover { color: var(--mf-green); border-color: var(--mf-green); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--radius-pill); padding: 14px 24px;
  font-family: var(--font-subtitle); font-weight: 700; font-size: 16px; white-space: nowrap; text-decoration: none;
  transition: background .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--mf-green); color: var(--mf-white); }
.btn-primary:hover { background: var(--mf-green-hover); }
.btn-ghost { background: var(--mf-white); color: var(--mf-green); border: 1px solid var(--mf-border); }
.btn-ghost:hover { border-color: var(--mf-green); }
.btn-small { padding: 9px 16px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------- Stage + hero ---------- */
.stage { min-height: calc(100dvh - var(--header-h)); display: flex; flex-direction: column; }

.hero {
  position: relative; overflow: hidden;
  padding: 64px 0 56px;
  background: var(--mf-white);
  max-height: 1400px;
  transition: max-height .6s ease, padding .6s ease, opacity .35s ease;
}
.hero-shape {
  position: absolute; z-index: 0; pointer-events: none;
  width: 620px; height: 620px; right: -180px; top: -260px;
  border-radius: 50%; background: var(--mf-lime-tint);
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; text-align: center; }
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 6px 14px;
  font-family: var(--font-subtitle); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--mf-green-deep); background: var(--mf-green-tint);
  border-radius: var(--radius-pill);
}
.hero h1 {
  font-family: var(--font-title); font-weight: 900;
  font-size: clamp(30px, 5.6vw, 48px); line-height: 1.08; letter-spacing: -0.01em;
  color: var(--mf-ink); margin: 0 0 18px;
}
.hero-sub { font-size: clamp(17px, 2.2vw, 19px); color: var(--mf-muted); margin: 0 auto 30px; max-width: 640px; }

.url-form { max-width: 640px; margin: 0 auto; }
.url-field {
  display: flex; align-items: center; gap: 8px;
  background: var(--mf-white); border: 1px solid var(--mf-border);
  border-radius: var(--radius-pill); padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow);
}
.url-field:focus-within { border-color: var(--mf-green); box-shadow: 0 0 0 4px var(--mf-focus), var(--shadow); }
.url-icon { width: 20px; height: 20px; fill: var(--mf-muted); flex: none; }
.url-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 18px; padding: 10px 4px; }
.form-error { color: var(--mf-red); font-size: 15px; margin: 10px 0 0; }
.cf-turnstile { margin-top: 12px; display: flex; justify-content: center; }

.hero-points {
  list-style: none; padding: 0; margin: 30px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center;
  color: var(--mf-ink); font-size: 16px;
}
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mf-lime); }

@media (max-width: 560px) {
  .hero { padding: 40px 0 36px; }
  .hero-shape { width: 380px; height: 380px; right: -200px; top: -200px; }
  .url-field { flex-wrap: wrap; border-radius: var(--radius); padding: 8px; }
  .url-field input { flex-basis: calc(100% - 32px); }
  .url-field .btn { width: 100%; }
  .hero-points { flex-direction: column; align-items: center; gap: 8px; }
}

/* ---------- Hero -> chat ---------- */
.chat { height: 0; opacity: 0; overflow: hidden; transition: height .6s ease, opacity .4s ease .15s; }
body.is-chat .hero { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; pointer-events: none; }
body.is-chat .chat { height: calc(100dvh - var(--header-h)); opacity: 1; overflow: visible; }
body.no-anim .hero, body.no-anim .chat { transition: none !important; }

/* ---------- Chat panel ---------- */
.chat-panel {
  height: 100%; display: flex; flex-direction: column;
  max-width: 620px; margin: 0 auto;
  background: var(--mf-surface); position: relative;
}
@media (min-width: 661px) {
  .chat-panel {
    height: calc(100% - 32px); margin: 16px auto;
    border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
    border: 1px solid var(--mf-border);
  }
}
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 14px; background: var(--mf-green); color: var(--mf-white);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, .14); display: grid; place-items: center;
}
.avatar img { width: 30px; height: auto; }
.who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.who strong { font-family: var(--font-subtitle); font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.presence { font-size: 14px; opacity: .9; }
.chat-site {
  margin-left: auto; font-size: 13px; padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .14); max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-site:empty { display: none; }
@media (max-width: 440px) { .chat-site { display: none; } .chat-site + .menu-wrap { margin-left: auto; } }
.chat-site:empty + .menu-wrap { margin-left: auto; }

.icon-btn { background: transparent; border: 0; color: inherit; padding: 8px; border-radius: 50%; display: grid; place-items: center; }
.icon-btn:hover, .icon-btn:focus-visible { background: rgba(255, 255, 255, .14); outline: none; }
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: 44px; min-width: 210px; z-index: 30;
  background: var(--mf-white); color: var(--mf-ink); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(7, 14, 13, .18);
  padding: 6px 0;
}
.menu button, .menu a {
  display: block; width: 100%; text-align: left; padding: 10px 16px;
  background: none; border: 0; color: var(--mf-ink); text-decoration: none; font-size: 16px;
}
.menu button:hover, .menu a:hover { background: var(--mf-surface); }
.menu .danger { color: var(--mf-red); }

.chat-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 12px 18px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--mf-surface);
  scroll-behavior: smooth;
}
.day-chip { text-align: center; margin: 4px 0 10px; }
.day-chip span {
  display: inline-block; font-size: 13px; color: var(--mf-muted);
  background: var(--mf-white); padding: 3px 10px; border-radius: var(--radius-sm); border: 1px solid var(--mf-border);
}

/* ---------- Messages ---------- */
.msg { display: flex; margin-top: 6px; animation: pop .22s ease-out both; }
.msg.bot { justify-content: flex-start; }
.msg.user { justify-content: flex-end; }
.msg.tail { margin-top: 14px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
body.no-anim .msg { animation: none; }

.bubble {
  position: relative; max-width: min(86%, 470px);
  padding: 8px 12px 9px; border-radius: var(--radius);
  font-size: 16px; line-height: 1.45;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.bubble > p { margin: 0; }
.bubble > p + p { margin-top: 6px; }
.msg.bot .bubble { background: var(--mf-white); color: var(--mf-ink); border: 1px solid var(--mf-border); }
.msg.user .bubble { background: var(--mf-green-tint); color: var(--mf-green-deep); }
.msg.bot.tail .bubble { border-top-left-radius: 4px; }
.msg.user.tail .bubble { border-top-right-radius: 4px; }
.meta {
  float: right; margin: 7px 0 -4px 12px; font-size: 12px; color: var(--mf-muted);
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
}
.meta svg { width: 16px; height: 11px; fill: var(--mf-green); }

/* Wide cards (results, forms, CTA) */
.msg.wide .bubble { max-width: 100%; width: 100%; white-space: normal; padding: 0; background: transparent; border: 0; }

/* Typing indicator */
.typing .bubble { display: inline-flex; flex-direction: column; gap: 4px; padding: 11px 13px; }
.dots { display: inline-flex; gap: 4px; }
.dots span {
  width: 7px; height: 7px; border-radius: 50%; background: var(--mf-muted); opacity: .5;
  animation: blink 1.2s infinite ease-in-out;
}
.dots span:nth-child(2) { animation-delay: .15s; }
.dots span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.typing-status { font-size: 14px; color: var(--mf-muted); white-space: nowrap; }
.typing-status:empty { display: none; }

/* "New message" pill when the visitor has scrolled up */
.new-pill {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 5;
  border: 0; border-radius: var(--radius-pill); padding: 8px 16px;
  background: var(--mf-ink); color: var(--mf-white); font-family: var(--font-subtitle); font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow);
}

/* ---------- Footer: replies and typing ---------- */
.chat-foot {
  background: var(--mf-white); border-top: 1px solid var(--mf-border);
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  max-height: 60%; overflow-y: auto;
}
.chat-foot:empty { display: none; }

.quick-replies { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.quick-replies.stacked { flex-direction: column; align-items: stretch; }
.qr {
  background: var(--mf-white); color: var(--mf-green);
  border: 1.5px solid var(--mf-green); border-radius: var(--radius-pill);
  padding: 9px 18px; font-size: 16px; font-family: var(--font-subtitle); font-weight: 700; line-height: 1.25;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.quick-replies.stacked .qr { border-radius: var(--radius); text-align: left; padding: 12px 16px; }
.qr:hover { background: var(--mf-green-tint); }
.qr.primary { background: var(--mf-green); color: var(--mf-white); }
.qr.primary:hover { background: var(--mf-green-hover); }
.qr[disabled] { opacity: .55; cursor: default; }

.chip-group + .chip-group { margin-top: 12px; }
.chip-title { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; }
.chip-title strong { font-family: var(--font-subtitle); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.chip-title span { font-size: 14px; color: var(--mf-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--mf-white); color: var(--mf-ink);
  border: 1px solid var(--mf-border); border-radius: var(--radius-pill);
  padding: 8px 14px; font-size: 16px;
}
.chip .check { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--mf-border); display: grid; place-items: center; }
.chip[aria-pressed="true"] { background: var(--mf-lime); color: var(--mf-ink); border-color: var(--mf-lime); font-weight: 700; }
.chip[aria-pressed="true"] .check { border-color: var(--mf-ink); background: var(--mf-ink); }
.chip[aria-pressed="true"] .check::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mf-lime); }
.chips-submit { width: 100%; margin-top: 14px; }
/* Phones: one option per line, full width, so long names are easy to read and tap */
@media (max-width: 560px) {
  .chips { flex-direction: column; flex-wrap: nowrap; }
  .chip { width: 100%; border-radius: var(--radius); padding: 11px 14px; text-align: left; }
}

.composer { display: flex; align-items: center; gap: 8px; }
.composer input {
  flex: 1; min-width: 0; border: 1px solid var(--mf-border); background: var(--mf-white);
  border-radius: var(--radius-pill); padding: 12px 16px; font-size: 17px; outline: 0;
}
.composer input:focus { border-color: var(--mf-green); }
.send {
  width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0;
  background: var(--mf-green); display: grid; place-items: center;
}
.send svg { width: 20px; height: 20px; fill: var(--mf-white); }
.send[disabled] { opacity: .5; }

/* ---------- Inline single choice (radio rows inside the chat) ---------- */
.msg.wide .bubble:has(.options) { width: auto; max-width: min(88%, 470px); }
.options {
  display: grid; background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: var(--radius); overflow: hidden;
  min-width: 240px;
}
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  border: 0; background: transparent; padding: 13px 16px; font-size: 17px; color: var(--mf-ink);
}
.opt + .opt { border-top: 1px solid var(--mf-border); }
.opt:hover:not([disabled]) { background: var(--mf-surface); }
.opt .radio { width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--mf-border); display: grid; place-items: center; }
.opt[aria-checked="true"] .radio { border-color: var(--mf-green); }
.opt[aria-checked="true"] .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mf-green); }
.options.done .opt { cursor: default; }
.options.done .opt[aria-checked="false"] { color: var(--mf-muted); }
.options.done .opt[aria-checked="true"] { background: var(--mf-green-tint); color: var(--mf-green-deep); font-weight: 700; }

/* ---------- Cards (shared shell for every result card) ---------- */
.card {
  background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: var(--radius);
  padding: 16px; white-space: normal;
}
.card-title { margin: 0 0 10px; font-family: var(--font-subtitle); font-weight: 700; font-size: 18px; line-height: 1.25; color: var(--mf-ink); }
.card-sub { margin: -4px 0 12px; font-size: 15px; color: var(--mf-muted); }
.card-big { font-family: var(--font-title); font-weight: 900; font-size: clamp(26px, 7vw, 34px); line-height: 1.1; color: var(--mf-ink); }

/* ---------- Progress card ---------- */
.msg.wide .bubble:has(.progress-card) { width: auto; min-width: min(100%, 300px); }
.progress-card { padding: 14px 16px; }
.progress-card .card-title { font-size: 16px; margin-bottom: 10px; }
.progress { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.progress li { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--mf-muted); transition: color .3s ease; }
.progress .p-dot {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2px solid var(--mf-border); display: grid; place-items: center; transition: all .3s ease;
}
.progress li.active { color: var(--mf-ink); font-weight: 700; }
.progress li.active .p-dot { border-color: var(--mf-green); border-top-color: transparent; animation: spin .8s linear infinite; }
.progress li.done { color: var(--mf-ink); }
.progress li.done .p-dot { background: var(--mf-green); border-color: var(--mf-green); }
.progress li.done .p-dot::after { content: ""; width: 7px; height: 4px; border: 2px solid var(--mf-white); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.progress li.failed .p-dot { background: var(--mf-red); border-color: var(--mf-red); }
.progress li.failed { color: var(--mf-red-ink); }
.progress li .p-note { display: block; font-size: 14px; font-weight: 400; color: var(--mf-muted); }
.progress-foot { margin: 10px 0 0; font-size: 14px; color: var(--mf-muted); display: flex; justify-content: space-between; gap: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Score bar and band pill ---------- */
.pill {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  font-family: var(--font-subtitle); font-size: 13px; font-weight: 700; white-space: nowrap;
  background: var(--mf-surface); color: var(--mf-ink);
}
.pill.band-excellent { background: var(--band-excellent-bg); color: var(--band-excellent-text); }
.pill.band-solid { background: var(--band-solid-bg); color: var(--band-solid-text); }
.pill.band-weak { background: var(--band-weak-bg); color: var(--band-weak-text); }
.pill.band-failing { background: var(--band-failing-bg); color: var(--band-failing-text); }
.bar { height: 10px; border-radius: var(--radius-pill); background: var(--mf-surface); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--mf-green); }
.bar i.fill-excellent { background: var(--band-excellent); }
.bar i.fill-solid { background: var(--band-solid); }
.bar i.fill-weak { background: var(--band-weak); }
.bar i.fill-failing { background: var(--band-failing); }

/* ---------- Locked row (quiet, so the single Yellow accent stays on the lead form) ---------- */
.locked-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px dashed var(--mf-border); border-radius: var(--radius-sm); background: var(--mf-surface);
  color: var(--mf-muted); font-size: 15px;
}
.locked-row .lock-lines { flex: 1; display: grid; gap: 6px; }
.locked-row .lock-lines i { display: block; height: 8px; border-radius: 4px; background: var(--mf-border); }
.locked-row .lock-lines i:last-child { width: 60%; }
.unlock-badge {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--mf-lime-tint); color: var(--mf-ink);
  font-family: var(--font-subtitle); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}

/* ---------- Copy button ---------- */
.copy-btn {
  flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--mf-border); border-radius: var(--radius-sm); background: var(--mf-white); color: var(--mf-green);
}
.copy-btn:hover { border-color: var(--mf-green); }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60;
  background: var(--mf-ink); color: var(--mf-white); padding: 10px 18px; border-radius: var(--radius-pill);
  font-size: 15px; box-shadow: var(--shadow);
}

/* ---------- Lead form card ---------- */
.lead-card { position: relative; padding: 18px 16px 16px; border-top: 4px solid var(--mf-green); }
/* The one Yellow accent on screen: "Free" on the lead form */
.lead-card .free-tag {
  position: absolute; top: 14px; right: 14px; padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--mf-yellow); color: var(--mf-ink);
  font-family: var(--font-subtitle); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.lead-card .card-title { padding-right: 64px; }
.lead-card .card-sub { margin-bottom: 16px; }
.lead-form { display: grid; gap: 12px; }
.lead-form .f { display: grid; gap: 5px; font-family: var(--font-subtitle); font-size: 14px; font-weight: 700; color: var(--mf-ink); }
.lead-form input[type="text"], .lead-form input[type="tel"], .lead-form input[type="email"], .lead-form select {
  width: 100%; border: 1px solid var(--mf-border); border-radius: var(--radius-sm); background: var(--mf-white);
  padding: 11px 12px; font-family: var(--font-text); font-size: 17px; font-weight: 400; outline: 0; color: var(--mf-ink);
}
.lead-form input:focus, .lead-form select:focus { border-color: var(--mf-green); box-shadow: 0 0 0 3px var(--mf-focus); }
.lead-form [aria-invalid="true"] { border-color: var(--mf-red) !important; }
.phone-row { display: grid; grid-template-columns: minmax(0, 132px) 1fr; gap: 8px; }
.lead-form .consent { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 15px; color: var(--mf-ink); line-height: 1.35; cursor: pointer; }
.lead-form .consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--mf-green); }
.lead-form .err { color: var(--mf-red); font-family: var(--font-text); font-size: 14px; font-weight: 400; }
.lead-form .err:empty { display: none; }
.lead-form .consent-notice { font-size: 14px; line-height: 1.45; color: var(--mf-muted); margin: 2px 0 0; }
.lead-form .consent-notice a { color: var(--mf-green); font-weight: 700; white-space: nowrap; }
.lead-form .btn { width: 100%; margin-top: 2px; }
.lead-form .form-msg { color: var(--mf-red); font-size: 15px; margin: 0; }
.lead-form .form-msg:empty { display: none; }

/* ---------- Closing CTA card ---------- */
.cta-card { background: var(--mf-ink); color: var(--mf-white); border-radius: var(--radius); padding: 22px 18px 18px; text-align: center; }
.cta-head { margin: 0; font-family: var(--font-subtitle); font-weight: 700; font-size: 21px; line-height: 1.25; }
.cta-sub { margin: 6px 0 18px; font-size: 16px; color: var(--mf-lime); }
.cta-btn {
  width: 100%; border: 0; border-radius: var(--radius-pill); padding: 16px 18px;
  background: var(--mf-green); color: var(--mf-white);
  font-family: var(--font-subtitle); font-size: 17px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s ease, transform .1s ease;
}
.cta-btn:hover { background: var(--mf-green-hover); }
.cta-btn svg { width: 20px; height: 20px; fill: currentColor; }
.cta-btn[disabled] { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .85); cursor: default; }

/* ---------- Funnel card (shared: MFUI.funnel, data from MF\Funnel) ---------- */
.funnel-card { container-type: inline-size; padding: 18px 12px 14px; }
.f-title { font-family: var(--font-subtitle); font-weight: 700; font-size: 19px; text-align: center; margin: 0 0 14px; }
.f-stage {
  position: relative; margin: 0 auto; border-radius: var(--radius);
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px;
  padding: 10px 12px; min-height: 68px; color: var(--mf-ink);
}
.f-stage.s0 { width: 100%; background: var(--mf-green-tint); }
.f-stage.s1 { width: 91%;  background: var(--mf-lime); }
.f-stage.s2 { width: 82%;  background: var(--mf-green); color: var(--mf-white); }
.f-stage.s3 { width: 73%; }
.f-stage.f-last { background: var(--mf-ink); color: var(--mf-white); }   /* the result bar, whichever stage is last */
.f-badge { border-radius: var(--radius-sm); padding: 4px 8px; line-height: 1.15; background: rgba(255, 255, 255, .65); }
.f-stage.s2 .f-badge, .f-stage.f-last .f-badge { background: rgba(255, 255, 255, .14); }
.f-badge b { display: block; font-family: var(--font-subtitle); font-size: 15px; }
.f-badge small { font-size: 12px; }
.f-center { text-align: center; padding-right: 70px; line-height: 1.15; }
.f-count { display: block; font-family: var(--font-title); font-weight: 900; font-size: 26px; }
.f-stage.f-last .f-count { font-size: 30px; color: var(--mf-lime); }
.f-label { display: block; font-size: 15px; font-weight: 700; margin-top: 3px; }
.f-pill {
  display: table; margin: 7px auto; padding: 3px 12px;
  border: 1px solid var(--mf-border); border-radius: var(--radius-pill);
  font-size: 14px; color: var(--mf-muted); background: var(--mf-white);
}
.f-pill b { color: var(--mf-ink); }
.f-note { text-align: center; font-size: 14px; color: var(--mf-muted); margin: 12px 4px 0; }
@container (max-width: 380px) {
  .f-center { padding-right: 0; }
  .f-count { font-size: 22px; }
  .f-stage.f-last .f-count { font-size: 25px; }
  .f-label { font-size: 13px; }
  .f-badge b { font-size: 13px; }
  .f-stage { padding: 8px; }
  .f-stage.s1 { width: 94%; } .f-stage.s2 { width: 88%; } .f-stage.s3 { width: 82%; }
}
.funnel-card .f-hidden { display: none; }
.funnel-card .f-in { animation: fdrop .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fdrop { from { opacity: 0; transform: translateY(-10px) scaleY(.92); } to { opacity: 1; transform: none; } }

/* ---------- Tools list page ---------- */
.tools-page { padding-bottom: 64px; }
.tool-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.tool-card { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px 20px; border-top: 4px solid var(--mf-green); text-decoration: none; color: var(--mf-ink); transition: box-shadow .15s ease, transform .15s ease; }
.tool-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-card .card-title { margin: 0; font-family: var(--font-title); font-weight: 900; font-size: 22px; color: var(--mf-ink); }
.tool-card p { margin: 0; color: var(--mf-muted); }
.tool-card ul { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; }
.tool-card li { display: flex; align-items: center; gap: 8px; }
.tool-card li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mf-lime); flex: none; }
.tool-card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Small shared bits ---------- */
.restart-wrap { display: flex; justify-content: center; }
.list-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list-check li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; font-size: 16px; line-height: 1.4; }
.ico { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--mf-white); background: var(--mf-green); margin-top: 1px; font-family: var(--font-base); }
.ico.no { background: var(--mf-red); }
.ico.warn { background: var(--mf-amber); }

noscript p { text-align: center; padding: 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Readable sections under the hero (Page::info; content from each tool's seo.php) ---------- */
.info { background: var(--mf-surface); border-top: 1px solid var(--mf-border); padding: 8px 0 56px; }
body.is-chat .info { display: none; }
.info-sec { padding-top: 48px; }
.info-sec h2 { font-family: var(--font-title); font-weight: 900; font-size: clamp(24px, 3.2vw, 32px); line-height: 1.15; margin: 0 0 12px; color: var(--mf-ink); }
.info-lead { margin: 0 0 20px; max-width: 760px; color: var(--mf-muted); font-size: 17px; line-height: 1.55; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.info-item { background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: var(--radius); padding: 18px 18px 16px; }
.info-item h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--mf-ink); }
.info-item p { margin: 0; color: var(--mf-muted); line-height: 1.5; }
.info-link { text-decoration: none; border-top: 4px solid var(--mf-green); transition: box-shadow .15s ease; }
.info-link:hover { box-shadow: var(--shadow); }
.info-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.info-steps li { counter-increment: step; position: relative; background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: var(--radius); padding: 18px 18px 16px 62px; }
.info-steps li::before { content: counter(step); position: absolute; left: 18px; top: 16px; width: 30px; height: 30px; border-radius: 50%; background: var(--mf-green); color: var(--mf-white); font-weight: 700; display: grid; place-items: center; }
.info-steps h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.info-steps p { margin: 0; color: var(--mf-muted); line-height: 1.5; }
.info-example { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding: 30px 18px 18px; border: 2px dashed var(--mf-border); border-radius: var(--radius); }
.info-badge { position: absolute; top: -12px; left: 16px; background: var(--mf-yellow); color: var(--mf-ink); font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.info-card { margin: 0; }
.info-card p { margin: 0 0 6px; line-height: 1.5; }
.info-card .card-title { margin-bottom: 8px; }
.info-card-label { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mf-green); }
.info-faq { display: grid; gap: 10px; max-width: 860px; }
.info-faq details { background: var(--mf-white); border: 1px solid var(--mf-border); border-radius: var(--radius); padding: 0 18px; }
.info-faq summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; position: relative; }
.info-faq summary::-webkit-details-marker { display: none; }
.info-faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 24px; color: var(--mf-green); }
.info-faq details[open] summary::after { content: "–"; }
.info-faq summary h3 { display: inline; margin: 0; font-size: 17px; font-weight: 700; }
.info-faq details p { margin: 0 0 16px; color: var(--mf-muted); line-height: 1.55; }
.tools-about { max-width: 1080px; margin: 0 auto; padding: 48px 20px 0; }
.tools-about .info-sec-title { font-family: var(--font-title); font-weight: 900; font-size: clamp(24px, 3.2vw, 32px); margin: 0 0 14px; }
.tools-about-list { flex-direction: column; align-items: flex-start; gap: 10px; }
.tools-about-list li { color: var(--mf-ink); line-height: 1.5; }
.tools-about-list li { align-items: flex-start; text-align: left; }
.tools-about-list .dot { margin-top: 7px; }
