/* news.css — the News page (#viewNews), in the dashboard's own chrome, as the Calendar is.
   Loaded after cockpit.css and before theme-light.css. Scoped to #viewNews (the desk's news panels keep
   the older .event-* / .news-* rules in cockpit.css).

   Built from the dashboard's classes (cockpit.css):
     .cpane / .cpane__bar / .cpane__title   two panes, "— FUND EVENTS · LAST 12 MONTHS" and
                                            "— FUND NEWS · 40 OF 213", in the 1px hairline outline
     .cpfilters / .cpfilters__more          the kind filter: the Screener's filter-bar pills, with counts
     .cpane__tab                            All / Your funds, as the dashboard's pane tabs
   Rows are the Universe table's rows: 1px rules (rgba .04 dark, .05 light), 7px / 12px padding, a faint
   hover. A ticker is the Universe ticker — bold amber mono — on a small amber tag when you own the fund,
   amber and underlined when it is on your watchlist (the Calendar's marks). Headlines --text, the time,
   outlet and every secondary line --text-2; nothing under 13px except the mono small-caps day heads.

   Reader text size: app.js applyTextSize() zooms every main.view but the dashboard, #viewNews included,
   so the pane titles (which cockpit.css scales for the dashboard) are held at their base size here. */

#viewNews, #viewCalendar {   /* #viewCalendar: its fund events share the kind colors below (calendar.css) */
  /* one restrained color per kind of event: its label, its filter dot */
  --nw-merger: #f0c060;
  --nw-rights: #9ccbff;
  --nw-tender: #6ee7b7;
  --nw-liquidation: #faaec6;
  --nw-conversion: #cdb0ff;
  --nw-delisting: #ffb088;
  --nw-other: var(--text-2);
}
#viewNews {
  --nw-rule: rgba(255, 255, 255, .04);                                 /* between rows, as .cptable td */
  --nw-faint: var(--soft-line, rgba(255, 255, 255, .09));              /* the panes' outline */
  --nw-head: var(--bg-raised);                                         /* column heads, as .cptable thead th */
  --nw-hover: color-mix(in srgb, var(--text) 3%, transparent);
  --nw-own: var(--accent);
  --nw-on-own: var(--on-accent, #1a1304);
  --nw-amber-text: var(--accent-soft, var(--accent));
  --nw-focus: var(--accent);
}
body[data-theme="light"] #viewNews, body[data-theme="light"] #viewCalendar {
  --nw-merger: #5e3f00;
  --nw-rights: #133f7d;
  --nw-tender: #054d35;
  --nw-liquidation: #85123d;
  --nw-conversion: #4a2896;
  --nw-delisting: #722d07;
  --nw-tag-tint: 12%;
}
body[data-theme="light"] #viewNews { --nw-rule: rgba(15, 23, 42, .05); }

