body[data-page^="certirss"] #main { padding-top:20px; padding-bottom:20px; }
.rss-app { --code-bg:var(--chrome-bg); --code-ink:#000; width:100%; max-width:var(--content-width); min-width:0; margin:0 auto; overflow-wrap:anywhere; }
html[data-theme="dark"] .rss-app { --code-bg:var(--paper); --code-ink:var(--on-red); }
.rss-app [hidden] { display:none!important; }
.rss-columns { display:grid; grid-template-columns:minmax(0,1fr) clamp(300px,30%,360px); gap:24px; align-items:start; }
.rss-detail,.rss-publications { min-width:0; border:1px solid var(--line); border-top:4px solid var(--red); border-radius:var(--radius); background:var(--white); box-shadow:var(--panel-shadow); overflow:hidden; }
.rss-detail { display:flex; flex-direction:column; }
.rss-detail:focus { outline:none; }
.rss-detail > header { margin-bottom:0; flex-shrink:0; }
.rss-detail:has(.rss-empty) > header { display:none; }
.rss-detail:has(.rss-empty) .rss-detail-body { display:flex; flex:1; flex-direction:column; align-items:center; justify-content:center; }
.rss-empty { width:100%; padding:24px; text-align:center; }
.rss-detail .rss-empty h1 { display:flex; align-items:center; justify-content:center; gap:18px; color:var(--ink); font-size:clamp(28px,3vw,44px); line-height:1.08; letter-spacing:-.045em; margin:14px 0 20px; }
.rss-empty h1 svg { width:46px; height:46px; flex:0 0 auto; }
.rss-empty p { margin:0; color:var(--muted); }
.rss-empty .hint { margin-top:24px; font-size:13px; }
.rss-empty kbd { display:inline-flex; padding:2px 5px; border:1px solid var(--line); border-radius:4px; background:var(--chrome-bg); color:var(--muted); font-size:.62rem; white-space:nowrap; }
.rss-detail h1 { margin:0; font-size:1.45rem; line-height:1.05; }
.rss-origin { display:block; }
.rss-publications { align-self:stretch; contain:size; min-height:0; display:flex; flex-direction:column; }
.rss-publications > header { flex-shrink:0; }
.rss-publications .certichat-brand strong { display:block; font-size:1.45rem; line-height:1.05; }
.rss-controls { flex-shrink:0; margin:0; padding:0 8px 8px; }
.rss-search.search-heading { display:flex; align-items:center; gap:8px; width:100%; height:38px; min-height:38px; padding:4px 8px; border:1px solid var(--line); border-radius:6px; background:var(--white); }
.rss-search.search-heading input { flex:1; min-width:0; width:100%; height:28px; min-height:0; margin:0; padding:0; border:0; background:transparent; color:var(--ink); font:inherit; font-size:.8rem; line-height:1.2; }
.rss-search > svg { flex-shrink:0; width:17px; height:17px; }
.rss-search.search-heading button { flex-shrink:0; width:26px; height:26px; min-height:0; padding:4px; }
.rss-search:focus-within { outline:2px solid var(--red); outline-offset:-2px; }
.rss-search input:focus-visible { outline:0; }
.rss-publications [role="tabpanel"] { display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden; }
.rss-items { flex:1; min-height:0; list-style:none; margin:0; padding:8px; overflow:auto; overflow-anchor:none; }
.rss-items li { margin:0 0 8px; padding:0; }
.rss-items li > a { display:flex; gap:10px; align-items:center; padding:8px; border:1px solid transparent; border-radius:7px; background:var(--hover); color:var(--ink); text-decoration:none; }
.rss-items a:hover,.rss-items a:focus-visible { border-color:var(--red); color:var(--ink); }
.rss-items li > a > :last-child { min-width:0; flex:1; }
.rss-items .rss-current { position:relative; height:5px; min-height:5px; border-radius:2px; background:var(--red); }
.rss-items .rss-current > * { display:none; }
.rss-cover { display:grid; place-items:center; flex-shrink:0; aspect-ratio:16/9; background:linear-gradient(135deg,var(--hover),var(--white)); border-block:1px solid var(--line); }
.rss-cover img { width:64px; height:64px; opacity:.45; }
.rss-items .rss-cover { width:40%; min-width:80px; border:0; border-radius:4px; }
.rss-items .rss-cover img { width:24px; height:24px; }
.rss-items h2 { margin:0; font-size:.8rem; line-height:1.35; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.rss-items small { display:block; margin-top:5px; font-size:.7rem; color:var(--muted); }
.rss-article-content { display:flex; flex:1; flex-direction:column; min-height:0; overflow:auto; }
.rss-article-content > .rss-cover { height:clamp(110px,20dvh,190px); aspect-ratio:auto; }
.rss-summary.tube-summary { flex:1 1 0; min-height:0; max-height:none; overflow:auto; mask-image:none; }
.rss-article-content > .rss-cover, .rss-article-content > .rss-article-meta { flex-shrink:0; }
.rss-article-meta { display:grid; grid-template-columns:1fr 1fr; flex:0 0 auto; border-top:1px solid var(--line); }
.rss-article-meta > .tube-resources { display:flex; flex-direction:column; gap:12px; margin:0; border:0; min-width:0; }
.rss-article-meta > .tube-resources > h2, .rss-article-meta .resource-list, .rss-article-meta .resource-list li { margin:0; }
.rss-article-meta .rss-reference p { margin:0; color:var(--muted); font-size:.8rem; }
.rss-article-meta .rss-reference { border-left:1px solid var(--line); }
.rss-summary-header { display:flex; align-items:baseline; justify-content:space-between; gap:8px 16px; flex-wrap:wrap; margin-bottom:16px; padding:12px 0 4px; position:sticky; top:0; z-index:1; background:var(--white); }
.rss-summary-header h2 { margin:0; padding:0; position:static; }
.rss-summary-header h2::after { display:none; }
.rss-summary-header time { margin-left:auto; color:var(--muted); font-size:.75rem; }
.rss-article-content > .rss-cover { border-bottom:0; overflow:hidden; grid-template-rows:minmax(0,1fr); }
.rss-tabs.tube-chapters { flex-shrink:0; padding:6px 8px; background:var(--white); }
.rss-tabs [role="tab"] { padding:3px 6px; font-family:inherit; font-weight:400; cursor:pointer; }
.rss-notice { margin:0; padding:0 12px 8px; font-size:.75rem; color:var(--muted); }
.rss-source-status { padding-left:16px; }
.rss-warning { font-weight:600; }
.rss-app :focus-visible { outline:2px solid var(--red); outline-offset:2px; }
.rss-article-content,.rss-items { scrollbar-color:var(--scrollbar) transparent; scrollbar-width:thin; }
.rss-footer.chat-graph-footer { min-height:32px; }
.rss-footer .chat-graph-meta { display:flex; flex-wrap:wrap; justify-content:space-between; }
.rss-footer .rss-sync { margin-left:auto; }
.rss-footer .chat-graph-meta > div:first-child { border-right:1px solid var(--line); }
[data-rss-article-heading] { display:flex; align-items:center; gap:10px; }
[data-rss-article-heading] > div { min-width:0; }
[data-rss-number]:empty { display:none; }
.rss-detail .certichat-brand small,.rss-publications .certichat-brand small { text-transform:uppercase; }
.rss-items li > a { position:relative; }
.rss-app .tube-video-number { width:max-content; min-width:24px; padding-inline:4px; white-space:nowrap; overflow-wrap:normal; }
.rss-app .tube-player-number { min-width:32px; }
.rss-items .tube-video-number { position:absolute; top:12px; left:12px; pointer-events:none; }
.rss-items [data-rss-description] { display:none; }
.rss-cover.rss-artwork img, .rss-items .rss-cover.rss-artwork img { width:100%; height:100%; object-fit:contain; object-position:center; min-height:0; min-width:0; opacity:1; }

.rss-cover.rss-artwork img[src*=".webp"], .rss-items .rss-cover.rss-artwork img[src*=".webp"] { object-fit:cover; }
.rss-cover.rss-artwork img[src$="/img/cover.svg"], .rss-items .rss-cover.rss-artwork img[src$="/img/cover.svg"] { object-fit:cover; }

@media(min-width:801px) { .rss-detail { height:var(--panel-height); } }
@media(min-width:801px) {
  body[data-page^="certirss"] .certichat { right:var(--frame-left); bottom:calc(var(--footer-height) + var(--layout-gap)); }
  body[data-page^="certirss"] .certichat-launcher { height:var(--chat-launcher-size); }
  body[data-page^="certirss"] .certichat.is-beside-content { right:20px; bottom:calc(var(--footer-height) + 20px); }
}
@media(min-width:1001px) { body[data-page^="certirss"]:has(.certichat:not(.is-beside-content) [data-chat-open]:not([hidden])) .rss-publications { max-height:calc(var(--panel-height) + 20px - 2 * var(--layout-gap) - var(--chat-launcher-size)); } }
@media(max-width:1000px) { .rss-columns { grid-template-columns:minmax(0,1fr); gap:16px; } .rss-publications { contain:none; height:60dvh; min-height:300px; } .rss-article-content { height:65dvh; max-height:65dvh; flex:none; } }
@media(max-width:800px) { body[data-page^="certirss"] #main { padding:0 0 calc(2 * var(--layout-gap) + var(--chat-launcher-size)); } .rss-columns { gap:0; } .rss-detail,.rss-publications { border:0; border-radius:0; box-shadow:none; } .rss-detail { border-top:4px solid var(--red); } .rss-publications { border-top:1px solid var(--line); } .rss-detail h1 { font-size:1rem; line-height:1.2; } }


@container (max-width:430px) { .rss-footer .rss-sync { margin-left:auto; } }

.rss-footer .chat-graph-meta { flex:1; min-width:0; width:auto; }
.rss-footer dd { white-space:normal; overflow-wrap:anywhere; }
.rss-subscribe { flex-shrink:0; display:inline-flex; align-items:center; align-self:stretch; gap:5px; padding:2px 8px; margin-left:auto; border-left:1px solid var(--line); color:var(--ink); font-size:12px; }
.rss-subscribe svg { width:14px; height:14px; }
[data-rss-health] { margin-left:5px; }

.rss-mobile-back { display: none; }
@media (max-width: 800px) {
  body[data-page^="certirss"] #main { height: calc(100dvh - var(--header) - var(--footer-height)); padding: 0; overflow: hidden; }
  .rss-app { --rss-tabs-height: 44px; border-top: 4px solid var(--red); }
  .rss-app, .rss-columns { height: 100%; min-height: 0; }
  .rss-columns { position: relative; }
  .rss-publications { height: 100%; min-height: 0; border: 0; }
  .rss-tabs.tube-chapters { height: var(--rss-tabs-height); min-height: var(--rss-tabs-height); position: sticky; top: auto; bottom: 0; }
  .rss-items { padding-bottom: calc(var(--chat-launcher-size) + 40px); }
  body[data-page^="certirss"]:has([data-rss-mobile="list"]) .certichat { bottom: calc(var(--footer-height) + 44px + 20px); }
  [data-rss-mobile="list"] .rss-detail { display: none; }
  [data-rss-mobile="article"] .rss-publications { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
  [data-rss-mobile="article"] .rss-detail { height: 100%; min-height: 0; border: 0; }
  .rss-detail .rss-article-content { height: auto; max-height: none; min-height: 0; flex: 1; }
  [data-rss-mobile="article"] .rss-detail > .rss-footer,
  [data-rss-mobile="article"] .rss-article-content > .rss-cover { display: none; }
  .rss-mobile-back { display: inline-flex; margin: 0; padding: 0; }
  .rss-mobile-back:focus { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; align-self: flex-start; flex-shrink: 0; margin: 8px 20px; padding: 8px 12px; }
}

.rss-tabs [role="tab"] { display: inline-flex; align-items: center; gap: 6px; }
.rss-tabs [role="tab"] svg { width: 14px; height: 14px; flex-shrink: 0; }
@media (max-width: 800px) {
  .rss-controls { position: relative; z-index: 2; }
  .rss-controls::after, .rss-summary-header::after { content: ""; position: absolute; inset: 100% 0 auto; height: 16px; background: linear-gradient(to bottom, var(--white), transparent); pointer-events: none; }
}

/* El estado activo prevalece sobre el hover compartido, también en pantallas táctiles. */
.rss-publications .certichat-actions [data-rss-push][aria-pressed="true"] { background:var(--red); border-color:var(--red); color:var(--on-red); }
