/* Plantillas Word — diseño portal de descargas (v2) */
:root {
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --bg: #f8fafc;
    --bg-muted: #f1f5f9;
    --surface: #ffffff;
    --brand: #1d4ed8;
    --brand-light: #dbeafe;
    --brand-dark: #1e3a8a;
    --cta: #ea580c;
    --cta-hover: #c2410c;
    --cta-light: #ffedd5;
    --word-blue: #2b579a;
    --word-blue-hover: #1e4178;
    --pdf-red: #c41e0a;
    --pdf-red-hover: #9a1808;
    --success: #059669;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
    --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
    --container: 1160px;
    --container-narrow: 720px;
    --sticky-header-offset: 5.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; scroll-padding-top: var(--sticky-header-offset); }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 2rem, var(--container-narrow)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .5rem 1rem; z-index: 9999; }
.skip-link:focus { left: 1rem; }

/* —— Topbar —— */
.topbar { background: var(--ink); color: #94a3b8; font-size: .78rem; }
.topbar-inner { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; justify-content: center; padding: .5rem 0; }
.topbar-item { white-space: nowrap; }

/* —— Header —— */
.site-header-shell {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.site-header { background: transparent; }
.header-row { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; }
.header-bar { display: contents; }
.header-panel-mount { display: flex; flex: 1; min-width: 0; }
.logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; min-width: 0; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-mark {
    width: 42px; height: 42px; border-radius: 11px;
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.15rem; box-shadow: 0 4px 12px rgba(29, 78, 216, 0.35);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.logo-text strong { font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; }
.logo-tagline { font-size: .72rem; color: var(--muted); }
.header-panel { display: flex; align-items: center; flex: 1; gap: 1rem; min-width: 0; }
.mobile-nav-head, .mobile-nav-backdrop, .mobile-nav-search { display: none; }
.site-nav { display: flex; align-items: center; flex: 1; gap: 1.35rem; justify-content: flex-end; flex-wrap: wrap; }
.site-nav a { color: var(--ink-soft); font-size: .9rem; font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: var(--brand); text-decoration: none; }

.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-dropdown::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: .5rem; }
.nav-dropdown-toggle {
    display: inline-flex; align-items: center; gap: .35rem; margin: 0; padding: 0;
    border: none; background: none; color: var(--ink-soft); font-family: inherit;
    font-size: .9rem; font-weight: 500; cursor: pointer; appearance: none;
}
.nav-dropdown-toggle:hover, .nav-dropdown.is-open .nav-dropdown-toggle { color: var(--brand); }
.nav-dropdown-chevron {
    width: .4rem; height: .4rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform .15s;
}
.nav-dropdown.is-open .nav-dropdown-chevron { transform: rotate(225deg); }
.nav-dropdown-menu {
    display: none; position: absolute; top: calc(100% + .45rem); left: 50%; transform: translateX(-50%);
    min-width: 16rem; margin: 0; padding: .4rem 0; list-style: none;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); z-index: 200;
    max-height: min(75vh, 24rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.nav-dropdown-menu a { display: block; padding: .55rem 1rem; color: var(--ink-soft); font-size: .88rem; text-decoration: none; }
.nav-dropdown-menu a:hover { background: var(--bg-muted); color: var(--brand); }
.nav-dropdown-menu--categories {
    left: 0;
    transform: none;
    width: 34rem;
    max-width: min(94vw, 34rem);
    padding: .5rem;
}
.nav-cat-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.5rem;
    padding: .45rem .65rem;
    border-radius: 8px;
    font-size: .82rem;
    line-height: 1.2;
    white-space: nowrap;
}
.nav-cat-emoji { flex-shrink: 0; width: 1.15rem; text-align: center; font-size: .95rem; }
.nav-cat-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-dropdown-all { border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .35rem; }
.nav-dropdown-all a { font-weight: 600; color: var(--brand); min-height: 2.25rem; display: flex; align-items: center; padding: .45rem .65rem; }
@media (min-width: 961px) {
    .nav-dropdown-menu--categories {
        display: none;
        grid-template-columns: repeat(3, 1fr);
        gap: .15rem;
    }
    .nav-dropdown.is-open .nav-dropdown-menu--categories { display: grid; }
    .nav-dropdown-all { grid-column: 1 / -1; }
}
@media (min-width: 961px) and (hover: hover) {
    .nav-dropdown:hover .nav-dropdown-menu--categories { display: grid; }
}
@media (hover: hover) {
    .nav-dropdown:hover .nav-dropdown-menu:not(.nav-dropdown-menu--categories),
    .nav-dropdown:focus-within .nav-dropdown-menu:not(.nav-dropdown-menu--categories) { display: block; }
}
.nav-dropdown.is-open .nav-dropdown-menu:not(.nav-dropdown-menu--categories) { display: block; }

@media (min-width: 961px) {
    .mobile-nav-search { display: contents; }
    .site-nav > .mobile-nav-link,
    .site-nav > a.mobile-nav-link {
        display: inline-flex;
        align-items: center;
        line-height: 1.2;
        padding: 0;
        border: none;
        font-size: .9rem;
        font-weight: 500;
    }
    .nav-dropdown-toggle.mobile-nav-link {
        display: inline-flex;
        align-items: center;
        padding: 0;
        border: none;
        font-size: .9rem;
        font-weight: 500;
        line-height: 1.2;
    }
    .nav-dropdown-chevron { margin-top: -.1rem; }
}

.header-search {
    display: flex; flex: 0 1 280px; border: 1px solid var(--line); border-radius: 999px;
    overflow: hidden; background: var(--bg-muted); transition: border-color .15s, box-shadow .15s;
}
.header-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12); background: var(--surface); }
.header-search input { flex: 1; border: none; background: transparent; padding: .55rem 1rem; font: inherit; min-width: 0; outline: none; }
.header-search button {
    border: none; background: var(--brand); color: #fff; padding: 0 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.header-search button:hover { background: var(--brand-dark); }

.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    background: none; border: none; padding: .5rem; cursor: pointer; margin-left: auto;
    flex-shrink: 0; border-radius: var(--radius);
}
.nav-toggle:hover { background: var(--bg-muted); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 1px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.mobile-nav-open { overflow: hidden; }

/* —— Breadcrumb —— */
.breadcrumb { background: var(--surface); border-bottom: 1px solid var(--line); font-size: .84rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: .65rem 0; }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: .4rem; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }

