/* ============================================================
   news.css — The Brief (Daily News Briefing tool)
   Dark, editorial, image-led. Per-topic accent colours.
   ============================================================ */

.nw [hidden], .nw-ticker[hidden], .nw-state[hidden], .nw-section[hidden] { display: none !important; }

.nw-body {
  background: #060608;
  color: #ececf1;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.nw {
  --red: #4D4D55;
  --ai: #3b82f6;      /* electric blue */
  --fashion: #ff3d8b; /* magenta */
  --markets: #27d07f; /* green */
  --breaking: #4D4D55;/* red */
  --ink: #ececf1;
  --muted: #8a8a98;
  --card: #0e0e13;
  --line: rgba(255,255,255,.08);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) 120px;
}

/* ---------- Hero ---------- */
.nw-hero { padding: clamp(96px, 14vh, 150px) 0 28px; text-align: center; }
.nw-eyebrow {
  font-family: 'Space Mono', monospace;
  text-transform: uppercase; letter-spacing: .32em;
  font-size: .72rem; color: var(--red); margin: 0 0 18px;
}
.nw-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 15vw, 11rem);
  line-height: .86; letter-spacing: .01em; margin: 0;
  color: #fff;
}
.nw-title span {
  color: transparent;
  -webkit-text-stroke: 2px var(--red);
  text-stroke: 2px var(--red);
}
.nw-sub {
  max-width: 620px; margin: 22px auto 0;
  color: var(--muted); font-size: clamp(.95rem, 1.1vw, 1.08rem);
  line-height: 1.6;
}
.nw-status {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 26px; padding: 8px 8px 8px 16px;
  border: 1px solid var(--line); border-radius: 999px;
  font-family: 'Space Mono', monospace; font-size: .74rem;
  color: var(--muted); letter-spacing: .02em;
}
.nw-live {
  width: 8px; height: 8px; border-radius: 50%; background: var(--markets);
  box-shadow: 0 0 0 0 rgba(39,208,127,.6); animation: nwPulse 2.4s infinite;
}
@keyframes nwPulse { 0%{box-shadow:0 0 0 0 rgba(39,208,127,.5)} 70%{box-shadow:0 0 0 7px rgba(39,208,127,0)} 100%{box-shadow:0 0 0 0 rgba(39,208,127,0)} }
.nw-refresh {
  display: grid; place-items: center; width: 30px; height: 30px;
  border: none; border-radius: 50%; background: rgba(255,255,255,.06);
  color: var(--ink); cursor: pointer; transition: background .2s, transform .5s;
}
.nw-refresh:hover { background: rgba(255,255,255,.14); }
.nw-refresh svg { width: 15px; height: 15px; }
.nw-refresh.is-spin svg { animation: nwSpin .8s linear infinite; }
@keyframes nwSpin { to { transform: rotate(360deg); } }

