/* How-To tutorials — self-contained (does NOT load style.css: this page must stay light).
   Tokens mirror public/style.css :root so it reads as the same product. */
:root {
  --navy: #0f172a; --navy-light: #1e293b; --blue: #3b82f6; --blue-light: #eff6ff;
  --teal: #14b8a6; --red: #ef4444; --orange: #f97316; --yellow: #f59e0b;
  --gray-50: #f8fafc; --gray-100: #f1f5f9; --gray-200: #e2e8f0; --gray-300: #cbd5e1;
  --gray-400: #94a3b8; --gray-600: #475569; --gray-700: #334155; --gray-800: #1e293b; --white: #fff;
  --shadow: 0 1px 2px rgba(15,23,42,.06); --shadow-md: 0 4px 12px rgba(15,23,42,.10);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.16); --radius: 10px; --radius-lg: 14px;
  --accent: #f97316; /* overlay ink: warm orange reads on navy AND white UI */
  --topbar-h: 56px; --nav-w: 272px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--gray-800); background: var(--gray-50); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }

/* ── Buttons ── */
.ht-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap; }
.ht-btn-primary { background: var(--blue); color: var(--white); }
.ht-btn-primary:hover { background: #2563eb; }
.ht-btn-primary:disabled { opacity: .6; cursor: default; }
.ht-btn-ghost { background: transparent; color: var(--gray-200); border-color: rgba(255,255,255,.18); }
.ht-btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--white); }
.ht-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--radius); border: 0; background: transparent; color: inherit; cursor: pointer; }
.ht-icon-btn:hover { background: rgba(15,23,42,.06); }

/* ── Sign-in ── */
.ht-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%); }
.ht-login-box { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 32px; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 6px; }
.ht-login-brand { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.ht-login-brand h1 { margin: 0; font-size: 20px; }
.ht-login-brand p { margin: 2px 0 0; color: var(--gray-600); font-size: 14px; }
.ht-login-box label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-top: 8px; }
.ht-login-box input { padding: 10px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius); font: inherit; }
.ht-login-box input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
.ht-login-box .ht-btn { margin-top: 16px; justify-content: center; padding: 11px; }
.ht-login-error { color: var(--red); font-size: 13px; margin: 6px 0 0; }
.ht-login-help { text-align: center; font-size: 13px; color: var(--gray-600); margin: 12px 0 0; }
.ht-login-back { text-align: center; font-size: 13px; margin-top: 10px; }
.ht-logo-dot { flex: none; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--blue), var(--teal)); display: inline-block; }

/* ── App frame ── */
.ht-app { min-height: 100vh; display: flex; flex-direction: column; }
.ht-topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); background: var(--navy); color: var(--white); display: flex; align-items: center; gap: 12px; padding: 0 16px; box-shadow: var(--shadow-md); }
.ht-nav-toggle { display: none; color: var(--white); }
.ht-nav-toggle:hover { background: rgba(255,255,255,.1); }
.ht-brand { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 600; font-size: 15px; }
.ht-brand .ht-logo-dot { width: 26px; height: 26px; border-radius: 8px; }
.ht-brand-sep { color: var(--gray-400); }
.ht-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ht-lang { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 8px; padding: 2px; }
.ht-lang button { border: 0; background: transparent; color: var(--gray-300); padding: 5px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; cursor: pointer; }
.ht-lang button.active { background: var(--white); color: var(--navy); }

