/* Entiendo mejor — "Conversación": cabecera de app de mensajes, hilo de burbujas
   y notas en formato pregunta-respuesta. Amarillo idea, azul eléctrico y tinta. */
:root {
	--c-bg: #FFF6D1;
	--c-surface: #FFFFFF;
	--c-ink: #1A1A2E;
	--c-ink-2: #33334A;
	--c-muted: #55556B;
	--c-line: #EFE6C4;
	--c-placeholder: #F7E7A6;
	--c-head-bg: #FFD23F;
	--c-head-ink: #1A1A2E;
	--c-head-2: #FFFFFF;
	--c-nav-pill: #FFFFFF;
	--c-accent: #3454FF;
	--c-on-accent: #FFFFFF;
	--c-alt: #FFD23F;
	--c-on-alt: #1A1A2E;
	--c-tag-ink: #1A1A2E;
	--c-on-tag-ink: #FFFFFF;
	--c-footer-bg: #1A1A2E;
	--c-footer-ink: #E9E7DC;
	--c-focus: #1A1A2E;
	--c-focus-dark: #FFD23F;
	--c-quote-bg: #FFF1BC;
	--c-rank: #3454FF;
	--f-display: "Baloo 2", "Trebuchet MS", sans-serif;
	--f-text: "Baloo 2", "Trebuchet MS", sans-serif;
	--w-display: 800;
	--ls-display: -0.5px;
	--lh-display: 1.02;
	--radius: 26px;
	--radius-sm: 16px;
	--em-wrap: 1200px;
}
body { font-weight: 500; }

