/* Editorial layout for the public crypto-news page. Desktop uses a broad
   newsroom grid; mobile switches to a tighter reading feed with a single lead
   story and compact headline rows. */
body.public-news-page {
  /* Cosmetic alignment to the landing page's navy luxury theme — colours only,
     no layout change. Overrides the shared public-site tokens for this page. */
  --public-bg: #040b14;
  --public-panel: #0a1420;
  --public-panel-strong: #0c1826;
  --public-line: rgba(160, 190, 225, 0.1);
  --public-green: #23d18b;
  --public-green-bright: #2ee39a;
  --news-surface: rgba(9, 16, 26, 0.72);
  --news-surface-strong: #0b1622;
  --news-border: rgba(160, 190, 225, 0.1);
}

/* A restrained navy grid with a single quiet blue-gray pool — no green wash —
   matching the landing's grid-bg and section pools. */
body.public-news-page::before {
  background:
    linear-gradient(rgba(165, 205, 220, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(165, 205, 220, 0.02) 1px, transparent 1px),
    radial-gradient(ellipse 60% 42% at 50% 0%, rgba(70, 105, 125, 0.03), transparent 70%);
  background-size: 56px 56px, 56px 56px, auto;
}

@media (min-width: 901px) {
  body.public-news-page .nav-center {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    display: flex;
    align-items: center;
    gap: clamp(2px, 0.5vw, 8px);
    padding: 0;
    border: 0;
    background: transparent;
  }
}

body.public-news-page .nav-link {
  border-radius: 8px;
  color: #b8c5c0;
  font-size: clamp(0.76rem, 0.74vw, 0.86rem);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

body.public-news-page .nav-center .nav-link {
  padding: 8px 11px;
}

body.public-news-page .nav-link:hover,
body.public-news-page .nav-link.is-active {
  color: var(--public-text);
  background: rgba(35, 209, 139, 0.1);
}

.news-page {
  padding-top: clamp(118px, 13svh, 154px);
}

.news-shell {
  width: min(calc(100% - clamp(48px, 7vw, 112px)), 1240px);
}

.news-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 6vw, 84px);
  align-items: end;
  /* No divider here — the Market Pulse strip below already separates the
     header from the editorial content. */
  padding-bottom: clamp(30px, 4vw, 44px);
}

.news-header-copy {
  display: grid;
  gap: 16px;
  max-width: 780px;
}

/* Header eyebrow uses the shared .t-eyebrow label (matching About and the rest
   of the app) instead of the old green signal pill. justify-self keeps it
   compact and left-aligned inside the header grid. */
.news-kicker {
  justify-self: start;
}

.news-header h1 {
  margin: 0;
  white-space: nowrap;
}

.news-header-copy > p {
  max-width: 64ch;
  margin: 0;
}

.news-status-indicator {
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--public-green-bright);
  box-shadow: 0 0 0 5px rgba(35, 209, 139, 0.1);
}

.news-update-note {
  justify-self: end;
  margin: 0 0 4px;
  color: var(--public-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Live Market Pulse bridges the page introduction and editorial hierarchy.
   It is visually and behaviorally identical to the landing hero ticker (quiet
   feathered tape, muted mono pills — see body.landing-3d .news-strip in
   landing.css); this page owns only the in-flow placement around the news
   content. Values are kept as literals (not --depth-* tokens) because the news
   page is not landing-scoped, but they resolve to the same rendered look. */
.news-market-pulse {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  height: 52px;
  margin-top: clamp(24px, 3vw, 34px);
  border-top: 1px solid rgba(140, 165, 190, 0.045);
  background: rgba(3, 8, 14, 0.82);
}

.news-market-pulse .news-strip-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 clamp(18px, 2.6vw, 44px);
  color: rgba(210, 224, 234, 0.62);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.news-market-pulse .news-strip-label span {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(39, 200, 137, 0.08);
  color: rgba(120, 210, 172, 0.78);
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.news-market-pulse .news-strip-overflow {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  /* Feather the tape itself so items dissolve into the strip — no opaque
     gradient box beside the label (identical mask to the hero ticker). */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 clamp(26px, 4.5vw, 64px), #000 calc(100% - clamp(20px, 3.5vw, 52px)), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 clamp(26px, 4.5vw, 64px), #000 calc(100% - clamp(20px, 3.5vw, 52px)), transparent 100%);
}

.news-market-pulse .news-strip-overflow::before,
.news-market-pulse .news-strip-overflow::after {
  /* Superseded by the mask-image above. */
  display: none;
}

.news-market-pulse .news-strip-track {
  /* Wider item breathing room so the tape never reads crammed (hero value). */
  --ticker-gap: 38px;
  display: flex;
  align-items: center;
  gap: var(--ticker-gap);
  width: max-content;
  padding-left: 12px;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.news-market-pulse .news-strip-sequence {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--ticker-gap);
}

.news-market-pulse .news-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Quiet tape, not boxed pills: no border or panel fill — the track gap does
     the separating. */
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #dce8e5;
  white-space: nowrap;
}

.news-market-pulse .news-item.is-loading {
  border-style: dashed;
  opacity: 0.7;
}

.news-market-pulse .pulse-item {
  gap: 9px;
}

.news-market-pulse .pulse-logo {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  filter: saturate(0.72);
  opacity: 0.78;
}

.news-market-pulse .pulse-item strong {
  flex: 0 0 auto;
  color: rgba(232, 240, 248, 0.46);
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.news-market-pulse .pulse-price {
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.7rem;
  line-height: 1.2;
  color: rgba(232, 240, 248, 0.66);
  font-variant-numeric: tabular-nums;
}

.news-market-pulse .pulse-change {
  font-family: "IBM Plex Mono", "Fira Code", monospace;
  font-size: 0.7rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.news-market-pulse .pulse-up {
  color: rgba(39, 200, 137, 0.62);
}

.news-market-pulse .pulse-down {
  color: rgba(224, 130, 138, 0.6);
}

.news-market-pulse .pulse-flat {
  color: rgba(238, 244, 255, 0.6);
}

.news-market-pulse + .news-lead-layout {
  margin-top: clamp(24px, 3vw, 34px);
}

.news-lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.72fr);
  gap: clamp(20px, 2.6vw, 32px);
  margin-top: clamp(28px, 4vw, 44px);
}

.news-lead-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--news-border);
  border-radius: 8px;
  background: var(--news-surface);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.news-lead-card:hover {
  border-color: rgba(35, 209, 139, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.26);
}

.news-lead-media,
.news-card-media {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--news-surface-strong);
}