.ht-body { flex: 1; display: flex; }
.ht-nav { width: var(--nav-w); flex: none; background: var(--white); border-right: 1px solid var(--gray-200); padding: 18px 12px 32px; position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto; }
.ht-nav-section { margin-bottom: 18px; }
.ht-nav-section-title { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-400); padding: 0 10px 6px; }
.ht-nav-section-title .ti { font-size: 15px; color: var(--tone, var(--gray-400)); }
.ht-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--gray-700); font-size: 14px; font-weight: 500; }
.ht-nav a:hover { background: var(--gray-100); }
.ht-nav a.active { background: var(--tone-soft, var(--blue-light)); color: var(--tone-ink, var(--blue)); font-weight: 600; }
.ht-nav-num { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--gray-100); color: var(--gray-600); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ht-nav a.active .ht-nav-num { background: var(--tone, var(--blue)); color: var(--white); }
.ht-nav a.is-done .ht-nav-num { background: #dcfce7; color: #16a34a; font-size: 14px; }
.ht-nav a.active.is-done .ht-nav-num { background: #16a34a; color: var(--white); }
.ht-nav-soon { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: var(--gray-400); font-size: 14px; }
.ht-nav-soon .ht-nav-num { opacity: .5; }

.ht-main { flex: 1; min-width: 0; padding: 32px 40px 80px; }
.ht-status { color: var(--gray-600); }

/* ── Home ── */
.ht-home { max-width: 1080px; }

/* Section tones — Clinoview palette only (blue / teal / orange). */
.tone-blue { --tone: var(--blue); --tone-soft: #eff6ff; --tone-ink: #1d4ed8; }
.tone-teal { --tone: var(--teal); --tone-soft: #f0fdfa; --tone-ink: #0f766e; }
.tone-orange { --tone: var(--orange); --tone-soft: #fff7ed; --tone-ink: #c2410c; }

/* Hero banner */
.ht-hero-banner { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 34px 36px; border-radius: 20px; color: var(--white); background: linear-gradient(135deg, var(--navy) 0%, #13284a 55%, #0f3b47 100%); box-shadow: var(--shadow-lg); margin-bottom: 8px; animation: ht-rise .6s ease both; }
.ht-blob { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; pointer-events: none; animation: ht-drift 14s ease-in-out infinite alternate; }
.ht-blob.b1 { width: 320px; height: 320px; background: var(--blue); top: -140px; left: -80px; }
.ht-blob.b2 { width: 260px; height: 260px; background: var(--teal); bottom: -150px; right: 18%; animation-delay: -5s; }
.ht-blob.b3 { width: 180px; height: 180px; background: var(--orange); top: -60px; right: -40px; opacity: .35; animation-delay: -9s; }
.ht-hero-copy { position: relative; z-index: 1; }
.ht-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #99f6e4; }
.ht-kicker .ti { font-size: 15px; }
.ht-home .ht-hero-banner h1 { font-size: 34px; line-height: 1.15; margin: 14px 0 10px; letter-spacing: -.01em; background: linear-gradient(90deg, #fff 0%, #bfdbfe 60%, #99f6e4 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ht-hero-copy > p { color: #cbd5e1; margin: 0 0 18px; max-width: 560px; font-size: 15.5px; }
.ht-hero-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.ht-hero-stats > span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 10px; background: rgba(255,255,255,.07); font-size: 13px; font-weight: 600; color: #e2e8f0; }
.ht-hero-stats .ti { font-size: 16px; color: #5eead4; }
.ht-hero-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; font-size: 13px; color: #cbd5e1; }
.ht-hero-progress-bar { flex: 1; max-width: 220px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.ht-hero-progress-bar i { display: block; height: 100%; width: var(--pct, 0%); min-width: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--teal), #5eead4); animation: ht-grow 1.1s .3s cubic-bezier(.2,.8,.2,1) both; }
.ht-hero-cta { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 12px; background: linear-gradient(135deg, var(--orange), #fb923c); color: var(--white); font-weight: 700; font-size: 15px; box-shadow: 0 8px 22px rgba(249,115,22,.35); transition: transform .15s, box-shadow .15s; max-width: 100%; }
.ht-hero-cta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-hero-cta .ti { font-size: 18px; flex: none; }
.ht-hero-cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-100%); animation: ht-shine 3.6s 1.2s ease-in-out infinite; }
.ht-hero-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(249,115,22,.45); }
.ht-hero-cta:hover .ht-hero-cta-arrow { transform: translateX(3px); }
.ht-hero-cta-arrow { transition: transform .15s; }
.ht-hero-cta.is-done { background: linear-gradient(135deg, #16a34a, var(--teal)); box-shadow: 0 8px 22px rgba(20,184,166,.35); margin: 0; }
.ht-hero-cta.is-done::after { display: none; }
.ht-hero-art { position: relative; z-index: 1; height: 250px; }
.ht-hero-art .shot { position: absolute; width: 74%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border-radius: 12px; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 18px 40px rgba(2,6,23,.45); background: var(--white); }
.ht-hero-art .s1 { left: 0; top: 18px; --r: -6deg; transform: rotate(-6deg); animation: ht-float 7s ease-in-out infinite; }
.ht-hero-art .s2 { right: 0; top: 0; --r: 5deg; transform: rotate(5deg); animation: ht-float 8s -2s ease-in-out infinite; }
.ht-hero-art .s3 { left: 14%; bottom: 0; --r: -1deg; transform: rotate(-1deg); animation: ht-float 9s -4s ease-in-out infinite; z-index: 1; }
.ht-float { position: absolute; z-index: 2; width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; color: var(--white); box-shadow: 0 10px 22px rgba(2,6,23,.35); animation: ht-bob 4s ease-in-out infinite; }
.ht-float.f1 { background: var(--blue); left: -8px; bottom: 30px; }
.ht-float.f2 { background: var(--teal); right: 8px; bottom: -6px; animation-delay: -1.3s; }
.ht-float.f3 { background: var(--orange); right: 30%; top: -10px; animation-delay: -2.6s; }

/* Sections + cards */
.ht-home-section h2 { display: flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: .07em; text-transform: uppercase; color: var(--gray-700); margin: 34px 0 14px; }
.ht-section-icon { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone); color: var(--white); font-size: 18px; box-shadow: 0 4px 12px color-mix(in srgb, var(--tone) 40%, transparent); }
.ht-section-count { margin-left: auto; font-size: 12px; letter-spacing: 0; padding: 3px 10px; border-radius: 999px; background: var(--tone-soft); color: var(--tone-ink); }
.ht-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.ht-card { position: relative; background: var(--white); border: 1px solid var(--gray-200); border-radius: 16px; overflow: hidden; color: inherit; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s, border-color .2s; animation: ht-rise .5s calc(var(--i, 0) * 55ms + .15s) ease both; }
.ht-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; z-index: 2; background: linear-gradient(90deg, var(--tone), color-mix(in srgb, var(--tone) 40%, #fff)); }
.ht-card:hover { box-shadow: 0 16px 34px color-mix(in srgb, var(--tone) 22%, rgba(15,23,42,.12)); transform: translateY(-4px); border-color: color-mix(in srgb, var(--tone) 45%, var(--gray-200)); }
.ht-card-thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--tone-soft), var(--gray-100)); border-bottom: 1px solid var(--gray-200); }
.ht-card-shot { position: absolute; inset: 0; overflow: hidden; }
.ht-card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.ht-card-thumb.is-diagram img { object-fit: contain; object-position: center; padding: 10px; background: var(--white); }
.ht-card-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(15,23,42,.18)); pointer-events: none; }
.ht-card:hover .ht-card-thumb img { transform: scale(1.06); }
.ht-card-icon { position: absolute; left: 14px; bottom: -1px; z-index: 1; width: 44px; height: 44px; transform: translateY(40%); border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone); color: var(--white); font-size: 23px; border: 3px solid var(--white); box-shadow: 0 6px 16px color-mix(in srgb, var(--tone) 45%, transparent); transition: transform .25s; }
.ht-card:hover .ht-card-icon { transform: translateY(40%) rotate(-8deg) scale(1.08); }
.ht-card-badge { position: absolute; right: 10px; top: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #16a34a; color: var(--white); font-size: 12px; font-weight: 700; box-shadow: 0 4px 10px rgba(22,163,74,.35); }
.ht-card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 30px 18px 16px; }
.ht-card h3 { margin: 0; font-size: 16.5px; line-height: 1.3; }
.ht-card p { margin: 0; color: var(--gray-600); font-size: 14px; }
.ht-card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ht-card-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--gray-400); font-weight: 600; }
.ht-card-meta .ti { font-size: 15px; }
.ht-card-go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--tone-ink); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; }
.ht-card:hover .ht-card-go, .ht-card:focus-visible .ht-card-go { opacity: 1; transform: none; }
.ht-card-progress { height: 5px; border-radius: 999px; background: var(--gray-100); overflow: hidden; margin-top: 8px; }
.ht-card-progress i { display: block; height: 100%; border-radius: 999px; background: var(--tone); }
.ht-card.is-done .ht-card-meta { color: #16a34a; }
.ht-card:focus-visible { outline: 3px solid var(--tone); outline-offset: 3px; }

@keyframes ht-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes ht-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 24px) scale(1.15); } }
@keyframes ht-float { 0%, 100% { transform: rotate(var(--r)) translateY(0); } 50% { transform: rotate(var(--r)) translateY(-8px); } }
@keyframes ht-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(6deg); } }
@keyframes ht-grow { from { width: 0; } }
@keyframes ht-shine { 0% { transform: translateX(-100%); } 40%, 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
  .ht-hero-banner, .ht-card, .ht-blob, .ht-hero-art .shot, .ht-float, .ht-hero-progress-bar i, .ht-hero-cta::after { animation: none !important; }
  .ht-card:hover, .ht-card:hover .ht-card-thumb img, .ht-card:hover .ht-card-icon { transform: none; }
}
@media (max-width: 1100px) { .ht-hero-banner { grid-template-columns: 1fr; } .ht-hero-art { display: none; } }
@media (max-width: 700px) {
  .ht-hero-banner { padding: 24px 20px; border-radius: 16px; }
  .ht-home .ht-hero-banner h1 { font-size: 26px; }
  .ht-hero-cta { width: 100%; justify-content: center; }
  .ht-card-go { opacity: 1; transform: none; }
}
@media print { .ht-blob, .ht-hero-art { display: none; } }

