/* ECARDSNAP News Theme 128 — A+ refinement.
   Loaded after the legacy DailyNews/NewsGrid styles so each tenant's admin
   primary_color and header_color control the SAME header, footer and CTAs. */
:root {
  --nf-panel: #fff;
  --nf-panel-soft: #f3f6fb;
  --nf-page: #f5f7fb;
  --nf-text: #162b45;
  --nf-secondary: #61738a;
  --nf-border: #e0e7f0;
  --nf-footer-bottom: color-mix(in srgb, var(--footer-bg), #000 20%);
  --nf-shadow: 0 10px 28px rgba(21,42,68,.065);
}
/* Brand tokens live in _news_theme_layout.php and come from news_channels. */
html body.ng-refresh.nf-2026 { background: var(--nf-page)!important; color:var(--nf-text)!important; }
html body.ng-refresh.nf-2026 .topbar { background:color-mix(in srgb,var(--navy),black 15%)!important; }
html body.ng-refresh.nf-2026 .ng-edition { background:var(--navy)!important;border-bottom-color:var(--accent)!important; }
html body.ng-refresh.nf-2026 .ng-theme-toggle { display:grid;place-items:center;transition:background-color .2s,transform .2s; }
html body.ng-refresh.nf-2026 .ng-theme-toggle:hover {background:#ffffff22!important;transform:translateY(-1px)}
html body.ng-refresh.nf-2026 .nf-logo-mark,
html body.ng-refresh.nf-2026 .ticker-label,
html body.ng-refresh.nf-2026 .nf-slide-cat {background:var(--accent)!important;}
html body.ng-refresh.nf-2026 .nf-hero-grid .card .badge,
html body.ng-refresh.nf-2026 .nf-post-badge,
html body.ng-refresh.nf-2026 .rank .num {background:var(--accent)!important;}
html body.ng-refresh.nf-2026 .ng-mini-link,
html body.ng-refresh.nf-2026 .nf-red,
html body.ng-refresh.nf-2026 .nf-overline,
html body.ng-refresh.nf-2026 .badge-cat {color:var(--accent)!important;}
html body.ng-refresh.nf-2026 .ng-reel-story img {border-color:var(--accent)!important;}
html body.ng-refresh.nf-2026 .ng-theme-toggle:focus-visible,
html body.ng-refresh.nf-2026 a:focus-visible,
html body.ng-refresh.nf-2026 button:focus-visible { outline:3px solid var(--accent);outline-offset:3px; }
html body.ng-refresh.nf-2026 .nf-hero-grid .card,
html body.ng-refresh.nf-2026 .nf-main-slider { box-shadow:var(--nf-shadow)!important; }
html body.ng-refresh.nf-2026 .es-story-card.story,
html body.ng-refresh.nf-2026 .sidebar .box,
html body.ng-refresh.nf-2026 .article,
html body.ng-refresh.nf-2026 .post,
html body.ng-refresh.nf-2026 .side-card {
 background:var(--nf-panel)!important;color:var(--nf-text)!important;
 border-color:var(--nf-border)!important;box-shadow:var(--nf-shadow)!important;
}
html body.ng-refresh.nf-2026 .ticker,
html body.ng-refresh.nf-2026 form.search,
html body.ng-refresh.nf-2026 .search input {background:var(--nf-panel)!important;color:var(--nf-text)!important;border-color:var(--nf-border)!important;}
html body.ng-refresh.nf-2026 .nf-marquee-motion a,
html body.ng-refresh.nf-2026 .ng-reel-story strong,
html body.ng-refresh.nf-2026 .story-body h3 a,
html body.ng-refresh.nf-2026 .nf-sidebox h4,
html body.ng-refresh.nf-2026 .ng-news-intro h1,
html body.ng-refresh.nf-2026 .dn-section-heading h2,
html body.ng-refresh.nf-2026 .article h1,
html body.ng-refresh.nf-2026 .nf-related h2,
html body.ng-refresh.nf-2026 .rank li>a,
html body.ng-refresh.nf-2026 .ng-video-copy strong {color:var(--nf-text)!important;}
html body.ng-refresh.nf-2026 .story-summary,
html body.ng-refresh.nf-2026 .ng-news-intro .ng-blurb,
html body.ng-refresh.nf-2026 .article .content,
html body.ng-refresh.nf-2026 .post-body,
html body.ng-refresh.nf-2026 .article .content p {color:var(--nf-secondary)!important;}
html body.ng-refresh.nf-2026 .nf-news-with-side .nf-sidebox,
html body.ng-refresh.nf-2026 .es-story-card.story {border-radius:12px!important;}
html body.ng-refresh.nf-2026 .nf-latest-grid .story,
html body.ng-refresh.nf-2026 .nf-feature-grid .story {transition:transform .2s,box-shadow .2s;}
@media(hover:hover){html body.ng-refresh.nf-2026 .nf-latest-grid .story:hover,
html body.ng-refresh.nf-2026 .nf-feature-grid .story:hover{transform:translateY(-3px);box-shadow:0 15px 35px #1326471a!important}}

/* The footer no longer ignores Header / Footer Color selected in admin. */
html body.ng-refresh.nf-2026 footer.nf-footer,
html body.ng-refresh.nf-2026 footer.nf-footer .footer-top {background:var(--footer-bg)!important;color:#f0f5fc!important;}
html body.ng-refresh.nf-2026 footer.nf-footer .footer-bottom {
 background:var(--nf-footer-bottom)!important;border-top:1px solid #ffffff27!important;
 color:#e0e9f3!important;
}
html body.ng-refresh.nf-2026 footer.nf-footer h4,
html body.ng-refresh.nf-2026 footer.nf-footer .footer-logo strong {color:#fff!important;}
html body.ng-refresh.nf-2026 footer.nf-footer .meta,
html body.ng-refresh.nf-2026 footer.nf-footer .foot-list a {color:#e0e9f3!important;}
html body.ng-refresh.nf-2026 footer.nf-footer .foot-list a:hover {color:#fff!important;text-decoration:underline;text-underline-offset:4px;}
html body.ng-refresh.nf-2026 footer.nf-footer .social a {
 background:#ffffff1a!important;color:#fff!important;border:1px solid #ffffff30;
}
html body.ng-refresh.nf-2026 footer.nf-footer .footer-logo img {background:#fff!important;border-radius:9px!important;}
html body.ng-refresh.nf-2026 .es-pwa-actions .es-install-button,
html body.ng-refresh.nf-2026 .btn,
html body.ng-refresh.nf-2026 .action {background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important;}
html body.ng-refresh.nf-2026 .es-pwa-actions button {
 font:inherit;font-size:13px;font-weight:850;cursor:pointer;line-height:1.3;
 border:1px solid var(--accent);border-radius:7px;padding:11px 15px;
 box-shadow:0 5px 15px #0c244c20;
}
html body.ng-refresh.nf-2026 .es-pwa-actions button:disabled {cursor:default;opacity:.75;}
html body.ng-refresh.nf-2026 .es-pwa-actions .es-contact-button {
 background:#fff!important;color:var(--nf-text)!important;border-color:var(--nf-border)!important;
}
html body.ng-refresh.nf-2026 .search button[type=submit]{background:var(--accent)!important;color:#fff!important;}
html body.ng-refresh.nf-2026 .nf-install-guide {background:var(--nf-panel-soft)!important;border:1px solid var(--nf-border)!important;color:var(--nf-text)!important;}
html body.ng-refresh.nf-2026 .nf-install-guide p {color:var(--nf-secondary)!important;}
html body.ng-refresh.nf-2026 .nf-epaper-latest>a {background:var(--navy)!important;}
html body.ng-refresh.nf-2026 #nf-back-top {background:var(--accent)!important;}
/* Override old NewsGrid hardcoded-red accents. */
html body.ng-refresh.nf-2026 .ng-video-play b,
html body.ng-refresh.nf-2026 .ng-share-tools a:hover,
html body.ng-refresh.nf-2026 .ng-share-tools button:hover {background:var(--accent)!important;border-color:var(--accent)!important;}

/* Complete light/dark support: legacy dark CSS uses data-ng-theme, our JS now
   sets both data-ng-theme and data-nf-dark consistently across all subpages. */
html[data-ng-theme="dark"] {
 --nf-page:#0a1422;
 --nf-panel:#14253a;
 --nf-panel-soft:#1b3048;
 --nf-text:#eaf2fc;
 --nf-secondary:#bdcadd;
 --nf-border:#29425c;
 --nf-shadow:0 12px 28px #0002;
}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026#mg {background:var(--nf-page)!important;color:var(--nf-text)!important;}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 header.nf-header,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 header.nf-header .brand-row,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nav,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .dropdown,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .menu-mobile-inner,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 #hamburger {
 background:var(--nf-panel)!important;color:var(--nf-text)!important;border-color:var(--nf-border)!important;
}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .logo,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-logo-brand,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-logo-brand strong {color:var(--nf-text)!important;}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-logo-brand small {color:#cbd8e7!important;}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 #hamburger span{background:var(--nf-text)!important;}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .menu>li>a,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .dropdown a,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .mm-scroll>a,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .mm-sublist a,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .mm-label{color:var(--nf-text)!important;}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .menu>li>a.active,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .menu>li:first-child>a{background:var(--accent)!important;color:#fff!important;}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .mm-sublist a,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .tags .tag,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .search-suggest-box,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .search-suggest-box .nf-suggest-item,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .blank,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-newsletter-note,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .ng-video-card,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .ng-video-section {
 background:var(--nf-panel)!important;color:var(--nf-text)!important;border-color:var(--nf-border)!important;
}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-suggest-item strong,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-suggest-item small,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-suggest-item,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-article-lead,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-post-details,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-related a,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-newsletter-note,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-newsletter-note p {color:var(--nf-secondary)!important;}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-article-tools button,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-share-end button,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .ng-share-tools button,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .ng-share-tools a,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .pagination a,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .article .content input,
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .article .content textarea {
 background:var(--nf-panel-soft)!important;border-color:var(--nf-border)!important;color:var(--nf-text)!important;
}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-header .menu-mobile-inner .mm-scroll {background:var(--nf-panel)!important;}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .es-pwa-actions {background:var(--nf-panel)!important;border-color:var(--nf-border)!important;}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .es-pwa-actions .es-contact-button {background:var(--nf-panel-soft)!important;color:var(--nf-text)!important;border-color:var(--nf-border)!important;}
html[data-ng-theme="dark"] body.ng-refresh.nf-2026 .nf-sidebox .tags .tag:hover{border-color:var(--accent)!important;}

/* Balanced reading, smaller fixed action bar, polished mobile spacing. */
@media(max-width:800px){
  html body.ng-refresh.nf-2026 .nf-header .brand-row{gap:15px!important;}
  html body.ng-refresh.nf-2026 .nf-main-slider .dn-slide-caption strong{text-wrap:pretty;}
}
@media(max-width:620px){
  html body.ng-refresh.nf-2026 .ng-edition-inner {padding-block:13px!important;}
  html body.ng-refresh.nf-2026 .nf-2026 .ticker{border-radius:8px;}
  html body.ng-refresh.nf-2026 .nf-hero-grid .card{border-radius:9px!important;}
  html body.ng-refresh.nf-2026 .nf-hero-grid .big h3 {font-size:20px!important;line-height:1.35;}
  html body.ng-refresh.nf-2026 .nf-latest-grid .story-body h3,
  html body.ng-refresh.nf-2026 .nf-feature-grid .story-body h3 {font-size:18px!important;line-height:1.5;}
  html body.ng-refresh.nf-2026 .es-pwa-actions {gap:8px!important;padding:8px 10px calc(8px + env(safe-area-inset-bottom))!important;}
  html body.ng-refresh.nf-2026 .es-pwa-actions a,
  html body.ng-refresh.nf-2026 .es-pwa-actions button {min-width:0;flex:1;border-radius:10px!important;min-height:46px!important;font-size:13px!important;padding:8px 5px!important;display:grid;place-items:center;}
  html body.ng-refresh.nf-2026 footer.nf-footer .footer-top {padding-block:29px!important;}
}
@media(prefers-reduced-motion:reduce){html body.ng-refresh.nf-2026 .nf-latest-grid .story,html body.ng-refresh.nf-2026 .nf-feature-grid .story{transition:none}}


/* PWAWAVE5: ocean-inspired SVG footer, branded with each channel's live DB color.
   Keep the wave on the page canvas, then blend into the footer background. */
html body.ng-refresh.nf-2026 footer.nf-footer {
  margin-top:36px!important;
  background:var(--footer-bg)!important;
  position:relative;
  isolation:isolate;
  overflow:hidden;
}
html body.ng-refresh.nf-2026 footer.nf-footer .nf-footer-ocean {
  display:block;
  position:relative;
  height:clamp(88px,10.5vw,160px);
  background:var(--nf-page)!important;
  margin:0;
  line-height:0;
  overflow:hidden;
}
html body.ng-refresh.nf-2026 footer.nf-footer .nf-footer-ocean svg {
  display:block;
  width:100%;
  height:100%;
  overflow:visible;
}
html body.ng-refresh.nf-2026 footer.nf-footer .nf-ocean-main {
  fill:var(--footer-bg);
}
html body.ng-refresh.nf-2026 footer.nf-footer .nf-ocean-glint {
  fill:var(--accent);
  opacity:.16;
}
html body.ng-refresh.nf-2026 footer.nf-footer .nf-ocean-crest {
  fill:none;
  stroke:rgba(255,255,255,.29);
  stroke-width:2.8px;
  vector-effect:non-scaling-stroke;
}
html body.ng-refresh.nf-2026 footer.nf-footer .nf-ocean-crest-2 {
  stroke:rgba(255,255,255,.14);
  stroke-width:2px;
}
html body.ng-refresh.nf-2026 footer.nf-footer .footer-top {
  position:relative;
  padding-top:10px!important;
  padding-bottom:36px!important;
  background:var(--footer-bg)!important;
}
html body.ng-refresh.nf-2026 footer.nf-footer .footer-top:after {
  content:"";
  position:absolute;
  width:min(450px,74vw);
  height:130px;
  right:-70px;
  bottom:-34px;
  pointer-events:none;
  opacity:.09;
  transform:rotate(-9deg);
  background:repeating-radial-gradient(ellipse at 50% 100%,transparent 0 17px,#fff 18px 19px,transparent 20px 32px);
  -webkit-mask-image:linear-gradient(to top,#000,transparent);
  mask-image:linear-gradient(to top,#000,transparent);
}
html body.ng-refresh.nf-2026 footer.nf-footer .footer-grid,
html body.ng-refresh.nf-2026 footer.nf-footer .footer-bottom {
  position:relative;
  z-index:1;
}
html body.ng-refresh.nf-2026 footer.nf-footer .footer-logo img {
  box-shadow:0 10px 32px rgba(3,12,31,.17);
}
@media(max-width:620px){
  html body.ng-refresh.nf-2026 footer.nf-footer .nf-footer-ocean {height:96px;}
  html body.ng-refresh.nf-2026 footer.nf-footer .footer-top {padding-top:4px!important;padding-bottom:30px!important;}
}
@media(prefers-reduced-motion:reduce){
  html body.ng-refresh.nf-2026 footer.nf-footer .nf-footer-ocean *{animation:none!important;}
}


/* Dedicated install page: uncluttered, logo-first, single native action. */
html body.ng-refresh.nf-2026 .nf-install-main {padding-top:25px;padding-bottom:22px;}
html body.ng-refresh.nf-2026 .nf-install-card {
  max-width:680px;margin:0 auto;padding:clamp(22px,4vw,44px)!important;
  text-align:center;border:1px solid var(--nf-border)!important;
  border-radius:24px!important;background:var(--nf-panel)!important;
  box-shadow:0 18px 65px rgba(12,32,59,.09)!important;
}
html body.ng-refresh.nf-2026 .nf-install-pill {display:inline-block;letter-spacing:.15em;font-size:11px;font-weight:900;color:var(--accent);margin-bottom:9px;}
html body.ng-refresh.nf-2026 .nf-install-card h1{font-size:clamp(24px,4.7vw,37px);line-height:1.2;color:var(--nf-text)!important;margin:0 auto 12px;overflow-wrap:anywhere;}
html body.ng-refresh.nf-2026 .nf-install-subtitle {font-size:clamp(14px,2vw,17px);line-height:1.7;color:var(--nf-secondary);margin:0 auto;max-width:440px;}
html body.ng-refresh.nf-2026 .nf-install-logo-wrap{width:148px;height:148px;display:grid;place-items:center;margin:25px auto 22px;border:1px solid var(--nf-border);border-radius:32px;background:var(--nf-panel-soft);box-shadow:0 10px 24px #102d4d18;}
html body.ng-refresh.nf-2026 .nf-install-logo-wrap img{display:block;width:124px;height:124px;object-fit:contain;border-radius:24px;background:white;}
html body.ng-refresh.nf-2026 .nf-install-primary{min-width:min(330px,100%);min-height:58px;font-size:17px!important;border-radius:13px!important;font-weight:850;box-shadow:0 10px 28px #0c225230;}
html body.ng-refresh.nf-2026 .nf-install-status{font-size:13px;line-height:1.65;color:var(--nf-secondary);max-width:480px;margin:17px auto 0;}
html body.ng-refresh.nf-2026 .nf-install-help {text-align:left;max-width:510px;margin:28px auto 0;padding:15px 18px;background:var(--nf-panel-soft);color:var(--nf-text);border:1px solid var(--nf-border);border-radius:14px;font-size:13px;line-height:1.65;}
html body.ng-refresh.nf-2026 .nf-install-help summary{cursor:pointer;font-weight:850;}
html body.ng-refresh.nf-2026 .nf-install-help p{color:var(--nf-secondary);margin:11px 0 0;}
html body.ng-refresh.nf-2026 .nf-pwa-diagnostics{text-align:left;margin:24px 0 0;border-top:1px solid var(--nf-border);padding-top:16px;}
html body.ng-refresh.nf-2026 .nf-pwa-diagnostics h2{font-size:17px;color:var(--nf-text);margin:0 0 8px;}
html body.ng-refresh.nf-2026 .nf-pwa-diagnostics li{font-size:12px;overflow-wrap:anywhere;margin:7px 0;}
@media(max-width:620px){html body.ng-refresh.nf-2026 .nf-install-main{padding-top:15px!important;}html body.ng-refresh.nf-2026 .nf-install-card{border-radius:17px!important;}html body.ng-refresh.nf-2026 .nf-install-logo-wrap{margin-top:19px;}}
