/* ================================================================
   TECLUBIN — Cómo facturar (help page)
   Re-skinned to match the main portal:
    · animated dark canvas with navy + purple blobs
    · floating white card with premium shadow
    · portal navy/gold palette
    · cubic-bezier(.16,1,.3,1) entrance animations
   ================================================================ */

:root {
  /* Portal brand palette (mirrors styles.css) */
  --brand:        #103a67;
  --brand-dark:   #0b2847;
  --brand-deeper: #071d37;
  --gold:         #e8921a;
  --gold-light:   #f5a83a;
  --gold-deep:    #b4700f;

  --surface:      #ffffff;
  --surface-alt:  #f8fafc;
  --surface-hover:#f1f5f9;

  --ink:          #0f1e2e;
  --ink-2:        #1e2d44;
  --ink-muted:    #52647a;
  --ink-light:    #8499b0;

  --border:       #e2e8f0;
  --border-soft:  #eef2f7;
  --border-focus: #7aa6cc;

  --success:      #16a34a;
  --danger:       #dc2626;

  /* Orange kept only for the hero eyebrow + CTA pill (matches portal help-link) */
  --accent:       #e85d1c;
  --accent-ink:   #b84712;

  /* Legacy token aliases (keep old classnames happy) */
  --ink-2-legacy: #1e2d44;
  --muted:        var(--ink-muted);
  --muted-2:      var(--ink-light);
  --line:         var(--border);
  --line-soft:    var(--border-soft);
  --bg:           var(--surface);
  --bg-alt:       var(--surface-alt);

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-card: 0 40px 80px rgba(4,12,28,.55),
                 0 8px 20px rgba(4,12,28,.3),
                 0 0 0 1px rgba(255,255,255,.06);
  --shadow-soft: 0 1px 2px rgba(15,30,50,.04),
                 0 12px 32px -16px rgba(15,30,50,.18);
  --shadow-btn:  0 6px 22px rgba(16,58,103,.38);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: #07101e;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Animated background (matches portal) ─────────────────────── */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 90% 65% at 5% 0%,   #0e2a4a 0%, transparent 55%),
    radial-gradient(ellipse 60% 80% at 95% 100%, #170d2b 0%, transparent 55%),
    linear-gradient(160deg, #07101e 0%, #0c1628 50%, #070f1b 100%);
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  animation: blobFloat linear infinite;
  pointer-events: none;
}
.blob-1 {
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(16,58,103,.65) 0%, transparent 70%);
  top: -220px; right: -160px;
  animation-duration: 28s;
}
.blob-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(232,146,26,.18) 0%, transparent 70%);
  bottom: -120px; left: -100px;
  animation-duration: 34s;
  animation-delay: -9s;
}
.blob-3 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(99,102,241,.18) 0%, transparent 70%);
  top: 38%; left: 28%;
  animation-duration: 22s;
  animation-delay: -14s;
}
@keyframes blobFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(28px,-18px) scale(1.04); }
  66%     { transform: translate(-18px,12px) scale(.97); }
}

/* ── Page shell (floats the card above the canvas) ────────────── */
.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 36px 24px 56px;
}

.page-card {
  width: 100%;
  max-width: 1060px;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  animation: cardIn .65s cubic-bezier(.16,1,.3,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: scale(.97) translateY(18px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ── Sticky header (inside the card) ──────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(16,58,103,.08);
}
.site-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(232,146,26,.4) 30%,
    rgba(232,146,26,.4) 70%,
    transparent 100%);
  opacity: .55;
  pointer-events: none;
}
.site-header-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-brand {
  display: inline-flex;
  align-items: center;
  transition: opacity .18s ease;
}
.site-brand:hover { opacity: .82; }

/* LOGO FIX: wordmark, preserve aspect ratio, no cropping */
.site-brand-logo {
  width: auto;
  height: 34px;
  max-height: 40px;
  max-width: 180px;
  border-radius: 0;
  object-fit: contain;
  display: block;
}
.site-brand-text { display: none; } /* legacy text removed — logo is the wordmark */

.site-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.site-back-link:hover {
  color: var(--gold-deep);
  background: rgba(232,146,26,.08);
}
.site-back-link svg { transition: transform .22s cubic-bezier(.16,1,.3,1); }
.site-back-link:hover svg { transform: translateX(-3px); }

