/* Centro de Ayuda dinámico — estilo del portal de Chatwoot, con la marca Tucán */

.tchc {
	--tchc-brand: #072c50;
	--tchc-brand-soft: #e8eef5;
	--tchc-accent: #1f6fd1;
	--tchc-text: #1e293b;
	--tchc-text-2: #475569;
	--tchc-muted: #64748b;
	--tchc-border: #e2e8f0;
	--tchc-border-soft: #f1f5f9;
	--tchc-hover: #f8fafc;
	--tchc-bg: #ffffff;
	--tchc-radius: 12px;
	background: var(--tchc-bg);
	color: var(--tchc-text);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
.tchc *, .tchc *::before, .tchc *::after { box-sizing: border-box; }
.tchc a { color: inherit; text-decoration: none; }
.tchc h1, .tchc h2, .tchc h3 { margin: 0; color: var(--tchc-text); }
.tchc p { margin: 0; }

.tchc-wrap { width: 100%; max-width: 1024px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .tchc-wrap { padding: 0 32px; } }
.tchc-body { padding-top: 32px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 24px; }
.tchc-muted, .tchc-meta { color: var(--tchc-muted); font-size: 14px; }
.tchc-chev { flex: none; color: var(--tchc-muted); transition: transform .15s ease; }

/* ---------- Hero ---------- */
.tchc-hero { background: var(--tchc-brand); color: #fff; padding: 56px 0 64px; }
.tchc-hero-sm { padding: 24px 0; }
.tchc-hero-title { color: #fff !important; font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.tchc-hero-sub { color: rgba(255, 255, 255, .8); margin-top: 12px; font-size: 18px; }

/* ---------- Buscador ---------- */
.tchc-search { position: relative; max-width: 640px; margin-top: 28px; }
.tchc-hero-sm .tchc-search { margin-top: 0; }
.tchc-search-ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--tchc-muted); pointer-events: none; }
.tchc-search-input {
	width: 100%; height: 48px; padding: 0 16px 0 44px; font-size: 16px;
	color: var(--tchc-text); background: #fff; border: 1px solid var(--tchc-border); border-radius: 10px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .06); outline: none; -webkit-appearance: none; appearance: none;
}
.tchc-search-input:focus { border-color: var(--tchc-accent); box-shadow: 0 0 0 3px rgba(31, 111, 209, .25); }
.tchc-search-input::-webkit-search-cancel-button { cursor: pointer; }
.tchc-search-results {
	position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 8px);
	background: #fff; color: var(--tchc-text); border: 1px solid var(--tchc-border); border-radius: 10px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, .16); padding: 6px; max-height: 420px; overflow-y: auto;
}
.tchc-sr-item { display: block; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.tchc-sr-item:hover, .tchc-sr-item[aria-selected="true"] { background: var(--tchc-hover); }
.tchc-sr-cat { display: block; font-size: 12px; color: var(--tchc-muted); }
.tchc-sr-title { display: block; font-weight: 600; font-size: 15px; }
.tchc-sr-desc { display: block; font-size: 13px; color: var(--tchc-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tchc-sr-item mark { background: #fef08a; color: inherit; padding: 0 1px; border-radius: 2px; }
.tchc-sr-all { display: block; padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--tchc-accent); border-top: 1px solid var(--tchc-border-soft); margin-top: 4px; }
.tchc-sr-empty { padding: 12px; font-size: 14px; color: var(--tchc-muted); }

/* ---------- Enlaces de lista ---------- */
.tchc-link { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 6px 8px; border-radius: 8px; color: var(--tchc-text); line-height: 1.6; }
.tchc-link .tchc-chev { margin-top: 5px; }
.tchc-link:hover { background: var(--tchc-hover); }
.tchc-link:hover .tchc-chev { transform: translateX(2px); color: var(--tchc-text); }

/* ---------- Destacados ---------- */
.tchc-featured { border: 1px solid var(--tchc-border-soft); border-radius: var(--tchc-radius); padding: 20px 12px; display: flex; flex-direction: column; gap: 16px; }
.tchc-featured-title, .tchc-related-title { font-size: 20px; font-weight: 600; padding: 0 8px; }
.tchc-featured-grid { display: grid; grid-template-columns: 1fr; gap: 4px 8px; }
@media (min-width: 768px) { .tchc-featured-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Tarjetas de categoría ---------- */
.tchc-cats { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 768px) { .tchc-cats { grid-template-columns: 1fr 1fr; } }
.tchc-card { border: 1px solid var(--tchc-border-soft); border-radius: var(--tchc-radius); padding: 20px 12px; display: flex; flex-direction: column; gap: 12px; transition: border-color .15s ease, box-shadow .15s ease; }
.tchc-card:hover { border-color: var(--tchc-border); box-shadow: 0 4px 16px rgba(15, 23, 42, .06); }
.tchc-card-top { padding: 0 8px; display: flex; flex-direction: column; gap: 6px; }
.tchc-card-ico { font-size: 24px; line-height: 1; }
.tchc-card-title { font-size: 18px; font-weight: 600; margin-top: 6px; }
.tchc-card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tchc-card-desc { color: var(--tchc-text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tchc-card-list { display: flex; flex-direction: column; flex-grow: 1; }
.tchc-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 0; flex-wrap: wrap; }
.tchc-card-foot .tchc-meta { display: inline-flex; align-items: center; gap: 6px; }
.tchc-avatars { display: inline-flex; }
.tchc-avatars .tchc-avatar + .tchc-avatar { margin-left: -6px; }
.tchc-avatar { border-radius: 999px; object-fit: cover; background: var(--tchc-brand-soft); border: 2px solid #fff; display: inline-block; }
.tchc-avatar-txt { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--tchc-brand); }
.tchc-viewall { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 600; color: var(--tchc-accent) !important; }
.tchc-viewall .tchc-chev { color: currentColor; }
.tchc-viewall:hover .tchc-chev { transform: translateX(2px); }

/* ---------- Migas ---------- */
.tchc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--tchc-muted); }
.tchc-crumbs a:hover { color: var(--tchc-text); text-decoration: underline; text-underline-offset: 3px; }
.tchc-crumbs [aria-current] { color: var(--tchc-text); font-weight: 500; }

/* ---------- Cabecera de categoría / búsqueda ---------- */
.tchc-page-head { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.tchc-page-ico { font-size: 32px; line-height: 1; }
.tchc-page-title { font-size: clamp(24px, 3vw, 32px); font-weight: 700; line-height: 1.25; }
.tchc-page-desc { color: var(--tchc-text-2); font-size: 16px; max-width: 720px; }

.tchc-list { display: flex; flex-direction: column; border: 1px solid var(--tchc-border-soft); border-radius: var(--tchc-radius); overflow: hidden; }
.tchc-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--tchc-border-soft); }
.tchc-row:last-child { border-bottom: 0; }
.tchc-row:hover { background: var(--tchc-hover); }
.tchc-row:hover .tchc-chev { transform: translateX(2px); color: var(--tchc-text); }
.tchc-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tchc-row-cat { font-size: 12px; color: var(--tchc-muted); }
.tchc-row-title { font-weight: 600; }
.tchc-row-desc { font-size: 14px; color: var(--tchc-text-2); }

.tchc-empty { padding: 48px 0; display: flex; flex-direction: column; gap: 8px; }

/* ---------- Artículo ---------- */
.tchc-article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 1024px) { .tchc-article.has-toc { grid-template-columns: minmax(0, 1fr) 220px; } }
.tchc-article-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.tchc-article-meta { display: flex; align-items: center; gap: 10px; margin: 16px 0 32px; font-size: 14px; }
.tchc-article-meta > span { display: flex; flex-direction: column; line-height: 1.4; }
.tchc-article-meta .tchc-avatar { border: 0; }

.tchc-toc { display: none; }
@media (min-width: 1024px) {
	.tchc-toc { display: block; position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; font-size: 14px; }
}
.tchc-toc-title { font-weight: 600; margin-bottom: 8px; }
.tchc-toc ul { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--tchc-border); }
.tchc-toc li { margin: 0; padding: 4px 0; }
.tchc-toc .tchc-toc-l3 { padding-left: 12px; }
.tchc-toc a { color: var(--tchc-muted); display: block; line-height: 1.4; }
.tchc-toc a:hover, .tchc-toc a.is-active { color: var(--tchc-accent); }

