/* newsdesk.css - 4news.news's own pieces (prefix nn-). Reads the engine's tokens (--accent, --radius, --shadow-1)
 * with fallbacks, and the theme's light/dark/hybrid modes through currentColor and translucent fills. */
:root {
  --nn-red: #c4122f;
  --nn-amber: #a35d00;
  --nn-line: rgba(127, 127, 127, .25);
  --nn-soft: rgba(127, 127, 127, .08);
  --nn-muted: rgba(100, 110, 125, 1);
}
.nn-main { max-width: 1240px; margin: 0 auto; padding: 8px 16px 40px; }

/* breaking bar */
.nn-breaking-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; background: var(--nn-red); color: #fff !important;
  text-decoration: none; padding: 10px 16px; border-radius: var(--radius, 8px); margin: 12px 0; font-size: 15px; }
.nn-breaking-bar.nn-sticky { border-radius: 0; margin: 0; }
.nn-breaking-bar:hover .nn-btitle { text-decoration: underline; }
.nn-blabel { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; background: #fff; color: var(--nn-red); padding: 2px 7px; border-radius: 4px; }
.nn-bmeta { opacity: .9; font-size: 13px; }
.nn-btitle { font-weight: 700; flex: 1 1 320px; min-width: 0; }
.nn-bmore { font-size: 13px; opacity: .9; }

/* chips */
.nn-chip { display: inline-block; font-size: 11.5px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 4px; letter-spacing: .03em;
  white-space: nowrap; text-decoration: none; }
.nn-breaking { background: var(--nn-red); color: #fff; text-transform: uppercase; }
.nn-developing { background: rgba(163, 93, 0, .14); color: var(--nn-amber); text-transform: uppercase; }
.nn-top { background: rgba(31, 79, 138, .12); color: #1f4f8a; }
.nn-outlets { background: var(--nn-soft); color: inherit; border: 1px solid var(--nn-line); }
a.nn-outlets:hover { border-color: currentColor; }

/* section bar and heads */
.nn-secbar { display: flex; gap: 4px; overflow-x: auto; padding: 8px 0 6px; border-bottom: 1px solid var(--nn-line); margin-bottom: 14px; scrollbar-width: thin; }
.nn-sec { flex: 0 0 auto; padding: 7px 11px; border-radius: 6px; font-weight: 600; font-size: 14px; text-decoration: none; color: inherit; }
.nn-sec:hover, .nn-sec.is-on { background: var(--nn-soft); }
.nn-sec.is-on { box-shadow: inset 0 -2px 0 var(--nn-red); }
.nn-head { margin: 6px 0 16px; }
.nn-head h1 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; margin: 2px 0 6px; text-wrap: balance; }
.nn-kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--nn-red); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nn-lede { max-width: 75ch; color: var(--nn-muted); margin: 0; }
.nn-note { font-size: 13px; color: var(--nn-muted); border-left: 3px solid var(--nn-amber); padding: 4px 10px; margin: 8px 0; }
.nn-empty, .nn-quiet { color: var(--nn-muted); }
.nn-h2 { font-size: 20px; font-weight: 800; margin: 26px 0 10px; }

/* the Live river */
.nn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.nn-filter { font-size: 13px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--nn-line); border-radius: 999px; text-decoration: none; color: inherit; }
.nn-filter[style] { border-left: 4px solid var(--desk); }
.nn-filter.is-on { background: var(--nn-soft); border-color: currentColor; }
.nn-livebar { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 6px 0 12px; font-size: 14px; }
.nn-inline { display: inline-flex; gap: 6px; align-items: center; }
.nn-inline select { max-width: 100%; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--nn-line); background: transparent; color: inherit; }
.nn-livehead, .nn-gh { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; font-size: 13px; color: var(--nn-muted); }
.nn-gh .nn-gt { font-size: 19px; font-weight: 800; margin: 0; color: var(--bs-body-color, inherit); }
.nn-gh .nn-sub { font-size: 13px; }
.nn-gh .nn-more { margin-left: auto; }
.nn-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--nn-red); box-shadow: 0 0 0 0 rgba(196, 18, 47, .6); animation: nn-pulse 2s infinite; }
@keyframes nn-pulse { 70% { box-shadow: 0 0 0 8px rgba(196, 18, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(196, 18, 47, 0); } }
.nn-newbtn { font: 600 13px/1 inherit; padding: 7px 12px; border-radius: 999px; border: 0; background: var(--nn-red); color: #fff; cursor: pointer; }
.nn-river { list-style: none; margin: 0; padding: 0; }
.nn-row { display: grid; grid-template-columns: 66px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--nn-line); }
.nn-row.nn-fresh { animation: nn-fresh 2.5s ease-out; }
@keyframes nn-fresh { from { background: rgba(196, 18, 47, .10); } to { background: transparent; } }
.nn-time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--nn-muted); padding-top: 2px; }
.nn-rowbody { min-width: 0; }
.nn-rowtitle { font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.nn-rowtitle a, .nn-rowtitle .fs-stl-link { color: inherit; text-decoration: none; cursor: pointer; }
.nn-rowtitle a:hover, .nn-rowtitle .fs-stl-link:hover { text-decoration: underline; }
.nn-rowmeta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 4px; font-size: 12.5px; color: var(--nn-muted); }
.nn-desk { border-left: 3px solid var(--desk, #546e7a); padding-left: 6px; }
.nn-place { color: inherit; }
.nn-mini .nn-row { grid-template-columns: 54px 1fr; padding: 8px 0; }
.nn-mini .nn-rowtitle { font-size: 14px; }

/* the home page */
.nn-home { margin: 4px 0 18px; }
.nn-topnow { margin: 8px 0 18px; }
.nn-cardwrap { display: flex; flex-direction: column; min-width: 0; }
.nn-cardwrap > *:first-child { flex: 1 1 auto; }
.nn-cardwrap.nn-lead { grid-column: span 2; grid-row: span 2; }
@media (max-width: 760px) { .nn-cardwrap.nn-lead { grid-column: auto; grid-row: auto; } }
.nn-storyline { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; padding: 6px 2px 2px; color: var(--nn-muted); }
.nn-how { margin-left: auto; font-weight: 600; text-decoration: none; }
.nn-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; margin: 8px 0 6px; align-items: start; }
@media (min-width: 1100px) {
  .nn-boxes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nn-boxes .nn-mapbox { grid-column: span 2; grid-row: span 2; }
}
.nn-box { border: 1px solid var(--nn-line); border-radius: var(--radius, 10px); padding: 14px 16px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.nn-bh { font-size: 16px; font-weight: 800; margin: 0; }
.nn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.nn-list li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.nn-list li > a { flex: 1 1 140px; min-width: 0; }
.nn-wash li { display: block; line-height: 1.35; }
.nn-wash li > a { display: block; font-weight: 600; }
.nn-wash .nn-tag { margin-right: 6px; }
.nn-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; align-self: center; }
.nn-n, .nn-res { font-variant-numeric: tabular-nums; color: var(--nn-muted); font-size: 12.5px; }
.nn-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--nn-muted); }
.nn-more { font-size: 13px; font-weight: 600; text-decoration: none; margin-top: auto; }
.nn-side { border: 1px solid var(--nn-line); border-radius: var(--radius, 10px); padding: 10px 14px; position: sticky; top: 8px; max-height: calc(100vh - 16px); overflow: auto; }
.nn-below { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.nn-tilelink { padding: 8px 12px; border: 1px solid var(--nn-line); border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 14px; color: inherit; }

/* the state tile map */
.nn-tilemap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; }
.nn-tile { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 4px; text-decoration: none;
  font-size: 10px; line-height: 1.1; color: inherit; background: var(--nn-soft); min-width: 0; }
