/* Shared presentation layer for the standalone MEDX document. */
:root {
  --accent: oklch(0.57 0.18 252);
  --accent-dark: oklch(0.49 0.17 252);
  --accent-light: oklch(0.73 0.14 250);
  --accent-bg: oklch(0.57 0.18 252 / 0.12);
  --bg: oklch(0.159 0 0);
  --surface: oklch(0.196 0.006 260);
  --surface-2: oklch(0.235 0.009 260);
  --surface-3: oklch(0.285 0.012 260);
  --line: oklch(0.3 0.012 260);
  --line-strong: oklch(0.39 0.015 260);
  --text: oklch(0.95 0.004 260);
  --text-2: oklch(0.8 0.014 260);
  --muted: oklch(0.68 0.018 260);
  --on-accent: oklch(1 0 0);
  --error: oklch(0.76 0.14 28);
  --ok: oklch(0.78 0.14 160);
  --warn: oklch(0.83 0.13 80);
  --radius: 8px;
  --shadow-dialog: 0 16px 48px oklch(0 0 0 / 0.3);
}
h1,h2,h3,h4,.eyebrow,.brand-name,.brand-sub,.nav-txt small,.ag-title small,.ag-field label,.now-badge,.phase-n,.slot-txt small,.camino-k,.ent-top small { letter-spacing: 0; }
button,input,textarea,select { max-width: 100%; }
button { touch-action: manipulation; }
.main { padding: 40px 40px 96px; }
.wrap { max-width: 920px; gap: 28px; }
.hero h1,.hero.mission h1 { font-size: 34px; }
.block-title,.view-title { font-size: 30px; }
.hero.mission { background: none; border: 0; border-radius: 0; padding: 0 0 28px; border-bottom: 1px solid var(--line); gap: 16px; }
.hero.mission p { font-size: 16px; }
.how3 span:not(.ar) { background: none; border: 0; border-radius: 0; padding: 0; color: var(--text-2); }
.how3 { gap: 10px; font-size: 13px; }
.hud { background: var(--surface-2); border-color: var(--line); border-radius: var(--radius); }
.sidebar { gap: 16px; }
.nav-item,.nav-ico,.ws-btn,.wb-btn,.tab,.btn-2,.cta,.btn-run,.send,.mic,.chat,.chat-bar,.st-ico,.agent-avatar,.ag-card,.claim,.prep,.badge,.slot,.modal-card { border-radius: var(--radius); }
.nav-item { min-height: 48px; }
.nav-item.active { border-color: var(--accent); }
.nav-item.is-lock { opacity: 0.85; }
.side-foot { border-top: 1px solid var(--line); padding-top: 14px; }
.side-foot .ws-btn { min-height: 44px; overflow-wrap: anywhere; }
.st-head,.agent-head { grid-template-columns: auto minmax(0,1fr); align-items: start; }
.st-main,.agent-head>div { min-width: 0; }
.st-ico,.agent-avatar,.chat-av { background: var(--accent-bg); box-shadow: none; }
.tabs { padding: 4px; }
.tab { min-height: 64px; }
.tab .tl b { overflow-wrap: anywhere; }
.asset { padding: 24px 0; background: none; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }
.asset-head,.prompt-head,.ag-rhead { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; }
.asset-head>* { min-width: 0; }
.slots { grid-template-columns: repeat(2,minmax(0,1fr)); }
.stn>button { border-radius: var(--radius); min-height: 90px; padding: 12px; }
.stn:not(:last-child)::after { display: none; }
.stn-dot { width: 44px; height: 44px; font-size: 22px; border-radius: var(--radius); }
.stn.cur .stn-dot { box-shadow: none; }
.stn>button { grid-template-columns: 44px minmax(0,1fr) auto; }
.cta,.btn-run,.btn-2.primary,.send,.wb-btn { color: var(--on-accent); min-height: 44px; }
.cta { font-size: 15px; }
.chat-bar { box-shadow: none; border-width: 1px; }
.chat-bar:focus-within { box-shadow: 0 0 0 2px var(--accent-bg); }
.chat-bar textarea { min-width: 0; font-size: 16px; }
.compose { background: var(--surface); }
.login { background: var(--bg); padding: 32px 20px; }
.login-card { width: min(400px,100%); padding: 0; gap: 20px; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.login-card .brand { padding: 0; cursor: default; }
.login-card .brand:hover { background: none; }
.login-card h1 { font-size: 28px; margin: 6px 0 0; }
.login-sub { font-size: 15px; }
.login-card .field label { font-size: 14px; color: var(--text-2); margin-bottom: 8px; }
.login-card .field input { min-height: 50px; font-size: 16px; border-radius: var(--radius); background: var(--surface); }
.login-card .check-terminos { font-size: 12px; line-height: 1.6; }
.login-msg { color: var(--error); }
.login-msg.success { color: var(--ok); }
.login-card .btn-run { flex: none; min-height: 50px; }
.login-help { font-size: 13px; }
.login-help summary { color: var(--accent-light); cursor: pointer; min-height: 32px; }
.login-help p { margin: 6px 0 0; color: var(--text-2); }
.login-support { border-top: 1px solid var(--line); padding-top: 16px; text-align: center; }
.password-entry { position: relative; }
.password-entry input { padding-right: 52px; }
.password-toggle { position: absolute; inset: 3px 3px 3px auto; width: 44px; border: 0; border-radius: 6px; background: none; color: var(--text-2); display: grid; place-items: center; }
.password-toggle:hover { background: var(--surface-2); }
.password-toggle svg { width: 20px; height: 20px; }
.nube-estado { position: fixed; right: 20px; bottom: calc(16px + env(safe-area-inset-bottom,0px)); z-index: 35; padding: 8px 12px; border-radius: var(--radius); font: 500 12px/1.4 var(--font); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); max-width: calc(100% - 32px); }
.nube-estado[data-e="ok"] { color: var(--ok); }
.nube-estado[data-e="error"] { color: var(--warn); cursor: pointer; }
.toast { bottom: calc(64px + env(safe-area-inset-bottom,0px)); }
.hotmart-help { border-top: 1px solid var(--line); padding: 24px 0; display: grid; gap: 16px; }
.hotmart-help>p { margin: 0; color: var(--text-2); line-height: 1.6; }
.hotmart-tutorial-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.hotmart-tutorial { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hotmart-tutorial h3 { font-size: 16px; margin: 0; overflow-wrap: anywhere; }
.hotmart-tutorial p { color: var(--text-2); font-size: 14px; margin: 0; line-height: 1.6; flex: 1; }
.hotmart-tutorial .btn-2 { min-height: 44px; white-space: normal; }
.hotmart-help>a { justify-self: start; }
.hotmart-video { display: grid; gap: 16px; }
.hotmart-video h2 { font-size: 24px; margin: 8px 0 0; }
.hotmart-video video { width: 100%; max-height: 55dvh; background: var(--bg); border-radius: var(--radius); }
.hotmart-video-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hotmart-video p { margin: 0; }
.hotmart-video [role="alert"] { color: var(--warn); }
@media(max-width:900px) {
  .main { padding: 24px 16px 96px; }
  .wrap { gap: 24px; }
  .topbar { display: grid; grid-template-columns: auto minmax(0,1fr) auto; padding: 10px 16px; top: 0; padding-top: calc(10px + env(safe-area-inset-top,0px)); }
  .menu-btn { width: 44px; height: 44px; padding: 0; font-size: 22px; }
  .topbar .logo { width: 36px; height: 36px; }
  .hero.mission { padding: 0 0 24px; }
  .hero h1,.hero.mission h1 { font-size: 28px; }
  .block-title,.view-title { font-size: 25px; }
  .st-head,.agent-head { grid-template-columns: 44px minmax(0,1fr); gap: 12px; }
  .st-ico,.agent-avatar { width: 44px; height: 44px; font-size: 22px; }
  .st-obj { font-size: 15px; }
  .slots { grid-template-columns: minmax(0,1fr); }
  .stn>button { grid-template-columns: 44px minmax(0,1fr); gap: 8px 12px; }
  .stn-dot { grid-row: 1 / 3; }
  .stn-rw { grid-column: 2; font-size: 12px; }
  .stn-main b { font-size: 15px; }
  .stn-obj { font-size: 13px; }
  .tabs { gap: 4px; }
  .tab { padding: 10px 4px; min-height: 82px; }
  .tab .tl b { font-size: 12px; }
  .chat-tools { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chat-tools .btn-2 { white-space: normal; min-height: 40px; }
  .chat-tools .subscriber-compact { width: 40px; }
  .chat-bar { display: grid; grid-template-columns: minmax(0,1fr) 44px 48px; gap: 6px; padding: 6px; }
  .chat-bar textarea { padding: 8px 4px; font-size: 16px; width: 100%; }
  .mic,.send { width: 100%; height: 48px; padding: 0; justify-content: center; }
  .send span { display: none; }
  .ag-fields { grid-template-columns: minmax(0,1fr); }
  .wb-txt { flex-basis: 100%; }
  .nube-estado { right: 16px; }
  .login { align-items: start; padding-top: calc(36px + env(safe-area-inset-top,0px)); }
  .login-card { margin: auto; gap: 18px; }
  .modal-card { max-height: 90dvh; }
  .induccion { padding: 20px; }
  .hotmart-tutorial-grid { grid-template-columns: minmax(0,1fr); }
  .hotmart-video-actions .btn-2 { flex: 1 1 100%; min-height: 44px; white-space: normal; }
}
@media(prefers-reduced-motion:reduce) { .res:hover { transform: none; } }

/* Professional hierarchy: shared surfaces, icons and touch targets. */
.ui-icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.nav-ico .ui-icon,.stn-dot .ui-icon { width: 20px; height: 20px; }
.st-ico .ui-icon,.chat-av .ui-icon { width: 24px; height: 24px; }
.brand .logo { box-shadow: none; }
.login { align-items: center; justify-content: center; overflow-y: auto; }
.login-card { width: min(480px,100%); gap: 16px; padding: 28px 0; }
.login-card .brand { gap: 18px; margin-bottom: 8px; }
.login-card .logo { width: 76px; height: 76px; border-radius: var(--radius); }
.login-card .brand-name { font-size: 34px; line-height: 1.15; }
.login-card .brand-sub { font-size: 13px; margin-top: 6px; }
.login-heading { border-top: 1px solid var(--line-strong); padding-top: 24px; }
.login-card h1 { font-size: 30px; font-weight: 650; line-height: 1.3; text-wrap: balance; }
.login-sub { margin: 10px 0 0; }
.login-card .field label { font-size: 13px; font-weight: 500; }
.login-msg:empty { display: none; }
.login-card .btn-run { border-radius: var(--radius); box-shadow: none; font-size: 15px; }
.login-support { margin: 0; padding-top: 14px; }
.login-support a { color: var(--text-2); }
.sidebar { background: var(--bg); padding-top: 24px; }
.hud { background: none; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 8px; }
.hud-top { justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-2); }
.hud-top b { color: var(--text); }
.hud-next { margin-top: 8px; }
.bar>span { background: var(--accent-light); }
.home-welcome { display: flex; flex-direction: column; gap: 10px; padding-bottom: 4px; }
.home-welcome h1 { font-size: 36px; font-weight: 650; }
.home-specialty { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--text-2); }
.home-specialty .linkb { font-size: 12px; font-weight: 500; text-decoration: none; }
.home-welcome p { color: var(--text-2); margin: 4px 0 0; max-width: 60ch; }
.home-resume { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 24px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; align-items: center; }
.home-resume h2 { font-size: 23px; margin-top: 8px; }
.home-resume p { margin: 8px 0 18px; color: var(--text-2); font-size: 14px; max-width: 52ch; }
.home-progress { display: flex; align-items: center; gap: 16px; color: var(--text-2); font-size: 12px; }
.home-progress .bar { margin: 0; flex: 1; max-width: 220px; height: 5px; }
.home-progress strong { font-size: 22px; color: var(--text); font-weight: 600; }
.home-resume .cta { align-self: center; justify-content: center; white-space: normal; text-align: center; max-width: 280px; box-shadow: none; }
.home-shortcuts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.home-shortcut { display: grid; grid-template-columns: 32px minmax(0,1fr) 20px; align-items: center; gap: 10px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 12px 0 20px; text-align: left; color: var(--text); }
.home-shortcut:hover { border-color: var(--accent-light); }
.home-shortcut>.ui-icon { color: var(--accent-light); }
.home-shortcut b { display: block; font-size: 16px; font-weight: 600; }
.home-shortcut small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.home-route .section-title { font-size: 20px; }
.home-route .stn>button { min-height: 84px; border-bottom-color: var(--line); border-radius: 0; margin: 0; padding: 14px 8px; }
.home-route .stn.cur>button { border: 1px solid var(--line-strong); border-left: 3px solid var(--accent-light); border-radius: var(--radius); background: var(--surface); }
.stn-dot { border-width: 1px; }
.stn.done .stn-dot { color: var(--ok); background: var(--ok-bg); border-color: var(--ok); }
.stn-rw { white-space: normal; }
.home-secondary { border-top: 1px solid var(--line); padding-top: 18px; }
.home-secondary>summary { color: var(--text-2); cursor: pointer; font-size: 14px; }
.home-secondary .badges-sec { margin-top: 18px; }
.home-secondary .tools-row { margin-top: 20px; }
.st-head { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.block-title { font-size: 32px; font-weight: 650; }
.st-ico { width: 52px; height: 52px; border-color: var(--line); }
.rewards { gap: 16px; }
.rw { background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; border-radius: 0; }
.chip { border-radius: 4px; }
.tabs { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0; gap: 12px; grid-template-columns: repeat(3,minmax(0,1fr)); }
.tab { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 14px 4px; box-shadow: none; }
.tab.active { background: none; border-bottom-color: var(--accent-light); }
.tab.glow { animation: none; box-shadow: none; }
.tab .tl small { font-size: 11px; }
.panel,.prep,.cierre-practico,.cierre-parte,.crit,.claim,.guia,.extra-q { background: none; border: 0; border-radius: 0; box-shadow: none; }
.panel { padding: 0; }
.prep { padding: 0; }
.prep-list li { align-items: flex-start; }
.prep-list .pn { border-radius: 4px; background: var(--accent-bg); color: var(--accent-light); }
.guia,.extra-q { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.guia>summary,.extra-q>summary { padding: 16px 0; }
.guia-body { padding: 16px 0; }
.cierre-practico { padding: 0; }
.cierre-practico h2 { font-size: 24px; }
.cierre-parte { padding: 22px 0; border-bottom: 1px solid var(--line); }
.cierre-parte h3 { font-size: 17px; }
.claim,.claim.done,.claim.ready { background: none; border: 0; border-top: 1px solid var(--line); align-items: flex-start; text-align: left; padding: 24px 0; }
.claim-badge { display: none; }
.req { max-width: none; }
.req li { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 0; background: none; }
.btn-claim { background: var(--accent); color: var(--on-accent); font-size: 15px; border-radius: var(--radius); min-height: 48px; box-shadow: none; }
.btn-2,.btn-run,.send,.cta { border-radius: var(--radius); box-shadow: none; }
.btn-2 { min-height: 44px; }
.btn-2.small { min-height: 36px; }
.chat { border-color: var(--line-strong); box-shadow: none; }
.chat-head { background: var(--surface); }
.chat-tools { gap: 6px; }
.chat-tools .btn-2 { background: none; }
.cel-ico { animation: none; }
.cel-xp,.cel-lvl,.confeti { display: none; }
@media(max-width:900px) {
  .home-welcome h1 { font-size: 28px; }
  .home-resume { grid-template-columns: minmax(0,1fr); gap: 20px; padding: 22px 0; }
  .home-resume .cta { width: 100%; max-width: none; }
  .home-resume h2 { font-size: 21px; }
  .home-shortcuts { gap: 16px; }
  .home-shortcut { grid-template-columns: minmax(0,1fr) 16px; gap: 8px; }
  .home-shortcut>.ui-icon { display: none; }
  .home-route .stn>button { grid-template-columns: 40px minmax(0,1fr); }
  .home-route .stn-dot { width: 40px; height: 40px; }
  .block-title { font-size: 27px; }
  .tabs { gap: 6px; }
  .tab { min-height: 90px; flex-direction: column; align-items: flex-start; gap: 8px; }
  .tab .tl { min-width: 0; }
  .tab .tl b { font-size: 12px; }
  .tab .tl small { overflow-wrap: anywhere; }
  .chat-tools { display: flex; flex-wrap: wrap; width: 100%; }
  .claim .btn-claim { width: 100%; white-space: normal; }
  .login { padding: 24px; align-items: center; }
  .login-card { padding: 8px 0; gap: 16px; margin: auto; }
  .login-card .logo { width: 60px; height: 60px; }
  .login-card .brand-name { font-size: 30px; }
  .login-card h1 { font-size: 26px; }
  .login-heading { padding-top: 18px; }
}

/* Access: a quiet brand signature surrounding one uninterrupted form. */
.login { isolation: isolate; }
.login-brand-detail { position: fixed; z-index: -1; pointer-events: none; top: max(32px,calc(50% - 310px)); left: calc(50% + 210px); width: 300px; aspect-ratio: 1; background: url(/__l5e/assets-v1/21a86b59-0d9d-433e-9d61-84725e9fb0ed/medx-logo.png) center/contain no-repeat; opacity: .14; mask-image: radial-gradient(ellipse, var(--bg) 25%, transparent 72%); }
.login-card { position: relative; width: min(500px,100%); }
.login-card .brand { margin-bottom: 12px; }
.login-card h1 { font-size: 34px; line-height: 1.3; font-weight: 600; }
.login-value { display: block; color: var(--accent-light); }
.login-heading { padding-bottom: 10px; }
.login-sub { max-width: 40ch; line-height: 1.6; }
@media(max-width:900px) {
  .login-brand-detail { display: none; }
  .login-card h1 { font-size: 27px; }
  .login-card .brand { margin-bottom: 4px; }
  .login-heading { padding-bottom: 4px; }
}

/* Chat: jerarquía visual legible con más aire entre mensajes. */
.chat-list { gap: 26px; padding: 24px 18px; }
.msg { gap: 12px; }
.msg .av { width: 32px; height: 32px; }
.bubble { max-width: min(660px,84%); padding: 16px 18px; font-size: 15px; line-height: 1.65; }
.msg.ai .bubble { background: none; border: 0; border-radius: 0; padding: 0; width: min(660px,100%); max-width: 100%; }
.msg.ai .av,.msg.ent .ent-ico { display: none; }
.chat { border: 0; border-radius: 0; background: none; }
.chat-head { background: none; border-bottom: 1px solid var(--line); }
.msg.ent .ent-card { box-shadow: none; }
.msg.me .bubble { padding: 12px 16px; }
.msg.ent .bubble { max-width: 100%; }
.bubble > :first-child { margin-top: 0; }
.bubble > :last-child { margin-bottom: 0; }
.bubble p { margin: 10px 0; }
.bubble h2,.bubble h3,.bubble h4,.bubble h5 { font-size: 16px; font-weight: 600; color: var(--text); margin: 24px 0 8px; line-height: 1.4; }
.bubble h2 { font-size: 17px; color: var(--accent-light); }
.bubble h3 { font-size: 16px; }
.bubble h4,.bubble h5 { font-size: 15px; }
.bubble ul,.bubble ol { margin: 10px 0; padding-left: 22px; }
.bubble li { margin: 6px 0; }
.bubble li::marker { color: var(--accent-light); }
.bubble strong { font-weight: 600; }
.bubble hr { margin: 18px 0; }
.bubble blockquote { margin: 10px 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--accent); color: var(--text-2); }
.md-table { margin: 10px 0; }
.msg-tools { margin-top: 12px; opacity: 1; justify-content: flex-start; }
.message-menu { max-width: 100%; }
.message-menu>summary { display: grid; place-items: center; list-style: none; width: 44px; height: 44px; border-radius: var(--radius); color: var(--muted); cursor: pointer; }
.message-menu>summary::-webkit-details-marker { display: none; }
.message-menu>summary:hover,.message-menu[open]>summary { background: var(--surface-2); color: var(--text); }
.message-menu>summary:focus-visible,.message-menu .btn-2:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.message-menu-options { display: flex; flex-direction: column; gap: 4px; width: 260px; max-width: 100%; padding: 8px; background: var(--surface); border-radius: var(--radius); }
.message-menu-options .btn-2 { background: none; border: 0; justify-content: flex-start; text-align: left; white-space: normal; width: 100%; min-height: 44px; color: var(--text-2); }
.message-menu-options .btn-2:hover { background: var(--surface-2); color: var(--text); }
.message-menu-options .save-ent>summary { display: flex; cursor: pointer; }
.message-menu-options .save-opts { padding-left: 12px; border-left: 1px solid var(--line); }
@media(max-width:900px) {
  .chat-list { gap: 20px; padding: 18px 12px; }
  .bubble { max-width: 94%; padding: 13px 14px; }
  .bubble h2,.bubble h3,.bubble h4,.bubble h5 { margin: 18px 0 6px; }
  .bubble p { margin: 8px 0; }
}
.login-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:4px 0 12px}
.login-tabs [role=tab]{min-height:44px;opacity:.65}
.login-tabs [role=tab][aria-selected=true]{opacity:1;border-color:var(--blue,#2f7cf6);box-shadow:inset 0 -2px 0 var(--blue,#2f7cf6)}
#lg_hp_aviso{color:#f5c451}