/* ── frame ───────────────────────────────────────────────────────────────── */
#viewNews.view--news.is-active { display: block; padding-bottom: 64px; }
#viewNews .viewbar { flex-wrap: wrap; }
#viewNews .nw-asof {
  margin-left: auto; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 14px;
  font:500 13px/1.3 var(--sans); color: var(--text-2); letter-spacing: 0; text-transform: none;
}
#viewNews .nw-asof:empty { display: none; }
#viewNews .nw-asof__new { display: inline-flex; align-items: center; gap: 7px; color: var(--nw-amber-text); font-weight: 600; }
#viewNews .nw-asof__new i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* News · Calendar: the Portfolio page's amber-pill tabs (portfolio.css), on both pages of the group */
:is(#viewNews, #viewCalendar) > .subnav { gap: 4px; margin: 4px 0 12px; padding: 0; border-radius: 0; background: none; box-shadow: none; }
:is(#viewNews, #viewCalendar) > .subnav .subnav__tab { min-height: 30px; padding: 0 13px; border: 1px solid transparent; border-radius: 999px; background: none; box-shadow: none; color: var(--text-2); font:650 13px/1.2 var(--sans); }
:is(#viewNews, #viewCalendar) > .subnav .subnav__tab:hover { color: var(--text); background: var(--soft-2, rgba(255, 255, 255, .06)); }
:is(#viewNews, #viewCalendar) > .subnav .subnav__tab.is-active,
body[data-theme="light"] :is(#viewNews, #viewCalendar) > .subnav .subnav__tab.is-active { color: var(--accent-soft, var(--accent)); background: var(--accent-bg, rgba(224, 168, 46, .12)); border-color: var(--border-accent, var(--accent)); box-shadow: none; }

/* ── two panes ───────────────────────────────────────────────────────────── */
#viewNews .nw { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; align-items: start; }
#viewNews .nw > .cpane { min-width: 0; border-bottom: 1px solid var(--nw-faint); }   /* .cpane:last-child drops it on the desk */
#viewNews .nw-bar { height: auto; min-height: 34px; flex-wrap: wrap; padding-block: 2px; }
#viewNews .nw-bar .cpane__title { margin: 0; font-size:13px; line-height: 1.5; }   /* held at base size: the view is zoomed instead */
#viewNews .nw-bar__sub { color: var(--text-2); font-weight: 600; letter-spacing: .08em; }
#viewNews .nw-bar__sub:empty { display: none; }
#viewNews .nw-lede { margin: 0; padding: 7px 12px; border-bottom: 1px solid var(--nw-rule); font:400 13px/1.45 var(--sans); color: var(--text-2); }

/* ── the kind filter: the dashboard's filter-bar pills ──────────────────── */
#viewNews .nw-filt { gap: 6px; min-height: 42px; }
#viewNews .nw-filt:empty { display: none; }
#viewNews .nw-pill { white-space: nowrap; }
#viewNews .nw-pill__n { font:600 13px/1 var(--mono); font-variant-numeric: tabular-nums; color: var(--text-2); }
#viewNews .nw-pill.is-on { border-color: var(--border-accent, var(--accent)); color: var(--text); background: var(--accent-bg, rgba(224, 168, 46, .12)); }
#viewNews .nw-pill.is-on .nw-pill__n { color: var(--nw-amber-text); }
#viewNews .nw-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--k); flex: none; }
#viewNews .nw-pill--merger, #viewNews .nw-ev--merger { --k: var(--nw-merger); }
#viewNews .nw-pill--rights, #viewNews .nw-ev--rights { --k: var(--nw-rights); }
#viewNews .nw-pill--tender, #viewNews .nw-ev--tender { --k: var(--nw-tender); }
#viewNews .nw-pill--liquidation, #viewNews .nw-ev--liquidation { --k: var(--nw-liquidation); }
#viewNews .nw-pill--conversion, #viewNews .nw-ev--conversion { --k: var(--nw-conversion); }
#viewNews .nw-pill--delisting, #viewNews .nw-ev--delisting { --k: var(--nw-delisting); }
#viewNews .nw-ev--other { --k: var(--nw-other); }

/* ── rows: fund events and headlines ─────────────────────────────────────── */
#viewNews .nw-evl, #viewNews .nw-nl { list-style: none; margin: 0; padding: 0; }
#viewNews .nw-ev, #viewNews .nw-n {
  position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) 28px; gap: 0 12px; align-items: start;
  margin: 0; padding: 7px 8px 7px 12px; border-bottom: 1px solid var(--nw-rule); transition: background-color .12s ease;
}
#viewNews .nw-n { grid-template-columns: 70px minmax(0, 1fr) 28px; }
#viewNews :is(.nw-ev, .nw-n):not(.nw-skel):hover, #viewNews :is(.nw-ev, .nw-n):has(.nw-act[open]) { background: var(--nw-hover); }
#viewNews :is(.nw-ev, .nw-n):has(.nw-hl:focus-visible) { box-shadow: inset 2px 0 0 var(--nw-focus); background: var(--nw-hover); }
#viewNews .nw-evl > .nw-ev:last-child, #viewNews .nw-nl:last-child > .nw-n:last-child { border-bottom: 0; }
#viewNews .nw-ev__when, #viewNews .nw-n__when { position: relative; min-width: 0; }
#viewNews .nw-ago, #viewNews .nw-n__tm {
  display: block; padding-top: 1px; font:500 13px/1.45 var(--mono); font-variant-numeric: tabular-nums;
  color: var(--text-2); white-space: nowrap; cursor: default;
}
#viewNews .is-new .nw-ago, #viewNews .is-new .nw-n__tm { color: var(--text); }
#viewNews .nw-dotnew {   /* new since the last visit: an amber dot just left of the time */
  position: absolute; left: -9px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
#viewNews .nw-ev__b, #viewNews .nw-n__b { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#viewNews .nw-ev__top { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; }
#viewNews .nw-kind { display: inline-flex; align-items: center; gap: 6px; font:600 13px/1.45 var(--sans); color: var(--k); white-space: nowrap; }
#viewNews .nw-new { font:700 13px/1.45 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--nw-amber-text); }

#viewNews .nw-hl {
  display: block; color: var(--text); text-decoration: none; outline: none; overflow-wrap: anywhere;
  font:500 14px/1.42 var(--sans); letter-spacing: -.003em; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
#viewNews .nw-ev .nw-hl { font-weight: 600; }
#viewNews .nw-hl:hover { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 45%, transparent); }
#viewNews .nw-hl:focus-visible { text-decoration: underline; text-decoration-color: var(--nw-focus); }
#viewNews .nw-nb { white-space: nowrap; }
#viewNews .nw-ext { display: inline-block; width: 10px; height: 10px; margin-left: 5px; vertical-align: 0; color: var(--text-2); opacity: 0; transition: opacity .15s; }
#viewNews .nw-hl:hover .nw-ext, #viewNews .nw-hl:focus-visible .nw-ext { opacity: 1; }
#viewNews .nw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#viewNews .nw-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; min-width: 0; }
#viewNews .nw-meta:empty { display: none; }
#viewNews .nw-src, #viewNews .nw-also { font:400 13px/1.45 var(--sans); color: var(--text-2); }
#viewNews .nw-also__a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text-2) 45%, transparent); text-underline-offset: 3px; }
#viewNews .nw-also__a:hover { color: var(--text); text-decoration-color: currentColor; }
#viewNews .nw-meta__tm { display: none; }
#viewNews .nw-lock .news-lock {
  display: inline-flex; align-items: center; gap: 5px; margin: 0; font:400 13px/1.45 var(--sans); color: var(--text-2); white-space: nowrap;
}
#viewNews .nw-lock .news-lock::before {
  content: ""; width: 10px; height: 11px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 12'%3E%3Crect x='1' y='5' width='9' height='6.5' rx='1.5'/%3E%3Cpath d='M3 5V3.6a2.5 2.5 0 0 1 5 0V5' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 12'%3E%3Crect x='1' y='5' width='9' height='6.5' rx='1.5'/%3E%3Cpath d='M3 5V3.6a2.5 2.5 0 0 1 5 0V5' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
}
#viewNews .nw-lock .news-lock[data-news-ext], #viewNews .nw-lock a.news-lock { cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text-2) 45%, transparent); text-underline-offset: 3px; }
#viewNews .nw-lock .news-lock[data-news-ext]:hover, #viewNews .nw-lock a.news-lock:hover { color: var(--text); }

