/* ============================================================================
   Daily AI news — editorial feed UI
   Soft atmospheric page + light story cards (no dark article panels).
   Content is untouched; this file is presentation only.
   ========================================================================== */

.ai-news-page {
  --news-ink: #0b1220;
  --news-muted: #5c6b82;
  --news-soft: #8a97ab;
  --news-accent: #0d6ef5;
  --news-warm: #ff8a3d;
  --news-warm-soft: #ffb07a;
  --news-surface: rgba(255, 255, 255, 0.72);
  --news-card: #ffffff;
  --news-card-border: rgba(15, 30, 60, 0.08);
  --news-line: rgba(15, 30, 60, 0.08);
  --news-shadow: 0 18px 48px rgba(28, 48, 86, 0.08);
  --news-radius: 28px;
  --news-radius-sm: 16px;

  position: relative;
  min-height: 100vh;
  color: var(--news-ink);
  background:
    radial-gradient(1200px 620px at 8% -8%, rgba(61, 140, 255, 0.18), transparent 58%),
    radial-gradient(980px 560px at 96% 4%, rgba(255, 138, 61, 0.14), transparent 52%),
    radial-gradient(900px 520px at 50% 110%, rgba(120, 92, 255, 0.08), transparent 55%),
    linear-gradient(180deg, #f7f9fd 0%, #eef3fb 46%, #f8fafc 100%);
  overflow-x: hidden;
}

/* Soft mesh + grain over the page (pure CSS, no content change) */
.ai-news-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.55), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.35), transparent 24%),
    linear-gradient(rgba(15, 30, 60, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 30, 60, 0.025) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 20%, transparent 80%);
}

.ai-news-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.ai-news-page #ambient-bg {
  z-index: 0;
  opacity: 0.55;
}

.ai-news-page .header,
.ai-news-page .news-shell {
  position: relative;
  z-index: 1;
}

.news-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 22px 110px;
}

/* ---------- hero ---------- */
.news-hero {
  position: relative;
  margin-bottom: 32px;
  padding: 28px 28px 26px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--news-radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.55));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 24px 60px rgba(28, 48, 86, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
}

.news-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -8%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 110, 245, 0.16), transparent 68%);
  pointer-events: none;
}

.news-hero::after {
  content: "";
  position: absolute;
  bottom: -50%;
  left: 8%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.14), transparent 70%);
  pointer-events: none;
}

.news-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 138, 61, 0.12);
  color: #c45a0a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.news-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5a2b;
  box-shadow: 0 0 0 0 rgba(255, 90, 43, 0.45);
  animation: news-live-pulse 1.6s ease-out infinite;
}

.news-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  color: var(--news-ink);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 830;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.news-lede {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 62ch;
  color: var(--news-muted);
  font-size: 15.5px;
  line-height: 1.7;
}