.tchc-related { border-top: 1px solid var(--tchc-border-soft); padding-top: 32px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Contenido del artículo ---------- */
.tchc-prose { color: var(--tchc-text); font-size: 17px; line-height: 1.75; overflow-wrap: anywhere; }
.tchc-prose > * + * { margin-top: 1em; }
.tchc-prose h2 { font-size: 24px; font-weight: 700; line-height: 1.3; margin-top: 2em; scroll-margin-top: 96px; }
.tchc-prose h3 { font-size: 19px; font-weight: 600; line-height: 1.35; margin-top: 1.6em; scroll-margin-top: 96px; }
.tchc-prose h2 + *, .tchc-prose h3 + * { margin-top: .6em; }
.tchc-prose p { margin: 0; }
.tchc-prose ul, .tchc-prose ol { padding-left: 1.4em; margin-bottom: 0; }
.tchc-prose li + li { margin-top: .4em; }
.tchc-prose a { color: var(--tchc-accent); text-decoration: underline; text-underline-offset: 3px; }
.tchc-prose strong { font-weight: 600; }
.tchc-prose code { background: var(--tchc-border-soft); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.tchc-prose pre { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 10px; overflow-x: auto; font-size: 14px; }
.tchc-prose pre code { background: none; padding: 0; }
.tchc-prose blockquote { margin-left: 0; padding: 8px 16px; border-left: 3px solid var(--tchc-accent); background: var(--tchc-hover); border-radius: 0 8px 8px 0; color: var(--tchc-text-2); }
.tchc-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.tchc-prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.tchc-prose th, .tchc-prose td { border: 1px solid var(--tchc-border); padding: 8px 12px; text-align: left; }
.tchc-prose th { background: var(--tchc-hover); font-weight: 600; }
.tchc-prose hr { border: 0; border-top: 1px solid var(--tchc-border); margin: 2em 0; }
/* Videos: iframes sueltos se vuelven responsivos; los que ya vienen en contenedor se respetan. */
.tchc-prose > iframe, .tchc-prose p > iframe { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }
.tchc-prose iframe { max-width: 100%; border-radius: 10px; }

/* ---------- Integración con el layout Tucán (nav fija + Tailwind preflight) ---------- */
.tucan-landing-page .tchc-hero { padding-top: calc(56px + var(--tchc-nav-h, 96px)); }
.tucan-landing-page .tchc-hero-sm { padding-top: calc(24px + var(--tchc-nav-h, 96px)); }
.tucan-landing-page .tchc-prose, .tucan-landing-page .tchc-toc { scroll-padding-top: var(--tchc-nav-h, 96px); }
.tucan-landing-page .tchc-prose h2, .tucan-landing-page .tchc-prose h3 { scroll-margin-top: calc(24px + var(--tchc-nav-h, 96px)); }
.tucan-landing-page .tchc-toc { top: calc(24px + var(--tchc-nav-h, 96px)); }
.tchc-prose ul { list-style: disc; }
.tchc-prose ol { list-style: decimal; }
.tchc-prose li::marker { color: var(--tchc-muted); }

/* ---------- Rutas por perfil ---------- */
.tchc-roles { display: flex; flex-direction: column; gap: 8px; }
.tchc-roles-title { font-size: 20px; font-weight: 600; }
.tchc-roles-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 8px; }
@media (min-width: 640px) { .tchc-roles-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .tchc-roles-grid { grid-template-columns: 1fr 1fr 1fr; } }
.tchc-role { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--tchc-border); border-radius: var(--tchc-radius); transition: border-color .15s ease, box-shadow .15s ease; }
.tchc-role:hover { border-color: var(--tchc-accent); box-shadow: 0 4px 16px rgba(15, 23, 42, .06); }
.tchc-role:hover .tchc-chev { transform: translateX(2px); color: var(--tchc-accent); }
.tchc-role-ico { font-size: 28px; line-height: 1; flex: none; }
.tchc-role-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tchc-role-name { font-weight: 600; }
.tchc-role-tag { font-size: 14px; color: var(--tchc-text-2); line-height: 1.4; }
.tchc-role-count { font-size: 12px; color: var(--tchc-muted); margin-top: 4px; }

