/* ==========================================================================
   BULLDER · help (prefijos hp- y hpg- para la guía). Centro de ayuda, artículo, guía, glosario y contacto.
   Solo variables del núcleo: se ve bien en tema oscuro y claro.
   ========================================================================== */

/* color de cada categoría */
[data-hp-cat] { --hp-c: var(--accent); }
[data-hp-cat="log"] { --hp-c: var(--c1); }
[data-hp-cat="routines"] { --hp-c: var(--c2); }
[data-hp-cat="exercises"] { --hp-c: var(--c5); }
[data-hp-cat="coach"] { --hp-c: var(--c6); }
[data-hp-cat="progress"] { --hp-c: var(--pr); }
[data-hp-cat="nutrition"] { --hp-c: var(--c3); }
[data-hp-cat="social"] { --hp-c: var(--c4); }
[data-hp-cat="account"] { --hp-c: var(--c8); }
[data-hp-cat="install"] { --hp-c: var(--info); }
[data-hp-cat="trainers"] { --hp-c: var(--c7); }
[data-hp-cat="glossary"] { --hp-c: var(--text-2); }

.hp-block { display: block; }
.hp-dim { color: var(--text-3); }
.hp-inl { display: inline-block; vertical-align: -3px; margin: 0 1px; color: var(--text-2); }
:is(.hp-home, .hp-gloss) mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 1px; box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--accent) 55%, transparent); }

/* ------------------------------------------------------------------ enlace "¿Cómo funciona?" (tip.js) */
.hp-tip { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 10px 0 8px; border-radius: var(--r-full); color: var(--text-2); font: 600 12.5px/1 var(--font); background: transparent; border: 1px solid var(--line); transition: color .15s, border-color .15s, background .15s; vertical-align: middle; }
.hp-tip:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface); }
.hp-tip .ic { color: var(--accent); }
.hp-tip.is-icon { width: 36px; height: 36px; padding: 0; justify-content: center; border-color: transparent; }
/* área táctil de 44 px sin agrandar el dibujo */
.hp-tip { position: relative; }
.hp-tip::after { content: ""; position: absolute; inset: -6px -2px; }

/* ------------------------------------------------------------------ inicio de ayuda */
.hp-home { display: flex; flex-direction: column; gap: var(--sp-5); }
.hp-hero { position: relative; text-align: center; padding: var(--sp-6) var(--sp-4) var(--sp-5); border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 62%), var(--surface); border: 1px solid var(--line); }
.hp-hero h1 { font-size: 26px; margin-top: var(--sp-3); }
.hp-hero > p { margin-top: 6px; font-size: 14.5px; }
.hp-hero-ic { width: 56px; height: 56px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.hp-search { margin: var(--sp-4) auto 0; max-width: 520px; }
.hp-search .input, .hp-gloss-search .input { min-height: 52px; font-size: 16px; background: var(--bg-elev); padding-right: 48px; }
.hp-search .input::-webkit-search-cancel-button, .hp-gloss-search .input::-webkit-search-cancel-button { display: none; }
.hp-search .input-suffix, .hp-gloss-search .input-suffix { width: 40px; height: 40px; color: var(--text-2); }
.hp-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: var(--sp-3); }
.hp-suggest .chip { height: 32px; padding: 0 12px; font-size: 12.5px; background: transparent; }
.hp-home-body { display: flex; flex-direction: column; gap: var(--sp-5); }
.hp-home-body .section-head { margin: 0 0 var(--sp-3); }
.hp-home-body [data-checklist]:empty { display: none; }

.hp-count { margin: 0 2px var(--sp-2); }
.hp-sub-head { margin: var(--sp-5) 2px var(--sp-3); }
.hp-results mark, .hp-term-hit mark { font-weight: inherit; }
.hp-row { align-items: center; }
.hp-row-title { display: block; line-height: 1.3; }
.hp-row-sub { display: block; line-height: 1.35; }
.hp-row-cat { color: var(--text-3); font-weight: 600; }
.hp-cat-ic { color: var(--hp-c); background: color-mix(in srgb, var(--hp-c) 14%, transparent); }
.hp-term-hits { display: grid; gap: var(--sp-2); }
.hp-term-hit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 12px var(--sp-4); }
.hp-term-hit b { font: 700 15.5px/1.2 var(--font-display); }
.hp-term-hit p { flex-basis: 100%; }
.hp-search-foot { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin-top: var(--sp-4); color: var(--text-2); font-weight: 600; font-size: 14px; }
.hp-search-foot:hover { color: var(--text); }
.hp-noresults .empty { padding: 32px 12px; }

