/* News-style front page (shared/homepage_news_view.php). Layout only: every color, font and radius comes from
   css/vf-tokens.css. The paper look (texture, dot grid, gold squiggle, handwritten notes, white paper cards)
   is the site's own; this file arranges it as story cards on a 12-column grid. */

.nh-front { padding-bottom: 40px; }
.nh-front a { text-decoration: none; }
.nh-wrap { width: min(100% - 2 * var(--vf-gutter), var(--vf-page)); margin-inline: auto; }
.nh-hand { display: block; color: var(--vf-gold-text); font: 700 12.5px/1.3 var(--vf-font-body); letter-spacing: .14em; text-transform: uppercase; }

/* Front-page header: dateline, the one h1 and a short note */
.nh-top { padding-block: 24px 12px; }
.nh-top__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 400px); gap: 8px 40px; align-items: end; }
body.newsroom-home main .nh-top h1#nh-title { max-width: 18ch; margin-block: .08em .1em; font-size: clamp(2rem, 3.6vw, 3rem) !important; line-height: 1.04 !important; }
.nh-top__note { margin: 0 0 14px; color: var(--vf-ink-2); font: 400 .9375rem/1.55 var(--vf-font-body); }

/* VoteFiles band: compact voting essentials above the lead */
.nh-band { padding-block: 8px 20px; }
.nh-band__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 1.1fr); gap: 16px 32px; align-items: center; padding: 20px 24px; border: 1px solid var(--vf-rule); border-radius: var(--vf-radius-lg); background: var(--vf-surface); box-shadow: var(--vf-shadow-sm); }
.nh-band__label { display: block; margin-bottom: 4px; color: var(--vf-blue-text); font: 800 .75rem/1.2 var(--vf-font-body); letter-spacing: .1em; text-transform: uppercase; }
.nh-band h2 { margin: 0 0 4px; font: 700 clamp(1.4rem, 2.2vw, 1.75rem)/1.15 var(--vf-font-head); }
.nh-band__lead p { margin: 0; color: var(--vf-ink-2); font: 400 .9375rem/1.45 var(--vf-font-body); }
.nh-zip label { display: block; margin-bottom: 6px; color: var(--vf-ink); font: 700 .875rem/1.3 var(--vf-font-body); }
.nh-zip > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.nh-zip input { min-width: 0; min-height: 48px; padding: 0 16px; font: 400 1rem var(--vf-font-body); }
.nh-zip button { min-height: 48px; padding: 0 22px; cursor: pointer; font-size: .9375rem; }
.nh-zip small { display: block; margin-top: 6px; color: var(--vf-mute); font: 400 .8125rem/1.4 var(--vf-font-body); }
.nh-band__links { display: flex; flex-wrap: wrap; gap: 8px; grid-column: 1 / -1; padding-top: 14px; border-top: 1px dashed var(--vf-rule-strong); }
.nh-band__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--vf-radius-pill); background: var(--vf-surface-2); box-shadow: inset 0 0 0 1px var(--vf-rule-strong); color: var(--vf-ink); font: 600 .9375rem/1 var(--vf-font-body); transition: box-shadow var(--vf-ease), background var(--vf-ease); }
.nh-band__links a:hover { background: var(--vf-surface); box-shadow: inset 0 0 0 1.5px var(--vf-navy); }

/* Sections and headings */
.nh-section { padding-block: 32px 8px; }
.nh-section + .nh-section { border-top: 1px dashed var(--vf-rule-strong); margin-top: 24px; }
.nh-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.nh-head h2 { margin: 0; font: 700 clamp(1.65rem, 2.6vw, 2.125rem)/1.1 var(--vf-font-head); }
.nh-head h2::after { content: ""; display: block; width: 132px; height: 12px; margin-top: 4px; background: var(--vf-squiggle) left center / 100% 100% no-repeat; }
.nh-head > a { color: var(--vf-blue-text); font: 700 .9375rem/1.3 var(--vf-font-body); }
.nh-head > a:hover { text-decoration: underline; }
.nh-footnote { max-width: 80ch; margin: 24px 0 0; color: var(--vf-mute); font: 400 .8125rem/1.5 var(--vf-font-body); }
.nh-empty { padding: 20px 24px; border: 1px dashed var(--vf-rule-strong); border-radius: var(--vf-radius); background: var(--vf-surface); color: var(--vf-ink-2); font: 400 .9375rem/1.5 var(--vf-font-body); }
.nh-empty p { margin: 6px 0 0; }