/* ── Article ── */
.ht-article { max-width: 920px; }
.ht-crumb { font-size: 13px; color: var(--gray-400); margin-bottom: 8px; }
.ht-article-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.ht-article h1 { font-size: 28px; margin: 0; line-height: 1.2; }
.ht-article-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.ht-btn-outline { background: var(--white); color: var(--gray-700); border-color: var(--gray-300); }
.ht-btn-outline:hover { background: var(--gray-100); }
.ht-summary { color: var(--gray-600); font-size: 16px; margin: 0 0 28px; max-width: 700px; }

/* Intro section — candidate styles, ported into public/howto.css when approved.
   Design rules this file holds to:
   · TWO containers in the whole section: the cover, and the one filled "Qué NO es" box.
     Everything else sits on the page, grouped by space instead of by borders.
   · THREE inks: navy (text), blue (the flow, and only the flow), orange (the one warning).
   · FIVE type steps: 26 / 16 / 15 / 14 / 11. No half-pixel sizes.
   · TWO spacing values: 12px inside a group, 44px between groups. */

/* Intro — the orientation section above the numbered steps.
   TWO containers in the whole section: the cover, and the one filled "Qué NO es" box.
   Everything else sits on the page, grouped by space instead of by borders.
   THREE inks: navy (text), blue (the flow, and only the flow), orange (the one warning).
   FIVE type steps: 26 / 16 / 15 / 14 / 12 / 11 — no half-pixel sizes.
   TWO spacing values: 12px inside a group, 44px between groups. */