/* promoción de la guía */
.hp-promo { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-4); border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(120deg, color-mix(in srgb, var(--navy) 55%, var(--surface)) 0%, var(--surface) 70%); transition: transform .15s var(--ease), border-color .15s; }
:root[data-theme="light"] .hp-promo { background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 14%, var(--surface)) 0%, var(--surface) 70%); }
.hp-promo:hover { border-color: var(--line-strong); }
.hp-promo:active { transform: scale(.985); }
.hp-promo-art { flex: none; width: 86px; height: 104px; display: grid; place-items: center; }
.hp-mini-phone { width: 62px; height: 100px; border-radius: 14px; border: 2px solid var(--line-strong); background: var(--bg-elev); padding: 10px 7px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); transform: rotate(-6deg); }
.hp-mini-phone i { display: block; border-radius: 4px; background: var(--surface-3); }
.hp-mp-bar { height: 7px; width: 70%; }
.hp-mp-row { height: 11px; position: relative; }
.hp-mp-row.is-done { background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); }
.hp-mp-row.is-done::after { content: ""; position: absolute; right: 3px; top: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.hp-mp-btn { height: 13px; margin-top: auto; background: var(--accent) !important; }
.hp-promo-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hp-promo-txt b { font: 700 17px/1.2 var(--font-display); }
.hp-promo-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--accent); font-weight: 700; font-size: 14px; }

/* categorías */
.hp-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.hp-cat { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; min-height: 118px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: transform .12s var(--ease), border-color .15s; }
.hp-cat:hover { border-color: color-mix(in srgb, var(--hp-c) 45%, var(--line)); }
.hp-cat:active { transform: scale(.975); }
.hp-cat .hp-cat-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.hp-cat-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hp-cat-txt b { font: 650 14.5px/1.2 var(--font); }
.hp-cat-txt span { font-size: 12px; line-height: 1.3; color: var(--text-3); }
.hp-cat-n { position: absolute; top: 12px; right: 12px; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); font: 650 11.5px/1 var(--font); }

.hp-rank { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); font: 700 14px/1 var(--font-display); }
.hp-popular .hp-row:first-child .hp-rank { background: var(--accent-soft); color: var(--accent); }

.hp-two { display: grid; gap: var(--sp-5); }
.hp-quick-grid { display: grid; gap: var(--sp-2); }
.hp-quick { display: flex; align-items: center; gap: var(--sp-3); padding: 12px var(--sp-4); min-height: 64px; }
.hp-quick b { font-weight: 650; }

.hp-contact-card { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--surface); border: 1px dashed var(--line-strong); }
.hp-contact-card b { font: 700 16px/1.25 var(--font-display); display: block; margin-bottom: 3px; }
.hp-contact-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.hp-contact-card .btn { flex: 1 1 100%; }

/* ------------------------------------------------------------------ lista de comprobación (widgets.js) */
.hp-cl { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--surface)), var(--surface) 55%); }
.hp-cl-head { display: flex; align-items: center; gap: var(--sp-3); }
.hp-cl-title { font: 700 17px/1.2 var(--font-display); display: block; }
.hp-cl-head p { margin-top: 3px; }
.hp-cl-x { width: 44px; height: 44px; margin: -8px -8px 0 0; align-self: flex-start; color: var(--text-3); }
.hp-cl-ring { --p: 0; width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); }
.hp-cl-ring::before { content: ""; grid-area: 1 / 1; width: 42px; height: 42px; border-radius: 50%; background: var(--surface); }
.hp-cl-ring span { grid-area: 1 / 1; position: relative; font: 700 13.5px/1 var(--font-display); }
.hp-cl-bar { display: none; }
.hp-cl-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.hp-cl-step { display: flex; align-items: center; gap: var(--sp-3); min-height: 54px; padding: 8px 10px; margin: 0 -6px; border-radius: var(--r-sm); transition: background .15s; }
a.hp-cl-step:hover { background: var(--surface-2); }
a.hp-cl-step:active { transform: scale(.99); }
.hp-cl-check { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px dashed var(--line-strong); color: var(--text-2); }
.hp-cl-step.is-done .hp-cl-check { border: 0; background: var(--accent); color: var(--on-accent); }
.hp-cl-st { display: block; font-weight: 650; font-size: 14.5px; line-height: 1.25; }
.hp-cl-sub { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.hp-cl-step.is-done .hp-cl-st { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--line-strong); font-weight: 600; }
.hp-cl.is-complete { background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface) 70%); }
.hp-cl-done { display: flex; align-items: center; gap: var(--sp-3); }
.hp-cl-party { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }

/* ------------------------------------------------------------------ categoría */
.hp-catpage { display: flex; flex-direction: column; gap: var(--sp-5); }
.hp-cat-hero { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-2) 2px 0; }
.hp-cat-hero h1 { font-size: 26px; }
.hp-cat-hero p { margin-top: 4px; font-size: 14px; }
.hp-cat-ic.is-lg { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; flex: none; }
.hp-cat-hero .hp-cat-ic { color: var(--hp-c); background: color-mix(in srgb, var(--hp-c) 14%, transparent); }
.hp-cat-layout { display: grid; gap: var(--sp-5); }
.hp-cat-list .list-item { min-height: 68px; }
.hp-other-cats { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.hp-chip-cat .ic { color: var(--text-3); }

/* ------------------------------------------------------------------ artículo */
.hp-art-layout { display: grid; gap: var(--sp-6); }
.hp-art-main { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.hp-article { display: flex; flex-direction: column; gap: var(--sp-4); }
.hp-crumb { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px 0 4px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font: 650 12.5px/1 var(--font); }
.hp-crumb:hover { color: var(--text); border-color: var(--line-strong); }
.hp-crumb-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--hp-c); background: color-mix(in srgb, var(--hp-c) 16%, transparent); }
.hp-title { font-size: 27px; line-height: 1.15; text-wrap: balance; }
.hp-summary { font-size: 16px; color: var(--text-2); margin-top: -6px; text-wrap: pretty; }
.hp-article.is-compact .hp-summary { margin-top: 0; }
.hp-intro { font-size: 15.5px; line-height: 1.55; }
.hp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; counter-reset: none; }
.hp-steps li { position: relative; display: flex; gap: var(--sp-3); padding-bottom: var(--sp-4); }
.hp-steps li:last-child { padding-bottom: 0; }
.hp-steps li:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--line); }
.hp-step-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); font: 700 15px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.hp-step-t { padding-top: 5px; font-size: 15.5px; line-height: 1.5; text-wrap: pretty; }
.hp-step-t b, .hp-intro b, .hp-tips b, .hp-term b { font-weight: 650; color: var(--text); }
.hp-links { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.hp-links .btn { flex: 1 1 auto; }
.hp-tips { padding: 14px var(--sp-4); border-radius: var(--r); background: color-mix(in srgb, var(--pr) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--pr) 22%, transparent); }
.hp-tips-head { display: flex; align-items: center; gap: 8px; color: var(--pr); font: 700 12px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; }
.hp-tips ul { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.hp-tips li { font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.hp-tips li::marker { color: var(--pr); }

.hp-vote { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.hp-vote-q { flex: 1 1 200px; display: flex; flex-direction: column; gap: 3px; }
.hp-vote-q b { font: 700 16px/1.2 var(--font-display); }
.hp-vote-btns { display: flex; gap: var(--sp-2); }
.hp-vote-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; min-width: 76px; justify-content: center; padding: 0 16px; border-radius: var(--r-full); border: 1.5px solid var(--line-strong); color: var(--text); font: 650 14px/1 var(--font); transition: all .15s var(--ease); }
.hp-vote-btn:hover { background: var(--surface-2); }
.hp-vote-btn:active { transform: scale(.95); }
.hp-vote-btn.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.hp-vote-btn.is-active.is-no { background: var(--surface-3); border-color: var(--surface-3); color: var(--text); }
.hp-vote-btn.is-loading { color: transparent !important; position: relative; }
.hp-vote-btn.is-loading::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--text-2); border-top-color: transparent; animation: spin .7s linear infinite; }
.hp-vote-more { flex-basis: 100%; display: flex; flex-direction: column; gap: var(--sp-2); }
.hp-vote-more .textarea { min-height: 72px; }
.hp-vote-count { flex-basis: 100%; display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.hp-vote-count .ic { color: var(--text-3); }

.hp-related h2 { margin: 0 2px var(--sp-3); }
.hp-help-cta { display: flex; align-items: center; gap: var(--sp-3); padding: 14px var(--sp-4); }
.hp-help-cta b { font-weight: 650; }
.hp-art-aside { display: none; }
.hp-side-list { display: flex; flex-direction: column; margin-top: var(--sp-3); border-left: 2px solid var(--line); }
.hp-side-link { display: block; padding: 9px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--text-2); font-size: 14px; line-height: 1.35; transition: color .15s, border-color .15s; }
.hp-side-link:hover { color: var(--text); }
.hp-side-link.is-active { color: var(--text); font-weight: 650; border-left-color: var(--accent); }
.hp-next { display: flex; flex-direction: column; gap: 3px; margin-top: var(--sp-5); padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.hp-next:hover { border-color: var(--line-strong); background: var(--surface); }
.hp-next b { font-weight: 650; font-size: 14px; line-height: 1.3; }

/* hoja del artículo (helpLink) */
.hp-sheet .hp-article { gap: var(--sp-4); padding-bottom: var(--sp-4); }
.hp-sheet .hp-vote { margin-bottom: var(--sp-2); }

/* ------------------------------------------------------------------ glosario */
.hp-gloss { display: flex; flex-direction: column; }
.hp-gloss-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.hp-gloss-head h1 { font-size: 26px; }
.hp-gloss-search { margin-top: var(--sp-3); }
.hp-letters { position: sticky; top: calc(var(--topbar-h) + var(--safe-t)); z-index: 5; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--sp-4) * -1) var(--sp-3); padding: 6px var(--sp-4); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.hp-letters::-webkit-scrollbar { display: none; }
.hp-letters button { flex: none; width: 34px; height: 40px; border-radius: 10px; display: grid; place-items: center; font: 700 14px/1 var(--font-display); color: var(--text); }
.hp-letters button:hover:not(:disabled) { background: var(--surface); color: var(--accent); }
.hp-letters button:disabled { color: var(--text-3); opacity: .45; cursor: default; }
.hp-letter-group { scroll-margin-top: 120px; }
.hp-letter { font-size: 22px; color: var(--accent); margin: var(--sp-4) 2px var(--sp-2); }
.hp-letter-group:first-of-type .hp-letter { margin-top: var(--sp-1); }
.hp-terms { display: grid; gap: var(--sp-2); }
.hp-term { padding: 14px var(--sp-4); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 130px; transition: border-color .3s, box-shadow .3s; }
.hp-term header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.hp-term h3 { font-size: 17px; }
.hp-term > p { font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.hp-term-ex { display: flex; gap: 8px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 13.5px; line-height: 1.45; color: var(--text-2); }
.hp-term-ex .ic { color: var(--text-3); margin-top: 1px; }
.hp-term footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 2px; }
.hp-see { display: inline-flex; align-items: center; min-height: 32px; padding: 0 11px; border-radius: var(--r-full); border: 1px solid var(--line); color: var(--text-2); font: 600 12.5px/1 var(--font); }
.hp-see:hover { color: var(--text); border-color: var(--line-strong); }
.hp-term-art { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-left: auto; color: var(--accent); font: 650 12.5px/1 var(--font); }
.hp-term-art:hover { text-decoration: underline; }
.hp-term.is-flash { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ------------------------------------------------------------------ contacto y sugerencias */
.hp-form-page { display: flex; flex-direction: column; gap: var(--sp-5); max-width: 640px; margin: 0 auto; width: 100%; }
.hp-form-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: var(--sp-2); }
.hp-form-head h1 { font-size: 26px; margin-top: var(--sp-2); }
.hp-form-head p { max-width: 440px; font-size: 14.5px; }
.hp-form-head p b { color: var(--text); font-weight: 650; overflow-wrap: anywhere; }
.hp-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.hp-topic { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 12px; border-radius: var(--r-sm); background: var(--surface); border: 1.5px solid var(--line); color: var(--text-2); font: 600 13.5px/1.2 var(--font); text-align: left; transition: all .15s; }
.hp-topic:hover { border-color: var(--line-strong); color: var(--text); }
.hp-topic .ic { color: var(--text-3); flex: none; }
.hp-topic.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.hp-topic.is-active .ic { color: var(--accent); }
.hp-form .field > label .dim, .hp-label-box legend .dim { font-weight: 500; }
.hp-maybe { display: flex; flex-direction: column; gap: var(--sp-2); padding: 12px; border-radius: var(--r); background: var(--info-soft); }
.hp-maybe .list { background: var(--bg-elev); }
.hp-device { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.hp-switch-row { display: flex; align-items: center; gap: var(--sp-3); padding: 14px var(--sp-4); cursor: pointer; }
.hp-sw-title { font-weight: 650; display: block; }
.hp-device-det { border-top: 1px solid var(--line); }
.hp-device-det summary { min-height: 44px; display: flex; align-items: center; padding: 0 var(--sp-4); color: var(--text-2); font: 600 13px/1 var(--font); cursor: pointer; list-style: none; }
.hp-device-det summary::-webkit-details-marker { display: none; }
.hp-device-det summary::after { content: ""; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.hp-device-det[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.hp-device-det dl { margin: 0; padding: 0 var(--sp-4) var(--sp-3); display: grid; gap: 6px; }
.hp-device-det dl div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; font-size: 12.5px; }
.hp-device-det dt { color: var(--text-3); }
.hp-device-det dd { margin: 0; color: var(--text-2); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.hp-alt { display: grid; gap: var(--sp-2); }
.hp-mine h2 { margin: 0 2px var(--sp-3); }
.hp-msg .li-title { max-width: 100%; }
.hp-msg .badge { flex: none; }

.hp-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.hp-type { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; min-height: 96px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); text-align: left; font: 650 14px/1.25 var(--font); color: var(--text-2); transition: all .15s; }
.hp-type:hover { border-color: var(--line-strong); color: var(--text); }
.hp-type-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.hp-type.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.hp-type.is-active .hp-type-ic { background: var(--accent); color: var(--on-accent); }
.hp-label-box { border: 0; margin: 0; padding: 0; min-width: 0; }
.hp-label-box legend { padding: 0; margin-bottom: 8px; }
.hp-macros-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.hp-macros-in label { font-size: 12px; }
.hp-form .banner a { font-weight: 650; }

.hp-sent { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: var(--sp-8) var(--sp-4); max-width: 460px; margin: 0 auto; }
.hp-sent-ic { width: 88px; height: 88px; border-radius: 30px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: var(--sp-2); animation: hp-pop .45s var(--ease); }
@keyframes hp-pop { from { transform: scale(.6); opacity: 0; } }
.hp-sent h2 { font-size: 24px; }
.hp-folio { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 16px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line); margin: var(--sp-2) 0; }
.hp-folio b { font: 700 18px/1 var(--font-display); }
.hp-sent .small b { color: var(--text-2); overflow-wrap: anywhere; }
.hp-sent-actions { display: flex; flex-direction: column; gap: var(--sp-2); width: 100%; margin-top: var(--sp-4); }

/* ------------------------------------------------------------------ guía de primeros pasos (hpg-) */
.hpg { display: flex; flex-direction: column; min-height: calc(100dvh - var(--topbar-h) - var(--safe-t) - 60px); }
.hpg-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--sp-4) * -1); overscroll-behavior-x: contain; outline: none; }
.hpg-track::-webkit-scrollbar { display: none; }
.hpg-slide { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; display: flex; flex-direction: column; gap: var(--sp-5); padding: var(--sp-2) var(--sp-4) var(--sp-4); }
.hpg-art { height: clamp(290px, 40dvh, 360px); flex: none; display: grid; place-items: center; border-radius: var(--r-lg); position: relative; overflow: hidden;
  background: radial-gradient(90% 80% at 50% 20%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%), var(--surface); border: 1px solid var(--line); }
