/* eFind News (news.html) — card layout in the spirit of news.google.com.
   Tokens follow the eFind Maps v2 palette; dark mode follows the SearXNG theme
   class (theme-dark) or the OS setting when the theme is "auto". */
:root{
  --nw-brand:#1877f2;--nw-brand-soft:#e7f0fe;
  --nw-bg:#fff;--nw-surface:#fff;--nw-hover:#f1f3f4;
  --nw-text:#202124;--nw-muted:#5f6368;--nw-faint:#9aa0a6;--nw-border:#dadce0;
  --nw-shadow:0 1px 2px rgba(60,64,67,.3),0 1px 3px 1px rgba(60,64,67,.15);
  --nw-radius:12px;
  --nw-font:Roboto,-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;
  --nw-top-h:64px;--nw-tabs-h:48px;
}
html.theme-dark{
  --nw-brand:#8ab4f8;--nw-brand-soft:#1d2d45;
  --nw-bg:#1f2124;--nw-surface:#292a2d;--nw-hover:#35373c;
  --nw-text:#e8eaed;--nw-muted:#bdc1c6;--nw-faint:#80868b;--nw-border:#3c4043;
  --nw-shadow:0 1px 3px rgba(0,0,0,.6);
}
@media (prefers-color-scheme:dark){
  html.theme-auto{
    --nw-brand:#8ab4f8;--nw-brand-soft:#1d2d45;
    --nw-bg:#1f2124;--nw-surface:#292a2d;--nw-hover:#35373c;
    --nw-text:#e8eaed;--nw-muted:#bdc1c6;--nw-faint:#80868b;--nw-border:#3c4043;
    --nw-shadow:0 1px 3px rgba(0,0,0,.6);
  }
}

body.news_endpoint{margin:0;background:var(--nw-bg);color:var(--nw-text);font-family:var(--nw-font);-webkit-font-smoothing:antialiased}
#main_news{margin:0;padding:0;width:auto;max-width:none}
#main_news h1,#main_news h2,#main_news h3{font-family:var(--nw-font)}
#main_news a{color:inherit}
#back_search{display:none!important}

