/* ================= News page (#news) =================
   Linked after styles.css. Uses the red pen brand tokens set there (paper white, ink #17181C, pen red #C8372D for
   marks only, black buttons). Only nw-* classes live here, so nothing else on the site changes. */
#view-news { max-width: none; }
#view-news .nw-lede { max-width: 62ch; }
.nw-head { display: grid; gap: 8px; margin: 6px 0 20px; }
.nw-lede { max-width: 60ch; }
.nw-loading { padding: 28px 0; color: var(--ink-2); }

/* what you follow */
.nw-follow { display: grid; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
.nw-follow-top { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.nw-k { font-weight: 800; font-family: var(--f-display); }
.nw-src { color: var(--ink-3); font-size: .86rem; }
.nw-follow-top .btn { margin-left: auto; }
.nw-chips { gap: 6px; }
.nw-chip { font-size: .84rem; padding: 5px 11px; }
.nw-chip[data-empty] { color: var(--ink-3); border-style: dashed; }
.nw-chip.nw-company, .nw-chip.nw-place { color: var(--ink); }
.nw-chip.nw-place::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; border: 2px solid var(--pen); vertical-align: 1px; }
.nw-chip[aria-pressed="true"].nw-place::before { border-color: #FFFFFF; }

/* signed-out preview banner */
.nw-banner { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin: 0 0 14px; padding: 14px 16px; border-radius: var(--r); background: var(--pen-soft); }
.nw-banner p { flex: 1 1 300px; }

/* stories */
.nw-list { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.nw-item { display: grid; gap: 6px; padding: 16px 2px 15px; border-bottom: 1px solid var(--line); }
.nw-meta { display: flex; flex-wrap: wrap; gap: 0 7px; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.nw-t { font-family: var(--f-display); font-weight: 700; font-size: 1.14rem; line-height: 1.3; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.nw-t:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.nw-t:visited { color: var(--ink-2); }
.nw-x { color: var(--ink-2); font-size: .94rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nw-foot { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin-top: 2px; }
/* the reason it's here, written in red pen with a tick */
.nw-why { position: relative; padding-left: 19px; color: var(--pen); font-weight: 700; font-size: .84rem; }
.nw-why::before { content: ""; position: absolute; left: 3px; top: .2em; width: 6px; height: 11px; border: solid var(--pen); border-width: 0 2px 2px 0; transform: rotate(40deg); }
.nw-hide { margin-left: auto; padding: 4px 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: .84rem; color: var(--ink-3); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.nw-hide:hover { color: var(--ink); text-decoration-color: var(--pen); }
.nw-none { margin-top: 18px; }
.nw-err { margin-top: 14px; }
.nw-link { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--pen); text-underline-offset: 3px; }
.nw-link:hover { color: var(--pen); }

/* choosing what to follow */
.nw-setup { display: grid; gap: 6px; margin-bottom: 16px; }
.nw-editor { display: grid; gap: 22px; padding: 18px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
.nw-group { display: grid; gap: 8px; }
.nw-group .lbl { font-weight: 700; }
.nw-group .hint { margin-top: -4px; font-size: .86rem; color: var(--ink-3); }
.nw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.nw-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 600; font-size: .88rem; }
.nw-tag button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; cursor: pointer; color: var(--ink-2); font-size: 1.05rem; line-height: 1; }
.nw-tag button:hover { background: var(--pen-soft); color: var(--pen); }
.nw-none-yet { color: var(--ink-3); font-size: .88rem; }
.nw-add { display: flex; gap: 8px; }
.nw-add input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.nw-topics .chip { font-size: .84rem; }
.nw-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.nw-reset { margin-left: auto; }

@media (max-width: 600px) {
  .nw-follow, .nw-editor { padding: 14px 12px; }
  .nw-t { font-size: 1.06rem; }
  .nw-reset { margin-left: 0; }
}

/* "In the news for you": 3 stories on My report and the quick check result */
.nw-mini { margin-top: 2px; }
.nw-mini .nw-item { padding: 12px 2px 11px; gap: 4px; }
.nw-mini .nw-t { font-size: 1.02rem; }
.nw-mini-more { margin-top: 4px; }
.nw-qk { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-left: 3px solid var(--pen); border-radius: var(--r); background: var(--surface); margin: 14px 0; }
.nw-qk > header { display: grid; gap: 4px; }
.nw-qk > header h2 { font-size: 1.12rem; line-height: 1.3; }
.nw-qk > header p { color: var(--ink-2); }

/* Premium: "What this means for your business" (red pen note, like the alert emails' "Next step") */
.nw-mean { margin: 2px 0 0; padding: 8px 12px; border-left: 3px solid var(--pen); border-radius: 0 8px 8px 0; background: var(--pen-soft); color: var(--ink); font-size: .92rem; line-height: 1.45; }
.nw-mean-k { font-weight: 700; }
.nw-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; border-top: 0; border-right: 0; border-bottom: 0; text-align: left; font: inherit; font-size: .92rem; cursor: pointer; }
.nw-locked:hover { background: #F8DEDA; }
.nw-locked .pw-pill { margin: 0; }
.nw-lock-t { flex: 1 1 100%; color: var(--ink-2); }

/* ================= Today: the daily brief =================
   3 to 5 things for this business today (grants, VAT changes, deadlines, news), numbered in red pen, each with an
   impact tag and one plain-English line. Used on the Today page, at the top of My plan and on the quick check result. */
.nw-brief { display: grid; gap: 0; margin: 0 0 8px; }
.nw-brief-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.nw-bi { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 12px; align-content: start; padding: 16px 2px 16px 0; border-bottom: 1px solid var(--line); }
.nw-bi > :not(.nw-bi-n) { grid-column: 2; }
.nw-bi-n { grid-column: 1; grid-row: 1 / span 6; font-family: 'Caveat', 'Bradley Hand', cursive; font-weight: 700; font-size: 2.1rem; line-height: .9; color: var(--pen); text-align: center; padding-top: 2px; }
.nw-bi-tag { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 4px; }
.nw-imp { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-family: var(--f-mono); font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3; background: var(--surface-2); color: var(--ink-2); }
.nw-imp-deadline, .nw-imp-cost { background: var(--pen-soft); color: var(--pen); }
.nw-imp-money { background: var(--ok-soft); color: var(--pen-ok); }
.nw-imp-rule, .nw-imp-hmrc { background: var(--ink); color: #FFFFFF; }
.nw-bi-about { font-size: .84rem; font-weight: 600; color: var(--ink-3); overflow-wrap: anywhere; }
.nw-bi-t { font-family: var(--f-display); font-weight: 700; font-size: 1.12rem; line-height: 1.3; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.nw-bi-t:hover { text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.nw-bi-line { margin: 4px 0 0; color: var(--ink); font-size: .96rem; line-height: 1.45; }
.nw-bi-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 6px 0 0; font-size: .84rem; color: var(--ink-3); }
.nw-bi-meta span + span::before { content: "·"; margin-right: 8px; }
.nw-bi-meta b { color: var(--pen-ok); font-weight: 700; }
.nw-bi-next { margin: 8px 0 0; padding: 6px 10px; border-left: 3px solid var(--pen); background: var(--pen-soft); font-size: .9rem; color: var(--ink); }
.nw-brief-done { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 14px 0 0; color: var(--pen-ok); font-weight: 700; }
.nw-brief-done::before { content: ""; width: 7px; height: 13px; margin: 0 4px 3px 4px; border: solid var(--pen-ok); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }
.nw-brief-done span { color: var(--ink-3); font-weight: 400; font-size: .9rem; }
.nw-brief-empty { padding: 18px 0 6px; border-top: 1.5px solid var(--ink); }
.nw-brief-empty p { margin: 0 0 6px; }
.nw-skel { height: 74px; margin: 10px 0; border-radius: var(--r); background: var(--surface-2); animation: nw-pulse 1.4s ease-in-out infinite; }
@keyframes nw-pulse { 50% { opacity: .55 } }
@media (prefers-reduced-motion: reduce) { .nw-skel { animation: none } }
.nw-more { margin-top: 34px; }
.nw-more > h2 { margin: 0 0 12px; font-size: 1.25rem; }

/* My plan: today's brief just under the report heading */
.nw-plan-brief { margin: 18px 0 6px; padding: 16px 18px 12px; border: 1.5px solid var(--ink); border-radius: var(--r); background: var(--surface); }
.nw-plan-brief > header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 10px; }
.nw-plan-brief > header h2 { margin: 0; font-size: 1.2rem; line-height: 1.3; }
.nw-plan-brief .nw-brief-list { border-top: 0; }
.nw-plan-brief .nw-bi { padding: 12px 0; }
.nw-plan-brief .nw-bi:last-child { border-bottom: 0; }
.nw-plan-brief .nw-bi-n { font-size: 1.8rem; }
.nw-plan-brief .nw-bi-t { font-size: 1.04rem; }
.nw-plan-brief .nw-mini-more { margin: 8px 0 0; }
@media print { .nw-plan-brief, #qk-news { display: none !important } }

/* the red count on the Today menu item and on the closed menu button */
.nw-menu-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--act); color: #FFFFFF; font-size: .7rem; font-weight: 700; font-family: var(--f-mono); }
@media (max-width: 600px) {
  .nw-bi { grid-template-columns: 26px minmax(0, 1fr); gap: 0 10px; }
  .nw-bi-n { font-size: 1.8rem; }
  .nw-plan-brief { padding: 14px 12px 10px; }
}

/* the news engine's credit */
.nw-powered { margin: 6px 0 0; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .04em; color: var(--ink-3); }
.nw-powered a { color: var(--ink-3); text-decoration: none; border-bottom: 1px solid var(--ink-3); }

/* ================= Today: the EverythingRelevant mosaic =================
   Under the brief, the living mosaic from everythingrelevant.co.uk/embed/v1.js (it draws itself in its own shadow root,
   so none of the rules here reach inside it). The bar above it says what the feed is built from. */
.nw-fbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: 14px 0 0; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); }
.nw-fbar p { margin: 0; flex: 1 1 320px; line-height: 1.45; }
.nw-fbar .nw-src { color: var(--ink-3); font-size: .88rem; }
.nw-fbar-pick { border-color: transparent; background: var(--paper2, var(--surface-2)); }
.nw-banner-b { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 600px) { .nw-banner-b, .nw-banner-b .btn { width: 100%; } .nw-banner-b .btn { justify-content: center; } }
.nw-er { margin: 18px 0 0; }
.nw-er[hidden] { display: none; }
#nw-old .nw-more { margin-top: 22px; }
@media (max-width: 600px) {
  .nw-fbar { padding: 12px; }
  .nw-er { margin-left: -6px; margin-right: -6px; }
}
