/* ============================================================
   News page layer — dateline rows on top of playground.css
   (page-specific layout only; system styles live in playground.css)
   ============================================================ */

/* .card--orange comes from the shared system */

/* full-width dated rows, newest first */
.dateline-list { display: grid; gap: var(--gap); }

.dateline-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(24px, 5vw, 72px);
}

.dateline-year {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 6.5vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.dateline-copy .card-tag { margin-bottom: 14px; }
.dateline-copy p { max-width: 62ch; }
/* AR mode: the copy is English-only — tag, title, and paragraph share one edge */
html[dir="rtl"] .dateline-copy { direction: ltr; }

/* the "next entry" placeholder card */
.dateline-next {
  display: flex;
  justify-content: center;
  padding: clamp(20px, 3vw, 34px);
}

@media (max-width: 767px) {
  .dateline-row { grid-template-columns: 1fr; row-gap: 12px; }
}

/* ---- today in AI: digest picked by the AI news editor ---- */
.digest-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--gap); align-items: start;
}
.digest-card { display: flex; flex-direction: column; align-items: flex-start; }
.digest-card .digest-why {
  font-weight: 600; font-size: 0.88rem;
  padding-top: 10px; margin-top: auto;
  border-top: 1px solid var(--line);
}
.digest-card .pill { margin-top: 14px; }
.digest-updated { font-size: 0.78rem; color: var(--ink-dim); margin-top: 14px; }
@media (max-width: 1099px) { .digest-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 699px) { .digest-grid { grid-template-columns: 1fr; } }

/* ---- top-3 poster cards (digest leads the page) ---- */
.digest-card { padding: 0; overflow: hidden; align-items: stretch; }
.digest-poster { position: relative; border-bottom: 1px solid var(--line); }
.digest-poster img { width: 100%; height: auto; display: block; }
.digest-rank {
  position: absolute; top: 14px; inset-inline-start: 14px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  background: #17131f; color: #fff;
  border-radius: var(--pill); padding: 7px 15px;
  box-shadow: 0 6px 18px rgba(23, 19, 31, 0.3);
}
.digest-card .digest-body { display: flex; flex-direction: column; align-items: flex-start; padding: var(--pad); }
.digest-card .card-tag { margin-bottom: 16px; }
.digest-card h3 { font-size: clamp(1.2rem, 1.7vw, 1.5rem); }

/* ---- editorial top-3: ticker + lead + side stack ---- */
.news-ticker {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--line); border-radius: var(--pill);
  padding: 8px 10px; margin-bottom: var(--gap);
  background: var(--glass);
}
.ticker-label {
  flex-shrink: 0;
  background: linear-gradient(135deg, #ff6b00, #ffb21e); color: #1a1005;
  font-weight: 700; font-size: 0.78rem;
  border-radius: var(--pill); padding: 7px 16px;
}
.ticker-clip {
  flex: 1; overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker-slide 40s linear infinite; }
.news-ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-seq { flex-shrink: 0; white-space: pre; font-weight: 650; font-size: 0.85rem; color: var(--ink); }
@keyframes ticker-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
html.motion-off .ticker-track { animation: none; }

.news-split {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(20px, 3vw, 40px); align-items: start;
}
.news-lead-media { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.news-lead-media img { width: 100%; height: auto; display: block; }
.news-chip {
  position: absolute; bottom: 14px; inset-inline-start: 14px;
  background: rgba(23, 19, 31, 0.88); color: #fff;
  font-weight: 650; font-size: 0.75rem;
  border-radius: var(--pill); padding: 7px 15px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.news-lead-title { margin-top: 18px; font-size: clamp(1.5rem, 2.6vw, 2.3rem); max-width: 22ch; }
.news-lead-sum { margin-top: 12px; font-size: 1rem; line-height: 1.7; color: var(--muted); max-width: 62ch; }
.news-lead .digest-why { border-top: 0; padding-top: 0; margin-top: 12px; }
.news-lead .pill { display: inline-block; margin-top: 16px; }

.news-side { display: flex; flex-direction: column; gap: clamp(16px, 2vw, 26px); }
.news-side-item {
  display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 14px;
  align-items: start;
  padding: 12px; border-radius: var(--radius-sm);
  background: var(--glass); border: 1px solid var(--line);
  transition: border-color var(--dur-ui) var(--ease-fluid), transform var(--dur-tap) var(--ease-fluid);
}
.news-side-item:hover { border-color: rgba(255, 107, 0, 0.5); transform: translateY(-2px); }
.news-side-thumb { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.news-side-thumb img { width: 100%; height: auto; display: block; }
.news-side-body h4 { font-family: var(--font-display); font-size: 1.02rem; line-height: 1.3; }
.news-side-body p {
  margin-top: 6px; font-size: 0.86rem; color: var(--muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-side-src { display: inline-block; margin-top: 8px; font-size: 0.78rem; font-weight: 650; color: var(--orange); text-decoration: none; }
.news-side-src:hover { text-decoration: underline; }

@media (max-width: 899px) {
  .news-split { grid-template-columns: 1fr; }
  .news-side-item { grid-template-columns: 110px minmax(0, 1fr); }
}

/* real article images crop to a steady frame; credit sits beneath */
.news-lead-media img, .news-side-thumb img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; height: auto; }
.news-credit { display: block; margin-top: 8px; font-size: 0.72rem; font-weight: 550; color: var(--muted); }
.news-side-body .news-credit { margin-top: 4px; }

/* ---- live badge + designed empty state for the digest ---- */
.news-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.72rem; letter-spacing: 0.18em;
  color: var(--red); text-transform: uppercase;
}
.news-live-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 12px rgba(255, 85, 68, 0.8);
}
html.motion-on .news-live-dot { animation: news-blink 1.4s ease-in-out infinite; }
@keyframes news-blink { 50% { opacity: 0.35; } }
.news-empty {
  display: grid; justify-items: center; gap: 10px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--glass);
  padding: clamp(34px, 6vw, 60px) 20px;
}
.news-empty h3 { font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.news-empty p { color: var(--muted); max-width: 52ch; line-height: 1.65; }