/* ---- local: place bar ---- */
.nw-geo-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:-8px 0 16px;padding:12px 16px;border:1px solid var(--nw-border);border-radius:var(--nw-radius);background:var(--nw-surface)}
.nw-geo-where{display:flex;align-items:center;gap:8px;min-width:0;flex:1 1 260px}
.nw-geo-where svg{width:20px;height:20px;flex:none;color:var(--nw-brand)}
.nw-geo-where b{font-weight:500;white-space:nowrap}
.nw-geo-note{color:var(--nw-muted);font-size:13px}
.nw-geo{display:flex;align-items:center;gap:0;flex:0 1 320px;min-width:200px}
.nw-geo input[type=search]{flex:1;min-width:0;height:36px;padding:0 12px;border:1px solid var(--nw-border);border-right:0;border-radius:18px 0 0 18px;background:var(--nw-bg);color:var(--nw-text);font:inherit;font-size:14px;-webkit-appearance:none;appearance:none}
.nw-geo input[type=search]:focus{outline:none;border-color:var(--nw-brand)}
.nw-geo button{height:36px;padding:0 14px;border:1px solid var(--nw-brand);border-radius:0 18px 18px 0;background:var(--nw-brand);color:#fff;font:inherit;font-size:14px;font-weight:500;cursor:pointer}
.nw-geo-reset{font-size:13px;color:var(--nw-brand)!important;text-decoration:none;white-space:nowrap}
.nw-geo-reset:hover{text-decoration:underline}
@media (max-width:767px){.nw-geo-bar{padding:10px 12px}.nw-geo-where{flex-wrap:wrap}.nw-geo{flex-basis:100%}}

/* ---- top bar ---- */
.nw-top{position:sticky;top:0;z-index:50;background:var(--nw-surface);border-bottom:1px solid var(--nw-border)}
.nw-top-in{position:relative;max-width:1280px;margin:0 auto;height:var(--nw-top-h);display:flex;align-items:center;gap:16px;padding:0 16px}
.nw-brand{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--nw-text);flex:none}
.nw-brand img{height:28px;width:auto;display:block}
.nw-brand-news{font-size:22px;font-weight:400;color:var(--nw-muted);letter-spacing:-.2px}
html.theme-dark .nw-brand img{filter:brightness(0) invert(.9)}
#search_view{flex:1 1 auto;display:flex;justify-content:center;min-width:0}
.nw-search{flex:1 1 auto;max-width:720px;position:relative;display:flex;align-items:center;height:46px;background:var(--nw-hover);border-radius:24px;padding:0 6px 0 16px;box-sizing:border-box;margin:0}
.nw-search:focus-within{background:var(--nw-surface);box-shadow:var(--nw-shadow)}
.nw-search .ic{width:20px;height:20px;color:var(--nw-muted);flex:none}
.nw-search input{flex:1 1 auto;min-width:0;height:100%;border:0;margin:0 8px;padding:0;background:transparent;font:16px var(--nw-font);color:var(--nw-text);outline:none;box-shadow:none;-webkit-appearance:none}
.nw-search input::-webkit-search-decoration,.nw-search input::-webkit-search-cancel-button{-webkit-appearance:none}
.nw-search button{flex:none;border:0;background:transparent;width:38px;height:38px;border-radius:50%;cursor:pointer;color:var(--nw-muted);display:flex;align-items:center;justify-content:center;padding:0}
.nw-search button:hover{background:rgba(60,64,67,.12);color:var(--nw-text)}
.nw-search button svg{width:22px;height:22px}
.nw-search-toggle{display:none;flex:none;border:0;background:transparent;width:40px;height:40px;border-radius:50%;cursor:pointer;color:var(--nw-muted);align-items:center;justify-content:center;padding:0}
.nw-search-toggle svg{width:24px;height:24px}
.nw-apps{flex:none;margin-left:auto}
.nw-apps .searx-navbar{display:block;margin:0;padding:0;height:auto;background:transparent}
.nw-apps .header{line-height:1;min-width:0}
.nw-apps .navigation-list{margin:0;padding:0;list-style:none;display:flex}
.nw-apps .navigation-list-item{margin:0}
.nw-apps .navigation-panel-label{display:block;padding:6px;border-radius:50%}
.nw-apps .navigation-services-list{right:0;top:48px;background:var(--nw-surface);border-color:var(--nw-hover)}
.nw-apps .navigation-services-list-item a{color:var(--nw-text)}
.nw-apps .navigation-services-list-link:hover{background:var(--nw-hover)}
html.theme-dark .nw-apps .navigation-panel-label-icon{filter:invert(.85)}

/* ---- topic tabs + sub-topic chips ---- */
.nw-tabs{position:sticky;top:var(--nw-top-h);z-index:40;background:var(--nw-surface);border-bottom:1px solid var(--nw-border)}
.nw-tabs-in{max-width:1280px;margin:0 auto;padding:0 8px;display:flex;gap:2px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.nw-tabs-in::-webkit-scrollbar{display:none}
.nw-tab{flex:none;padding:0 16px;height:var(--nw-tabs-h);line-height:var(--nw-tabs-h);font-size:14px;font-weight:500;letter-spacing:.2px;color:var(--nw-muted);text-decoration:none;border-bottom:3px solid transparent;box-sizing:border-box;white-space:nowrap}
.nw-tab:hover{color:var(--nw-text);background:var(--nw-hover)}
.nw-tab.is-active{color:var(--nw-brand);border-bottom-color:var(--nw-brand)}
.nw-chips{max-width:1280px;margin:12px auto 0;padding:0 16px;display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;box-sizing:border-box}
.nw-chips::-webkit-scrollbar{display:none}
.nw-chip{flex:none;height:32px;line-height:32px;padding:0 14px;border-radius:16px;background:var(--nw-hover);color:var(--nw-text);font-size:14px;text-decoration:none}
.nw-chip:hover{background:var(--nw-border)}
.nw-chip.is-active{background:var(--nw-brand-soft);color:var(--nw-brand);font-weight:500}

/* ---- page grid ---- */
.nw-wrap{max-width:1280px;margin:0 auto;padding:16px 16px 40px;display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px;align-items:start;box-sizing:border-box}
.nw-main,.nw-aside{min-width:0}
.nw-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:8px 4px 16px}
.nw-head h1{font-size:28px;font-weight:400;letter-spacing:-.3px;margin:0;color:var(--nw-text)}
.nw-date{color:var(--nw-muted);font-size:14px;white-space:nowrap}

