/*
 * News desk — styles for the news landing page (news-archive.php) and news articles
 * (news-single.php). Loaded on those two views only, after theme.css.
 *
 * The look is deliberately different from regular posts: a night band, serif headlines,
 * square corners and ruled lines instead of rounded cards. Colours come from the theme's
 * own variables, so light and dark mode both work.
 */

.is-news {
  --news-mono: var(--font-mono);
  --news-serif: var(--font-read);
  --news-band-accent: #c9a3ff;
  --news-mark: #6f9bff;
}

.container--news { max-width: calc(1040px + 2 * var(--gutter)); }

/* Small uppercase mono label */
.news-kicker,
.news-band__eyebrow,
.news-slip,
.news-filters,
.news-rule h2,
.news-rule__note,
.wire__time,
.wire__date span,
.news-earlier__meta,
.news-pager,
.news-story__bar,
.news-story__slip dt,
.news-points h2,
.news-next__meta,
.news-story__tags span {
  font-family: var(--news-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.news-kicker { color: var(--accent-ink); }

.news-mark {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--news-mark);
}

/* -------------------------------------------------------------------------
 * Night band (landing masthead and article header)
 * ---------------------------------------------------------------------- */
.news-band {
  background: var(--band-bg);
  color: var(--band-ink);
  padding: 36px 0 40px;
}
.news-band--overlap { padding-bottom: 150px; }
.news-band--story { padding: 14px 0 40px; }

.news-band a { color: inherit; }

.news-band__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 64px;
}
.news-band__copy { flex: 1 1 520px; min-width: 0; }

.news-band__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  letter-spacing: 0.16em;
  color: var(--band-ink-2);
}
.news-band__eyebrow--bright { color: var(--news-band-accent); }
.news-band__eyebrow a { text-decoration: none; }
.news-band__eyebrow a:hover { text-decoration: underline; }

.news-band__title {
  margin-top: 12px;
  font-family: var(--news-serif);
  font-weight: 600;
  font-size: clamp(3rem, 7vw, 5.25rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--band-ink);
}
.news-band__title span { color: #b886ff; }

.news-band__desc {
  margin-top: 14px;
  max-width: 520px;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--band-ink-2);
}

.news-slip {
  flex: 0 1 340px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  letter-spacing: 0.06em;
}
.news-slip > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--band-line);
}
.news-slip dt { color: var(--band-ink-2); }
.news-slip dd { text-align: right; text-transform: none; }

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.news-filters a {
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--band-ink);
  text-decoration: none;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.news-filters a:hover { border-color: var(--band-ink); }
.news-filters a[aria-current="page"] {
  background: var(--band-ink);
  border-color: var(--band-ink);
  color: var(--band-bg);
}

/* -------------------------------------------------------------------------
 * Landing: lead dispatch
 * ---------------------------------------------------------------------- */
.news-lead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px 48px;
}
.news-lead__media {
  flex: 7 1 520px;
  min-width: 0;
  display: block;
  margin-top: -110px;
  aspect-ratio: 16 / 9;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.news-lead__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--ink-3);
}

.news-lead__text { flex: 5 1 340px; min-width: 0; padding-top: 32px; }
.news-lead__title {
  margin-top: 14px;
  font-family: var(--news-serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.news-lead__title a,
.wire__title a,
.news-earlier h3 a { color: var(--ink); text-decoration: none; }
.news-lead__title a:hover,
.wire__title a:hover,
.news-earlier h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.news-lead__excerpt {
  margin-top: 16px;
  font-family: var(--news-serif);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.news-lead__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 8px;
  border-top: 1px solid var(--ink);
  font-size: 0.875rem;
  color: var(--ink-3);
}
.news-lead__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
}
.news-lead__cta:hover { text-decoration: underline; }

/* -------------------------------------------------------------------------
 * Section rule: label, line, note
 * ---------------------------------------------------------------------- */
.news-rule {
  display: flex;
  align-items: center;
  gap: 20px;
}
.news-rule h2 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  color: inherit;
}
.news-rule__line { flex: 1; height: 1px; background: var(--ink); }
.news-rule__note { color: var(--ink-3); }
.news-rule--light .news-rule__line { background: rgba(255, 255, 255, 0.28); }
.news-rule--light .news-rule__note { color: var(--band-ink); padding: 12px 0; }

/* -------------------------------------------------------------------------
 * Landing: the wire (timeline grouped by day)
 * ---------------------------------------------------------------------- */
.wire { padding-top: 72px; }

.wire__day {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 40px;
}
.wire__day + .wire__day { margin-top: 24px; }