.hpg-art > * { transform: translateY(10px) scale(.97); opacity: .4; transition: transform .45s var(--ease), opacity .45s var(--ease); }
.hpg-slide.is-active .hpg-art > * { transform: none; opacity: 1; }
.hpg-copy { display: flex; flex-direction: column; gap: 8px; text-align: center; align-items: center; }
.hpg-copy h2 { font-size: 25px; text-wrap: balance; }
.hpg-copy p { font-size: 15.5px; line-height: 1.5; max-width: 420px; text-wrap: pretty; }
.hpg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.hpg-nav { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) 0 calc(var(--safe-b) + var(--sp-2)); background: linear-gradient(transparent, var(--bg) 30%); }
.hpg-dots { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 0; }
.hpg-dot { width: 17px; height: 44px; display: grid; place-items: center; flex: none; }
.hpg-dot::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--surface-3); transition: width .25s var(--ease), background .25s; }
.hpg-dot.is-active { width: 26px; }
.hpg-dot.is-active::before { width: 20px; background: var(--accent); }
.hpg-next { flex: none; padding: 0 16px; }
.hpg-prev { flex: none; }

/* piezas de interfaz dibujadas */
.hpg-phone { width: 196px; height: 268px; border-radius: 30px; border: 3px solid var(--line-strong); background: var(--bg-elev); padding: 14px 10px 0; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; top: 12px; }
.hpg-phone::before { content: ""; position: absolute; top: 7px; left: 50%; width: 46px; height: 5px; margin-left: -23px; border-radius: 3px; background: var(--line-strong); }
.hpg-screen { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 8px 4px; }
.hpg-welcome { align-items: center; }
.hpg-logo { margin-top: 6px; }
.hpg-lines { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hpg-lines i { display: block; height: 8px; border-radius: 4px; background: var(--surface-3); }
.hpg-tiles { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 4px; }
.hpg-tiles i { height: 34px; border-radius: 10px; background: var(--surface-2); }
.hpg-tiles i:first-child { background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); }
.hpg-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 0 10px; border-top: 1px solid var(--line); margin: 0 -10px; }
.hpg-tabbar span { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-3); }
.hpg-tabbar small { font: 600 7.5px/1 var(--font); }
.hpg-tabbar .is-on { color: var(--accent); }