/* ── tickers: the Universe ticker; yours on an amber tag, your watchlist's underlined ── */
#viewNews .nw-tks { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 9px; }
#viewNews .nw-tk {
  display: inline-flex; align-items: center; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; transform: none;
  font:700 13px/1.45 var(--mono); letter-spacing: .01em; text-transform: none; color: var(--nw-amber-text); cursor: pointer; white-space: nowrap;
}
#viewNews button.nw-tk:hover { text-decoration: underline; text-underline-offset: 3px; }
#viewNews .nw-tk.is-own { padding: 0 4px; margin: 0 -1px; border-radius: 4px; line-height: 1.35; color: var(--nw-on-own); background: var(--nw-own); }
#viewNews button.nw-tk.is-own:hover { text-decoration: none; filter: brightness(1.07); }
#viewNews .nw-tk.is-watch { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
#viewNews .nw-tk-more { font:600 13px/1.45 var(--mono); color: var(--text-2); cursor: default; }

/* ── the row's "…" menu: a web search for the exact headline ─────────────── */
#viewNews .nw-act { position: relative; align-self: start; }
#viewNews .nw-act__b {
  display: grid; place-items: center; width: 26px; height: 22px; border-radius: 6px; list-style: none; cursor: pointer;
  color: var(--text-2); opacity: 0; transition: opacity .12s ease, background-color .12s ease, color .12s ease;
}
#viewNews .nw-act__b::-webkit-details-marker { display: none; }
#viewNews .nw-act__b svg { width: 14px; height: 14px; fill: currentColor; }
#viewNews :is(.nw-ev, .nw-n):hover .nw-act__b, #viewNews .nw-act[open] .nw-act__b, #viewNews .nw-act__b:focus-visible { opacity: 1; }
#viewNews .nw-act__b:hover, #viewNews .nw-act[open] .nw-act__b { color: var(--text); background: var(--surface-2); }
#viewNews .nw-act__b:focus-visible { outline: 2px solid var(--nw-focus); outline-offset: 1px; }
#viewNews .nw-act__menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 30; display: flex; flex-direction: column; gap: 2px;
  width: max-content; max-width: 280px; padding: 8px 12px; border-radius: 10px;
  background: var(--fx-surface, var(--bg-raised)); border: 1px solid var(--fx-line, var(--border));
  box-shadow: var(--fx-shadow-pop, 0 18px 40px -14px rgba(0, 0, 0, .55));
}
#viewNews .nw-find { font:600 13px/1.45 var(--sans); color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent); text-underline-offset: 3px; }
#viewNews .nw-find:hover { text-decoration-color: currentColor; }
#viewNews .nw-act__why { font:400 13px/1.4 var(--sans); color: var(--text-2); }
#viewNews .nw-find:focus-visible, #viewNews .nw-also__a:focus-visible, #viewNews .nw-lock a.news-lock:focus-visible,
#viewNews .nw-tk:focus-visible, #viewNews .nw-pill:focus-visible, #viewNews .nw-seg .cpane__tab:focus-visible,
#viewNews .nw-btn:focus-visible, #viewNews .nw-older:focus-visible, #viewNews .nw-search__x:focus-visible {
  outline: 2px solid var(--nw-focus); outline-offset: 2px; border-radius: 4px;
}
@media (hover: none) { #viewNews .nw-act__b { opacity: 1; } }

/* ── fund events: what follows the list ──────────────────────────────────── */
#viewNews .nw-evl.is-capped > .nw-ev:nth-child(n + 13) { display: none; }
#viewNews .nw-evmore { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px; border-top: 1px solid var(--nw-rule); }
#viewNews .nw-evmore:empty { display: none; }
#viewNews .nw-btn.nw-evall--phone { display: none; }
#viewNews .nw-older {
  margin: 0; padding: 4px 0; border: 0; background: none; box-shadow: none; cursor: pointer; text-align: left;
  color: var(--text); font:600 13px/1.4 var(--sans); letter-spacing: 0; text-transform: none;
  text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent); text-decoration-thickness: 1px; text-underline-offset: 3px;
}
#viewNews .nw-older span { font-weight: 400; color: var(--text-2); }
#viewNews .nw-older:hover { text-decoration-color: currentColor; }