/* ---- cards ---- */
.nw-card{background:var(--nw-surface);border:1px solid var(--nw-border);border-radius:var(--nw-radius);overflow:hidden;box-sizing:border-box}
.nw-src{display:flex;align-items:center;gap:6px;font-size:12px;line-height:16px;color:var(--nw-muted);min-height:16px}
.nw-src b{font-weight:500;color:var(--nw-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nw-fav{width:16px;height:16px;border-radius:3px;flex:none;background:var(--nw-hover);object-fit:cover}
.nw-fav-ph{display:inline-flex;width:16px;height:16px;border-radius:3px;flex:none;background:var(--nw-brand-soft);color:var(--nw-brand);font-size:10px;font-weight:700;align-items:center;justify-content:center}
.nw-title{color:var(--nw-text);font-size:16px;line-height:22px;font-weight:500;margin:4px 0 6px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.nw-title a,.nw-lead-title a{color:inherit;text-decoration:none}
.nw-title a:hover,.nw-lead-title a:hover{text-decoration:underline}

.nw-lead{margin-bottom:16px}
.nw-lead-pic{display:block;background:var(--nw-hover)}
.nw-lead-img{display:block;width:100%;height:auto;aspect-ratio:16/9;max-height:440px;object-fit:cover}
.nw-lead-body{padding:16px 20px 6px}
.nw-lead-title{color:var(--nw-text);font-size:24px;line-height:1.3;font-weight:500;margin:6px 0 10px;overflow-wrap:anywhere}

.nw-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.nw-story{padding:14px 16px 4px}
.nw-story-main{display:flex;gap:16px;align-items:flex-start}
.nw-story-text{flex:1 1 auto;min-width:0}
.nw-thumb-link{flex:none;display:block}
.nw-thumb{display:block;width:96px;height:96px;border-radius:8px;object-fit:cover;background:var(--nw-hover)}

.nw-rel{list-style:none;margin:6px 0 0;padding:0}
.nw-rel li{border-top:1px solid var(--nw-border);padding:10px 0}
.nw-rel .nw-title{font-size:14px;line-height:20px;font-weight:400;margin:3px 0 0;-webkit-line-clamp:3}
details.nw-fc{border-top:1px solid var(--nw-border)}
details.nw-fc summary{list-style:none;cursor:pointer;padding:10px 0;font-size:13px;font-weight:500;color:var(--nw-brand);display:flex;align-items:center;gap:6px;user-select:none}
details.nw-fc summary::-webkit-details-marker{display:none}
details.nw-fc summary svg{width:18px;height:18px;transition:transform .2s}
details.nw-fc[open] summary svg{transform:rotate(180deg)}
details.nw-fc .nw-rel{margin:0}
details.nw-fc .nw-rel li:first-child{border-top:0;padding-top:0}

/* ---- sidebar ---- */
.nw-aside .nw-card{margin-bottom:16px;padding:12px 16px 4px}
.nw-aside h2{color:var(--nw-text);font-size:18px;font-weight:400;margin:4px 0 6px;display:flex;align-items:center;gap:6px}
.nw-aside h2 a{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:4px}
.nw-aside h2 a:hover{text-decoration:underline}
.nw-aside h2 svg{width:20px;height:20px;color:var(--nw-muted)}
.nw-mini{list-style:none;margin:0;padding:0}
.nw-mini li{padding:10px 0;border-top:1px solid var(--nw-border)}
.nw-mini li:first-child{border-top:0}
.nw-mini .nw-title{font-size:14px;line-height:20px;font-weight:400;margin:3px 0 0;-webkit-line-clamp:3}
.nw-weather{display:flex;align-items:center;gap:14px;text-decoration:none;color:inherit;padding:2px 0 12px}
.nw-weather svg{width:40px;height:40px;color:var(--nw-brand);flex:none}
.nw-weather b{display:block;font-weight:500;font-size:15px}
.nw-weather span{font-size:13px;color:var(--nw-muted)}
.nw-weather:hover b{text-decoration:underline}

.nw-empty{padding:48px 16px;text-align:center;color:var(--nw-muted)}
.news_endpoint .footer{padding:16px;width:auto;text-align:center;background:var(--nw-surface);border-top:1px solid var(--nw-border);color:var(--nw-muted)}
.news_endpoint .footer .text-muted{color:var(--nw-muted)}

/* ---- responsive ---- */
@media (max-width:1023px){
  .nw-wrap{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:767px){
  :root{--nw-top-h:56px}
  .nw-top-in{gap:4px;padding:0 6px 0 12px}
  .nw-brand img{height:24px}
  .nw-brand-news{font-size:19px}
  #search_view{position:absolute;left:0;right:0;top:var(--nw-top-h);display:none;background:var(--nw-surface);border-bottom:1px solid var(--nw-border);padding:8px 12px;box-shadow:var(--nw-shadow)}
  .nw-top.search-open #search_view{display:flex}
  .nw-search{max-width:none;height:44px}
  .nw-search-toggle{display:flex;margin-left:auto}
  .nw-apps{margin-left:0}
  .nw-tabs{position:static}
  .nw-tab{padding:0 12px}
  .nw-wrap{padding:12px 12px 32px;gap:16px}
  .nw-head{margin:4px 2px 12px}
  .nw-head h1{font-size:22px}
  .nw-date{font-size:13px}
  .nw-grid{grid-template-columns:minmax(0,1fr)}
  .nw-lead-body{padding:14px 16px 4px}
  .nw-lead-title{font-size:20px}
  .nw-thumb{width:80px;height:80px}
}
/* sidebar weather card (live data from weather.efind.com) */
.nw-wx{display:flex;align-items:center;gap:8px;text-decoration:none;color:inherit;padding:0 0 8px}
.nw-wx-icon{width:68px;height:68px;flex:none;margin:-8px 0 -8px -10px}
.nw-wx-now{min-width:0}
.nw-wx-temp{font-size:32px;line-height:36px;font-weight:400;letter-spacing:-.5px;color:var(--nw-text)}
.nw-wx-temp small{font-size:14px;color:var(--nw-muted);vertical-align:top;line-height:22px;margin-left:2px}
.nw-wx-desc{font-size:14px;font-weight:500;line-height:18px;color:var(--nw-text)}
.nw-wx-hl{font-size:13px;color:var(--nw-muted);line-height:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nw-wx:hover .nw-wx-desc{text-decoration:underline}
.nw-wx-days{list-style:none;margin:0;padding:8px 0 2px;border-top:1px solid var(--nw-border);display:grid;grid-template-columns:repeat(4,1fr);gap:4px;text-align:center}
.nw-wx-days li{display:flex;flex-direction:column;align-items:center;font-size:12px;line-height:16px;color:var(--nw-muted)}
.nw-wx-days img{width:34px;height:34px;margin:-1px 0 -3px}
.nw-wx-days b{font-weight:500;color:var(--nw-text);font-size:13px}
.nw-wx-days i{font-style:normal}
.nw-wx-days em{font-style:normal;font-size:11px;color:var(--nw-brand);min-height:14px;line-height:14px}
.nw-wx-more{margin:4px 0 8px;font-size:12px;color:var(--nw-faint)}
.nw-wx-more a{color:var(--nw-muted)}