.hpg-ui-card { width: min(300px, 86%); padding: 14px; border-radius: 18px; background: var(--bg-elev); border: 1px solid var(--line-strong); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; text-align: left; }
.hpg-ui-card b { font-weight: 700; }
.hpg-muted { color: var(--text-3); font-size: 11.5px; }
.hpg-row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hpg-card-stack { position: relative; width: 100%; display: grid; place-items: center; }
.hpg-card-stack .hpg-ui-card { grid-area: 1 / 1; position: relative; z-index: 1; }
.hpg-ui-card.is-back { z-index: 0; height: 92%; transform: translate(14px, -16px) rotate(4deg); opacity: .5; box-shadow: none; }
.hpg-pill { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font: 700 11.5px/1 var(--font); }
.hpg-ex { display: flex; align-items: center; gap: 9px; padding-top: 6px; border-top: 1px solid var(--line); font-weight: 600; }
.hpg-thumb { width: 28px; height: 28px; border-radius: 8px; background: var(--media-bg); flex: none; display: grid; place-items: center; color: var(--navy); box-shadow: inset 0 0 0 1px var(--line); }
.hpg-thumb .ic { width: 15px; height: 15px; }
.hpg-sets { gap: 6px; }
.hpg-ex-head { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }
.hpg-ex-head .ic { color: var(--accent); }
.hpg-set-row { display: grid; grid-template-columns: 30px 1fr 50px 40px 30px; align-items: center; gap: 6px; height: 32px; padding: 0 4px; border-radius: 8px; font-size: 12.5px; }
.hpg-set-row.is-head { height: 18px; color: var(--text-3); font: 700 9.5px/1 var(--font); text-transform: uppercase; letter-spacing: .05em; }
.hpg-set-row.is-head span:nth-child(n+3) { text-align: center; }
.hpg-set-row.is-head .ic { width: 12px; height: 12px; margin: 0 auto; }
.hpg-set-row.is-done { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.hpg-set-n { font-weight: 700; text-align: center; }
.hpg-set-n.is-warm { color: var(--set-warmup); }
.hpg-cell { height: 24px; border-radius: 6px; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; }
.hpg-set-row.is-done .hpg-cell { background: transparent; }
.hpg-cell.is-empty { color: var(--text-3); font-weight: 500; }
.hpg-tick { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-3); margin: 0 auto; }
.hpg-tick .ic { width: 13px; height: 13px; }
.hpg-set-row.is-done .hpg-tick { background: var(--accent); color: var(--on-accent); }
.hpg-add { display: flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-weight: 650; margin-top: 2px; }

