/* 2Day.news V17.3 — approved design corrections, isolated from app.js / Worker.
   Loaded AFTER V17.2 scroll-hotfix. Do not reintroduce fixed scrolling. */

/* The desktop utility controls are icon-only: no white fills, preserve focus affordances. */
html[data-device-category="desktop"] body.headerless-concept .desktop-source-sidebar .v8-actions button.desktop-sidebar-head-action,
html[data-device-category="desktop"] body.headerless-concept .desktop-source-sidebar .v8-actions button.desktop-sidebar-head-action:hover,
html[data-device-category="desktop"] body.headerless-concept .desktop-source-sidebar .v8-actions button.desktop-sidebar-head-action:active {
  background:transparent!important;box-shadow:none!important;border-color:transparent!important;
}
html[data-device-category="desktop"] body.headerless-concept .desktop-source-sidebar .v8-actions button.desktop-sidebar-head-action:focus-visible {
  outline:2px solid #759ec5!important;outline-offset:2px!important;
}

/* Use only the locked editorial blue accent, not legacy saturated #1D4ED8. */
body.headerless-concept .analysis-section-header .result-label,
body.headerless-concept .analysis-section-header .section-chevron,
body.headerless-concept .answer-section-heading,
body.headerless-concept .analysis-preview-more,
body.headerless-concept .ask-preview-more,
body.headerless-concept .analysis-section-card .ai-subheading,
body.headerless-concept .analysis-section-card li::marker,
body.headerless-concept .preview-ai-response li::marker {
  color:var(--d2-accent,#688eb8)!important;
}

/* Collapsed AI previews must remain fully legible, including inline text and More. */
body.headerless-concept .analysis-section-card.collapsed .analysis-section-preview,
body.headerless-concept .analysis-section-card.collapsed .analysis-preview-text,
body.headerless-concept .analysis-section-card.collapsed .analysis-preview-text *,
body.headerless-concept .ask-history-card.collapsed .ask-answer-preview,
body.headerless-concept .ask-history-card.collapsed .history-answer,
body.headerless-concept .analysis-section-card.collapsed .analysis-preview-more {
  opacity:1!important;filter:none!important;
  color:var(--d2-ink,#34485e)!important;
  -webkit-text-fill-color:currentColor!important;
}
html.theme-dark body.headerless-concept .analysis-section-card.collapsed .analysis-section-preview,
html.theme-dark body.headerless-concept .analysis-section-card.collapsed .analysis-preview-text,
html.theme-dark body.headerless-concept .analysis-section-card.collapsed .analysis-preview-text *,
html.theme-dark body.headerless-concept .ask-history-card.collapsed .ask-answer-preview,
html.theme-dark body.headerless-concept .ask-history-card.collapsed .history-answer,
html.theme-dark body.headerless-concept .analysis-section-card.collapsed .analysis-preview-more {
  color:#D1DDEB!important;-webkit-text-fill-color:currentColor!important;
}
/* Do not use faded transparency for the collapsed text or mask the continuation. */
body.headerless-concept .analysis-section-card.collapsed .analysis-section-preview,
body.headerless-concept .ask-history-card.collapsed .history-answer {
  mask-image:none!important;-webkit-mask-image:none!important;
}

/* The desktop AI panel must share the parent's horizontal geometry. */
@media(min-width:901px){
 html[data-device-category="desktop"] body.headerless-concept .desktop-news-card-wrapper .story-card-cell{
   box-sizing:border-box!important;
 }
 html[data-device-category="desktop"] body.headerless-concept .desktop-news-card-wrapper .desktop-analysis-host{
   width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;
   box-sizing:border-box!important;padding-left:0!important;padding-right:0!important;
 }
 html[data-device-category="desktop"] body.headerless-concept .desktop-news-card-wrapper .desktop-analysis-host .analysis-panel,
 html[data-device-category="desktop"] body.headerless-concept .desktop-news-card-wrapper .desktop-analysis-host .analysis-result,
 html[data-device-category="desktop"] body.headerless-concept .desktop-news-card-wrapper .desktop-analysis-host .analysis-history,
 html[data-device-category="desktop"] body.headerless-concept .desktop-news-card-wrapper .desktop-analysis-host .analysis-section-card{
   width:100%!important;max-width:none!important;box-sizing:border-box!important;
 }
}

/* Mobile drawer must show exactly one light or dark icon AND wordmark. */
@media(max-width:900px){
 html[data-device-category="mobile"]:not(.theme-dark) body.headerless-concept #desktopSourceSidebar .brand-home-logo-dark,
 html[data-device-category="mobile"]:not(.theme-dark) body.headerless-concept #desktopSourceSidebar .brand-home-wordmark-dark,
 html[data-device-category="mobile"].theme-dark body.headerless-concept #desktopSourceSidebar .brand-home-logo-light,
 html[data-device-category="mobile"].theme-dark body.headerless-concept #desktopSourceSidebar .brand-home-wordmark-light {display:none!important;visibility:hidden!important;}
 html[data-device-category="mobile"]:not(.theme-dark) body.headerless-concept #desktopSourceSidebar .brand-home-logo-light,
 html[data-device-category="mobile"]:not(.theme-dark) body.headerless-concept #desktopSourceSidebar .brand-home-wordmark-light,
 html[data-device-category="mobile"].theme-dark body.headerless-concept #desktopSourceSidebar .brand-home-logo-dark,
 html[data-device-category="mobile"].theme-dark body.headerless-concept #desktopSourceSidebar .brand-home-wordmark-dark {display:block!important;visibility:visible!important;}
 /* Current publisher display is article-title-scale but constrained to fit beside logo + menu. */
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-source-label,
 html[data-device-category="mobile"] body.headerless-concept #d2MobileSourceText {
   font-size:clamp(15px,4.2vw,19px)!important;font-weight:800!important;line-height:1.2!important;
 }
 html[data-device-category="mobile"] body.headerless-concept .mobile-v14-source-label{max-width:48%!important;gap:7px!important;}
 html[data-device-category="mobile"] body.headerless-concept #d2MobileSourceText{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
 html[data-device-category="mobile"] body.headerless-concept #d2MobileSourceIcon,
 html[data-device-category="mobile"] body.headerless-concept #d2MobileSourceIcon img {flex-shrink:0!important;width:19px!important;height:19px!important;}
 /* Make original article link and its arrow pure unboxed glyphs in both themes. */
 html[data-device-category="mobile"] body.headerless-concept .analysis-original-group .analysis-original-link,
 html[data-device-category="mobile"] body.headerless-concept .analysis-original-group .analysis-external-icon,
 html[data-device-category="mobile"] body.headerless-concept .analysis-original-group .analysis-external-icon::before,
 html[data-device-category="mobile"] body.headerless-concept .analysis-original-group .analysis-external-icon::after {
   background:transparent!important;box-shadow:none!important;border:0!important;
 }
 /* Text-size selection propagates to AI text including inner paragraphs and collapsed previews. */
 html[data-device-category="mobile"] body.headerless-concept .analysis-section-preview,
 html[data-device-category="mobile"] body.headerless-concept .analysis-preview-text,
 html[data-device-category="mobile"] body.headerless-concept .analysis-section-body,
 html[data-device-category="mobile"] body.headerless-concept .analysis-section-body .history-answer,
 html[data-device-category="mobile"] body.headerless-concept .analysis-section-body p,
 html[data-device-category="mobile"] body.headerless-concept .analysis-section-body li,
 html[data-device-category="mobile"] body.headerless-concept .analysis-result,
 html[data-device-category="mobile"] body.headerless-concept .analysis-result .answer,
 html[data-device-category="mobile"] body.headerless-concept .analysis-result p,
 html[data-device-category="mobile"] body.headerless-concept .analysis-result li,
 html[data-device-category="mobile"] body.headerless-concept .preview-ai-response,
 html[data-device-category="mobile"] body.headerless-concept .preview-ai-response p,
 html[data-device-category="mobile"] body.headerless-concept .preview-ai-response li,
 html[data-device-category="mobile"] body.headerless-concept .ask-history-card .history-answer,
 html[data-device-category="mobile"] body.headerless-concept .ask-history-card .history-answer p,
 html[data-device-category="mobile"] body.headerless-concept .ask-history-card .history-answer li {
   font-size:var(--mobile-body-size,20px)!important;
   line-height:1.48!important;
 }
 /* Respect user text-size preference within the full-screen Settings drawer. */
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel .settings-title{
   font-size:calc(var(--mobile-ui-size,15px) + 7px)!important;
 }
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel .v10-settings-section-title{
   font-size:calc(var(--mobile-ui-size,15px) - 4px)!important;
 }
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel label,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel .v10-account-details label,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel .v10-account-details strong,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel .v10-account-details span,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel .text-size-device-label,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel .settings-message,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel select.v10-setting-select,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel .v10-appearance-control button,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel .settings-signout-button,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel #defaultSourceSelect,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel #d2UiLanguageSelect,
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel #d2AiLanguageSelect {
   font-size:var(--mobile-ui-size,15px)!important;
 }
 /* Keep Aa examples at three demonstrably different sizes, even when general UI scales. */
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel #textSizeControl .text-size-choice-smaller strong{font-size:16px!important;}
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel #textSizeControl .text-size-choice[data-text-size="standard"] strong{font-size:20px!important;}
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel #textSizeControl .text-size-choice-larger strong{font-size:24px!important;}
 html[data-device-category="mobile"] body.headerless-concept #settingsPanel #textSizeControl .text-size-choice span{font-size:calc(var(--mobile-ui-size,15px) - 2px)!important;}
 /* Same preference propagates to the source drawer (names, counters and controls). */
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .desktop-sidebar-nav,
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .desktop-sidebar-source,
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .desktop-sidebar-source *,
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .desktop-publisher-heading,
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .desktop-publisher-heading *,
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .desktop-publisher-leaf,
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .desktop-publisher-leaf *,
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .desktop-sidebar-special,
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .desktop-source-unread-count,
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .sidebar-refresh-section .updated {
   font-size:var(--mobile-ui-size,15px)!important;
 }
 /* Preserve small icon sizes and narrow badges, avoiding huge content layout jumps. */
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar svg,
 html[data-device-category="mobile"] body.headerless-concept #desktopSourceSidebar .desktop-publisher-chevron {font-size:inherit;}
}