.nn-tile b { font-size: 11px; }
.nn-tile span { opacity: .75; font-variant-numeric: tabular-nums; }
.nn-t1 { background: rgba(196, 18, 47, .14); }
.nn-t2 { background: rgba(196, 18, 47, .30); }
.nn-t3 { background: rgba(196, 18, 47, .55); color: #fff; }
.nn-t4 { background: rgba(196, 18, 47, .85); color: #fff; }
.nn-tile:hover { outline: 2px solid currentColor; }

/* story card above results, place card on topic pages */
.nn-storycard { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; border: 1px solid var(--nn-line); border-left: 4px solid var(--nn-red);
  border-radius: var(--radius, 8px); padding: 10px 14px; margin: 8px 0 12px; }
.nn-sct { font-weight: 700; text-decoration: none; flex: 1 1 300px; min-width: 0; }
.nn-scm { font-size: 13px; color: var(--nn-muted); width: 100%; }

/* story page */
.nn-curve { display: flex; align-items: flex-end; gap: 3px; height: 90px; border-bottom: 1px solid var(--nn-line); padding-top: 6px; overflow-x: auto; }
.nn-bar { flex: 0 0 14px; background: var(--nn-red); border-radius: 2px 2px 0 0; position: relative; }
.nn-curve-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--nn-muted); margin-top: 4px; }
.nn-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 12px 0; }
.nn-stat { border: 1px solid var(--nn-line); border-radius: 8px; padding: 10px 12px; }
.nn-stat b { display: block; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.nn-stat span { font-size: 12.5px; color: var(--nn-muted); }
.nn-timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--nn-line); }
.nn-timeline li { position: relative; padding: 6px 0 10px 12px; }
.nn-timeline li::before { content: ""; position: absolute; left: -20px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--nn-red); }
.nn-timeline .nn-time { display: block; }
.nn-two { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 22px; }
@media (max-width: 900px) { .nn-two { grid-template-columns: 1fr; } }
.nn-bars { display: grid; gap: 6px; font-size: 13px; }
.nn-barrow { display: grid; grid-template-columns: 120px 1fr 44px; gap: 8px; align-items: center; }
.nn-barrow i { display: block; height: 10px; border-radius: 3px; background: currentColor; opacity: .55; }
.nn-answer { border: 1px solid var(--nn-line); border-radius: 10px; padding: 14px 16px; margin: 10px 0; }