.wire__date { flex: 0 0 150px; }
.wire__date strong {
  display: block;
  font-family: var(--news-serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
}
.wire__date span { color: var(--ink-3); }

.wire__list {
  flex: 999 1 560px;
  min-width: 0;
  border-left: 2px solid var(--ink);
}

.wire__item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  padding: 32px 0 32px 32px;
  border-top: 1px solid var(--line);
}
.wire__item:first-child { padding-top: 0; border-top: 0; }
.wire__item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 38px;
  width: 12px;
  height: 12px;
  background: var(--ink);
}
.wire__item:first-child::before { top: 6px; }
.wire__day:first-of-type .wire__item:first-child::before { background: var(--accent); }

.wire__time {
  flex: 0 0 76px;
  padding-top: 3px;
  font-size: 0.8125rem;
  letter-spacing: 0;
  color: var(--ink-3);
}
.wire__text { flex: 1 1 320px; min-width: 0; }
.wire__title {
  margin-top: 8px;
  font-family: var(--news-serif);
  font-weight: 600;
  font-size: 1.625rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.wire__text > .wire__title:first-child { margin-top: 0; }
.wire__excerpt { margin-top: 8px; max-width: 560px; color: var(--ink-2); }

.wire__media {
  flex: 0 0 220px;
  aspect-ratio: 16 / 10;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  overflow: hidden;
}
.wire__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Read state (set by theme.js on anything with data-post-id) */
.wire__item.is-read .wire__title a,
.news-earlier article.is-read h3 a { color: var(--ink-2); }

/* -------------------------------------------------------------------------
 * Landing: earlier (ruled columns, no images)
 * ---------------------------------------------------------------------- */
.news-earlier { padding-top: 56px; }
.news-earlier__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
}
.news-earlier article {
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.news-earlier article:nth-child(3n + 1) { padding-left: 0; border-left: 0; }
.news-earlier__meta { color: var(--ink-3); }
.news-earlier h3 {
  margin-top: 10px;
  font-family: var(--news-serif);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* -------------------------------------------------------------------------
 * Landing: pager and empty state
 * ---------------------------------------------------------------------- */
.news-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 32px;
  padding-bottom: 88px;
  color: var(--ink-3);
}
.news-pager__links { display: flex; flex-wrap: wrap; gap: 10px; }
.news-pager__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 22px;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: var(--bg);
  text-decoration: none;
}
.news-pager__btn--ghost { background: none; color: var(--ink); }
.news-pager__btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

.news-end { height: 88px; }

.news-empty {
  padding-top: 72px;
  padding-bottom: 96px;
  font-family: var(--news-serif);
  font-size: 1.25rem;
  color: var(--ink-2);
}
.news-empty a { color: var(--accent-ink); }

/* -------------------------------------------------------------------------
 * Article: header on the band
 * ---------------------------------------------------------------------- */
.news-story__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding-bottom: 2px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--band-ink-2);
}
.news-story__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  color: var(--band-ink);
  text-decoration: none;
}
.news-story__back:hover { text-decoration: underline; }

.news-story__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 48px;
  margin-top: 14px;
}
.news-story__headline { flex: 1 1 420px; min-width: 0; }

.news-story .news-story__title {
  font-family: var(--news-serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 3.4vw, 2.625rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--band-ink);
  text-wrap: balance;
}
.news-story__dek {
  margin-top: 14px;
  max-width: 640px;
  font-family: var(--news-serif);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--band-ink-2);
}

/* -------------------------------------------------------------------------
 * Article: featured image — a small picture beside the headline
 * ---------------------------------------------------------------------- */
.news-figure { flex: 0 0 340px; max-width: 100%; }
.news-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--band-bg-2);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
.news-figure figcaption {
  margin-top: 8px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--band-ink-2);
}

/* -------------------------------------------------------------------------
 * Article: filing slip + story
 * ---------------------------------------------------------------------- */
.news-story__layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  padding-top: 44px;
  padding-bottom: 88px;
}

.news-story__slip { flex: 0 0 200px; font-size: 0.875rem; }
.news-story__slip dl { border-top: 2px solid var(--ink); }
.news-story__slip dl > div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.news-story__slip dt { font-size: 0.72rem; letter-spacing: 0.12em; color: var(--ink-3); }
.news-story__slip dd { margin-top: 4px; font-weight: 600; }
.news-story__slip dd a { color: var(--ink); text-decoration: none; }
.news-story__slip dd a:hover { color: var(--accent-ink); text-decoration: underline; }