.news-lead-media::after,
.news-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.025);
}

.news-lead-media img,
.news-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms ease;
}

.news-lead-card:hover .news-lead-media img,
.news-card:hover .news-card-media img {
  transform: scale(1.025);
}

.news-media-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 190px;
  color: rgba(238, 245, 241, 0.3);
  background:
    linear-gradient(rgba(220, 232, 229, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 232, 229, 0.04) 1px, transparent 1px),
    #0b1622;
  background-size: 34px 34px;
}

.news-media-fallback span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.news-lead-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(26px, 3.2vw, 42px);
}

.news-story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.news-source {
}

.news-story-meta time {
  color: var(--public-muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.64rem;
}

.news-lead-content h2 {
  margin: 20px 0 0;
}

.news-lead-content > p {
  margin: 18px 0 0;
}

.news-read-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 26px;
}

.news-read-link svg {
  width: 18px;
  fill: none;
  stroke: var(--public-green-bright);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-latest-rail {
  display: grid;
  align-content: start;
  border-top: 1px solid var(--news-border);
}

.news-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 2px 14px;
  /* Converged to the landing eyebrow voice: cooler, lighter (was 800). */
  color: rgba(205, 220, 230, 0.6);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.news-section-heading span:last-child {
  color: rgba(35, 209, 139, 0.72);
}

.news-rail-story {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 19px 34px 19px 2px;
  border-top: 1px solid var(--news-border);
  transition:
    padding-left 180ms ease,
    background 180ms ease;
}

.news-rail-story:hover {
  padding-left: 10px;
  background: rgba(35, 209, 139, 0.04);
}

.news-rail-story h3 {
  margin: 0;
}

.news-rail-arrow {
  position: absolute;
  top: 50%;
  right: 6px;
  color: rgba(238, 245, 241, 0.34);
  font-size: 1rem;
  transform: translateY(-50%);
  transition: color 180ms ease;
}

.news-rail-story:hover .news-rail-arrow {
  color: var(--public-green-bright);
}

.news-feed-section {
  margin-top: clamp(68px, 8vw, 104px);
}

.news-feed-header {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--news-border);
}

.news-feed-eyebrow {
}

.news-feed-header h2 {
  margin: 7px 0 0;
}

.news-feed-header p {
  margin: 0;
}

.news-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 26px);
}

.news-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--news-border);
  border-radius: 8px;
  background: rgba(9, 16, 26, 0.72);
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

.news-card:hover {
  border-color: rgba(35, 209, 139, 0.35);
  transform: translateY(-2px);
}

.news-card > a {
  display: grid;
  height: 100%;
  grid-template-rows: auto 1fr;
}

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

.news-card-content {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 21px;
}

.news-card-content h3 {
  margin: 0;
}

.news-card-content p {
  margin: 0;
}

.news-empty-state {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 680px;
  margin: clamp(48px, 8vw, 90px) auto;
  padding: clamp(30px, 4vw, 46px);
  border: 1px solid var(--news-border);
  border-radius: 8px;
  background: var(--news-surface);
}

.news-empty-state h2 {
  margin: 8px 0 0;
}

.news-empty-state p {
  margin: 0;
  color: var(--public-copy);
  line-height: 1.65;
}

.news-source-note {
  max-width: 78ch;
  margin: clamp(38px, 6vw, 64px) auto 0;
  text-align: center;
}