/* ---------- Logotipo ---------- */
.nt-wordmark { display: inline-flex; align-items: flex-end; gap: 8px; font-family: var(--f-display); font-weight: 800; line-height: .82; }
.nt-wordmark__a { font-size: 32px; letter-spacing: -1px; color: #1A1A2E; }
.nt-wordmark__b { font-size: 20px; color: #FFFFFF; background: #3454FF; padding: 5px 10px 2px; border-radius: 9px; transform: rotate(-3deg); }
.nt-footer .nt-wordmark__a { color: #FFFFFF; }

/* ---------- Cabecera tipo app de mensajes ---------- */
.em-head { background: #FFD23F; color: #1A1A2E; position: sticky; top: 0; z-index: 1030; transition: box-shadow .2s ease; }
.admin-bar .em-head { top: 32px; }
@media (max-width: 782px) { .admin-bar .em-head { top: 0; position: relative; } }
.em-head.is-scrolled { box-shadow: 0 6px 18px rgba(26, 26, 46, .14); }
.em-head__inner { max-width: var(--em-wrap); margin: 0 auto; padding: 16px 32px 0; box-sizing: border-box; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.em-head__brand { display: flex; flex-direction: column; gap: 4px; }
.em-head__status { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #33334A; padding-left: 66px; }
.em-head__dot { width: 8px; height: 8px; border-radius: 50%; background: #1A1A2E; }
.em-head .nt-logo { color: #1A1A2E; }

.em-ask { flex: 1 1 340px; display: flex; align-items: center; gap: 8px; background: #FFFFFF; border-radius: 28px; padding: 5px 5px 5px 20px; min-height: 52px; box-sizing: border-box; }
.em-ask input { flex: 1 1 auto; min-width: 0; border: 0; background: none; font: inherit; font-size: 16px; color: #1A1A2E; }
.em-ask input:focus { outline: none; }
.em-ask:focus-within { box-shadow: 0 0 0 3px #1A1A2E; }
.em-ask__send { flex: 0 0 42px; height: 42px; border: 0; border-radius: 50%; background: #3454FF; color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.em-head__cta { height: 48px; padding: 0 22px; border-radius: 24px; background: #1A1A2E; color: #FFD23F; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; white-space: nowrap; }
.em-head__cta:hover { color: #FFD23F; text-decoration: none; filter: brightness(1.2); }

.em-tabs { flex: 1 1 100%; }
.em-tabs .nt-menu { padding: 2px 0 0; gap: 4px 26px; }
.em-tabs .nt-menu a { background: none; border-radius: 0; min-height: 46px; padding: 0; font-weight: 700; font-size: 17px; border-bottom: 4px solid transparent; }
.em-tabs .nt-menu a:hover { border-bottom-color: rgba(26, 26, 46, .25); filter: none; text-decoration: none; }
.em-tabs .nt-menu .current-menu-item > a, .em-tabs .nt-menu .current-category-ancestor > a, .em-tabs .nt-menu .current-menu-ancestor > a { background: none; color: #1A1A2E; border-bottom-color: #1A1A2E; }

/* ---------- Etiqueta ---------- */
.nt-tag { font-family: var(--f-display); font-weight: 800; font-size: 14px; border-radius: 8px; padding: 4px 11px 2px; transform: rotate(-2deg); }

/* ---------- Estructura ---------- */
.em-layout { max-width: var(--em-wrap); margin: 0 auto; padding: 32px 32px 0; box-sizing: border-box; display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.em-thread { flex: 999 1 520px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 22px; }
.em-rail { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.em-thread__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.em-thread__title { margin: 0; font-weight: 800; font-size: 34px; letter-spacing: -1px; line-height: 1; }
.em-thread__date { font-size: 15px; color: var(--c-muted); }

/* Pregunta (burbuja tinta con cola) */
.em-q { position: relative; align-self: flex-start; max-width: 92%; background: #1A1A2E; color: #FFFFFF; border-radius: 30px; padding: 30px 32px 32px; margin-bottom: 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.em-q::after { content: ""; position: absolute; left: 34px; bottom: -20px; width: 40px; height: 24px; background: #1A1A2E; clip-path: polygon(0 0, 100% 0, 8% 100%); }
.em-q__title { margin: 0; font-weight: 800; font-size: clamp(30px, 4.2vw, 46px); line-height: 1; letter-spacing: -1.5px; }
.em-q__title a { color: #FFFFFF; }
.em-q--big .em-q__title { font-size: clamp(34px, 5vw, 58px); letter-spacing: -1.8px; }
.em-q--small .em-q__title { font-size: clamp(30px, 4vw, 42px); }
.em-q__desc { font-size: 17px; line-height: 1.5; color: #E9E7DC; }
.em-q__desc p { margin: 0; }
.em-q :focus-visible { outline-color: #FFD23F; }

/* Respuesta (burbuja blanca a la derecha) */
.em-a { align-self: flex-end; width: 82%; background: #FFFFFF; border-radius: 30px; overflow: hidden; }
.em-a--wide { width: min(860px, 100%); }
.em-a__media { display: block; aspect-ratio: 16 / 8; background: var(--c-placeholder); }
.em-a--wide .em-a__media { aspect-ratio: 16 / 7; }
.em-a__body { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 14px; }
.em-a__text { margin: 0; font-size: 18px; line-height: 1.5; color: #1A1A2E; }
.em-a--wide .em-a__text { font-size: 20px; }
.em-a__text strong { font-weight: 800; }
.em-a__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.em-btn { height: 46px; padding: 0 22px; border-radius: 24px; background: #1A1A2E; color: #FFFFFF; font-weight: 800; font-size: 16px; display: inline-flex; align-items: center; }
.em-btn:hover { color: #FFFFFF; text-decoration: none; filter: brightness(1.25); }
.em-btn--line { background: none; color: #1A1A2E; border: 2px solid #1A1A2E; }
.em-btn--line:hover { color: #1A1A2E; background: #FFFFFF; filter: none; }

.em-divider { align-self: center; margin: 8px 0 0; }
.em-divider span { display: inline-block; background: #FFFFFF; border-radius: 16px; padding: 4px 14px 2px; font-size: 14px; font-weight: 700; color: var(--c-muted); }

/* Mensajes del hilo */
.em-msg--in { display: flex; gap: 12px; align-items: flex-end; max-width: 88%; }
.em-msg__avatar { flex-shrink: 0; }
.em-msg--in .em-msg__bubble { flex: 1 1 auto; min-width: 0; background: #FFFFFF; border-radius: 24px 24px 24px 6px; padding: 14px; display: flex; gap: 16px; align-items: center; }
.em-msg__media { flex: 0 0 120px; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--c-placeholder); }
.em-msg__body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.em-msg__title { margin: 0; font-weight: 800; font-size: 22px; line-height: 1.1; }
.em-msg--out { align-self: flex-end; max-width: 78%; }
.em-msg--out .em-msg__bubble { background: #3454FF; color: #FFFFFF; border-radius: 24px 24px 6px 24px; padding: 18px 22px 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.em-msg--out .em-msg__title a { color: #FFFFFF; }
.em-msg--out .nt-meta { color: #DCE2FF; }
.em-msg--out :focus-visible { outline-color: #FFD23F; }
@media (max-width: 575.98px) {
	.em-msg--in, .em-msg--out { max-width: 96%; }
	.em-msg__media { flex-basis: 72px; border-radius: 12px; }
	.em-msg__avatar .nt-mark { width: 28px; height: auto; }
	.em-msg__title { font-size: 19px; }
}

.em-more { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 8px; }
.em-typing { display: inline-flex; gap: 6px; background: #FFFFFF; border-radius: 18px; padding: 12px 16px; }
.em-typing i { width: 9px; height: 9px; border-radius: 50%; background: #1A1A2E; animation: em-type 1.2s infinite; }
.em-typing i:nth-child(2) { animation-delay: .2s; }
.em-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes em-type { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* Riel */
.em-card { background: #FFFFFF; border-radius: 24px; padding: 22px; scroll-margin-top: 170px; }
.em-card__title { margin: 0 0 8px; font-weight: 800; font-size: 22px; line-height: 1.1; }
.em-card .nt-mostread__list li { border-top-color: var(--c-line); font-weight: 700; font-size: 16px; line-height: 1.25; }
.em-card .nt-mostread__list li::before { font-size: 28px; width: 20px; }
.em-card--blue { background: #3454FF; color: #FFFFFF; }
.em-card--blue a { color: #FFFFFF; }
.em-card--blue :focus-visible { outline-color: #FFD23F; }
.em-checks { list-style: none; margin: 0; padding: 0; }
.em-checks li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; font-weight: 700; font-size: 16px; line-height: 1.25; }
.em-check { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #FFD23F; display: inline-flex; align-items: center; justify-content: center; }
.em-check svg { width: 14px; height: 14px; fill: none; stroke: #1A1A2E; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }

.em-nl { background: #1A1A2E; color: #FFFFFF; border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 170px; }
.em-nl__title { margin: 0; font-weight: 800; font-size: 24px; line-height: 1.05; color: #FFD23F; }
.em-nl__text { margin: 0; font-size: 15px; color: #E9E7DC; }
.em-nl__form { display: flex; flex-direction: column; gap: 10px; }
.em-nl__form input { height: 46px; border: 0; border-radius: 23px; padding: 0 16px; font: inherit; font-size: 15px; }
.em-nl__form button { height: 46px; border: 0; border-radius: 23px; background: #FFD23F; color: #1A1A2E; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.em-nl :focus-visible { outline-color: #FFD23F; }

/* Secciones de portada */
.em-topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.em-topics .nt-text { background: #FFFFFF; border-radius: 24px 24px 24px 6px; padding: 20px 22px; }
.em-topics .nt-text__title { font-family: var(--f-display); font-weight: 800; font-size: 21px; line-height: 1.1; }
.nt-main > .nt-section { max-width: var(--em-wrap); padding-left: 32px; padding-right: 32px; box-sizing: border-box; }

/* ---------- Nota ---------- */
.em-single { max-width: var(--em-wrap); margin: 0 auto; padding: 28px 32px 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 24px; }
.em-crumbs { font-size: 15px; font-weight: 600; color: var(--c-muted); display: flex; gap: 8px; }
.em-article { display: flex; flex-direction: column; gap: 24px; }
.em-article__head { display: flex; flex-direction: column; gap: 6px; }
.em-article__head .em-q { max-width: 900px; padding: 32px 36px 36px; }
.em-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.em-byline__who { display: flex; align-items: center; gap: 10px; line-height: 1.25; }
.em-byline__who > span { display: flex; flex-direction: column; }
.em-byline__name { font-weight: 800; }
.nt-share__btn { border: 0; background: #FFFFFF; font-weight: 700; }

.em-body { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; margin-top: 8px; }
.em-body__main { flex: 999 1 480px; min-width: 0; max-width: 720px; background: #FFFFFF; border-radius: 28px; padding: clamp(22px, 4vw, 40px); box-sizing: border-box; }
.em-body__side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.em-body__side .em-rail { flex: none; }
.em-toc li.is-current .em-check { box-shadow: 0 0 0 3px #FFFFFF; }

.em-content { font-size: 19px; line-height: 1.7; }
.em-content h2 { display: inline-block; margin-top: 1.8em; background: #1A1A2E; color: #FFFFFF; font-size: 25px; line-height: 1.15; letter-spacing: -0.5px; padding: 12px 20px 10px; border-radius: 20px 20px 20px 6px; scroll-margin-top: 170px; }
.em-content h2 + * { margin-top: .8em; }
.em-content blockquote { border-radius: 22px; }
.em-content blockquote p { font-weight: 800; font-size: 22px; }
.em-article__foot { margin-top: 36px; padding-top: 22px; border-top: 2px solid var(--c-line); display: flex; flex-direction: column; gap: 14px; }
.em-article__share { margin: 0; font-weight: 800; font-size: 20px; }
.nt-tags a { background: #FFF6D1; font-weight: 700; }

.em-next { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.em-next__title { margin: 0; font-weight: 800; font-size: 32px; letter-spacing: -1px; }
.em-next__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.em-next__item { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: #FFFFFF; border-radius: 24px 24px 24px 6px; padding: 20px 22px; }
.em-next__item:hover { text-decoration: none; box-shadow: 0 0 0 3px #1A1A2E; }
.em-next__name { font-weight: 800; font-size: 21px; line-height: 1.1; }

.nt-comments-wrap { margin-top: 24px; }
.nt-pagination { align-self: center; }

/* ---------- Hoja de secciones y barra inferior (celular) ---------- */
.em-sheet { position: fixed; inset: 0; z-index: 2000; background: rgba(26, 26, 46, .45); display: flex; align-items: flex-end; }
.em-sheet[hidden] { display: none; }
.em-sheet__panel { width: 100%; max-height: 82vh; overflow-y: auto; background: #FFF6D1; border-radius: 28px 28px 0 0; padding: 20px 18px calc(96px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; }
.em-sheet__head { display: flex; justify-content: space-between; align-items: center; }
.em-sheet__title { margin: 0; font-weight: 800; font-size: 24px; }
.em-sheet__close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #FFFFFF; color: #1A1A2E; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.em-sheet__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.em-sheet__menu a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 14px; background: #FFFFFF; font-weight: 700; font-size: 17px; }
.em-sheet__menu .current-menu-item > a { background: #1A1A2E; color: #FFD23F; }
body.em-sheet-open { overflow: hidden; }

.em-dock { display: none; }
@media (max-width: 767.98px) {
	.em-head__inner { padding: 12px 16px 0; gap: 10px 16px; }
	.em-head__status, .em-ask, .em-head__cta { display: none; }
	.em-head .nt-mark { width: 40px; height: auto; }
	.nt-wordmark__a { font-size: 26px; }
	.nt-wordmark__b { font-size: 16px; }
	.em-tabs .nt-menu { gap: 4px 20px; }
	.em-tabs .nt-menu a { font-size: 16px; }
	.em-layout, .em-single { padding: 18px 16px 0; gap: 28px; }
	.nt-main > .nt-section { padding-left: 16px; padding-right: 16px; }
	.em-q { padding: 22px 22px 24px; max-width: 100%; }
	.em-a { width: 92%; }
	body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
	.em-dock { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 2010; background: #1A1A2E; padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px)); }
	.em-dock__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border: 0; background: none; color: #FFFFFF; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
	.em-dock__item:hover { color: #FFFFFF; text-decoration: none; }
	.em-dock__icon { width: 40px; height: 28px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; }
	.em-dock__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
	.em-dock__item.is-active, .em-dock__item[aria-expanded="true"] { color: #FFD23F; }
	.em-dock__item.is-active .em-dock__icon, .em-dock__item[aria-expanded="true"] .em-dock__icon { background: #FFD23F; color: #1A1A2E; }
	.em-dock :focus-visible { outline-color: #FFD23F; }
}