/* Story card */
.nh-story { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--vf-rule); border-radius: var(--vf-radius); background: var(--vf-surface); box-shadow: var(--vf-shadow-sm); transition: box-shadow var(--vf-ease), transform var(--vf-ease); }
.nh-story:hover { box-shadow: var(--vf-shadow); transform: translateY(-2px); }
.nh-media { margin: 0; border-bottom: 1px solid var(--vf-rule); background: var(--vf-surface-2); }
.nh-media img { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.nh-media figcaption { padding: 6px 20px; color: var(--vf-mute); font: 400 .75rem/1.4 var(--vf-font-body); }
.nh-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 16px 20px 20px; }
.nh-line { display: flex; align-items: center; gap: 8px; }
.nh-tag { display: inline-block; padding: 5px 9px; border-radius: var(--vf-radius-pill); background: var(--vf-surface-2); color: var(--vf-ink-2); font: 800 .6875rem/1 var(--vf-font-body); letter-spacing: .1em; text-transform: uppercase; }
.nh-tag--news { background: var(--vf-navy); color: var(--vf-on-navy); }
.nh-tag--data { background: var(--vf-blue-soft); color: var(--vf-blue-text); }
.nh-tag--explainer { background: var(--vf-green-soft); color: var(--vf-green-text); }
.nh-tag--live { background: var(--vf-red-soft); color: var(--vf-red-text); }
.nh-tag--analysis, .nh-tag--opinion { background: var(--vf-amber-soft); color: var(--vf-amber-text); }
.nh-tag--sponsored { background: var(--vf-surface); color: var(--vf-ink); box-shadow: inset 0 0 0 1.5px var(--vf-ink-2); }
.nh-title { margin: 0; color: var(--vf-ink-strong); font: 700 1.375rem/1.2 var(--vf-font-head); letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
.nh-title a { color: inherit; }
.nh-title a::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: var(--vf-radius); }
.nh-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.nh-title a:focus-visible { outline: none; text-decoration: underline; }
.nh-title a:focus-visible::after { outline: 3px solid var(--vf-blue); outline-offset: 2px; }
.nh-dek { margin: 0; color: var(--vf-ink-2); font: 400 .9375rem/1.55 var(--vf-font-body); }
.nh-note { margin: 0; color: var(--vf-mute); font: 400 .8125rem/1.45 var(--vf-font-body); }
.nh-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: auto 0 0; padding-top: 6px; color: var(--vf-mute); font: 400 .8125rem/1.4 var(--vf-font-body); font-variant-numeric: tabular-nums; }
.nh-meta span { color: var(--vf-ink-2); font-weight: 600; }
.nh-more { position: relative; z-index: 1; align-self: flex-start; padding: 6px 0; color: var(--vf-blue-text); font: 700 .875rem/1.3 var(--vf-font-body); }
.nh-more:hover { text-decoration: underline; }
.nh-more:focus-visible { outline: 3px solid var(--vf-blue); outline-offset: 2px; }

/* Lead story */
.nh-story--lead .nh-body { gap: 12px; padding: 20px 28px 28px; }
.nh-story--lead .nh-title { font-size: clamp(1.875rem, 3.2vw, 2.625rem); line-height: 1.1; letter-spacing: -.02em; }
.nh-story--lead .nh-dek { font-size: 1.0625rem; line-height: 1.55; }
.nh-story--lead .nh-media figcaption { padding-inline: 28px; }
.nh-story--dense .nh-title { font-size: 1.125rem; line-height: 1.28; }
.nh-story--lead.no-media { background: var(--vf-surface) var(--vf-dot-grid) center / 16px 16px; }
.nh-story--lead.no-media .nh-body { padding-block: 32px 36px; }

/* Compact rail story */
.nh-story--compact.has-media { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: start; }
.nh-story--compact .nh-media { margin: 12px 0 12px 12px; overflow: hidden; border: 0; border-radius: var(--vf-radius-sm); }
.nh-story--compact .nh-body { padding: 12px 16px 14px; gap: 6px; }
.nh-story--compact .nh-title { font-size: 1.125rem; line-height: 1.25; }
.nh-story--compact .nh-meta { padding-top: 2px; }