.ht-intro { margin: 0 0 32px; max-width: 940px; }
.ht-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); background: var(--gray-100); }
.ht-intro-not { background: var(--gray-50); border: 1px solid var(--gray-200); border-left: 4px solid var(--orange); border-radius: var(--radius); padding: 15px 17px; margin: 0 0 28px; }
.ht-intro-not > strong { display: block; color: var(--navy); font-size: 15px; margin-bottom: 7px; }
.ht-intro-not ul { margin: 0; padding-left: 20px; color: var(--gray-600); font-size: 14px; line-height: 1.6; }
.ht-intro-not li + li { margin-top: 5px; }
.ht-intro-note { color: var(--gray-600); font-size: 14px; line-height: 1.55; margin: 0; max-width: 760px; }

.ht-hero { font-size: 26px; line-height: 1.28; font-weight: 700; color: var(--navy); margin: 24px 0 10px; max-width: 760px; letter-spacing: -.015em; }
.ht-hero-sub { font-size: 16px; line-height: 1.55; color: var(--gray-600); margin: 0 0 40px; max-width: 640px; }

/* Gains: no cards. A rule above each one groups them without boxing them. */
.ht-gains { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 28px; margin: 0 0 44px; }
.ht-gain { padding: 14px 0 0; border-top: 2px solid var(--gray-300); }
.ht-gain strong { display: block; min-height: 41px; color: var(--navy); font-size: 15px; line-height: 1.35; margin-bottom: 5px; }
.ht-gain span { display: block; color: var(--gray-600); font-size: 14px; line-height: 1.55; }

