/* ==========================================================================
   Funnel step check.

   Loaded after case-studies.css, which supplies the shell (tokens, header,
   footer, .btn, .kicker). Only the tool's own components live here.
   ========================================================================== */

/* --- Page head ----------------------------------------------------------- */

.fn-crumb { margin-bottom: 22px; color: var(--muted); font-size: 13px; }
.fn-crumb a { color: var(--muted); }
.fn-crumb a:hover { color: var(--accent); }
.fn-crumb span { margin: 0 7px; opacity: .55; }

.fn-hero { padding: 42px 0 10px; }
.fn-hero h1 {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(31px, 4.4vw, 56px);
  line-height: 1.02;
}
.fn-lead {
  margin: 22px 0 0;
  max-width: 62ch;
  color: var(--soft);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.62;
}

.fn-facts {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 26px 0 0; padding: 0; list-style: none;
}
.fn-facts li {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

/* --- App shell ----------------------------------------------------------- */

.fn-app {
  scroll-margin-top: 95px;   /* clears the 75px sticky header */
  margin: 40px 0 10px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
}

/* --- Form ---------------------------------------------------------------- */

.fn-input h2 { margin: 0 0 10px; font-size: clamp(21px, 2.4vw, 29px); }
.fn-hint { margin: 0 0 26px; max-width: 56ch; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.fn-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: 18px;
}
.fn-field { display: flex; flex-direction: column; gap: 7px; }
.fn-field-label { font-size: 14px; font-weight: 560; }
.fn-field-hint { color: var(--muted); font-size: 12.5px; line-height: 1.45; }

.fn-box {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .05);
}
.fn-box:focus-within { border-color: var(--accent); }
.fn-prefix { color: var(--muted); font-size: 14px; margin-right: 8px; }
.fn-box input {
  flex: 1; min-width: 0;
  padding: 13px 0;
  border: 0; background: none;
  color: var(--text);
  font: inherit; font-size: 17px;
}
.fn-box input:focus { outline: none; }

/* The button is a grid item like the fields, so it needs its own cell that
   does not stretch to the height of a labelled field. */
.fn-form-actions { grid-column: 1 / -1; margin-top: 4px; }

.fn-error:empty { display: none; }
.fn-error { margin: 16px 0 0; color: #ff9d9d; font-size: 14px; line-height: 1.5; }

/* --- Result hero --------------------------------------------------------- */

.fn-hero-figure { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.fn-kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.fn-headline {
  margin-top: 12px;
  font-family: var(--display);
  font-size: clamp(25px, 3.6vw, 42px);
  line-height: 1.08;
  color: var(--gold);
}
.fn-headline.fn-clean { color: var(--mint); }
.fn-sub { margin-top: 14px; max-width: 60ch; color: var(--muted); font-size: 15px; line-height: 1.62; }
.fn-money { margin-top: 16px; color: var(--mint); font-size: clamp(18px, 2.2vw, 24px); font-weight: 560; }

/* --- The funnel, drawn to scale ------------------------------------------ */

.fn-chart { margin-top: 30px; }

.fn-band-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.fn-band-name { font-size: 14.5px; font-weight: 560; }
.fn-band-count { color: var(--muted); font-size: 14px; }

.fn-track {
  margin-top: 8px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}
.fn-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(143, 211, 255, .55));
}

/* The rate between two bands. Indented so it reads as a connector rather
   than as another row of the funnel. */
.fn-conn {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 9px;
  margin: 9px 0 9px 18px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  font-size: 13.5px;
}
.fn-conn-rate { color: var(--soft); font-weight: 560; }
.fn-conn-note { color: var(--muted); }
.fn-conn.is-low { border-left-color: var(--gold); }
.fn-conn.is-low .fn-conn-rate { color: var(--gold); }

/* --- Findings ------------------------------------------------------------ */

.fn-findings { margin-top: 32px; }
.fn-findings h3 { margin: 0 0 16px; font-size: 17px; }

.fn-finding {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .04);
}
.fn-finding + .fn-finding { margin-top: 12px; }
.fn-finding-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.fn-finding-name { font-weight: 560; font-size: 15.5px; }
.fn-finding-money { color: var(--mint); font-size: 14px; }
.fn-finding p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.62; }
.fn-finding-proof { margin-top: 10px !important; font-size: 13.5px !important; }
.fn-finding-proof a { color: var(--accent); }
.fn-finding-proof a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* --- Method -------------------------------------------------------------- */

.fn-how { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.fn-how summary { cursor: pointer; color: var(--soft); font-size: 14.5px; font-weight: 560; }
.fn-how summary:hover { color: var(--text); }
.fn-how > div { margin-top: 16px; }
.fn-how p { margin: 0 0 14px; max-width: 64ch; color: var(--muted); font-size: 14.5px; line-height: 1.62; }
.fn-how ul { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: 14.5px; line-height: 1.75; }

.fn-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 11px; }

/* --- Static method section ----------------------------------------------- */

.fn-method { padding: 58px 0 10px; }
.fn-method h2 { margin: 0 0 16px; font-size: clamp(23px, 2.8vw, 34px); max-width: 24ch; }
.fn-method-lead { margin: 0 0 34px; max-width: 68ch; color: var(--muted); font-size: 15.5px; line-height: 1.68; }
.fn-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 16px;
}
.fn-method-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}
.fn-method-card h3 {
  margin: 0 0 10px;
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline;
  font-size: 16px;
}
.fn-method-card h3 span { color: var(--gold); font-size: 13px; font-weight: 460; }
.fn-method-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.64; }
.fn-method-card p a { color: var(--accent); white-space: nowrap; }
.fn-method-card p a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fn-method-foot { margin: 28px 0 0; max-width: 72ch; color: var(--muted); font-size: 14.5px; line-height: 1.68; }

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 720px) {
  .fn-app { padding: 24px 20px; border-radius: 20px; }
  .fn-form { grid-template-columns: 1fr; gap: 16px; }
  .fn-form-actions .btn, .fn-actions .btn { width: 100%; justify-content: center; }
  .fn-finding-head { display: block; }
  .fn-finding-money { display: block; margin-top: 3px; }
  .fn-method { padding-top: 44px; }
}