.news-lede a {
  color: var(--news-accent);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(13, 110, 245, 0.28);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.news-lede a:hover,
.news-lede a:focus-visible {
  border-bottom-color: rgba(13, 110, 245, 0.75);
}

.news-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.news-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 30, 60, 0.08);
  background: rgba(255, 255, 255, 0.7);
  color: var(--news-soft);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-meta strong {
  color: var(--news-ink);
  font-size: 14px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* Subscribe and back sit together on the right of the meta row; the group
   carries the auto margin so the two never fight over it. */
.news-hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* Warm, not blue: the newsletter is the one thing on this page asking for
   something, so it should not read as another navigation link. */
.news-subscribe {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 138, 61, 0.42);
  background: linear-gradient(135deg, var(--news-warm), var(--news-warm-soft));
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(255, 138, 61, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.news-subscribe:hover,
.news-subscribe:focus-visible {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 14px 30px rgba(255, 138, 61, 0.36);
  text-decoration: none;
  outline: none;
}

.news-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(13, 110, 245, 0.18);
  background: rgba(13, 110, 245, 0.08);
  color: var(--news-accent);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.news-back:hover,
.news-back:focus-visible {
  background: rgba(13, 110, 245, 0.14);
  border-color: rgba(13, 110, 245, 0.32);
  transform: translateY(-1px);
  text-decoration: none;
  outline: none;
}

/* ---------- feed: light article cards ---------- */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.news-day {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.news-day::before {
  display: none;
}

.news-day-head {
  position: sticky;
  top: 84px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 10px 4px;
  border: 0;
  color: var(--news-ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(
    180deg,
    rgba(247, 249, 253, 0.96) 0%,
    rgba(247, 249, 253, 0.88) 70%,
    rgba(247, 249, 253, 0) 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.news-day-count {
  flex: none;
  min-width: 2em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(13, 110, 245, 0.14);
  background: rgba(13, 110, 245, 0.08);
  color: var(--news-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-transform: none;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-card {
  display: grid;
  grid-template-columns: minmax(168px, 210px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
  margin: 0;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--news-card-border);
  background: var(--news-card);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 36px rgba(28, 48, 86, 0.06);
  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.news-card + .news-card {
  margin-top: 0;
}

.news-card:hover,
.news-card:focus-within {
  border-color: rgba(13, 110, 245, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 18px 44px rgba(28, 48, 86, 0.1);
  transform: translateY(-2px);
  background: #fff;
}

.news-card-media {
  position: relative;
  align-self: start;
  width: 100%;
  min-width: 0;
  min-height: 128px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(15, 30, 60, 0.06);
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 20%, rgba(13, 110, 245, 0.12), transparent 55%),
    linear-gradient(145deg, #f3f6fb, #e8eef8);
  box-shadow: none;
}

.news-card-media.is-fallback {
  border-color: rgba(13, 110, 245, 0.12);
}

.news-card-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(13, 30, 60, 0.22);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.news-card-image {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #e8eef8;
  transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.news-card-image[hidden] {
  display: none;
}

.news-card:hover .news-card-image {
  transform: scale(1.04);
}

.news-card-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 4px 6px 4px 0;
}

.news-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.news-time {
  color: #c45a0a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.news-source {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 30, 60, 0.08);
  background: rgba(15, 30, 60, 0.04);
  color: var(--news-muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-title {
  margin: 0;
  color: var(--news-ink);
  font-size: clamp(17px, 2.1vw, 20px);
  font-weight: 780;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.news-summary {
  margin: 10px 0 0;
  max-width: 70ch;
  color: var(--news-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin-top: auto;
  padding: 10px 0 2px;
  color: var(--news-accent);
  font-size: 13.5px;
  font-weight: 720;
  text-decoration: none;
  transition: color 0.15s ease, gap 0.15s ease;
}

.news-link::after {
  content: "↗";
  transition: transform 0.15s ease;
}

.news-link:hover,
.news-link:focus-visible {
  color: #0a5ad1;
  gap: 10px;
  text-decoration: none;
  outline: none;
}

.news-link:hover::after,
.news-link:focus-visible::after {
  transform: translate(2px, -2px);
}

/* ---------- empty state ---------- */
/* ---------- closing newsletter band ---------- */
.news-signup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding: 30px 34px;
  border: 1px solid rgba(255, 138, 61, 0.22);
  border-radius: var(--news-radius);
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 138, 61, 0.14), transparent 46%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 246, 240, 0.82));
  box-shadow: var(--news-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.news-signup-copy {
  min-width: 0;
}

.news-signup-kicker {
  margin: 0 0 8px;
  color: var(--news-warm);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.news-signup h2 {
  margin: 0 0 8px;
  color: var(--news-ink);
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 820;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.news-signup p {
  margin: 0;
  max-width: 54ch;
  color: var(--news-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.news-signup-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 138, 61, 0.42);
  background: linear-gradient(135deg, var(--news-warm), var(--news-warm-soft));
  color: #ffffff;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(255, 138, 61, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.news-signup-btn:hover,
.news-signup-btn:focus-visible {
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 16px 34px rgba(255, 138, 61, 0.38);
  text-decoration: none;
  outline: none;
}

.news-empty {
  padding: 48px 32px 50px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--news-radius);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.68));
  box-shadow: 0 24px 60px rgba(28, 48, 76, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
}

.news-empty h2 {
  margin: 0 0 10px;
  color: var(--news-ink);
  font-size: 24px;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.news-empty p {
  margin: 0 auto 18px;
  max-width: 56ch;
  color: var(--news-muted);
  font-size: 15px;
  line-height: 1.7;
}

.news-empty .news-back {
  margin-left: 0;
}

@keyframes news-live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 90, 43, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 90, 43, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 90, 43, 0);
  }
}

@media (max-width: 760px) {
  .news-shell {
    padding: 28px 14px 72px;
  }

  .news-hero {
    padding: 22px 18px 20px;
    border-radius: 22px;
  }

  .news-meta > span {
    width: 100%;
  }

  .news-hero-actions {
    width: 100%;
    margin-left: 0;
  }

  .news-subscribe,
  .news-back {
    width: 100%;
    justify-content: center;
  }

  .news-signup {
    margin-top: 32px;
    padding: 24px 20px;
    border-radius: 22px;
  }

  .news-signup-btn {
    width: 100%;
    justify-content: center;
  }

  .news-feed {
    gap: 28px;
  }

  .news-day-head {
    top: 68px;
    padding: 8px 2px;
    font-size: 12px;
  }

  .news-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
  }

  .news-card-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .news-card-content {
    padding: 2px 4px 6px;
  }

  .news-title {
    font-size: 17px;
  }

  .news-summary {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-kicker::before,
  .news-card,
  .news-card-image,
  .news-link,
  .news-back,
  .news-subscribe,
  .news-signup-btn {
    animation: none !important;
    transition: none !important;
  }
}
