/*
 * Daily news (NewsReading): Today's card, the news header and sources in
 * the reader, and the Library's News shelf. The newspaper cue is
 * typographic: a double ink rule along the top and a small clay أَخْبَار.
 */
.news-mark { font-size: 22px; line-height: 1.2; color: var(--clay); }
.news-topic {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 2px 10px 2px 8px; font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap;
}
.news-topic__icon { color: var(--green); flex-shrink: 0; }

/* ── Today's card ─────────────────────────────────────────────────── */
.news-card {
  background: var(--card); border: 1px solid var(--line); border-top: 4px double var(--ink); border-radius: 4px 4px 18px 18px;
  padding: 20px 24px; display: flex; gap: 28px;
}
.news-card__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.news-card__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.news-card__eyebrow { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-body); font-weight: 700; }
.news-card__title { margin: 0; display: flex; flex-direction: column; gap: 2px; font-weight: 400; }
.news-card__ar { align-self: flex-start; font-weight: 700; font-size: 30px; line-height: 1.75; }
.news-card__en { font-family: var(--font-serif); font-size: 26px; line-height: 1.1; }
.news-card__desc { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text-body); }
.news-card__facts { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-line); }
.news-card__level { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.news-card__known { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; white-space: nowrap; }
.news-card__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.news-card__side { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.news-card__read { align-self: center; display: inline-flex; align-items: center; gap: 6px; background: var(--green-soft); color: var(--green); border-radius: var(--radius-pill); padding: 5px 12px; font-size: 13px; font-weight: 700; }
.news-card__buttons { display: flex; flex-direction: column; gap: 8px; }
.news-card__read-link, .news-card__listen {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: var(--radius-pill); font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.news-card__read-link { background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); }
.news-card__read-link:hover { background: var(--ink-raised); color: var(--paper); text-decoration: none; }
.news-card__read-link.is-secondary { background: none; color: var(--ink); }
.news-card__read-link.is-secondary:hover { background: var(--sand-hover); color: var(--ink); }
.news-card__listen { background: none; border: 1.5px solid var(--line-strong); color: var(--ink); }
.news-card__listen:hover { border-color: var(--ink); }
.news-card__listen span { color: var(--clay); }
.news-card__more {
  align-self: center; background: none; border: none; padding: 6px 2px; min-height: 36px; font-size: 13px; font-weight: 600;
  color: var(--clay); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.news-card__next { align-self: center; font-size: 12px; color: var(--text-muted); }
:is(.news-card__read-link, .news-card__listen, .news-card__more, .news-levels__level, .news-switch__level, .news-shelf__level):focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.news-levels { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--paper); border-radius: 12px; padding: 8px 10px; }
.news-levels[hidden] { display: none; }
.news-levels__label { font-size: 13px; color: var(--ink-line); margin-right: 2px; }
.news-levels__level {
  display: inline-flex; align-items: center; background: var(--field); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill); padding: 0 12px; min-height: 38px; font-size: 13px; font-weight: 700; text-decoration: none;
}
.news-levels__level:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.news-levels__level[aria-checked="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.news-levels__note { font-weight: 400; }

/* ── In the reader ────────────────────────────────────────────────── */
.news-header {
  background: var(--card); border: 1px solid var(--line); border-top: 4px double var(--ink); border-radius: 4px 4px 18px 18px;
  padding: 20px 24px; display: flex; flex-direction: column; gap: 12px;
}
.news-header__title { margin: 0; display: flex; flex-direction: column; gap: 2px; font-weight: 400; }
.news-header__ar { align-self: flex-start; font-weight: 700; font-size: 38px; line-height: 1.7; }
.news-header__en { font-family: var(--font-serif); font-size: 30px; line-height: 1.1; }
.news-header__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.news-header__meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-body); }
.news-header__known { color: var(--green); font-weight: 600; }
.news-switch { display: flex; align-items: center; gap: 4px; background: var(--sand); border-radius: var(--radius-pill); padding: 4px; }
.news-switch__label { font-size: 13px; color: var(--ink-line); padding: 0 8px 0 10px; }
.news-switch__level { display: flex; align-items: center; gap: 4px; border-radius: var(--radius-pill); padding: 0 14px; min-height: 36px; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; }
.news-switch__level:hover { background: var(--sand-hover); color: var(--ink); text-decoration: none; }
.news-switch__level[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.news-switch__note { font-size: 12px; font-weight: 400; }
.news-header__listen--phone { display: none; }
.reader__titlebar--news { justify-content: flex-start; }
.reader__topline:has(.news-header__listen--phone) { display: flex; justify-content: space-between; align-items: center; }

.news-sources { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line-strong); padding: 14px 4px 0; }
.news-sources__label { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; }
.news-sources__links { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 14px; }
.news-sources__note { font-size: 12px; color: var(--text-muted); line-height: 1.45; }