/* ── Page container ───────────────────────────────────────────── */
.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  padding: 72px 0 48px;
  text-align: left;
  position: relative;
}
.hero::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  border-radius: 2px;
  margin-top: 28px;
  background: linear-gradient(90deg, var(--gold), rgba(232,146,26,.15));
}
.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: rgba(232,146,26,.1);
  border: 1px solid rgba(232,146,26,.22);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-title {
  font-size: 52px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.025em;
  margin: 0 0 18px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deeper) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--brand);
}
.hero-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 580px;
  margin: 0;
}

@media (max-width: 720px) {
  .hero { padding: 40px 0 28px; }
  .hero::after { margin-top: 20px; width: 56px; }
  .hero-title {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.1;
  }
  .hero-lede {
    font-size: clamp(15px, 4vw, 17px);
  }
  .hero-eyebrow { font-size: 10px; margin-bottom: 16px; padding: 4px 10px; }
}

/* ── Animated demo ────────────────────────────────────────────── */
.demo {
  margin: 0 0 72px;
  position: relative;
}

/* Demo badge (clear, non-intrusive label) */
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(232, 93, 28, 0.08);
  border: 1px solid rgba(232, 93, 28, 0.22);
  color: var(--accent-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.demo-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(232,93,28,.55);
  animation: demoBadgePulse 1.8s cubic-bezier(.16,1,.3,1) infinite;
}
@keyframes demoBadgePulse {
  0%   { box-shadow: 0 0 0 0 rgba(232,93,28,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(232,93,28,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,93,28,0); }
}

/* Scroll cue — tiny animated nudge inviting users to keep scrolling */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 18px auto 0;
  padding: 6px 10px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .75;
  transition: opacity .2s ease, color .2s ease, transform .2s ease;
  width: fit-content;
  animation: cueFloat 2.4s ease-in-out infinite;
}
.scroll-cue:hover {
  opacity: 1;
  color: var(--brand);
  transform: translateY(1px);
}
.scroll-cue-label {
  font-size: 10px;
  letter-spacing: .1em;
}
.scroll-cue-mouse {
  position: relative;
  width: 18px;
  height: 28px;
  border: 1.5px solid currentColor;
  border-radius: 10px;
  opacity: .8;
}
.scroll-cue-wheel {
  position: absolute;
  top: 5px;
  left: 50%;
  width: 2px;
  height: 5px;
  border-radius: 1px;
  background: currentColor;
  transform: translateX(-50%);
  animation: cueWheel 1.5s cubic-bezier(.65,.05,.36,1) infinite;
}
@keyframes cueWheel {
  0%   { transform: translate(-50%, 0);   opacity: 1; }
  80%  { transform: translate(-50%, 10px); opacity: 0; }
  100% { transform: translate(-50%, 0);   opacity: 0; }
}
@keyframes cueFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}
.scroll-cue.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  animation: none;
  transition: opacity .4s ease, transform .4s ease;
}

/* Desktop: park the cue vertically on the right edge of the demo frame */
@media (min-width: 900px) {
  .scroll-cue {
    position: absolute;
    right: -8px;
    top: 52%;
    margin: 0;
    transform: translate(100%, -50%);
    writing-mode: vertical-rl;
    flex-direction: row;
    gap: 10px;
  }
  .scroll-cue:hover { transform: translate(100%, calc(-50% + 2px)); }
  .scroll-cue-mouse { writing-mode: horizontal-tb; }
  .scroll-cue-label { writing-mode: vertical-rl; letter-spacing: .12em; }
}

/* Mode toggle (segmented control) */
.demo-modes {
  display: inline-flex;
  padding: 4px;
  margin-bottom: 14px;
  background: rgba(16,58,103,.06);
  border: 1px solid rgba(16,58,103,.12);
  border-radius: 12px;
  gap: 2px;
}
.demo-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease;
}
.demo-mode.is-active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(16,58,103,.14);
}
.demo-mode:not(.is-active):hover { color: var(--brand); }
.demo-mode svg { opacity: .9; flex-shrink: 0; }