@media (max-width: 1100px) {
  .news-lead-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-lead-card {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  }

  .news-latest-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-section-heading {
    grid-column: 1 / -1;
  }

  .news-rail-story:nth-of-type(even) {
    border-left: 1px solid var(--news-border);
    padding-left: 20px;
  }

  .news-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body.public-news-page {
    --news-surface: rgba(9, 16, 26, 0.82);
    --news-border: rgba(207, 224, 255, 0.11);
  }

  .news-page {
    padding-top: clamp(74px, 11svh, 96px);
    padding-bottom: 54px;
  }

  .news-shell {
    width: min(calc(100% - 32px), 540px);
  }

  .news-header,
  .news-lead-card,
  .news-latest-rail,
  .news-card-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-header {
    gap: 15px;
    align-items: start;
    padding-bottom: 22px;
  }

  .news-header-copy {
    gap: 12px;
  }

  .news-header h1 {
  }

  .news-header-copy > p {
    max-width: 35rem;
  }

  .news-update-note {
    width: min(100%, 300px);
    justify-self: start;
    margin-top: 2px;
    font-size: 0.64rem;
    line-height: 1.35;
  }

  .news-market-pulse {
    height: 52px;
    margin-top: 18px;
  }

  .news-market-pulse .news-strip-label {
    padding-inline: 16px;
  }

  .news-market-pulse + .news-lead-layout {
    margin-top: 22px;
  }

  .news-lead-layout {
    gap: 26px;
    margin-top: 22px;
  }

  .news-lead-card {
    position: relative;
    min-height: 0;
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(35, 209, 139, 0.055), transparent 46%),
      var(--news-surface);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  }

  .news-lead-content {
    order: -1;
    padding: 18px 18px 19px;
  }

  .news-lead-content::before {
    content: "Top Story";
    display: inline-flex;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 9px;
    border-radius: 999px;
    color: #040b14;
    background: var(--public-green-bright);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
  }

  .news-lead-media {
    aspect-ratio: 16 / 8.4;
    min-height: 0;
    border-top: 1px solid var(--news-border);
  }

  .news-story-meta {
    gap: 7px 10px;
  }

  .news-source {
  }

  .news-story-meta time {
    font-size: 0.6rem;
  }

  .news-lead-content h2 {
    margin-top: 13px;
  }

  .news-lead-content > p {
    display: -webkit-box;
    margin-top: 12px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .news-read-link {
    margin-top: 18px;
    padding-top: 0;
  }

  .news-latest-rail {
    gap: 0;
    border-top: 1px solid var(--news-border);
    border-bottom: 1px solid var(--news-border);
  }

  .news-section-heading {
    padding: 12px 0;
    font-size: 0.62rem;
  }

  .news-rail-story {
    min-height: 0;
    gap: 8px;
    padding: 16px 28px 16px 0;
  }

  .news-rail-story:hover {
    padding-left: 0;
    background: transparent;
  }

  .news-rail-story:nth-of-type(even) {
    border-left: 0;
    padding-left: 0;
  }

  .news-rail-story h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .news-rail-arrow {
    right: 0;
    color: rgba(238, 245, 241, 0.48);
  }

  .news-feed-section {
    margin-top: 38px;
  }

  .news-feed-header {
    display: block;
    margin-bottom: 6px;
    padding-bottom: 14px;
  }

  .news-feed-header h2 {
    margin-top: 6px;
  }

  .news-feed-header p {
    margin-top: 8px;
  }

  .news-card-grid {
    gap: 0;
  }

  .news-card {
    border: 0;
    border-bottom: 1px solid var(--news-border);
    border-radius: 0;
    background: transparent;
  }

  .news-card:hover {
    transform: none;
  }

  .news-card > a {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 14px;
    align-items: start;
    min-height: 112px;
    padding: 14px 0;
  }

  .news-card-media {
    width: 96px;
    aspect-ratio: 1;
    border: 1px solid var(--news-border);
    border-radius: 8px;
  }

  .news-card-media::after {
    border-radius: inherit;
  }

  .news-media-fallback {
    min-height: 0;
  }

  .news-media-fallback span {
    max-width: 78px;
    font-size: 0.54rem;
    line-height: 1.25;
    text-align: center;
  }

  .news-card-content {
    gap: 8px;
    padding: 1px 0 0;
  }

  .news-card-content h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .news-card-content p {
    display: none;
  }

  .news-source-note {
    margin-top: 30px;
    text-align: left;
  }

  .news-empty-state {
    margin: 32px 0 0;
    padding: 24px 20px;
  }
}

@media (max-width: 420px) {
  .news-shell {
    width: min(calc(100% - 28px), 540px);
  }

  .news-header h1 {
  }

  .news-market-pulse .news-strip-label {
    gap: 7px;
    padding-inline: 12px;
    font-size: 0.7rem;
  }

  .news-market-pulse .news-strip-label span {
    padding-inline: 7px;
  }

  .news-card > a {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    min-height: 98px;
  }

  .news-card-media {
    width: 82px;
  }

  .news-lead-content h2 {
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-lead-card,
  .news-lead-media img,
  .news-card,
  .news-card-media img,
  .news-rail-story {
    transition: none;
  }

  .news-market-pulse .news-item {
    transition: none;
  }
}