/* Flow: a labelled rail on the page, not a card inside a card. */
.ht-flow { margin: 0 0 44px; }
.ht-flow-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-600); margin: 0 0 14px; }
.ht-flow-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 12px; }
/* Nodes and tracks share ONE shell — two chrome treatments inside one diagram signalled nothing. */
.ht-flow-node, .ht-flow-track { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.ht-flow-node { display: flex; gap: 11px; align-items: center; }
.ht-flow-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ht-flow-node > div > strong, .ht-flow-track strong { display: block; color: var(--navy); font-size: 15px; line-height: 1.35; }
.ht-flow-track span { display: block; color: var(--gray-600); font-size: 14px; line-height: 1.5; margin-top: 4px; }
.ht-flow-arrow { align-self: center; width: 26px; height: 2px; background: var(--blue); position: relative; }
.ht-flow-arrow::after { content: ''; position: absolute; right: -1px; top: -4px; border-left: 8px solid var(--blue); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
/* The split: a stem down from the head row, then an inverted-U whose legs drop into the two
   track columns. Blue like every other connector, at 2px — gray-300 was 1.5:1 and vanished. */
.ht-flow-split { position: relative; height: 28px; }
.ht-flow-split::before { content: ''; position: absolute; left: calc(75% + 2px); top: 0; width: 2px; height: 15px; margin-left: -1px; background: var(--blue); }
.ht-flow-split::after { content: ''; position: absolute; left: calc(25% - 3px); right: calc(25% - 3px); top: 12px; height: 16px;
  border: 2px solid var(--blue); border-bottom: 0; border-radius: 10px 0 0 0; }
/* Where both branches end up: the mirror of the split — legs up out of the two tracks, a
   bar, then a stem down into the full-width last step. Same 2px blue as every connector. */
.ht-flow-converge { position: relative; height: 28px; }
.ht-flow-converge::before { content: ''; position: absolute; left: calc(25% - 3px); right: calc(25% - 3px); top: 0; height: 16px;
  border: 2px solid var(--blue); border-top: 0; border-radius: 0 0 10px 10px; }
.ht-flow-converge::after { content: ''; position: absolute; left: 50%; top: 14px; width: 2px; height: 14px; margin-left: -1px; background: var(--blue); }
.ht-flow-last { margin-top: 0; }

.ht-flow-tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
/* The tag carries the nueva/conocida distinction, so the cards need no coloured rules. */
.ht-flow-track .ht-flow-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-700); background: var(--gray-100); border-radius: 999px; padding: 3px 9px; margin-bottom: 8px; }

.ht-cta { font-size: 15px; line-height: 1.55; color: var(--gray-700); margin: 0 0 8px; }
.ht-cta strong { color: var(--navy); }