/* ── fund news: search and All / Your funds ──────────────────────────────── */
#viewNews .nw-tools { gap: 8px; flex-wrap: nowrap; }
#viewNews .nw-search {
  position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 4px 0 10px; margin: 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm, 7px); background: var(--surface-2); color: var(--text-2); cursor: text;
  transition: border-color .12s;
}
#viewNews .nw-search:hover { border-color: var(--border-hover); }
#viewNews .nw-search:focus-within { border-color: var(--border-accent, var(--accent)); }
#viewNews .nw-search > svg { width: 13px; height: 13px; flex: none; }
#viewNews .nw-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: 0;
  color: var(--text); font:400 13px/1.2 var(--sans); -webkit-appearance: none; appearance: none;
}
#viewNews .nw-search input:focus-visible { outline: 0; }
#viewNews .nw-search input::placeholder { color: var(--text-2); opacity: 1; }
#viewNews .nw-search input::-webkit-search-cancel-button { display: none; }
#viewNews .nw-search__x {
  display: grid; place-items: center; width: 22px; height: 22px; padding: 0; margin: 0; flex: none; border: 0; border-radius: 5px;
  background: var(--surface-3, var(--surface-2)); color: var(--text); cursor: pointer;
}
#viewNews .nw-search__x[hidden] { display: none; }
#viewNews .nw-search__x svg { width: 9px; height: 9px; }
#viewNews .nw-kbd {
  flex: none; margin-right: 3px; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-hover, var(--border));
  font:500 13px/1.2 var(--mono); color: var(--text-2); background: none;
}
#viewNews .nw-search:focus-within .nw-kbd, #viewNews .nw-search__x:not([hidden]) + .nw-kbd { display: none; }
#viewNews .nw-seg { flex: none; }
#viewNews .nw-seg .cpane__tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
#viewNews .nw-seg__n:empty { display: none; }
/* the count sits on the Analyze amber #e0a82e in both themes: its dark ink (9.4:1), never white (2.14:1) */
#viewNews .nw-seg__n, body[data-theme="light"] #viewNews .nw-seg__n { color: #1a1304; background: #e0a82e; }
#viewNews .nw-count { margin: 0; padding: 6px 12px; border-bottom: 1px solid var(--nw-rule); font:500 13px/1.45 var(--sans); color: var(--text-2); }
#viewNews .nw-count:empty { display: none; }