/* ── The Library's News shelf ─────────────────────────────────────── */
.news-shelf__filters { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.news-shelf__levels { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.news-shelf__levels-label { font-size: 14px; color: var(--ink-line); margin-right: 4px; }
.news-shelf__level {
  display: flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); padding: 0 14px;
  min-height: 40px; font-size: 14px; color: var(--ink); text-decoration: none;
}
.news-shelf__level:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.news-shelf__level[aria-checked="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.news-shelf__yours { font-size: 12px; opacity: .85; }
.news-shelf__side { display: flex; align-items: center; gap: 14px; }
.news-shelf__days { font-size: 13px; color: var(--text-muted); }
.news-shelf__search {
  display: flex; align-items: center; gap: 8px; background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 0 14px; min-height: 40px; width: 240px; color: var(--text-muted);
}
.news-shelf__search:focus-within { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-soft); }
.news-shelf__query { flex: 1; min-width: 0; border: none; background: none; font: inherit; font-size: 14px; color: var(--ink); outline: none; }
.news-shelf__phone-note { display: none; margin: -4px 0 0; font-size: 12px; color: var(--text-muted); }
.news-shelf__query-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.news-shelf__chip { display: flex; align-items: center; gap: 8px; border-radius: var(--radius-pill); padding: 0 14px; min-height: 38px; font-size: 14px; }
.news-shelf__chip.is-level { background: var(--ink); color: var(--paper); }
.news-shelf__chip.is-query { background: var(--field); border: 1.5px solid var(--green); }
.news-shelf__clear { color: var(--text-muted); text-decoration: none; font-size: 16px; padding: 0 2px; }

.news-shelf__week { display: flex; flex-direction: column; gap: 12px; }
.news-shelf__heading { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-weight: 400; }
.news-shelf__heading-label { font-family: var(--font-serif); font-size: 28px; }
.news-shelf__heading-sub { font-size: 13px; color: var(--text-muted); }
.news-shelf__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.news-shelf__list > li { display: flex; }
.news-shelf__older { align-self: center; }

.news-story {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-top: 4px double var(--ink); border-radius: 4px 4px 18px 18px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
}
.news-story.is-today { border: 1.5px solid var(--ink); border-top: 4px double var(--ink); }
.news-story__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-story__when { display: flex; align-items: center; gap: 8px; }
.news-story__date { font-size: 13px; font-weight: 700; color: var(--text-body); }
.news-story.is-today .news-story__date { color: var(--clay); }
.news-story__new { border: 1.5px solid var(--clay); color: var(--clay); border-radius: var(--radius-pill); padding: 0 9px; font-size: 12px; font-weight: 700; }
.news-story__title { margin: 0; display: flex; flex-direction: column; font-weight: 400; }
.news-story__ar { align-self: flex-start; font-weight: 700; font-size: 26px; line-height: 1.75; }
.news-story__en { font-family: var(--font-serif); font-size: 22px; line-height: 1.15; }
.news-story__desc { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-body); }
.news-story__rows { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.news-story__also { font-size: 12px; color: var(--text-muted); }
.news-story__also a { font-weight: 700; padding: 4px 3px; }

.news-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 12px;
  min-height: 48px; color: var(--ink); text-decoration: none;
}
.news-row:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.news-row:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.news-row.is-mine { background: var(--field); border-color: var(--ink); }
.news-row__mine { font-size: 12px; font-weight: 700; }
.news-row__known { font-size: 13px; color: var(--green); font-weight: 600; white-space: nowrap; }
.news-row__state { margin-left: auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 8px; min-width: 0; max-width: 100%; }
.news-row__read { background: var(--green-soft); color: var(--green); border-radius: var(--radius-pill); padding: 2px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.news-row__started { font-size: 12px; font-weight: 700; }
.news-row__resume { background: var(--ink); color: var(--paper); border-radius: var(--radius-pill); padding: 0 12px; min-height: 30px; display: flex; align-items: center; font-size: 12px; font-weight: 700; }
.news-row__go { font-size: 13px; font-weight: 700; color: var(--text-body); }
.news-row.is-mine .news-row__go { color: var(--clay); }

.news-empty { border: 1.5px dashed var(--line-dashed); border-radius: 18px; padding: 40px 28px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.news-empty__mark { font-size: 34px; line-height: 1.4; color: var(--clay); }
.news-empty__title { font-family: var(--font-serif); font-size: 30px; line-height: 1.15; }
.news-empty__text { font-size: 15px; line-height: 1.5; color: var(--text-body); max-width: 460px; }
.news-empty__buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ── Phones ───────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .news-card { flex-direction: column; gap: 14px; padding: 16px; }
  .news-card__ar { font-size: 25px; }
  .news-card__en { font-size: 22px; }
  .news-card__side { width: auto; }
  .news-card__buttons { flex-direction: row; }
  .news-card__read, .news-card__more, .news-card__next { align-self: flex-start; }

  .news-header { padding: 14px; gap: 8px; }
  .news-header__ar { font-size: 27px; }
  .news-header__en { font-size: 23px; }
  .news-header__bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .news-switch { display: grid; grid-template-columns: repeat(3, 1fr); }
  .news-switch__label, .news-switch__note { display: none; }
  .news-switch__level { justify-content: center; min-height: 40px; }
  .news-header__listen { display: none; }
  .news-header__listen--phone { display: inline-flex; }
  .news-back__library { display: none; }

  .news-shelf__filters { border-bottom: none; padding-bottom: 0; }
  .news-shelf__levels { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
  .news-shelf__levels-label, .news-shelf__yours, .news-shelf__days { display: none; }
  .news-shelf__level { justify-content: center; padding: 0 6px; min-height: 44px; }
  .news-shelf__side, .news-shelf__search { width: 100%; }
  .news-shelf__phone-note { display: block; }
  .news-shelf__heading-label { font-size: 24px; }
  .news-shelf__heading-sub { font-size: 12px; }
  .news-shelf__list { grid-template-columns: 1fr; }
  .news-story { padding: 14px; }
  .news-story__ar { font-size: 22px; }
  .news-story__en { font-size: 19px; }
  .news-empty { padding: 28px 16px; }
  .news-empty__title { font-size: 24px; }
}

/* ▶ Listen on Today's card: a slim player (news_listen_controller) */
.news-player { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px 8px 14px; border-radius: 16px; background: var(--ink); color: var(--paper); }
.news-player[hidden] { display: none; }
.news-player__play { position: relative; width: 48px; height: 48px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%;
                     background: var(--peach); color: var(--ink); font-size: 16px; cursor: pointer; }
.news-player__play.is-loading .listen__spinner { display: block; }
.news-player__play.is-loading .news-player__icon { display: none; }
.news-player__state { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 4px; }
.news-player__status { font-size: 13px; font-weight: 700; }
.news-player__ticks { display: grid; grid-template-columns: repeat(var(--count, 9), 1fr); gap: 3px; }
.news-player__tick { height: 4px; border-radius: 4px; background: var(--ink-line-strong); }
.news-player__tick.is-done { background: var(--peach); }
.news-player__tick.is-current { background: var(--paper); }
.news-player__sub { font-size: 12px; color: var(--text-on-dark-muted); }
.news-player__next { width: 44px; height: 44px; border: 0; background: none; color: var(--paper); font-size: 16px; cursor: pointer; }
.news-player__follow { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--ink-line-strong); border-radius: var(--radius-pill);
                       color: var(--paper); font-size: 13px; font-weight: 600; text-decoration: none; }
.news-player__follow:hover { color: var(--paper); border-color: var(--paper); text-decoration: none; }
.news-player button:focus-visible, .news-player a:focus-visible { outline: 3px solid var(--peach); outline-offset: 2px; }