.ht-step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; margin-bottom: 36px; scroll-margin-top: calc(var(--topbar-h) + 16px); }
.ht-step.ht-step-solo { grid-template-columns: 1fr; }
.ht-step-num { width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; box-shadow: var(--shadow-md); }
.ht-step-text { font-size: 17px; font-weight: 500; margin: 6px 0 14px; }
.ht-step-text code, .ht-step-text kbd { background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 6px; padding: 1px 6px; font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ht-step-note { font-size: 14px; color: var(--gray-600); margin: -6px 0 14px; }

/* ── Figure + overlays ── */
.ht-figure { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-200); box-shadow: var(--shadow-md); background: var(--gray-100); line-height: 0; }
.ht-figure img { display: block; width: 100%; height: auto; }
.ht-frames { position: relative; }
.ht-frames img { position: absolute; inset: 0; top: 0; left: 0; opacity: 0; transition: opacity .35s ease; }
.ht-frames img.current { opacity: 1; }
.ht-frames img.sizer { position: relative; opacity: 0; }
.ht-frames img.sizer.current { opacity: 1; }
.ht-overlay-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ht-overlay-svg .ht-box { fill: none; stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; paint-order: stroke; filter: drop-shadow(0 0 1.5px rgba(15,23,42,.6)); }
.ht-overlay-svg .ht-dim { fill: rgba(15,23,42,.26); }
.ht-overlay-svg .ht-arrow { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ht-overlay-svg .ht-arrow-head { fill: var(--accent); }
.ht-overlay-svg .ht-zoom-src { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }

.ht-marker { position: absolute; pointer-events: none; transform: translate(-50%, -50%); }
.ht-badge { width: 28px; height: 28px; border-radius: 50%; background: var(--white); color: var(--navy); font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px var(--accent), var(--shadow-md); line-height: 1; }
.ht-callout { transform: translate(-50%, calc(-100% - 14px)); background: var(--navy); color: var(--white); font-size: 13px; font-weight: 500; line-height: 1.35; padding: 8px 12px; border-radius: 8px; width: max-content; max-width: 240px; box-shadow: var(--shadow-lg); white-space: normal; }
.ht-callout::after { content: ""; position: absolute; left: var(--tail, 50%); top: 100%; transform: translateX(-50%); border: 7px solid transparent; border-top-color: var(--navy); }
.ht-callout.tone-success { background: #14532d; }
.ht-callout.tone-success::before { content: "✓ "; font-weight: 700; }
.ht-callout.tone-success::after { border-top-color: #14532d; }
.ht-callout.tone-success.dir-up::after { border-top-color: transparent; border-bottom-color: #14532d; }
.ht-callout.tone-success.dir-left::after { border-color: transparent #14532d transparent transparent; }
.ht-callout.tone-success.dir-right::after { border-color: transparent transparent transparent #14532d; }
.ht-figure.loading .ht-demo-chip::before { border: 2px solid var(--gray-300); border-top-color: var(--blue); background: transparent; animation: ht-spin .8s linear infinite; }
@keyframes ht-spin { to { transform: rotate(360deg); } }
.ht-callout.dir-up { transform: translate(-50%, 14px); }
.ht-callout.dir-up::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--navy); }
.ht-callout.dir-left { transform: translate(14px, -50%); }
.ht-callout.dir-left::after { left: auto; right: 100%; top: 50%; transform: translateY(-50%); border-color: transparent var(--navy) transparent transparent; }
.ht-callout.dir-right { transform: translate(calc(-100% - 14px), -50%); }
.ht-callout.dir-right::after { left: 100%; top: 50%; transform: translateY(-50%); border-color: transparent transparent transparent var(--navy); }

.ht-click { width: 26px; height: 26px; border-radius: 50%; background: rgba(249,115,22,.16); border: 3px solid var(--accent); box-shadow: 0 0 0 1.5px var(--white); }
.ht-click::before, .ht-click::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--accent); animation: ht-pulse 1.5s ease-out infinite; }
.ht-click::after { animation-delay: .75s; }
.ht-figure.paused .ht-click::before, .ht-figure.paused .ht-click::after { animation-play-state: paused; }
@keyframes ht-pulse { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(2); opacity: 0; } }
.ht-marker, .ht-type-text { transition: opacity .25s ease; }
.ht-marker[hidden] { display: block !important; opacity: 0; pointer-events: none; }
.ht-overlay-svg .ht-timed { transition: opacity .25s ease; }
.ht-overlay-svg .is-hidden { opacity: 0; }
.ht-cursor.is-hidden { opacity: 0; }

.ht-cursor { width: 26px; height: 30px; transform: translate(-4px, -2px); filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }

.ht-zoom { position: absolute; border: 3px solid var(--accent); border-radius: 12px; box-shadow: var(--shadow-lg), 0 0 0 3px rgba(255,255,255,.9); background-repeat: no-repeat; background-color: var(--white); pointer-events: none; overflow: hidden; }

.ht-figure-wrap { margin: 0 auto 0 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-200); box-shadow: var(--shadow-md); background: var(--white); }
.ht-figure-wrap .ht-figure, .ht-figure-wrap .ht-browser { border-radius: 0; border: 0; box-shadow: none; }
.ht-figure-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; background: var(--gray-100); border-top: 1px solid var(--gray-200); flex-wrap: wrap; }
.ht-demo-chip { white-space: nowrap; }
.ht-demo-chip { font-size: 13px; font-weight: 500; color: var(--gray-600); display: inline-flex; align-items: center; gap: 6px; }
.ht-demo-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gray-400); }
.ht-figure-controls button:focus-visible, .ht-btn:focus-visible, .ht-lang button:focus-visible, .ht-nav a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.ht-figure-controls { display: flex; gap: 8px; }
.ht-figure-controls button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--gray-300); border-radius: 8px; background: var(--white); color: var(--gray-800); font-size: 14px; font-weight: 600; padding: 7px 12px; cursor: pointer; line-height: 1; }
.ht-figure-controls button:hover { border-color: var(--navy); }
.ht-figure-controls svg { width: 14px; height: 14px; fill: currentColor; }
.ht-frame-dots { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 5px; pointer-events: none; }
.ht-frame-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.55); box-shadow: 0 0 0 1px rgba(15,23,42,.3); }
.ht-frame-dots span.current { background: var(--accent); }

.ht-article-foot { margin-top: 12px; padding-top: 22px; border-top: 1px solid var(--gray-200); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ht-article-foot a { display: inline-flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--white); color: inherit; min-width: 200px; }
.ht-article-foot a:hover { border-color: var(--blue); }
.ht-article-foot small { color: var(--gray-400); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.ht-article-foot .next { margin-left: auto; text-align: right; }
.ht-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-lg); z-index: 50; }