/* ── fund news: a band for each day, as the Calendar's list ──────────────── */
#viewNews .nw-day {
  display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 6px 12px 5px;
  background: var(--nw-head); border-bottom: 1px solid var(--nw-faint);
  font:700 13px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text);
}
#viewNews .nw-nl + .nw-day { border-top: 1px solid var(--nw-faint); }
#viewNews .nw-day em { font:600 13px/1.5 var(--mono); font-style: normal; letter-spacing: .06em; color: var(--nw-amber-text); }
#viewNews .nw-foot { margin: 0; padding: 8px 12px; border-top: 1px solid var(--nw-rule); font:400 13px/1.5 var(--sans); color: var(--text-2); }

/* ── states: loading, empty, error, locked ───────────────────────────────── */
#viewNews .nw-li-state { list-style: none; }
#viewNews .nw-state { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 16px 12px; }
#viewNews .nw-state__ico { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--text-2); }
#viewNews .nw-state__ico svg { width: 16px; height: 16px; }
#viewNews .nw-state--error .nw-state__ico { background: color-mix(in srgb, var(--red) 13%, transparent); color: var(--red); }
#viewNews .nw-state--lock .nw-state__ico { background: var(--accent-bg, rgba(224, 168, 46, .12)); color: var(--nw-amber-text); }
#viewNews .nw-state__t { margin: 4px 0 2px; font:600 14px/1.4 var(--sans); color: var(--text); }
#viewNews .nw-state__b { margin: 0 0 10px; max-width: 58ch; font:400 13px/1.5 var(--sans); color: var(--text-2); }
#viewNews .nw-state__b:last-child { margin-bottom: 0; }
/* buttons in a state and "Show all": the filter bar's pill; the one thing to do is the Analyze amber */
#viewNews .nw-btn {
  display: inline-flex; align-items: center; height: 28px; padding: 0 11px; margin: 0 6px 0 0;
  border: 1px solid var(--border); border-radius: var(--radius-sm, 7px); background: var(--surface-2); box-shadow: none; transform: none;
  color: var(--text); font:600 13px/1 var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer; transition: border-color .12s, filter .12s;
}
#viewNews .nw-btn:hover { border-color: var(--border-hover); }
#viewNews .nw-btn--primary { border-color: transparent; border-radius: 999px; background: #e0a82e; color: #1a1304; box-shadow: 0 1px 2px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .16); }
#viewNews .nw-btn--primary:hover { border-color: transparent; filter: brightness(1.07); }
#viewNews .nw-btn--quiet { border-color: transparent; background: transparent; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--text) 30%, transparent); text-underline-offset: 3px; padding: 0 6px; }
#viewNews .nw-btn--quiet:hover { border-color: transparent; background: var(--surface-2); }