.hpg-rest { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hpg-ring { --p: 0; width: 148px; height: 148px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); box-shadow: var(--shadow-sm); }
.hpg-ring > div { width: 126px; height: 126px; border-radius: 50%; background: var(--bg-elev); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.hpg-ring b { font: 700 34px/1 var(--font-display); }
.hpg-ring span { font-size: 11px; color: var(--text-3); font-weight: 600; }
.hpg-ring.is-sm { width: 96px; height: 96px; flex: none; }
.hpg-ring.is-sm > div { width: 80px; height: 80px; }
.hpg-ring.is-sm b { font-size: 18px; }
.hpg-ring.is-sm span { font-size: 9.5px; }
.hpg-rest-btns { display: flex; gap: 6px; }
.hpg-rest-btns span { height: 30px; min-width: 52px; padding: 0 10px; border-radius: 9px; display: grid; place-items: center; background: var(--bg-elev); border: 1px solid var(--line); font: 700 12px/1 var(--font); }
.hpg-rest-btns .is-on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.hpg-pr { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r-full); background: color-mix(in srgb, var(--pr) 16%, var(--bg-elev)); color: var(--pr); font-size: 12.5px; box-shadow: var(--shadow-sm); }
.hpg-pr span { color: var(--text); }
.hpg-pr b { color: var(--pr); }

