/* News detail stays above the existing list document. */
.news-overlay{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:var(--text);overflow-y:auto;overscroll-behavior:contain}
.news-overlay::backdrop{background:rgba(0,0,0,.72)}
.news-overlay-panel{width:90%;max-width:none;min-height:100%;margin:0 auto;background:var(--bg,#fff);overflow-wrap:anywhere}
.news-overlay .d-hero{width:100%;margin-inline:0}
.news-overlay .d-body{width:100%;max-width:none}
.d-hero{position:relative}
.news-overlay-close{position:absolute;right:16px;top:16px;z-index:2;width:44px;height:44px;border:1px solid #777;border-radius:50%;background:#333;color:#fff;font:32px/1 Arial;cursor:pointer}
.news-overlay-close:hover{background:#b82025}
.news-overlay-close:focus-visible{outline:3px solid #fff;outline-offset:3px}
[data-theme="light"] .news-overlay .d-hero{height:48vh;min-height:240px}
[data-theme="light"] .news-overlay .d-body{padding:48px 32px 72px}
@media(max-width:760px){
  .news-overlay{padding:0}
  .news-overlay-close{right:18px;top:12px}
  [data-theme="light"] .news-overlay .d-hero{height:32vh;min-height:180px}
  [data-theme="light"] .news-overlay .d-body{padding:32px 20px 48px}
  [data-theme="light"] .news-overlay .d-body h1{font-size:26px}
}

/* The close control stays in the viewport while reading; safe on notched screens. */
.news-overlay{height:100dvh;-webkit-overflow-scrolling:touch}
.news-overlay-close{position:fixed;top:max(12px,env(safe-area-inset-top,0px));right:calc(5% + max(12px,env(safe-area-inset-right,0px)));z-index:5}
[data-theme="light"] .news-overlay .d-body{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
@media(max-width:760px){
  [data-theme="light"] .news-overlay .d-hero{height:32svh}
}