@media (prefers-reduced-motion: reduce) {
  .ht-click::before, .ht-click::after, .ht-cursor.tap::after { animation: none; opacity: .6; transform: none; }
}
@media (max-width: 900px) {
  .ht-nav-toggle { display: inline-flex; }
  .ht-nav { position: fixed; left: 0; top: var(--topbar-h); z-index: 15; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .ht-nav.open { transform: none; }
  .ht-main { padding: 20px 16px 60px; }
  .ht-article h1 { font-size: 22px; }
  .ht-brand-name, .ht-brand-sep { display: none; }
  .ht-btn-ghost span { display: none; }
  .ht-step { grid-template-columns: 34px 1fr; gap: 10px; }
  .ht-step-num { width: 30px; height: 30px; font-size: 13px; }
  .ht-step-text { font-size: 15px; }
  .ht-callout { max-width: 170px; font-size: 12px; padding: 6px 9px; }
  .ht-click { width: 34px; height: 34px; }
  .ht-article-head { flex-wrap: wrap; }
  .ht-article-actions { margin-left: 0; width: 100%; }
  .ht-article-actions .ht-btn { flex: 1; justify-content: center; }
  .ht-browser-tab { display: none; }
}
@media (max-width: 700px) {

  .ht-hero { font-size: 21px; }
  .ht-hero-sub { font-size: 15px; margin-bottom: 32px; }
  /* One breakpoint for the whole section — the intrinsic minmax() reflows fired at three
     different widths, so the layout jumped three times on the way down. */
  .ht-gains, .ht-flow-head, .ht-flow-tracks { grid-template-columns: 1fr; }
  .ht-gains { gap: 22px; margin-bottom: 32px; }
  .ht-gain strong { min-height: 0; }
  .ht-flow { margin-bottom: 32px; }
  .ht-flow-arrow { width: 2px; height: 18px; justify-self: center; }
  .ht-flow-arrow::after { right: -4px; top: auto; bottom: -1px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 8px solid var(--blue); border-bottom: none; }
  /* Stacked tracks: the inverted-U would land on nothing, so it becomes a plain stem. */
  .ht-flow-split { height: 20px; }
  .ht-flow-split::before { left: 50%; height: 20px; }
  .ht-flow-split::after { left: 50%; right: auto; width: 2px; height: 20px; top: 0; margin-left: -1px; border: 0; border-radius: 0; background: var(--blue); }
  .ht-flow-converge { height: 20px; }
  .ht-flow-converge::before { left: 50%; right: auto; width: 2px; height: 20px; top: 0; margin-left: -1px; border: 0; border-radius: 0; background: var(--blue); }
  .ht-flow-converge::after { display: none; }
  /* A 16:9 cover composed for 940px is 190px of illegible mush on a phone: show the
     headline half instead of shrinking the whole composition. */
  .ht-cover { aspect-ratio: 5 / 3; object-position: 14% center; }
  .ht-intro-not ul { padding-left: 18px; }
}
@media print {
  .ht-topbar, .ht-nav, .ht-article-actions, .ht-figure-controls, .ht-article-foot, .ht-frame-dots { display: none !important; }
  .ht-overlay-svg .ht-dim { display: none; }
  .ht-callout, .ht-step-num, .ht-badge, .ht-type, .ht-click, .ht-topbar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ht-main { padding: 0; }
  .ht-step { break-inside: avoid; }
  .ht-cover, .ht-flow-node, .ht-flow-track { box-shadow: none; }
  .ht-gain, .ht-flow, .ht-intro-not { break-inside: avoid; }
}

/* ── Browser chrome around a screenshot ── */
.ht-browser { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-300); box-shadow: var(--shadow-md); background: var(--gray-200); }
.ht-browser .ht-figure { border-radius: 0; border: 0; box-shadow: none; }
.ht-browser-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 10px; background: var(--gray-200); }
.ht-browser-tab { display: inline-flex; align-items: center; gap: 7px; background: var(--white); border-radius: 8px 8px 0 0; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--gray-700); margin-bottom: -8px; align-self: flex-end; }
.ht-browser-tab-dot { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--blue), var(--teal)); }
.ht-browser-nav { color: var(--gray-400); display: inline-flex; }
.ht-browser-url { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--gray-300); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--gray-800); min-height: 32px; font-weight: 500; }
.ht-browser-lock { color: var(--gray-600); display: inline-flex; }
.ht-browser-url-text::after { content: ""; display: inline-block; width: 2px; height: 1em; background: var(--gray-800); margin-left: 1px; vertical-align: -2px; animation: ht-caret 1s step-end infinite; }
.ht-browser-url-text:not(.ht-typing-run):not(:empty)::after { display: none; }
@keyframes ht-caret { 50% { opacity: 0; } }

/* ── Simulated typing over an input ── */
.ht-type { position: absolute; display: flex; align-items: center; box-sizing: border-box; padding: 0 0 0 .85em; background: var(--white); background-clip: padding-box; border: 2px solid transparent; border-radius: 6px; color: var(--gray-800); font-family: inherit; font-weight: 400; line-height: 1; overflow: hidden; pointer-events: none; }
.ht-type-text { white-space: pre; letter-spacing: .01em; }
.ht-type-caret { width: 2px; height: 55%; background: var(--gray-800); margin-left: 2px; opacity: 0; }
.ht-type.typing .ht-type-caret { opacity: 1; animation: ht-caret 1s step-end infinite; }
.ht-figure-controls button + button { margin-left: 0; }