/* Hide variant content based on active demo mode */
.demo-body[data-demo-mode="existing"] [data-mode-show="new"] { display: none; }
.demo-body[data-demo-mode="new"] [data-mode-show="existing"] { display: none; }

.demo-frame {
  border: 1px solid rgba(16,58,103,.12);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.demo-chrome {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, #fafcff 0%, var(--surface-alt) 100%);
}
.demo-chrome-dots {
  display: flex;
  gap: 6px;
  width: 80px;
}
.demo-chrome-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #d4d9e1;
}
.demo-chrome-url {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--ink-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: .01em;
}
.demo-chrome-spacer { width: 80px; }

.demo-body {
  position: relative;
  min-height: 560px;
  padding: 40px;
  background: var(--surface);
}

/* Mini portal mock panels */
.m-panel {
  position: absolute;
  inset: 40px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .55s cubic-bezier(.16,1,.3,1),
              transform .55s cubic-bezier(.16,1,.3,1);
}
.m-panel.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.m-stepbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  font-size: 12px;
  color: var(--ink-light);
}
.m-stepbar-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-light);
  font-weight: 500;
}
.m-stepbar-item span {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface);
  transition: all .3s cubic-bezier(.16,1,.3,1);
}
.m-stepbar-item.is-active {
  color: var(--brand);
}
.m-stepbar-item.is-active span {
  border-color: var(--gold);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #fff;
  box-shadow: 0 0 0 4px rgba(232,146,26,.16);
}
.m-stepbar-item.is-done {
  color: var(--brand);
}
.m-stepbar-item.is-done span {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}
.m-stepbar-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  transition: background .3s ease;
}
.m-stepbar-line.is-done { background: var(--success); }

.m-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.015em;
  margin: 0 0 6px;
  color: var(--ink);
}
.m-sub {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0 0 24px;
  line-height: 1.55;
}
.m-center { text-align: center; }

.m-field {
  margin-bottom: 18px;
  transition: transform .3s ease;
}
.m-field.is-focus .m-input {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3.5px rgba(122,166,204,.18);
}
.m-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #2b3f5c;
  margin-bottom: 8px;
  letter-spacing: .01em;
}
.m-input {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.m-input-prefixed { padding-left: 0; }
.m-prefix {
  padding: 0 10px 0 14px;
  color: var(--ink-muted);
  font-family: Inter, system-ui, sans-serif;
  font-weight: 600;
  border-right: 1px solid var(--border);
  align-self: stretch;
  display: flex;
  align-items: center;
  margin-right: 10px;
}
.m-value { white-space: pre; }
.m-caret {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--brand);
  margin-left: 1px;
  opacity: 0;
}
.m-caret.is-blinking {
  opacity: 1;
  animation: caretBlink 1s steps(2) infinite;
}
@keyframes caretBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.m-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.m-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: all .25s cubic-bezier(.16,1,.3,1);
}
.m-choice.is-selected {
  border-color: var(--brand);
  background: #eef4ff;
  box-shadow: 0 0 0 3.5px rgba(16,58,103,.09);
}
.m-radio {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: border-color .2s ease;
}
.m-choice.is-selected .m-radio { border-color: var(--brand); }
.m-choice.is-selected .m-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--brand);
}
.m-choice-text { display: flex; flex-direction: column; }
.m-choice-text strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.m-choice-text span {
  font-size: 11px;
  color: var(--ink-muted);
}

.m-btn {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: linear-gradient(130deg, #1e5291, var(--brand));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-btn);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.m-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(16,58,103,.42);
}
.m-btn.is-pressed {
  transform: scale(.97);
}
.m-btn-success {
  background: linear-gradient(130deg, #1aad4e, var(--success));
  box-shadow: 0 6px 22px rgba(22,163,74,.38);
}
.m-btn-success:hover { box-shadow: 0 12px 30px rgba(22,163,74,.48); }

.m-summary {
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface-alt);
  margin-bottom: 22px;
}
.m-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
}
.m-summary-row span { color: var(--ink-muted); }
.m-summary-row strong { color: var(--ink); font-weight: 700; }

.m-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin-bottom: 8px;
}
.m-field-static {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.m-field-static span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 3px;
}
.m-field-static strong {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}