.tchc-steps { list-style: none; margin: 0; padding: 0; }
.tchc-steps li { margin: 0; border-bottom: 1px solid var(--tchc-border-soft); }
.tchc-steps li:last-child { border-bottom: 0; }
.tchc-steps .tchc-row { border-bottom: 0; justify-content: flex-start; }
.tchc-steps .tchc-row-main { flex: 1; }
.tchc-step-n { flex: none; width: 32px; height: 32px; border-radius: 999px; background: var(--tchc-brand-soft); color: var(--tchc-brand); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; }

.tchc-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; border: 1px solid var(--tchc-border-soft); border-radius: var(--tchc-radius); background: var(--tchc-hover); font-size: 14px; }
.tchc-progress-route { font-weight: 600; color: var(--tchc-accent) !important; }
.tchc-progress-step { color: var(--tchc-muted); }
.tchc-progress-bar { flex: 1 1 120px; height: 6px; border-radius: 999px; background: var(--tchc-border); overflow: hidden; }
.tchc-progress-bar > span { display: block; height: 100%; background: var(--tchc-accent); border-radius: 999px; }

.tchc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.tchc-pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--tchc-border); border-radius: 10px; font-weight: 600; line-height: 1.4; }
.tchc-pager a:hover { border-color: var(--tchc-accent); }
.tchc-pager-next { grid-column: 2; text-align: right; }
.tchc-pager .tchc-muted { font-weight: 400; }
