/* Flickshot FC news (news.js): the Home headline strip and the News screen (the Flickshot Gazette).
   Uses the tokens from style.css (--gold-*, --font-display ...). */

/* ---------- Home: the headline strip, just above the Daily dock ---------- */
.nw-strip {
  position: relative; z-index: 3; flex: 0 0 auto; width: 100%; min-height: 56px; margin-top: auto; padding: 6px 10px 6px 6px;
  display: flex; align-items: center; gap: 10px; text-align: left; color: var(--text); font: inherit; letter-spacing: normal;
  border-radius: 16px; border: 1.5px solid rgba(255, 200, 61, 0.55);
  background: radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, 0.14), transparent 55%), linear-gradient(180deg, #243462 0%, #121b36 60%, #0b1124 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 0 #03050b, 0 10px 20px rgba(0, 0, 0, 0.55);
  animation: fadeUp 0.45s var(--ease-out) both;
}
.nw-strip:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 0 #03050b; }
.nw-strip.hot { border-color: var(--gold-300); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 0 #03050b, 0 0 0 3px rgba(255, 200, 61, 0.14), 0 0 18px rgba(255, 200, 61, 0.3); }
/* the strip takes the free space above it, so the dock (meta.js) and the mode cards sit right below */
.nw-strip + .mt-dock { margin-top: 0; padding-top: 12px; }
.nw-strip + .home-modes { margin-top: 0; padding-top: 12px; }
/* the red tabloid flag: the little paper and NEWS */
.nw-flag {
  position: relative; flex: 0 0 auto; width: 48px; height: 44px; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 4px;
  background: linear-gradient(180deg, #ff6464, #d92121 70%, #b51717); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 0 #6e0b0b;
}
.nw-flag svg { position: absolute; left: 50%; top: -9px; width: 34px; height: 34px; transform: translateX(-50%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45)); }
.nw-flag b { position: relative; font: 800 italic 12px/1 var(--font-display); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.nw-strip.hot .nw-flag svg { animation: nwWiggle 2.6s ease-in-out infinite; }
.nw-tick { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.nw-ti { display: flex; flex-direction: column; gap: 4px; min-width: 0; animation: nwTick 0.45s var(--ease-out) both; }
.nw-k, .nw-h { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-k { font: 800 10.5px/1 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-300); }
.nw-h { font: 800 16px/1.05 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.nw-badge {
  position: absolute; top: -8px; right: -6px; z-index: 2; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  font: 800 12px/1 var(--font-display); font-style: normal; color: #fff; background: #ef4444; box-shadow: 0 0 0 2px #0b1124, 0 0 10px rgba(239, 68, 68, 0.7);
  animation: nwPulse 1.6s ease-in-out infinite;
}
.nw-chev { flex: 0 0 auto; display: grid; place-items: center; color: var(--gold-300); }
.nw-chev svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the News screen ---------- */
.screen.news { background: radial-gradient(130% 55% at 50% 0%, #15214a 0%, var(--ink-900) 62%); }
.news .scroll { display: flex; flex-direction: column; gap: 10px; }
.news .scroll > * { flex-shrink: 0; }

/* the masthead: a strip of newsprint */
.nw-mast {
  position: relative; display: block; padding: 10px 14px 11px; border-radius: 16px; text-align: center; color: #1a1408;
  background: repeating-linear-gradient(0deg, rgba(90, 70, 30, 0.035) 0 2px, transparent 2px 5px), linear-gradient(180deg, #fff8e6, #f3e8cb);
  box-shadow: inset 0 1px 0 #fff, 0 5px 0 #7d6b45, 0 12px 26px rgba(0, 0, 0, 0.45);
  animation: fadeUp 0.4s var(--ease-out) both;
}
.nw-mast-row { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 2px solid #1a1408; font: 800 10.5px/1 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: #6b5a36; }
.nw-mast-row span { white-space: nowrap; }
.nw-mast-name { display: block; margin: 8px 0 7px; font: 800 italic 33px/0.95 var(--font-display); letter-spacing: 0; text-transform: uppercase; color: #141009; }
.nw-mast-name b { color: #d62828; }
.nw-mast-sub { display: block; padding-top: 6px; border-top: 1px solid rgba(26, 20, 8, 0.35); font: 600 12.5px/1.2 var(--font-ui); color: #6b5a36; }

/* filter chips */
.nw-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.nw-chips::-webkit-scrollbar { display: none; }
.nw-chip {
  flex: 0 0 auto; min-height: 36px; padding: 0 14px; border-radius: 999px; font: 800 13px/1 var(--font-display); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2); background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); box-shadow: none;
}
.nw-chip:active { transform: translateY(2px); box-shadow: none; }
.nw-chip.on { color: var(--gold-ink); background: linear-gradient(180deg, #ffe89a, #ffc83d 58%, #f0a800); border-color: transparent; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 3px 0 #9a6a00; }

.nw-list { display: flex; flex-direction: column; gap: 10px; }
.nw-list > * { flex-shrink: 0; }
.nw-day { display: flex; align-items: center; gap: 10px; margin: 6px 2px 0; font: 800 12px/1 var(--font-display); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.nw-day::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line-2); }

/* a story: category picture, then kicker, headline, body (and a result chip) */
.nw-story {
  --nc: var(--blue);
  position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px 12px 12px 10px; border-radius: 16px;
  background: linear-gradient(180deg, #172038, #111a30); border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 0 #070b16;
  animation: fadeUp 0.4s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms);
}
.nw-story.unread::before { content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--nc); box-shadow: 0 0 10px var(--nc); }
.nw-ic {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--nc) 42%, #0b1124), #0b1124 78%); border: 1px solid color-mix(in srgb, var(--nc) 55%, transparent);
}
.nw-ic img.nw-art { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.45)); }
.nw-paper-ic { display: grid; place-items: center; }
.nw-paper-ic svg { width: 38px; height: 38px; }
.nw-main { min-width: 0; }
.nw-meta { display: flex; align-items: center; gap: 6px; min-height: 18px; font: 800 10.5px/1 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; }
.nw-cat { color: var(--nc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nw-time { flex: 0 0 auto; color: var(--text-3); }
.nw-time::before { content: "·"; margin-right: 6px; }
.nw-new { flex: 0 0 auto; margin-left: auto; padding: 4px 7px; border-radius: 999px; font: 800 10px/1 var(--font-display); letter-spacing: 0.1em; color: #fff; background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.5); }
.nw-hl { margin-top: 5px; font: 800 19px/1.05 var(--font-display); letter-spacing: 0.01em; text-transform: uppercase; color: #fff; overflow-wrap: anywhere; }
.nw-body { margin-top: 5px; font: 500 13.5px/1.4 var(--font-ui); color: var(--text-2); }
.nw-res { display: inline-flex; align-items: center; margin-top: 9px; padding: 5px 9px; border-radius: 8px; font: 800 12.5px/1 var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.nw-res.r-w { color: var(--em-ink); background: linear-gradient(180deg, #5ff0b0, #17c483); }
.nw-res.r-l { color: #fff; background: linear-gradient(180deg, #f06262, #c93434); }
.nw-res.r-d { color: #fff; background: #3a4668; }

/* the lead story: bigger, its picture up in the corner */
.nw-story.lead {
  grid-template-columns: minmax(0, 1fr); padding: 14px 14px 15px;
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--nc) 34%, #172038), #131c34 62%);
  border-color: color-mix(in srgb, var(--nc) 45%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 5px 0 #070b16, 0 12px 24px rgba(0, 0, 0, 0.35);
}
.nw-story.lead .nw-ic { position: absolute; top: 12px; right: 12px; width: 68px; height: 68px; border-radius: 18px; }
.nw-story.lead .nw-ic img.nw-art { width: 60px; height: 60px; }
.nw-story.lead .nw-meta, .nw-story.lead .nw-hl { padding-right: 78px; }
.nw-story.lead .nw-new { margin-left: 2px; }
.nw-story.lead .nw-hl { min-height: 46px; font-size: 25px; line-height: 1; }
.nw-story.lead .nw-body { font-size: 14.5px; color: #d3dbee; }

/* category colours */
.c-result { --nc: #34d399; }
.c-world { --nc: #4fa3ff; }
.c-league { --nc: #a78bfa; }
.c-cup { --nc: #ffc83d; }
.c-squad { --nc: #38bdf8; }
.c-club { --nc: #fb923c; }
.c-town { --nc: #f472b6; }
.c-milestone { --nc: #ffe08a; }

.nw-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 20px; text-align: center; color: var(--text-2); font-size: 13.5px; }
.nw-empty svg { width: 64px; height: 64px; margin-bottom: 4px; opacity: 0.9; }
.nw-empty b { font: 800 18px/1 var(--font-display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }

@keyframes nwTick { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes nwPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes nwWiggle { 0%, 82%, 100% { transform: translateX(-50%) rotate(0); } 86% { transform: translateX(-50%) rotate(-8deg); } 91% { transform: translateX(-50%) rotate(7deg); } 96% { transform: translateX(-50%) rotate(-3deg); } }

@media (max-height: 740px) {
  .nw-strip { min-height: 50px; padding-top: 4px; padding-bottom: 4px; }
  .nw-flag { height: 40px; }
  .nw-strip + .mt-dock { padding-top: 10px; }
}
@media (max-width: 360px) {
  .nw-mast-name { font-size: 28px; }
  .nw-mast-row { font-size: 9.5px; letter-spacing: 0.08em; }
}
@media (prefers-reduced-motion: reduce) {
  .nw-ti, .nw-badge, .nw-strip.hot .nw-flag svg, .nw-story, .nw-mast { animation: none; }
}