.m-review-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1.5px solid #cde2f5;
  background: linear-gradient(135deg, #f4f9ff 0%, #ecf3ff 100%);
  border-radius: 14px;
  margin-bottom: 20px;
}
.m-review-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e5291, var(--brand));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(16,58,103,.28);
}
.m-review-label {
  display: block;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 600;
}
.m-review-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand);
  margin-top: 2px;
}

.m-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 20px;
}
.m-success.is-visible { display: flex; }
.m-success-ring {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, var(--success));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 28px rgba(22,197,94,.4);
  animation: ringPop .55s cubic-bezier(.16,1,.3,1);
}
@keyframes ringPop {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.m-folio {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border: 1.5px solid #cde2f5;
  background: #f4f9ff;
  border-radius: 999px;
  margin-top: 12px;
  margin-bottom: 8px;
  font-size: 13px;
}
.m-folio span { color: var(--ink-muted); }
.m-folio strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
}

/* Demo controls */
.demo-controls {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: flex-end;
}
.demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s ease;
}
.demo-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-1px);
}
.demo-btn-ghost {
  border-color: transparent;
  color: var(--ink-muted);
}
.demo-btn-ghost:hover {
  border-color: var(--border);
  color: var(--brand);
  background: var(--surface-alt);
}

@media (max-width: 720px) {
  .demo { margin-bottom: 48px; }
  .demo-modes { display: flex; width: 100%; }
  .demo-mode { flex: 1; justify-content: center; padding: 10px 10px; min-height: 44px; font-size: 12.5px; }
  .demo-frame { border-radius: 12px; }
  .demo-body { padding: 22px 18px; min-height: 540px; }
  .m-panel { inset: 22px 18px; }
  .m-choices { grid-template-columns: 1fr; }
  .m-grid { grid-template-columns: 1fr; gap: 8px 0; }
  .m-title { font-size: 18px; }
  .m-sub { font-size: 13px; margin-bottom: 18px; }
  .m-stepbar { margin-bottom: 24px; gap: 6px; font-size: 11px; }
  .m-stepbar-item span { width: 20px; height: 20px; font-size: 10px; }
  .m-stepbar-item { gap: 4px; }
  .demo-controls { gap: 8px; }
  .demo-btn { padding: 10px 14px; min-height: 40px; }
}

@media (max-width: 420px) {
  .m-stepbar-item { font-size: 0; }
  .m-stepbar-item span { font-size: 10px; }
}

/* ── Sections ─────────────────────────────────────────────────── */
.section {
  padding: 48px 0;
  border-top: 1px solid rgba(16,58,103,.1);
  position: relative;
}
.section::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(232,146,26,.1));
}
.section-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 28px;
  color: var(--ink);
}

/* Before you start — checklist */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 32px;
}
.checklist li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface);
  transition: transform .22s cubic-bezier(.16,1,.3,1),
              border-color .22s ease,
              box-shadow .22s ease;
}
.checklist li:hover {
  transform: translateY(-2px);
  border-color: rgba(16,58,103,.2);
  box-shadow: var(--shadow-soft);
}
.checklist-num {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-deep);
  letter-spacing: .04em;
  margin-top: 2px;
  min-width: 30px;
  padding: 4px 8px;
  background: rgba(232,146,26,.1);
  border: 1px solid rgba(232,146,26,.22);
  border-radius: 6px;
  text-align: center;
  line-height: 1;
}
.checklist li strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.checklist li p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}

@media (max-width: 720px) {
  .checklist { grid-template-columns: 1fr; gap: 14px; }
  .checklist li { padding: 14px 14px; gap: 12px; }
  .checklist li strong { font-size: 14px; }
  .checklist li p { font-size: 13px; }
  .section { padding: 36px 0; }
  .section-title {
    font-size: clamp(20px, 5.5vw, 24px);
    margin-bottom: 22px;
  }
}

/* ── Step sections ────────────────────────────────────────────── */
.step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 28px;
  padding: 56px 0;
  border-top: 1px solid rgba(16,58,103,.1);
  position: relative;
}
.step::before {
  content: '';
  position: absolute;
  top: -1px; left: 0;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), rgba(16,58,103,.1));
}
.step-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: .08em;
  padding: 8px 12px;
  background: rgba(16,58,103,.07);
  border: 1px solid rgba(16,58,103,.15);
  border-radius: 8px;
  align-self: start;
  text-align: center;
  justify-self: start;
}
.step-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: 0 0 18px;
  color: var(--ink);
}
.step-text {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 18px;
  max-width: 58ch;
}
.step-text em {
  font-style: italic;
  color: var(--ink);
  font-weight: 500;
}
.step-text strong {
  font-weight: 700;
  color: var(--ink);
}