/* Layouts */
.nh-top-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.nh-top-grid__lead { grid-column: span 7; }
.nh-top-grid__rail { grid-column: span 5; display: grid; gap: 14px; }
.nh-top-grid__lead:only-child { grid-column: 1 / -1; }
.nh-grid { display: grid; gap: 24px; }
.nh-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nh-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nh-mid-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
.nh-law { position: relative; padding: 20px 22px 22px; border: 1px solid var(--vf-rule); border-radius: var(--vf-radius); background: var(--vf-surface); box-shadow: var(--vf-shadow-sm); }
.nh-law h3 { margin: 10px 0 8px; font: 700 1.375rem/1.2 var(--vf-font-head); }
.nh-law p { margin: 0 0 10px; color: var(--vf-ink-2); font: 400 .9375rem/1.55 var(--vf-font-body); }
.nh-law .nh-law__title { color: var(--vf-ink-strong); font: 700 1.0625rem/1.3 var(--vf-font-head); }
.nh-law .nh-meta { margin: 0 0 6px; padding: 0; }
.nh-law .nh-note { margin-bottom: 8px; }

/* Explore */
.nh-explore__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.nh-explore__list a { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; height: 100%; padding: 12px 16px; border: 1px solid var(--vf-rule); border-radius: var(--vf-radius); background: var(--vf-surface); box-shadow: var(--vf-shadow-sm); color: var(--vf-ink); transition: box-shadow var(--vf-ease); }
.nh-explore__list a:hover { box-shadow: var(--vf-shadow); }
.nh-explore__list strong { font: 700 1rem/1.25 var(--vf-font-body); }
.nh-explore__list span { color: var(--vf-mute); font: 400 .8125rem/1.35 var(--vf-font-body); }
.nh-explore__list a:focus-visible, .nh-band__links a:focus-visible, .nh-head > a:focus-visible { outline: 3px solid var(--vf-blue); outline-offset: 2px; }

@media (max-width: 1099px) {
  .nh-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nh-explore__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 999px) {
  .nh-top__row { grid-template-columns: minmax(0, 1fr); }
  .nh-band__grid { grid-template-columns: minmax(0, 1fr); }
  .nh-top-grid__lead, .nh-top-grid__rail { grid-column: 1 / -1; }
  .nh-mid-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 699px) {
  .nh-grid--3, .nh-grid--2 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .nh-explore__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nh-top { padding-top: 16px; }
  .nh-band__grid { padding: 16px; }
  .nh-zip > div { grid-template-columns: minmax(0, 1fr); }
  .nh-zip button { width: 100%; }
  .nh-story--lead .nh-body { padding: 16px 18px 22px; }
  .nh-story--lead .nh-media figcaption { padding-inline: 18px; }
  .nh-story--compact.has-media { grid-template-columns: 104px minmax(0, 1fr); }
  .nh-section { padding-top: 24px; }
}
@media (max-width: 419px) {
  .nh-explore__list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .nh-story, .nh-band__links a, .nh-explore__list a { transition: none; }
  .nh-story:hover { transform: none; }
}
/* Live blog (stage N3): the LIVE label with a pulsing dot, and the front-page strip that links to the current live event. */
.lv-live { display: inline-flex; align-items: center; gap: 8px; }
.lv-dot { position: relative; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--vf-red-text); flex: 0 0 auto; }
.lv-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--vf-red-text); opacity: .5; animation: lv-pulse 1.8s var(--vf-ease, ease-out) infinite; }
@keyframes lv-pulse { 0% { transform: scale(1); opacity: .5; } 70% { transform: scale(2.6); opacity: 0; } 100% { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lv-dot::after { animation: none; opacity: .25; transform: scale(1.8); } }
/* the strip */
.lv-strip { padding: 10px 0 0; }
.lv-strip-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--vf-rule); border-radius: var(--vf-radius-pill); background: var(--vf-surface); box-shadow: var(--vf-shadow-sm); color: var(--vf-ink); text-decoration: none; }
.lv-strip-link:hover .lv-strip-title { text-decoration: underline; }
.lv-strip-title { font: 700 1rem/1.3 var(--vf-font-head); }
.lv-strip-meta { color: var(--vf-mute); font: 500 .875rem/1.3 var(--vf-font-body); font-variant-numeric: tabular-nums; }
.lv-strip-go { margin-left: auto; color: var(--vf-blue-text); font-weight: 700; }
@media (max-width: 700px) { .lv-strip-go { display: none; } .lv-strip-link { border-radius: var(--vf-radius); } }
