/* 2Day.news – V17 STAGING INTEGRATION; NOT PRODUCTION VERIFIED.
   Presentation rules scoped to the approved headerless design. Base live CSS remains intact. */
.d2-legacy-hidden { display:none!important; }
.d2-login-brand { display:flex;align-items:center; }
.d2-login-brand img {display:block;width:132px;height:auto;max-height:58px;object-fit:contain;}
body.headerless-concept .topbar {display:none!important}
body.headerless-concept .shell {margin:0!important;min-height:100dvh!important;}
body.headerless-concept .dashboard:not(.hidden) {min-height:100dvh!important;}
body.headerless-concept .desktop-sidebar-nav {scrollbar-width:thin;overflow-y:auto!important;min-height:0!important;}
body.headerless-concept .sidebar-fixed-brand .brand-home-button {display:flex!important;align-items:center!important;gap:9px!important;overflow:visible!important;}
body.headerless-concept .sidebar-fixed-brand .brand-home-logo {width:50px!important;height:50px!important;object-fit:contain!important;flex:0 0 50px!important;}
body.headerless-concept .sidebar-fixed-brand .brand-home-wordmark {width:82px!important;height:auto!important;max-height:52px!important;object-fit:contain!important;}
body.headerless-concept .brand-home-wordmark-dark {display:none!important;}
html.theme-dark body.headerless-concept .brand-home-wordmark-dark {display:block!important;}
html.theme-dark body.headerless-concept .brand-home-wordmark-light {display:none!important;}
body.headerless-concept .brand-home-logo-dark {display:none!important;}
html.theme-dark body.headerless-concept .brand-home-logo-dark {display:block!important;}
html.theme-dark body.headerless-concept .brand-home-logo-light {display:none!important;}
body.headerless-concept .sidebar-refresh-section {flex:0 0 auto;}
body.headerless-concept .sidebar-refresh-line {display:flex;align-items:center;flex-direction:row-reverse;justify-content:flex-end;gap:12px;}
body.headerless-concept .sidebar-refresh-line .updated {font-size:11px!important;letter-spacing:normal!important;white-space:nowrap;}
body.headerless-concept .sidebar-refresh-line #refreshBtn {display:grid!important;place-items:center;flex:0 0 20px!important;width:20px!important;height:24px!important;min-width:20px!important;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important;}
body.headerless-concept .sidebar-refresh-line #refreshBtn.hidden {display:none!important;}
body.headerless-concept .sidebar-refresh-line #refreshBtn svg{width:17px!important;height:17px!important;}
body.headerless-concept .sidebar-quick-actions {position:relative;}
body.headerless-concept #sidebarAddMenu[hidden] {display:none!important}
body.headerless-concept .sidebar-add-popover {z-index:100}
body.headerless-concept #desktopSidebarManage {display:grid!important;place-items:center!important;}
body.headerless-concept #desktopSidebarManage svg {stroke:currentColor;fill:none;stroke-width:1.8;}
body.headerless-concept .desktop-source-sidebar .d2-legacy-hidden {display:none!important;}
/* Hide legacy navigation alternatives, but keep their functional IDs/events available. */
body.headerless-concept .sourcebar,
body.headerless-concept .mobile-bottom-nav,
body.headerless-concept .desktop-content-header,
body.headerless-concept .sticky-source-indicator {display:none!important}
body.headerless-concept .desktop-sidebar-actions{display:none!important}
body.headerless-concept .desktop-sidebar-head{display:none!important}
body.headerless-concept .all-sources-trigger{display:none!important}
body.headerless-concept .app-footer, .formativo-footer-v3 {display:none!important}
body.headerless-concept .story-image::before,body.headerless-concept .story-image::after {display:none!important;}
/* Current backend maintains the selected CARD accents. Do not decorate image corners. */
body.headerless-concept .story-image-cell::before,body.headerless-concept .story-image-cell::after {content:none!important}
/* Settings: retain live account/persistence logic, use locked layout and compact controls. */
body.headerless-concept #settingsPanel {z-index:120!important;}
body.headerless-concept #settingsPanel .v10-settings-content {overflow-y:auto!important;}
body.headerless-concept #settingsPanel .d2-legacy-hidden {display:none!important;}
body.headerless-concept #settingsPanel #textSizeControl {min-height:0!important;}
body.headerless-concept #settingsPanel #textSizeControl button {min-height:40px!important;padding:6px 5px!important;}
body.headerless-concept #settingsPanel #textSizeControl .text-size-choice-smaller strong{font-size:12px!important;}
body.headerless-concept #settingsPanel #textSizeControl .text-size-choice-larger strong{font-size:19px!important;}
body.headerless-concept #settingsPanel #d2ThemeSegments {min-height:40px!important;}
body.headerless-concept #settingsPanel .v10-setting-select {width:100%!important;}
body.headerless-concept .settings-backdrop{display:none!important;}
/* The original source-management controls have been relocated, not copied. */
.d2-manager-backdrop{position:fixed;inset:0;z-index:199;background:rgba(7,18,30,.46);border:0;cursor:pointer}
.d2-manager-panel{position:fixed;right:0;top:0;bottom:0;z-index:200;width:min(480px,100vw);padding:18px 20px;overflow:auto;background:#fbfcff;color:#172a44;box-shadow:-10px 0 35px rgba(10,31,54,.19);border-left:1px solid #d5e0ea}
.d2-manager-titlebar{display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #dce5ee;margin-bottom:20px;padding-bottom:12px}
.d2-manager-titlebar h2{font-size:19px;margin:0;font-weight:750}.d2-manager-titlebar button{font-size:27px;background:transparent;border:0;cursor:pointer;color:inherit}
.d2-manager-panel .custom-source-settings-row{display:block!important;padding:0!important}
.d2-manager-panel .custom-sources-settings-list{width:100%!important}
html.theme-dark .d2-manager-panel{background:#203145;color:#e8f1fb;border-color:#405870}
html.theme-dark .d2-manager-titlebar{border-color:#41566c}
/* Desktop: keep the full-height sidebar and single-column editorial feed. */
@media(min-width:901px){
 html[data-device-category="desktop"] body.headerless-concept .dashboard:not(.hidden){display:grid!important;grid-template-columns:200px minmax(0,1fr)!important;column-gap:16px!important;align-items:stretch!important;}
 html[data-device-category="desktop"] body.headerless-concept #desktopSourceSidebar{position:sticky!important;top:0!important;height:100dvh!important;max-height:100dvh!important;grid-column:1!important;grid-row:1 / span 30!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;border-radius:0 13px 13px 0!important;}
 html[data-device-category="desktop"] body.headerless-concept .desktop-sidebar-nav{flex:1!important;overflow-y:auto!important;}
 html[data-device-category="desktop"] body.headerless-concept #desktopNewsContainer{grid-column:2!important;min-width:0!important;overflow:visible!important;}
 html[data-device-category="desktop"] body.headerless-concept .shell{padding:0 20px 0 0!important;width:100%!important;max-width:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;}
}
/* Mobile: V16.2 header/drawer + image float so long titles flow beneath thumbnails. */
.mobile-v14-header,.mobile-v14-scrim{display:none}
@media(max-width:900px){
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-header{display:flex!important;align-items:center;gap:6px;position:sticky;top:0;z-index:54;min-height:64px;padding:4px 8px;background:#f8fbff;}
 html[data-device-category="mobile"].theme-dark body.headerless-concept .mobile-v14-header{background:#1b2b3d;color:#eaf3fe;}
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-header::after{content:"";height:2px;position:absolute;bottom:0;left:0;right:0;background:linear-gradient(90deg,transparent,rgba(233,183,112,.62) 34%,rgba(233,183,112,.25) 76%,transparent);box-shadow:0 0 10px rgba(226,176,109,.14);pointer-events:none;}
 html[data-device-category="mobile"].theme-dark body.headerless-concept .mobile-v14-header::after{background:linear-gradient(90deg,transparent,rgba(224,164,84,.66) 34%,rgba(220,155,77,.22) 77%,transparent);box-shadow:0 0 8px rgba(214,152,77,.18);}
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-brand{display:flex;align-items:center;gap:5px;flex:0 0 auto;max-width:42%;padding:0;background:none;border:0;min-width:0;}
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-brand .d2-mobile-brand-icon{width:41px;height:41px;object-fit:contain;}
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-brand .d2-mobile-brand-wordmark{width:72px;max-width:calc(100% - 47px);object-fit:contain;}
 html[data-device-category="mobile"] body.headerless-concept .d2-mobile-dark{display:none!important}
 html[data-device-category="mobile"].theme-dark body.headerless-concept .d2-mobile-dark{display:block!important}
 html[data-device-category="mobile"].theme-dark body.headerless-concept .d2-mobile-light{display:none!important}
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-source-label{margin-left:auto;display:flex;align-items:center;gap:5px;max-width:43%;min-width:0;background:transparent;border:0;color:inherit;font-size:11px!important;font-weight:650;}
 html[data-device-category="mobile"] body.headerless-concept #d2MobileSourceText{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
 html[data-device-category="mobile"] body.headerless-concept #d2MobileSourceIcon img{width:15px;height:15px;object-fit:contain;}
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-menu-toggle{flex:0 0 38px;height:42px;width:38px;display:grid;place-items:center;color:inherit;border:0;background:transparent;padding:0;}
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-menu-toggle svg{height:23px;width:23px;stroke:currentColor;stroke-width:1.8;fill:none;}
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-scrim{position:fixed;inset:0;display:block;z-index:61;border:0;background:rgba(7,19,32,.46);opacity:0;visibility:hidden;pointer-events:none;}
 html[data-device-category="mobile"] body.headerless-concept.mobile-v14-nav-open .mobile-v14-scrim{opacity:1;visibility:visible;pointer-events:auto;}
 html[data-device-category="mobile"] body.headerless-concept .desktop-source-sidebar{display:flex!important;flex-direction:column!important;position:fixed!important;z-index:62!important;top:0!important;left:0!important;height:100dvh!important;max-height:100dvh!important;width:min(88vw,350px)!important;transform:translateX(-110%)!important;transition:transform .18s ease!important;overflow:hidden!important;}
 html[data-device-category="mobile"] body.headerless-concept.mobile-v14-nav-open .desktop-source-sidebar{transform:translateX(0)!important;}
 html[data-device-category="mobile"] body.headerless-concept .desktop-sidebar-nav{flex:1!important;overflow-y:auto!important;}
 html[data-device-category="mobile"] body.headerless-concept .desktop-source-sidebar::after{content:""!important;position:absolute;right:0;top:0;bottom:0;width:2px;pointer-events:none;background:linear-gradient(transparent,rgba(233,183,112,.62) 34%,rgba(233,183,112,.25) 76%,transparent)!important;box-shadow:0 0 10px rgba(226,176,109,.14)!important;}
 html[data-device-category="mobile"].theme-dark body.headerless-concept .desktop-source-sidebar::after{background:linear-gradient(transparent,rgba(224,164,84,.66) 34%,rgba(220,155,77,.22) 77%,transparent)!important;box-shadow:0 0 8px rgba(214,152,77,.18)!important;}
 html[data-device-category="mobile"] body.headerless-concept .shell{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;}
 html[data-device-category="mobile"] body.headerless-concept .dashboard:not(.hidden){display:block!important;}
 html[data-device-category="mobile"] body.headerless-concept #desktopNewsContainer{display:none!important;}
 html[data-device-category="mobile"] body.headerless-concept .table-wrap{display:block!important;overflow:visible!important;width:100%!important;}
 html[data-device-category="mobile"] body.headerless-concept .story-card{display:block!important;position:relative!important;overflow:hidden!important;min-width:0!important;}
 html[data-device-category="mobile"] body.headerless-concept .d2-mobile-media-rail{float:left!important;width:96px!important;max-width:35%!important;margin:0 12px 4px 0!important;position:relative!important;}
 html[data-device-category="mobile"] body.headerless-concept .d2-mobile-media-rail .story-image-cell{display:block!important;float:none!important;width:100%!important;min-width:0!important;margin:0!important;padding:0!important;}
 html[data-device-category="mobile"] body.headerless-concept .d2-mobile-media-rail .story-image,html[data-device-category="mobile"] body.headerless-concept .d2-mobile-media-rail .story-image-placeholder{display:block!important;width:100%!important;height:auto!important;aspect-ratio:1.15/1!important;object-fit:cover!important;}
 html[data-device-category="mobile"] body.headerless-concept .d2-mobile-media-rail .story-meta{display:block!important;float:none!important;width:100%!important;min-width:0!important;margin-top:6px!important;}
 html[data-device-category="mobile"] body.headerless-concept .d2-mobile-media-rail .story-meta-line{display:flex!important;justify-content:space-between!important;gap:4px!important;width:100%!important;flex-wrap:wrap!important;}
 html[data-device-category="mobile"] body.headerless-concept .d2-mobile-media-rail .read-indicator{display:inline-flex!important;flex:0 0 10px!important;width:9px!important;min-width:9px!important;height:9px!important;min-height:9px!important;align-self:center;padding:0!important;border:1.5px solid #7f91a7!important;border-radius:50%!important;background:transparent!important;}
 html[data-device-category="mobile"] body.headerless-concept .d2-mobile-media-rail .read-indicator.is-read{background:#7f91a7!important;}
 html[data-device-category="mobile"] body.headerless-concept .d2-mobile-media-rail .read-label{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;}
 html[data-device-category="mobile"] body.headerless-concept .d2-mobile-media-rail .story-media-action{display:none!important;}
 html[data-device-category="mobile"] body.headerless-concept .story-title-cell{display:block!important;float:none!important;width:auto!important;min-width:0!important;margin:0!important;padding:0!important;overflow:visible!important;}
 html[data-device-category="mobile"] body.headerless-concept .story-title-wrap{display:contents!important;}
 html[data-device-category="mobile"] body.headerless-concept .story-title-trigger{display:inline!important;white-space:normal!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;overflow:visible!important;word-break:break-word!important;line-height:1.27!important;text-decoration:none!important;text-align:left!important;}
 html[data-device-category="mobile"] body.headerless-concept .story-desc{display:block!important;clear:both!important;width:100%!important;margin-top:10px!important;min-width:0!important;}
 html[data-device-category="mobile"] body.headerless-concept .analysis-ai-button{min-height:44px!important;}
 html[data-device-category="mobile"] body.headerless-concept .analysis-original-link,html[data-device-category="mobile"] body.headerless-concept .analysis-save-button{border:0!important;box-shadow:none!important;background:transparent!important;}
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel.headerless-settings-drawer{position:fixed!important;left:0!important;right:0!important;top:0!important;bottom:0!important;width:100vw!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;z-index:125!important;}
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel .v10-language-grid{display:grid!important;grid-template-columns:1fr!important;}
 html[data-device-category="mobile"] body.headerless-concept .d2-manager-panel{width:100vw!important;}
 html[data-device-category="mobile"] body.headerless-concept .mobile-bottom-nav{display:none!important;}
}
@media(max-width:360px){html[data-device-category="mobile"] body.headerless-concept .mobile-v14-brand .d2-mobile-brand-icon{width:35px;height:35px;}html[data-device-category="mobile"] body.headerless-concept .mobile-v14-brand .d2-mobile-brand-wordmark{width:64px;}}
@media(prefers-reduced-motion:reduce){html[data-device-category="mobile"] body.headerless-concept .desktop-source-sidebar{transition:none!important;}}
/* Additional integration fixes for legacy production DOM / prototype specificity. */
html[data-device-category="desktop"] body.headerless-concept .sidebar-fixed-brand img.brand-home-logo-light{display:block!important;width:50px!important;height:50px!important;flex:0 0 50px!important;}
html[data-device-category="desktop"].theme-dark body.headerless-concept .sidebar-fixed-brand img.brand-home-logo-light{display:none!important}
html[data-device-category="desktop"].theme-dark body.headerless-concept .sidebar-fixed-brand img.brand-home-logo-dark{display:block!important;width:50px!important;height:50px!important;flex:0 0 50px!important;}
html[data-device-category="desktop"] body.headerless-concept .sidebar-fixed-brand img.brand-home-wordmark-light{display:block!important;width:82px!important;height:auto!important;}
html[data-device-category="desktop"].theme-dark body.headerless-concept .sidebar-fixed-brand img.brand-home-wordmark-light{display:none!important}
html[data-device-category="desktop"].theme-dark body.headerless-concept .sidebar-fixed-brand img.brand-home-wordmark-dark{display:block!important;width:82px!important;height:auto!important;}
html[data-device-category="mobile"] body.headerless-concept #newsTableWrap:not(.hidden){display:block!important;visibility:visible!important;opacity:1!important;}
html[data-device-category="mobile"] body.headerless-concept #newsTableWrap .news-table,
html[data-device-category="mobile"] body.headerless-concept #newsTableWrap #newsBody {display:block!important;visibility:visible!important;opacity:1!important;}
html[data-device-category="mobile"] body.headerless-concept #newsTableWrap .news-row {display:block!important;}
html[data-device-category="mobile"] body.headerless-concept #newsTableWrap .news-row > td.story-card-cell {display:block!important;}
html[data-device-category="mobile"] body.headerless-concept #newsTableWrap .story-card {display:block!important;width:100%!important;}