.step-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #d2521a);
  padding: 11px 20px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(232,93,28,.32);
  margin-top: 6px;
  transition: transform .18s cubic-bezier(.16,1,.3,1),
              box-shadow .22s ease,
              gap .18s ease;
}
.step-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232,93,28,.42);
  gap: 12px;
}

@media (max-width: 720px) {
  .step {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 36px 0;
  }
  .step-num { padding: 4px 10px; font-size: 12px; }
  .step-title {
    font-size: clamp(22px, 6vw, 28px);
    margin-bottom: 14px;
  }
  .step-text { font-size: 15px; line-height: 1.65; margin-bottom: 14px; }
  .step-cta { font-size: 14px; min-height: 44px; padding: 12px 20px; }
}

/* Definition list */
.mini-def {
  margin: 24px 0 8px;
  display: grid;
  grid-template-columns: 190px 1fr;
  row-gap: 14px;
  column-gap: 24px;
  padding: 20px 22px;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}
.mini-def dt {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand);
}
.mini-def dd {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.6;
}
@media (max-width: 720px) {
  .mini-def { grid-template-columns: 1fr; row-gap: 4px; column-gap: 0; padding: 16px; }
  .mini-def dt { font-size: 13px; }
  .mini-def dd { font-size: 13px; margin-bottom: 10px; }
  .callout { padding: 14px 16px; font-size: 13px; }
  .ml-mock { padding: 16px 18px; margin: 20px 0 8px; }
  .ml-mock-bubble { font-size: 13px; }
}

/* Callout */
.callout {
  margin-top: 22px;
  padding: 16px 20px;
  border-left: 3px solid var(--brand);
  background: linear-gradient(90deg, rgba(16,58,103,.05) 0%, rgba(16,58,103,.015) 100%);
  border-radius: 0 12px 12px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}
.callout strong { font-weight: 700; color: var(--ink); }
.callout em { font-style: italic; color: var(--ink); }
.callout-warn {
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(232,146,26,.08) 0%, rgba(232,146,26,.02) 100%);
}

.inline-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em;
  padding: 2px 7px;
  background: rgba(16,58,103,.07);
  border: 1px solid rgba(16,58,103,.14);
  border-radius: 5px;
  color: var(--brand);
  font-weight: 600;
}

/* ML mockup */
.ml-mock {
  margin: 28px 0 8px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  max-width: 480px;
  box-shadow: var(--shadow-soft);
}
.ml-mock-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}
.ml-mock-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e5291, var(--brand));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(16,58,103,.25);
}
.ml-mock-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.ml-mock-time {
  font-size: 11px;
  color: var(--ink-light);
  margin-top: 1px;
}
.ml-mock-bubble {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}
.ml-mock-link {
  color: var(--brand);
  font-weight: 600;
  border-bottom: 1px dashed rgba(16,58,103,.35);
}
.ml-mock-highlight {
  margin: 10px 0 8px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(232,146,26,.1) 0%, rgba(232,146,26,.04) 100%);
  border: 1px solid rgba(232,146,26,.28);
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink);
}
.ml-mock-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  color: var(--gold-deep);
}

