/* Newsroom pages: listing, release, changelog. Colour comes from the
   features-v3 tokens so the BondGov token set renders the same markup;
   the literals are fallbacks for a page served without tokens.css.
   Measurements are ported from the newsroom artboards (1200px content
   column, 72px nav with a 3px gold rule, 1px-gap card grids). No motion
   in W0: every element is in its resting state from the first paint. */

:root {
  --news-navy: var(--mp-primary-900, #0A2540);
  --news-navy-band: var(--mp-primary-800, #0D3158);
  --news-gold: var(--mp-accent-500, #D4A64A);
  --news-gold-light: var(--mp-accent-400, #ECC97A);
  --news-gold-ink: var(--mp-accent-700, #B8862B);
  /* Brand v2 (MuniPro): accent words are ink on light and sky-soft on
     sapphire, the accent button is the action blue. The fallbacks keep
     the gold for a token set that does not define these (BondGov). */
  --news-accent-text: var(--mp-accent-text, var(--news-gold-ink));
  --news-accent-text-on-dark: var(--mp-accent-text-on-dark, var(--news-gold-light));
  --news-btn-accent-bg: var(--mp-action, var(--news-gold));
  --news-btn-accent-text: var(--mp-action-text, var(--news-navy));
  /* On the sapphire release band the action blue reads 2.56:1 against the
     ground, so MuniPro's accent button turns white with sapphire text
     (13.88:1); BondGov keeps its gold button through the fallbacks. */
  --news-btn-on-dark-bg: var(--mp-action-on-dark, var(--news-btn-accent-bg));
  --news-btn-on-dark-text: var(--mp-action-on-dark-text, var(--news-btn-accent-text));
  --news-btn-on-dark-hover: var(--mp-action-on-dark-hover, var(--news-btn-on-dark-bg));
  /* DL2 focus ring (#3D84EA, 3:1 on page and sapphire). */
  --news-focus: var(--mp-focus-ring, var(--news-gold-light));
  --news-preview-bg: var(--mp-sky, var(--news-gold-light));
  --news-ground: var(--mp-warm-bg, #F7F4EB);
  --news-rule: var(--mp-warm-rule, #E1DDD0);
  --news-line: var(--mp-neutral-200, #E5E7EB);
  --news-ink: var(--mp-neutral-800, #1F2937);
  --news-ink-soft: var(--mp-neutral-600, #4B5563);
  --news-ink-mute: var(--mp-neutral-500, #6B7384);
  --news-link: var(--mp-primary-700, #0F4A82);
  --news-tint: var(--mp-primary-100, #E0EEF9);
  --news-serif: var(--mp-font-display, 'Source Serif 4', 'Source Serif Pro', Georgia, serif);
  --news-sans: var(--mp-font-body, 'Inter', system-ui, sans-serif);
  --news-mono: var(--mp-font-mono, 'JetBrains Mono', 'Fira Code', monospace);
}
/* BondGov's app tokens define a translucent --mp-focus-ring (frontend/src/design/tokens.css),
   under 3:1 on its navy band and video frame, so BondGov keeps its opaque gold ring (R-5089-2P-01). */
[data-brand="bondgov"] { --news-focus: var(--news-gold-light); }

.news-body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--news-ground); color: var(--news-ink); font-family: var(--news-sans); -webkit-font-smoothing: antialiased; }
/* The page body grows so the footer closes a short page instead of floating mid-screen (DA-S8-F11). */
.news-body > main, .news-body > article { flex: 1 0 auto; }
.news-body a { color: inherit; text-decoration: none; }
.news-wrap { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.news-wrap--narrow { max-width: 1000px; }
.news-wrap--column { max-width: 808px; } /* 760px of prose plus the two 24px gutters */
.news-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--news-ink-mute); }
.news-mono { font-family: var(--news-mono); }
.news-serif { font-family: var(--news-serif); font-weight: 600; letter-spacing: -0.01em; color: var(--news-navy); }
.news-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Nav and footer (munipro shell; the bondgov shell brings its own chrome) */
.news-nav { background: var(--news-navy-band); height: 72px; display: flex; align-items: center; padding: 0 32px; border-bottom: 3px solid var(--news-gold); }
.news-nav__logo img { height: 26px; width: auto; display: block; }
.news-nav__links { display: flex; gap: 32px; margin-left: auto; align-items: center; list-style: none; margin-top: 0; margin-bottom: 0; padding: 0; }
.news-nav__links a { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.8); letter-spacing: 0.02em; text-transform: uppercase; }
.news-nav__links a.is-active { color: var(--news-accent-text-on-dark); }
.news-nav__links .news-btn--outline { padding: 6px 18px; }
.news-footer { background: var(--news-navy-band); color: rgba(255, 255, 255, 0.6); margin-top: 72px; padding: 48px 24px; font-size: 13px; }
.news-footer__inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.news-footer__links { display: flex; flex-wrap: wrap; gap: 12px 32px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.news-footer__links a { color: rgba(255, 255, 255, 0.5); }

/* Buttons */
.news-btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 4px; border: 2px solid transparent; }
.news-body a.news-btn--accent, .news-btn--accent { color: var(--news-btn-accent-text); background: var(--news-btn-accent-bg); border-color: var(--news-btn-accent-bg); }
.news-band a.news-btn--accent { color: var(--news-btn-on-dark-text); background: var(--news-btn-on-dark-bg); border-color: var(--news-btn-on-dark-bg); }
.news-band a.news-btn--accent:hover { background: var(--news-btn-on-dark-hover); border-color: var(--news-btn-on-dark-hover); }
.news-body a.news-btn--outline, .news-btn--outline { color: #FFFFFF; border-color: rgba(255, 255, 255, 0.5); }
.news-pill { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px; border-radius: 9999px; border: 1px solid var(--mp-neutral-300, #D1D5DB); color: var(--mp-neutral-700, #374151); font-size: 13px; font-weight: 500; background: transparent; }
.news-pill.is-active { background: var(--news-navy-band); border-color: var(--news-navy-band); color: #FFFFFF; }

/* Listing */
.news-header { padding: 64px 0 28px; display: flex; flex-direction: column; gap: 16px; }
.news-header__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.news-header h1 { margin: 0; font-size: 56px; line-height: 1.08; max-width: 14ch; }
.news-header__aside { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; padding-bottom: 6px; }
.news-header__blurb { font-size: 15px; color: var(--news-ink-soft); max-width: 34ch; text-align: right; }
.news-header__feeds { display: flex; gap: 14px; font-family: var(--news-mono); font-size: 12px; }
.news-header__feeds a { color: var(--news-link); }
.news-chips { display: flex; gap: 8px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--news-rule); flex-wrap: wrap; }
.news-chips .news-pill--end { margin-left: auto; }
.news-featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #FFFFFF; border: 1px solid var(--news-line); border-radius: 8px; overflow: hidden; margin-top: 8px; }
.news-featured__cover { position: relative; aspect-ratio: 16 / 9; background: var(--news-navy-band); border-right: 1px solid var(--news-line); overflow: hidden; }
.news-featured__cover img, .news-card__cover img, .news-featured__video, .news-card__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-featured__video, .news-card__video { display: none; }
.newsroom-hover-video.is-playing .news-featured__cover img, .newsroom-hover-video.is-playing .news-card__cover img { display: none; }
.newsroom-hover-video.is-playing .news-featured__cover .news-featured__video, .newsroom-hover-video.is-playing .news-card__cover .news-card__video { display: block; }
.news-featured__body { padding: 40px 44px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.news-featured__body h2 { margin: 0; font-size: 36px; line-height: 1.15; }
.news-featured__dek { margin: 0; font-size: 17px; line-height: 1.55; color: var(--news-ink-soft); }
.news-kicker { font-family: var(--news-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--news-accent-text); }
.news-more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--news-link); margin-top: 8px; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--news-line); border: 1px solid var(--news-line); border-radius: 8px; overflow: hidden; margin-top: 32px; }
.news-card { background: #FFFFFF; display: flex; flex-direction: column; }
.news-card__cover { aspect-ratio: 16 / 9; background: var(--news-tint); position: relative; overflow: hidden; }
.news-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; }
.news-card__kicker { font-family: var(--news-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--news-ink-mute); }
.news-card__title { margin: 0; font-size: 22px; line-height: 1.2; }
.news-card__dek { margin: 0; font-size: 14px; line-height: 1.55; color: var(--news-ink-soft); }
.news-empty { padding: 48px 0; color: var(--news-ink-soft); font-size: 16px; }
/* Empty list block (DA-S8-F05): what is missing, what will fill it, and the next step where the reader stops. */
.news-empty p { margin: 0; }
.news-empty p:first-child { color: var(--news-ink); font-weight: 600; }
.news-empty .news-empty__note { margin-top: 8px; font-size: 15px; max-width: 48ch; }
.news-empty__links { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 8px; }
.news-empty .news-more { margin-top: 0; min-height: 44px; color: var(--news-link); }
.news-pager { display: flex; justify-content: center; gap: 12px; margin: 40px 0 0; font-family: var(--news-mono); font-size: 13px; }
.news-pager a, .news-pager span { padding: 8px 14px; border-radius: 4px; border: 1px solid var(--news-rule); color: var(--news-link); }
.news-pager span { color: var(--news-ink-mute); }

/* Release page */
.news-band { background: var(--news-navy-band); color: #FFFFFF; padding: 72px 32px 176px; }
.news-band--no-media { padding-bottom: 80px; }
.news-card--filler { background: #FFFFFF; }
.news-band__inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; align-items: center; text-align: center; }
.news-band__meta { display: flex; gap: 14px; align-items: center; font-family: var(--news-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--news-accent-text-on-dark); flex-wrap: wrap; justify-content: center; }
.news-band__meta .news-sep { color: rgba(255, 255, 255, 0.35); }
/* A separator wraps together with the item it introduces, never alone at the end of a line (DA-S8-F10). */
.news-band__meta-item { display: inline-flex; align-items: center; gap: 14px; white-space: nowrap; }
.news-band h1 { margin: 0; font-family: var(--news-serif); font-weight: 600; font-size: 64px; line-height: 1.08; letter-spacing: -0.015em; color: #FFFFFF; max-width: 18ch; }
.news-band__dek { margin: 0; font-size: 21px; line-height: 1.5; color: rgba(255, 255, 255, 0.78); max-width: 58ch; }
.news-band__actions { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.news-preview { background: var(--news-preview-bg); color: var(--news-navy); font-family: var(--news-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; padding: 8px 16px; }
.news-media { position: relative; margin: -120px auto 0; }
.news-media__frame { position: relative; aspect-ratio: 16 / 9; background: var(--news-navy); border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 8px; overflow: hidden; box-shadow: 0 20px 50px rgba(10, 37, 64, 0.22); }
.news-media__frame video, .news-media__frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-media__caption { position: absolute; left: 24px; bottom: 20px; padding: 6px 10px; border-radius: 4px; background: rgba(10, 37, 64, 0.75); border: 1px solid rgba(255, 255, 255, 0.15); color: rgba(255, 255, 255, 0.85); font-family: var(--news-mono); font-size: 11px; letter-spacing: 0.06em; }
.news-article { padding: 64px 24px 24px; display: flex; flex-direction: column; gap: 18px; font-size: 18px; line-height: 1.65; color: var(--news-ink); }
.news-article--no-media { padding-top: 56px; }
.news-article p { margin: 0; }
.news-article h2 { margin: 28px 0 0; font-family: var(--news-serif); font-weight: 600; font-size: 32px; line-height: 1.2; letter-spacing: -0.01em; color: var(--news-navy); }
.news-article h3 { margin: 20px 0 0; font-family: var(--news-serif); font-weight: 600; font-size: 24px; line-height: 1.25; color: var(--news-navy); }
.news-article ul, .news-article ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.news-article a { color: var(--news-link); text-decoration: underline; text-underline-offset: 3px; }
.news-article img { max-width: 100%; height: auto; border-radius: 6px; }
.news-article blockquote { margin: 0; padding-left: 20px; border-left: 3px solid var(--news-gold); color: var(--news-ink-soft); }
.news-article pre { font-family: var(--news-mono); font-size: 14px; background: #FFFFFF; border: 1px solid var(--news-line); border-radius: 6px; padding: 16px; overflow-x: auto; }
.news-article code { font-family: var(--news-mono); font-size: 0.92em; }
.news-panel { margin-top: 12px; background: #FFFFFF; border: 1px solid var(--news-line); border-radius: 8px; padding: 22px 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; font-size: 15px; }
.news-panel__cell { display: flex; flex-direction: column; gap: 6px; }
.news-panel__label { font-family: var(--news-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--news-ink-mute); }
.news-panel a { color: var(--news-link); }
.news-share { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--news-rule); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.news-share .news-eyebrow { margin-right: 6px; }
.news-share__url { margin-left: auto; font-family: var(--news-mono); font-size: 12px; color: var(--news-ink-mute); }
.news-related { padding: 48px 0 72px; display: flex; flex-direction: column; gap: 18px; }
.news-related .news-grid { margin-top: 0; }
.news-related .news-card__body { padding: 22px 24px 24px; }

/* Changelog */
.news-log-header { padding: 64px 0 20px; display: flex; flex-direction: column; gap: 14px; }
.news-crumbs { display: flex; align-items: center; gap: 12px; }
.news-crumbs .news-sep { color: var(--mp-neutral-300, #D1D5DB); }
.news-crumbs .is-current { color: var(--news-navy); }
.news-log-header h1 { margin: 0; font-size: 44px; line-height: 1.1; }
.news-log-header__blurb { font-size: 15px; color: var(--news-ink-soft); max-width: 68ch; }
.news-month { padding: 28px 0 0; display: flex; flex-direction: column; }
.news-month__head { display: flex; align-items: baseline; gap: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--news-navy); }
.news-month__head h2 { margin: 0; font-size: 26px; }
.news-month__count { font-family: var(--news-mono); font-size: 12px; color: var(--news-ink-mute); }
.news-row { display: grid; grid-template-columns: 120px 84px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--news-rule); align-items: start; }
.news-row__date { font-family: var(--news-mono); font-size: 13px; color: var(--news-ink-mute); padding-top: 3px; }
.news-tag { display: inline-block; font-family: var(--news-mono); font-size: 11px; padding: 3px 8px; border-radius: 4px; background: var(--mp-neutral-100, #F3F4F6); color: var(--mp-neutral-700, #374151); font-weight: 500; }
.news-tag--product { background: var(--news-tint); color: var(--news-link); }
.news-tag--release { background: var(--mp-accent-50, #FBF3DC); color: var(--news-navy); border: 1px solid var(--news-gold); }
.news-row__title { margin: 0; font-family: var(--news-serif); font-weight: 600; font-size: 19px; line-height: 1.3; color: var(--news-navy); }
.news-row__title a { color: var(--news-link); }
.news-row__dek { margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: var(--news-ink-soft); }

@media (max-width: 960px) {
  .news-header h1 { font-size: 40px; max-width: none; }
  .news-header__aside { align-items: flex-start; }
  .news-header__blurb { text-align: left; }
  .news-featured, .news-grid { grid-template-columns: 1fr; }
  .news-featured__cover { border-right: 0; border-bottom: 1px solid var(--news-line); }
  .news-band { padding: 56px 24px 150px; }
  .news-band h1 { font-size: 40px; }
  .news-band__dek { font-size: 18px; }
  .news-panel { grid-template-columns: 1fr; }
  .news-row { grid-template-columns: 88px 1fr; }
  .news-row__tag { grid-column: 2; }
  .news-nav__links { gap: 18px; }
  .news-nav__links li.news-nav__optional { display: none; }
}

/* Hero video controls (WCAG 2.2.2): Pause/Play and Replay, bottom-right over the frame. The group follows the
   frame in .news-media, so the offsets add the 24px .news-wrap gutter and the frame's 1px border to 18px. */
.news-media__controls { position: absolute; right: 43px; bottom: 19px; display: flex; gap: 8px; }
/* A media error hides the group (the hidden attribute); display: flex above would otherwise beat the UA rule. */
.news-media__controls[hidden] { display: none; }
.news-media__button { min-height: 32px; border: 1px solid rgba(255,255,255,0.7); border-radius: 4px; background: rgba(10,37,64,0.82); color: #FFFFFF; padding: 8px 12px; font-family: var(--news-mono); font-size: 12px; cursor: pointer; }
.news-media__button--toggle { min-width: calc(5ch + 26px); }
.news-media__button:focus-visible { outline: 2px solid var(--news-focus); outline-offset: 3px; }
/* An error that hides a focused button moves focus to the video (R-3880-02). The frame's overflow would clip a ring
   on the video, so the frame draws it, in two colours, because its top sits on the navy band and the rest on the page
   ground: a 3px focus-ring box-shadow, which shows on the band, and outside that the link-colour outline,
   which shows on the ground. The frame's drop shadow follows the ring. */
.news-media__frame:has(video:focus-visible) { outline: 2px solid var(--news-link); outline-offset: 3px; box-shadow: 0 0 0 3px var(--news-focus), 0 20px 50px rgba(10, 37, 64, 0.22); }
/* A browser without :has() drops the rule above whole, and the frame clips the video's own ring, so focus there would
   show nothing (R-4184-04). The same ring on :focus-within: the video is the frame's only focusable descendant. */
@supports not selector(:has(*)) {
  .news-media__frame:focus-within { outline: 2px solid var(--news-link); outline-offset: 3px; box-shadow: 0 0 0 3px var(--news-focus), 0 20px 50px rgba(10, 37, 64, 0.22); }
}
/* 640px and narrower: over the frame the group would cover the title card's subtitle, so it sits under the frame,
   right-aligned, on the page ground, where the focus ring takes the link colour. */
@media (max-width: 640px) {
  .news-media__controls { position: static; justify-content: flex-end; margin-top: 10px; }
  .news-media__button:focus-visible { outline-color: var(--news-link); }
}

/* Release-news sign-up box (templates/newsroom/_signup_box.html) and its pages */
.news-signup { width: 100%; max-width: 360px; margin-top: 8px; padding: 18px 20px; background: #FFFFFF; border: 1px solid var(--news-line); border-radius: 8px; display: flex; flex-direction: column; gap: 12px; text-align: left; box-sizing: border-box; }
.news-signup__fields { display: flex; flex-direction: column; gap: 6px; }
.news-signup__label { font-size: 13px; font-weight: 600; color: var(--news-ink); }
.news-signup__input { width: 100%; min-height: 44px; box-sizing: border-box; padding: 8px 12px; border: 1px solid var(--mp-neutral-300, #D1D5DB); border-radius: 4px; background: #FFFFFF; color: var(--news-ink); font: inherit; font-size: 15px; }
.news-signup__input + .news-signup__label { margin-top: 6px; }
.news-signup__input:focus-visible, .news-signup__button:focus-visible { outline: 2px solid var(--news-link); outline-offset: 2px; }
.news-signup__consent { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.news-signup__button { min-height: 44px; cursor: pointer; font-family: inherit; }
.news-signup__text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--news-ink-soft); }
.news-empty .news-signup { margin-top: 24px; }
.news-article .news-signup { max-width: none; margin-top: 12px; font-size: 15px; line-height: 1.5; }
.news-signup-page { padding-top: 64px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.news-signup-page h1 { margin: 0; font-size: 40px; line-height: 1.15; }
.news-signup-page__message { margin: 0; font-size: 17px; line-height: 1.6; color: var(--news-ink-soft); max-width: 60ch; overflow-wrap: anywhere; }
.news-signup-page .news-more { min-height: 44px; color: var(--news-link); }

@media (max-width: 960px) {
  .news-signup { max-width: none; }
  .news-signup-page h1 { font-size: 32px; }
}