/* ── Tips, learn-more, step completion, progress ── */
.ht-tip { display: flex; gap: 10px; align-items: flex-start; background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid var(--yellow); border-radius: var(--radius); padding: 10px 14px; margin: 12px 0 0; font-size: 14px; color: #713f12; }
.ht-tip-icon { flex: none; font-size: 16px; line-height: 1.3; }
.ht-tip strong { color: #92400e; }
.ht-more { margin: 12px 0 0; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--white); }
.ht-more summary { cursor: pointer; padding: 10px 14px; font-size: 14px; font-weight: 600; color: var(--gray-700); list-style: none; display: flex; align-items: center; gap: 8px; }
.ht-more summary::-webkit-details-marker { display: none; }
.ht-more summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--gray-400); border-bottom: 2px solid var(--gray-400); transform: rotate(-45deg); transition: transform .15s; margin-left: 2px; }
.ht-more[open] summary::before { transform: rotate(45deg); }
.ht-more-body { padding: 0 14px 12px; font-size: 14px; color: var(--gray-700); line-height: 1.55; }
.ht-more-body p { margin: 0 0 8px; }
.ht-step-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.ht-done-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--gray-300); background: var(--white); color: var(--gray-700); font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.ht-done-btn:hover { border-color: var(--blue); color: var(--blue); }
.ht-done-btn .ht-done-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.ht-step.is-answered .ht-done-btn { background: #dcfce7; border-color: #86efac; color: #166534; }
.ht-step.is-answered .ht-done-btn .ht-done-check { background: #16a34a; border-color: #16a34a; color: var(--white); }
.ht-step.is-answered .ht-step-num { background: #16a34a; }
.ht-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--gray-600); margin: 0 0 20px; }
.ht-progress-bar { flex: 1; max-width: 260px; height: 6px; border-radius: 999px; background: var(--gray-200); overflow: hidden; }
.ht-progress-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--teal)); border-radius: 999px; transition: width .4s ease; }
.ht-complete { margin: 8px 0 20px; padding: 16px 18px; border-radius: var(--radius-lg); background: linear-gradient(135deg, #ecfdf5, #eff6ff); border: 1px solid #a7f3d0; display: flex; align-items: center; gap: 14px; }
.ht-complete strong { display: block; font-size: 16px; color: #065f46; }
.ht-complete span { font-size: 14px; color: var(--gray-700); }
.ht-sound { color: var(--gray-300); }
.ht-sound:hover { background: rgba(255,255,255,.1); color: var(--white); }
.ht-sound[aria-pressed="true"] { color: var(--white); }
.ht-sound .ht-sound-on { display: none; }
.ht-sound[aria-pressed="true"] .ht-sound-on { display: block; }
.ht-sound[aria-pressed="true"] .ht-sound-off { display: none; }
.ht-benefit { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #065f46; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; padding: 3px 10px; margin: 8px 8px 0 0; }
.ht-type.multiline { align-items: flex-start; padding-top: .55em; }
.ht-type.multiline .ht-type-text { white-space: pre-wrap; word-break: break-word; line-height: 1.35; }
@media print { .ht-done-btn, .ht-progress, .ht-sound { display: none !important; } .ht-more[open] summary::before { display: none; } .ht-more:not([open]) .ht-more-body { display: block; } }

/* ?embed=1 — a guide inside the dashboard's onboarding popup (public/onboarding.js): the
   steps only. howto.js hides the steps not asked for; .ht-step is a grid, so [hidden]
   needs its own rule. */
.ht-step[hidden] { display: none; }
.ht-embed .ht-topbar, .ht-embed .ht-nav, .ht-embed .ht-crumb, .ht-embed .ht-article-head,
.ht-embed .ht-summary, .ht-embed .ht-intro, .ht-embed .ht-progress, .ht-embed .ht-complete,
.ht-embed .ht-step-foot, .ht-embed .ht-article-foot { display: none; }
.ht-embed .ht-main { padding: 16px 20px 8px; }
.ht-embed .ht-step { margin-bottom: 24px; }
.ht-embed .ht-step-text { font-size: 15px; }
@media (max-width: 640px) { .ht-embed .ht-main { padding: 12px 10px 4px; } .ht-embed .ht-step { grid-template-columns: 1fr; gap: 6px; } }