/* skeleton rows: the shape of what is coming, shimmering gently */
#viewNews .nw-bone {
  display: block; height: 12px; border-radius: 4px; margin: 3px 0;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3, var(--surface-2)) 50%, var(--surface-2) 100%); background-size: 200% 100%;
  animation: nw-shimmer 1.5s ease-in-out infinite;
}
#viewNews .nw-bone--hl { width: 92%; height: 14px; }
#viewNews .nw-day.nw-skel .nw-bone { margin: 2px 0; }
@keyframes nw-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { #viewNews .nw-bone { animation: none; } #viewNews * { transition: none !important; } }

/* ── the key under the panes ─────────────────────────────────────────────── */
#viewNews .nw-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin: 12px 0 0; padding: 0 2px;
  font:400 13px/1.5 var(--sans); color: var(--text-2);
}
#viewNews .nw-note > span { display: inline-flex; align-items: center; gap: 7px; }
#viewNews .nw-note .nw-tk { cursor: default; }
#viewNews .nw-note kbd {
  display: inline-block; min-width: 20px; margin: 0 2px; padding: 1px 6px; border-radius: 4px; text-align: center;
  border: 1px solid var(--border-hover, var(--border)); font:600 13px/1.3 var(--mono); color: var(--text);
}
#viewNews .nw-note__keys { margin-left: auto; }
@media (hover: none) { #viewNews .nw-note__keys, #viewNews .nw-kbd { display: none; } }

/* ── narrower screens ────────────────────────────────────────────────────── */
@media (max-width: 1060px) {
  #viewNews .nw { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  #viewNews .nw-asof { margin-left: 0; width: 100%; padding: 2px 0 6px; }
  /* phones: the kinds in one row that scrolls sideways, fading at the edge */
  #viewNews .nw-filt {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-mask: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 24px), transparent);
  }
  #viewNews .nw-filt::-webkit-scrollbar { display: none; }
  #viewNews .nw-pill { flex: none; }
  #viewNews .nw-evl.is-capped > .nw-ev:nth-child(n + 6) { display: none; }
  #viewNews .nw-btn.nw-evall, #viewNews .nw-btn.nw-evall--phone { display: inline-flex; justify-content: center; width: 100%; margin: 0; }
  #viewNews .nw-tools { flex-wrap: wrap; }
  #viewNews .nw-search { flex: 1 1 100%; height: 32px; }
  /* phones: the headline takes the width; the time moves into the line under it */
  #viewNews .nw-ev, #viewNews .nw-n { grid-template-columns: minmax(0, 1fr) 28px; padding: 8px 6px 8px 12px; }
  #viewNews .nw-ev__when, #viewNews .nw-n__when { display: none; }
  #viewNews .nw-ev__b, #viewNews .nw-n__b { grid-column: 1; }
  #viewNews .nw-meta__tm { display: inline-flex; align-items: center; gap: 6px; font:500 13px/1.45 var(--mono); font-variant-numeric: tabular-nums; color: var(--text-2); }
  #viewNews .nw-meta__tm .nw-dotnew { position: static; }
  #viewNews .nw-note { gap: 6px 16px; }
  #viewNews .nw-note__keys { display: none; }
}
@media (max-width: 640px) { #viewNews .nw-meta__tm--ev { margin-left: auto; } }

/* ── Final check (Sep 28, W8): the kinds of event stay on one row; "Conversions 1" no longer wraps onto a row of
   its own. Slightly tighter pills fit the row at 1512; narrower panes (and Large text) scroll it sideways,
   fading at the edge as on phones. ── */
@media (min-width: 641px) {
  #viewNews .nw-filt {
    gap: 5px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    -webkit-mask: linear-gradient(90deg, #000 calc(100% - 12px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 12px), transparent);
  }
  #viewNews .nw-filt::-webkit-scrollbar { display: none; }
  #viewNews .nw-filt .nw-pill { flex: none; padding-left: 8px; padding-right: 8px; }
}