.hpg-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 8px; background: color-mix(in srgb, var(--c6) 16%, transparent); color: var(--c6); font: 700 11px/1 var(--font); }
.hpg-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hpg-week span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 0; border-radius: 9px; background: var(--surface-2); }
.hpg-week b { font-size: 11.5px; }
.hpg-week small { font-size: 7.5px; color: var(--text-3); font-weight: 600; }
.hpg-week .is-train { background: color-mix(in srgb, var(--c6) 15%, var(--surface-2)); }
.hpg-week .is-today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.hpg-today { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.hpg-today .grow { display: flex; flex-direction: column; gap: 2px; }
.hpg-play { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); flex: none; }

.hpg-food-top { display: flex; align-items: center; gap: 12px; }
.hpg-macros { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.hpg-macros small { font-size: 10.5px; font-weight: 600; }
.hpg-bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-3); margin-top: 3px; overflow: hidden; }
.hpg-bar > i { display: block; height: 100%; border-radius: 3px; background: var(--c1); }
.hpg-macros > div:nth-child(2) .hpg-bar > i { background: var(--c3); }
.hpg-macros > div:nth-child(3) .hpg-bar > i { background: var(--c4); }
.hpg-meal { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.hpg-food-row span:first-child { display: flex; flex-direction: column; gap: 1px; }
.hpg-food-row .tnum { font-weight: 650; }

.hpg-up { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 700; }
.hpg-bars { height: 92px; display: flex; align-items: flex-end; gap: 6px; padding-top: 6px; }
.hpg-bars i { flex: 1; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--c1) 45%, var(--surface-3)); }
.hpg-bars i.is-last { background: var(--accent); }
.hpg-feed { display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 12px; background: var(--surface-2); }
.hpg-feed .grow { display: flex; flex-direction: column; gap: 2px; }
.hpg-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--c4); color: #fff; font: 700 11px/1 var(--font-display); flex: none; }
.hpg-like { display: inline-flex; align-items: center; gap: 4px; color: var(--danger); font-weight: 700; }