.news-story__share { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 0 !important; }
.news-story__share a,
.news-story__share button {
  padding: 10px 0;
  font-weight: 600;
  color: var(--accent-ink) !important;
  text-decoration: none;
}
.news-story__share a:hover,
.news-story__share button:hover { text-decoration: underline; }

.news-story__main { flex: 999 1 520px; min-width: 0; max-width: 700px; }

.news-points {
  margin-bottom: 36px;
  background: var(--surface);
  border: 1px solid var(--ink);
}
.news-points__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 24px;
  background: var(--ink);
  color: var(--bg);
}
.news-points h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.4;
  color: inherit;
}
.news-points__head span {
  font-family: var(--news-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.8;
}
.news-points ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 24px 22px 44px;
  list-style: square;
  font-size: 1.03rem;
  line-height: 1.55;
}
.news-points li::marker { color: var(--accent); }

/* Story text: serif headings, a drop cap, and quotes between rules */
.news-prose h1,
.news-prose h2,
.news-prose h3,
.news-prose h4 {
  font-family: var(--news-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.news-prose > p:first-of-type::first-letter {
  float: left;
  padding: 6px 12px 0 0;
  font-family: var(--news-serif);
  font-size: 4.6rem;
  font-weight: 600;
  line-height: 0.82;
  color: var(--accent-ink);
}
.news-prose blockquote {
  margin: 2em 0;
  padding: 24px 0;
  background: none;
  border: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  font-family: var(--news-serif);
  font-style: italic;
  font-size: 1.35em;
  line-height: 1.35;
  color: var(--ink);
}
.news-prose blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--news-mono);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.news-prose img { border-radius: 0; }

.news-story__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 48px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.news-story__tags span { font-weight: 700; letter-spacing: 0.16em; }
.news-story__tags a { color: var(--accent-ink); font-size: 0.9rem; }

/* -------------------------------------------------------------------------
 * Article: next on the wire
 * ---------------------------------------------------------------------- */
.news-next {
  padding: 56px 0 64px;
  background: var(--band-bg);
  color: var(--band-ink);
}
.news-next__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}
.news-next__link {
  display: block;
  padding: 20px 32px 20px 0;
  color: var(--band-ink);
  text-decoration: none;
}
.news-next__link--newer {
  padding: 20px 0 20px 32px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  text-align: right;
}
.news-next__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--band-ink-2);
}
.news-next__link strong {
  display: block;
  margin-top: 10px;
  font-family: var(--news-serif);
  font-weight: 600;
  font-size: 1.625rem;
  line-height: 1.2;
}
a.news-next__link:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.news-next__none { margin-top: 20px; color: var(--band-ink-2); }

/* -------------------------------------------------------------------------
 * Smaller screens
 * ---------------------------------------------------------------------- */
@media (max-width: 860px) {
  .news-band { padding: 28px 0 32px; }
  .news-band--overlap { padding-bottom: 120px; }
  .news-band--story { padding: 8px 0 32px; }
  .news-story__bar { margin-bottom: 18px; }

  .news-lead__media { flex-basis: 100%; margin-top: -88px; }
  .news-lead__text { padding-top: 0; }
  .news-figure { flex: 1 1 100%; max-width: 420px; }

  .wire { padding-top: 56px; }
  .wire__date { flex-basis: 100%; }
  .wire__date strong { display: inline; margin-right: 10px; }
  .wire__list { flex-basis: 100%; }
  .wire__time { flex-basis: 100%; }

  .news-earlier__grid { grid-template-columns: 1fr; }
  .news-earlier article,
  .news-earlier article:nth-child(3n + 1) { padding: 20px 0; border-left: 0; }

  .news-story__layout { padding-top: 36px; padding-bottom: 56px; }
  .news-story__slip { flex-basis: 100%; }
  .news-story__slip dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }

  .news-next__grid { grid-template-columns: 1fr; }
  .news-next__link,
  .news-next__link--newer { padding: 18px 0; border-left: 0; text-align: left; }
  .news-next__link--newer { border-top: 1px solid rgba(255, 255, 255, 0.28); }
  .news-next__link--empty { display: none; }
}

@media (max-width: 640px) {
  .wire__item { padding-left: 22px; }
  .wire__media { flex-basis: 100%; }
  .news-prose > p:first-of-type::first-letter { font-size: 3.6rem; }
}

@media print {
  .news-band,
  .news-next { background: none; color: #000; padding: 0; }
  .news-story .news-story__title,
  .news-story__dek,
  .news-story__bar,
  .news-band__eyebrow { color: #000; }
  .news-filters,
  .news-story__share,
  .news-next { display: none; }
}
