/* Funnel screens for the Cloud browser surface (U6 slice A).
 *
 * Tokens are lifted from the site pack committed in
 * design/ce2-funnel/handoff/packs/justaskmarvis-site/assets/marvis.css, per
 * HANDOFF decision 9: landing/auth uses the site's own world (cream, ink,
 * orange, pill buttons, IBM Plex), NOT the Console's TE Industrial theme.
 *
 * Fonts: the site loads IBM Plex from a CDN; this surface is self-contained by
 * rule (no external requests), so the stacks below prefer a locally installed
 * IBM Plex and fall back to system faces. No @font-face, no fetch.
 */

:root {
  --cream: hsl(36 22% 94%);
  --cream-soft: hsl(36 18% 86%);
  --paper: hsl(34 28% 96%);
  --ink: rgba(28, 22, 16, 0.94);
  --ink-secondary: rgba(28, 22, 16, 0.76);
  --ink-muted: rgba(28, 22, 16, 0.48);
  --accent: hsl(18 95% 44%);
  --accent-hover: hsl(18 95% 36%);
  --green: hsl(156 55% 22%);
  --error: hsl(4 70% 42%);
  --border: rgba(28, 22, 16, 0.14);
  --border-strong: rgba(28, 22, 16, 0.26);
  --r-pill: 9999px;
  --r-card: 14px;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-display: "IBM Plex Sans Condensed", "IBM Plex Sans", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }

/* No grid on <body>: browser extensions inject elements straight into it, and
 * a body grid counts children, so one injected banner shoved the whole funnel
 * off-centre (seen live during Emilio's walkthrough). Classic flow with
 * margin-auto centring is immune to uninvited siblings. */
body.funnel {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  padding: 24px;
}

.funnel .brand { display: flex; justify-content: center; padding: 6vh 0 7vh; }
.funnel .brand img { display: block; height: 32px; width: auto; }

.funnel main {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.funnel h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.funnel p { color: var(--ink-secondary); margin: 0 0 16px; }

/* The wait, the refusal and the recovery read as a single card. The markup is
 * untouched on purpose: the e2e addresses nodes by data attribute, so the card
 * look attaches to the node id rather than to a class the renderer would have
 * to add. */
.funnel main[data-node-id="N-PROVISIONING"],
.funnel main[data-node-id="N-PROVISION-RECOVERY"],
.funnel main[data-node-id="INTERIM-WAITLIST"],
.funnel main[data-node-id="N-COHORT-FULL"] {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px;
  box-shadow: 0 12px 32px -20px rgba(28, 22, 16, 0.35);
}

/* ------------------------------------------------------------ plan choice */

.funnel ul[data-plans] {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.funnel [data-plan] {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.funnel [data-plan-cta] {
  display: block;
  padding: 18px 20px;
  color: inherit;
  text-decoration: none;
}

.funnel [data-plan]:hover { border-color: var(--border-strong); transform: translateY(-1px); }

.funnel [data-plan][data-preselected="true"] {
  border: 2px solid var(--accent);
  box-shadow: 0 8px 20px -14px var(--accent);
}

.funnel [data-plan] h2 {
  margin: 0 0 2px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-transform: capitalize;
}

.funnel [data-price] {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0 0 4px;
}

.funnel [data-price]::after { content: " \20AC/mese"; font-size: 0.75rem; color: var(--ink-muted); }
.funnel [data-plan="free"] [data-price]::after { content: " \20AC"; }

.funnel [data-includes] { margin: 0; font-size: 0.92rem; }

.funnel [data-no-charge] {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--green);
  margin: 6px 0 0;
}

/* ----------------------------------------------------------- provisioning */

.funnel ol[data-checklist] {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.funnel [data-step] {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.funnel [data-step]::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  flex: none;
}

.funnel [data-step][data-done="true"] { color: var(--ink); }
.funnel [data-step][data-done="true"]::before {
  border-color: var(--green);
  background: var(--green);
}

.funnel [data-step][data-done="false"] { color: var(--ink-muted); }

.funnel [data-duration] { font-size: 0.88rem; color: var(--ink-muted); }

/* -------------------------------------------------------------- recovery */

.funnel [data-reference-box] {
  display: flex;
  align-items: baseline;
  gap: 12px;
  background: var(--cream-soft);
  border: 1px solid var(--error);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 18px;
  user-select: all;
}

.funnel [data-reference] {
  font-family: var(--font-mono);
  font-weight: 600;
}

.funnel [data-date] { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-secondary); }

.funnel button,
.funnel [data-action] {
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 22px;
  margin-right: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.funnel [data-action="A-RETRY"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.funnel [data-action="A-RETRY"]:hover { background: var(--accent-hover); box-shadow: 0 8px 16px -8px var(--accent); }
.funnel button:hover { transform: translateY(-1px); }
.funnel button:active { transform: translateY(0); }

/* ------------------------------------------------------------ cohort full */

.funnel [data-title] { font-family: var(--font-display); }