.hpg-phone.is-home { padding: 22px 12px 0; }
.hpg-homescreen { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 38px; gap: 10px 8px; padding: 6px 2px; }
.hpg-app { display: block; border-radius: 11px; background: var(--surface-3); }
.hpg-app:nth-child(3n) { background: color-mix(in srgb, var(--c1) 30%, var(--surface-3)); }
.hpg-app:nth-child(4n) { background: color-mix(in srgb, var(--c3) 30%, var(--surface-3)); }
.hpg-app.is-bl { display: grid; place-items: center; background: var(--navy); box-shadow: 0 0 0 2px var(--accent), var(--shadow-sm); animation: hpg-bob 1.8s var(--ease) infinite alternate; }
:root[data-theme="light"] .hpg-app.is-bl { background: #fff; }
@keyframes hpg-bob { to { transform: translateY(-3px); } }
.hpg-dock-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: auto -6px 0; padding: 10px 12px 14px; border-radius: 18px 18px 0 0; background: var(--surface-2); }
.hpg-dock-bar i { height: 30px; border-radius: 10px; background: var(--surface-3); }

/* ------------------------------------------------------------------ escritorio */
@media (min-width: 600px) {
  .hp-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hp-topics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hp-types { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hp-macros-in { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hp-contact-card .btn { flex: none; }
  .hp-sent-actions { flex-direction: row; justify-content: center; width: auto; }
  .hp-alt { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .hp-hero { padding: var(--sp-8) var(--sp-6) var(--sp-6); }
  .hp-hero h1 { font-size: 34px; }
  .hp-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }
  .hp-two { grid-template-columns: 1fr 1fr; align-items: start; }
  .hp-home > [data-results] { max-width: 760px; width: 100%; margin: 0 auto; }
  .hp-promo { padding: var(--sp-5) var(--sp-6); }
  .hp-art-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: var(--sp-8); align-items: start; }
  .hp-art-main { max-width: 700px; }
  .hp-art-aside { display: block; position: sticky; top: calc(var(--topbar-h) + 16px); }
  .hp-title { font-size: 34px; }
  .hp-links .btn { flex: none; }
  .hp-cat-layout { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: var(--sp-8); }
  .hp-cat-aside { position: sticky; top: calc(var(--topbar-h) + 16px); }
  .hp-gloss { max-width: 920px; margin: 0 auto; width: 100%; }
  .hp-letters { margin: 0 0 var(--sp-3); padding: 6px 4px; border-radius: var(--r-sm); border: 1px solid var(--line); justify-content: space-between; }
  .hp-letters button { width: 30px; }
  .hp-terms { grid-template-columns: 1fr 1fr; align-items: start; }
  .hpg { max-width: 760px; margin: 0 auto; width: 100%; min-height: calc(100dvh - var(--topbar-h) - 100px); }
  .hpg-track { margin: 0; }
  .hpg-slide { flex-direction: row; align-items: center; gap: var(--sp-8); padding: var(--sp-4) var(--sp-2); }
  .hpg-art { flex: 1 1 52%; height: 420px; }
  .hpg-copy { flex: 1 1 48%; text-align: left; align-items: flex-start; }
  .hpg-copy h2 { font-size: 30px; }
  .hpg-actions { justify-content: flex-start; }
  .hpg-phone { scale: 1.12; }
  .hpg-art > :not(.hpg-phone) { scale: 1.06; }
}
@media (prefers-reduced-motion: reduce) { .hpg-app.is-bl { animation: none; } }

/* con búsqueda activa, la cabecera se compacta para que los resultados queden a la vista */
.hp-home.is-searching .hp-hero { padding: var(--sp-3); }
.hp-home.is-searching .hp-hero-ic, .hp-home.is-searching .hp-hero h1, .hp-home.is-searching .hp-hero > p { display: none; }
.hp-home.is-searching .hp-search { margin-top: 0; }
[data-suggest-arts]:empty { display: none; }
.hp-lead { display: grid; gap: var(--sp-5); }
@media (min-width: 960px) {
  .hp-lead { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; }
  .hp-lead:has(> [data-checklist]:empty) { grid-template-columns: 1fr; }
  .hp-lead .hp-promo { flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; }
  .hp-lead .hp-promo-art { width: 100%; height: 150px; border-radius: var(--r); background: color-mix(in srgb, var(--bg) 45%, transparent); }
  .hp-lead .hp-mini-phone { transform: rotate(-6deg) scale(1.25); }
}
.hp-missing .hp-search { width: 100%; max-width: 360px; margin: 6px 0 0; }
