/* Shared reader geometry. Current/Hybrid and dark/light use the same priorities. */
.reader-side-shortcuts{display:none}
@media(max-width:1279px){
 .real-mode .reader-side-shortcuts{display:flex;flex-direction:column;flex:none;border-bottom:1px solid var(--line)}
 .real-mode .reader-side-shortcuts button{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0;color:var(--blue)}
 .real-mode .reader-side-shortcuts svg{width:20px;height:20px}
 .real-mode #reader-market-rail:not([data-market-view=mini]) .reader-side-shortcuts,.real-mode #reader-market-rail.market-mobile-collapsed .reader-side-shortcuts{display:none}
 .real-mode .reader-pane-divider{display:none}
}
@media(min-width:1001px) and (max-width:1279px){
 .real-mode .terminal,.real-mode .terminal.reader-resizable{grid-template-columns:168px minmax(0,1fr)}
 .real-mode .terminal:has(>#right-panel.open){grid-template-columns:168px minmax(0,1fr) minmax(300px,34vw)}
 .real-mode .terminal>#main-panel{grid-column:2}
 .real-mode .terminal:has(>#right-panel.open)>#main-panel{padding-right:0}
 .real-mode .terminal>#right-panel:not(.open){display:contents}
 .real-mode #right-panel:not(.open)>.panel-controls,.real-mode #right-panel:not(.open) #panel-content{display:none}
 .real-mode .terminal>#right-panel.open{display:grid;position:static;grid-column:3;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);width:auto;max-width:none;min-height:0;margin-right:44px;box-shadow:none}
 .real-mode #right-panel.open>.panel-controls{grid-column:1;grid-row:1;overflow:auto}
 .real-mode #right-panel.open #panel-content{grid-column:1;grid-row:2;overflow:auto}
 .real-mode #right-panel .panel-close{display:flex;min-width:44px;min-height:44px}
 .real-mode #right-panel.open .reader-panel-workspace{display:contents}
 .real-mode.story-market-hidden .terminal>#right-panel.open{margin-right:0}
}
/* The sculpture gets a bounded slot; its morphs never change header geometry. */
@media(min-width:761px){
 body.real-mode .topbar{display:flex;flex-wrap:nowrap;align-items:center;gap:clamp(6px,.7vw,14px);padding-inline:clamp(8px,1vw,20px)}
 body.real-mode .topbar>:not(.brand-identity):not(.header-intelligence){align-self:center;margin-top:0}
 body.real-mode .topbar>.brand-identity{flex:0 0 clamp(164px,17vw,252px);width:clamp(164px,17vw,252px)}
 body.real-mode .topbar .brand-identity .brand{width:100%;height:99px}
 html[data-reader-skin] body.real-mode .topbar .header-intelligence{position:relative;inset:auto;flex:0 0 64px;width:64px;min-width:64px;max-width:64px;height:48px;margin:0;overflow:hidden}
 body.real-mode .topbar>.search-wrap{flex:1 1 220px;min-width:160px;max-width:none;margin-left:auto}
 body.real-mode .topbar>.top-links{flex:none}
 body.real-mode .topbar .account-menu{margin-left:0;flex:none}
 body.real-mode .topbar .account-menu>.login-entry{min-height:60px}
 body.real-mode .topbar .reader-tools{flex:none}
}
@media(min-width:761px) and (max-width:1279px){
 body.real-mode .topbar>.top-links{display:none}
 body.real-mode .topbar .pulse-refresh-copy,body.real-mode .topbar .weather-mini>span{display:none}
 body.real-mode .topbar .weather-mini{width:44px;min-width:44px;padding:2px}
 body.real-mode .topbar .weather-mini img{width:38px;height:32px}
 body.real-mode .topbar .pulse-refresh{flex:none}
 body.real-mode .topbar .pulse-refresh-button{width:44px;height:44px}
}
@media(min-width:761px) and (max-width:999px){
 body.real-mode .topbar>.brand-identity{flex-basis:164px;width:164px}
 html[data-reader-skin] body.real-mode .topbar .header-intelligence{flex-basis:44px;min-width:44px;width:44px;max-width:44px;height:44px}
 body.real-mode .topbar>.search-wrap{min-width:130px;flex-basis:130px}
 body.real-mode .topbar .reader-tools [data-text-size=reset]{display:none}
 body.real-mode .topbar .reader-tools button{min-width:28px;padding-inline:3px}
 body.real-mode .topbar .account-menu>.login-entry{width:48px;min-width:48px}
}
@media(max-width:760px){
 html[data-reader-skin] body.real-mode .topbar .header-intelligence{position:relative;inset:auto;width:64px;min-width:0;max-width:64px;height:48px;margin:0;overflow:hidden}
}

/* Phone chrome uses equal touch cells. Decorative animation cannot displace
   actions, and a panel owns its full width while its content scrolls inside. */
@media(max-width:760px){
 html[data-reader-skin] body.real-mode{--header:112px}
 html[data-reader-skin] body.real-mode .topbar{display:grid;grid-template-columns:repeat(8,minmax(44px,1fr));grid-template-rows:56px 44px;gap:0;padding:6px 8px;height:var(--header)}
 html[data-reader-skin] body.real-mode .topbar>.brand-identity{grid-column:1/6;grid-row:1;align-self:center;width:100%;max-width:210px;height:56px;margin:0}
 html[data-reader-skin] body.real-mode .topbar .brand-identity .brand{width:100%;height:56px;min-width:0}
 html[data-reader-skin] body.real-mode .topbar>.header-intelligence{grid-column:6/8;grid-row:1;justify-self:center;align-self:center;width:56px;max-width:56px;height:44px;margin:0}
 html[data-reader-skin] body.real-mode .topbar>.account-menu{grid-column:8;grid-row:1;justify-self:center;align-self:center;width:100%;min-width:44px;margin:0}
 html[data-reader-skin] body.real-mode .topbar .account-menu>.login-entry{width:100%;min-width:44px;min-height:44px;padding:2px;overflow-wrap:normal;word-break:normal}
 html[data-reader-skin] body.real-mode .topbar>.pulse-refresh{grid-column:1;grid-row:2;justify-self:center;margin:0}
 html[data-reader-skin] body.real-mode .topbar>.weather-mini{grid-column:2;grid-row:2;justify-self:center;margin:0}
 html[data-reader-skin] body.real-mode .topbar>.reader-tools{display:contents}
 html[data-reader-skin] body.real-mode .topbar>.reader-tools>button{grid-row:2;align-self:center;justify-self:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;margin:0}
 html[data-reader-skin] body.real-mode .topbar>.reader-tools>[data-text-size=decrease]{grid-column:3}
 html[data-reader-skin] body.real-mode .topbar>.reader-tools>[data-text-size=increase]{grid-column:4}
 html[data-reader-skin] body.real-mode .topbar>.reader-tools>.mobile-overview-shortcut{grid-column:5}
 html[data-reader-skin] body.real-mode .topbar>.reader-tools>.mobile-header-menu{grid-column:6}
 html[data-reader-skin] body.real-mode .topbar>.mobile-search{grid-column:7;grid-row:2;align-self:center;justify-self:center;width:44px;min-height:44px;margin:0}
 html[data-reader-skin] body.real-mode .topbar>.reader-appearance{grid-column:8;grid-row:2;align-self:center;justify-self:center;margin:0}
 html[data-reader-skin] body.real-mode .terminal>#right-panel.open{display:flex;flex-direction:column;position:fixed;inset:var(--header) 0 0;width:100%;max-width:none;min-height:0;margin:0;padding:0 0 env(safe-area-inset-bottom,0px);overflow:hidden;box-shadow:none;z-index:55}
 html[data-reader-skin] body.real-mode #right-panel.open>.panel-controls{position:relative;top:auto;flex:0 0 auto;min-width:0;margin:0;padding:0;overflow:visible}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs{width:100%;min-width:0;min-height:44px;padding:0 4px;gap:0;grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,1fr)) 44px}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs>[data-panel]{min-width:0;min-height:44px;padding:6px 3px;white-space:normal;word-break:normal;overflow-wrap:normal}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs>.panel-close{width:44px;min-width:44px;min-height:44px;margin:0}
 html[data-reader-skin] body.real-mode #right-panel.open .reader-panel-workspace{display:flex;flex:1 1 auto;min-height:0;min-width:0;margin:0;padding:0;overflow:hidden}
 html[data-reader-skin] body.real-mode #right-panel.open #panel-content{flex:1 1 auto;width:100%;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;container:overview-content / inline-size}
 html[data-reader-skin] body.real-mode:has(#right-panel.open) .mobile-rail-visibility{display:none}
 html[data-reader-skin] body.real-mode:has(#right-panel.open)>#reader-market-rail[data-market-view=mini]{visibility:hidden;pointer-events:none}
 html[data-reader-skin] body.real-mode .launcher-label{white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none}
 html[data-reader-skin] body.real-mode .launcher-tile{min-width:0;justify-content:flex-start}
 html[data-reader-skin] body.real-mode #right-panel.open :is(.member-hub-heading h2,.widget-head h3,.overview-section h3){overflow-wrap:normal;word-break:normal}
 html[data-reader-skin] body.real-mode #right-panel.open :is(.member-hub-actions,.widget-head){flex-wrap:wrap;gap:6px 12px}
 html[data-reader-skin] body.real-mode #right-panel.open .member-hub-actions>*{max-width:100%;white-space:normal;overflow-wrap:normal}
}
@media(max-width:375px){
 /* Eight 44px targets cannot share a 320px row; use two aligned action rows. */
 html[data-reader-skin] body.real-mode{--header:156px}
 html[data-reader-skin] body.real-mode .topbar{grid-template-columns:repeat(4,minmax(44px,1fr));grid-template-rows:56px 44px 44px}
 html[data-reader-skin] body.real-mode .topbar>.brand-identity{grid-column:1/3}
 html[data-reader-skin] body.real-mode .topbar>.header-intelligence{grid-column:3}
 html[data-reader-skin] body.real-mode .topbar>.account-menu{grid-column:4;width:52px}
 html[data-reader-skin] body.real-mode .topbar>.reader-tools>.mobile-overview-shortcut{grid-column:1;grid-row:3}
 html[data-reader-skin] body.real-mode .topbar>.reader-tools>.mobile-header-menu{grid-column:2;grid-row:3}
 html[data-reader-skin] body.real-mode .topbar>.mobile-search{grid-column:3;grid-row:3}
 html[data-reader-skin] body.real-mode .topbar>.reader-appearance{grid-column:4;grid-row:3}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) 44px}
 html[data-reader-skin] body.real-mode #right-panel.open .panel-tabs>.panel-close{grid-column:3;grid-row:1/3;height:100%}
}

/* Mobile reading sizes have one final owner, after both visual skins. The
   desktop time column stays unchanged; only one time copy is visible at once. */
.real-mode .row-time-mobile{display:none}
@media(max-width:760px){
 html[data-reader-skin] body.real-mode .story-row{grid-template-columns:minmax(0,1fr) 44px;gap:0 4px;padding:6px 5px;align-items:start}
 html[data-reader-skin] body.real-mode .story-row>.row-time{display:contents}
 html[data-reader-skin] body.real-mode .story-row>.row-time>:not(.coverage-rank){display:none}
 html[data-reader-skin] body.real-mode .story-row>.row-time>.coverage-rank{display:flex;grid-column:2;grid-row:2;min-width:44px;min-height:44px;font-size:calc(12px * var(--ui-text-scale,1))}
 html[data-reader-skin] body.real-mode .story-row>.row-content{grid-column:1;grid-row:1/3}
 html[data-reader-skin] body.real-mode .story-row>.row-tail{grid-column:2;grid-row:1;align-self:start}
 html[data-reader-skin] body.real-mode .story-row .row-more{width:44px;min-height:44px}
 html[data-reader-skin] body.real-mode .story-row .story-title{font-size:calc(15px * var(--ui-text-scale,1));line-height:1.4;overflow-wrap:anywhere}
 html[data-reader-skin=hybrid] body.real-mode .story-row .story-title{font-size:calc(16px * var(--ui-text-scale,1))}
 html[data-reader-skin] body.real-mode .story-row .row-content .row-meta{flex-wrap:wrap;gap:0 8px;overflow:visible;line-height:1.4}
 html[data-reader-skin] body.real-mode .story-row .row-time-mobile{display:inline-flex;align-items:center;gap:4px;flex-wrap:wrap;max-width:100%;font:calc(12px * var(--ui-text-scale,1))/1.4 var(--mono,ui-monospace,monospace);color:var(--muted)}
 html[data-reader-skin] body.real-mode .story-row .row-time-mobile .row-time-label{display:inline;font-size:inherit;line-height:inherit;margin:0}
 html[data-reader-skin] body.real-mode .story-row .row-time-mobile :is(.row-relative,.row-relative small){font-size:inherit;line-height:inherit}
 html[data-reader-skin] body.real-mode .story-row .row-meta :is(.source-profile-link,.source-count){font-size:calc(12px * var(--ui-text-scale,1));min-height:44px}
 html[data-reader-skin] body.real-mode .story-row .row-meta .headline-source{flex:0 1 auto;max-width:100%}
 html[data-reader-skin] body.real-mode .story-row .row-meta .source-profile-link{max-width:100%;gap:4px}
 html[data-reader-skin] body.real-mode .story-row .row-meta .source-profile-link>span:last-child{max-width:none;white-space:normal;overflow-wrap:anywhere}
 html[data-reader-skin] body.real-mode .story-row .row-classification{margin-left:0;flex-wrap:wrap;max-width:100%}
 html[data-reader-skin] body.real-mode .story-row .row-classification :is(.row-category,.row-signal){min-height:44px;font-size:calc(12px * var(--ui-text-scale,1))}
}

/* Warnings have their own accessible palette; brand/signal colors stay intact. */
:root{--reader-warning-text:#f5cf85;--reader-warning-bg:#292116}
:root[data-theme=light]{--reader-warning-text:#684000;--reader-warning-bg:#fff4d8}
html[data-reader-skin] body.real-mode .reader-overview.has-warning .reader-overview-status,
html[data-reader-skin] body.real-mode #reader-result-summary.has-warning:not([hidden]),
html[data-reader-skin] body.real-mode .reader-overview.has-warning .feed-health{
 color:var(--reader-warning-text);background:var(--reader-warning-bg);font-size:calc(12px * var(--ui-text-scale,1));line-height:1.5;overflow-wrap:anywhere;border-radius:3px;padding:4px 6px;
}
html[data-reader-skin] body.real-mode .reader-overview.has-warning .reader-overview-status{margin-block:2px}

html[data-reader-skin] body.real-mode #reader-result-summary{font-size:calc(12px * var(--ui-text-scale,1));line-height:1.5;overflow-wrap:anywhere}

/* Reserve the permitted publisher preview frame before decoding; failed images
   keep the same frame and the original source link. */
.real-mode .article-preview figure>a{display:grid;place-items:center;position:relative;width:100%;aspect-ratio:16/9;max-height:250px;background:var(--raised);overflow:hidden}
.real-mode .article-preview figure>a>img{display:block;width:100%;height:100%;min-height:0;max-height:250px;object-fit:contain;position:absolute;inset:0}
.real-mode .article-preview-fallback{padding:16px;text-align:center;font-size:calc(12px * var(--ui-text-scale,1));line-height:1.5;color:var(--text)}
@media(max-width:760px){.real-mode .article-preview figure>a,.real-mode .article-preview figure>a>img{max-height:200px}}

html[data-reader-skin] body.real-mode #reader-result-summary.has-warning .small-action{color:inherit;font-size:inherit;min-height:44px;text-decoration:underline;text-underline-offset:3px}