/* ---------- Ticker ---------- */
.nw-ticker {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: linear-gradient(90deg, rgba(77, 77, 85,.08), transparent 40%);
  margin: 10px 0 44px;
}
.nw-ticker__tag {
  display: flex; align-items: center; gap: 8px;
  background: var(--red); color: #fff; font-weight: 700;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .14em;
  padding: 0 16px; white-space: nowrap;
}
.nw-ticker__tag::before { content:""; width:7px; height:7px; border-radius:50%; background:#fff; animation: nwPulse 1.6s infinite; }
.nw-ticker__viewport { overflow: hidden; flex: 1; position: relative; }
.nw-ticker__track {
  display: inline-flex; align-items: center; gap: 40px;
  padding: 12px 24px; white-space: nowrap;
  will-change: transform; animation: nwMarquee 60s linear infinite;
}
.nw-ticker:hover .nw-ticker__track { animation-play-state: paused; }
.nw-ticker__track a { color: #d6d6de; text-decoration: none; font-size: .86rem; transition: color .2s; }
.nw-ticker__track a:hover { color: #fff; }
.nw-ticker__track a::before { content:"›"; color: var(--red); margin-right: 10px; font-weight: 700; }
@keyframes nwMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- States ---------- */
.nw-state { display: grid; place-items: center; gap: 18px; padding: 80px 0; color: var(--muted); text-align: center; }
.nw-spinner { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--red); border-radius: 50%; animation: nwSpin .9s linear infinite; }

/* ---------- Section headers ---------- */
.nw-section { margin: 0 0 64px; scroll-margin-top: 90px; }
.nw-sechead { display: flex; align-items: baseline; gap: 16px; padding-bottom: 18px; margin-bottom: 26px; border-bottom: 1px solid var(--line); position: relative; }
.nw-sechead::after { content:""; position:absolute; left:0; bottom:-1px; width:72px; height:3px; background: var(--accent, var(--red)); }
.nw-sechead__kicker { font-family:'Space Mono', monospace; text-transform: uppercase; letter-spacing:.22em; font-size:.66rem; color: var(--accent, var(--red)); }
.nw-sechead__title { font-family:'DM Sans', system-ui, sans-serif; text-transform:none; font-weight:800; font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height:1.1; margin:0; color:#fff; letter-spacing:-0.015em; }
.nw-section[data-topic="breaking"] { --accent: var(--breaking); }
.nw-section[data-topic="ai"] { --accent: var(--ai); }
.nw-section[data-topic="fashion"] { --accent: var(--fashion); }
.nw-section[data-topic="markets"] { --accent: var(--markets); }

/* ---------- Card grid ---------- */
.nw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }

.nw-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  text-decoration: none; color: inherit;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s, box-shadow .3s;
}
.nw-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 18px 44px rgba(0,0,0,.5); }
.nw-card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #15151c; }
.nw-card__media img { width:100%; height:100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); display:block; }
.nw-card:hover .nw-card__media img { transform: scale(1.06); }
.nw-card__ph { width:100%; height:100%; display:grid; place-items:center; font-family:'Bebas Neue',sans-serif; font-size:2.4rem; color:#fff; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 36%, #101018), #0b0b11); }
.nw-card__badge {
  position:absolute; top:12px; left:12px; display:inline-flex; align-items:center; gap:6px;
  background: rgba(6,6,8,.78); backdrop-filter: blur(6px);
  border:1px solid var(--line); border-radius:999px; padding:5px 11px;
  font-size:.68rem; font-weight:600; letter-spacing:.02em; color:#fff;
}
.nw-card__badge::before { content:""; width:6px; height:6px; border-radius:50%; background: var(--accent); }
.nw-card__body { padding: 16px 16px 18px; display:flex; flex-direction:column; gap:10px; flex:1; }
.nw-card__title { font-family:'DM Sans',system-ui,sans-serif; text-transform: none; font-size: 1.08rem; font-weight: 600; line-height: 1.42; letter-spacing: -0.005em; color:#f4f4f7; margin:0; }
.nw-card__meta { margin-top:auto; display:flex; align-items:center; gap:10px; font-family:'Space Mono',monospace; font-size:.68rem; color: var(--muted); letter-spacing:.02em; }
.nw-card__meta .nw-time::before { content:"•"; margin-right:10px; color: color-mix(in srgb, var(--accent) 70%, var(--muted)); }

/* ---------- Feature layout (lead + list), used by every section ---------- */
.nw-feature { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; align-items: start; }
.nw-lead { position: sticky; top: 90px; }
.nw-lead .nw-card__media { aspect-ratio: 16/10; }
.nw-lead .nw-card__title { font-family:'DM Sans',sans-serif; text-transform: none; font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight:700; line-height:1.24; letter-spacing:-0.01em; }
.nw-feature__list { display:flex; flex-direction:column; gap:14px; }
.nw-mini { display:flex; gap:14px; align-items:center; background: var(--card); border:1px solid var(--line); border-radius:14px; padding:10px; text-decoration:none; color:inherit; transition: border-color .25s, transform .25s; }
.nw-mini:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--accent, var(--red)) 55%, transparent); }
.nw-mini__media { width:92px; height:68px; border-radius:9px; overflow:hidden; flex-shrink:0; background:#15151c; }
.nw-mini__media img { width:100%; height:100%; object-fit:cover; }
.nw-mini__ph { width:100%; height:100%; display:grid; place-items:center; font-family:'Bebas Neue',sans-serif; color:#fff; background:linear-gradient(135deg, color-mix(in srgb, var(--accent, var(--red)) 42%, #101018), #0b0b11); }
.nw-mini__body { display:flex; flex-direction:column; gap:7px; min-width:0; }
.nw-mini__title { font-family:'DM Sans',system-ui,sans-serif; text-transform: none; letter-spacing: normal; font-size:.95rem; font-weight:600; line-height:1.38; margin:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.nw-mini__meta { font-family:'Space Mono',monospace; font-size:.64rem; color:var(--muted); }

/* ---------- Footer ---------- */
.nw-foot { max-width: 680px; margin: 40px auto 0; text-align:center; color:#5f5f6c; font-size:.76rem; line-height:1.7; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nw-feature { grid-template-columns: 1fr; }
  .nw-lead { position: static; }
}
@media (max-width: 560px) {
  .nw-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .nw-card__title { font-size: .9rem; }
  .nw-card__body { padding: 12px; }
  .nw-mini__media { width: 76px; height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .nw-ticker__track { animation: none; }
  .nw-card, .nw-card__media img, .nw-mini { transition: none; }
}

/* ---------- Adapts to the screen ----------
   Phones: one column. Laptops: sections stacked, lead beside its list.
   Wide screens: a 2 x 2 grid of sections. Ultrawide (21:9) monitors:
   all four sections side by side with a compact header, so the whole
   briefing fits on one screen. */
.nw-board { display: block; }

@media (min-width: 1600px) {
  .nw { max-width: 1840px; }
  .nw-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 48px; align-items: start; }
  .nw-board .nw-section { margin: 0; }
  .nw-board .nw-feature { grid-template-columns: 1fr; }
  .nw-board .nw-lead { position: static; }
  .nw-board .nw-lead .nw-card__media { aspect-ratio: 16 / 8; }
}

@media (min-width: 2400px) {
  .nw { max-width: none; padding-left: clamp(32px, 2.4vw, 72px); padding-right: clamp(32px, 2.4vw, 72px); }
  /* Compact header: title and status on one line */
  .nw-hero {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 48px;
    padding: 104px 0 22px; text-align: left;
  }
  .nw-eyebrow { margin-bottom: 10px; }
  .nw-title { font-size: 7rem; }
  .nw-sub { margin: 0 0 6px; max-width: 760px; text-align: right; }
  .nw-status { margin: 0 0 6px; flex-shrink: 0; }
  .nw-hero__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
  .nw-ticker { margin: 6px 0 28px; }
  .nw-board { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .nw-sechead { margin-bottom: 18px; padding-bottom: 14px; }
  .nw-sechead__title { font-size: 2rem; }
  .nw-lead .nw-card__title { font-size: 1.35rem; }
  .nw-feature__list { gap: 10px; }
  .nw-mini__media { width: 84px; height: 62px; }
}

/* ---------- Light theme (white and Apple red) ---------- */
.nw-body { background: #FFFFFF; color: #1D1D1F; }
.nw { --red: #4D4D55; --breaking: #4D4D55; --ink: #1D1D1F; --muted: #6E6E73; --card: #FFFFFF; --line: rgba(0,0,0,.08); }
.nw-hero { background: radial-gradient(ellipse 60% 70% at 50% 0%, rgba(77, 77, 85,.10), rgba(77, 77, 85,0) 70%); }
.nw-title { color: #1D1D1F; }
.nw-sechead__title, .nw-card__title { color: #1D1D1F; }
.nw-ticker { background: linear-gradient(90deg, rgba(77, 77, 85,.06), #fff 40%); }
.nw-ticker__track a { color: #3A3A3C; }
.nw-ticker__track a:hover { color: #000; }
.nw-card, .nw-mini { box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.05); }
.nw-card:hover { box-shadow: 0 18px 40px rgba(0,0,0,.10); }
.nw-card__media, .nw-mini__media { background: #F2F2F7; }
.nw-refresh { background: rgba(0,0,0,.05); color: #1D1D1F; }
.nw-refresh:hover { background: rgba(0,0,0,.09); }
.nw-spinner { border-color: rgba(0,0,0,.1); border-top-color: var(--red); }
.nw-foot { color: #8E8E93; }