/* ── FAQ ──────────────────────────────────────────────────────── */
.faq {
  border-top: 1px solid rgba(16,58,103,.1);
}
.faq-item {
  border-bottom: 1px solid rgba(16,58,103,.1);
  transition: background .2s ease;
}
.faq-item[open] {
  background: rgba(16,58,103,.025);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  border-radius: 8px;
  transition: color .18s ease, background .18s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover {
  color: var(--brand);
  background: rgba(16,58,103,.04);
}
.faq-chev {
  transition: transform .28s cubic-bezier(.16,1,.3,1), color .18s ease;
  color: var(--gold);
  flex-shrink: 0;
}
.faq-item summary:hover .faq-chev { color: var(--gold-deep); }
.faq-item[open] .faq-chev {
  transform: rotate(180deg);
  color: var(--gold-deep);
}
.faq-body {
  padding: 0 16px 22px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: 62ch;
}
.faq-body p { margin: 0 0 10px; }
.faq-body p:last-child { margin-bottom: 0; }
.faq-body a { color: var(--brand); font-weight: 600; border-bottom: 1px solid rgba(16,58,103,.3); }
.faq-body a:hover { color: var(--gold-deep); border-bottom-color: var(--gold); }
.faq-body em { font-style: italic; color: var(--ink-2); }

/* ── CTA ──────────────────────────────────────────────────────── */
.cta {
  margin: 32px -32px 0;
  padding: 64px 56px;
  text-align: left;
  background: linear-gradient(168deg, #1c4a7a 0%, #112f58 44%, #0b2244 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}
.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 60% at 50% -10%,
              rgba(232,146,26,.18) 0%, transparent 55%);
  pointer-events: none;
}
.cta::after {
  content: '';
  position: absolute;
  bottom: -80px; right: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  pointer-events: none;
}
.cta > * { position: relative; z-index: 1; }
.cta-title {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 12px;
  color: #fff;
}
.cta-text {
  font-size: 16px;
  color: rgba(255,255,255,.74);
  margin: 0 0 26px;
  max-width: 52ch;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #fff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(232,146,26,.38);
  transition: transform .18s cubic-bezier(.16,1,.3,1),
              box-shadow .22s ease,
              gap .18s ease;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(232,146,26,.5);
  gap: 14px;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  margin: 0 -32px;
  padding: 24px 56px 28px;
  background: linear-gradient(180deg, #0b2244 0%, #071d37 100%);
  color: rgba(255,255,255,.62);
  font-size: 13px;
  border-top: 1px solid rgba(232,146,26,.22);
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(232,146,26,.5) 30%,
    rgba(232,146,26,.5) 70%,
    transparent 100%);
  opacity: .6;
}
.site-footer-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  letter-spacing: .04em;
}
.site-footer-dot { color: rgba(232,146,26,.7); }
.site-footer-right a {
  color: rgba(255,255,255,.65);
  transition: color .18s ease;
}
.site-footer-right a:hover { color: var(--gold-light); }

/* ── Mobile: header, FAQ, CTA, footer, container padding ───── */
@media (max-width: 720px) {
  .page-shell { padding: 0; }
  .page-card {
    border-radius: 0;
    min-height: 100vh;
    box-shadow: none;
  }
  .site-header-inner { padding: 12px 18px; gap: 14px; }
  .site-brand-logo { height: 28px; max-width: 150px; }
  .site-back-link { font-size: 13px; min-height: 40px; padding: 6px 12px; }

  .page { padding: 0 20px; }

  .faq-item summary {
    padding: 18px 12px;
    font-size: 15px;
    min-height: 56px;
    gap: 12px;
  }
  .faq-body { font-size: 14px; padding: 0 12px 18px; }

  .cta {
    margin: 24px -20px 0;
    padding: 48px 24px;
    border-radius: 16px;
  }
  .cta-title { font-size: clamp(24px, 7vw, 32px); }
  .cta-text  { font-size: 15px; margin-bottom: 22px; }
  .cta-btn {
    width: 100%;
    justify-content: center;
    padding: 15px 22px;
    min-height: 52px;
    font-size: 15px;
  }

  .site-footer {
    margin: 0 -20px;
    padding: 20px 24px 24px;
  }
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
  }
}

/* ── Hover only on devices that really support it ─────────── */
@media (hover: none) {
  .site-back-link:hover svg { transform: none; }
  .step-cta:hover { gap: 8px; transform: none; }
  .cta-btn:hover { gap: 10px; transform: none; }
  .demo-btn:hover { transform: none; }
  .checklist li:hover { transform: none; }
  .m-btn:hover { transform: none; }
}

/* ── Focus visible states for a11y ───────────────────────── */
.faq-item summary:focus-visible,
.cta-btn:focus-visible,
.demo-btn:focus-visible,
.step-cta:focus-visible,
.site-back-link:focus-visible,
.site-brand:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .blob { animation: none !important; }
}