/* local pages */
.nn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.nn-placecard { display: block; padding: 10px 12px; border: 1px solid var(--nn-line); border-radius: 8px; text-decoration: none; color: inherit; }
.nn-placecard b { display: block; }
.nn-placecard span { font-size: 12.5px; color: var(--nn-muted); }
.nn-region { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin: 18px 0 8px; color: var(--nn-muted); }
.nn-alert { border-left: 4px solid var(--c, #c62828); padding: 6px 10px; margin: 6px 0; background: var(--nn-soft); border-radius: 0 6px 6px 0; font-size: 14px; }

/* the News Map */
.nn-mapwrap { position: relative; height: min(72vh, 760px); min-height: 420px; border: 1px solid var(--nn-line); border-radius: 10px; overflow: hidden; }
.nn-mapwrap .nn-map { position: absolute; inset: 0; width: 100%; height: 100%; }
.nn-mapbar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 0 0 10px; font-size: 14px; }
.nn-mapbar .nn-seg { display: inline-flex; border: 1px solid var(--nn-line); border-radius: 8px; overflow: hidden; }
.nn-mapbar .nn-seg button { border: 0; background: transparent; color: inherit; padding: 6px 10px; font: 600 13px/1 inherit; cursor: pointer; }
.nn-mapbar .nn-seg button[aria-pressed="true"] { background: var(--nn-red); color: #fff; }
.nn-layers { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.nn-layers label { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; }
.nn-panel { position: absolute; top: 10px; right: 10px; width: min(380px, calc(100% - 20px)); max-height: calc(100% - 20px); overflow: auto; background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #111); border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); padding: 12px 14px; font-size: 14px; z-index: 3; }
.nn-panel h3 { font-size: 16px; font-weight: 800; margin: 0 0 6px; }
.nn-panel .nn-close { position: absolute; top: 6px; right: 8px; border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; }
.nn-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; margin-top: 8px; }
.nn-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin-right: 5px; }
.nn-crime { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 13px; }

/* feeds and widgets */
.nn-code { width: 100%; font: 13px/1.5 ui-monospace, Consolas, monospace; padding: 8px 10px; border: 1px solid var(--nn-line); border-radius: 8px; background: var(--nn-soft); color: inherit; }
.nn-btn { display: inline-block; font: 600 14px/1 inherit; padding: 9px 13px; border-radius: 8px; border: 1px solid var(--nn-red); background: var(--nn-red); color: #fff; cursor: pointer; text-decoration: none; }
.nn-btn.ghost { background: transparent; color: inherit; border-color: var(--nn-line); }
.nn-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nn-table th, .nn-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--nn-line); vertical-align: top; }
.nn-tablewrap { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) { .nn-pulse, .nn-row.nn-fresh { animation: none; } }

/* Cards inside a page's main column (story, local): fewer, wider columns than the full-width front page. */
.nn-two .fp-grid { --fp-cols: 3; }
@media (max-width: 1400px) { .nn-two .fp-grid { --fp-cols: 2; } }
@media (max-width: 640px) { .nn-two .fp-grid { --fp-cols: 1; } }
.nn-two .nn-cardwrap.nn-lead { grid-row: auto; }