/* —— Hero portal (home) —— */
.hero-portal {
    padding: 3.25rem 0 2.75rem;
    background: radial-gradient(ellipse 90% 70% at 50% -20%, #dbeafe 0%, transparent 55%), var(--bg);
}
.hero-portal-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.hero-kicker { margin: 0 0 .6rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.hero-portal h1 {
    margin: 0 0 1rem; font-size: clamp(2rem, 4.5vw, 2.9rem); line-height: 1.08;
    font-weight: 800; letter-spacing: -.035em; color: var(--ink);
}
.hero-lead { margin: 0 0 1.6rem; font-size: 1.08rem; color: var(--ink-soft); max-width: 34rem; }
.hero-search { display: flex; gap: .5rem; margin-bottom: 1.25rem; max-width: 520px; }
.hero-search input {
    flex: 1; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem;
    font: inherit; background: var(--surface); box-shadow: var(--shadow); outline: none;
}
.hero-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12); }
.hero-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.hero-chip {
    display: inline-block; padding: .35rem .85rem; border-radius: 999px; font-size: .82rem; font-weight: 500;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none;
}
.hero-chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); text-decoration: none; }

/* Doc stack visual */
.doc-stack { position: relative; width: 280px; height: 320px; margin: 0 auto; }
.doc-stack-sheet { position: absolute; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.doc-stack-3 { width: 220px; height: 280px; top: 20px; left: 30px; transform: rotate(-6deg); opacity: .5; }
.doc-stack-2 { width: 230px; height: 290px; top: 12px; left: 22px; transform: rotate(-2deg); opacity: .75; }
.doc-stack-1 { width: 240px; height: 300px; top: 0; left: 14px; padding: 1.25rem; }
.doc-stack-bar { height: 8px; border-radius: 4px; background: var(--brand); margin-bottom: 1.25rem; }
.doc-stack-line { height: 8px; border-radius: 4px; background: var(--bg-muted); margin-bottom: .65rem; }
.doc-stack-line.w90 { width: 90%; } .doc-stack-line.w75 { width: 75%; } .doc-stack-line.w85 { width: 85%; } .doc-stack-line.w60 { width: 60%; }
.doc-stack-badges {
    position: absolute; bottom: 1rem; right: 1rem;
    display: flex; gap: .35rem; align-items: center;
}
.doc-stack-badge {
    font-size: .75rem; font-weight: 800; padding: .25rem .6rem; border-radius: 6px;
    color: #fff; letter-spacing: .03em;
}
.doc-stack-badge-docx { background: var(--word-blue); }
.doc-stack-badge-pdf { background: var(--pdf-red); }

/* —— Stats strip —— */
.stats-strip { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats-strip-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 3rem; padding: 1.1rem 0; }
.stat-item { text-align: center; }
.stat-item strong { display: block; font-size: 1.35rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.stat-item span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* —— Buttons —— */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .7rem 1.35rem; border-radius: var(--radius); font-weight: 600; font-size: .92rem;
    text-decoration: none; border: none; cursor: pointer; font-family: inherit; transition: background .15s, transform .1s;
}
.btn:hover { text-decoration: none; }
.btn-download { background: var(--cta-hover); color: #fff; box-shadow: 0 4px 14px rgba(194, 65, 12, 0.35); }
.btn-download:hover { background: #9a3412; color: #fff; transform: translateY(-1px); }
.btn-download-word {
    background: var(--word-blue); color: #fff;
    box-shadow: 0 4px 14px rgba(43, 87, 154, 0.35);
}
.btn-download-word:hover { background: var(--word-blue-hover); color: #fff; transform: translateY(-1px); }
.btn-download-pdf {
    background: var(--pdf-red); color: #fff;
    box-shadow: 0 4px 14px rgba(196, 30, 10, 0.3);
}
.btn-download-pdf:hover { background: var(--pdf-red-hover); color: #fff; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-block { width: 100%; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: .45rem .9rem; font-size: .84rem; }

/* —— Sections —— */
.section { padding: 3.25rem 0; }
.section-muted { background: var(--bg-muted); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.section-head-center { flex-direction: column; align-items: center; text-align: center; }
.section-head h2 { margin: 0 0 .35rem; font-size: 1.65rem; font-weight: 800; letter-spacing: -.03em; }
.section-head p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.link-arrow { font-weight: 600; font-size: .92rem; color: var(--brand); text-decoration: none; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }
.ad-wrap-top { padding: 1.5rem 0 0; }

/* —— Document cards —— */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.doc-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.doc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--line-strong); }
.doc-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.doc-card-link:hover { text-decoration: none; }
.doc-card-preview {
    position: relative; aspect-ratio: 4/5;
    background: linear-gradient(165deg, #eef2f7 0%, #e2e8f0 100%);
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    padding: 2.75rem 1rem 1.25rem;
}
.doc-card-preview img {
    width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 10px 22px rgba(15, 23, 42, .14));
}
.doc-card-rating {
    position: absolute; top: .65rem; left: .65rem;
    display: inline-flex; align-items: center; gap: .2rem;
    padding: .22rem .5rem; border-radius: 5px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(253, 230, 138, 0.85);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
    font-size: .68rem; font-weight: 800; line-height: 1;
    z-index: 1;
}
.doc-card-rating-star { color: #f59e0b; font-size: .78rem; }
.doc-card-rating-value { color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.doc-card-formats {
    position: absolute; top: .65rem; right: .65rem;
    display: flex; flex-direction: row; align-items: center; gap: .3rem;
    z-index: 1;
}
.doc-card-format {
    font-size: .65rem; font-weight: 800; letter-spacing: .05em;
    padding: .2rem .5rem; border-radius: 5px; color: #fff;
}
.doc-card-format-docx { background: var(--word-blue); }
.doc-card-format-pdf { background: var(--pdf-red); }
.doc-card-body { padding: 1rem 1.1rem .75rem; flex: 1; }
.doc-card-cat { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.doc-card-body h3 { margin: .3rem 0 .45rem; font-size: 1rem; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.doc-card-body p { margin: 0; font-size: .86rem; color: var(--ink-soft); line-height: 1.45; }
.doc-card-foot { display: flex; align-items: center; gap: .75rem; margin-top: .65rem; font-size: .78rem; color: var(--muted); }
.doc-card-dl { display: inline-flex; align-items: center; gap: .25rem; }
.doc-card-cta {
    display: block; text-align: center; padding: .7rem; background: var(--bg-muted);
    border-top: 1px solid var(--line); font-size: .88rem; font-weight: 700; color: #9a3412;
}
.doc-card:hover .doc-card-cta { background: var(--cta-light); }
.doc-grid-home .doc-card-cta {
    background: #0080ff;
    color: #fff;
    border-top-color: #0080ff;
}
.doc-grid-home .doc-card:hover .doc-card-cta {
    background: #006dd9;
    color: #fff;
}
.doc-grid-home .doc-card-link:hover .doc-card-cta { color: #fff; text-decoration: none; }
.doc-card.is-filtered-out, .template-card.is-filtered-out { display: none; }

/* —— Category tiles —— */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.cat-tile {
    display: block; padding: 1.35rem; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius-lg); text-decoration: none; color: inherit; transition: box-shadow .2s, border-color .2s;
}
.cat-tile:hover { box-shadow: var(--shadow); border-color: var(--brand); text-decoration: none; }
.cat-tile-icon { font-size: 1.75rem; display: block; margin-bottom: .6rem; }
.cat-tile h3 { margin: 0 0 .4rem; font-size: 1rem; font-weight: 700; }
.cat-tile p { margin: 0 0 .75rem; font-size: .84rem; color: var(--muted); line-height: 1.4; }
.cat-tile-count { font-size: .78rem; font-weight: 600; color: var(--brand); }

/* —— Steps —— */
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; }
.step-num {
    display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: .95rem; margin-bottom: .75rem;
}
.step-card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.step-card p { margin: 0; font-size: .88rem; color: var(--muted); }

/* —— Prose blocks —— */
.prose-block { max-width: 68ch; color: var(--ink-soft); font-size: 1.02rem; }
.listing-main .prose-block { max-width: none; }
.category-seo-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}
.category-seo-footer h3 { font-size: 1.12rem; margin: 1.75rem 0 .65rem; color: var(--ink); }
.category-seo-footer ol { margin: 0 0 1rem; padding-left: 1.35rem; }
.category-seo-footer li { margin-bottom: .45rem; }
.category-seo-footer a { color: var(--brand); font-weight: 600; }
.category-seo-footer em { font-size: .92rem; color: var(--muted); }
.category-faq { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.category-faq h2 { font-size: 1.35rem; margin: 0 0 1rem; }
.prose-block h2 { color: var(--ink); font-size: 1.35rem; margin-top: 0; }
.prose-block p { margin: 0 0 1rem; }
.seo-blocks { display: grid; gap: 1.25rem; }
.seo-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.seo-block h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.seo-block p { margin: 0; color: var(--muted); font-size: .92rem; }

/* —— Guides —— */
.guide-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.guide-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.35rem; }
.guide-tile-image,
.guide-card-image {
    display: block;
    margin: -1.35rem -1.35rem 1rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
}
.guide-tile-image img,
.guide-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.guide-tile h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.guide-tile h3 a { color: inherit; text-decoration: none; }
.guide-tile h3 a:hover { color: var(--brand); }
.guide-tile p { margin: 0 0 .75rem; font-size: .9rem; color: var(--muted); }
.guide-tile-link { font-size: .88rem; font-weight: 600; }

/* —— Page hero (listing) —— */
.page-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 2.25rem 0; }
.page-hero h1 { margin: 0 0 .4rem; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; }
.page-hero p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }

.listing-layout { display: grid; grid-template-columns: 1fr 260px; gap: 2rem; padding: 2rem 0 3rem; align-items: start; }
.layout-with-sidebar { display: grid; grid-template-columns: 1fr 260px; gap: 2rem; padding: 2rem 0 3rem; align-items: start; }
.listing-main, .main-column { min-width: 0; }
.listing-intro { margin-bottom: 1.25rem; }

/* —— Listing toolbar —— */
.listing-toolbar {
    margin-bottom: 1.25rem; padding: 1rem 1.1rem; background: var(--surface);
    border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.listing-toolbar-row {
    display: grid;
    grid-template-columns: 1fr min(300px, 38%);
    gap: .75rem 1rem;
    align-items: end;
}
.listing-search { display: flex; gap: .4rem; margin-bottom: 0; }
.listing-search input { flex: 1; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .85rem; font: inherit; min-width: 0; }
.listing-search button { border: none; background: var(--brand); color: #fff; border-radius: var(--radius); padding: 0 .9rem; cursor: pointer; flex-shrink: 0; }
.listing-filter { min-width: 0; }
.listing-filter-label {
    display: block;
    margin: 0 0 .35rem;
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .02em;
}
.listing-filter-select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .6rem 2rem .6rem .85rem;
    font: inherit;
    color: var(--ink);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E") no-repeat right .75rem center;
    appearance: none;
    cursor: pointer;
}
.listing-filter-select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.listing-results-meta { margin: .75rem 0 0; font-size: .86rem; color: var(--muted); }
.listing-section-title { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.listing-after-grid {
    margin-top: 2.75rem;
    padding-top: 2.25rem;
    border-top: 1px solid var(--line);
}
.listing-after-grid h2 { margin-top: 0; }
.listing-empty-filter { margin: 0 0 1rem; padding: .75rem 1rem; background: var(--cta-light); border-radius: var(--radius); color: var(--cta-hover); font-size: .9rem; }
.listing-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .75rem 1rem;
    margin: 2rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}
.listing-pagination-btn {
    display: inline-flex;
    align-items: center;
    padding: .5rem .85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}
.listing-pagination-btn:hover { border-color: var(--brand); color: var(--brand); }
.listing-pagination-btn.is-disabled { opacity: .45; pointer-events: none; }
.listing-pagination-pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.listing-pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 .45rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
}
.listing-pagination-page:hover { border-color: var(--brand); color: var(--brand); }
.listing-pagination-page.is-current {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.listing-pagination-ellipsis {
    padding: 0 .25rem;
    color: var(--muted);
    font-size: .88rem;
}
.search-section-meta { margin: .35rem 0 0; font-size: .9rem; color: var(--muted); }

/* —— Detail page —— */
.doc-detail-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 2rem 0; }
.doc-detail-hero-inner { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
.doc-detail-breadcrumb { margin: 0 0 .5rem; font-size: .85rem; font-weight: 600; }
.doc-detail-breadcrumb a { color: var(--brand); text-decoration: none; }
.doc-detail-rating { margin: 0 0 .65rem; }
.doc-detail-rating-link {
    display: inline-flex; align-items: center; gap: .35rem; flex-wrap: wrap;
    text-decoration: none; color: inherit; font-size: .88rem; line-height: 1.3;
    padding: .35rem .65rem; margin-left: -.65rem;
    border-radius: 999px; transition: background .15s, color .15s;
}
.doc-detail-rating-link:hover {
    background: #fffbeb; color: #b45309; text-decoration: none;
}
.doc-detail-rating-stars { display: inline-flex; align-items: center; }
.template-stars-sm { font-size: .92rem; }
.doc-detail-rating-score { font-weight: 800; color: #b45309; font-variant-numeric: tabular-nums; }
.doc-detail-rating-sep { color: #d6d3d1; font-weight: 700; }
.doc-detail-rating-count { color: var(--muted); font-weight: 600; font-size: .84rem; }
.doc-detail-rating-empty { color: var(--muted); font-weight: 600; font-size: .84rem; }
.doc-detail-hero h1 { margin: 0 0 .35rem; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.doc-detail-lead { margin: 0 0 1rem; color: var(--ink-soft); font-size: 1.05rem; }
.doc-detail-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font-size: .75rem; font-weight: 600; padding: .28rem .65rem; border-radius: 999px; background: var(--bg-muted); color: var(--ink-soft); }
.tag-free { background: #dcfce7; color: #166534; }
.tag-muted { color: var(--ink-soft); }

.doc-download-panel { position: sticky; top: 5.5rem; }
.doc-download-panel-inner {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1.25rem; box-shadow: var(--shadow-lg);
}
.doc-download-panel-preview {
    border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem;
    border: 1px solid var(--line); background: linear-gradient(165deg, #eef2f7, #e2e8f0);
    padding: .85rem;
}
.doc-download-panel-preview img {
    width: 100%; height: auto; display: block; object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(15, 23, 42, .12));
}
.doc-download-actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.doc-download-meta { list-style: none; margin: 1rem 0 0; padding: 0; font-size: .84rem; color: var(--muted); }
.doc-download-meta li { margin-bottom: .35rem; }
.doc-download-meta strong { color: var(--ink-soft); }

.doc-detail-layout { display: grid; grid-template-columns: 1fr 260px; gap: 2rem; padding: 2rem 0 3rem; align-items: start; }
.doc-detail-content { min-width: 0; }
.doc-detail-content h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 .75rem; }
.doc-detail-content h2:first-child { margin-top: 0; }
.doc-detail-note { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-soft); }
.doc-detail-aside { position: sticky; top: 5.5rem; }
.aside-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem; margin-bottom: 1rem; }
.aside-box .aside-heading,
.aside-box h2 { margin: 0 0 .65rem; font-size: .92rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.aside-links { list-style: none; margin: 0; padding: 0; }
.aside-links li { margin-bottom: .35rem; }
.aside-links a { font-size: .88rem; color: var(--ink-soft); text-decoration: none; }
.aside-links a:hover { color: var(--brand); }

/* Sidebar (listing) */
.sidebar { position: sticky; top: 5.5rem; }
.sidebar-box, .trust-box {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1.15rem; margin-bottom: 1rem;
}
.sidebar-heading { margin: 0 0 .65rem; font-size: .92rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sidebar-links { list-style: none; margin: 0; padding: 0; }
.sidebar-links li { margin-bottom: .35rem; }
.sidebar-links a { font-size: .88rem; color: var(--ink-soft); text-decoration: none; }
.trust-box ul { margin: 0; padding-left: 1rem; font-size: .86rem; color: var(--muted); }

/* Download specs */
.download-specs {
    background: var(--bg-muted); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 1.25rem; margin: 2rem 0;
}
.download-specs h2 { margin: 0 0 .75rem; font-size: 1.1rem; }
.download-specs-intro { margin: 0 0 .85rem; font-size: .9rem; color: var(--ink-soft); }
.download-specs a {
    color: var(--brand-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.download-specs a:hover { color: var(--brand); }
.download-format-note {
    margin: 0 0 1rem; padding: .75rem 1rem; font-size: .88rem; background: var(--surface);
    border-left: 3px solid var(--cta); border-radius: 0 var(--radius) var(--radius) 0;
}
.download-specs-grid { display: grid; gap: 1rem; }
@media (min-width: 560px) { .download-specs-grid { grid-template-columns: 1fr 1fr; } }
.download-specs-item dt { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: .2rem; }
.download-specs-item dd { margin: 0; font-size: .92rem; color: var(--ink); }
.download-specs-item code { font-size: .82em; background: var(--surface); padding: .1rem .35rem; border-radius: 4px; }
.download-specs-meta { color: var(--ink-soft); font-size: .86rem; }
.compat-list { margin: 0; padding-left: 1.1rem; font-size: .86rem; color: var(--ink-soft); }

/* FAQ */
.faq-section-title { text-align: center; margin: 0 0 1.5rem; font-size: 1.5rem; font-weight: 800; }
.faq-list { display: flex; flex-direction: column; gap: .5rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.1rem; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: .9rem 0; list-style: none; font-size: .95rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin: 0 0 1rem; color: var(--ink-soft); font-size: .92rem; }

/* Ratings */
#ocena { scroll-margin-top: var(--sticky-header-offset); }
.template-rating {
    margin: 1.75rem 0;
    padding: 0;
    border: 1px solid #fde68a;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #fffbeb 0%, #fff 48%, #f8fafc 100%);
    box-shadow: 0 8px 28px rgba(180, 83, 9, 0.08);
    overflow: hidden;
}
.template-rating-head {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1.15rem 1.25rem .25rem;
}
.template-rating-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #fbbf24, #f59e0b);
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}
.template-rating-head-text { min-width: 0; }
.template-rating h2 { margin: 0 0 .25rem; font-size: 1.15rem; letter-spacing: -.02em; }
.template-rating-intro { margin: 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.45; }
.template-rating-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 1rem;
    padding: .75rem 1.25rem 1.25rem;
}
@media (max-width: 640px) {
    .template-rating-body { grid-template-columns: 1fr; }
}
.template-rating-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem .75rem;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(253, 230, 138, 0.7);
}
.template-rating-scoreboard {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: .15rem;
    margin-bottom: .35rem;
}
.template-rating-score-empty {
    margin: 0 0 .5rem;
    font-size: .95rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: -.01em;
}
.template-rating-average {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    color: var(--ink);
}
.template-rating-average-max { color: var(--muted); font-weight: 600; font-size: 1rem; }
.template-rating-meta { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.template-stars { display: inline-flex; gap: .12rem; line-height: 1; }
.template-stars-lg { font-size: 1.15rem; }
.template-stars-empty { opacity: .55; }
.template-star-full, .template-star-half { color: #f59e0b; text-shadow: 0 1px 0 rgba(180, 83, 9, 0.15); }
.template-star-empty { color: #d6d3d1; }
.template-rating-count-line { margin: 0; font-size: .82rem; color: var(--muted); font-weight: 600; }
.template-rating-empty {
    margin: 0;
    font-size: .82rem;
    color: var(--ink-soft);
    line-height: 1.4;
    max-width: 16rem;
}
.template-rating-empty-badge {
    display: inline-block;
    margin-right: .35rem;
    padding: .1rem .45rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    vertical-align: middle;
}
.template-rating-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 1rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.template-rating-vote-prompt {
    margin: 0 0 .65rem;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
}
.template-rating-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    padding: .45rem .65rem;
    border-radius: 999px;
    background: #fafaf9;
    border: 1px solid #e7e5e4;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.template-rating-input.is-inviting {
    animation: rating-invite 2.8s ease-in-out infinite;
}
@keyframes rating-invite {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
    50% { box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }
}
.template-rating-input:focus-within {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.22);
    animation: none;
}
.template-rating-star-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    background: none;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    color: #d6d3d1;
    padding: 0;
    transition: transform .12s ease, color .12s ease, background .12s ease;
}
.template-rating-star-glyph {
    font-size: 1.85rem;
    line-height: 1;
    transition: transform .12s ease;
}
.template-rating-star-btn:hover,
.template-rating-star-btn.is-hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
}
.template-rating-star-btn:hover .template-rating-star-glyph,
.template-rating-star-btn.is-hover .template-rating-star-glyph {
    transform: scale(1.12);
}
.template-rating-star-btn.is-active {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.14);
}
.template-rating-star-btn.is-active .template-rating-star-glyph {
    transform: scale(1.08);
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.35));
}
.template-rating-star-btn:disabled { opacity: .55; cursor: wait; }
.template-rating-vote-hint {
    margin: .65rem 0 0;
    min-height: 1.25rem;
    font-size: .88rem;
    color: var(--ink-soft);
    font-weight: 600;
    text-align: center;
}
.template-rating-vote-hint [data-rating-yours-hint] { color: var(--ink); }
.template-rating.has-voted .template-rating-vote-hint [data-rating-yours-hint] { color: #b45309; }
.template-rating-message {
    margin: .55rem 0 0;
    min-height: 1.1rem;
    font-size: .84rem;
    text-align: center;
    color: var(--success);
    font-weight: 600;
}
.template-rating-message.is-error { color: #dc2626; }
.template-rating-message.is-success { color: #059669; }
.meta-pill.meta-rating { color: #b45309; background: #fffbeb; }

/* Ads — display responsive (auto), tamaño generoso para mejor CTR */
.ad-slot { margin: 1.75rem 0; width: 100%; }
.ad-slot ins.adsbygoogle { display: block; width: 100%; min-height: inherit; }
.ad-placeholder {
    min-height: 120px; background: repeating-linear-gradient(-45deg, #f1f5f9, #f1f5f9 8px, #e8ecf0 8px, #e8ecf0 16px);
    border: 1px dashed var(--line-strong); border-radius: var(--radius);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    color: var(--muted); font-size: .78rem; text-align: center; padding: 1rem;
}
.ad-in_content .ad-placeholder, .ad-in_content { min-height: 320px; }
.ad-in_content ins.adsbygoogle { min-height: 320px; }
.ad-detail_top .ad-placeholder, .ad-detail_top { min-height: 320px; margin-top: 1.25rem; }
.ad-detail_top ins.adsbygoogle { min-height: 320px; }
.doc-detail-main .ad-slot { margin-bottom: 0; }
.ad-detail_mid .ad-placeholder, .ad-detail_mid { min-height: 300px; }
.ad-detail_mid ins.adsbygoogle { min-height: 300px; }
.ad-sidebar .ad-placeholder, .ad-sidebar { min-height: 300px; }
.ad-sidebar ins.adsbygoogle { min-height: 300px; }
.ad-listing_end .ad-placeholder, .ad-listing_end { min-height: 280px; }
.ad-listing_end ins.adsbygoogle { min-height: 280px; }
.ad-download_gate .ad-placeholder, .ad-download_gate { min-height: 280px; }
.ad-download_gate ins.adsbygoogle { min-height: 280px; }
.ad-wrap-top .ad-slot { margin-top: 0; }

/* Search page */
.search-page { padding: 2rem 0 3rem; }
.search-hero-summary { margin: 0 0 1rem; color: var(--muted); font-size: 1rem; }
.search-form { display: flex; gap: .5rem; margin-top: 1rem; max-width: 560px; }
.search-form input {
    flex: 1; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius);
    font: inherit; background: var(--surface);
}
.search-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12); }
.search-section-header { margin: 0 0 1rem; }
.search-section-header-spaced { margin-top: 2.25rem; }
.search-section-header h2 { margin: 0; font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.search-section-count { font-weight: 600; color: var(--muted); font-size: .95rem; }
.search-results-grid { margin-bottom: .5rem; }
/* Legacy alias — algunas vistas antiguas usaban template-grid */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.empty-state { padding: 2.5rem; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--radius-lg); border: 1px dashed var(--line); }

/* Footer */
.site-footer { background: var(--ink); color: #94a3b8; margin-top: 2rem; padding: 3rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; }
.footer-brand .logo-mark { width: 36px; height: 36px; font-size: 1rem; margin-bottom: .75rem; }
.site-footer h3 { color: #f1f5f9; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .85rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.site-footer a { color: #94a3b8; font-size: .88rem; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-eeat { font-size: .84rem; line-height: 1.55; max-width: 32ch; }
.footer-categories {
    border-top: 1px solid #1e293b;
    padding: 1.75rem 0 2rem;
}
.footer-categories h3 { margin-bottom: 1rem; }
.footer-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-cat-grid a {
    display: block;
    font-size: .82rem;
    line-height: 1.35;
    padding: .2rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.footer-bottom { border-top: 1px solid #1e293b; padding: 1rem 0; font-size: .82rem; text-align: center; color: #94a3b8; }

/* Download gate */
body.download-gate-open { overflow: hidden; }
.download-gate { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.download-gate[hidden] { display: none !important; }
.download-gate-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.75); backdrop-filter: blur(6px); }
.download-gate-panel {
    position: relative; z-index: 1; width: min(100%, 440px); background: var(--surface);
    border-radius: var(--radius-lg); padding: 1.75rem; box-shadow: var(--shadow-lg); text-align: center;
}
.download-gate-close { position: absolute; top: .75rem; right: .75rem; width: 34px; height: 34px; border: none; background: var(--bg-muted); border-radius: 50%; font-size: 1.3rem; cursor: pointer; color: var(--muted); }
.download-gate-title { margin: 0 0 .35rem; font-size: 1.3rem; font-weight: 800; }
.download-gate-name { color: var(--muted); font-size: .92rem; margin: 0 0 1rem; }
.download-gate-ad { margin-bottom: 1rem; min-height: 250px; }
.download-gate-countdown { font-size: 3rem; font-weight: 800; color: var(--cta); font-variant-numeric: tabular-nums; }
.download-gate-funding { font-size: .8rem; color: var(--muted); margin: 1rem 0; }
.download-gate-actions { display: flex; flex-direction: column; gap: .5rem; }

/* Cookie consent */
html.cookie-consent-open { overflow: hidden; }
.cookie-consent { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cookie-consent[hidden] { display: none !important; }
.cookie-consent-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.cookie-consent-panel { position: relative; width: min(100%, 42rem); background: var(--surface); border-radius: var(--radius-lg); padding: 1.35rem; box-shadow: var(--shadow-lg); }
.cookie-consent-title { margin: 0 0 .5rem; font-size: 1.15rem; font-weight: 700; }
.cookie-consent-intro { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.cookie-consent-actions { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }

.hidden { display: none !important; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }

/* Guide / static pages legacy */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }
.guide-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.35rem; }
.guide-card-image {
    display: block;
    margin: -1.35rem -1.35rem 1rem;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f1f5f9;
}
.guide-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.guide-featured-image {
    margin: 0 0 1.25rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    background: #f8fafc;
}
.guide-featured-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
}
.guide-card h3 { margin: 0 0 .5rem; font-size: 1.05rem; line-height: 1.35; }
.guide-card h3 a { color: inherit; text-decoration: none; }
.guide-card h3 a:hover { color: var(--brand); }
.guide-card p { margin: 0 0 .75rem; font-size: .9rem; color: var(--muted); line-height: 1.45; }
.guide-card .link-more { font-size: .88rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.guide-card .link-more:hover { text-decoration: underline; }

.guide-adjacent-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2.5rem 0 1.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
}
.guide-adjacent-link {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.guide-adjacent-link:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 14px rgba(29, 78, 216, .08);
}
.guide-adjacent-prev { text-align: left; }
.guide-adjacent-next { text-align: right; }
.guide-adjacent-kicker {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}
.guide-adjacent-title {
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
}
.guide-adjacent-link:hover .guide-adjacent-title { color: var(--brand); }
.guide-adjacent-spacer { display: block; }
.page-header { background: var(--surface); border-bottom: 1px solid var(--line); padding: 2rem 0; }
.page-header h1 { margin: 0 0 .35rem; font-weight: 800; }
.page-header .doc-detail-rating { margin: 0 0 .75rem; }
.prose h2 { font-size: 1.25rem; margin-top: 2rem; }
.static-content .about-lead { font-size: 1.08rem; color: var(--ink-soft); margin-bottom: 1.5rem; }
.about-trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
    list-style: none;
    padding: 0;
}
.about-trust-card {
    padding: 1.1rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}
.about-trust-card h3 {
    margin: 0 0 .45rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
}
.about-trust-card p {
    margin: 0;
    font-size: .92rem;
    color: var(--muted);
    line-height: 1.45;
}
.about-foot {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    font-size: .88rem;
    color: var(--muted);
}
.legal-cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.25rem;
    font-size: .88rem;
}
.legal-cookie-table th,
.legal-cookie-table td {
    border: 1px solid var(--line);
    padding: .65rem .75rem;
    text-align: left;
    vertical-align: top;
}
.legal-cookie-table th {
    background: var(--surface);
    font-weight: 700;
    color: var(--ink);
}
.legal-cookie-table td {
    color: var(--ink-soft);
}
@media (max-width: 720px) {
    .legal-cookie-table { display: block; overflow-x: auto; white-space: nowrap; }
}
.keyword-tag { display: inline-block; font-size: .75rem; padding: .2rem .55rem; margin: 0 .3rem .3rem 0; background: var(--brand-light); color: var(--brand-dark); border-radius: 999px; }

/* Responsive */
@media (max-width: 960px) {
    .doc-detail-hero-inner, .doc-detail-layout, .listing-layout, .layout-with-sidebar { grid-template-columns: 1fr; }
    .doc-download-panel, .doc-detail-aside, .sidebar { position: static; }
    .listing-toolbar-row { grid-template-columns: 1fr; }
    .sidebar-categories { display: none; }
    .guide-adjacent-nav { grid-template-columns: 1fr; }
    .guide-adjacent-next { text-align: left; }
    .steps-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
    .footer-cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
    .footer-cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .header-row {
        display: block;
        padding: .55rem 0;
    }
    .header-bar {
        display: flex;
        align-items: center;
        gap: .75rem;
    }
    .header-panel-mount {
        display: block;
        flex: none;
    }
    .logo { flex: 1; min-width: 0; }
    .logo-tagline { display: none; }
    .nav-toggle { display: flex; }

    .mobile-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 10040;
        background: rgba(15, 23, 42, 0.5);
    }
    .mobile-nav-backdrop.is-visible { display: block; }

    .header-panel {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 10050;
        width: 100%;
        max-width: none;
        height: 100%;
        height: 100dvh;
        flex: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding:
            env(safe-area-inset-top, 0)
            env(safe-area-inset-right, 0)
            env(safe-area-inset-bottom, 0)
            env(safe-area-inset-left, 0);
        background: var(--surface);
        box-shadow: none;
        transform: none;
        overflow: hidden;
    }
    .header-panel.is-open { display: flex; }

    .mobile-nav-head {
        display: grid;
        grid-template-columns: 2.5rem 1fr 2.5rem;
        align-items: center;
        flex-shrink: 0;
        gap: .5rem;
        padding: .85rem 1rem;
        border-bottom: 1px solid var(--line);
        background: var(--surface);
    }
    .mobile-nav-back { grid-column: 1; }
    .mobile-nav-title {
        grid-column: 2;
        font-weight: 700;
        font-size: 1.05rem;
        color: var(--ink);
        text-align: center;
    }
    .mobile-nav-close { grid-column: 3; justify-self: end; }
    .mobile-nav-back,
    .mobile-nav-close {
        width: 2.5rem; height: 2.5rem; border: none; border-radius: 50%;
        background: var(--bg-muted); color: var(--ink-soft);
        font-size: 1.25rem; line-height: 1; cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
    }
    .mobile-nav-back[hidden] { display: none !important; }
    .mobile-nav-close { font-size: 1.5rem; }

    .site-nav {
        flex: 1;
        min-height: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        width: 100%;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: .25rem 1rem 1rem;
    }
    .mobile-nav-link,
    .site-nav > a,
    .nav-dropdown-toggle.mobile-nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: .95rem 0;
        border-bottom: 1px solid var(--line);
        font-size: 1.02rem;
        font-weight: 600;
        color: var(--ink);
        text-align: left;
        background: none;
        border-left: none;
        border-right: none;
        border-top: none;
        cursor: pointer;
    }
    .nav-dropdown-toggle.mobile-nav-link .nav-dropdown-chevron {
        width: .5rem;
        height: .5rem;
        margin-right: .15rem;
        opacity: .75;
    }
    .nav-dropdown {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .nav-dropdown::after { display: none; }

    /* Vista principal: categorías ocultas */
    .header-panel:not(.mobile-nav-show-cats) .mobile-nav-cats {
        display: none !important;
    }

    /* Vista categorías: pantalla dedicada con lista scroll */
    .header-panel.mobile-nav-show-cats .site-nav > a,
    .header-panel.mobile-nav-show-cats .nav-dropdown-toggle {
        display: none !important;
    }
    .header-panel.mobile-nav-show-cats .mobile-nav-search {
        display: none;
    }
    .header-panel.mobile-nav-show-cats .site-nav {
        padding: 0;
        overflow: hidden;
    }
    .header-panel.mobile-nav-show-cats .nav-dropdown {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }
    .header-panel.mobile-nav-show-cats .mobile-nav-cats {
        display: flex !important;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        background: var(--surface);
        border: none;
        box-shadow: none;
        width: 100%;
        max-width: none;
        max-height: none;
        list-style: none;
    }
    .mobile-nav-cats li { margin: 0; }
    .mobile-nav-cats .nav-cat-link {
        display: flex;
        align-items: center;
        gap: .75rem;
        min-height: 3rem;
        padding: .75rem 1rem;
        margin: 0;
        border: none;
        border-bottom: 1px solid var(--line);
        border-radius: 0;
        background: var(--surface);
        font-size: .96rem;
        font-weight: 500;
        color: var(--ink-soft);
        white-space: nowrap;
        text-decoration: none;
    }
    .mobile-nav-cats .nav-cat-link:active,
    .mobile-nav-cats .nav-cat-link:hover {
        color: var(--brand);
        background: var(--bg-muted);
        text-decoration: none;
    }
    .mobile-nav-cats .nav-cat-emoji {
        width: 1.5rem;
        font-size: 1.1rem;
        text-align: center;
        flex-shrink: 0;
    }
    .mobile-nav-cats .nav-cat-label {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .mobile-nav-cats .nav-dropdown-all {
        border-top: 1px solid var(--line);
        margin-top: 0;
        padding-top: 0;
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        background: var(--bg-muted);
    }
    .mobile-nav-cats .nav-dropdown-all a {
        display: flex;
        align-items: center;
        min-height: 3rem;
        padding: .75rem 1rem;
        font-weight: 600;
        color: var(--brand);
        font-size: .95rem;
        text-decoration: none;
    }

    .nav-dropdown-menu,
    .nav-dropdown-menu--categories {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
    }
    .nav-dropdown:hover .nav-dropdown-menu { display: none; }

    .mobile-nav-search {
        display: block;
        flex-shrink: 0;
        padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom, 0));
        border-top: 1px solid var(--line);
        background: var(--bg-muted);
    }
    .mobile-nav-search .header-search {
        width: 100%;
        flex: none;
        margin: 0;
        background: var(--surface);
    }

    .hero-portal-inner { grid-template-columns: 1fr; }
    .hero-portal-visual { display: none; }
    .topbar-inner { gap: .35rem .85rem; font-size: .72rem; }
}

.author-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0 2rem;
}
.author-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.author-card h3 { margin: 0 0 .35rem; font-size: 1.05rem; font-family: inherit; }
.author-role { font-size: .85rem; font-weight: 600; color: var(--primary); margin: 0 0 .75rem; }
.author-card > p:not(.author-role):not(.author-meta) { font-size: .92rem; color: var(--text-muted); margin: 0 0 .75rem; line-height: 1.55; }
.author-meta { font-size: .82rem; color: var(--text-muted); margin: 0; }
.author-avatar {
    width: 2.75rem; height: 2.75rem; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; margin-bottom: .75rem;
}
